@allocator-one/harness-cli 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,11 +17,16 @@ import {
17
17
  docShow,
18
18
  docUpdate,
19
19
  labelCreate,
20
+ labelDelete,
20
21
  labelList,
22
+ labelUpdate,
21
23
  linkAdd,
22
24
  linkList,
23
25
  linkRm,
24
26
  list,
27
+ memberAdd,
28
+ memberList,
29
+ memberSetRole,
25
30
  milestoneCreate,
26
31
  milestoneList,
27
32
  projectCreate,
@@ -32,14 +37,20 @@ import {
32
37
  resolveConfig,
33
38
  search,
34
39
  show,
40
+ stateAdd,
41
+ stateDelete,
42
+ stateOrder,
43
+ stateUpdate,
35
44
  stats,
36
45
  teamCreate,
37
46
  teamList,
47
+ teamRename,
48
+ teamSetDefault,
38
49
  update,
39
50
  upload,
40
51
  userList,
41
52
  workflowStates
42
- } from "./chunk-MF7MQ2L6.js";
53
+ } from "./chunk-FGBXAAKW.js";
43
54
 
44
55
  // src/mcp/server.ts
45
56
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -416,6 +427,120 @@ var TOOLS = [
416
427
  shape: { team: z.string().optional().describe("team key; defaults to HARNESS_TEAM") },
417
428
  handler: (ctx, args) => workflowStates(ctx, args["team"])
418
429
  },
430
+ {
431
+ name: "team_rename",
432
+ description: "Rename a team. The key is create-only \u2014 it is the identifier prefix of every issue filed under the team \u2014 so this changes the display name only. Needs Harness administrator standing.",
433
+ readOnly: false,
434
+ shape: {
435
+ key: z.string().describe("team key, e.g. IOS"),
436
+ name: z.string().describe("new display name")
437
+ },
438
+ handler: (ctx, args) => teamRename(ctx, args["key"], args["name"])
439
+ },
440
+ {
441
+ name: "team_set_default",
442
+ description: "Make a team the organization's default filing target, clearing the previous default. Needs Harness administrator standing.",
443
+ readOnly: false,
444
+ shape: { key: z.string().describe("team key") },
445
+ handler: (ctx, args) => teamSetDefault(ctx, args["key"])
446
+ },
447
+ {
448
+ name: "state_add",
449
+ description: "Add a workflow state to a team, appended after its existing states. Type is one of backlog, unstarted, started, completed, canceled. Needs Harness administrator standing.",
450
+ readOnly: false,
451
+ shape: {
452
+ name: z.string().describe("display name"),
453
+ type: z.string().describe("backlog | unstarted | started | completed | canceled"),
454
+ color: z.string().optional().describe("swatch name"),
455
+ team: z.string().optional().describe("team key; defaults to HARNESS_TEAM")
456
+ },
457
+ handler: (ctx, args) => stateAdd(ctx, { team: args["team"], name: args["name"], type: args["type"], color: args["color"] })
458
+ },
459
+ {
460
+ name: "state_update",
461
+ description: "Rename, retype or recolor one of a team's workflow states. Pass at least one of name, type, color. Needs Harness administrator standing.",
462
+ readOnly: false,
463
+ shape: {
464
+ id: z.string().describe("workflow state id (from workflow_states)"),
465
+ name: z.string().optional(),
466
+ type: z.string().optional().describe("backlog | unstarted | started | completed | canceled"),
467
+ color: z.string().optional().describe("swatch name"),
468
+ team: z.string().optional().describe("team key; defaults to HARNESS_TEAM")
469
+ },
470
+ handler: (ctx, args) => stateUpdate(ctx, args["id"], {
471
+ team: args["team"],
472
+ name: args["name"],
473
+ type: args["type"],
474
+ color: args["color"]
475
+ })
476
+ },
477
+ {
478
+ name: "state_order",
479
+ description: "Reorder a team's workflow states. Send EVERY state id, in the order you want them \u2014 a partial list is refused rather than half-applied, because renumbering part of the order would collide with the positions it left alone. Call workflow_states first to get the ids. Needs Harness administrator standing.",
480
+ readOnly: false,
481
+ shape: {
482
+ state_ids: z.string().describe("comma-separated state ids, in the desired order \u2014 all of them"),
483
+ team: z.string().optional().describe("team key; defaults to HARNESS_TEAM")
484
+ },
485
+ handler: (ctx, args) => stateOrder(ctx, args["state_ids"], { team: args["team"] })
486
+ },
487
+ {
488
+ name: "state_delete",
489
+ description: "Delete a workflow state. Refused while issues still sit in it \u2014 move them out first. Needs Harness administrator standing.",
490
+ readOnly: false,
491
+ shape: {
492
+ id: z.string().describe("workflow state id"),
493
+ team: z.string().optional().describe("team key; defaults to HARNESS_TEAM")
494
+ },
495
+ // `yes` is the CLI's typo guard for a human at a shell; an MCP call is
496
+ // already an explicit, named request to delete this id.
497
+ handler: (ctx, args) => stateDelete(ctx, args["id"], { team: args["team"], yes: true })
498
+ },
499
+ {
500
+ name: "label_update",
501
+ description: "Rename or recolor a label. Color is a swatch name (purple, green, red, yellow, pink, blue, orange, gray) or a hex code. Needs Harness administrator standing.",
502
+ readOnly: false,
503
+ shape: {
504
+ id: z.string().describe("label id (from label_list)"),
505
+ name: z.string().optional(),
506
+ color: z.string().optional().describe("swatch name or hex code")
507
+ },
508
+ handler: (ctx, args) => labelUpdate(ctx, args["id"], { name: args["name"], color: args["color"] })
509
+ },
510
+ {
511
+ name: "label_delete",
512
+ description: "Delete a label. Refused while issues still carry it, or while other labels are nested under it. Needs Harness administrator standing.",
513
+ readOnly: false,
514
+ shape: { id: z.string().describe("label id") },
515
+ handler: (ctx, args) => labelDelete(ctx, args["id"], { yes: true })
516
+ },
517
+ {
518
+ name: "member_list",
519
+ description: "Who can reach THIS organization's tracker, and at what rank \u2014 its grant holders plus its own admins. Not the same as user_list, which is the deployment-wide assignee picker and never lists a collaborator. Each entry carries both role (the granted rank, absent for an org admin) and standing (what that rank resolves to). Needs Harness administrator standing.",
520
+ readOnly: true,
521
+ shape: {},
522
+ handler: (ctx) => memberList(ctx)
523
+ },
524
+ {
525
+ name: "member_add",
526
+ description: "Grant a tracker rank to an existing account by email, minting the organization membership if they have none. The account must already exist. Refused if they are already on the roster \u2014 use member_set_role to change a rank. Needs Harness administrator standing.",
527
+ readOnly: false,
528
+ shape: {
529
+ email: z.string().describe("address of an existing account"),
530
+ role: z.string().describe("admin | staff | collaborator")
531
+ },
532
+ handler: (ctx, args) => memberAdd(ctx, { email: args["email"], role: args["role"] })
533
+ },
534
+ {
535
+ name: "member_set_role",
536
+ description: "Change or revoke a member's tracker rank; 'none' revokes. Refused when it would remove the organization's last Harness administrator. Needs Harness administrator standing.",
537
+ readOnly: false,
538
+ shape: {
539
+ user_id: z.string().describe("the member's user id (from member_list)"),
540
+ role: z.string().describe("admin | staff | collaborator | none")
541
+ },
542
+ handler: (ctx, args) => memberSetRole(ctx, args["user_id"], { role: args["role"] })
543
+ },
419
544
  {
420
545
  name: "user_list",
421
546
  description: "List users (for assignee resolution).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allocator-one/harness-cli",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "CLI and MCP server for Harness, allocator.one's issue tracker",
5
5
  "type": "module",
6
6
  "license": "MIT",