@kosuke-ai/kosuke 1.0.0 → 1.0.1

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 (352) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +198 -1
  3. package/dist/agent/http.js +18 -0
  4. package/dist/agent/summary.js +419 -0
  5. package/dist/commands/agent.js +22 -0
  6. package/dist/commands/auth.js +117 -0
  7. package/dist/commands/integrations.js +310 -0
  8. package/dist/commands/skill-runs.js +230 -0
  9. package/dist/commands/watch.js +167 -0
  10. package/dist/generated/commands/activity/list.js +73 -0
  11. package/dist/generated/commands/crons/artifacts-list.js +57 -0
  12. package/dist/generated/commands/crons/create.js +65 -0
  13. package/dist/generated/commands/crons/delete.js +18 -0
  14. package/dist/generated/commands/crons/get.js +19 -0
  15. package/dist/generated/commands/crons/list.js +54 -0
  16. package/dist/generated/commands/crons/projects-resume.js +21 -0
  17. package/dist/generated/commands/crons/run.js +37 -0
  18. package/dist/generated/commands/crons/runs-artifacts-get.js +23 -0
  19. package/dist/generated/commands/crons/runs-artifacts-list.js +22 -0
  20. package/dist/generated/commands/crons/runs-cancel.js +21 -0
  21. package/dist/generated/commands/crons/runs-diagnostics.js +20 -0
  22. package/dist/generated/commands/crons/runs-get.js +21 -0
  23. package/dist/generated/commands/crons/runs-list.js +58 -0
  24. package/dist/generated/commands/crons/runs-messages.js +21 -0
  25. package/dist/generated/commands/crons/update.js +73 -0
  26. package/dist/generated/commands/deploy/cancel.js +18 -0
  27. package/dist/generated/commands/deploy/list.js +33 -0
  28. package/dist/generated/commands/deploy/message.js +32 -0
  29. package/dist/generated/commands/deploy/messages.js +18 -0
  30. package/dist/generated/commands/deploy/queue-delete.js +19 -0
  31. package/dist/generated/commands/deploy/queue-list.js +19 -0
  32. package/dist/generated/commands/deploy/queue-move.js +31 -0
  33. package/dist/generated/commands/deploy/queue-resume.js +19 -0
  34. package/dist/generated/commands/deploy/queue-send.js +20 -0
  35. package/dist/generated/commands/deploy/queue-steer.js +20 -0
  36. package/dist/generated/commands/deploy/queue-update.js +56 -0
  37. package/dist/generated/commands/deploy/run.js +65 -0
  38. package/dist/generated/commands/deploy/set-model.js +28 -0
  39. package/dist/generated/commands/devices/list.js +18 -0
  40. package/dist/generated/commands/devices/request.js +31 -0
  41. package/dist/generated/commands/files/delete.js +18 -0
  42. package/dist/generated/commands/files/get.js +19 -0
  43. package/dist/generated/commands/files/list.js +25 -0
  44. package/dist/generated/commands/files/mkdir.js +28 -0
  45. package/dist/generated/commands/files/move.js +35 -0
  46. package/dist/generated/commands/files/put.js +92 -0
  47. package/dist/generated/commands/github/repositories.js +16 -0
  48. package/dist/generated/commands/github/status.js +16 -0
  49. package/dist/generated/commands/index.js +650 -0
  50. package/dist/generated/commands/integrations/execute.js +49 -0
  51. package/dist/generated/commands/integrations/tools.js +70 -0
  52. package/dist/generated/commands/mac/apps.js +30 -0
  53. package/dist/generated/commands/mac/ax-tree.js +65 -0
  54. package/dist/generated/commands/mac/browser-connection-check.js +69 -0
  55. package/dist/generated/commands/mac/browser-connections.js +30 -0
  56. package/dist/generated/commands/mac/browser-profiles.js +36 -0
  57. package/dist/generated/commands/mac/browser-sign-in.js +79 -0
  58. package/dist/generated/commands/mac/browser.js +44 -0
  59. package/dist/generated/commands/mac/click.js +72 -0
  60. package/dist/generated/commands/mac/file-delete.js +37 -0
  61. package/dist/generated/commands/mac/file-list.js +37 -0
  62. package/dist/generated/commands/mac/file-move.js +44 -0
  63. package/dist/generated/commands/mac/file-read.js +37 -0
  64. package/dist/generated/commands/mac/file-write.js +50 -0
  65. package/dist/generated/commands/mac/key.js +58 -0
  66. package/dist/generated/commands/mac/open.js +43 -0
  67. package/dist/generated/commands/mac/screenshot.js +51 -0
  68. package/dist/generated/commands/mac/scroll.js +70 -0
  69. package/dist/generated/commands/mac/shell.js +51 -0
  70. package/dist/generated/commands/mac/tools.js +18 -0
  71. package/dist/generated/commands/mac/type.js +64 -0
  72. package/dist/generated/commands/mac/windows.js +30 -0
  73. package/dist/generated/commands/members/list.js +24 -0
  74. package/dist/generated/commands/models/list.js +16 -0
  75. package/dist/generated/commands/personal-tasks/create.js +72 -0
  76. package/dist/generated/commands/personal-tasks/delete.js +17 -0
  77. package/dist/generated/commands/personal-tasks/get.js +20 -0
  78. package/dist/generated/commands/personal-tasks/list.js +71 -0
  79. package/dist/generated/commands/personal-tasks/move.js +31 -0
  80. package/dist/generated/commands/personal-tasks/start.js +69 -0
  81. package/dist/generated/commands/personal-tasks/update.js +81 -0
  82. package/dist/generated/commands/preview/get.js +26 -0
  83. package/dist/generated/commands/preview/health.js +26 -0
  84. package/dist/generated/commands/preview/reset.js +28 -0
  85. package/dist/generated/commands/preview/share-create.js +37 -0
  86. package/dist/generated/commands/preview/share-delete.js +26 -0
  87. package/dist/generated/commands/preview/share-get.js +27 -0
  88. package/dist/generated/commands/preview/shared-artifact.js +19 -0
  89. package/dist/generated/commands/preview/shared.js +17 -0
  90. package/dist/generated/commands/projects/backlog-items-create.js +35 -0
  91. package/dist/generated/commands/projects/backlog-items-delete.js +19 -0
  92. package/dist/generated/commands/projects/backlog-items-list.js +19 -0
  93. package/dist/generated/commands/projects/backlog-items-send.js +20 -0
  94. package/dist/generated/commands/projects/backlog-items-update.js +42 -0
  95. package/dist/generated/commands/projects/batch-merging-eject.js +37 -0
  96. package/dist/generated/commands/projects/batch-merging-finish.js +30 -0
  97. package/dist/generated/commands/projects/batch-merging-get.js +19 -0
  98. package/dist/generated/commands/projects/batch-merging-set.js +32 -0
  99. package/dist/generated/commands/projects/branches.js +31 -0
  100. package/dist/generated/commands/projects/create.js +72 -0
  101. package/dist/generated/commands/projects/delete.js +17 -0
  102. package/dist/generated/commands/projects/env-vars-add.js +22 -0
  103. package/dist/generated/commands/projects/env-vars-remove.js +21 -0
  104. package/dist/generated/commands/projects/get.js +18 -0
  105. package/dist/generated/commands/projects/labels-color.js +37 -0
  106. package/dist/generated/commands/projects/labels-delete.js +50 -0
  107. package/dist/generated/commands/projects/labels-usage.js +27 -0
  108. package/dist/generated/commands/projects/labels.js +18 -0
  109. package/dist/generated/commands/projects/list.js +16 -0
  110. package/dist/generated/commands/projects/live-logs.js +34 -0
  111. package/dist/generated/commands/projects/live-query.js +30 -0
  112. package/dist/generated/commands/projects/live-traffic.js +27 -0
  113. package/dist/generated/commands/projects/live-write-status.js +20 -0
  114. package/dist/generated/commands/projects/live-write.js +37 -0
  115. package/dist/generated/commands/projects/qa-guide-get.js +19 -0
  116. package/dist/generated/commands/projects/qa-guide-set.js +40 -0
  117. package/dist/generated/commands/projects/releases.js +18 -0
  118. package/dist/generated/commands/projects/services-add.js +88 -0
  119. package/dist/generated/commands/projects/services-list.js +19 -0
  120. package/dist/generated/commands/projects/services-remove.js +19 -0
  121. package/dist/generated/commands/projects/services-update.js +82 -0
  122. package/dist/generated/commands/projects/settings-get.js +19 -0
  123. package/dist/generated/commands/projects/settings-import.js +99 -0
  124. package/dist/generated/commands/projects/settings-update.js +85 -0
  125. package/dist/generated/commands/projects/skills.js +39 -0
  126. package/dist/generated/commands/projects/switch-workflow.js +34 -0
  127. package/dist/generated/commands/projects/update.js +28 -0
  128. package/dist/generated/commands/projects/versions.js +18 -0
  129. package/dist/generated/commands/sensei/cards-close.js +43 -0
  130. package/dist/generated/commands/sensei/cards-mark-read.js +30 -0
  131. package/dist/generated/commands/sensei/cards-put.js +152 -0
  132. package/dist/generated/commands/sensei/cards-send-reply.js +30 -0
  133. package/dist/generated/commands/sensei/cards.js +38 -0
  134. package/dist/generated/commands/sensei/chat.js +23 -0
  135. package/dist/generated/commands/sensei/connect.js +57 -0
  136. package/dist/generated/commands/sensei/delegates-get.js +21 -0
  137. package/dist/generated/commands/sensei/delegates-note.js +46 -0
  138. package/dist/generated/commands/sensei/delegates-start.js +51 -0
  139. package/dist/generated/commands/sensei/delegates-stop.js +21 -0
  140. package/dist/generated/commands/sensei/describe.js +36 -0
  141. package/dist/generated/commands/sensei/device-requests-decide.js +48 -0
  142. package/dist/generated/commands/sensei/device-requests-list.js +27 -0
  143. package/dist/generated/commands/sensei/memory-get.js +19 -0
  144. package/dist/generated/commands/sensei/memory-put.js +55 -0
  145. package/dist/generated/commands/sensei/merge-rule.js +36 -0
  146. package/dist/generated/commands/sensei/merge.js +36 -0
  147. package/dist/generated/commands/sensei/messages-reply.js +44 -0
  148. package/dist/generated/commands/sensei/messages-reroute.js +37 -0
  149. package/dist/generated/commands/sensei/messages-send.js +98 -0
  150. package/dist/generated/commands/sensei/notifications-open.js +19 -0
  151. package/dist/generated/commands/sensei/reels-activity.js +16 -0
  152. package/dist/generated/commands/sensei/reels-proposals.js +24 -0
  153. package/dist/generated/commands/sensei/reels-ranks.js +16 -0
  154. package/dist/generated/commands/sensei/reels-skips.js +32 -0
  155. package/dist/generated/commands/sensei/repository.js +36 -0
  156. package/dist/generated/commands/sensei/review-approve.js +37 -0
  157. package/dist/generated/commands/sensei/review-ask.js +44 -0
  158. package/dist/generated/commands/sensei/review-context.js +32 -0
  159. package/dist/generated/commands/sensei/sessions-assess.js +71 -0
  160. package/dist/generated/commands/sensei/sessions-facts.js +26 -0
  161. package/dist/generated/commands/sensei/suggest.js +36 -0
  162. package/dist/generated/commands/sensei/thread-done.js +21 -0
  163. package/dist/generated/commands/sensei/thread-move.js +30 -0
  164. package/dist/generated/commands/sensei/thread-read.js +41 -0
  165. package/dist/generated/commands/sensei/thread-split.js +30 -0
  166. package/dist/generated/commands/sensei/threads.js +47 -0
  167. package/dist/generated/commands/sensei/tickets-merge.js +51 -0
  168. package/dist/generated/commands/sensei/widgets.js +15 -0
  169. package/dist/generated/commands/sessions/activate.js +33 -0
  170. package/dist/generated/commands/sessions/all.js +142 -0
  171. package/dist/generated/commands/sessions/app-stack-start.js +20 -0
  172. package/dist/generated/commands/sessions/artifacts-attach.js +31 -0
  173. package/dist/generated/commands/sessions/artifacts-get.js +21 -0
  174. package/dist/generated/commands/sessions/artifacts-list.js +20 -0
  175. package/dist/generated/commands/sessions/create.js +234 -0
  176. package/dist/generated/commands/sessions/delete.js +21 -0
  177. package/dist/generated/commands/sessions/desktop-control.js +35 -0
  178. package/dist/generated/commands/sessions/desktop-start.js +19 -0
  179. package/dist/generated/commands/sessions/desktop.js +19 -0
  180. package/dist/generated/commands/sessions/diff-comments-add.js +65 -0
  181. package/dist/generated/commands/sessions/diff-comments-delete.js +21 -0
  182. package/dist/generated/commands/sessions/diff-comments-list.js +21 -0
  183. package/dist/generated/commands/sessions/diff-comments-update.js +25 -0
  184. package/dist/generated/commands/sessions/diff-commits.js +20 -0
  185. package/dist/generated/commands/sessions/diff-files.js +20 -0
  186. package/dist/generated/commands/sessions/diff-patch.js +87 -0
  187. package/dist/generated/commands/sessions/edit-prompt.js +81 -0
  188. package/dist/generated/commands/sessions/files-get.js +28 -0
  189. package/dist/generated/commands/sessions/files-list.js +20 -0
  190. package/dist/generated/commands/sessions/files-write.js +42 -0
  191. package/dist/generated/commands/sessions/get.js +19 -0
  192. package/dist/generated/commands/sessions/git-commit-message.js +20 -0
  193. package/dist/generated/commands/sessions/git-commit.js +30 -0
  194. package/dist/generated/commands/sessions/git-push.js +20 -0
  195. package/dist/generated/commands/sessions/git-state.js +20 -0
  196. package/dist/generated/commands/sessions/jobs-cancel.js +21 -0
  197. package/dist/generated/commands/sessions/jobs-get.js +21 -0
  198. package/dist/generated/commands/sessions/jobs-list.js +35 -0
  199. package/dist/generated/commands/sessions/labels-edit.js +45 -0
  200. package/dist/generated/commands/sessions/labels-set.js +45 -0
  201. package/dist/generated/commands/sessions/list.js +130 -0
  202. package/dist/generated/commands/sessions/mark-read.js +19 -0
  203. package/dist/generated/commands/sessions/message.js +33 -0
  204. package/dist/generated/commands/sessions/messages.js +41 -0
  205. package/dist/generated/commands/sessions/needs-you.js +16 -0
  206. package/dist/generated/commands/sessions/qa-clear.js +22 -0
  207. package/dist/generated/commands/sessions/qa-set.js +33 -0
  208. package/dist/generated/commands/sessions/queue-delete.js +23 -0
  209. package/dist/generated/commands/sessions/queue-list.js +20 -0
  210. package/dist/generated/commands/sessions/queue-move.js +32 -0
  211. package/dist/generated/commands/sessions/queue-resume.js +20 -0
  212. package/dist/generated/commands/sessions/queue-send.js +21 -0
  213. package/dist/generated/commands/sessions/queue-steer.js +21 -0
  214. package/dist/generated/commands/sessions/queue-update.js +57 -0
  215. package/dist/generated/commands/sessions/runtime-command.js +39 -0
  216. package/dist/generated/commands/sessions/search.js +24 -0
  217. package/dist/generated/commands/sessions/send.js +138 -0
  218. package/dist/generated/commands/sessions/steer.js +36 -0
  219. package/dist/generated/commands/sessions/sync.js +37 -0
  220. package/dist/generated/commands/sessions/title-generate.js +29 -0
  221. package/dist/generated/commands/sessions/update.js +118 -0
  222. package/dist/generated/commands/tasks/all.js +112 -0
  223. package/dist/generated/commands/tasks/create.js +230 -0
  224. package/dist/generated/commands/tasks/delete.js +18 -0
  225. package/dist/generated/commands/tasks/get.js +19 -0
  226. package/dist/generated/commands/tasks/labels.js +18 -0
  227. package/dist/generated/commands/tasks/list.js +114 -0
  228. package/dist/generated/commands/tasks/start.js +68 -0
  229. package/dist/generated/commands/tasks/update.js +136 -0
  230. package/dist/generated/commands/user/auth-token-revoke.js +16 -0
  231. package/dist/generated/commands/user/crons-artifacts-list.js +59 -0
  232. package/dist/generated/commands/user/crons-create.js +65 -0
  233. package/dist/generated/commands/user/crons-get.js +21 -0
  234. package/dist/generated/commands/user/crons-list.js +41 -0
  235. package/dist/generated/commands/user/crons-run.js +21 -0
  236. package/dist/generated/commands/user/crons-runs-artifacts-get.js +25 -0
  237. package/dist/generated/commands/user/crons-runs-artifacts-list.js +24 -0
  238. package/dist/generated/commands/user/crons-runs-get.js +23 -0
  239. package/dist/generated/commands/user/crons-runs-list.js +52 -0
  240. package/dist/generated/commands/user/crons-update.js +73 -0
  241. package/dist/generated/commands/user/files-delete.js +18 -0
  242. package/dist/generated/commands/user/files-get.js +19 -0
  243. package/dist/generated/commands/user/files-list.js +24 -0
  244. package/dist/generated/commands/user/files-mkdir.js +27 -0
  245. package/dist/generated/commands/user/files-move.js +35 -0
  246. package/dist/generated/commands/user/files-put.js +91 -0
  247. package/dist/generated/commands/user/integrations-linkedin-connect.js +35 -0
  248. package/dist/generated/commands/user/integrations-linkedin-list.js +17 -0
  249. package/dist/generated/commands/user/integrations-linkedin-reconnect.js +19 -0
  250. package/dist/generated/commands/user/integrations-list.js +16 -0
  251. package/dist/generated/commands/user/integrations-remove.js +19 -0
  252. package/dist/generated/commands/user/integrations-x-connect.js +35 -0
  253. package/dist/generated/commands/user/integrations-x-list.js +17 -0
  254. package/dist/generated/commands/user/integrations-x-reconnect.js +19 -0
  255. package/dist/generated/commands/user/memory-list.js +16 -0
  256. package/dist/generated/commands/user/memory-put.js +36 -0
  257. package/dist/generated/commands/user/plugins-list.js +28 -0
  258. package/dist/generated/commands/user/plugins-update.js +29 -0
  259. package/dist/generated/commands/user/profile.js +16 -0
  260. package/dist/generated/commands/user/push-devices-register.js +76 -0
  261. package/dist/generated/commands/user/push-devices-remove.js +26 -0
  262. package/dist/generated/commands/user/skills-create.js +33 -0
  263. package/dist/generated/commands/user/skills-delete.js +18 -0
  264. package/dist/generated/commands/user/skills-get.js +19 -0
  265. package/dist/generated/commands/user/skills-list.js +17 -0
  266. package/dist/generated/commands/user/skills-update.js +35 -0
  267. package/dist/generated/commands/user/subscriptions-delete.js +18 -0
  268. package/dist/generated/commands/user/subscriptions-get.js +17 -0
  269. package/dist/generated/commands/user/subscriptions-grok-change.js +20 -0
  270. package/dist/generated/commands/user/subscriptions-grok-get.js +18 -0
  271. package/dist/generated/commands/user/subscriptions-login-antigravity-cancel.js +34 -0
  272. package/dist/generated/commands/user/subscriptions-login-antigravity-complete.js +40 -0
  273. package/dist/generated/commands/user/subscriptions-login-antigravity-start.js +28 -0
  274. package/dist/generated/commands/user/subscriptions-login-claude-complete.js +34 -0
  275. package/dist/generated/commands/user/subscriptions-login-claude-start.js +29 -0
  276. package/dist/generated/commands/user/subscriptions-login-codex-complete.js +28 -0
  277. package/dist/generated/commands/user/subscriptions-login-codex-start.js +29 -0
  278. package/dist/generated/commands/user/subscriptions-login-muse-complete.js +28 -0
  279. package/dist/generated/commands/user/subscriptions-login-muse-start.js +29 -0
  280. package/dist/generated/commands/user/subscriptions-logins-delete.js +20 -0
  281. package/dist/generated/commands/user/subscriptions-logins-recheck.js +19 -0
  282. package/dist/generated/commands/user/subscriptions-set-default-model.js +33 -0
  283. package/dist/generated/commands/user/subscriptions-set-key.js +35 -0
  284. package/dist/generated/commands/user/subscriptions-token-usage.js +17 -0
  285. package/dist/generated/commands/user/subscriptions-usage.js +52 -0
  286. package/dist/generated/commands/workspaces/access-status.js +30 -0
  287. package/dist/generated/commands/workspaces/ai-provider-get.js +19 -0
  288. package/dist/generated/commands/workspaces/ai-provider-google-delete-method.js +33 -0
  289. package/dist/generated/commands/workspaces/ai-provider-google-get.js +20 -0
  290. package/dist/generated/commands/workspaces/ai-provider-google-remove.js +19 -0
  291. package/dist/generated/commands/workspaces/ai-provider-google-save.js +38 -0
  292. package/dist/generated/commands/workspaces/ai-provider-google-select-method.js +39 -0
  293. package/dist/generated/commands/workspaces/ai-provider-google-usage.js +39 -0
  294. package/dist/generated/commands/workspaces/ai-provider-login-antigravity-cancel.js +36 -0
  295. package/dist/generated/commands/workspaces/ai-provider-login-antigravity-complete.js +42 -0
  296. package/dist/generated/commands/workspaces/ai-provider-login-antigravity-start.js +30 -0
  297. package/dist/generated/commands/workspaces/ai-provider-logins-recheck.js +41 -0
  298. package/dist/generated/commands/workspaces/ai-provider-remove.js +57 -0
  299. package/dist/generated/commands/workspaces/ai-provider-set.js +21 -0
  300. package/dist/generated/commands/workspaces/ai-provider-token-usage.js +19 -0
  301. package/dist/generated/commands/workspaces/ai-provider-usage-claude.js +39 -0
  302. package/dist/generated/commands/workspaces/ai-provider-usage-codex.js +39 -0
  303. package/dist/generated/commands/workspaces/ai-provider-usage-coding-plan.js +32 -0
  304. package/dist/generated/commands/workspaces/ai-provider-usage-deepseek.js +32 -0
  305. package/dist/generated/commands/workspaces/ai-provider-usage-grok.js +39 -0
  306. package/dist/generated/commands/workspaces/ai-provider-usage-kimi-code.js +32 -0
  307. package/dist/generated/commands/workspaces/ai-provider-usage-muse.js +39 -0
  308. package/dist/generated/commands/workspaces/artifacts.js +26 -0
  309. package/dist/generated/commands/workspaces/credits.js +18 -0
  310. package/dist/generated/commands/workspaces/get.js +18 -0
  311. package/dist/generated/commands/workspaces/grok-change.js +21 -0
  312. package/dist/generated/commands/workspaces/grok-get.js +19 -0
  313. package/dist/generated/commands/workspaces/integrations-get.js +20 -0
  314. package/dist/generated/commands/workspaces/integrations-list.js +37 -0
  315. package/dist/generated/commands/workspaces/integrations-remove.js +19 -0
  316. package/dist/generated/commands/workspaces/list.js +16 -0
  317. package/dist/generated/commands/workspaces/members.js +26 -0
  318. package/dist/generated/commands/workspaces/plugins-list.js +30 -0
  319. package/dist/generated/commands/workspaces/plugins-update.js +30 -0
  320. package/dist/generated/commands/workspaces/provider-login-claude-complete.js +35 -0
  321. package/dist/generated/commands/workspaces/provider-login-claude-start.js +30 -0
  322. package/dist/generated/commands/workspaces/provider-login-codex-complete.js +29 -0
  323. package/dist/generated/commands/workspaces/provider-login-codex-start.js +30 -0
  324. package/dist/generated/commands/workspaces/provider-login-muse-complete.js +29 -0
  325. package/dist/generated/commands/workspaces/provider-login-muse-start.js +30 -0
  326. package/dist/generated/commands/workspaces/sandbox-limit.js +18 -0
  327. package/dist/generated/commands/workspaces/skills-create.js +35 -0
  328. package/dist/generated/commands/workspaces/skills-delete.js +19 -0
  329. package/dist/generated/commands/workspaces/skills-get.js +20 -0
  330. package/dist/generated/commands/workspaces/skills-list.js +19 -0
  331. package/dist/generated/commands/workspaces/skills-update.js +36 -0
  332. package/dist/generated/commands/workspaces/stop-sandboxes.js +28 -0
  333. package/dist/generated/commands/workspaces/timezone-set.js +29 -0
  334. package/dist/generated/commands/workspaces/usage.js +33 -0
  335. package/dist/generated/providers.js +31 -0
  336. package/dist/index.js +7 -0
  337. package/dist/integrations/api.js +136 -0
  338. package/dist/integrations/render.js +59 -0
  339. package/dist/program.js +73 -0
  340. package/dist/runtime/agent-tokens.js +39 -0
  341. package/dist/runtime/attach.js +199 -0
  342. package/dist/runtime/attachments.js +63 -0
  343. package/dist/runtime/client.js +188 -0
  344. package/dist/runtime/config.js +49 -0
  345. package/dist/runtime/credentials.js +32 -0
  346. package/dist/runtime/descriptor.js +7 -0
  347. package/dist/runtime/invoke.js +152 -0
  348. package/dist/runtime/job-watch.js +374 -0
  349. package/dist/runtime/runtime.js +46 -0
  350. package/dist/runtime/version.js +5 -0
  351. package/openapi.json +26091 -0
  352. package/package.json +103 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,62 @@
1
+ # Changelog
2
+
3
+ ## 1.0.1
4
+
5
+ - Allocate package versions when publishing and collect changes from separate PR fragments.
6
+ - Add `setup status` and `setup repair` for hidden setup runs and their bounded repairs. `preview get` without `--session-id` answers 410 `NO_MAIN_PREVIEW`: a project keeps no main sandbox any more.
7
+ - Add `personal-tasks list`, `create`, `get`, `update`, `delete` and `move`: the member's own tasks, in no workspace, which Sensei files from a thread. `personal-tasks update` takes `--if-revision` to refuse a description saved over a newer one, and `personal-tasks move` turns a Todo or In progress one into a workspace's Todo task.
8
+ - Add `user files list|get|put|mkdir|move|delete` for your personal Files, which belong to you and to no workspace. An agent reaches those of the member it acts as and never deletes.
9
+ - Remove `workspaces integrations slack get`: the Slack Bot is retired, and its endpoint answers 410. Personal Slack stays under `user integrations list`.
10
+ - Require an explicit workspace member for proposals and message reroutes.
11
+ - Keep the task Overview and Recently done reads restricted to the web app.
12
+ - Sensei picks up a site's sign-in from the member's everyday Chrome by itself, with no tap, once per site and profile in a Turn the member's own message started: `mac browser-sign-in --reuse` never opens Chrome and answers `chrome` `none`, `same` or `different` with `taken`. `mac browser-profiles --site <host>` says per profile whether it is allowed or off (`access`) and, for each allowed profile, whether Chrome holds a candidate sign-in for that site (`chromeSignIn`), from cookie presence only.
13
+ - `tasks update` takes `--status archived` to archive a task, and `--hint-project` to file a Todo task with no repository in a Collaboration project without starting it. `tasks list` and `tasks all` take `--status archived`, and list every status by default.
14
+ - Keep platform-wide command search browser-only while preserving the CLI session search contract.
15
+ - Add --next-turn to sessions update and tasks update, to choose the Model, or Auto, a started session's next Turn runs on.
16
+ - Start Personal tasks in a Personal Repository while preserving their identity through Start and Move.
17
+ - Add `kosuke user crons list|get|create|update|run|runs list|runs get` for your Personal Crons, each running its prompt as your message in its own Sensei Thread on your own Subscription, with its own `--timezone`. From your Sensei, `user crons create` answers 409 `CRON_ALREADY_EXISTS` when you already have a Personal Cron by that name. `kosuke projects create --personal` now also works from your Sensei in a Turn you started.
18
+ - Remove task and session comment commands; task comments no longer exist.
19
+ - Start tasks with an optional technical prompt while keeping their saved descriptions unchanged.
20
+ - Document the new limit of 20 personal subscription keys per provider; Google keeps one key per method.
21
+ - `sessions app-stack-start` answers a retryable 409 `APP_STACK_NOT_READY` while the session's sandbox is still setting up and 409 `APP_STACK_STARTING` while another start runs, and `sessions get` reports `appStackState` and `appStackError`, so a failed start reads as failed for everyone.
22
+ - Remove Build Macs: `build-mac connect|status|disconnect|run|list|remove|setup-token` are gone, and the desktop helper no longer ships in the package. `tasks create|update|start` and `sessions create|update` lose `--runs-in` and `--build-mac-id`: every session runs in a sandbox, and its Linux desktop starts when its Desktop tab first opens.
23
+ - Add `--sandbox-size small|medium|large|xlarge` and `--app-stack start|skip` to `tasks create|update|start` and `sessions create|update`: a task's session boots on that size, and with `skip` without the project's services. `tasks update --hint-project` picks the repository of a task with no session. Size and stack are fixed once the session starts (409 `SANDBOX_SETTINGS_LOCKED`). New `sessions app-stack-start` starts a skipped App stack and waits until its services answer.
24
+ - Add `devices list` and `devices request <deviceId> --reason`, with which a Chat Session's agent asks to test on its workspace's devices or its member's own Macs. Once an approver allows it for the session, the `mac` screen, input, `open`, `shell` and file commands take `--device-id` from a session too; the browser commands stay Sensei's.
25
+ - `kosuke sensei reels proposals` lists Backlog tickets newest first by creation or edit, no longer ranked by Jev.
26
+ - Remove `setup status` and `setup repair`: the hidden setup run is rolled back, and the deploy agent keeps a main sandbox again. `preview get` without `--session-id` answers for the main sandbox again instead of 410 `NO_MAIN_PREVIEW`. `sessions watch` on a Deploy links only to its Deploy Chat, with no preview link.
27
+ - Add `sensei device-requests list` and `sensei device-requests decide`: a member's Sensei reads a Chat Session's device requests and approves or declines one as them, refused with 409 `GRANT_ALREADY_DECIDED` and the request's current status once it is no longer pending.
28
+ - Update the CLI test dependencies to patched Vite and Vitest releases.
29
+ - LinkedIn and X are browser integrations. `kosuke integrations list` shows them as `browser, no tools`, with one line per connection, also with `--toolkit` and `--account`. Sensei reads its member's connections with `kosuke mac browser-connections [--site]` and reports a check with `kosuke mac browser-connection-check`; members list, connect and reconnect them with `kosuke user integrations linkedin|x list|connect|reconnect`.
30
+ - `kosuke integrations call --help` no longer ties its 330 s wait to a call on the member's Mac.
31
+ - Add members list to read visible members across your workspaces, with an optional workspace filter.
32
+ - Add `sensei delegates start`, `get`, `note` and `stop`: in a member's Turn, Sensei hands a long job to a Job Delegate, reads a delegate and its newest unread result, delivers a change of the member's intent as a Note, and stops a delegate.
33
+ - Add `kosuke sensei thread handoff`, which hands work the member asks for in Sensei's Main Chat to a new thread.
34
+ - `user subscriptions token-usage` and `workspaces ai-provider token-usage` read the tokens Kosuke spent on your own Subscriptions or on the workspace's Credentials (owners and admins only), per Provider and per account, over the last 7 days, the last 30 days and everything recorded, with input, cache read, cache write and output kept apart, how many runs reported no counts, and on your own usage the Sensei share.
35
+ - Add `kosuke sensei threads` so Sensei lists the member's threads when it needs them.
36
+ - Allow workspace Crons to save and run without repositories, expose each run's kind, and preserve the No projects left refusal until a repository is selected.
37
+ - Let Personal Crons pick Personal Repositories and Apps, run in their own sandbox, and read their run Artifacts.
38
+ - Filter tasks and sessions by label and list the label names available across a workspace's repositories with tasks labels.
39
+ - Accept the explicit Kosuke free model choice for personal Crons.
40
+ - Personal tasks can explicitly choose Kosuke free beside connected subscriptions, including unlinked tasks and queued Next Turn choices. Personal task model fields accept kosuke-free; Next Turn choices accept {kosukeFree:true} only in personal scope. The personal Default Model accepts kosuke-free, Sensei views expose the persisted source and personal Auto choice, and access status keeps Free routing details private.
41
+ - Check attachment counts and sizes against the limits the platform publishes for each command, so the CLI never refuses a batch the platform accepts or sends one it refuses.
42
+ - Update XLarge Sandbox size descriptions to 16 CPU and 32 GB of memory.
43
+ - Remove `kosuke sensei thread handoff`: Sensei has no Main Chat, and every message from the main composer starts a thread of its own.
44
+ - Add approved reply and conversation FYI mark-read card commands
45
+ - Add covers to sensei cards put, naming the incoming messages a card answers; an FYI update keeps the committed coverage of its open card across updates, and the open FYI keeps a reference to every message it covered, which its Mark read marks
46
+ - Register personal message Watching as a web-only setting without exposing agent or API-key controls
47
+ - After a Sign in with Chrome tap, the Mac watches every site for the sign-in to land, not only LinkedIn and X: on another site it takes the site's cookies once they change and answers `taken: true` with `signedIn: false`, or `taken: false` when nothing changed, so Sensei checks the account in its own browser before going on. `mac browser-sign-in --wait-new` now accepts any site, with `--url` too, and may follow every take that left the site signed out, while the answer's `waitNewLeft` allows: up to 6 per tap, within 9 minutes of it, after which it answers `SIGN_IN_WINDOW_ENDED`. A follow-up never opens a second tab for a site the Turn already opened.
48
+ - Add `kosuke projects batch-merging get`, `set`, `eject` and `finish` for Batch Merging.
49
+ - `kosuke projects batch-merging set` refuses to turn Batch Merging on while the repository allows no merge commit, and `get` says whether one can land.
50
+ - Remove `kosuke proposals create` and its aliases. `kosuke sensei messages send` now works for every sender, with an optional session, pull request and link.
51
+ - Support personal Job result targets on Sensei cards.
52
+ - Add `kosuke sessions qa set` and `kosuke sessions qa clear`, which record the commit QA passed on. `kosuke sessions get` and `list` return it as `qaPassedSha`, with `batchEjections`.
53
+ - Include every released provider in agent summaries and personal Cron models, report holdsSubscription and autoAvailable in `user subscriptions get`, and drop the personal Gemini API key and Google method commands: personal Google access is the Antigravity sign-in only.
54
+ - Expose waitingForDeploy on session reads and lists while a session waits for a Deploy to finish.
55
+ - Add --report-to to crons create and update: the members a workspace Cron's messages go to.
56
+ - `kosuke workspaces ai-provider set` accepts the `default_auto` operation, which makes Auto the Workspace Default Model.
57
+ - `kosuke sensei merge` merges the pull request of any Chat Session in a workspace you belong to, as you, not only one you are assigned.
58
+ - Offer notifications once in Sensei's iPhone onboarding chat and bind push registration to its Connect attempt.
59
+ - Require approval Cards for Sensei WhatsApp replies, including messages without a Watching event.
60
+ - Add `--name` to `kosuke sensei delegates start`, a short name the Sensei crew list shows for the job.
61
+ - Publish the CLI as @kosuke-ai/kosuke and give the private desktop workspace its own package name.
62
+ - List restricted personal integrations with an explicit availability marker and no held connections.
package/README.md CHANGED
@@ -1,3 +1,200 @@
1
1
  # @kosuke-ai/kosuke
2
2
 
3
- The Kosuke CLI. The first full release is coming soon. Until then, use @kosuke-ai/cli.
3
+ The Kosuke platform CLI: `kosuke`, the client you install on your own machine to
4
+ drive [app.kosuke.ai](https://app.kosuke.ai). Not `ksb`, the agent that
5
+ runs inside a Kosuke sandbox: that one lives in `sandbox/ksb-cli` and is
6
+ installed inside sandboxes alongside this platform CLI, never by hand.
7
+
8
+ ```sh
9
+ npm install -g @kosuke-ai/kosuke
10
+ kosuke auth login # paste an API key from Settings
11
+ kosuke projects list | jq '.data[] | {id, name}'
12
+ kosuke sessions create <projectId> --title "Fix the login form" \
13
+ --content "See the screenshot" --status backlog --attach shot.png
14
+ kosuke crons create <workspaceId> --project <projectId> --project <projectId> \
15
+ --name "Daily ingest" --prompt "/sources" \
16
+ --cron-expression "0 6 * * *"
17
+ kosuke workspaces timezone-set <workspaceId> --timezone Europe/Zurich
18
+ ```
19
+
20
+ Every API command prints the platform's JSON response as is, so it pipes into `jq`.
21
+ Path params are positional, request fields are flags (`--exclude-archived`,
22
+ `--start-line-number 12`, and `--project a --project b` where a field takes
23
+ several values), and any body can be passed whole with `--body '{…}'`,
24
+ `--body-file path` or `--body-file -` for stdin. `kosuke <group> --help` lists
25
+ the operations; each one's help is the API's own description.
26
+
27
+ The API key comes from `--api-key`, then `KOSUKE_API_KEY`, then the file
28
+ `kosuke auth login` writes (mode 0600, under `~/.config/kosuke`, or
29
+ `KOSUKE_CONFIG_DIR`). `--api-url` / `KOSUKE_API_URL` point it at another
30
+ deployment.
31
+
32
+ ## Factory Skill markers
33
+
34
+ The main chat agent records Factory Skill boundaries with these commands:
35
+
36
+ ```sh
37
+ kosuke sessions skill-runs start kosuke:ship --no-review
38
+ kosuke sessions skill-runs end kosuke:ship --result ready
39
+ ```
40
+
41
+ The sandbox supplies the session identity and its Turn credential. The server selects the
42
+ running Chat Job. These commands accept only known switch names and result values, never
43
+ free text. A child skill starts inside its parent and ends before the parent resumes.
44
+
45
+ Markers are best effort: one request, a 1.5-second deadline, no retry, and exit status zero
46
+ even for invalid input or a tracking failure. They print no success message. Without the
47
+ main-agent marker context, they send no request. Delegated Runs do not record markers.
48
+ Other commands keep their normal error exit codes. `sessions skill-runs --capabilities`
49
+ prints `skill-markers-v1` without credentials, so an older CLI never receives an unsupported rule.
50
+
51
+ ## Watching a turn
52
+
53
+ `kosuke sessions watch` follows one turn's job as it runs, so a script does not
54
+ have to poll `sessions jobs get`. Each frame the platform streams is one JSON
55
+ line on stdout, so it pipes into `jq`, and everything meant for a person goes to
56
+ stderr. The job id is the `chatJobId` that `sessions create` and `sessions send`
57
+ return.
58
+
59
+ ```sh
60
+ kosuke sessions watch <projectId> <sessionId> <jobId> \
61
+ | jq -r 'select(.type == "message") | .data.text'
62
+ ```
63
+
64
+ A dropped connection picks up after the last frame it delivered. The job's
65
+ status is read every 5 seconds alongside the stream, so a stream that goes quiet
66
+ still ends; when the status is what ended it, a `watch.status` frame says which.
67
+ When the status says the job ended, a dropped stream is reconnected until it has
68
+ replayed what it holds, within `--timeout`, or 15 seconds without one. If it still
69
+ could not be read to its end, that frame's `complete` is `false`: frames may be
70
+ missing. The exit code still follows the job, so a completed job exits 0 even
71
+ then; a script that needs every frame checks `complete`.
72
+ Once the job has ended, a last `watch.links` frame carries the session, preview
73
+ and pull request links. `--timeout <seconds>` bounds the wait. The command exits
74
+ 0 when the job ended well, 1 when it failed or was stopped, 3 when the API key
75
+ was refused, 4 when the project, session or job was not found, and 124 when
76
+ `--timeout` passed first.
77
+
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
80
+ not read. The deploy's status describes its latest turn only, so when a later
81
+ turn or Deploy takes over before the watch reads how this turn ended, it says
82
+ so on stderr and exits 1.
83
+
84
+ This command is written by hand: the stream is a WebSocket, which the OpenAPI
85
+ document below cannot describe.
86
+
87
+ ## Upgrading from 5.x
88
+
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>
91
+ --timezone Europe/Zurich` sets, as an owner or admin. `crons create` and `crons
92
+ update` lose `--timezone`, and the API refuses a cron body that still sends one,
93
+ which is what an older CLI does with `--timezone`. `crons get` still prints the
94
+ cron's `timezone`, the workspace's.
95
+
96
+ ## Upgrading from 4.x
97
+
98
+ A cron now belongs to its workspace and covers one or more projects, so every
99
+ `crons` command takes `<workspaceId>` where it took `<projectId>`: `kosuke crons
100
+ get <workspaceId> <cronId>`. `crons create` names its projects with a repeated
101
+ `--project`, and `crons update --project` replaces them. `crons run` fires every
102
+ project that is not paused, or only those named with `--project`. `crons runs
103
+ list` filters with `--project` and `--status`, each repeatable. `crons projects
104
+ resume <workspaceId> <cronId> <projectId>` resumes one project that five failed
105
+ runs in a row paused. An older CLI answers 404 on every `crons` command.
106
+
107
+ ## Upgrading from 1.x
108
+
109
+ The review comments on the diff moved to `sessions diff comments list|add|update|delete`, beside
110
+ `sessions diff files` and `sessions diff patch`, whose route they share.
111
+
112
+ ## Nightly builds
113
+
114
+ The `next` dist-tag tracks the CLI version stage runs. A pull request that changes
115
+ shipped CLI code adds a new `changelog.d/<unique-slug>.json` fragment covering `cli`,
116
+ without editing package versions or `CHANGELOG.md`. Publication computes the next
117
+ patch above the highest published version and assembles the fragments, so the CLI
118
+ can be as new as stage without waiting for a platform release:
119
+
120
+ ```sh
121
+ npm install -g @kosuke-ai/kosuke@next
122
+ ```
123
+
124
+ `next` is a moving tag: the same command updates. `npm install -g
125
+ @kosuke-ai/kosuke` installs `latest`, which a platform release moves onto the
126
+ version it deploys, so the plain install always matches production.
127
+
128
+ `kosuke auth login` writes the API key, and the API URL when it is not the
129
+ default, into one `credentials.json` that replaces whatever was there, so a
130
+ config directory holds exactly one deployment and logging into stage would
131
+ overwrite a production login. Give stage its own directory, and keep
132
+ `KOSUKE_CONFIG_DIR` exported for every `kosuke` call meant for stage: a new
133
+ shell without it is silently back on production.
134
+
135
+ ```sh
136
+ export KOSUKE_CONFIG_DIR=~/.config/kosuke-stage
137
+ kosuke auth login --api-url https://app.stage.kosuke.ai
138
+ kosuke projects list # same shell, so it reads the stage key and URL
139
+ ```
140
+
141
+ A shell alias or direnv keeps the variable set; `kosuke auth status` prints
142
+ which URL, which key source and which credentials file won.
143
+
144
+ ## A digest for an agent
145
+
146
+ `kosuke agent summary` prints the sessions that need you and your oldest New
147
+ Activity events across every workspace, one line each, and the name of every
148
+ workspace it read, in about 1,500 tokens. It lists only as many events as the
149
+ rest leaves room for, so fewer when you belong to many workspaces, and marks
150
+ seen only the events it prints. The rest stay New for
151
+ `kosuke activity list --unseen`. `--workspace <id>` reads that one workspace
152
+ alone, in both the sessions and the events, and the commands it names for the
153
+ rest carry the same flag; with it, or inside an agent's turn, the digest also
154
+ lists the connected integrations, one line each. `--peek` prints the same
155
+ events and marks none seen, for an agent that reads the digest before every
156
+ answer.
157
+
158
+ ## Integrations
159
+
160
+ `kosuke integrations` lists, describes and runs the tools of the integrations
161
+ connected to a workspace, and to you.
162
+
163
+ ```sh
164
+ kosuke integrations list --workspace <id> # a block per toolkit
165
+ kosuke integrations list --workspace <id> --toolkit gmail # that toolkit's tools
166
+ kosuke integrations describe <tool> --workspace <id> # one tool's input schema
167
+ kosuke integrations call <tool> --workspace <id> --account notion-personal --args '{"query":"roadmap"}'
168
+ ```
169
+
170
+ `list` with no filter prints each toolkit's connections (alias, scope, label,
171
+ account, short id) and how many read-only and write tools it has. `--toolkit` and
172
+ `--search` list the matching tools, and a list that is cut short says "N of M"
173
+ and how to narrow it. `--account` takes a connection's alias such as
174
+ `notion-personal`, its short id or `scope:label`; case, curly quotes and extra
175
+ spaces do not matter, and it is needed when several connections can run a tool.
176
+ `call` prints the tool's text on stdout and the connection it ran on on stderr,
177
+ and exits 1 when the tool reports an error.
178
+
179
+ With an API key, `--workspace` is required (you must belong to it), and `call`
180
+ runs only your own personal connections. Inside an agent's turn the credential
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.
184
+
185
+ ## Generated from the API
186
+
187
+ `openapi.json` is the platform's own `GET /api/openapi.json`, snapshotted by
188
+ `bun run openapi:snapshot` at the repository root. `npm run generate` turns it
189
+ into `src/generated/`: request types (openapi-typescript) and one descriptor per
190
+ operation, which the hand-written runtime turns into commands. `npm run check`
191
+ regenerates and fails on any difference, so the tree is only ever what the
192
+ document says.
193
+
194
+ ## MCP server
195
+
196
+ Kosuke is served to an MCP client at `https://app.kosuke.ai/api/mcp`; sign in
197
+ once in the browser to authorize a client and the credential renews itself,
198
+ so there is nothing to install or run here. See
199
+ [the docs](https://docs.kosuke.ai/interfaces/mcp) for adding it to Claude,
200
+ ChatGPT, Codex or Cursor.
@@ -0,0 +1,18 @@
1
+ /** The sessions that need the member themselves. */
2
+ export const NEEDS_YOU_FILTER = {
3
+ needsYou: true,
4
+ owners: 'me',
5
+ };
6
+ export class HttpError extends Error {
7
+ status;
8
+ constructor(status) {
9
+ super(`HTTP ${status}`);
10
+ this.status = status;
11
+ }
12
+ }
13
+ /** `meta.pagination.total` of a list envelope, or null when the body is not one. */
14
+ export function paginationTotal(body) {
15
+ const total = body?.meta?.pagination
16
+ ?.total;
17
+ return typeof total === 'number' && Number.isFinite(total) ? total : null;
18
+ }