@skrr-ai/cli 0.1.119 → 0.1.121

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 (336) hide show
  1. package/dist/base-command.d.ts +31 -0
  2. package/dist/base-command.js +117 -6
  3. package/dist/commands/agent/message/context.d.ts +1 -0
  4. package/dist/commands/agent/message/context.js +3 -2
  5. package/dist/commands/commands.js +11 -0
  6. package/dist/commands/commitments/action-proposal.d.ts +13 -0
  7. package/dist/commands/commitments/action-proposal.js +39 -0
  8. package/dist/commands/commitments/action-proposals/decide.js +8 -1
  9. package/dist/commands/commitments/action-proposals/execute.js +11 -1
  10. package/dist/commands/commitments/create.js +2 -2
  11. package/dist/commands/commitments/doctor.d.ts +8 -0
  12. package/dist/commands/commitments/doctor.js +22 -0
  13. package/dist/commands/commitments/execute-remediation.js +12 -1
  14. package/dist/commands/commitments/observations.js +2 -2
  15. package/dist/commands/commitments/pack/bind.d.ts +18 -1
  16. package/dist/commands/commitments/pack/bind.js +66 -8
  17. package/dist/commands/commitments/pack/plan.d.ts +4 -1
  18. package/dist/commands/commitments/pack/plan.js +30 -2
  19. package/dist/commands/commitments/update.js +8 -2
  20. package/dist/commands/completion/index.js +1 -1
  21. package/dist/commands/completion/values.js +1 -1
  22. package/dist/commands/computer-use/audio.d.ts +1 -0
  23. package/dist/commands/computer-use/audio.js +1 -0
  24. package/dist/commands/computer-use/browser.d.ts +1 -0
  25. package/dist/commands/computer-use/browser.js +1 -0
  26. package/dist/commands/computer-use/disable.d.ts +1 -0
  27. package/dist/commands/computer-use/disable.js +1 -0
  28. package/dist/commands/computer-use/enable.d.ts +1 -0
  29. package/dist/commands/computer-use/enable.js +1 -0
  30. package/dist/commands/computer-use/index.d.ts +1 -0
  31. package/dist/commands/computer-use/index.js +1 -0
  32. package/dist/commands/computer-use/install.d.ts +1 -0
  33. package/dist/commands/computer-use/install.js +1 -0
  34. package/dist/commands/computer-use/recover.d.ts +1 -0
  35. package/dist/commands/computer-use/recover.js +1 -0
  36. package/dist/commands/computer-use/status.d.ts +1 -0
  37. package/dist/commands/computer-use/status.js +1 -0
  38. package/dist/commands/computer-use/stop.d.ts +1 -0
  39. package/dist/commands/computer-use/stop.js +1 -0
  40. package/dist/commands/context.js +16 -11
  41. package/dist/commands/convos/recovery.js +1 -1
  42. package/dist/commands/daemon/diagnostics.d.ts +9 -0
  43. package/dist/commands/daemon/diagnostics.js +53 -0
  44. package/dist/commands/daemon/index.js +2 -0
  45. package/dist/commands/daemon/maintenance/attest.d.ts +15 -0
  46. package/dist/commands/daemon/maintenance/attest.js +52 -0
  47. package/dist/commands/daemon/maintenance/hold.d.ts +17 -0
  48. package/dist/commands/daemon/maintenance/hold.js +70 -0
  49. package/dist/commands/daemon/maintenance/index.d.ts +12 -0
  50. package/dist/commands/daemon/maintenance/index.js +30 -0
  51. package/dist/commands/daemon/maintenance/resume.d.ts +13 -0
  52. package/dist/commands/daemon/maintenance/resume.js +36 -0
  53. package/dist/commands/daemon/maintenance/status.d.ts +13 -0
  54. package/dist/commands/daemon/maintenance/status.js +36 -0
  55. package/dist/commands/doctor.d.ts +4 -1
  56. package/dist/commands/doctor.js +50 -6
  57. package/dist/commands/followups/plans/cancel-batch.js +6 -3
  58. package/dist/commands/followups/plans/capacity.js +7 -3
  59. package/dist/commands/followups/plans/observability.js +11 -3
  60. package/dist/commands/followups/plans/preferences/set.js +26 -8
  61. package/dist/commands/followups/plans/preferences.js +1 -1
  62. package/dist/commands/followups/plans/show.js +1 -1
  63. package/dist/commands/goals/key-results/assess.d.ts +36 -0
  64. package/dist/commands/goals/key-results/assess.js +110 -0
  65. package/dist/commands/goals/key-results/history.d.ts +30 -0
  66. package/dist/commands/goals/key-results/history.js +104 -0
  67. package/dist/commands/goals/key-results/list.d.ts +5 -4
  68. package/dist/commands/goals/key-results/list.js +12 -6
  69. package/dist/commands/goals/key-results/show.d.ts +4 -2
  70. package/dist/commands/goals/key-results/show.js +25 -4
  71. package/dist/commands/goals/key-results/update.d.ts +4 -0
  72. package/dist/commands/goals/key-results/update.js +18 -24
  73. package/dist/commands/goals/plan-now.js +12 -1
  74. package/dist/commands/goals/planner-compare.d.ts +30 -0
  75. package/dist/commands/goals/planner-compare.js +136 -0
  76. package/dist/commands/machines/dedicated/service/exec.d.ts +3 -0
  77. package/dist/commands/machines/dedicated/service/exec.js +70 -11
  78. package/dist/commands/machines/hosted/destroy.d.ts +1 -0
  79. package/dist/commands/machines/hosted/destroy.js +11 -1
  80. package/dist/commands/machines/hosted/exec.d.ts +1 -0
  81. package/dist/commands/machines/hosted/exec.js +12 -1
  82. package/dist/commands/machines/hosted/index.js +1 -0
  83. package/dist/commands/machines/hosted/operation.d.ts +14 -0
  84. package/dist/commands/machines/hosted/operation.js +51 -0
  85. package/dist/commands/machines/hosted/pull.js +1 -1
  86. package/dist/commands/machines/hosted/start.js +6 -2
  87. package/dist/commands/search/agents.js +5 -1
  88. package/dist/commands/search/all.js +74 -22
  89. package/dist/commands/search/skills.d.ts +1 -0
  90. package/dist/commands/search/skills.js +12 -1
  91. package/dist/commands/search/spaces.d.ts +8 -1
  92. package/dist/commands/search/spaces.js +50 -12
  93. package/dist/commands/search/tasks.d.ts +13 -2
  94. package/dist/commands/search/tasks.js +78 -14
  95. package/dist/commands/search/teams.js +5 -1
  96. package/dist/commands/search/workspace.d.ts +19 -0
  97. package/dist/commands/search/workspace.js +126 -0
  98. package/dist/commands/skills/browse.d.ts +1 -0
  99. package/dist/commands/skills/browse.js +8 -1
  100. package/dist/commands/skills/search.d.ts +1 -0
  101. package/dist/commands/skills/search.js +12 -1
  102. package/dist/commands/spaces/auto-executor/compare.d.ts +18 -0
  103. package/dist/commands/spaces/auto-executor/compare.js +139 -0
  104. package/dist/commands/spaces/auto-executor/runs.d.ts +3 -0
  105. package/dist/commands/spaces/auto-executor/runs.js +13 -1
  106. package/dist/commands/spaces/charter/create-from-description.d.ts +21 -0
  107. package/dist/commands/spaces/charter/create-from-description.js +77 -0
  108. package/dist/commands/spaces/charter/show.d.ts +22 -0
  109. package/dist/commands/spaces/charter/show.js +61 -0
  110. package/dist/commands/spaces/heartbeats/list.d.ts +1 -16
  111. package/dist/commands/spaces/heartbeats/list.js +13 -0
  112. package/dist/commands/spaces/install-template.js +3 -0
  113. package/dist/commands/spaces/list.d.ts +1 -0
  114. package/dist/commands/spaces/list.js +12 -3
  115. package/dist/commands/spaces/loops/migrate.d.ts +32 -0
  116. package/dist/commands/spaces/loops/migrate.js +103 -0
  117. package/dist/commands/spaces/loops/release.d.ts +14 -0
  118. package/dist/commands/spaces/loops/release.js +59 -0
  119. package/dist/commands/spaces/notebook.d.ts +25 -0
  120. package/dist/commands/spaces/notebook.js +75 -0
  121. package/dist/commands/spaces/proposals/discard.d.ts +17 -0
  122. package/dist/commands/spaces/proposals/discard.js +17 -0
  123. package/dist/commands/spaces/proposals/keep.d.ts +17 -0
  124. package/dist/commands/spaces/proposals/keep.js +17 -0
  125. package/dist/commands/spaces/proposals/list.d.ts +24 -0
  126. package/dist/commands/spaces/proposals/list.js +89 -0
  127. package/dist/commands/spaces/search.d.ts +1 -0
  128. package/dist/commands/spaces/search.js +9 -0
  129. package/dist/commands/spaces/skills/propose.d.ts +29 -0
  130. package/dist/commands/spaces/skills/propose.js +82 -0
  131. package/dist/commands/spaces/templates/fork.js +3 -0
  132. package/dist/commands/spaces/triggers/show.js +6 -0
  133. package/dist/commands/spaces/workflows/retry.d.ts +1 -0
  134. package/dist/commands/spaces/workflows/retry.js +8 -1
  135. package/dist/commands/spaces/workflows/triggers/create.js +3 -2
  136. package/dist/commands/spaces/workflows/triggers/fire.js +4 -0
  137. package/dist/commands/spaces/workflows/triggers/update.js +2 -1
  138. package/dist/commands/spaces/write-policy/set.d.ts +22 -0
  139. package/dist/commands/spaces/write-policy/set.js +82 -0
  140. package/dist/commands/spaces/write-policy/show.d.ts +19 -0
  141. package/dist/commands/spaces/write-policy/show.js +49 -0
  142. package/dist/commands/store/artifacts/receipt.d.ts +14 -0
  143. package/dist/commands/store/artifacts/receipt.js +34 -0
  144. package/dist/commands/store/artifacts/release.d.ts +2 -0
  145. package/dist/commands/store/artifacts/release.js +11 -0
  146. package/dist/commands/store/governance/publish-release.d.ts +2 -0
  147. package/dist/commands/store/governance/publish-release.js +30 -1
  148. package/dist/commands/store/governance/release-receipt.d.ts +12 -0
  149. package/dist/commands/store/governance/release-receipt.js +32 -0
  150. package/dist/commands/tasks/approvals/list.d.ts +11 -5
  151. package/dist/commands/tasks/approvals/list.js +13 -6
  152. package/dist/commands/tasks/attachments/facts.d.ts +12 -0
  153. package/dist/commands/tasks/attachments/facts.js +29 -0
  154. package/dist/commands/tasks/attachments/upload.d.ts +1 -0
  155. package/dist/commands/tasks/attachments/upload.js +16 -0
  156. package/dist/commands/tasks/bulk-update.js +35 -1
  157. package/dist/commands/tasks/context.d.ts +15 -0
  158. package/dist/commands/tasks/context.js +69 -0
  159. package/dist/commands/tasks/copy.d.ts +18 -0
  160. package/dist/commands/tasks/copy.js +85 -0
  161. package/dist/commands/tasks/create-tree.js +97 -23
  162. package/dist/commands/tasks/create.js +9 -1
  163. package/dist/commands/tasks/deliverable/add.js +20 -10
  164. package/dist/commands/tasks/move.js +8 -1
  165. package/dist/commands/tasks/operations/show.d.ts +16 -0
  166. package/dist/commands/tasks/operations/show.js +98 -0
  167. package/dist/commands/tasks/operations/wait.d.ts +22 -0
  168. package/dist/commands/tasks/operations/wait.js +114 -0
  169. package/dist/commands/tasks/preflight.d.ts +1 -0
  170. package/dist/commands/tasks/preflight.js +11 -1
  171. package/dist/commands/tasks/rearm-recurrence.js +4 -0
  172. package/dist/commands/tasks/result/show.js +22 -0
  173. package/dist/commands/tasks/result/submit.d.ts +1 -0
  174. package/dist/commands/tasks/result/submit.js +3 -0
  175. package/dist/commands/tasks/retry-receipt.d.ts +15 -0
  176. package/dist/commands/tasks/retry-receipt.js +89 -0
  177. package/dist/commands/tasks/retry-review.d.ts +16 -0
  178. package/dist/commands/tasks/retry-review.js +66 -0
  179. package/dist/commands/tasks/retry.d.ts +4 -8
  180. package/dist/commands/tasks/retry.js +34 -68
  181. package/dist/commands/tasks/runs.d.ts +21 -0
  182. package/dist/commands/tasks/runs.js +95 -0
  183. package/dist/commands/tasks/search.d.ts +1 -0
  184. package/dist/commands/tasks/search.js +9 -0
  185. package/dist/commands/tasks/show.d.ts +2 -0
  186. package/dist/commands/tasks/show.js +15 -1
  187. package/dist/commands/tasks/start-receipt.d.ts +15 -0
  188. package/dist/commands/tasks/start-receipt.js +95 -0
  189. package/dist/commands/tasks/start.d.ts +4 -0
  190. package/dist/commands/tasks/start.js +49 -3
  191. package/dist/commands/tasks/update.js +3 -0
  192. package/dist/commands/tasks/upsert.js +17 -3
  193. package/dist/commands/tasks/watch.d.ts +3 -0
  194. package/dist/commands/tasks/watch.js +85 -20
  195. package/dist/commands/wiki/history.d.ts +33 -0
  196. package/dist/commands/wiki/history.js +134 -0
  197. package/dist/commands/wiki/ls.d.ts +2 -0
  198. package/dist/commands/wiki/ls.js +8 -0
  199. package/dist/commands/wiki/update.d.ts +3 -1
  200. package/dist/commands/wiki/update.js +24 -2
  201. package/dist/commands/wiki/write.d.ts +22 -0
  202. package/dist/commands/wiki/write.js +144 -6
  203. package/dist/generated/agent-guides.json +81 -81
  204. package/dist/generated/managed-instruction-guides.json +1 -1
  205. package/dist/lib/agent-guides.d.ts +9 -0
  206. package/dist/lib/agent-guides.js +23 -1
  207. package/dist/lib/agentic-stream.d.ts +5 -0
  208. package/dist/lib/agentic-stream.js +122 -3
  209. package/dist/lib/api-error-reason.d.ts +2 -0
  210. package/dist/lib/api-error-reason.js +14 -0
  211. package/dist/lib/api-fetch.js +3 -0
  212. package/dist/lib/auth-diagnostics.d.ts +39 -0
  213. package/dist/lib/auth-diagnostics.js +71 -0
  214. package/dist/lib/cli-client-identity.d.ts +6 -0
  215. package/dist/lib/cli-client-identity.js +16 -0
  216. package/dist/lib/cli-installation-diagnostics.d.ts +52 -0
  217. package/dist/lib/cli-installation-diagnostics.js +254 -0
  218. package/dist/lib/command-hygiene.d.ts +45 -0
  219. package/dist/lib/command-hygiene.js +413 -0
  220. package/dist/lib/commitments.d.ts +64 -3
  221. package/dist/lib/commitments.js +34 -6
  222. package/dist/lib/completion-index.d.ts +16 -4
  223. package/dist/lib/completion-index.js +50 -14
  224. package/dist/lib/config.js +7 -1
  225. package/dist/lib/daemon-maintenance-command.d.ts +22 -0
  226. package/dist/lib/daemon-maintenance-command.js +39 -0
  227. package/dist/lib/daemon-maintenance.d.ts +275 -0
  228. package/dist/lib/daemon-maintenance.js +1035 -0
  229. package/dist/lib/dedicated-service.d.ts +3 -2
  230. package/dist/lib/dedicated-service.js +11 -3
  231. package/dist/lib/governed-store.d.ts +8 -0
  232. package/dist/lib/governed-store.js +5 -0
  233. package/dist/lib/hosted-machines.d.ts +33 -2
  234. package/dist/lib/hosted-machines.js +19 -1
  235. package/dist/lib/json-output.d.ts +1 -1
  236. package/dist/lib/machines.d.ts +9 -1
  237. package/dist/lib/machines.js +15 -1
  238. package/dist/lib/node-adapter.js +13 -0
  239. package/dist/lib/record-output.d.ts +22 -0
  240. package/dist/lib/record-output.js +78 -0
  241. package/dist/lib/roles.d.ts +3 -3
  242. package/dist/lib/scoped-memory-command.d.ts +18 -0
  243. package/dist/lib/scoped-memory-command.js +53 -2
  244. package/dist/lib/search-display.d.ts +7 -0
  245. package/dist/lib/search-display.js +31 -0
  246. package/dist/lib/skill-store-pagination.d.ts +8 -0
  247. package/dist/lib/skill-store-pagination.js +35 -0
  248. package/dist/lib/space-charter.d.ts +49 -0
  249. package/dist/lib/space-charter.js +78 -0
  250. package/dist/lib/space-loop-migration.d.ts +18 -0
  251. package/dist/lib/space-loop-migration.js +128 -0
  252. package/dist/lib/space-notebook.d.ts +22 -0
  253. package/dist/lib/space-notebook.js +140 -0
  254. package/dist/lib/space-proposal-decision-command.d.ts +36 -0
  255. package/dist/lib/space-proposal-decision-command.js +108 -0
  256. package/dist/lib/space-proposals.d.ts +44 -0
  257. package/dist/lib/space-proposals.js +186 -0
  258. package/dist/lib/space-templates.d.ts +8 -0
  259. package/dist/lib/space-templates.js +17 -0
  260. package/dist/lib/space-write-policy.d.ts +24 -0
  261. package/dist/lib/space-write-policy.js +103 -0
  262. package/dist/lib/task-agent-context-capabilities.d.ts +10 -0
  263. package/dist/lib/task-agent-context-capabilities.js +22 -0
  264. package/dist/lib/task-agent-context-compatibility.d.ts +9 -0
  265. package/dist/lib/task-agent-context-compatibility.js +30 -0
  266. package/dist/lib/task-asset-upload.d.ts +22 -0
  267. package/dist/lib/task-asset-upload.js +257 -29
  268. package/dist/lib/task-batch.d.ts +15 -1
  269. package/dist/lib/task-batch.js +35 -2
  270. package/dist/lib/task-operation-watch.d.ts +66 -0
  271. package/dist/lib/task-operation-watch.js +159 -0
  272. package/dist/lib/task-resolver.d.ts +1 -1
  273. package/dist/lib/task-resolver.js +4 -3
  274. package/dist/lib/task-work.d.ts +1 -1
  275. package/dist/lib/task-work.js +35 -1
  276. package/dist/lib/task-write-attribution.d.ts +14 -0
  277. package/dist/lib/task-write-attribution.js +35 -2
  278. package/dist/lib/triggers.d.ts +11 -0
  279. package/dist/lib/triggers.js +7 -0
  280. package/dist/lib/wiki-update.d.ts +1 -0
  281. package/dist/lib/wiki-update.js +10 -1
  282. package/dist/lib/wiki.js +4 -1
  283. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +9 -1
  284. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +31 -15
  285. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.d.ts +10 -0
  286. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.js +147 -0
  287. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.d.ts +20 -0
  288. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.js +72 -0
  289. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +1 -0
  290. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +13 -7
  291. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.d.ts +21 -0
  292. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.js +96 -0
  293. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.d.ts +2 -3
  294. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.js +102 -20
  295. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.d.ts +370 -0
  296. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.js +315 -0
  297. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.d.ts +27 -0
  298. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.js +161 -0
  299. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineScopes.d.ts +26 -0
  300. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineScopes.js +41 -0
  301. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +2 -1
  302. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +15 -0
  303. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/kek/macos.js +20 -4
  304. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.d.ts +178 -0
  305. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.js +262 -0
  306. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +51 -0
  307. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +106 -0
  308. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +9 -1
  309. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +32 -5
  310. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.d.ts +10 -0
  311. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.js +172 -1
  312. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.d.ts +20 -0
  313. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.js +43 -0
  314. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +1 -0
  315. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +33 -14
  316. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.d.ts +21 -0
  317. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.js +62 -0
  318. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.d.ts +2 -3
  319. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.js +133 -25
  320. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.d.ts +370 -0
  321. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.js +404 -0
  322. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.d.ts +27 -0
  323. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.js +132 -0
  324. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineScopes.d.ts +26 -0
  325. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineScopes.js +15 -0
  326. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +2 -1
  327. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -1
  328. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/kek/macos.js +28 -15
  329. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.d.ts +178 -0
  330. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.js +342 -0
  331. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +51 -0
  332. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +138 -0
  333. package/dist/node_modules/@skrr-ai/auth-core/package.json +51 -1
  334. package/dist/node_modules/@skrr-ai/data-provider/index.js +27181 -20293
  335. package/oclif.manifest.json +5745 -1813
  336. package/package.json +20 -2
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchDisplayText = void 0;
4
+ exports.searchDiagnosticMessage = searchDiagnosticMessage;
5
+ const core_1 = require("@oclif/core");
6
+ const data_provider_1 = require("@skrr-ai/data-provider");
7
+ const base_command_1 = require("../../base-command");
8
+ const format_1 = require("../../lib/format");
9
+ const search_query_1 = require("../../lib/search-query");
10
+ const web_url_1 = require("../../lib/web-url");
11
+ const search_display_1 = require("../../lib/search-display");
12
+ var search_display_2 = require("../../lib/search-display");
13
+ Object.defineProperty(exports, "searchDisplayText", { enumerable: true, get: function () { return search_display_2.searchDisplayText; } });
14
+ function isSearchResponse(value) {
15
+ if (!value || typeof value !== 'object' || Array.isArray(value))
16
+ return false;
17
+ const response = value;
18
+ if (!Array.isArray(response.results) || (response.nextCursor !== null && (typeof response.nextCursor !== 'string' || !(0, search_display_1.isPrintableSearchCursor)(response.nextCursor))) ||
19
+ (response.diagnostics !== undefined && (!Array.isArray(response.diagnostics) || !response.diagnostics.every((item) => typeof item === 'string'))))
20
+ return false;
21
+ return response.results.every((item) => item && typeof item === 'object' && !Array.isArray(item) &&
22
+ ['id', 'type', 'entityId', 'title', 'href'].every((field) => typeof item[field] === 'string') &&
23
+ item.href.startsWith('/') && !item.href.startsWith('//') && !item.href.includes('\\') &&
24
+ !/[\u0000-\u001f\u007f]/.test(item.href) &&
25
+ ['identifier', 'excerpt'].every((field) => item[field] === undefined || typeof item[field] === 'string'));
26
+ }
27
+ function searchDiagnosticMessage(code) {
28
+ switch (code) {
29
+ case 'global_search_index_stale':
30
+ return 'The search index is catching up. Recent changes may be missing; retry shortly.';
31
+ case 'global_search_acl_unavailable':
32
+ return 'Access checks were unavailable. Results may be incomplete; retry shortly.';
33
+ case 'global_search_source_unavailable':
34
+ return 'Some current resources could not be checked. Results may be incomplete; retry shortly.';
35
+ case 'global_search_candidate_window_may_be_limited':
36
+ return 'This broad search may exceed the index result window. Narrow the query or select resource types.';
37
+ case 'global_search_candidate_window_unknown':
38
+ return 'The index result window could not be checked. Results may be incomplete; retry shortly.';
39
+ case 'global_search_invalid_candidate':
40
+ return 'The search index returned invalid candidates. Results may be incomplete; retry shortly.';
41
+ default:
42
+ return `Search may be incomplete (${(0, search_display_1.searchDisplayText)(code)}). Retry or inspect --json diagnostics.`;
43
+ }
44
+ }
45
+ /** Workspace search uses the same ACL-filtered index and result order as web. */
46
+ class SearchWorkspace extends base_command_1.BaseCommand {
47
+ static description = 'Search supported resources in your workspace';
48
+ static examples = [
49
+ '<%= config.bin %> search workspace "deployment incident"',
50
+ '<%= config.bin %> search workspace pricing --type task --type wiki --json',
51
+ ];
52
+ static args = { query: core_1.Args.string({ description: 'Search term', ignoreStdin: true }) };
53
+ static flags = {
54
+ query: core_1.Flags.string({ char: 'q', description: 'Search term' }),
55
+ type: core_1.Flags.string({ multiple: true, description: 'Limit to resource types (repeatable; for example task, space, wiki, message)' }),
56
+ limit: core_1.Flags.integer({ default: 25, min: 1, max: 50, description: 'Results per page' }),
57
+ cursor: core_1.Flags.string({ description: 'Continue from a previous page' }),
58
+ json: core_1.Flags.boolean({ description: 'Output structured results and diagnostics' }),
59
+ };
60
+ async run() {
61
+ this.requireAuth();
62
+ const { args, flags } = await this.parse(SearchWorkspace);
63
+ const query = (0, search_query_1.resolveSearchQuery)(this, args.query, flags.query, 'search workspace');
64
+ // Session-only tokens cannot authenticate to the JWT route. Never adopt an
65
+ // ambient human credential to turn this into broader authority.
66
+ if (this.resolvedCredential.token?.startsWith('agst_')) {
67
+ this.failWithCliError({
68
+ message: 'Workspace search is not available with a session-scoped credential. Ask the workspace owner to enable the delegated CLI surface for a new Agent session, or search in a signed-in human session. Do not substitute a personal login inside the Agent.',
69
+ code: 'GLOBAL_SEARCH_SESSION_UNSUPPORTED', exit: 2, retryable: false,
70
+ });
71
+ }
72
+ let response;
73
+ try {
74
+ response = await data_provider_1.dataService.searchGlobal({ query, types: flags.type, limit: flags.limit, cursor: flags.cursor });
75
+ }
76
+ catch (err) {
77
+ const code = (0, base_command_1.apiRefusal)(err).code;
78
+ if (code === 'SEARCH_WORKSPACE_REQUIRED' || code === 'SEARCH_WORKSPACE_FORBIDDEN') {
79
+ this.failWithCliError({
80
+ message: `Choose a workspace you belong to: run \`${this.config.bin} workspaces list\`, then \`${this.config.bin} workspaces use <workspace>\`, or pass --workspace <workspace-id>.`,
81
+ code, status: 403, exit: 3, retryable: false,
82
+ });
83
+ }
84
+ if (code === 'INVALID_SEARCH_TYPE') {
85
+ const allowed = (0, base_command_1.apiRefusal)(err).body?.supportedTypes;
86
+ const types = Array.isArray(allowed)
87
+ ? allowed.filter((type) => typeof type === 'string').map(search_display_1.searchDisplayText).filter(Boolean)
88
+ : [];
89
+ this.failWithCliError({
90
+ message: types.length
91
+ ? `Unknown search type. Choose from: ${types.join(', ')}.`
92
+ : 'Unknown search type. Run the command without --type to search all supported types.',
93
+ code, status: 400, exit: 2, retryable: false,
94
+ });
95
+ }
96
+ this.handleApiError(err);
97
+ }
98
+ if (!isSearchResponse(response) || (flags.cursor && response.nextCursor === flags.cursor)) {
99
+ this.failWithCliError({ message: 'The server returned an invalid workspace search response. Retry or check server compatibility.',
100
+ code: 'GLOBAL_SEARCH_INVALID_RESPONSE', exit: 1, retryable: true });
101
+ }
102
+ const results = response.results.map((item) => ({
103
+ ...item,
104
+ url: `${(0, web_url_1.webOrigin)(this.cliConfig.baseURL)}${item.href}`,
105
+ }));
106
+ if (flags.json) {
107
+ this.log(JSON.stringify({ ...response, results }, null, 2));
108
+ return;
109
+ }
110
+ for (const diagnostic of new Set(response.diagnostics || []))
111
+ this.warn(searchDiagnosticMessage(diagnostic));
112
+ if (results.length) {
113
+ (0, format_1.renderTable)(results.map((item) => ({ type: (0, search_display_1.searchDisplayText)(item.type), id: (0, search_display_1.searchDisplayText)(item.identifier || item.entityId), title: (0, search_display_1.searchDisplayText)(item.title), excerpt: (0, search_display_1.searchDisplayText)(item.excerpt || ''), url: (0, search_display_1.searchDisplayText)(item.url || '-') })), [
114
+ { key: 'type', header: 'TYPE' }, { key: 'id', header: 'ID' },
115
+ { key: 'title', header: 'TITLE', maxWidth: 45 }, { key: 'excerpt', header: 'EXCERPT', maxWidth: 60 },
116
+ { key: 'url', header: 'URL', verbatim: true },
117
+ ], (line) => this.log(line));
118
+ }
119
+ else {
120
+ this.log('No results in this page of supported workspace resources.');
121
+ }
122
+ if (response.nextCursor)
123
+ this.log(`Next page: --cursor ${(0, search_display_1.shellSearchCursor)(response.nextCursor)}`);
124
+ }
125
+ }
126
+ exports.default = SearchWorkspace;
@@ -16,6 +16,7 @@ export default class SkillsBrowse extends BaseCommand {
16
16
  category: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
17
  sort: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
18
  limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
19
+ cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
20
  };
20
21
  run(): Promise<void>;
21
22
  }
@@ -7,6 +7,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
7
7
  const base_command_1 = require("../../base-command");
8
8
  const format_1 = require("../../lib/format");
9
9
  const usd_micros_1 = require("../../lib/usd-micros");
10
+ const skill_store_pagination_1 = require("../../lib/skill-store-pagination");
10
11
  function skillBrowseDescription(skill) {
11
12
  const description = String(skill.description ?? '').trim();
12
13
  if (description && description !== '>' && description !== '|')
@@ -43,6 +44,7 @@ class SkillsBrowse extends base_command_1.BaseCommand {
43
44
  options: ['newest', 'popular', 'rating'],
44
45
  }),
45
46
  limit: core_1.Flags.integer({ description: 'Maximum number of results', default: 20 }),
47
+ cursor: core_1.Flags.string({ description: 'Continue from a previous page' }),
46
48
  };
47
49
  async run() {
48
50
  this.requireAuth();
@@ -59,6 +61,7 @@ class SkillsBrowse extends base_command_1.BaseCommand {
59
61
  category: flags.category,
60
62
  sort: flags.sort ? sortMap[flags.sort] : undefined,
61
63
  limit: flags.limit,
64
+ cursor: flags.cursor,
62
65
  });
63
66
  }
64
67
  catch (err) {
@@ -71,7 +74,10 @@ class SkillsBrowse extends base_command_1.BaseCommand {
71
74
  const r = response;
72
75
  const items = Array.isArray(r) ? r : (r?.data ?? []);
73
76
  if (items.length === 0) {
74
- this.log('No skills found.');
77
+ this.log((0, skill_store_pagination_1.skillStorePageState)(response, flags.cursor).hasMore
78
+ ? 'No skills on this page. More candidates remain.'
79
+ : 'No skills found.');
80
+ (0, skill_store_pagination_1.reportSkillStorePage)(response, flags.cursor, (message) => this.log(message), (message) => this.warn(message));
75
81
  return;
76
82
  }
77
83
  const rows = items.map(skillBrowseRow);
@@ -83,6 +89,7 @@ class SkillsBrowse extends base_command_1.BaseCommand {
83
89
  { key: 'installs', header: 'INSTALLS' },
84
90
  { key: 'description', header: 'DESCRIPTION', maxWidth: 60 },
85
91
  ], (line) => this.log(line));
92
+ (0, skill_store_pagination_1.reportSkillStorePage)(response, flags.cursor, (message) => this.log(message), (message) => this.warn(message));
86
93
  }
87
94
  }
88
95
  exports.default = SkillsBrowse;
@@ -17,6 +17,7 @@ export default class SkillsSearch extends BaseCommand {
17
17
  query: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
18
  category: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
19
  limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
20
+ cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
21
  };
21
22
  run(): Promise<void>;
22
23
  }
@@ -6,6 +6,7 @@ const base_command_1 = require("../../base-command");
6
6
  const format_1 = require("../../lib/format");
7
7
  const search_query_1 = require("../../lib/search-query");
8
8
  const usd_micros_1 = require("../../lib/usd-micros");
9
+ const skill_store_pagination_1 = require("../../lib/skill-store-pagination");
9
10
  class SkillsSearch extends base_command_1.BaseCommand {
10
11
  static description = 'Search skills in the skrr store by keyword (same as `search skills`)';
11
12
  static examples = [
@@ -37,6 +38,7 @@ class SkillsSearch extends base_command_1.BaseCommand {
37
38
  query: core_1.Flags.string({ char: 'q', description: 'Search query' }),
38
39
  category: core_1.Flags.string({ description: 'Filter by category' }),
39
40
  limit: core_1.Flags.integer({ description: 'Maximum number of results', default: 20 }),
41
+ cursor: core_1.Flags.string({ description: 'Continue from a previous page' }),
40
42
  };
41
43
  async run() {
42
44
  this.requireAuth();
@@ -48,6 +50,7 @@ class SkillsSearch extends base_command_1.BaseCommand {
48
50
  q: query,
49
51
  category: flags.category,
50
52
  limit: flags.limit,
53
+ cursor: flags.cursor,
51
54
  });
52
55
  }
53
56
  catch (err) {
@@ -59,8 +62,15 @@ class SkillsSearch extends base_command_1.BaseCommand {
59
62
  }
60
63
  const r = response;
61
64
  const items = Array.isArray(r) ? r : (r?.data ?? []);
65
+ const incomplete = (0, skill_store_pagination_1.skillStoreSearchIncomplete)(response);
66
+ if (incomplete)
67
+ this.warn('Skill store search may be incomplete. Try again or narrow your query.');
62
68
  if (items.length === 0) {
63
- this.log(`No skills found matching '${query}'.`);
69
+ this.log((0, skill_store_pagination_1.skillStorePageState)(response, flags.cursor).hasMore
70
+ ? 'No skills matched on this page. More candidates remain.'
71
+ : incomplete ? 'No skills confirmed in the available search results.'
72
+ : `No skills found matching '${query}'.`);
73
+ (0, skill_store_pagination_1.reportSkillStorePage)(response, flags.cursor, (message) => this.log(message), (message) => this.warn(message));
64
74
  return;
65
75
  }
66
76
  const rows = items.map((s) => ({
@@ -79,6 +89,7 @@ class SkillsSearch extends base_command_1.BaseCommand {
79
89
  { key: 'installs', header: 'INSTALLS' },
80
90
  { key: 'description', header: 'DESCRIPTION', maxWidth: 60 },
81
91
  ], (line) => this.log(line));
92
+ (0, skill_store_pagination_1.reportSkillStorePage)(response, flags.cursor, (message) => this.log(message), (message) => this.warn(message));
82
93
  }
83
94
  }
84
95
  exports.default = SkillsSearch;
@@ -0,0 +1,18 @@
1
+ import { type SpaceOrchestrationComparison } from '@skrr-ai/data-provider';
2
+ import { BaseCommand } from '../../../base-command';
3
+ /** The comparison as the lines the command prints. Pure, so it is tested as such. */
4
+ export declare function comparisonLines(result: SpaceOrchestrationComparison): string[];
5
+ export default class SpacesAutoExecutorCompare extends BaseCommand {
6
+ static description: string;
7
+ static examples: string[];
8
+ static args: {
9
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
10
+ };
11
+ static flags: {
12
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ days: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ since: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ until: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ };
17
+ run(): Promise<void>;
18
+ }
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.comparisonLines = comparisonLines;
4
+ const core_1 = require("@oclif/core");
5
+ const data_provider_1 = require("@skrr-ai/data-provider");
6
+ const base_command_1 = require("../../../base-command");
7
+ const space_output_1 = require("../../../lib/space-output");
8
+ /** The board fields in the order the server records them. */
9
+ const BOARD_ROWS = [
10
+ ['unassigned', 'unassigned (assignments)'],
11
+ ['ready', 'ready, not running (starts)'],
12
+ ['failed', 'failed (failure handling)'],
13
+ ['running', 'running'],
14
+ ['blocked', 'blocked by dependencies'],
15
+ ['scheduled', 'scheduled'],
16
+ ];
17
+ const DAY_MS = 24 * 60 * 60 * 1000;
18
+ function turnsLine(turns) {
19
+ const parts = Object.entries(turns.byStatus)
20
+ .sort(([a], [b]) => a.localeCompare(b))
21
+ .map(([status, count]) => `${status} ${count}`);
22
+ return parts.length ? `${turns.total} (${parts.join(', ')})` : String(turns.total);
23
+ }
24
+ function holderNowLabel(current) {
25
+ if (current.holder === 'leader')
26
+ return 'the Leader';
27
+ if (current.holder === 'space_loop') {
28
+ return `the space_orchestration loop ${current.commitmentId ?? ''}`.trim();
29
+ }
30
+ return 'unknown (could not be read)';
31
+ }
32
+ /** The comparison as the lines the command prints. Pure, so it is tested as such. */
33
+ function comparisonLines(result) {
34
+ const lines = [];
35
+ lines.push(`Judgment turn now: ${holderNowLabel(result.current)}`);
36
+ lines.push(`Window: ${result.since} to ${result.until}`);
37
+ if (result.spaceLoop.loops.length) {
38
+ lines.push(`Loops: ${result.spaceLoop.loops.join(', ')}`);
39
+ }
40
+ lines.push('');
41
+ const width = 30;
42
+ const column = 22;
43
+ const pad = (value) => value.padEnd(width);
44
+ lines.push(`${pad('')}${'Leader'.padEnd(column)}Loop`);
45
+ lines.push(`${pad('Ticks held')}${String(result.leader.ticks).padEnd(column)}${result.spaceLoop.ticks}`);
46
+ lines.push(`${pad('Turns')}${turnsLine(result.leader.turns).padEnd(column)}${turnsLine(result.spaceLoop.turns)}`);
47
+ lines.push(`${pad('Starts by its turns')}${String(result.leader.starts).padEnd(column)}not counted`);
48
+ lines.push('Backlog per tick (mean / peak):');
49
+ for (const [field, label] of BOARD_ROWS) {
50
+ const leader = result.leader.board[field];
51
+ const loop = result.spaceLoop.board[field];
52
+ lines.push(` ${label.padEnd(width - 2)}${`${leader.mean} / ${leader.peak}`.padEnd(column)}${loop.mean} / ${loop.peak}`);
53
+ }
54
+ lines.push('');
55
+ lines.push(result.concurrentTurns === 0
56
+ ? 'Concurrent turns: 0'
57
+ : `Concurrent turns: ${result.concurrentTurns} (a Leader turn and a loop turn overlapped; see the runs and the loop Cycles)`);
58
+ if (result.unreadableTicks > 0) {
59
+ lines.push(`Unreadable ticks: ${result.unreadableTicks} (the holder could not be read, so the Leader stood down)`);
60
+ }
61
+ if (result.truncated) {
62
+ lines.push('This window holds more records than one comparison reads; narrow it.');
63
+ }
64
+ if (result.overlapUnknownEndTurns) {
65
+ lines.push(`Unknown turn endpoints: ${result.overlapUnknownEndTurns} (overlap count is incomplete)`);
66
+ }
67
+ for (const [label, stats] of [['Leader', result.leader], ['Loop', result.spaceLoop]]) {
68
+ if (stats.boardSamples) {
69
+ for (const [field] of BOARD_ROWS) {
70
+ if (stats.boardSamples[field] < stats.ticks) {
71
+ lines.push(`${label} ${field}: ${stats.boardSamples[field]} of ${stats.ticks} ticks measured (missing values are not zero backlog)`);
72
+ }
73
+ }
74
+ }
75
+ }
76
+ if (result.leader.ticks + result.spaceLoop.ticks === 0) {
77
+ lines.push('No tick in this window recorded who held the turn. A tick records it only when the auto-executor is on and reaches its judgment turn.');
78
+ }
79
+ for (const [label, stats] of [['Leader', result.leader], ['Loop', result.spaceLoop]]) {
80
+ if (stats.sampling) {
81
+ const sampling = stats.sampling;
82
+ lines.push(`${label} samples: ${sampling.sampledUtcDays} UTC days, ${sampling.spanHours.toFixed(1)} hours first to last; largest gap ${sampling.maxGapHours.toFixed(1)} hours`);
83
+ }
84
+ }
85
+ if (result.spaceLoop.evidence) {
86
+ const evidence = result.spaceLoop.evidence;
87
+ lines.push(`Loop terminal reasons: ${evidence.terminalRunsWithReason} recorded, ${evidence.terminalRunsMissingReason} missing (review still required)`);
88
+ lines.push(`Loop reported cost: ${(evidence.reportedCostUsdMicros / 1_000_000).toFixed(6)} USD across ${evidence.costStatusCounts.reported} runs; ${evidence.costStatusCounts.unknown + evidence.costStatusCounts.partial + evidence.costStatusCounts.unavailable} runs without complete reported cost`);
89
+ }
90
+ for (const gap of result.evidenceGaps ?? [])
91
+ lines.push(`Evidence gap: ${gap}`);
92
+ return lines;
93
+ }
94
+ class SpacesAutoExecutorCompare extends base_command_1.BaseCommand {
95
+ static description = "Compare the Space Leader with the Space's space_orchestration loop: who held the judgment turn, the board each held it over, and whether their turns overlapped";
96
+ static examples = [
97
+ '<%= config.bin %> spaces auto-executor compare <space-id>',
98
+ '<%= config.bin %> spaces auto-executor compare <space-id> --days 14',
99
+ '<%= config.bin %> spaces auto-executor compare <space-id> --since 2026-10-01T00:00:00Z --until 2026-10-15T00:00:00Z --json',
100
+ ];
101
+ static args = {
102
+ id: core_1.Args.string({ description: 'Space ID', required: true, ignoreStdin: true }),
103
+ };
104
+ static flags = {
105
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
106
+ days: core_1.Flags.integer({
107
+ description: 'Window ending now, in days (default 7, at most 90)',
108
+ min: 1,
109
+ max: 90,
110
+ exclusive: ['since'],
111
+ }),
112
+ since: core_1.Flags.string({ description: 'Window start (ISO 8601)' }),
113
+ until: core_1.Flags.string({ description: 'Window end (ISO 8601; default now)' }),
114
+ };
115
+ async run() {
116
+ this.requireAuth();
117
+ const { args, flags } = await this.parse(SpacesAutoExecutorCompare);
118
+ const spaceRef = await this.resolveEntityRef('space', args.id);
119
+ const until = flags.until;
120
+ const since = flags.since ??
121
+ (flags.days
122
+ ? new Date((until ? Date.parse(until) : Date.now()) - flags.days * DAY_MS).toISOString()
123
+ : undefined);
124
+ let result;
125
+ try {
126
+ result = await data_provider_1.dataService.getSpaceOrchestrationComparison(spaceRef, { since, until });
127
+ }
128
+ catch (err) {
129
+ this.handleApiError(err);
130
+ }
131
+ if (flags.json) {
132
+ this.printJsonResult((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'execution', { result }));
133
+ return;
134
+ }
135
+ for (const line of comparisonLines(result))
136
+ this.log(line);
137
+ }
138
+ }
139
+ exports.default = SpacesAutoExecutorCompare;
@@ -1,4 +1,7 @@
1
+ import { type SpaceJudgmentTurnRecord } from '@skrr-ai/data-provider';
1
2
  import { BaseCommand } from '../../../base-command';
3
+ /** Who held the Space's judgment turn at this tick (OSK-18003). */
4
+ export declare function judgmentTurnLabel(turn?: SpaceJudgmentTurnRecord): string;
2
5
  export default class SpacesAutoExecutorRuns extends BaseCommand {
3
6
  static description: string;
4
7
  static examples: string[];
@@ -1,9 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.judgmentTurnLabel = judgmentTurnLabel;
3
4
  const core_1 = require("@oclif/core");
4
5
  const data_provider_1 = require("@skrr-ai/data-provider");
5
6
  const base_command_1 = require("../../../base-command");
6
7
  const space_output_1 = require("../../../lib/space-output");
8
+ /** Who held the Space's judgment turn at this tick (OSK-18003). */
9
+ function judgmentTurnLabel(turn) {
10
+ if (!turn)
11
+ return '';
12
+ if (turn.holder === 'leader')
13
+ return ' turn: Leader';
14
+ if (turn.holder === 'space_loop') {
15
+ return ` turn: loop ${turn.commitmentId ?? ''}${turn.inFlightRunId ? ' (waiting for its turn to end)' : ''}`;
16
+ }
17
+ return ' turn: unreadable, Leader stood down';
18
+ }
7
19
  class SpacesAutoExecutorRuns extends base_command_1.BaseCommand {
8
20
  static description = "List a space's recent auto-orchestration runs and its Lead health";
9
21
  static examples = [
@@ -50,7 +62,7 @@ class SpacesAutoExecutorRuns extends base_command_1.BaseCommand {
50
62
  for (const run of result.runs) {
51
63
  const when = run.triggeredAt ?? 'unknown-time';
52
64
  const failure = run.failureReason ? ` — ${run.failureReason}` : '';
53
- this.log(`${when} ${run.status}${failure}`);
65
+ this.log(`${when} ${run.status}${failure}${judgmentTurnLabel(run.judgmentTurn)}`);
54
66
  }
55
67
  }
56
68
  }
@@ -0,0 +1,21 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr spaces charter create-from-description <space>` — seed the Space's
4
+ * charter page from its description, once.
5
+ *
6
+ * An explicit action: nothing turns descriptions into charters on its own, and
7
+ * the description itself is left as it is (the Space card's one-line summary).
8
+ * The page lands at the Space root as `charter`; a Space that already has a
9
+ * charter is refused, and so is one with no description to seed from.
10
+ */
11
+ export default class SpacesCharterCreateFromDescription extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static args: {
15
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
16
+ };
17
+ static flags: {
18
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ };
20
+ run(): Promise<void>;
21
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../../base-command");
6
+ const http_error_1 = require("../../../lib/http-error");
7
+ const space_charter_1 = require("../../../lib/space-charter");
8
+ const web_url_1 = require("../../../lib/web-url");
9
+ /**
10
+ * `skrr spaces charter create-from-description <space>` — seed the Space's
11
+ * charter page from its description, once.
12
+ *
13
+ * An explicit action: nothing turns descriptions into charters on its own, and
14
+ * the description itself is left as it is (the Space card's one-line summary).
15
+ * The page lands at the Space root as `charter`; a Space that already has a
16
+ * charter is refused, and so is one with no description to seed from.
17
+ */
18
+ class SpacesCharterCreateFromDescription extends base_command_1.BaseCommand {
19
+ static description = "Create a space's charter page from the space description (one time; the description is left as it is)";
20
+ static examples = [
21
+ '<%= config.bin %> spaces charter create-from-description <space-id>',
22
+ '<%= config.bin %> spaces charter create-from-description "Growth lab" --json',
23
+ ];
24
+ static args = {
25
+ id: core_1.Args.string({
26
+ description: 'Space ID, or a title to resolve',
27
+ required: true,
28
+ ignoreStdin: true,
29
+ }),
30
+ };
31
+ static flags = {
32
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
33
+ };
34
+ async run() {
35
+ this.requireAuth();
36
+ const { args, flags } = await this.parse(SpacesCharterCreateFromDescription);
37
+ const spaceId = await this.resolveSpaceReference(args.id);
38
+ let response;
39
+ try {
40
+ response = await data_provider_1.dataService.createSpaceWikiCharterFromDescription(spaceId);
41
+ }
42
+ catch (err) {
43
+ const conflict = (0, space_charter_1.charterConflictHint)(err, { binName: this.config.bin, spaceId });
44
+ if (conflict) {
45
+ this.failWithCliError({
46
+ message: conflict.message,
47
+ code: 'WIKI_CHARTER_EXISTS',
48
+ status: 409,
49
+ exit: 1,
50
+ retryable: false,
51
+ details: conflict.details,
52
+ });
53
+ }
54
+ if ((0, http_error_1.hasHttpStatus)(err, 422) && (0, http_error_1.httpBodyOf)(err)?.code === 'SPACE_DESCRIPTION_EMPTY') {
55
+ this.failWithCliError({
56
+ message: 'This Space has no description to create a charter from. Write the charter directly: ' +
57
+ `\`${this.config.bin} wiki write ${spaceId} charter --kind charter --file charter.md\`.`,
58
+ code: 'SPACE_DESCRIPTION_EMPTY',
59
+ status: 422,
60
+ exit: 1,
61
+ retryable: false,
62
+ });
63
+ }
64
+ this.handleApiError(err, { subject: `space ${args.id}` });
65
+ }
66
+ const charter = (0, web_url_1.withWikiPageUrl)(this.cliConfig.baseURL, response.charter);
67
+ if (flags.json) {
68
+ this.printJsonResult({ ...response, charter });
69
+ return;
70
+ }
71
+ this.log('Created the charter page from the Space description.');
72
+ for (const line of (0, space_charter_1.charterLines)(charter, { binName: this.config.bin, spaceId })) {
73
+ this.log(line);
74
+ }
75
+ }
76
+ }
77
+ exports.default = SpacesCharterCreateFromDescription;
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr spaces charter show <space>` — the Space's charter page.
4
+ *
5
+ * The charter is the Space's one live `kind: 'charter'` wiki page. What this
6
+ * prints first is its LEAD SECTION (everything before the first `##`), because
7
+ * that is the part every agent turn in the Space receives; the rest of the page
8
+ * is read on demand. No charter is an ordinary state, not an error: it prints
9
+ * how to create one and exits 0 (`--json` carries `charter: null`).
10
+ */
11
+ export default class SpacesCharterShow extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static args: {
15
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
16
+ };
17
+ static flags: {
18
+ full: import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
+ };
21
+ run(): Promise<void>;
22
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../../base-command");
6
+ const space_charter_1 = require("../../../lib/space-charter");
7
+ const web_url_1 = require("../../../lib/web-url");
8
+ /**
9
+ * `skrr spaces charter show <space>` — the Space's charter page.
10
+ *
11
+ * The charter is the Space's one live `kind: 'charter'` wiki page. What this
12
+ * prints first is its LEAD SECTION (everything before the first `##`), because
13
+ * that is the part every agent turn in the Space receives; the rest of the page
14
+ * is read on demand. No charter is an ordinary state, not an error: it prints
15
+ * how to create one and exits 0 (`--json` carries `charter: null`).
16
+ */
17
+ class SpacesCharterShow extends base_command_1.BaseCommand {
18
+ static description = "Show a space's charter page: the lead section every agent in the space reads, " +
19
+ 'and how to read the rest';
20
+ static examples = [
21
+ '<%= config.bin %> spaces charter show <space-id>',
22
+ '<%= config.bin %> spaces charter show "Growth lab" --full',
23
+ '<%= config.bin %> spaces charter show <space-id> --json',
24
+ ];
25
+ static args = {
26
+ id: core_1.Args.string({
27
+ description: 'Space ID, or a title to resolve',
28
+ required: true,
29
+ ignoreStdin: true,
30
+ }),
31
+ };
32
+ static flags = {
33
+ full: core_1.Flags.boolean({ description: 'Print the whole page, not only its lead section' }),
34
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
35
+ };
36
+ async run() {
37
+ this.requireAuth();
38
+ const { args, flags } = await this.parse(SpacesCharterShow);
39
+ const spaceId = await this.resolveSpaceReference(args.id);
40
+ let response;
41
+ try {
42
+ response = await data_provider_1.dataService.getSpaceWikiCharter(spaceId);
43
+ }
44
+ catch (err) {
45
+ this.handleApiError(err, { subject: `space ${args.id}` });
46
+ }
47
+ const charter = response.charter
48
+ ? (0, web_url_1.withWikiPageUrl)(this.cliConfig.baseURL, response.charter)
49
+ : null;
50
+ if (flags.json) {
51
+ this.printJsonResult({ ...response, charter });
52
+ return;
53
+ }
54
+ const lines = charter
55
+ ? (0, space_charter_1.charterLines)(charter, { binName: this.config.bin, spaceId, full: flags.full })
56
+ : (0, space_charter_1.noCharterLines)({ binName: this.config.bin, spaceId });
57
+ for (const line of lines)
58
+ this.log(line);
59
+ }
60
+ }
61
+ exports.default = SpacesCharterShow;
@@ -1,25 +1,10 @@
1
1
  import { BaseCommand } from '../../../base-command';
2
- /**
3
- * One heartbeat document → one table row.
4
- *
5
- * Schema reference (packages/data-provider/src/types/spaces.ts:110-132):
6
- * frequency?: Record<string, unknown> // object, NOT string
7
- * schedule: { pattern: string; timezone: string } // nested
8
- *
9
- * An earlier version read `h.frequency` / `h.timezone` directly, which
10
- * rendered `[object Object]` and `-` for every row. The casts below are
11
- * assertions, not guarantees — the payload is untyped at runtime — so the
12
- * final render goes through `formatCell`: if `schedule.pattern` ever arrives
13
- * structured (a `{ cron, tz }` object, say) the cell degrades to readable
14
- * `key=value` pairs instead of regressing to `[object Object]`.
15
- *
16
- * Exported for the unit test.
17
- */
18
2
  export declare function heartbeatRow(h: Record<string, unknown>): {
19
3
  agentId: string;
20
4
  pattern: string;
21
5
  timezone: string;
22
6
  enabled: string;
7
+ loop: string;
23
8
  updated: string;
24
9
  };
25
10
  export default class SpacesHeartbeatsList extends BaseCommand {