@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,29 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr spaces skills propose <space>` (OSK-17998): suggest a procedure as a
4
+ * skill for every agent in the space.
5
+ *
6
+ * The procedure becomes a suggested lesson in the space's Memory and is listed
7
+ * in its proposals inbox (`spaces proposals list`); a person promotes it there,
8
+ * which compiles it into a space skill. From an agent's run the space's write
9
+ * policy decides it (`skill_write`): it is refused only where the space refuses
10
+ * skill changes from that agent.
11
+ */
12
+ export default class SpacesSkillsPropose extends BaseCommand {
13
+ static description: string;
14
+ static examples: string[];
15
+ static args: {
16
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
17
+ };
18
+ static flags: {
19
+ title: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
20
+ content: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
21
+ procedure: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
22
+ summary: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ applies: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
+ except: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ key: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
27
+ };
28
+ run(): Promise<void>;
29
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const node_crypto_1 = require("node:crypto");
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 prompt_1 = require("../../../lib/prompt");
8
+ /**
9
+ * `skrr spaces skills propose <space>` (OSK-17998): suggest a procedure as a
10
+ * skill for every agent in the space.
11
+ *
12
+ * The procedure becomes a suggested lesson in the space's Memory and is listed
13
+ * in its proposals inbox (`spaces proposals list`); a person promotes it there,
14
+ * which compiles it into a space skill. From an agent's run the space's write
15
+ * policy decides it (`skill_write`): it is refused only where the space refuses
16
+ * skill changes from that agent.
17
+ */
18
+ class SpacesSkillsPropose extends base_command_1.BaseCommand {
19
+ static description = "Propose a procedure as a space skill: a suggested lesson a person promotes from the space's proposals inbox";
20
+ static examples = [
21
+ '<%= config.bin %> spaces skills propose <space-id> --title "Weekly KR review" --content "How we review…" --procedure procedure.json',
22
+ 'cat procedure.json | <%= config.bin %> spaces skills propose <space-id> --title "Release checklist" --content "…" --procedure -',
23
+ ];
24
+ static args = {
25
+ id: core_1.Args.string({ description: 'Space ID', required: true, ignoreStdin: true }),
26
+ };
27
+ static flags = {
28
+ title: core_1.Flags.string({ description: 'What the skill is called', required: true }),
29
+ content: core_1.Flags.string({
30
+ description: 'The lesson in prose, as the person reviewing it reads it',
31
+ required: true,
32
+ }),
33
+ procedure: core_1.Flags.string({
34
+ description: 'The structured procedure the skill gives (schemaVersion 1, goal, steps…): a JSON file, or - for stdin',
35
+ required: true,
36
+ }),
37
+ summary: core_1.Flags.string({ description: 'One-line summary' }),
38
+ applies: core_1.Flags.string({
39
+ description: 'When it applies (repeatable)',
40
+ multiple: true,
41
+ }),
42
+ except: core_1.Flags.string({ description: 'When it does not apply (repeatable)', multiple: true }),
43
+ key: core_1.Flags.string({
44
+ description: 'Idempotency key: a retry with the same key returns the first proposal',
45
+ }),
46
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
47
+ };
48
+ async run() {
49
+ this.requireAuth();
50
+ const { args, flags } = await this.parse(SpacesSkillsPropose);
51
+ const spaceRef = await this.resolveEntityRef('space', args.id);
52
+ let procedure;
53
+ try {
54
+ procedure = (await (0, prompt_1.readJsonBody)(flags.procedure));
55
+ }
56
+ catch (err) {
57
+ this.error(err.message, { exit: 1 });
58
+ }
59
+ let result;
60
+ try {
61
+ result = await data_provider_1.dataService.proposeSpaceSkill(spaceRef, {
62
+ title: flags.title,
63
+ content: flags.content,
64
+ procedure,
65
+ ...(flags.summary ? { summary: flags.summary } : {}),
66
+ ...(flags.applies?.length ? { applicability: flags.applies } : {}),
67
+ ...(flags.except?.length ? { exclusions: flags.except } : {}),
68
+ idempotencyKey: flags.key || `space-skill:${(0, node_crypto_1.randomUUID)()}`,
69
+ });
70
+ }
71
+ catch (err) {
72
+ this.handleApiError(err);
73
+ }
74
+ if (flags.json) {
75
+ this.printJsonResult(result);
76
+ return;
77
+ }
78
+ this.log(`Proposed "${flags.title}" as a skill for space ${spaceRef}: ${result.proposal.itemId}. ` +
79
+ 'A person promotes it from the space proposals inbox (`spaces proposals list`).');
80
+ }
81
+ }
82
+ exports.default = SpacesSkillsPropose;
@@ -55,6 +55,9 @@ class SpacesTemplatesFork extends base_command_1.BaseCommand {
55
55
  return this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, result.spaceId, 'tasks', result), null, 2));
56
56
  }
57
57
  this.log(`Forked into space ${result.spaceId} — ${result.taskCount ?? 0} task(s), ${result.goalCount ?? 0} goal(s).`);
58
+ for (const notice of (0, space_templates_1.wikiPageInstallNotices)(result.outcomes)) {
59
+ this.log(notice);
60
+ }
58
61
  }
59
62
  }
60
63
  exports.default = SpacesTemplatesFork;
@@ -38,6 +38,12 @@ class SpacesTriggersShow extends base_command_1.BaseCommand {
38
38
  this.log(`Enabled: ${assistant.enabled === false ? 'no' : 'yes'}`);
39
39
  this.log(`On event: ${formatLane(triggers.onEvent)}`);
40
40
  this.log(`On schedule:${formatLane(triggers.onSchedule)}`);
41
+ const loop = assistant.loop;
42
+ if (loop?.commitmentId) {
43
+ this.log(loop.state === 'retired'
44
+ ? `Loop: converted into loop ${loop.commitmentId}, which replaced its scheduled turns; read-only`
45
+ : `Loop: being converted into loop ${loop.commitmentId}; read-only, and it keeps running until the loop is active`);
46
+ }
41
47
  }
42
48
  }
43
49
  exports.default = SpacesTriggersShow;
@@ -8,6 +8,7 @@ export default class SpacesWorkflowsRetry extends BaseCommand {
8
8
  };
9
9
  static flags: {
10
10
  mode: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'retry-identity': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
13
  };
13
14
  run(): Promise<void>;
@@ -21,6 +21,9 @@ class SpacesWorkflowsRetry extends base_command_1.BaseCommand {
21
21
  default: 'original',
22
22
  description: 'Retry the original version or the workflow’s current version',
23
23
  }),
24
+ 'retry-identity': core_1.Flags.string({
25
+ description: 'Stable identity for one logical retry; a repeat reuses its durable run',
26
+ }),
24
27
  json: core_1.Flags.boolean({ description: 'Output the retry result as JSON' }),
25
28
  };
26
29
  async run() {
@@ -28,7 +31,7 @@ class SpacesWorkflowsRetry extends base_command_1.BaseCommand {
28
31
  const { args, flags } = await this.parse(SpacesWorkflowsRetry);
29
32
  let result;
30
33
  try {
31
- result = await data_provider_1.dataService.retrySpaceWorkflowRun(args.spaceId, args.runId, flags.mode);
34
+ result = await data_provider_1.dataService.retrySpaceWorkflowRun(args.spaceId, args.runId, flags.mode, flags['retry-identity']);
32
35
  }
33
36
  catch (error) {
34
37
  this.handleApiError(error);
@@ -39,6 +42,10 @@ class SpacesWorkflowsRetry extends base_command_1.BaseCommand {
39
42
  return;
40
43
  }
41
44
  this.log(`${result.reused ? 'Reused' : 'Started'} retry run ${result.run.id} (${result.run.status}).`);
45
+ if (result.receipt)
46
+ this.log(`Retry receipt: ${result.receipt.state} durable run ${result.receipt.runId}.`);
47
+ if (result.inspection)
48
+ this.log(`Inspect: skrr spaces workflows run ${args.spaceId} ${result.inspection.runId}`);
42
49
  }
43
50
  }
44
51
  exports.default = SpacesWorkflowsRetry;
@@ -16,7 +16,7 @@ async function readTriggerConfig(inline, file) {
16
16
  }
17
17
  class SpacesWorkflowsTriggersCreate extends base_command_1.BaseCommand {
18
18
  static aliases = ['workflows:triggers:create'];
19
- static description = 'Create a schedule, webhook, or space-event workflow trigger';
19
+ static description = 'Create a schedule or webhook workflow trigger';
20
20
  static args = {
21
21
  spaceId: core_1.Args.string({ required: true, ignoreStdin: true }),
22
22
  workflowId: core_1.Args.string({ required: true, ignoreStdin: true }),
@@ -24,7 +24,8 @@ class SpacesWorkflowsTriggersCreate extends base_command_1.BaseCommand {
24
24
  static flags = {
25
25
  type: core_1.Flags.string({
26
26
  required: true,
27
- options: ['schedule', 'webhook', 'space_event'],
27
+ // `space_event` is refused by the server: nothing delivers Space events to a workflow.
28
+ options: ['schedule', 'webhook'],
28
29
  description: 'Trigger type',
29
30
  }),
30
31
  status: core_1.Flags.string({
@@ -53,6 +53,10 @@ class SpacesWorkflowsTriggersFire extends base_command_1.BaseCommand {
53
53
  return;
54
54
  }
55
55
  this.log(`${result.reused ? 'Reused' : 'Fired'} trigger run ${result.run.id} (${result.run.status}).`);
56
+ if (result.receipt)
57
+ this.log(`Delivery receipt: ${result.receipt.state} durable run ${result.receipt.runId}.`);
58
+ if (result.inspection)
59
+ this.log(`Inspect: skrr spaces workflows run ${args.spaceId} ${result.inspection.runId}`);
56
60
  }
57
61
  }
58
62
  exports.default = SpacesWorkflowsTriggersFire;
@@ -15,7 +15,8 @@ class SpacesWorkflowsTriggersUpdate extends base_command_1.BaseCommand {
15
15
  };
16
16
  static flags = {
17
17
  type: core_1.Flags.string({
18
- options: ['schedule', 'webhook', 'space_event'],
18
+ // A stored `space_event` trigger can be paused or retyped, never set.
19
+ options: ['schedule', 'webhook'],
19
20
  description: 'Trigger type',
20
21
  }),
21
22
  status: core_1.Flags.string({ options: ['active', 'paused'], description: 'Trigger status' }),
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr spaces write-policy set <space>` — set how a Space treats UNATTENDED
4
+ * writes of one class (OSK-17988). SHARE on the Space, the authority that also
5
+ * configures the execution principal. `default` returns a writer to the design
6
+ * default. `auto` for a class the Workspace requires approval for is refused by
7
+ * the server (`SPACE_WRITE_POLICY_CEILING`).
8
+ */
9
+ export default class SpacesWritePolicySet extends BaseCommand {
10
+ static description: string;
11
+ static examples: string[];
12
+ static args: {
13
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
14
+ };
15
+ static flags: {
16
+ class: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
+ 'principal-automation': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'member-automation': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
+ };
21
+ run(): Promise<void>;
22
+ }
@@ -0,0 +1,82 @@
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_write_policy_1 = require("../../../lib/space-write-policy");
7
+ const MODE_OPTIONS = [...data_provider_1.SPACE_WRITE_MODES, 'default'];
8
+ /**
9
+ * `skrr spaces write-policy set <space>` — set how a Space treats UNATTENDED
10
+ * writes of one class (OSK-17988). SHARE on the Space, the authority that also
11
+ * configures the execution principal. `default` returns a writer to the design
12
+ * default. `auto` for a class the Workspace requires approval for is refused by
13
+ * the server (`SPACE_WRITE_POLICY_CEILING`).
14
+ */
15
+ class SpacesWritePolicySet extends base_command_1.BaseCommand {
16
+ static description = 'Set how a space treats unattended writes of one class (share access required)';
17
+ static examples = [
18
+ '<%= config.bin %> spaces write-policy set <space-id> --member-automation auto',
19
+ '<%= config.bin %> spaces write-policy set <space-id> --principal-automation propose',
20
+ '<%= config.bin %> spaces write-policy set <space-id> --member-automation refuse --json',
21
+ '<%= config.bin %> spaces write-policy set <space-id> --member-automation default',
22
+ ];
23
+ static args = {
24
+ id: core_1.Args.string({
25
+ description: 'Space ID, or a title to resolve',
26
+ required: true,
27
+ ignoreStdin: true,
28
+ }),
29
+ };
30
+ static flags = {
31
+ class: core_1.Flags.string({
32
+ description: 'The write class to set',
33
+ options: [...data_provider_1.SPACE_WRITE_CLASSES],
34
+ default: data_provider_1.SPACE_WRITE_CLASSES[0],
35
+ }),
36
+ 'principal-automation': core_1.Flags.string({
37
+ description: "Mode for the space's own automation (runs admitted under its execution principal); " +
38
+ '`default` resets it',
39
+ options: MODE_OPTIONS,
40
+ }),
41
+ 'member-automation': core_1.Flags.string({
42
+ description: "Mode for other members' agents writing unattended (for example their Commitment runs); " +
43
+ '`default` resets it',
44
+ options: MODE_OPTIONS,
45
+ }),
46
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
47
+ };
48
+ async run() {
49
+ this.requireAuth();
50
+ const { args, flags } = await this.parse(SpacesWritePolicySet);
51
+ const principal = (0, space_write_policy_1.cellValue)(flags['principal-automation']);
52
+ const member = (0, space_write_policy_1.cellValue)(flags['member-automation']);
53
+ if (principal === undefined && member === undefined) {
54
+ this.failWithCliError({
55
+ message: 'Pass --principal-automation and/or --member-automation (auto, propose, refuse or default).',
56
+ code: 'SPACE_WRITE_POLICY_NOTHING_TO_SET',
57
+ exit: 2,
58
+ retryable: false,
59
+ });
60
+ }
61
+ const spaceId = await this.resolveSpaceReference(args.id);
62
+ const cells = {
63
+ ...(principal !== undefined ? { principal_automation: principal } : {}),
64
+ ...(member !== undefined ? { member_automation: member } : {}),
65
+ };
66
+ const writePolicy = { [flags.class]: cells };
67
+ let view;
68
+ try {
69
+ view = await data_provider_1.dataService.updateSpaceWritePolicy({ spaceId, data: { writePolicy } });
70
+ }
71
+ catch (err) {
72
+ this.handleApiError(err, { subject: `space ${args.id}` });
73
+ }
74
+ if (flags.json) {
75
+ this.printJsonResult(view);
76
+ return;
77
+ }
78
+ for (const line of (0, space_write_policy_1.writePolicyLines)(view))
79
+ this.log(line);
80
+ }
81
+ }
82
+ exports.default = SpacesWritePolicySet;
@@ -0,0 +1,19 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr spaces write-policy show <space>` — how a Space treats UNATTENDED
4
+ * writes (OSK-17988): for each write class, the mode each kind of automated
5
+ * writer gets, whether that is the default, and the Workspace's approval
6
+ * ceiling. The rows are the server's own reading, so this shows the mode the
7
+ * server applies. VIEW on the Space.
8
+ */
9
+ export default class SpacesWritePolicyShow extends BaseCommand {
10
+ static description: string;
11
+ static examples: string[];
12
+ static args: {
13
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
14
+ };
15
+ static flags: {
16
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
+ };
18
+ run(): Promise<void>;
19
+ }
@@ -0,0 +1,49 @@
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_write_policy_1 = require("../../../lib/space-write-policy");
7
+ /**
8
+ * `skrr spaces write-policy show <space>` — how a Space treats UNATTENDED
9
+ * writes (OSK-17988): for each write class, the mode each kind of automated
10
+ * writer gets, whether that is the default, and the Workspace's approval
11
+ * ceiling. The rows are the server's own reading, so this shows the mode the
12
+ * server applies. VIEW on the Space.
13
+ */
14
+ class SpacesWritePolicyShow extends base_command_1.BaseCommand {
15
+ static description = 'Show how a space treats unattended writes: auto, held for approval, or refused';
16
+ static examples = [
17
+ '<%= config.bin %> spaces write-policy show <space-id>',
18
+ '<%= config.bin %> spaces write-policy show "Growth lab" --json',
19
+ ];
20
+ static args = {
21
+ id: core_1.Args.string({
22
+ description: 'Space ID, or a title to resolve',
23
+ required: true,
24
+ ignoreStdin: true,
25
+ }),
26
+ };
27
+ static flags = {
28
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
29
+ };
30
+ async run() {
31
+ this.requireAuth();
32
+ const { args, flags } = await this.parse(SpacesWritePolicyShow);
33
+ const spaceId = await this.resolveSpaceReference(args.id);
34
+ let view;
35
+ try {
36
+ view = await data_provider_1.dataService.getSpaceWritePolicy(spaceId);
37
+ }
38
+ catch (err) {
39
+ this.handleApiError(err, { subject: `space ${args.id}` });
40
+ }
41
+ if (flags.json) {
42
+ this.printJsonResult(view);
43
+ return;
44
+ }
45
+ for (const line of (0, space_write_policy_1.writePolicyLines)(view))
46
+ this.log(line);
47
+ }
48
+ }
49
+ exports.default = SpacesWritePolicyShow;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Inspect one immutable Store release before any retry or incident response. */
3
+ export default class StoreArtifactsReceipt extends BaseCommand {
4
+ static description: string;
5
+ static args: {
6
+ entityType: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ entityId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
8
+ releaseId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
9
+ };
10
+ static flags: {
11
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,34 @@
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
+ /** Inspect one immutable Store release before any retry or incident response. */
7
+ class StoreArtifactsReceipt extends base_command_1.BaseCommand {
8
+ static description = 'Read one immutable Store artifact publication receipt';
9
+ static args = {
10
+ entityType: core_1.Args.string({ required: true, ignoreStdin: true }),
11
+ entityId: core_1.Args.string({ required: true, ignoreStdin: true }),
12
+ releaseId: core_1.Args.string({ required: true, ignoreStdin: true }),
13
+ };
14
+ static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
15
+ async run() {
16
+ this.requireAuth();
17
+ const { args, flags } = await this.parse(StoreArtifactsReceipt);
18
+ try {
19
+ const result = await data_provider_1.dataService.getStoreArtifactReleaseReceipt(args.entityType, args.entityId, args.releaseId);
20
+ if (flags.json)
21
+ this.printJsonResult(result);
22
+ else {
23
+ const execution = result.execution;
24
+ const receipt = execution?.receipt;
25
+ this.log(`Release ${result.releaseId}: ${String(receipt?.state || 'unknown')}`);
26
+ this.log(`Operation: ${String(execution?.operationId || 'unavailable')}`);
27
+ }
28
+ }
29
+ catch (error) {
30
+ this.handleApiError(error);
31
+ }
32
+ }
33
+ }
34
+ exports.default = StoreArtifactsReceipt;
@@ -13,6 +13,8 @@ export default class StoreArtifactsRelease extends BaseCommand {
13
13
  'permission-manifest': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
14
  price: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
15
  workspaceId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ 'release-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
+ 'expected-source-revision': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
18
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
19
  };
18
20
  run(): Promise<void>;
@@ -46,6 +46,13 @@ class StoreArtifactsRelease extends base_command_1.BaseCommand {
46
46
  }),
47
47
  price: core_1.Flags.integer({ description: 'Price in micro-USD; omit for zero-price' }),
48
48
  workspaceId: core_1.Flags.string({ description: 'Publish as this workspace' }),
49
+ 'release-id': core_1.Flags.string({
50
+ required: true,
51
+ description: 'Stable immutable release identity; reuse it only to inspect or retry this exact reviewed publication',
52
+ }),
53
+ 'expected-source-revision': core_1.Flags.string({
54
+ description: 'Exact source revision from a reviewed receipt; reject publication if the source changed',
55
+ }),
49
56
  json: core_1.Flags.boolean({ description: 'Output JSON' }),
50
57
  };
51
58
  async run() {
@@ -64,6 +71,10 @@ class StoreArtifactsRelease extends base_command_1.BaseCommand {
64
71
  versionLabel: flags.versionLabel,
65
72
  artifactRef: flags.artifactRef,
66
73
  permissionManifest,
74
+ releaseId: flags['release-id'],
75
+ ...(flags['expected-source-revision']
76
+ ? { expectedSourceRevision: flags['expected-source-revision'] }
77
+ : {}),
67
78
  ...(flags.price !== undefined ? { price: flags.price } : {}),
68
79
  ...(flags.workspaceId ? { publishAs: { workspaceId: flags.workspaceId } } : {}),
69
80
  });
@@ -10,6 +10,8 @@ export default class StoreGovernancePublishRelease extends BaseCommand {
10
10
  static description: string;
11
11
  static examples: string[];
12
12
  static flags: {
13
+ 'release-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ 'expected-source-revision': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
15
  file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
16
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
17
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const base_command_1 = require("../../../base-command");
4
4
  const governed_store_1 = require("../../../lib/governed-store");
5
5
  const commerce_command_1 = require("../../../lib/commerce-command");
6
+ const core_1 = require("@oclif/core");
6
7
  /**
7
8
  * Publish one artifact release into the governed catalogue (admin).
8
9
  *
@@ -15,11 +16,39 @@ class StoreGovernancePublishRelease extends base_command_1.BaseCommand {
15
16
  static examples = [
16
17
  '<%= config.bin %> store governance publish-release --file ./release.json',
17
18
  ];
18
- static flags = { ...commerce_command_1.jsonBodyFlags };
19
+ static flags = {
20
+ ...commerce_command_1.jsonBodyFlags,
21
+ 'release-id': core_1.Flags.string({
22
+ description: 'Stable release identity for this exact evidence bundle; reuse it only for recovery inspection or retry',
23
+ }),
24
+ 'expected-source-revision': core_1.Flags.string({
25
+ description: 'Reviewed source revision; reject publication if a source-bound artifact changed',
26
+ }),
27
+ };
19
28
  async run() {
20
29
  this.requireAuth();
21
30
  const { flags } = await this.parse(StoreGovernancePublishRelease);
22
31
  const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file);
32
+ if (flags['release-id'] && body.releaseId && body.releaseId !== flags['release-id']) {
33
+ this.error('--release-id must match releaseId in the reviewed file when both are present.', { exit: 2 });
34
+ return;
35
+ }
36
+ if (flags['expected-source-revision'] &&
37
+ body.expectedSourceRevision &&
38
+ body.expectedSourceRevision !== flags['expected-source-revision']) {
39
+ this.error('--expected-source-revision must match the reviewed file when both are present.', { exit: 2 });
40
+ return;
41
+ }
42
+ if (flags['release-id'])
43
+ body.releaseId = flags['release-id'];
44
+ if (flags['expected-source-revision'])
45
+ body.expectedSourceRevision = flags['expected-source-revision'];
46
+ if (typeof body.releaseId !== 'string' || !body.releaseId.trim()) {
47
+ this.error('A reviewed releaseId is required so an ambiguous publication can be inspected safely.', {
48
+ exit: 2,
49
+ });
50
+ return;
51
+ }
23
52
  let result;
24
53
  try {
25
54
  result = await (0, governed_store_1.publishGovernedStoreRelease)(body);
@@ -0,0 +1,12 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Admin-only read path for an immutable governed-release receipt. */
3
+ export default class StoreGovernanceReleaseReceipt extends BaseCommand {
4
+ static description: string;
5
+ static args: {
6
+ releaseId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const governed_store_1 = require("../../../lib/governed-store");
6
+ /** Admin-only read path for an immutable governed-release receipt. */
7
+ class StoreGovernanceReleaseReceipt extends base_command_1.BaseCommand {
8
+ static description = 'Read one immutable governed Store release receipt';
9
+ static args = {
10
+ releaseId: core_1.Args.string({ required: true, ignoreStdin: true, description: 'Store release ID' }),
11
+ };
12
+ static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { args, flags } = await this.parse(StoreGovernanceReleaseReceipt);
16
+ try {
17
+ const result = await (0, governed_store_1.getGovernedStoreReleaseReceipt)(args.releaseId);
18
+ if (flags.json)
19
+ this.printJsonResult(result);
20
+ else {
21
+ const execution = result.execution;
22
+ const receipt = execution?.receipt;
23
+ this.log(`Release ${result.releaseId}: ${String(receipt?.state || 'unknown')}`);
24
+ this.log(`Operation: ${String(execution?.operationId || 'unavailable')}`);
25
+ }
26
+ }
27
+ catch (error) {
28
+ this.handleApiError(error);
29
+ }
30
+ }
31
+ }
32
+ exports.default = StoreGovernanceReleaseReceipt;
@@ -30,10 +30,16 @@ export declare function approvalRow(a: Record<string, unknown>): {
30
30
  * on an older run that a later run got past is history, not the current state.
31
31
  */
32
32
  export declare function permissionBlockedRun(runs: Array<Record<string, unknown>>): Record<string, unknown> | null;
33
- /** One refused call: the tool and its input, as the run recorded them. */
33
+ /**
34
+ * One refused call. The server keeps the refused input (a command line, a
35
+ * path) in the run transcript only, so the run record says whether one was
36
+ * recorded (`inputRecorded`) and carries `input` itself only when talking to a
37
+ * server that still returns it.
38
+ */
34
39
  export type PermissionRefusal = {
35
40
  tool: string | null;
36
- input: string;
41
+ input: string | null;
42
+ inputRecorded: boolean;
37
43
  };
38
44
  /** One way forward, as a command a person or a script can run. */
39
45
  export type PermissionBlockRemedy = {
@@ -53,9 +59,9 @@ export type BlockedRunSummary = {
53
59
  reason: string | null;
54
60
  agentId: string | null;
55
61
  /**
56
- * The refused calls with their inputs. Empty when the run recorded none
57
- * (runs finalized before the server kept them, or evidence without an input
58
- * preview). Never inferred.
62
+ * The refused calls: the tool, and the input when the server returns it.
63
+ * Empty when the run recorded none (runs finalized before the server kept
64
+ * them, or evidence without an input preview). Never inferred.
59
65
  */
60
66
  refused: PermissionRefusal[];
61
67
  remedies: PermissionBlockRemedy[];