@kosuke-ai/kosuke 1.0.7 → 1.0.8

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 (269) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +11 -11
  3. package/dist/agent/summary.js +2 -2
  4. package/dist/commands/agent.js +4 -3
  5. package/dist/commands/auth.js +6 -7
  6. package/dist/commands/hand-written.js +93 -0
  7. package/dist/commands/integrations.js +9 -12
  8. package/dist/commands/skill-runs.js +15 -12
  9. package/dist/commands/watch.js +5 -5
  10. package/dist/generated/commands/{user/crons-artifacts-list.js → crons/artifacts-list--personal.js} +3 -1
  11. package/dist/generated/commands/{user/crons-create.js → crons/create--personal.js} +4 -2
  12. package/dist/generated/commands/crons/create.js +3 -3
  13. package/dist/generated/commands/{user/crons-get.js → crons/get--personal.js} +3 -1
  14. package/dist/generated/commands/{user/crons-list.js → crons/list--personal.js} +3 -1
  15. package/dist/generated/commands/{user/crons-run.js → crons/run--personal.js} +3 -1
  16. package/dist/generated/commands/{user/crons-runs-artifacts-get.js → crons/runs-artifacts-get--personal.js} +3 -1
  17. package/dist/generated/commands/{user/crons-runs-artifacts-list.js → crons/runs-artifacts-list--personal.js} +3 -1
  18. package/dist/generated/commands/{user/crons-runs-get.js → crons/runs-get--personal.js} +3 -1
  19. package/dist/generated/commands/{user/crons-runs-list.js → crons/runs-list--personal.js} +3 -1
  20. package/dist/generated/commands/crons/{runs-messages.js → runs-messages-list.js} +2 -1
  21. package/dist/generated/commands/{user/crons-update.js → crons/update--personal.js} +4 -2
  22. package/dist/generated/commands/crons/update.js +2 -2
  23. package/dist/generated/commands/{deploy → deploys}/cancel.js +1 -1
  24. package/dist/generated/commands/{deploy → deploys}/list.js +1 -1
  25. package/dist/generated/commands/{deploy/message.js → deploys/messages-get.js} +4 -3
  26. package/dist/generated/commands/{deploy/messages.js → deploys/messages-list.js} +4 -3
  27. package/dist/generated/commands/{deploy/set-model.js → deploys/model-set.js} +3 -2
  28. package/dist/generated/commands/{deploy → deploys}/queue-delete.js +1 -1
  29. package/dist/generated/commands/{deploy → deploys}/queue-list.js +1 -1
  30. package/dist/generated/commands/{deploy → deploys}/queue-move.js +1 -1
  31. package/dist/generated/commands/{deploy → deploys}/queue-resume.js +1 -1
  32. package/dist/generated/commands/{deploy → deploys}/queue-send.js +1 -1
  33. package/dist/generated/commands/{deploy → deploys}/queue-steer.js +1 -1
  34. package/dist/generated/commands/{deploy → deploys}/queue-update.js +1 -1
  35. package/dist/generated/commands/{deploy/run.js → deploys/start.js} +2 -2
  36. package/dist/generated/commands/devices/list.js +1 -1
  37. package/dist/generated/commands/devices/{request.js → requests-create.js} +2 -1
  38. package/dist/generated/commands/{user/files-delete.js → files/delete--personal.js} +3 -1
  39. package/dist/generated/commands/{user/files-mkdir.js → files/folders-create--personal.js} +5 -2
  40. package/dist/generated/commands/files/{mkdir.js → folders-create.js} +2 -1
  41. package/dist/generated/commands/{user/files-get.js → files/get--personal.js} +3 -1
  42. package/dist/generated/commands/{user/files-list.js → files/list--personal.js} +3 -1
  43. package/dist/generated/commands/{user/files-move.js → files/move--personal.js} +3 -1
  44. package/dist/generated/commands/{user/files-put.js → files/set--personal.js} +4 -2
  45. package/dist/generated/commands/files/{put.js → set.js} +1 -1
  46. package/dist/generated/commands/github/{status.js → connection-get.js} +2 -1
  47. package/dist/generated/commands/github/{repositories.js → repositories-list.js} +2 -1
  48. package/dist/generated/commands/index.js +330 -324
  49. package/dist/generated/commands/{user/integrations-linkedin-connect.js → integrations/browser-connections-create--personal-network-linkedin.js} +9 -3
  50. package/dist/generated/commands/{user/integrations-x-connect.js → integrations/browser-connections-create--personal-network-x.js} +9 -3
  51. package/dist/generated/commands/{user/integrations-linkedin-list.js → integrations/browser-connections-list--personal-network-linkedin.js} +8 -2
  52. package/dist/generated/commands/{user/integrations-x-list.js → integrations/browser-connections-list--personal-network-x.js} +8 -2
  53. package/dist/generated/commands/{user/integrations-linkedin-reconnect.js → integrations/browser-connections-reconnect--personal-network-linkedin.js} +8 -2
  54. package/dist/generated/commands/{user/integrations-x-reconnect.js → integrations/browser-connections-reconnect--personal-network-x.js} +8 -2
  55. package/dist/generated/commands/{user/integrations-remove.js → integrations/connections-delete--personal.js} +6 -3
  56. package/dist/generated/commands/{workspaces/integrations-remove.js → integrations/connections-delete.js} +2 -2
  57. package/dist/generated/commands/{workspaces/integrations-get.js → integrations/connections-get.js} +1 -1
  58. package/dist/generated/commands/{user/integrations-list.js → integrations/connections-list--personal.js} +4 -1
  59. package/dist/generated/commands/{workspaces/integrations-list.js → integrations/connections-list.js} +1 -1
  60. package/dist/generated/commands/integrations/{execute.js → tools-call.js} +3 -1
  61. package/dist/generated/commands/integrations/{tools.js → tools-list.js} +3 -1
  62. package/dist/generated/commands/mac/{apps.js → apps-list.js} +2 -1
  63. package/dist/generated/commands/mac/{ax-tree.js → ax-tree-get.js} +3 -2
  64. package/dist/generated/commands/mac/{browser-connections.js → browser-connections-list.js} +3 -1
  65. package/dist/generated/commands/mac/{browser-connection-check.js → browser-connections-update.js} +6 -4
  66. package/dist/generated/commands/mac/{browser-sign-in.js → browser-login.js} +2 -1
  67. package/dist/generated/commands/mac/{browser-profiles.js → browser-profiles-list.js} +3 -1
  68. package/dist/generated/commands/mac/{browser.js → browser-run.js} +2 -1
  69. package/dist/generated/commands/mac/click.js +2 -2
  70. package/dist/generated/commands/mac/{file-delete.js → files-delete.js} +2 -1
  71. package/dist/generated/commands/mac/{file-read.js → files-get.js} +2 -1
  72. package/dist/generated/commands/mac/{file-list.js → files-list.js} +2 -1
  73. package/dist/generated/commands/mac/{file-move.js → files-move.js} +2 -1
  74. package/dist/generated/commands/mac/{file-write.js → files-set.js} +2 -1
  75. package/dist/generated/commands/mac/key.js +1 -1
  76. package/dist/generated/commands/mac/{screenshot.js → screenshots-create.js} +3 -2
  77. package/dist/generated/commands/mac/scroll.js +2 -2
  78. package/dist/generated/commands/mac/{tools.js → status-get.js} +2 -1
  79. package/dist/generated/commands/mac/type.js +2 -2
  80. package/dist/generated/commands/mac/{windows.js → windows-list.js} +2 -1
  81. package/dist/generated/commands/{user/plugins-list.js → plugins/list--personal.js} +3 -1
  82. package/dist/generated/commands/{workspaces/plugins-list.js → plugins/list.js} +0 -1
  83. package/dist/generated/commands/{user/plugins-update.js → plugins/update--personal.js} +3 -1
  84. package/dist/generated/commands/{workspaces/plugins-update.js → plugins/update.js} +0 -1
  85. package/dist/generated/commands/preview/{health.js → health-get.js} +2 -1
  86. package/dist/generated/commands/preview/{shared-artifact.js → shared-artifacts-get.js} +2 -1
  87. package/dist/generated/commands/preview/{shared.js → shared-get.js} +2 -1
  88. package/dist/generated/commands/projects/{batch-merging-add-member.js → batch-merging-members-create.js} +2 -1
  89. package/dist/generated/commands/projects/{batch-merging-eject.js → batch-merging-members-delete.js} +2 -1
  90. package/dist/generated/commands/projects/{branches.js → branches-list.js} +2 -1
  91. package/dist/generated/commands/projects/{env-vars-add.js → env-vars-create.js} +1 -1
  92. package/dist/generated/commands/projects/{env-vars-remove.js → env-vars-delete.js} +1 -1
  93. package/dist/generated/commands/projects/{labels.js → labels-list.js} +2 -1
  94. package/dist/generated/commands/projects/{labels-usage.js → labels-sessions-list.js} +2 -1
  95. package/dist/generated/commands/projects/{labels-color.js → labels-update.js} +1 -1
  96. package/dist/generated/commands/projects/{live-logs.js → live-logs-list.js} +2 -1
  97. package/dist/generated/commands/projects/{live-query.js → live-queries-run.js} +2 -1
  98. package/dist/generated/commands/projects/{live-traffic.js → live-traffic-get.js} +2 -1
  99. package/dist/generated/commands/projects/{live-write.js → live-writes-create.js} +2 -1
  100. package/dist/generated/commands/projects/{live-write-status.js → live-writes-get.js} +2 -1
  101. package/dist/generated/commands/projects/{releases.js → releases-list.js} +2 -1
  102. package/dist/generated/commands/projects/{services-add.js → services-create.js} +1 -1
  103. package/dist/generated/commands/projects/{services-remove.js → services-delete.js} +1 -1
  104. package/dist/generated/commands/projects/{settings-import.js → settings-set.js} +1 -1
  105. package/dist/generated/commands/projects/{skills.js → skills-list.js} +2 -1
  106. package/dist/generated/commands/projects/{versions.js → versions-list.js} +2 -1
  107. package/dist/generated/commands/projects/{switch-workflow.js → workflow-set.js} +2 -1
  108. package/dist/generated/commands/prototypes/create.js +69 -0
  109. package/dist/generated/commands/{workspaces/access-status.js → providers/access-get.js} +3 -2
  110. package/dist/generated/commands/{user/subscriptions-set-default-model.js → providers/default-model-set--personal.js} +6 -3
  111. package/dist/generated/commands/{user/subscriptions-delete.js → providers/delete--personal.js} +4 -2
  112. package/dist/generated/commands/{workspaces/ai-provider-remove.js → providers/delete.js} +2 -3
  113. package/dist/generated/commands/{user/subscriptions-get.js → providers/get--personal.js} +4 -2
  114. package/dist/generated/commands/{workspaces/ai-provider-get.js → providers/get.js} +1 -2
  115. package/dist/generated/commands/{workspaces/ai-provider-google-remove.js → providers/google-delete.js} +2 -3
  116. package/dist/generated/commands/{workspaces/ai-provider-google-get.js → providers/google-get.js} +1 -2
  117. package/dist/generated/commands/{workspaces/ai-provider-google-delete-method.js → providers/google-methods-delete.js} +3 -3
  118. package/dist/generated/commands/{workspaces/ai-provider-google-select-method.js → providers/google-methods-set.js} +3 -3
  119. package/dist/generated/commands/{workspaces/ai-provider-google-save.js → providers/google-set.js} +2 -3
  120. package/dist/generated/commands/{user/subscriptions-grok-get.js → providers/grok-get--personal.js} +4 -2
  121. package/dist/generated/commands/{workspaces → providers}/grok-get.js +1 -1
  122. package/dist/generated/commands/{user/subscriptions-grok-change.js → providers/grok-update--personal.js} +5 -3
  123. package/dist/generated/commands/{workspaces/grok-change.js → providers/grok-update.js} +2 -2
  124. package/dist/generated/commands/{user/subscriptions-set-key.js → providers/keys-set--personal.js} +6 -3
  125. package/dist/generated/commands/{user/subscriptions-login-antigravity-cancel.js → providers/logins-cancel--personal-provider-antigravity.js} +9 -4
  126. package/dist/generated/commands/{workspaces/ai-provider-login-antigravity-cancel.js → providers/logins-cancel--provider-antigravity.js} +8 -4
  127. package/dist/generated/commands/{user/subscriptions-login-antigravity-complete.js → providers/logins-complete--personal-provider-antigravity.js} +9 -4
  128. package/dist/generated/commands/{user/subscriptions-login-claude-complete.js → providers/logins-complete--personal-provider-claude-code.js} +9 -4
  129. package/dist/generated/commands/{user/subscriptions-login-codex-complete.js → providers/logins-complete--personal-provider-codex.js} +9 -4
  130. package/dist/generated/commands/{user/subscriptions-login-muse-complete.js → providers/logins-complete--personal-provider-muse-code.js} +9 -4
  131. package/dist/generated/commands/{workspaces/ai-provider-login-antigravity-complete.js → providers/logins-complete--provider-antigravity.js} +8 -4
  132. package/dist/generated/commands/{workspaces/provider-login-claude-complete.js → providers/logins-complete--provider-claude-code.js} +8 -3
  133. package/dist/generated/commands/{workspaces/provider-login-codex-complete.js → providers/logins-complete--provider-codex.js} +8 -3
  134. package/dist/generated/commands/{workspaces/provider-login-muse-complete.js → providers/logins-complete--provider-muse-code.js} +8 -3
  135. package/dist/generated/commands/{user/subscriptions-logins-delete.js → providers/logins-delete--personal.js} +4 -2
  136. package/dist/generated/commands/{user/subscriptions-logins-recheck.js → providers/logins-recheck--personal.js} +4 -2
  137. package/dist/generated/commands/{workspaces/ai-provider-logins-recheck.js → providers/logins-recheck.js} +1 -2
  138. package/dist/generated/commands/{user/subscriptions-login-antigravity-start.js → providers/logins-start--personal-provider-antigravity.js} +9 -4
  139. package/dist/generated/commands/{user/subscriptions-login-claude-start.js → providers/logins-start--personal-provider-claude-code.js} +9 -4
  140. package/dist/generated/commands/{user/subscriptions-login-codex-start.js → providers/logins-start--personal-provider-codex.js} +9 -4
  141. package/dist/generated/commands/{user/subscriptions-login-muse-start.js → providers/logins-start--personal-provider-muse-code.js} +9 -4
  142. package/dist/generated/commands/{workspaces/ai-provider-login-antigravity-start.js → providers/logins-start--provider-antigravity.js} +8 -4
  143. package/dist/generated/commands/{workspaces/provider-login-claude-start.js → providers/logins-start--provider-claude-code.js} +8 -3
  144. package/dist/generated/commands/{workspaces/provider-login-codex-start.js → providers/logins-start--provider-codex.js} +8 -3
  145. package/dist/generated/commands/{workspaces/provider-login-muse-start.js → providers/logins-start--provider-muse-code.js} +8 -3
  146. package/dist/generated/commands/{workspaces/ai-provider-set.js → providers/set.js} +1 -2
  147. package/dist/generated/commands/{user/subscriptions-token-usage.js → providers/token-usage-get--personal.js} +6 -3
  148. package/dist/generated/commands/{workspaces/ai-provider-token-usage.js → providers/token-usage-get.js} +3 -3
  149. package/dist/generated/commands/{user/subscriptions-usage.js → providers/usage-get--personal.js} +6 -3
  150. package/dist/generated/commands/{workspaces/ai-provider-google-usage.js → providers/usage-get--provider-antigravity.js} +9 -4
  151. package/dist/generated/commands/{workspaces/ai-provider-usage-claude.js → providers/usage-get--provider-claude-code.js} +8 -3
  152. package/dist/generated/commands/{workspaces/ai-provider-usage-codex.js → providers/usage-get--provider-codex.js} +8 -3
  153. package/dist/generated/commands/{workspaces/ai-provider-usage-coding-plan.js → providers/usage-get--provider-coding-plan.js} +8 -3
  154. package/dist/generated/commands/{workspaces/ai-provider-usage-deepseek.js → providers/usage-get--provider-deepseek-api.js} +8 -3
  155. package/dist/generated/commands/{workspaces/ai-provider-usage-grok.js → providers/usage-get--provider-grok.js} +8 -3
  156. package/dist/generated/commands/{workspaces/ai-provider-usage-kimi-code.js → providers/usage-get--provider-kimi-code.js} +8 -3
  157. package/dist/generated/commands/{workspaces/ai-provider-usage-muse.js → providers/usage-get--provider-muse-code.js} +8 -3
  158. package/dist/generated/commands/sensei/{cards.js → cards-list.js} +2 -1
  159. package/dist/generated/commands/sensei/{cards-send-reply.js → cards-reply.js} +1 -1
  160. package/dist/generated/commands/sensei/{cards-put.js → cards-set.js} +1 -1
  161. package/dist/generated/commands/sensei/{chat.js → chat-get.js} +2 -1
  162. package/dist/generated/commands/sensei/{connect.js → connect-buttons-create.js} +2 -1
  163. package/dist/generated/commands/sensei/delegates-list.js +25 -0
  164. package/dist/generated/commands/sensei/{delegates-note.js → delegates-notes-create.js} +2 -1
  165. package/dist/generated/commands/sensei/{describe.js → describe-cards-create.js} +2 -1
  166. package/dist/generated/commands/sensei/{device-requests-decide.js → device-requests-update.js} +1 -1
  167. package/dist/generated/commands/sensei/{memory-put.js → memory-set.js} +4 -2
  168. package/dist/generated/commands/sensei/{merge-rule.js → merge-rule-set.js} +2 -1
  169. package/dist/generated/commands/sensei/{messages-reroute.js → messages-move.js} +1 -1
  170. package/dist/generated/commands/sensei/messages-send.js +2 -2
  171. package/dist/generated/commands/sensei/{notifications-open.js → notifications-mark-read.js} +1 -1
  172. package/dist/generated/commands/sensei/{reels-activity.js → reels-activity-list.js} +2 -1
  173. package/dist/generated/commands/sensei/{reels-ranks.js → reels-ranks-list.js} +2 -1
  174. package/dist/generated/commands/sensei/{repository.js → repository-cards-create.js} +2 -1
  175. package/dist/generated/commands/sensei/{review-approve.js → review-approvals-create.js} +2 -1
  176. package/dist/generated/commands/sensei/{review-context.js → review-context-get.js} +2 -1
  177. package/dist/generated/commands/sensei/{review-ask.js → review-requests-create.js} +3 -2
  178. package/dist/generated/commands/sensei/{sessions-assess.js → sessions-assessments-create.js} +2 -1
  179. package/dist/generated/commands/sensei/{sessions-facts.js → sessions-facts-get.js} +2 -1
  180. package/dist/generated/commands/sensei/{suggest.js → suggestions-create.js} +2 -1
  181. package/dist/generated/commands/sensei/{thread-done.js → threads-close.js} +2 -2
  182. package/dist/generated/commands/sensei/{thread-read.js → threads-get.js} +2 -2
  183. package/dist/generated/commands/sensei/{threads.js → threads-list.js} +2 -1
  184. package/dist/generated/commands/sensei/{thread-move.js → threads-move.js} +1 -1
  185. package/dist/generated/commands/sensei/{thread-split.js → threads-split.js} +1 -1
  186. package/dist/generated/commands/sensei/{widgets.js → widgets-get.js} +2 -1
  187. package/dist/generated/commands/sessions/app-stack-start.js +2 -1
  188. package/dist/generated/commands/sessions/{artifacts-attach.js → artifacts-create.js} +1 -1
  189. package/dist/generated/commands/sessions/create.js +2 -2
  190. package/dist/generated/commands/sessions/{desktop-control.js → desktop-control-set.js} +3 -1
  191. package/dist/generated/commands/sessions/{desktop.js → desktop-get.js} +2 -1
  192. package/dist/generated/commands/sessions/desktop-start.js +2 -1
  193. package/dist/generated/commands/sessions/{diff-comments-add.js → diff-comments-create.js} +1 -1
  194. package/dist/generated/commands/sessions/{diff-commits.js → diff-commits-list.js} +2 -1
  195. package/dist/generated/commands/sessions/{diff-files.js → diff-files-list.js} +2 -1
  196. package/dist/generated/commands/sessions/{diff-patch.js → diff-patch-get.js} +2 -1
  197. package/dist/generated/commands/sessions/{files-write.js → files-set.js} +1 -1
  198. package/dist/generated/commands/sessions/get.js +1 -1
  199. package/dist/generated/commands/sessions/{git-commit-message.js → git-commit-message-create.js} +2 -1
  200. package/dist/generated/commands/sessions/{git-state.js → git-state-get.js} +2 -1
  201. package/dist/generated/commands/sessions/{go-ahead-clear.js → go-ahead-delete.js} +1 -1
  202. package/dist/generated/commands/sessions/{labels-edit.js → labels-update.js} +1 -1
  203. package/dist/generated/commands/sessions/{all.js → list--all.js} +4 -1
  204. package/dist/generated/commands/sessions/{message.js → messages-get.js} +4 -3
  205. package/dist/generated/commands/sessions/{messages.js → messages-list.js} +3 -2
  206. package/dist/generated/commands/sessions/{edit-prompt.js → prompt-update.js} +2 -1
  207. package/dist/generated/commands/sessions/pull-request-mark-ready.js +40 -0
  208. package/dist/generated/commands/sessions/qa-runs-finish.js +66 -0
  209. package/dist/generated/commands/sessions/qa-runs-fixes-create.js +65 -0
  210. package/dist/generated/commands/sessions/qa-runs-get.js +22 -0
  211. package/dist/generated/commands/sessions/qa-runs-results-create.js +45 -0
  212. package/dist/generated/commands/sessions/qa-runs-start.js +75 -0
  213. package/dist/generated/commands/sessions/qa-runs-stop.js +43 -0
  214. package/dist/generated/commands/sessions/qa-set.js +1 -1
  215. package/dist/generated/commands/sessions/review-set.js +53 -0
  216. package/dist/generated/commands/sessions/{runtime-command.js → runtime-commands-run.js} +2 -1
  217. package/dist/generated/commands/sessions/{activate.js → start.js} +1 -1
  218. package/dist/generated/commands/sessions/update.js +1 -1
  219. package/dist/generated/commands/{user/skills-create.js → skills/create--personal.js} +3 -1
  220. package/dist/generated/commands/{workspaces/skills-create.js → skills/create.js} +0 -1
  221. package/dist/generated/commands/{user/skills-delete.js → skills/delete--personal.js} +3 -1
  222. package/dist/generated/commands/{workspaces/skills-delete.js → skills/delete.js} +0 -1
  223. package/dist/generated/commands/{user/skills-get.js → skills/get--personal.js} +3 -1
  224. package/dist/generated/commands/{workspaces/skills-get.js → skills/get.js} +0 -1
  225. package/dist/generated/commands/{user/skills-list.js → skills/list--personal.js} +3 -1
  226. package/dist/generated/commands/{workspaces/skills-list.js → skills/list.js} +0 -1
  227. package/dist/generated/commands/{user/skills-update.js → skills/update--personal.js} +3 -1
  228. package/dist/generated/commands/{workspaces/skills-update.js → skills/update.js} +0 -1
  229. package/dist/generated/commands/{personal-tasks/create.js → tasks/create--personal.js} +5 -2
  230. package/dist/generated/commands/tasks/create.js +2 -2
  231. package/dist/generated/commands/{personal-tasks/delete.js → tasks/delete--personal.js} +4 -1
  232. package/dist/generated/commands/{personal-tasks/get.js → tasks/get--personal.js} +4 -1
  233. package/dist/generated/commands/tasks/{labels.js → labels-list.js} +2 -1
  234. package/dist/generated/commands/tasks/{all.js → list--all.js} +4 -1
  235. package/dist/generated/commands/{personal-tasks/list.js → tasks/list--personal.js} +4 -1
  236. package/dist/generated/commands/{personal-tasks/move.js → tasks/move--personal.js} +4 -1
  237. package/dist/generated/commands/{personal-tasks/start.js → tasks/start--personal.js} +5 -2
  238. package/dist/generated/commands/tasks/start.js +1 -1
  239. package/dist/generated/commands/{personal-tasks/update.js → tasks/update--personal.js} +4 -1
  240. package/dist/generated/commands/tasks/update.js +1 -1
  241. package/dist/generated/commands/user/{auth-token-revoke.js → api-keys-delete.js} +2 -2
  242. package/dist/generated/commands/user/{profile.js → profile-get.js} +2 -1
  243. package/dist/generated/commands/user/{push-devices-register.js → push-devices-create.js} +1 -1
  244. package/dist/generated/commands/user/{push-devices-remove.js → push-devices-delete.js} +1 -1
  245. package/dist/generated/commands/workspaces/{artifacts.js → artifacts-search.js} +2 -1
  246. package/dist/generated/commands/workspaces/{credits.js → credits-get.js} +2 -1
  247. package/dist/generated/commands/{members/list.js → workspaces/members-list--all.js} +4 -0
  248. package/dist/generated/commands/workspaces/{members.js → members-list.js} +2 -1
  249. package/dist/generated/commands/workspaces/{sandbox-limit.js → sandbox-limit-get.js} +2 -1
  250. package/dist/generated/commands/workspaces/{stop-sandboxes.js → sandboxes-stop.js} +2 -1
  251. package/dist/generated/commands/workspaces/timezone-set.js +2 -1
  252. package/dist/generated/commands/workspaces/{usage.js → usage-get.js} +2 -1
  253. package/dist/integrations/api.js +1 -1
  254. package/dist/integrations/render.js +1 -1
  255. package/dist/program.js +15 -9
  256. package/dist/runtime/aliases.js +516 -0
  257. package/dist/runtime/attach.js +301 -55
  258. package/dist/runtime/former-commands.js +89 -0
  259. package/dist/runtime/job-watch.js +1 -1
  260. package/dist/runtime/variants.js +205 -0
  261. package/openapi.json +2200 -1063
  262. package/package.json +15 -6
  263. package/dist/generated/commands/crons/projects-resume.js +0 -21
  264. package/dist/generated/commands/crons/runs-diagnostics.js +0 -21
  265. package/dist/generated/commands/sessions/needs-you.js +0 -16
  266. package/dist/generated/commands/sessions/qa-clear.js +0 -22
  267. package/dist/generated/commands/sessions/title-generate.js +0 -29
  268. package/dist/generated/commands/user/memory-list.js +0 -17
  269. package/dist/generated/commands/user/memory-put.js +0 -37
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.8
4
+
5
+ - A command refuses `--<flag>` given together with `--<flag>-file`, and two file flags that both read stdin (`-`).
6
+ - Hand-written commands end in a verb: `kosuke agent summary get`, `kosuke auth status get`, `kosuke integrations tools get` (was `integrations describe`), `kosuke sessions jobs watch` (was `sessions watch`) and `kosuke sessions skill-runs finish` (was `end`). The old names keep working, hidden, for one release. The raw `integrations tools` and `integrations execute` passthroughs move to hidden `integrations tools list` and `integrations tools call`, and the `workspaces sensei-*` and `workspaces lead-*` aliases are removed.
7
+ - Every command now reads `kosuke <group> [<sub-noun> …] <verb>`: groups are plural (`deploys`, `providers`, `skills`, `plugins`), and the last word is a verb (`sessions start`, `sensei cards list`, `files set`, `mac files get`). Personal and workspace commands share one tree: pass `personal` where the workspace id goes (`kosuke crons get personal <cronId>`, `kosuke tasks list personal`), or leave it out for every workspace (`kosuke tasks list`, `kosuke sessions list`). The provider commands take `--provider` (`kosuke providers usage get <workspaceId> --provider codex`). Every old name still runs, hidden, for one release, with its old arguments and flags. `kosuke sessions needs-you` and its route are removed; use `kosuke sessions list --needs-you`. Personal Cron projects take `--project` (was `--project-ids`). MCP tools and toolsets follow the new names (`deploys_start`, `providers_usage_get`); the `deploy` and `personal-tasks` toolsets keep working for one release.
8
+ - The README, the help texts and the messages the platform prints name each command by its new name, and the API reference summaries name commands as `kosuke <command>`.
9
+ - Remove `crons projects resume`, `crons runs diagnostics`, `sessions qa clear` and `sessions title-generate`. Each removed endpoint answers 410 with what to run instead: `crons update --enabled`, `crons runs get`, `sessions qa set` or `sessions update`.
10
+ - `kosuke sessions pull-request mark-ready` refuses while no check has reported on the head of a repository with workflow files, unless `--without-checks` is passed.
11
+ - Add `kosuke prototypes create`: the platform renders a prototype from its configuration, styles and script, checks it and saves it to a Chat Session's artifacts or a workspace's Files.
12
+ - QA and review commands check what they record: `kosuke sessions qa runs finish` clears a QA Passed its session's runs recorded at the same head when the run ends not passed, `qa runs fixes create` takes only a commit on HEAD after the run's start and at least one retest id, `kosuke sessions review set` refuses uncommitted tracked changes, a stopped Turn and a run past 2147483647, and `kosuke sessions pull-request mark-ready` re-reads the head before marking it ready.
13
+ - Kosuke keeps QA Runs itself: `kosuke sessions qa runs start`, `results create`, `fixes create`, `stop` and `finish` record a session's run from its own sandbox and answer the checklist to write back, and `kosuke sessions qa runs get` reads a run as data. `finish` records QA Passed when the whole checklist passed at the sandbox's clean HEAD, and keeps the run's usage from `--usage-file`. A field that takes a file, such as the checklist or a result, also has a `--<flag>-file <path>` flag. An agent's `kosuke sessions qa set` now only repeats a pass `finish` recorded; a member's still sets it by hand. New: `kosuke sessions pull-request mark-ready` marks the session's draft pull request ready for review only when its head is the sandbox's clean HEAD, its CI is green and QA passed on it, and `kosuke sessions review set` records a review's verdict for the sandbox's HEAD.
14
+ - Add `kosuke sensei delegates list --thread <id>`, which lists the delegates of one of your Sensei threads with their state, Model and Delegate Summary.
15
+ - Your Memory has one command set, `kosuke sensei memory get` and `kosuke sensei memory set`. `kosuke user memory put` is removed, and `kosuke user memory list` runs `kosuke sensei memory get`, hidden, for one release. Only you and your Sensei, for a card you approved, can change Memory: a session or a Cron can read it but no longer save it.
16
+ - A command refused for `personal` or a missing scope now names the id it takes, a project id or a workspace id, and the command that lists them.
17
+
3
18
  ## 1.0.7
4
19
 
5
20
  - Remove the hidden `workspaces sensei-*` and `workspaces lead-*` commands and stop reading `kosuke_lead_` tokens as Sensei tokens; use the `sensei` commands.
package/README.md CHANGED
@@ -14,7 +14,7 @@ kosuke sessions create <projectId> --title "Fix the login form" \
14
14
  kosuke crons create <workspaceId> --project <projectId> --project <projectId> \
15
15
  --name "Daily ingest" --prompt "/sources" \
16
16
  --cron-expression "0 6 * * *"
17
- kosuke workspaces timezone-set <workspaceId> --timezone Europe/Zurich
17
+ kosuke workspaces timezone set <workspaceId> --timezone Europe/Zurich
18
18
  ```
19
19
 
20
20
  Every API command prints the platform's JSON response as is, so it pipes into `jq`.
@@ -35,7 +35,7 @@ The main chat agent records Factory Skill boundaries with these commands:
35
35
 
36
36
  ```sh
37
37
  kosuke sessions skill-runs start kosuke:ship
38
- kosuke sessions skill-runs end kosuke:ship --result ready
38
+ kosuke sessions skill-runs finish kosuke:ship --result ready
39
39
  ```
40
40
 
41
41
  The sandbox supplies the session identity and its Turn credential. The server selects the
@@ -50,14 +50,14 @@ prints `skill-markers-v1` without credentials, so an older CLI never receives an
50
50
 
51
51
  ## Watching a turn
52
52
 
53
- `kosuke sessions watch` follows one turn's job as it runs, so a script does not
53
+ `kosuke sessions jobs watch` follows one turn's job as it runs, so a script does not
54
54
  have to poll `sessions jobs get`. Each frame the platform streams is one JSON
55
55
  line on stdout, so it pipes into `jq`, and everything meant for a person goes to
56
56
  stderr. The job id is the `chatJobId` that `sessions create` and `sessions send`
57
57
  return.
58
58
 
59
59
  ```sh
60
- kosuke sessions watch <projectId> <sessionId> <jobId> \
60
+ kosuke sessions jobs watch <projectId> <sessionId> <jobId> \
61
61
  | jq -r 'select(.type == "message") | .data.text'
62
62
  ```
63
63
 
@@ -76,7 +76,7 @@ was refused, 4 when the project, session or job was not found, and 124 when
76
76
  `--timeout` passed first.
77
77
 
78
78
  `--type deploy` watches a deploy instead. The job id is then the
79
- `activeStreamId` that `kosuke deploy messages` returns, and the session id is
79
+ `activeStreamId` that `kosuke deploys messages list` returns, and the session id is
80
80
  not read. The deploy's status describes its latest turn only, so when a later
81
81
  turn or Deploy takes over before the watch reads how this turn ended, it says
82
82
  so on stderr and exits 1.
@@ -87,7 +87,7 @@ document below cannot describe.
87
87
  ## Upgrading from 5.x
88
88
 
89
89
  A cron no longer has a timezone of its own: every cron of a workspace is read
90
- in the Workspace Timezone, which `kosuke workspaces timezone-set <workspaceId>
90
+ in the Workspace Timezone, which `kosuke workspaces timezone set <workspaceId>
91
91
  --timezone Europe/Zurich` sets, as an owner or admin. `crons create` and `crons
92
92
  update` lose `--timezone`, and the API refuses a cron body that still sends one,
93
93
  which is what an older CLI does with `--timezone`. `crons get` still prints the
@@ -138,12 +138,12 @@ kosuke auth login --api-url https://app.stage.kosuke.ai
138
138
  kosuke projects list # same shell, so it reads the stage key and URL
139
139
  ```
140
140
 
141
- A shell alias or direnv keeps the variable set; `kosuke auth status` prints
141
+ A shell alias or direnv keeps the variable set; `kosuke auth status get` prints
142
142
  which URL, which key source and which credentials file won.
143
143
 
144
144
  ## A digest for an agent
145
145
 
146
- `kosuke agent summary` prints the sessions that need you and your oldest New
146
+ `kosuke agent summary get` prints the sessions that need you and your oldest New
147
147
  Activity events across every workspace, one line each, and the name of every
148
148
  workspace it read, in about 1,500 tokens. It lists only as many events as the
149
149
  rest leaves room for, so fewer when you belong to many workspaces, and marks
@@ -163,7 +163,7 @@ connected to a workspace, and to you.
163
163
  ```sh
164
164
  kosuke integrations list --workspace <id> # a block per toolkit
165
165
  kosuke integrations list --workspace <id> --toolkit gmail # that toolkit's tools
166
- kosuke integrations describe <tool> --workspace <id> # one tool's input schema
166
+ kosuke integrations tools get <tool> --workspace <id> # one tool's input schema
167
167
  kosuke integrations call <tool> --workspace <id> --account notion-personal --args '{"query":"roadmap"}'
168
168
  ```
169
169
 
@@ -179,8 +179,8 @@ and exits 1 when the tool reports an error.
179
179
  With an API key, `--workspace` is required (you must belong to it), and `call`
180
180
  runs only your own personal connections. Inside an agent's turn the credential
181
181
  decides the workspace and the flag is optional. A Connector Token is refused.
182
- `kosuke integrations tools` and `execute` print the raw JSON of the same two
183
- routes. `kosuke agent summary` lists the same connections, one line each.
182
+ The hidden `kosuke integrations tools list` and `kosuke integrations tools call`
183
+ print the raw JSON of the same two routes. `kosuke agent summary get` lists the same connections, one line each.
184
184
 
185
185
  ## Generated from the API
186
186
 
@@ -312,7 +312,7 @@ export function planSummary(options) {
312
312
  const shown = needing.slice(0, NEEDS_YOU_SHOWN);
313
313
  head.push(...shown.map(sessionLine));
314
314
  if (needTotal > shown.length) {
315
- head.push(`(and ${needTotal - shown.length} more: kosuke sessions all --needs-you --owners me${scope})`);
315
+ head.push(`(and ${needTotal - shown.length} more: kosuke sessions list --needs-you --owners me${scope})`);
316
316
  }
317
317
  }
318
318
  head.push('');
@@ -401,7 +401,7 @@ export async function fetchSummary(options) {
401
401
  return renderSummary(plan, activity);
402
402
  }
403
403
  catch (error) {
404
- return unavailable(reasonOf(error), 'kosuke auth status');
404
+ return unavailable(reasonOf(error), 'kosuke auth status get');
405
405
  }
406
406
  }
407
407
  function body(result) {
@@ -1,9 +1,10 @@
1
1
  import { fetchSummary } from '../agent/summary.js';
2
+ import { leafAt } from '../runtime/attach.js';
3
+ import { HAND_WRITTEN } from './hand-written.js';
2
4
  export function attachAgentCommands(root, runtime, deps = {}) {
3
5
  const { fetch, now, stdout = (line) => process.stdout.write(line + '\n') } = deps;
4
- const agent = root.command('agent').description('What an agent reads about your Kosuke.');
5
- agent
6
- .command('summary')
6
+ root.command('agent').description('What an agent reads about your Kosuke.');
7
+ leafAt(root, HAND_WRITTEN.agentSummaryGet.command)
7
8
  .description('Print what needs you and your oldest New Activity as a short digest for an agent to read. ' +
8
9
  'Marks seen only the events it prints, and none with --peek; the rest stay New.')
9
10
  .option('--workspace <id>', 'Only this workspace.')
@@ -1,12 +1,13 @@
1
+ import { leafAt } from '../runtime/attach.js';
1
2
  import { createApiClient } from '../runtime/client.js';
2
3
  import { credentialsPath, DEFAULT_API_URL, deleteCredentials, writeCredentials, } from '../runtime/config.js';
4
+ import { HAND_WRITTEN } from './hand-written.js';
3
5
  export function attachAuthCommands(root, runtime, deps = {}) {
4
6
  const { env = process.env, fetch, prompt = promptHidden, stdout = (line) => process.stdout.write(line + '\n'), stderr = (line) => process.stderr.write(line + '\n'), exit = (code) => {
5
7
  process.exitCode = code;
6
8
  }, } = deps;
7
- const auth = root.command('auth').description('Manage the API key this machine uses.');
8
- auth
9
- .command('login')
9
+ root.command('auth').description('Manage the API key this machine uses.');
10
+ leafAt(root, HAND_WRITTEN.authLogin.command)
10
11
  .description('Store an API key, after checking it works. Takes the global --api-key when ' +
11
12
  'given, and prompts otherwise. Create one in Settings.')
12
13
  .action(async () => {
@@ -32,8 +33,7 @@ export function attachAuthCommands(root, runtime, deps = {}) {
32
33
  const path = writeCredentials({ apiKey, ...(apiUrl !== DEFAULT_API_URL ? { apiUrl } : {}) }, env);
33
34
  stdout(`Logged in to ${apiUrl}; member of ${who.workspaces} workspace${who.workspaces === 1 ? '' : 's'}. API key saved to ${path}.`);
34
35
  });
35
- auth
36
- .command('status')
36
+ leafAt(root, HAND_WRITTEN.authStatusGet.command)
37
37
  .description('Show where the API key comes from and whether the platform accepts it.')
38
38
  .action(async () => {
39
39
  const { apiKey, apiKeySource, apiUrl, apiUrlSource } = runtime.credentials();
@@ -59,8 +59,7 @@ export function attachAuthCommands(root, runtime, deps = {}) {
59
59
  if (!result.accepted)
60
60
  exit(1);
61
61
  });
62
- auth
63
- .command('logout')
62
+ leafAt(root, HAND_WRITTEN.authLogout.command)
64
63
  .description('Delete the stored API key. A key from the environment or a flag is untouched.')
65
64
  .action(() => {
66
65
  const path = credentialsPath(env);
@@ -0,0 +1,93 @@
1
+ const SKILL_RUN_FLAGS = [
2
+ '--fix',
3
+ '--sync',
4
+ '--no-review',
5
+ '--restart',
6
+ '--ready',
7
+ '--draft',
8
+ '--target-branch',
9
+ '--reviewers',
10
+ '--evidence',
11
+ ];
12
+ export const HAND_WRITTEN = {
13
+ authLogin: {
14
+ command: ['auth', 'login'],
15
+ positionals: [],
16
+ flags: [],
17
+ agents: 'all',
18
+ workspace: true,
19
+ },
20
+ authStatusGet: {
21
+ command: ['auth', 'status', 'get'],
22
+ positionals: [],
23
+ flags: [],
24
+ agents: 'all',
25
+ workspace: true,
26
+ },
27
+ authLogout: {
28
+ command: ['auth', 'logout'],
29
+ positionals: [],
30
+ flags: [],
31
+ agents: 'all',
32
+ workspace: true,
33
+ },
34
+ agentSummaryGet: {
35
+ command: ['agent', 'summary', 'get'],
36
+ positionals: [],
37
+ flags: ['--workspace', '--peek'],
38
+ agents: 'all',
39
+ workspace: false,
40
+ },
41
+ integrationsList: {
42
+ command: ['integrations', 'list'],
43
+ positionals: [],
44
+ flags: ['--toolkit', '--search', '--account', '--limit', '--workspace', '--json'],
45
+ agents: 'all',
46
+ workspace: true,
47
+ },
48
+ integrationsToolsGet: {
49
+ command: ['integrations', 'tools', 'get'],
50
+ positionals: ['name'],
51
+ flags: ['--account', '--workspace'],
52
+ agents: 'all',
53
+ workspace: true,
54
+ },
55
+ integrationsCall: {
56
+ command: ['integrations', 'call'],
57
+ positionals: ['name', 'stdin'],
58
+ flags: ['--account', '--args', '--args-file', '--workspace'],
59
+ agents: 'all',
60
+ workspace: true,
61
+ },
62
+ sessionsJobsWatch: {
63
+ command: ['sessions', 'jobs', 'watch'],
64
+ positionals: ['projectId', 'sessionId', 'jobId'],
65
+ flags: ['--type', '--timeout'],
66
+ agents: 'none',
67
+ workspace: false,
68
+ },
69
+ // lint-gate-exempt command-names: the capability probe ksb runs by fixed argv
70
+ // (skill-marker-capability.ts), so an older ksb finds markers on a newer CLI.
71
+ sessionsSkillRuns: {
72
+ command: ['sessions', 'skill-runs'],
73
+ positionals: [],
74
+ flags: ['--capabilities'],
75
+ agents: ['sandboxToken'],
76
+ workspace: true,
77
+ },
78
+ sessionsSkillRunsStart: {
79
+ command: ['sessions', 'skill-runs', 'start'],
80
+ positionals: ['name'],
81
+ flags: SKILL_RUN_FLAGS,
82
+ agents: ['sandboxToken'],
83
+ workspace: true,
84
+ },
85
+ sessionsSkillRunsFinish: {
86
+ command: ['sessions', 'skill-runs', 'finish'],
87
+ positionals: ['name'],
88
+ flags: [...SKILL_RUN_FLAGS, '--result'],
89
+ agents: ['sandboxToken'],
90
+ workspace: true,
91
+ },
92
+ };
93
+ export const HAND_WRITTEN_COMMANDS = Object.values(HAND_WRITTEN);
@@ -1,14 +1,15 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { InvalidArgumentError } from 'commander';
3
- import { groupFor } from '../runtime/attach.js';
3
+ import { leafAt } from '../runtime/attach.js';
4
+ import { HAND_WRITTEN } from './hand-written.js';
4
5
  import { isTurnToken } from '../runtime/credentials.js';
5
6
  import { connectionOf, failureOf, isRow, oneLine, readOverview, rowsOf, TOOLS_PATH, transportFailure, } from '../integrations/api.js';
6
7
  import { choiceLines, renderOverview } from '../integrations/render.js';
7
8
  /**
8
- * `kosuke integrations list|describe|call`: the connected tools, listed and run
9
- * from a laptop or an agent's shell. Hand-written because the output is text
10
- * and the exit code says whether the tool worked, which the generated
11
- * `integrations tools` and `integrations execute` (raw JSON passthroughs, kept
9
+ * `kosuke integrations list|call` and `kosuke integrations tools get`: the connected tools,
10
+ * listed and run from a laptop or an agent's shell. Hand-written because the output is text
11
+ * and the exit code says whether the tool worked, which the generated, hidden
12
+ * `integrations tools list` and `integrations tools call` (raw JSON passthroughs, kept
12
13
  * beside these) cannot do.
13
14
  *
14
15
  * Tool descriptions, schemas and results come from third-party services: they
@@ -129,9 +130,7 @@ export function attachIntegrationsCommands(root, runtime, deps = {}) {
129
130
  fail(error.message, EXIT_USAGE);
130
131
  }
131
132
  };
132
- const group = groupFor(root, ['integrations']);
133
- group
134
- .command('list')
133
+ leafAt(root, HAND_WRITTEN.integrationsList.command)
135
134
  .description('List the connected tools. With no filter, one block per toolkit: its connections (alias, ' +
136
135
  'scope, label, account, id) and how many read-only and write tools it has. --toolkit and ' +
137
136
  '--search list the matching tools. A cut list says "N of M" and how to narrow it.')
@@ -163,8 +162,7 @@ export function attachIntegrationsCommands(root, runtime, deps = {}) {
163
162
  }
164
163
  stdout(renderOverview(result.overview, Boolean(flags.toolkit || flags.search)));
165
164
  }));
166
- group
167
- .command('describe')
165
+ leafAt(root, HAND_WRITTEN.integrationsToolsGet.command)
168
166
  .description("Print one tool's input schema and annotations as JSON.")
169
167
  .argument('<name>', 'The tool, as `list` prints it.')
170
168
  .option('--account <account>', 'The connection whose schema you want: an alias, id or scope:label. Needed when several can run the tool.', accountText)
@@ -208,8 +206,7 @@ export function attachIntegrationsCommands(root, runtime, deps = {}) {
208
206
  fail(transportFailure(error, 'GET'));
209
207
  }
210
208
  }));
211
- group
212
- .command('call')
209
+ leafAt(root, HAND_WRITTEN.integrationsCall.command)
213
210
  .description('Run a tool with a JSON object of arguments and print its text result. The connection it ' +
214
211
  'ran on is named on stderr. A tool that reports an error exits 1.')
215
212
  .argument('<name>', 'The tool, as `list` prints it.')
@@ -2,6 +2,8 @@ import { randomUUID } from 'node:crypto';
2
2
  import { appendFile, lstat, readFile } from 'node:fs/promises';
3
3
  import { isAbsolute } from 'node:path';
4
4
  import { agentTokenOf } from '../runtime/agent-tokens.js';
5
+ import { groupFor, leafAt } from '../runtime/attach.js';
6
+ import { HAND_WRITTEN } from './hand-written.js';
5
7
  const FLAGS = new Set([
6
8
  '--fix',
7
9
  '--sync',
@@ -86,7 +88,8 @@ async function receiptData(response) {
86
88
  }
87
89
  /** Marker errors bypass Commander and the shared retrying client so they cannot stop agent work. */
88
90
  export async function runSkillMarkerCommand(args, options = {}) {
89
- if (args[0] !== 'sessions' || args[1] !== 'skill-runs')
91
+ const [group, noun] = HAND_WRITTEN.sessionsSkillRuns.command;
92
+ if (args[0] !== group || args[1] !== noun)
90
93
  return false;
91
94
  const { env = process.env, fetch: request = globalThis.fetch, stdout = (text) => process.stdout.write(text), timeoutMs = DEADLINE_MS, } = options;
92
95
  if (args.length === 3 && args[2] === '--capabilities') {
@@ -94,10 +97,12 @@ export async function runSkillMarkerCommand(args, options = {}) {
94
97
  return true;
95
98
  }
96
99
  if (args.includes('--help') || args.includes('-h')) {
97
- stdout('kosuke sessions skill-runs start <name> [--fix] [--sync] [--no-review]\nkosuke sessions skill-runs end <name> [--result <verdict>]\nBest effort: one request, 1.5-second deadline, always exits 0.\n');
100
+ stdout('kosuke sessions skill-runs start <name> [--fix] [--sync] [--no-review]\nkosuke sessions skill-runs finish <name> [--result <verdict>]\nBest effort: one request, 1.5-second deadline, always exits 0.\n');
98
101
  return true;
99
102
  }
100
- const [, , action, rawName, ...rest] = args;
103
+ const [, , verb, rawName, ...rest] = args;
104
+ // Alias: `end`, the verb before the grammar, which older Factory Skills still run.
105
+ const action = verb === 'finish' || verb === 'end' ? 'end' : verb;
101
106
  if ((action !== 'start' && action !== 'end') ||
102
107
  !rawName ||
103
108
  !/^(?:kosuke:)?[a-z][a-z0-9-]{0,79}$/.test(rawName))
@@ -205,23 +210,21 @@ export async function runSkillMarkerCommand(args, options = {}) {
205
210
  return true;
206
211
  }
207
212
  export function attachSkillMarkerCommands(program, options = {}) {
208
- const sessions = program.commands.find((command) => command.name() === 'sessions') ??
209
- program.command('sessions');
210
- const skills = sessions.commands.find((command) => command.name() === 'skill-runs') ??
211
- sessions.command('skill-runs');
213
+ const skills = groupFor(program, HAND_WRITTEN.sessionsSkillRuns.command);
212
214
  skills
213
215
  .description('Record best-effort Factory Skill start and end markers.')
214
216
  .option('--capabilities', 'Print marker command capability.')
215
217
  .action(async () => {
216
218
  await runSkillMarkerCommand(['sessions', 'skill-runs', '--capabilities'], options);
217
219
  });
218
- for (const action of ['start', 'end']) {
219
- const command = skills
220
- .command(`${action} <name>`)
221
- .description(`${action === 'start' ? 'Start' : 'End'} a Factory Skill in this sandbox Turn.`);
220
+ for (const entry of [HAND_WRITTEN.sessionsSkillRunsStart, HAND_WRITTEN.sessionsSkillRunsFinish]) {
221
+ const action = entry.command[entry.command.length - 1];
222
+ const command = leafAt(program, entry.command)
223
+ .argument('<name>')
224
+ .description(`${action === 'start' ? 'Start' : 'Finish'} a Factory Skill in this sandbox Turn.`);
222
225
  for (const flag of FLAGS)
223
226
  command.option(flag);
224
- if (action === 'end')
227
+ if (action === 'finish')
225
228
  command.option('--result <verdict>', 'A known result, such as passed, failed, blocked, or ready.');
226
229
  command.action(async (_name, _flags, cmd) => {
227
230
  await runSkillMarkerCommand(cmd.parent.parent.parent.args, options);
@@ -1,8 +1,9 @@
1
1
  import { InvalidArgumentError, Option } from 'commander';
2
- import { groupFor } from '../runtime/attach.js';
2
+ import { leafAt } from '../runtime/attach.js';
3
+ import { HAND_WRITTEN } from './hand-written.js';
3
4
  import { JOB_TYPES, WATCH_EXIT, describe, isRecord, watchJob, } from '../runtime/job-watch.js';
4
5
  /**
5
- * `kosuke sessions watch`: a turn's frames as they happen, one JSON object per
6
+ * `kosuke sessions jobs watch`: a turn's frames as they happen, one JSON object per
6
7
  * line. Hand-written because they arrive over the `/ws/jobs` WebSocket, which
7
8
  * the OpenAPI document the rest of the tree is generated from cannot describe.
8
9
  */
@@ -112,14 +113,13 @@ export function attachWatchCommand(root, runtime, deps = {}) {
112
113
  const { connect = openWebSocket, stdout = (line) => process.stdout.write(line + '\n'), stderr = (line) => process.stderr.write(line + '\n'), exit = (code) => {
113
114
  process.exitCode = code;
114
115
  }, } = deps;
115
- groupFor(root, ['sessions'])
116
- .command('watch')
116
+ leafAt(root, HAND_WRITTEN.sessionsJobsWatch.command)
117
117
  .description("Stream a turn's frames as NDJSON until its job ends: one frame per line on stdout, " +
118
118
  'diagnostics on stderr. A dropped connection resumes after the last frame, and the ' +
119
119
  "job's status is read every 5 s, so a stream that goes quiet still ends.")
120
120
  .argument('<projectId>', 'Project id')
121
121
  .argument('<sessionId>', 'Session id. Not read for --type deploy, which is per project.')
122
- .argument('<jobId>', "The turn's chat job id. For --type deploy, the activeStreamId `kosuke deploy messages` returns.")
122
+ .argument('<jobId>', "The turn's chat job id. For --type deploy, the activeStreamId `kosuke deploys messages list` returns.")
123
123
  .addOption(new Option('--type <type>', 'What the job is.').choices(JOB_TYPES).default('chat'))
124
124
  .option('--timeout <seconds>', 'Stop waiting after this many seconds and exit 124. Default: until the job ends.', seconds)
125
125
  .addHelpText('after', '\nFrames from the platform carry an id. Two more, without one, come from this command:\n' +
@@ -2,11 +2,13 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons/{cronId}/artifacts",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "artifacts",
8
7
  "list"
9
8
  ],
9
+ "variant": {
10
+ "scope": "personal"
11
+ },
10
12
  "summary": "List the Artifacts a cron's runs published, across all of its runs, most recently changed first: each one's title, kind and version, with the run and the project it came from, and the total the filters keep. One row per Artifact: the same slug published by two runs is two rows. Rows only: a body or a file url comes from crons runs artifacts get, with the row's runId. The project and kind filters each take several values and keep an Artifact matching any of them.",
11
13
  "pathParams": [
12
14
  "cronId"
@@ -2,10 +2,12 @@ export const operation = {
2
2
  "method": "post",
3
3
  "path": "/api/user/crons",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "create"
8
7
  ],
8
+ "variant": {
9
+ "scope": "personal"
10
+ },
9
11
  "summary": "Create a Personal Cron, enabled, with you as its owner. A Personal Cron belongs to you and no workspace: with Personal Repositories or Apps it runs in its own sandbox; without, in its Sensei Thread. Repository runs use your own Subscriptions; thread runs use your Subscriptions or Kosuke free when you hold none. Kosuke free cannot run a Cron with repositories yet. The crontab is read in the cron's own timezone, and may not fire more often than every 15 minutes. The model is an encoded id such as anthropic:opus__xhigh; repositories require an explicit Model from any released Provider on one of your Subscriptions. Changing to Free while you hold a Subscription, or to a personal Model without one, is refused. Without repositories, null or left out runs on the thread’s model. From your Sensei it is refused with 409 CRON_ALREADY_EXISTS when you have a Personal Cron by that name: update that one instead. From Sensei, create or change one only when the member asks. To move a workspace Cron here, read it and recreate it with its timezone (its model only when the member's own Subscription runs it); the member deletes the workspace one in the app.",
10
12
  "pathParams": [],
11
13
  "query": [],
@@ -13,7 +15,7 @@ export const operation = {
13
15
  "fields": [
14
16
  {
15
17
  "name": "projectIds",
16
- "flag": "project-ids",
18
+ "flag": "project",
17
19
  "kind": "string",
18
20
  "required": false,
19
21
  "description": "Personal Repositories and Apps to clone in the run’s sandbox. With none, runs in its Sensei Thread.",
@@ -5,7 +5,7 @@ export const operation = {
5
5
  "crons",
6
6
  "create"
7
7
  ],
8
- "summary": "Create a cron, enabled, with you as its creator, with zero or more of the workspace's projects: each fire is one Cron Run in its own sandbox, cloning only the selected repositories. Every run spends the workspace's Credentials, never a member's Subscription, so a workspace with no usable provider is refused. The model is an encoded id such as anthropic:opus__xhigh; null or left out uses the saved Workspace Default Model when its Provider has usable workspace Credentials, otherwise Kosuke's choice among usable workspace Credentials at run time. The crontab is read in the Workspace Timezone (workspaces timezone-set), and may not fire more often than every 15 minutes. A body that sends timezone is refused. From an agent (Sensei, a sandbox or a Cron Run) it is refused with 409 CRON_ALREADY_EXISTS when the workspace has a Cron by that name.",
8
+ "summary": "Create a cron, enabled, with you as its creator, with zero or more of the workspace's projects: each fire is one Cron Run in its own sandbox, cloning only the selected repositories. Every run spends the workspace's Credentials, never a member's Subscription, so a workspace with no usable provider is refused. The model is an encoded id such as anthropic:opus__xhigh; null or left out uses the saved Workspace Default Model when its Provider has usable workspace Credentials, otherwise Kosuke's choice among usable workspace Credentials at run time. The crontab is read in the Workspace Timezone (`kosuke workspaces timezone set`), and may not fire more often than every 15 minutes. A body that sends timezone is refused. From an agent (Sensei, a sandbox or a Cron Run) it is refused with 409 CRON_ALREADY_EXISTS when the workspace has a Cron by that name.",
9
9
  "pathParams": [
10
10
  "workspaceId"
11
11
  ],
@@ -38,14 +38,14 @@ export const operation = {
38
38
  "flag": "cron-expression",
39
39
  "kind": "string",
40
40
  "required": true,
41
- "description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone-set). At most one fire every 15 minutes."
41
+ "description": "Five fields: minute, hour, day of month, month, day of week, read in the Workspace Timezone (kosuke workspaces timezone set). At most one fire every 15 minutes."
42
42
  },
43
43
  {
44
44
  "name": "reportTo",
45
45
  "flag": "report-to",
46
46
  "kind": "string",
47
47
  "required": false,
48
- "description": "Reports to: the members, by the id `kosuke workspaces members` prints, whose Sensei each message from a run of this cron goes to, at most 10. With one, every message goes to them; with several, the run chooses among them. Empty, or left out on create, lets the run choose any member. Left out on update, it stays as saved; an empty list clears it.",
48
+ "description": "Reports to: the members, by the id `kosuke workspaces members list` prints, whose Sensei each message from a run of this cron goes to, at most 10. With one, every message goes to them; with several, the run chooses among them. Empty, or left out on create, lets the run choose any member. Left out on update, it stays as saved; an empty list clears it.",
49
49
  "repeated": true
50
50
  },
51
51
  {
@@ -2,10 +2,12 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons/{cronId}",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "get"
8
7
  ],
8
+ "variant": {
9
+ "scope": "personal"
10
+ },
9
11
  "summary": "Read one of your Personal Crons: its prompt, schedule, timezone, model, when it runs next, its thread, its last run status, and how many runs in a row failed: five disable it. A Personal Cron belongs to you and no workspace: with Personal Repositories or Apps it runs in its own sandbox; without, in its Sensei Thread. Both use your own Subscription.",
10
12
  "pathParams": [
11
13
  "cronId"
@@ -2,10 +2,12 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "list"
8
7
  ],
8
+ "variant": {
9
+ "scope": "personal"
10
+ },
9
11
  "summary": "List your Personal Crons, newest first, with each one's thread and last run status. A Personal Cron belongs to you and no workspace: with Personal Repositories or Apps it runs in its own sandbox; without, in its Sensei Thread. Repository runs use your own Subscriptions; thread runs use your Subscriptions or Kosuke free when you hold none. Among agents, only your Sensei reaches them.",
10
12
  "pathParams": [],
11
13
  "query": [
@@ -2,10 +2,12 @@ export const operation = {
2
2
  "method": "post",
3
3
  "path": "/api/user/crons/{cronId}/run",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "run"
8
7
  ],
8
+ "variant": {
9
+ "scope": "personal"
10
+ },
9
11
  "summary": "Fire one of your Personal Crons once now, on your own Subscription: with repositories it runs in its own sandbox; without, in its Sensei Thread. Resume a paused Cron first. Refused for No projects left until a save picks a repository. Answers with runs: [{ runId, status, projectIds, projectId }]. Status may be queued while the fire is pending.",
10
12
  "pathParams": [
11
13
  "cronId"
@@ -2,12 +2,14 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons/{cronId}/runs/{runId}/artifacts/{artifactId}",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "runs",
8
7
  "artifacts",
9
8
  "get"
10
9
  ],
10
+ "variant": {
11
+ "scope": "personal"
12
+ },
11
13
  "summary": "Read one Artifact of a run of a cron, by its id or its slug: a markdown or html one carries its body, an image or a video a presigned url, its media type and its size.",
12
14
  "pathParams": [
13
15
  "cronId",
@@ -2,12 +2,14 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons/{cronId}/runs/{runId}/artifacts",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "runs",
8
7
  "artifacts",
9
8
  "list"
10
9
  ],
10
+ "variant": {
11
+ "scope": "personal"
12
+ },
11
13
  "summary": "List the Artifacts a run of a cron published, most recently changed first. Rows only: a body or a file url comes from reading one.",
12
14
  "pathParams": [
13
15
  "cronId",
@@ -2,11 +2,13 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons/{cronId}/runs/{runId}",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "runs",
8
7
  "get"
9
8
  ],
9
+ "variant": {
10
+ "scope": "personal"
11
+ },
10
12
  "summary": "Read one Personal Cron run: its kind, status, Model, report, repositories and filed sessions. A sandbox run has its Cron Agent transcript and Artifacts and threadId null. A thread run names the Sensei Thread holding its Turn.",
11
13
  "pathParams": [
12
14
  "cronId",
@@ -2,11 +2,13 @@ export const operation = {
2
2
  "method": "get",
3
3
  "path": "/api/user/crons/{cronId}/runs",
4
4
  "command": [
5
- "user",
6
5
  "crons",
7
6
  "runs",
8
7
  "list"
9
8
  ],
9
+ "variant": {
10
+ "scope": "personal"
11
+ },
10
12
  "summary": "List the runs of one of your Personal Crons, newest first: each one's status, the first line of its report or its error, and whether it ran in a sandbox or Sensei Thread, with the total and failed counts of the runs the filter keeps. The status filter takes several values and keeps a run matching any of them.",
11
13
  "pathParams": [
12
14
  "cronId"
@@ -4,7 +4,8 @@ export const operation = {
4
4
  "command": [
5
5
  "crons",
6
6
  "runs",
7
- "messages"
7
+ "messages",
8
+ "list"
8
9
  ],
9
10
  "summary": "Read the Cron Agent's transcript of one run of a cron: the prompt it was given, then everything it did, with the run's status.",
10
11
  "pathParams": [