@kosuke-ai/cli 5.7.0 → 5.8.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.
Files changed (132) hide show
  1. package/dist/agent/summary.js +129 -8
  2. package/dist/generated/commands/activity/list.js +3 -3
  3. package/dist/generated/commands/crons/artifacts-list.js +4 -4
  4. package/dist/generated/commands/crons/create.js +4 -4
  5. package/dist/generated/commands/crons/get.js +4 -4
  6. package/dist/generated/commands/crons/list.js +4 -4
  7. package/dist/generated/commands/crons/projects-resume.js +4 -4
  8. package/dist/generated/commands/crons/run.js +4 -4
  9. package/dist/generated/commands/crons/runs-artifacts-get.js +3 -3
  10. package/dist/generated/commands/crons/runs-artifacts-list.js +3 -3
  11. package/dist/generated/commands/crons/runs-cancel.js +4 -4
  12. package/dist/generated/commands/crons/runs-get.js +4 -4
  13. package/dist/generated/commands/crons/runs-list.js +4 -4
  14. package/dist/generated/commands/crons/runs-messages.js +4 -4
  15. package/dist/generated/commands/crons/update.js +4 -4
  16. package/dist/generated/commands/deploy/cancel.js +4 -4
  17. package/dist/generated/commands/deploy/list.js +2 -2
  18. package/dist/generated/commands/deploy/messages.js +2 -2
  19. package/dist/generated/commands/deploy/queue-list.js +4 -4
  20. package/dist/generated/commands/deploy/queue-move.js +4 -4
  21. package/dist/generated/commands/deploy/queue-resume.js +4 -4
  22. package/dist/generated/commands/deploy/queue-send.js +4 -4
  23. package/dist/generated/commands/deploy/queue-steer.js +4 -4
  24. package/dist/generated/commands/deploy/queue-update.js +4 -4
  25. package/dist/generated/commands/deploy/run.js +4 -4
  26. package/dist/generated/commands/deploy/set-model.js +4 -4
  27. package/dist/generated/commands/github/repositories.js +4 -4
  28. package/dist/generated/commands/github/status.js +4 -4
  29. package/dist/generated/commands/index.js +74 -64
  30. package/dist/generated/commands/preview/get.js +4 -4
  31. package/dist/generated/commands/preview/health.js +4 -4
  32. package/dist/generated/commands/preview/reset.js +4 -4
  33. package/dist/generated/commands/preview/share-create.js +4 -4
  34. package/dist/generated/commands/preview/share-get.js +4 -4
  35. package/dist/generated/commands/projects/branches.js +4 -4
  36. package/dist/generated/commands/projects/create.js +4 -4
  37. package/dist/generated/commands/projects/env-vars-add.js +4 -4
  38. package/dist/generated/commands/projects/get.js +2 -2
  39. package/dist/generated/commands/projects/labels-color.js +4 -4
  40. package/dist/generated/commands/projects/labels.js +1 -1
  41. package/dist/generated/commands/projects/list.js +2 -2
  42. package/dist/generated/commands/projects/services-add.js +4 -4
  43. package/dist/generated/commands/projects/services-list.js +4 -4
  44. package/dist/generated/commands/projects/services-update.js +4 -4
  45. package/dist/generated/commands/projects/settings-get.js +4 -4
  46. package/dist/generated/commands/projects/settings-import.js +4 -4
  47. package/dist/generated/commands/projects/settings-update.js +4 -4
  48. package/dist/generated/commands/projects/skills.js +1 -1
  49. package/dist/generated/commands/projects/update.js +4 -4
  50. package/dist/generated/commands/sessions/activate.js +19 -5
  51. package/dist/generated/commands/sessions/all.js +3 -3
  52. package/dist/generated/commands/sessions/artifacts-attach.js +3 -3
  53. package/dist/generated/commands/sessions/artifacts-get.js +3 -3
  54. package/dist/generated/commands/sessions/artifacts-list.js +3 -3
  55. package/dist/generated/commands/sessions/comments-add.js +4 -4
  56. package/dist/generated/commands/sessions/comments-list.js +4 -4
  57. package/dist/generated/commands/sessions/comments-update.js +4 -4
  58. package/dist/generated/commands/sessions/diff-comments-add.js +4 -4
  59. package/dist/generated/commands/sessions/diff-comments-list.js +4 -4
  60. package/dist/generated/commands/sessions/diff-comments-update.js +4 -4
  61. package/dist/generated/commands/sessions/diff-commits.js +4 -4
  62. package/dist/generated/commands/sessions/diff-files.js +3 -3
  63. package/dist/generated/commands/sessions/diff-patch.js +3 -3
  64. package/dist/generated/commands/sessions/edit-prompt.js +1 -1
  65. package/dist/generated/commands/sessions/files-get.js +4 -4
  66. package/dist/generated/commands/sessions/files-list.js +4 -4
  67. package/dist/generated/commands/sessions/files-write.js +4 -4
  68. package/dist/generated/commands/sessions/get.js +2 -2
  69. package/dist/generated/commands/sessions/git-commit-message.js +4 -4
  70. package/dist/generated/commands/sessions/git-commit.js +4 -4
  71. package/dist/generated/commands/sessions/git-push.js +4 -4
  72. package/dist/generated/commands/sessions/git-state.js +4 -4
  73. package/dist/generated/commands/sessions/jobs-cancel.js +4 -4
  74. package/dist/generated/commands/sessions/jobs-get.js +1 -1
  75. package/dist/generated/commands/sessions/jobs-list.js +2 -2
  76. package/dist/generated/commands/sessions/labels-edit.js +3 -3
  77. package/dist/generated/commands/sessions/labels-set.js +3 -3
  78. package/dist/generated/commands/sessions/mark-read.js +4 -4
  79. package/dist/generated/commands/sessions/messages.js +1 -1
  80. package/dist/generated/commands/sessions/needs-you.js +4 -4
  81. package/dist/generated/commands/sessions/qa-slot.js +22 -0
  82. package/dist/generated/commands/sessions/queue-list.js +3 -3
  83. package/dist/generated/commands/sessions/queue-move.js +4 -4
  84. package/dist/generated/commands/sessions/queue-resume.js +4 -4
  85. package/dist/generated/commands/sessions/queue-send.js +4 -4
  86. package/dist/generated/commands/sessions/queue-steer.js +4 -4
  87. package/dist/generated/commands/sessions/queue-update.js +4 -4
  88. package/dist/generated/commands/sessions/runtime-command.js +4 -4
  89. package/dist/generated/commands/sessions/search.js +2 -2
  90. package/dist/generated/commands/sessions/send.js +2 -2
  91. package/dist/generated/commands/sessions/steer.js +4 -4
  92. package/dist/generated/commands/sessions/title-generate.js +4 -4
  93. package/dist/generated/commands/sessions/update.js +1 -1
  94. package/dist/generated/commands/user/plugins-list.js +3 -3
  95. package/dist/generated/commands/user/plugins-update.js +4 -4
  96. package/dist/generated/commands/user/profile.js +4 -4
  97. package/dist/generated/commands/user/skills-create.js +4 -4
  98. package/dist/generated/commands/user/skills-get.js +3 -3
  99. package/dist/generated/commands/user/skills-list.js +3 -3
  100. package/dist/generated/commands/user/skills-update.js +4 -4
  101. package/dist/generated/commands/user/subscriptions-get.js +4 -4
  102. package/dist/generated/commands/user/subscriptions-usage.js +4 -4
  103. package/dist/generated/commands/workspaces/access-status.js +4 -4
  104. package/dist/generated/commands/workspaces/ai-provider-get.js +4 -4
  105. package/dist/generated/commands/workspaces/ai-provider-usage-claude.js +4 -4
  106. package/dist/generated/commands/workspaces/ai-provider-usage-codex.js +4 -4
  107. package/dist/generated/commands/workspaces/ai-provider-usage-coding-plan.js +4 -4
  108. package/dist/generated/commands/workspaces/artifacts.js +3 -3
  109. package/dist/generated/commands/workspaces/credits.js +3 -3
  110. package/dist/generated/commands/workspaces/get.js +4 -4
  111. package/dist/generated/commands/workspaces/getting-started-get.js +4 -4
  112. package/dist/generated/commands/workspaces/getting-started-update.js +4 -4
  113. package/dist/generated/commands/workspaces/integrations-sentry-get.js +4 -4
  114. package/dist/generated/commands/workspaces/integrations-slack-get.js +4 -4
  115. package/dist/generated/commands/workspaces/lead-cards.js +21 -0
  116. package/dist/generated/commands/workspaces/lead-notifications-open.js +23 -0
  117. package/dist/generated/commands/workspaces/lead-proposals-create.js +25 -0
  118. package/dist/generated/commands/workspaces/lead-triage.js +60 -0
  119. package/dist/generated/commands/workspaces/list.js +3 -3
  120. package/dist/generated/commands/workspaces/members.js +4 -4
  121. package/dist/generated/commands/workspaces/plugins-list.js +2 -2
  122. package/dist/generated/commands/workspaces/plugins-update.js +4 -4
  123. package/dist/generated/commands/workspaces/sandbox-limit.js +3 -3
  124. package/dist/generated/commands/workspaces/skills-create.js +4 -4
  125. package/dist/generated/commands/workspaces/skills-get.js +2 -2
  126. package/dist/generated/commands/workspaces/skills-list.js +2 -2
  127. package/dist/generated/commands/workspaces/skills-update.js +4 -4
  128. package/dist/generated/commands/workspaces/stop-sandboxes.js +4 -4
  129. package/dist/generated/commands/workspaces/usage.js +3 -3
  130. package/dist/program.js +7 -10
  131. package/openapi.json +1088 -30
  132. package/package.json +1 -1
@@ -16,8 +16,8 @@ export const operation = {
16
16
  "multipart": null,
17
17
  "attachments": false,
18
18
  "anonymous": false,
19
- "sandboxToken": false,
20
- "orchestratorToken": false,
21
- "cronToken": false,
22
- "leadToken": false
19
+ "sandboxToken": true,
20
+ "orchestratorToken": true,
21
+ "cronToken": true,
22
+ "leadToken": true
23
23
  };
@@ -16,8 +16,8 @@ export const operation = {
16
16
  "multipart": null,
17
17
  "attachments": false,
18
18
  "anonymous": false,
19
- "sandboxToken": false,
20
- "orchestratorToken": false,
21
- "cronToken": false,
22
- "leadToken": false
19
+ "sandboxToken": true,
20
+ "orchestratorToken": true,
21
+ "cronToken": true,
22
+ "leadToken": true
23
23
  };
@@ -22,8 +22,8 @@ export const operation = {
22
22
  "multipart": null,
23
23
  "attachments": false,
24
24
  "anonymous": false,
25
- "sandboxToken": false,
26
- "orchestratorToken": false,
27
- "cronToken": false,
25
+ "sandboxToken": true,
26
+ "orchestratorToken": true,
27
+ "cronToken": true,
28
28
  "leadToken": true
29
29
  };
@@ -14,8 +14,8 @@ export const operation = {
14
14
  "multipart": null,
15
15
  "attachments": false,
16
16
  "anonymous": false,
17
- "sandboxToken": false,
18
- "orchestratorToken": false,
19
- "cronToken": false,
17
+ "sandboxToken": true,
18
+ "orchestratorToken": true,
19
+ "cronToken": true,
20
20
  "leadToken": true
21
21
  };
@@ -14,8 +14,8 @@ export const operation = {
14
14
  "multipart": null,
15
15
  "attachments": false,
16
16
  "anonymous": false,
17
- "sandboxToken": false,
18
- "orchestratorToken": false,
19
- "cronToken": false,
20
- "leadToken": false
17
+ "sandboxToken": true,
18
+ "orchestratorToken": true,
19
+ "cronToken": true,
20
+ "leadToken": true
21
21
  };
@@ -15,8 +15,8 @@ export const operation = {
15
15
  "multipart": null,
16
16
  "attachments": false,
17
17
  "anonymous": false,
18
- "sandboxToken": false,
19
- "orchestratorToken": false,
20
- "cronToken": false,
21
- "leadToken": false
18
+ "sandboxToken": true,
19
+ "orchestratorToken": true,
20
+ "cronToken": true,
21
+ "leadToken": true
22
22
  };
@@ -29,8 +29,8 @@ export const operation = {
29
29
  "multipart": null,
30
30
  "attachments": false,
31
31
  "anonymous": false,
32
- "sandboxToken": false,
33
- "orchestratorToken": false,
34
- "cronToken": false,
35
- "leadToken": false
32
+ "sandboxToken": true,
33
+ "orchestratorToken": true,
34
+ "cronToken": true,
35
+ "leadToken": true
36
36
  };
@@ -16,8 +16,8 @@ export const operation = {
16
16
  "multipart": null,
17
17
  "attachments": false,
18
18
  "anonymous": false,
19
- "sandboxToken": false,
20
- "orchestratorToken": false,
21
- "cronToken": false,
22
- "leadToken": false
19
+ "sandboxToken": true,
20
+ "orchestratorToken": true,
21
+ "cronToken": true,
22
+ "leadToken": true
23
23
  };
@@ -16,8 +16,8 @@ export const operation = {
16
16
  "multipart": null,
17
17
  "attachments": false,
18
18
  "anonymous": false,
19
- "sandboxToken": false,
20
- "orchestratorToken": false,
21
- "cronToken": false,
22
- "leadToken": false
19
+ "sandboxToken": true,
20
+ "orchestratorToken": true,
21
+ "cronToken": true,
22
+ "leadToken": true
23
23
  };
@@ -0,0 +1,21 @@
1
+ export const operation = {
2
+ "method": "get",
3
+ "path": "/api/organizations/{workspaceId}/lead/cards",
4
+ "command": [
5
+ "workspaces",
6
+ "lead-cards"
7
+ ],
8
+ "summary": "List your open Lead Cards in a workspace, in the order the triager ranked them.",
9
+ "pathParams": [
10
+ "workspaceId"
11
+ ],
12
+ "query": [],
13
+ "body": null,
14
+ "multipart": null,
15
+ "attachments": false,
16
+ "anonymous": false,
17
+ "sandboxToken": true,
18
+ "orchestratorToken": true,
19
+ "cronToken": true,
20
+ "leadToken": true
21
+ };
@@ -0,0 +1,23 @@
1
+ export const operation = {
2
+ "method": "post",
3
+ "path": "/api/organizations/{workspaceId}/lead/notifications/{notificationId}/open",
4
+ "command": [
5
+ "workspaces",
6
+ "lead-notifications",
7
+ "open"
8
+ ],
9
+ "summary": "Mark one of your Lead notifications as opened.",
10
+ "pathParams": [
11
+ "workspaceId",
12
+ "notificationId"
13
+ ],
14
+ "query": [],
15
+ "body": null,
16
+ "multipart": null,
17
+ "attachments": false,
18
+ "anonymous": false,
19
+ "sandboxToken": true,
20
+ "orchestratorToken": true,
21
+ "cronToken": true,
22
+ "leadToken": true
23
+ };
@@ -0,0 +1,25 @@
1
+ export const operation = {
2
+ "method": "post",
3
+ "path": "/api/organizations/{workspaceId}/lead/proposals",
4
+ "command": [
5
+ "workspaces",
6
+ "lead-proposals",
7
+ "create"
8
+ ],
9
+ "summary": "Open a Lead Card in your own Needs you that proposes one thing, with one line of why. kind start proposes starting a Backlog session, and is refused unless you are idle. kind delete_ticket (with evidence), merge_tickets (with sessionIds, mergedContent and the promptRevision sessions get gave for each ticket in revisions) and create_cron (with name, prompt, crontab, timezone and projectIds, and no sessionId) change nothing until you accept the card. Pass the body whole with --body.",
10
+ "pathParams": [
11
+ "workspaceId"
12
+ ],
13
+ "query": [],
14
+ "body": {
15
+ "fields": null,
16
+ "required": true
17
+ },
18
+ "multipart": null,
19
+ "attachments": false,
20
+ "anonymous": false,
21
+ "sandboxToken": true,
22
+ "orchestratorToken": true,
23
+ "cronToken": true,
24
+ "leadToken": true
25
+ };
@@ -0,0 +1,60 @@
1
+ export const operation = {
2
+ "method": "post",
3
+ "path": "/api/organizations/{workspaceId}/lead/triage",
4
+ "command": [
5
+ "workspaces",
6
+ "lead-triage"
7
+ ],
8
+ "summary": "Write the triage of your own open Lead Cards in a workspace: their order, one line of why per card, who reviews and merges a ready pull request, one notification, and the Welcome back sentence. Answers what was ranked, whether the notification went out, and every part it refused with the reason.",
9
+ "pathParams": [
10
+ "workspaceId"
11
+ ],
12
+ "query": [],
13
+ "body": {
14
+ "fields": [
15
+ {
16
+ "name": "rank",
17
+ "flag": "rank",
18
+ "kind": "json",
19
+ "required": false,
20
+ "description": "Open card ids, most urgent first. Cards left out keep their place behind these. A JSON array."
21
+ },
22
+ {
23
+ "name": "whys",
24
+ "flag": "whys",
25
+ "kind": "json",
26
+ "required": false,
27
+ "description": "One line of why per card, kept to 300 characters. A JSON array."
28
+ },
29
+ {
30
+ "name": "picks",
31
+ "flag": "picks",
32
+ "kind": "json",
33
+ "required": false,
34
+ "description": "Who reviews and who merges the pull request of a To approve or Merge card. A JSON array."
35
+ },
36
+ {
37
+ "name": "notify",
38
+ "flag": "notify",
39
+ "kind": "json",
40
+ "required": false,
41
+ "description": "One notification for one card. Refused while the Lead is on screen. A JSON object."
42
+ },
43
+ {
44
+ "name": "welcome",
45
+ "flag": "welcome",
46
+ "kind": "string",
47
+ "required": false,
48
+ "description": "The one sentence under \"Welcome back, N waiting\"."
49
+ }
50
+ ],
51
+ "required": true
52
+ },
53
+ "multipart": null,
54
+ "attachments": false,
55
+ "anonymous": false,
56
+ "sandboxToken": true,
57
+ "orchestratorToken": true,
58
+ "cronToken": true,
59
+ "leadToken": true
60
+ };
@@ -12,8 +12,8 @@ export const operation = {
12
12
  "multipart": null,
13
13
  "attachments": false,
14
14
  "anonymous": false,
15
- "sandboxToken": false,
16
- "orchestratorToken": false,
17
- "cronToken": false,
15
+ "sandboxToken": true,
16
+ "orchestratorToken": true,
17
+ "cronToken": true,
18
18
  "leadToken": true
19
19
  };
@@ -22,8 +22,8 @@ export const operation = {
22
22
  "multipart": null,
23
23
  "attachments": false,
24
24
  "anonymous": false,
25
- "sandboxToken": false,
26
- "orchestratorToken": false,
27
- "cronToken": false,
28
- "leadToken": false
25
+ "sandboxToken": true,
26
+ "orchestratorToken": true,
27
+ "cronToken": true,
28
+ "leadToken": true
29
29
  };
@@ -27,7 +27,7 @@ export const operation = {
27
27
  "attachments": false,
28
28
  "anonymous": false,
29
29
  "sandboxToken": true,
30
- "orchestratorToken": false,
30
+ "orchestratorToken": true,
31
31
  "cronToken": true,
32
- "leadToken": false
32
+ "leadToken": true
33
33
  };
@@ -26,8 +26,8 @@ export const operation = {
26
26
  "multipart": null,
27
27
  "attachments": false,
28
28
  "anonymous": false,
29
- "sandboxToken": false,
30
- "orchestratorToken": false,
31
- "cronToken": false,
32
- "leadToken": false
29
+ "sandboxToken": true,
30
+ "orchestratorToken": true,
31
+ "cronToken": true,
32
+ "leadToken": true
33
33
  };
@@ -14,8 +14,8 @@ export const operation = {
14
14
  "multipart": null,
15
15
  "attachments": false,
16
16
  "anonymous": false,
17
- "sandboxToken": false,
18
- "orchestratorToken": false,
19
- "cronToken": false,
17
+ "sandboxToken": true,
18
+ "orchestratorToken": true,
19
+ "cronToken": true,
20
20
  "leadToken": true
21
21
  };
@@ -37,8 +37,8 @@ export const operation = {
37
37
  "multipart": null,
38
38
  "attachments": false,
39
39
  "anonymous": false,
40
- "sandboxToken": false,
41
- "orchestratorToken": false,
42
- "cronToken": false,
43
- "leadToken": false
40
+ "sandboxToken": true,
41
+ "orchestratorToken": true,
42
+ "cronToken": true,
43
+ "leadToken": true
44
44
  };
@@ -17,7 +17,7 @@ export const operation = {
17
17
  "attachments": false,
18
18
  "anonymous": false,
19
19
  "sandboxToken": true,
20
- "orchestratorToken": false,
20
+ "orchestratorToken": true,
21
21
  "cronToken": true,
22
- "leadToken": false
22
+ "leadToken": true
23
23
  };
@@ -16,7 +16,7 @@ export const operation = {
16
16
  "attachments": false,
17
17
  "anonymous": false,
18
18
  "sandboxToken": true,
19
- "orchestratorToken": false,
19
+ "orchestratorToken": true,
20
20
  "cronToken": true,
21
- "leadToken": false
21
+ "leadToken": true
22
22
  };
@@ -32,8 +32,8 @@ export const operation = {
32
32
  "multipart": null,
33
33
  "attachments": false,
34
34
  "anonymous": false,
35
- "sandboxToken": false,
36
- "orchestratorToken": false,
37
- "cronToken": false,
38
- "leadToken": false
35
+ "sandboxToken": true,
36
+ "orchestratorToken": true,
37
+ "cronToken": true,
38
+ "leadToken": true
39
39
  };
@@ -24,8 +24,8 @@ export const operation = {
24
24
  "multipart": null,
25
25
  "attachments": false,
26
26
  "anonymous": false,
27
- "sandboxToken": false,
28
- "orchestratorToken": false,
29
- "cronToken": false,
30
- "leadToken": false
27
+ "sandboxToken": true,
28
+ "orchestratorToken": true,
29
+ "cronToken": true,
30
+ "leadToken": true
31
31
  };
@@ -29,8 +29,8 @@ export const operation = {
29
29
  "multipart": null,
30
30
  "attachments": false,
31
31
  "anonymous": false,
32
- "sandboxToken": false,
33
- "orchestratorToken": false,
34
- "cronToken": false,
32
+ "sandboxToken": true,
33
+ "orchestratorToken": true,
34
+ "cronToken": true,
35
35
  "leadToken": true
36
36
  };
package/dist/program.js CHANGED
@@ -32,11 +32,9 @@ export function createProgram(options = {}) {
32
32
  output: (outcome) => runtimeFor().output(outcome),
33
33
  };
34
34
  attachAuthCommands(program, lazy, options.auth);
35
- // A sandbox holds a credential the platform admits to a handful of
36
- // operations, so the tree shows those and `kosuke --help` there is true
37
- // rather than a list of 403s. It matters most for the orchestrator, whose
38
- // input is channel text anyone can write: a help tree advertising every
39
- // workspace command invites the attempt and spends the turn on refusals.
35
+ // An agent's credential reaches what its member's API key does, less the
36
+ // deletes and the personal credentials, so the tree shows that and
37
+ // `kosuke --help` there is true rather than a list of 403s.
40
38
  // Read from the env alone, which keeps `--help` off the credentials file.
41
39
  const token = (options.process?.env ?? process.env).KOSUKE_API_KEY;
42
40
  const narrowedTo = isSandboxAgentToken(token)
@@ -53,11 +51,10 @@ export function createProgram(options = {}) {
53
51
  : operations;
54
52
  for (const operation of reachable)
55
53
  attachOperation(program, operation, lazy);
56
- // A member's own Claude Code or Codex, or their Lead, which reads the digest
57
- // first; never an agent inside a Chat Session, a Cron Run or Slack triage.
58
- if (narrowedTo === null || narrowedTo === 'leadToken') {
59
- attachAgentCommands(program, lazy, options.agent);
60
- }
54
+ // Every agent token reads the digest's two lists as its member. Only a
55
+ // member's own key and their Lead may mark Activity seen, so the others
56
+ // read it with `--peek`.
57
+ attachAgentCommands(program, lazy, options.agent);
61
58
  // The job stream admits a member's API key only; it closes 4401 on every narrower token.
62
59
  if (narrowedTo === null)
63
60
  attachWatchCommand(program, lazy, options.watch);