@skrr-ai/cli 0.1.118 → 0.1.120

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 (285) hide show
  1. package/dist/base-command.d.ts +32 -0
  2. package/dist/base-command.js +113 -5
  3. package/dist/commands/commands.js +11 -0
  4. package/dist/commands/commitments/action-proposal.d.ts +13 -0
  5. package/dist/commands/commitments/action-proposal.js +39 -0
  6. package/dist/commands/commitments/action-proposals/decide.js +8 -1
  7. package/dist/commands/commitments/action-proposals/execute.js +11 -1
  8. package/dist/commands/commitments/create.js +2 -2
  9. package/dist/commands/commitments/doctor.d.ts +8 -0
  10. package/dist/commands/commitments/doctor.js +22 -0
  11. package/dist/commands/commitments/execute-remediation.js +12 -1
  12. package/dist/commands/commitments/observations.js +2 -2
  13. package/dist/commands/commitments/pack/bind.d.ts +18 -1
  14. package/dist/commands/commitments/pack/bind.js +66 -8
  15. package/dist/commands/commitments/pack/plan.d.ts +4 -1
  16. package/dist/commands/commitments/pack/plan.js +30 -2
  17. package/dist/commands/commitments/update.js +8 -2
  18. package/dist/commands/completion/index.js +1 -1
  19. package/dist/commands/completion/values.js +1 -1
  20. package/dist/commands/computer-use/audio.d.ts +1 -0
  21. package/dist/commands/computer-use/audio.js +1 -0
  22. package/dist/commands/computer-use/browser.d.ts +1 -0
  23. package/dist/commands/computer-use/browser.js +1 -0
  24. package/dist/commands/computer-use/disable.d.ts +1 -0
  25. package/dist/commands/computer-use/disable.js +1 -0
  26. package/dist/commands/computer-use/enable.d.ts +1 -0
  27. package/dist/commands/computer-use/enable.js +1 -0
  28. package/dist/commands/computer-use/index.d.ts +1 -0
  29. package/dist/commands/computer-use/index.js +1 -0
  30. package/dist/commands/computer-use/install.d.ts +1 -0
  31. package/dist/commands/computer-use/install.js +1 -0
  32. package/dist/commands/computer-use/recover.d.ts +1 -0
  33. package/dist/commands/computer-use/recover.js +1 -0
  34. package/dist/commands/computer-use/status.d.ts +1 -0
  35. package/dist/commands/computer-use/status.js +1 -0
  36. package/dist/commands/computer-use/stop.d.ts +1 -0
  37. package/dist/commands/computer-use/stop.js +1 -0
  38. package/dist/commands/context.js +16 -11
  39. package/dist/commands/convos/recovery.js +1 -1
  40. package/dist/commands/daemon/diagnostics.d.ts +9 -0
  41. package/dist/commands/daemon/diagnostics.js +53 -0
  42. package/dist/commands/daemon/index.js +2 -0
  43. package/dist/commands/daemon/maintenance/attest.d.ts +15 -0
  44. package/dist/commands/daemon/maintenance/attest.js +52 -0
  45. package/dist/commands/daemon/maintenance/hold.d.ts +17 -0
  46. package/dist/commands/daemon/maintenance/hold.js +70 -0
  47. package/dist/commands/daemon/maintenance/index.d.ts +12 -0
  48. package/dist/commands/daemon/maintenance/index.js +30 -0
  49. package/dist/commands/daemon/maintenance/resume.d.ts +13 -0
  50. package/dist/commands/daemon/maintenance/resume.js +36 -0
  51. package/dist/commands/daemon/maintenance/status.d.ts +13 -0
  52. package/dist/commands/daemon/maintenance/status.js +36 -0
  53. package/dist/commands/doctor.d.ts +4 -1
  54. package/dist/commands/doctor.js +50 -6
  55. package/dist/commands/followups/plans/cancel-batch.js +6 -3
  56. package/dist/commands/followups/plans/capacity.js +7 -3
  57. package/dist/commands/followups/plans/observability.js +11 -3
  58. package/dist/commands/followups/plans/preferences/set.js +26 -8
  59. package/dist/commands/followups/plans/preferences.js +1 -1
  60. package/dist/commands/followups/plans/show.js +1 -1
  61. package/dist/commands/goals/key-results/assess.d.ts +36 -0
  62. package/dist/commands/goals/key-results/assess.js +110 -0
  63. package/dist/commands/goals/key-results/history.d.ts +30 -0
  64. package/dist/commands/goals/key-results/history.js +104 -0
  65. package/dist/commands/goals/key-results/list.d.ts +5 -4
  66. package/dist/commands/goals/key-results/list.js +12 -6
  67. package/dist/commands/goals/key-results/show.d.ts +4 -2
  68. package/dist/commands/goals/key-results/show.js +25 -4
  69. package/dist/commands/goals/key-results/update.d.ts +4 -0
  70. package/dist/commands/goals/key-results/update.js +18 -24
  71. package/dist/commands/goals/plan-now.js +12 -1
  72. package/dist/commands/goals/planner-compare.d.ts +30 -0
  73. package/dist/commands/goals/planner-compare.js +136 -0
  74. package/dist/commands/machines/dedicated/service/exec.d.ts +3 -0
  75. package/dist/commands/machines/dedicated/service/exec.js +70 -11
  76. package/dist/commands/machines/hosted/destroy.d.ts +1 -0
  77. package/dist/commands/machines/hosted/destroy.js +11 -1
  78. package/dist/commands/machines/hosted/exec.d.ts +1 -0
  79. package/dist/commands/machines/hosted/exec.js +12 -1
  80. package/dist/commands/machines/hosted/index.js +1 -0
  81. package/dist/commands/machines/hosted/operation.d.ts +14 -0
  82. package/dist/commands/machines/hosted/operation.js +51 -0
  83. package/dist/commands/machines/hosted/pull.js +1 -1
  84. package/dist/commands/machines/hosted/start.js +6 -2
  85. package/dist/commands/memory/versions/list.d.ts +2 -0
  86. package/dist/commands/memory/versions/list.js +3 -2
  87. package/dist/commands/memory/versions/show.d.ts +2 -0
  88. package/dist/commands/memory/versions/show.js +3 -2
  89. package/dist/commands/spaces/auto-executor/compare.d.ts +18 -0
  90. package/dist/commands/spaces/auto-executor/compare.js +139 -0
  91. package/dist/commands/spaces/auto-executor/runs.d.ts +3 -0
  92. package/dist/commands/spaces/auto-executor/runs.js +13 -1
  93. package/dist/commands/spaces/charter/create-from-description.d.ts +21 -0
  94. package/dist/commands/spaces/charter/create-from-description.js +77 -0
  95. package/dist/commands/spaces/charter/show.d.ts +22 -0
  96. package/dist/commands/spaces/charter/show.js +61 -0
  97. package/dist/commands/spaces/heartbeats/list.d.ts +1 -16
  98. package/dist/commands/spaces/heartbeats/list.js +13 -0
  99. package/dist/commands/spaces/install-template.js +3 -0
  100. package/dist/commands/spaces/loops/migrate.d.ts +32 -0
  101. package/dist/commands/spaces/loops/migrate.js +103 -0
  102. package/dist/commands/spaces/loops/release.d.ts +14 -0
  103. package/dist/commands/spaces/loops/release.js +59 -0
  104. package/dist/commands/spaces/notebook.d.ts +25 -0
  105. package/dist/commands/spaces/notebook.js +75 -0
  106. package/dist/commands/spaces/proposals/discard.d.ts +17 -0
  107. package/dist/commands/spaces/proposals/discard.js +17 -0
  108. package/dist/commands/spaces/proposals/keep.d.ts +17 -0
  109. package/dist/commands/spaces/proposals/keep.js +17 -0
  110. package/dist/commands/spaces/proposals/list.d.ts +24 -0
  111. package/dist/commands/spaces/proposals/list.js +89 -0
  112. package/dist/commands/spaces/skills/propose.d.ts +29 -0
  113. package/dist/commands/spaces/skills/propose.js +82 -0
  114. package/dist/commands/spaces/templates/fork.js +3 -0
  115. package/dist/commands/spaces/triggers/show.js +6 -0
  116. package/dist/commands/spaces/workflows/retry.d.ts +1 -0
  117. package/dist/commands/spaces/workflows/retry.js +8 -1
  118. package/dist/commands/spaces/workflows/triggers/create.js +3 -2
  119. package/dist/commands/spaces/workflows/triggers/fire.js +4 -0
  120. package/dist/commands/spaces/workflows/triggers/update.js +2 -1
  121. package/dist/commands/spaces/write-policy/set.d.ts +22 -0
  122. package/dist/commands/spaces/write-policy/set.js +82 -0
  123. package/dist/commands/spaces/write-policy/show.d.ts +19 -0
  124. package/dist/commands/spaces/write-policy/show.js +49 -0
  125. package/dist/commands/store/artifacts/receipt.d.ts +14 -0
  126. package/dist/commands/store/artifacts/receipt.js +34 -0
  127. package/dist/commands/store/artifacts/release.d.ts +2 -0
  128. package/dist/commands/store/artifacts/release.js +11 -0
  129. package/dist/commands/store/governance/publish-release.d.ts +2 -0
  130. package/dist/commands/store/governance/publish-release.js +30 -1
  131. package/dist/commands/store/governance/release-receipt.d.ts +12 -0
  132. package/dist/commands/store/governance/release-receipt.js +32 -0
  133. package/dist/commands/tasks/approvals/list.d.ts +11 -5
  134. package/dist/commands/tasks/approvals/list.js +13 -6
  135. package/dist/commands/tasks/attachments/facts.d.ts +12 -0
  136. package/dist/commands/tasks/attachments/facts.js +29 -0
  137. package/dist/commands/tasks/attachments/upload.d.ts +1 -0
  138. package/dist/commands/tasks/attachments/upload.js +16 -0
  139. package/dist/commands/tasks/bulk-update.js +35 -1
  140. package/dist/commands/tasks/context.d.ts +15 -0
  141. package/dist/commands/tasks/context.js +69 -0
  142. package/dist/commands/tasks/copy.d.ts +18 -0
  143. package/dist/commands/tasks/copy.js +85 -0
  144. package/dist/commands/tasks/create-tree.js +97 -23
  145. package/dist/commands/tasks/create.js +9 -1
  146. package/dist/commands/tasks/deliverable/add.js +20 -10
  147. package/dist/commands/tasks/move.js +8 -1
  148. package/dist/commands/tasks/operations/show.d.ts +16 -0
  149. package/dist/commands/tasks/operations/show.js +98 -0
  150. package/dist/commands/tasks/operations/wait.d.ts +22 -0
  151. package/dist/commands/tasks/operations/wait.js +114 -0
  152. package/dist/commands/tasks/preflight.d.ts +1 -0
  153. package/dist/commands/tasks/preflight.js +11 -1
  154. package/dist/commands/tasks/rearm-recurrence.js +4 -0
  155. package/dist/commands/tasks/result/show.js +22 -0
  156. package/dist/commands/tasks/result/submit.d.ts +1 -0
  157. package/dist/commands/tasks/result/submit.js +3 -0
  158. package/dist/commands/tasks/retry-receipt.d.ts +15 -0
  159. package/dist/commands/tasks/retry-receipt.js +89 -0
  160. package/dist/commands/tasks/retry-review.d.ts +16 -0
  161. package/dist/commands/tasks/retry-review.js +66 -0
  162. package/dist/commands/tasks/retry.d.ts +4 -8
  163. package/dist/commands/tasks/retry.js +34 -68
  164. package/dist/commands/tasks/runs.d.ts +21 -0
  165. package/dist/commands/tasks/runs.js +95 -0
  166. package/dist/commands/tasks/show.d.ts +2 -0
  167. package/dist/commands/tasks/show.js +15 -1
  168. package/dist/commands/tasks/start-receipt.d.ts +15 -0
  169. package/dist/commands/tasks/start-receipt.js +95 -0
  170. package/dist/commands/tasks/start.d.ts +4 -0
  171. package/dist/commands/tasks/start.js +49 -3
  172. package/dist/commands/tasks/update.js +3 -0
  173. package/dist/commands/tasks/upsert.js +17 -3
  174. package/dist/commands/tasks/watch.d.ts +3 -0
  175. package/dist/commands/tasks/watch.js +85 -20
  176. package/dist/commands/wiki/history.d.ts +33 -0
  177. package/dist/commands/wiki/history.js +134 -0
  178. package/dist/commands/wiki/ls.d.ts +2 -0
  179. package/dist/commands/wiki/ls.js +8 -0
  180. package/dist/commands/wiki/update.d.ts +3 -1
  181. package/dist/commands/wiki/update.js +24 -2
  182. package/dist/commands/wiki/write.d.ts +22 -0
  183. package/dist/commands/wiki/write.js +144 -6
  184. package/dist/generated/agent-guides.json +81 -81
  185. package/dist/generated/managed-instruction-guides.json +1 -1
  186. package/dist/lib/agent-guides.d.ts +9 -0
  187. package/dist/lib/agent-guides.js +23 -1
  188. package/dist/lib/agentic-stream.d.ts +5 -0
  189. package/dist/lib/agentic-stream.js +122 -3
  190. package/dist/lib/api-fetch.d.ts +4 -0
  191. package/dist/lib/api-fetch.js +25 -7
  192. package/dist/lib/auth-diagnostics.d.ts +39 -0
  193. package/dist/lib/auth-diagnostics.js +71 -0
  194. package/dist/lib/cli-client-identity.d.ts +6 -0
  195. package/dist/lib/cli-client-identity.js +16 -0
  196. package/dist/lib/cli-installation-diagnostics.d.ts +52 -0
  197. package/dist/lib/cli-installation-diagnostics.js +254 -0
  198. package/dist/lib/command-hygiene.d.ts +45 -0
  199. package/dist/lib/command-hygiene.js +413 -0
  200. package/dist/lib/commitments.d.ts +64 -3
  201. package/dist/lib/commitments.js +34 -6
  202. package/dist/lib/completion-index.d.ts +16 -4
  203. package/dist/lib/completion-index.js +50 -14
  204. package/dist/lib/config.js +7 -1
  205. package/dist/lib/daemon-maintenance-command.d.ts +22 -0
  206. package/dist/lib/daemon-maintenance-command.js +39 -0
  207. package/dist/lib/daemon-maintenance.d.ts +275 -0
  208. package/dist/lib/daemon-maintenance.js +1035 -0
  209. package/dist/lib/dedicated-service.d.ts +3 -2
  210. package/dist/lib/dedicated-service.js +11 -3
  211. package/dist/lib/governed-store.d.ts +8 -0
  212. package/dist/lib/governed-store.js +5 -0
  213. package/dist/lib/hosted-machines.d.ts +33 -2
  214. package/dist/lib/hosted-machines.js +19 -1
  215. package/dist/lib/json-output.d.ts +1 -1
  216. package/dist/lib/machines.d.ts +9 -1
  217. package/dist/lib/machines.js +15 -1
  218. package/dist/lib/memory-history-session.d.ts +14 -0
  219. package/dist/lib/memory-history-session.js +60 -0
  220. package/dist/lib/node-adapter.js +13 -0
  221. package/dist/lib/record-output.d.ts +22 -0
  222. package/dist/lib/record-output.js +78 -0
  223. package/dist/lib/roles.d.ts +3 -3
  224. package/dist/lib/scoped-memory-command.d.ts +24 -0
  225. package/dist/lib/scoped-memory-command.js +87 -5
  226. package/dist/lib/space-charter.d.ts +49 -0
  227. package/dist/lib/space-charter.js +78 -0
  228. package/dist/lib/space-loop-migration.d.ts +18 -0
  229. package/dist/lib/space-loop-migration.js +128 -0
  230. package/dist/lib/space-notebook.d.ts +22 -0
  231. package/dist/lib/space-notebook.js +140 -0
  232. package/dist/lib/space-proposal-decision-command.d.ts +36 -0
  233. package/dist/lib/space-proposal-decision-command.js +108 -0
  234. package/dist/lib/space-proposals.d.ts +44 -0
  235. package/dist/lib/space-proposals.js +186 -0
  236. package/dist/lib/space-templates.d.ts +8 -0
  237. package/dist/lib/space-templates.js +17 -0
  238. package/dist/lib/space-write-policy.d.ts +24 -0
  239. package/dist/lib/space-write-policy.js +103 -0
  240. package/dist/lib/task-agent-context-capabilities.d.ts +10 -0
  241. package/dist/lib/task-agent-context-capabilities.js +22 -0
  242. package/dist/lib/task-agent-context-compatibility.d.ts +9 -0
  243. package/dist/lib/task-agent-context-compatibility.js +30 -0
  244. package/dist/lib/task-asset-upload.d.ts +22 -0
  245. package/dist/lib/task-asset-upload.js +257 -29
  246. package/dist/lib/task-batch.d.ts +15 -1
  247. package/dist/lib/task-batch.js +35 -2
  248. package/dist/lib/task-operation-watch.d.ts +66 -0
  249. package/dist/lib/task-operation-watch.js +159 -0
  250. package/dist/lib/task-resolver.d.ts +1 -1
  251. package/dist/lib/task-resolver.js +4 -3
  252. package/dist/lib/task-runtime-headers.js +13 -3
  253. package/dist/lib/task-work.d.ts +1 -1
  254. package/dist/lib/task-work.js +35 -1
  255. package/dist/lib/task-write-attribution.d.ts +14 -0
  256. package/dist/lib/task-write-attribution.js +35 -2
  257. package/dist/lib/triggers.d.ts +11 -0
  258. package/dist/lib/triggers.js +7 -0
  259. package/dist/lib/wiki-update.d.ts +1 -0
  260. package/dist/lib/wiki-update.js +10 -1
  261. package/dist/lib/wiki.js +4 -1
  262. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +9 -1
  263. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +31 -15
  264. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +1 -0
  265. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +13 -7
  266. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.d.ts +370 -0
  267. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.js +315 -0
  268. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.d.ts +178 -0
  269. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.js +262 -0
  270. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +51 -0
  271. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +106 -0
  272. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +9 -1
  273. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +32 -5
  274. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +1 -0
  275. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +33 -14
  276. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.d.ts +370 -0
  277. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.js +404 -0
  278. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.d.ts +178 -0
  279. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.js +342 -0
  280. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +51 -0
  281. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +138 -0
  282. package/dist/node_modules/@skrr-ai/auth-core/package.json +20 -0
  283. package/dist/node_modules/@skrr-ai/data-provider/index.js +27085 -20250
  284. package/oclif.manifest.json +10570 -7247
  285. package/package.json +20 -2
@@ -0,0 +1,136 @@
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
+ /** The board fields in the order the server records them. */
8
+ const BOARD_ROWS = [
9
+ ['open', 'open tasks (capacity)'],
10
+ ['notStarted', 'not started (refinable)'],
11
+ ['executing', 'running or in review'],
12
+ ['failed', 'failed'],
13
+ ['completed', 'completed'],
14
+ ['keyResults', 'key results'],
15
+ ['keyResultsDone', ' judged done'],
16
+ ['keyResultsAtRisk', ' judged at risk'],
17
+ ['keyResultsOffTrack', ' judged off track'],
18
+ ];
19
+ const DAY_MS = 24 * 60 * 60 * 1000;
20
+ function countsLine(total, byKey) {
21
+ const parts = Object.entries(byKey)
22
+ .sort(([a], [b]) => a.localeCompare(b))
23
+ .map(([key, count]) => `${key} ${count}`);
24
+ return parts.length ? `${total} (${parts.join(', ')})` : String(total);
25
+ }
26
+ function holderNowLabel(current) {
27
+ if (current.holder === 'goal_planner')
28
+ return 'the Goal planner';
29
+ if (current.holder === 'goal_loop') {
30
+ return `the goal_advance loop ${current.commitmentId ?? ''}`.trim();
31
+ }
32
+ return 'unknown (could not be read)';
33
+ }
34
+ /** The comparison as the lines the command prints. Pure, so it is tested as such. */
35
+ function comparisonLines(result) {
36
+ const lines = [];
37
+ lines.push(`Planning turn now: ${holderNowLabel(result.current)}`);
38
+ lines.push(`Window: ${result.since} to ${result.until}`);
39
+ if (result.cadence.tickIntervalMs) {
40
+ lines.push(`Planner cadence: every ${Math.round(result.cadence.tickIntervalMs / 60_000)} min`);
41
+ }
42
+ if (result.goalLoop.loops.length) {
43
+ lines.push(`Loops: ${result.goalLoop.loops.join(', ')}`);
44
+ }
45
+ lines.push('');
46
+ const width = 30;
47
+ const column = 22;
48
+ const pad = (value) => value.padEnd(width);
49
+ lines.push(`${pad('')}${'Planner'.padEnd(column)}Loop`);
50
+ lines.push(`${pad('Planner ticks held')}${String(result.goalPlanner.ticks).padEnd(column)}${result.goalLoop.ticks}`);
51
+ const plannerTurns = Object.values(result.goalPlanner.notes).reduce((a, b) => a + b, 0);
52
+ lines.push(`${pad('Turns')}${countsLine(plannerTurns, result.goalPlanner.notes).padEnd(column)}${countsLine(result.goalLoop.turns.total, result.goalLoop.turns.byStatus)}`);
53
+ lines.push(`${pad('Tasks created')}${String(result.goalPlanner.created).padEnd(column)}${result.goalLoop.tasksCreated}`);
54
+ lines.push(`${pad('Tasks refined')}${String(result.goalPlanner.refined).padEnd(column)}not counted`);
55
+ lines.push(`${pad('Key results judged')}${'never'.padEnd(column)}${result.goalLoop.keyResultJudgments}`);
56
+ lines.push('The Goal per planner tick (mean / peak):');
57
+ for (const [field, label] of BOARD_ROWS) {
58
+ const planner = result.goalPlanner.board[field];
59
+ const loop = result.goalLoop.board[field];
60
+ lines.push(` ${label.padEnd(width - 2)}${`${planner.mean} / ${planner.peak}`.padEnd(column)}${loop.mean} / ${loop.peak}`);
61
+ }
62
+ lines.push('');
63
+ lines.push(result.concurrentTurns === 0
64
+ ? 'Concurrent turns: 0'
65
+ : `Concurrent turns: ${result.concurrentTurns} (a planner turn and a loop turn overlapped; see the planner ticks and the loop Cycles)`);
66
+ if (result.unreadableTicks > 0) {
67
+ lines.push(`Unreadable ticks: ${result.unreadableTicks} (the holder could not be read, so the planner stood down)`);
68
+ }
69
+ if (result.coverage.truncated) {
70
+ lines.push(`The Goal keeps its most recent planner ticks only; this window reaches back before ${result.coverage.recordedSince}. Narrow it.`);
71
+ }
72
+ if (result.truncated) {
73
+ lines.push('This window holds more loop runs than one comparison reads; narrow it.');
74
+ }
75
+ if (result.goalPlanner.ticks + result.goalLoop.ticks === 0) {
76
+ lines.push('No planner tick in this window recorded who held the turn. A tick records it only when the Goal has a planner cadence and the tick claims the Goal.');
77
+ }
78
+ return lines;
79
+ }
80
+ /**
81
+ * `skrr goals planner-compare <goal-id>` (OSK-18012): GoalPlanner beside the
82
+ * Goal's `goal_advance` loop, read from `GET /api/goals/:goalId/planning-comparison`.
83
+ *
84
+ * What it is for: the evidence to retire the planner for this Goal. Over a
85
+ * window of at least seven days in which each holder held the Goal: the loop
86
+ * turned at the Goal's pace (its turns and the planner ticks it held), it judged
87
+ * the key results (the planner never does), its open and failed work is no
88
+ * worse than the planner's, the key results it held over moved no worse, and
89
+ * concurrent turns are 0. Every stop of the loop is explained in its Cycles
90
+ * (`commitments cycles <id>`).
91
+ */
92
+ class GoalsPlannerCompare extends base_command_1.BaseCommand {
93
+ static description = "Compare the Goal planner with the Goal's goal_advance loop: who held the planning turn, the Goal each held it over, and whether their turns overlapped";
94
+ static examples = [
95
+ '<%= config.bin %> goals planner-compare <goal-id>',
96
+ '<%= config.bin %> goals planner-compare <goal-id> --days 14',
97
+ '<%= config.bin %> goals planner-compare <goal-id> --since 2026-10-01T00:00:00Z --until 2026-10-15T00:00:00Z --json',
98
+ ];
99
+ static args = {
100
+ id: core_1.Args.string({ description: 'Goal ID', required: true, ignoreStdin: true }),
101
+ };
102
+ static flags = {
103
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
104
+ days: core_1.Flags.integer({
105
+ description: 'Window ending now, in days (default 7, at most 90)',
106
+ min: 1,
107
+ max: 90,
108
+ exclusive: ['since'],
109
+ }),
110
+ since: core_1.Flags.string({ description: 'Window start (ISO 8601)' }),
111
+ until: core_1.Flags.string({ description: 'Window end (ISO 8601; default now)' }),
112
+ };
113
+ async run() {
114
+ this.requireAuth();
115
+ const { args, flags } = await this.parse(GoalsPlannerCompare);
116
+ const until = flags.until;
117
+ const since = flags.since ??
118
+ (flags.days
119
+ ? new Date((until ? Date.parse(until) : Date.now()) - flags.days * DAY_MS).toISOString()
120
+ : undefined);
121
+ let result;
122
+ try {
123
+ result = await data_provider_1.dataService.getGoalPlanningComparison(args.id, { since, until });
124
+ }
125
+ catch (err) {
126
+ this.handleApiError(err);
127
+ }
128
+ if (flags.json) {
129
+ this.printJsonResult(result);
130
+ return;
131
+ }
132
+ for (const line of comparisonLines(result))
133
+ this.log(line);
134
+ }
135
+ }
136
+ exports.default = GoalsPlannerCompare;
@@ -1,4 +1,5 @@
1
1
  import { DedicatedServiceCommand } from '../../../../lib/dedicated-service-command';
2
+ export declare const SERVICE_EXEC_REQUEST_ID_PATTERN: RegExp;
2
3
  /**
3
4
  * `skrr machines dedicated service exec` — a one-off command inside a
4
5
  * service's context (phase 2).
@@ -21,6 +22,8 @@ export default class DedicatedServiceExec extends DedicatedServiceCommand {
21
22
  static flags: {
22
23
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
23
24
  timeout: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ 'request-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ inspect: import("@oclif/core/interfaces").BooleanFlag<boolean>;
24
27
  };
25
28
  run(): Promise<void>;
26
29
  }
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SERVICE_EXEC_REQUEST_ID_PATTERN = void 0;
3
4
  const core_1 = require("@oclif/core");
5
+ const node_crypto_1 = require("node:crypto");
4
6
  const dedicated_service_command_1 = require("../../../../lib/dedicated-service-command");
7
+ const dedicated_service_1 = require("../../../../lib/dedicated-service");
5
8
  const exec_1 = require("../../hosted/exec");
9
+ exports.SERVICE_EXEC_REQUEST_ID_PATTERN = /^[A-Za-z0-9_.:-]{1,128}$/;
6
10
  /**
7
11
  * `skrr machines dedicated service exec` — a one-off command inside a
8
12
  * service's context (phase 2).
@@ -18,6 +22,8 @@ class DedicatedServiceExec extends dedicated_service_command_1.DedicatedServiceC
18
22
  static examples = [
19
23
  '<%= config.bin %> machines dedicated service exec <lease-id> <name> -- printenv',
20
24
  '<%= config.bin %> machines dedicated service exec <lease-id> <name> -- cat /workspace/services/name/state.json',
25
+ '<%= config.bin %> machines dedicated service exec <lease-id> <name> --request-id deploy-42 -- ./deploy.sh',
26
+ '<%= config.bin %> machines dedicated service exec <lease-id> <name> --request-id deploy-42 --inspect',
21
27
  ];
22
28
  static usage = 'machines dedicated service exec <lease-id> <name> -- <command...>';
23
29
  static args = {
@@ -41,34 +47,87 @@ class DedicatedServiceExec extends dedicated_service_command_1.DedicatedServiceC
41
47
  min: 1,
42
48
  max: 600,
43
49
  }),
50
+ 'request-id': core_1.Flags.string({
51
+ description: 'Stable idempotency key for this command. Reusing it returns the same durable execution receipt instead of running another command.',
52
+ }),
53
+ inspect: core_1.Flags.boolean({
54
+ description: 'Read an existing execution receipt only. Requires --request-id and never starts a command.',
55
+ }),
44
56
  };
45
57
  async run() {
46
58
  this.requireAuth();
47
59
  const { head, tail } = (0, exec_1.splitExecArgv)(this.argv);
48
60
  const { args, flags } = await this.parse(DedicatedServiceExec, head);
49
61
  const argv = tail ?? args.command ?? [];
50
- if (argv.length === 0) {
62
+ if (flags.inspect && !flags['request-id']) {
63
+ this.error('--inspect requires --request-id.', { exit: 2 });
64
+ }
65
+ if (flags.inspect && argv.length > 0) {
66
+ this.error('--inspect is read-only; do not pass a command.', { exit: 2 });
67
+ }
68
+ if (!flags.inspect && argv.length === 0) {
51
69
  this.error('Command is required — pass it after --.', { exit: 2 });
52
70
  }
71
+ const requestId = flags['request-id'] ?? `svc-exec:${(0, node_crypto_1.randomUUID)()}`;
72
+ if (!exports.SERVICE_EXEC_REQUEST_ID_PATTERN.test(requestId)) {
73
+ this.error('--request-id must be 1-128 characters of letters, digits and . _ : -.', {
74
+ exit: 2,
75
+ });
76
+ }
53
77
  const leaseId = await this.resolveLeaseArg(args.lease);
54
78
  // Phase-2 verb: `dedicated:service:exec {leaseId, name, argv}`. A daemon
55
79
  // without the extension answers with the unsupported path — the command
56
80
  // degrades, it does not improvise.
57
81
  const timeoutSeconds = flags.timeout ?? 300;
58
- const result = await this.callService('exec', {
59
- leaseId,
60
- name: args.name,
61
- argv,
62
- timeoutSeconds,
63
- ...this.scopeFrom(flags),
64
- },
65
- // The relay waits timeoutSeconds+30s; the caller must outlive that or a
66
- // legitimately long exec reports a false connectivity failure.
67
- (timeoutSeconds + 45) * 1000);
82
+ let result;
83
+ try {
84
+ // Do not use the generic helper: if this long call loses its socket
85
+ // response, the exact same request id is the recovery subject and the
86
+ // next safe action is inspection, not a fresh command invocation.
87
+ const channel = await this.serviceChannel();
88
+ const response = await channel.call('exec', {
89
+ leaseId,
90
+ name: args.name,
91
+ ...(flags.inspect ? { inspect: true } : { argv, timeoutSeconds }),
92
+ requestId,
93
+ ...this.scopeFrom(flags),
94
+ }, (timeoutSeconds + 45) * 1000);
95
+ result = response.result;
96
+ }
97
+ catch (error) {
98
+ if (error instanceof dedicated_service_1.DedicatedServiceError &&
99
+ ['SERVICE_CALL_TIMEOUT', 'disconnected'].includes(error.code)) {
100
+ this.failWithCliError({
101
+ message: 'Could not confirm how this service command ended. It may still be running or may have finished. ' +
102
+ `Inspect before retrying: \`${this.config.bin} machines dedicated service exec ${leaseId} ${args.name} --request-id ${requestId} --inspect\`.`,
103
+ code: 'DEDICATED_SERVICE_EXECUTION_UNCONFIRMED',
104
+ exit: 1,
105
+ retryable: true,
106
+ });
107
+ }
108
+ this.reportServiceError(error);
109
+ }
68
110
  this.closeServiceChannel();
111
+ const execution = result?.execution;
112
+ if (!flags.inspect && execution?.receipt?.state && execution.receipt.state !== 'completed') {
113
+ this.failWithCliError({
114
+ message: `Execution ${execution.operationId ?? requestId} is ${execution.receipt.state}; ` +
115
+ `inspect it before retrying: \`${execution.inspection?.command ??
116
+ `${this.config.bin} machines dedicated service exec ${leaseId} ${args.name} --request-id ${requestId} --inspect`}\`.`,
117
+ code: 'DEDICATED_SERVICE_EXECUTION_OUTCOME_UNKNOWN',
118
+ exit: 1,
119
+ retryable: true,
120
+ });
121
+ }
69
122
  if (flags.json) {
70
123
  this.log(JSON.stringify(result ?? {}, null, 2));
71
124
  }
125
+ else if (flags.inspect) {
126
+ const state = execution?.receipt?.state ?? 'unknown';
127
+ const subject = execution?.operationId ?? `request ${requestId}`;
128
+ this.log(`Execution ${subject}: ${state}.`);
129
+ return;
130
+ }
72
131
  else {
73
132
  // Binary-safe: the wire contract is base64 — write the decoded bytes
74
133
  // verbatim; a debug verb that utf8-mangles or appends newlines lies
@@ -7,6 +7,7 @@ export default class HostedMachinesDestroy extends BaseCommand {
7
7
  };
8
8
  static flags: {
9
9
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'request-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
12
  };
12
13
  run(): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
+ const node_crypto_1 = require("node:crypto");
4
5
  const base_command_1 = require("../../../base-command");
5
6
  const hosted_machines_1 = require("../../../lib/hosted-machines");
6
7
  class HostedMachinesDestroy extends base_command_1.BaseCommand {
@@ -18,14 +19,18 @@ class HostedMachinesDestroy extends base_command_1.BaseCommand {
18
19
  };
19
20
  static flags = {
20
21
  workspace: core_1.Flags.string({ description: 'Workspace scope' }),
22
+ 'request-id': core_1.Flags.string({
23
+ description: 'Idempotency key. Reuse it after a lost response to inspect the same destroy request.',
24
+ }),
21
25
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
22
26
  };
23
27
  async run() {
24
28
  this.requireAuth();
25
29
  const { args, flags } = await this.parse(HostedMachinesDestroy);
30
+ const requestId = flags['request-id'] || newRequestId();
26
31
  let response;
27
32
  try {
28
- response = await (0, hosted_machines_1.destroyHostedMachine)(args.id, { workspaceId: flags.workspace });
33
+ response = await (0, hosted_machines_1.destroyHostedMachine)(args.id, { workspaceId: flags.workspace, requestId });
29
34
  }
30
35
  catch (err) {
31
36
  const message = (0, hosted_machines_1.formatHostedMachineApiError)(err, { bin: this.config.bin });
@@ -38,6 +43,11 @@ class HostedMachinesDestroy extends base_command_1.BaseCommand {
38
43
  return;
39
44
  }
40
45
  this.log(`Hosted Machine ${(0, hosted_machines_1.hostedMachineId)(response.session)} ${(0, hosted_machines_1.hostedMachineStatus)(response.session)}.`);
46
+ if (response.operation?.id)
47
+ this.log(`Operation: ${response.operation.id} (${response.operation.state}).`);
41
48
  }
42
49
  }
43
50
  exports.default = HostedMachinesDestroy;
51
+ function newRequestId() {
52
+ return `skrr-machine-destroy:${Date.now()}:${(0, node_crypto_1.randomBytes)(6).toString('hex')}`;
53
+ }
@@ -23,6 +23,7 @@ export default class HostedMachinesExec extends BaseCommand {
23
23
  cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
24
  language: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
25
25
  timeout: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ 'request-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
27
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
27
28
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
28
29
  };
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.splitExecArgv = splitExecArgv;
4
4
  const core_1 = require("@oclif/core");
5
+ const node_crypto_1 = require("node:crypto");
5
6
  const base_command_1 = require("../../../base-command");
6
7
  const shell_quote_1 = require("../../../lib/shell-quote");
7
8
  const hosted_machines_1 = require("../../../lib/hosted-machines");
@@ -47,6 +48,9 @@ class HostedMachinesExec extends base_command_1.BaseCommand {
47
48
  default: 'shell',
48
49
  }),
49
50
  timeout: core_1.Flags.string({ description: 'Execution timeout such as 30s, 5m' }),
51
+ 'request-id': core_1.Flags.string({
52
+ description: 'Idempotency key. Reuse it after a lost response; the command will not run again.',
53
+ }),
50
54
  workspace: core_1.Flags.string({ description: 'Workspace scope' }),
51
55
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
52
56
  };
@@ -91,8 +95,9 @@ class HostedMachinesExec extends base_command_1.BaseCommand {
91
95
  ...(timeoutMs ? { timeoutMs } : {}),
92
96
  };
93
97
  let response;
98
+ const requestId = flags['request-id'] || newRequestId();
94
99
  try {
95
- response = await (0, hosted_machines_1.execHostedMachine)(id, body, { workspaceId: flags.workspace });
100
+ response = await (0, hosted_machines_1.execHostedMachine)(id, body, { workspaceId: flags.workspace, requestId });
96
101
  }
97
102
  catch (err) {
98
103
  const message = (0, hosted_machines_1.formatHostedMachineApiError)(err, { bin: this.config.bin });
@@ -113,6 +118,9 @@ class HostedMachinesExec extends base_command_1.BaseCommand {
113
118
  process.stderr.write(`Note: this command resumed a paused machine — it is billing at the active rate again. ` +
114
119
  `Run \`${this.config.bin} machines hosted pause ${id}\` to park it.\n`);
115
120
  }
121
+ if (response.operation?.id) {
122
+ process.stderr.write(`Operation: ${response.operation.id} (${response.operation.state}).\n`);
123
+ }
116
124
  if (response.stdout)
117
125
  process.stdout.write(response.stdout);
118
126
  if (response.stderr)
@@ -128,3 +136,6 @@ class HostedMachinesExec extends base_command_1.BaseCommand {
128
136
  }
129
137
  }
130
138
  exports.default = HostedMachinesExec;
139
+ function newRequestId() {
140
+ return `skrr-machine-exec:${Date.now()}:${(0, node_crypto_1.randomBytes)(6).toString('hex')}`;
141
+ }
@@ -24,6 +24,7 @@ class Machines extends core_1.Command {
24
24
  this.log(' skrr machines hosted pause pause a machine');
25
25
  this.log(' skrr machines hosted resume resume a machine');
26
26
  this.log(' skrr machines hosted destroy terminate a machine');
27
+ this.log(' skrr machines hosted operation inspect a durable operation receipt');
27
28
  }
28
29
  }
29
30
  exports.default = Machines;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Inspect-only recovery after a response was lost; this never wakes a machine. */
3
+ export default class HostedMachinesOperation extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,51 @@
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 hosted_machines_1 = require("../../../lib/hosted-machines");
6
+ /** Inspect-only recovery after a response was lost; this never wakes a machine. */
7
+ class HostedMachinesOperation extends base_command_1.BaseCommand {
8
+ static description = 'Inspect a Hosted Machine operation receipt without changing the machine';
9
+ static examples = [
10
+ '<%= config.bin %> machines hosted operation <operation-id>',
11
+ '<%= config.bin %> machines hosted operation <operation-id> --json',
12
+ ];
13
+ static args = {
14
+ id: core_1.Args.string({
15
+ description: 'Hosted Machine operation id',
16
+ required: true,
17
+ ignoreStdin: true,
18
+ }),
19
+ };
20
+ static flags = {
21
+ workspace: core_1.Flags.string({ description: 'Workspace scope' }),
22
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
23
+ };
24
+ async run() {
25
+ this.requireAuth();
26
+ const { args, flags } = await this.parse(HostedMachinesOperation);
27
+ let response;
28
+ try {
29
+ response = await (0, hosted_machines_1.getHostedMachineOperation)(args.id, { workspaceId: flags.workspace });
30
+ }
31
+ catch (err) {
32
+ const message = (0, hosted_machines_1.formatHostedMachineApiError)(err, { bin: this.config.bin });
33
+ if (message)
34
+ this.error(message, { exit: 1 });
35
+ this.handleApiError(err);
36
+ }
37
+ if (flags.json) {
38
+ this.printJsonResult(response);
39
+ return;
40
+ }
41
+ const operation = response.operation;
42
+ this.log(`Operation: ${operation.id}`);
43
+ this.log(`Action: ${operation.action}`);
44
+ this.log(`State: ${operation.state}`);
45
+ if (operation.sessionId)
46
+ this.log(`Machine: ${operation.sessionId}`);
47
+ if (operation.error?.message)
48
+ this.log(`Error: ${operation.error.message}`);
49
+ }
50
+ }
51
+ exports.default = HostedMachinesOperation;
@@ -243,7 +243,7 @@ function extractArchive(archive, name, destination, overwrite) {
243
243
  if (node_fs_1.default.existsSync(destination) && !overwrite) {
244
244
  throw new Error(`Local destination already exists: ${destination}. Pass --overwrite to replace it.`);
245
245
  }
246
- const tmp = node_fs_1.default.mkdtempSync(node_path_1.default.join(node_os_1.default.tmpdir(), 'sky-machine-pull-'));
246
+ const tmp = node_fs_1.default.mkdtempSync(node_path_1.default.join(node_os_1.default.tmpdir(), 'skrr-machine-pull-'));
247
247
  try {
248
248
  const archivePath = node_path_1.default.join(tmp, 'archive.tgz');
249
249
  const extractDir = node_path_1.default.join(tmp, 'extract');
@@ -79,9 +79,11 @@ class HostedMachinesStart extends base_command_1.BaseCommand {
79
79
  : {}),
80
80
  };
81
81
  let session;
82
+ let operation;
82
83
  try {
83
84
  const response = await (0, hosted_machines_1.startHostedMachine)(body);
84
85
  session = response.session;
86
+ operation = response.operation;
85
87
  const id = (0, hosted_machines_1.hostedMachineId)(session);
86
88
  if (flags.repo) {
87
89
  session = await this.waitReadyForFollowup(id, flags.workspace, flags.interval, timeoutMs, flags.json);
@@ -149,11 +151,13 @@ class HostedMachinesStart extends base_command_1.BaseCommand {
149
151
  this.handleApiError(err);
150
152
  }
151
153
  if (flags.json) {
152
- this.log(JSON.stringify({ session }, null, 2));
154
+ this.log(JSON.stringify({ session, ...(operation ? { operation } : {}) }, null, 2));
153
155
  return;
154
156
  }
155
157
  const id = (0, hosted_machines_1.hostedMachineId)(session);
156
158
  this.log(`Hosted Machine ${id || '(unknown)'} ${(0, hosted_machines_1.hostedMachineStatus)(session)}.`);
159
+ if (operation?.id)
160
+ this.log(`Operation: ${operation.id} (${operation.state}).`);
157
161
  if (session?.egressPolicy) {
158
162
  this.log(`Network: ${session.egressPolicy} (${session.egressSource || 'source unknown'}; ${session.egressAllowHosts?.length || 0} hosts)`);
159
163
  }
@@ -189,5 +193,5 @@ class HostedMachinesStart extends base_command_1.BaseCommand {
189
193
  }
190
194
  exports.default = HostedMachinesStart;
191
195
  function newRequestId() {
192
- return `sky-machine-start:${Date.now()}:${(0, node_crypto_1.randomBytes)(6).toString('hex')}`;
196
+ return `skrr-machine-start:${Date.now()}:${(0, node_crypto_1.randomBytes)(6).toString('hex')}`;
193
197
  }
@@ -1,5 +1,7 @@
1
1
  import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
2
  export default class MemoryVersionsList extends ScopedMemoryCommand {
3
+ static autonomousCredentialPolicy: "bound-session";
4
+ static sessionReadPolicy: "memory-history-v1";
3
5
  static description: string;
4
6
  static args: {
5
7
  memory: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -4,14 +4,15 @@ const list_output_1 = require("../../../lib/list-output");
4
4
  const core_1 = require("@oclif/core");
5
5
  const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
6
6
  class MemoryVersionsList extends scoped_memory_command_1.ScopedMemoryCommand {
7
+ static autonomousCredentialPolicy = 'bound-session';
8
+ static sessionReadPolicy = 'memory-history-v1';
7
9
  static description = 'List immutable versions for one Memory topic';
8
10
  static args = { memory: core_1.Args.string({ required: true, ignoreStdin: true }) };
9
11
  static flags = { ...scoped_memory_command_1.scopedMemoryFlags, limit: core_1.Flags.integer({ default: 100 }) };
10
12
  async run() {
11
13
  this.requireAuth();
12
14
  const { args, flags } = await this.parse(MemoryVersionsList);
13
- const store = await this.resolveStore(flags);
14
- const result = await this.memoryApi(flags.agent, `/stores/${store.id}/versions${this.query(flags, { memoryId: args.memory, limit: flags.limit })}`);
15
+ const result = await this.memoryHistoryApi(flags, { memoryId: args.memory, limit: flags.limit });
15
16
  if (flags.json)
16
17
  return this.printJsonResult((0, list_output_1.listResult)(result, 'versions'));
17
18
  for (const version of result.versions)
@@ -1,5 +1,7 @@
1
1
  import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
2
  export default class MemoryVersionsShow extends ScopedMemoryCommand {
3
+ static autonomousCredentialPolicy: "bound-session";
4
+ static sessionReadPolicy: "memory-history-v1";
3
5
  static description: string;
4
6
  static args: {
5
7
  id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
5
5
  class MemoryVersionsShow extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static autonomousCredentialPolicy = 'bound-session';
7
+ static sessionReadPolicy = 'memory-history-v1';
6
8
  static description = 'Show one immutable MemoryVersion';
7
9
  static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
8
10
  static flags = scoped_memory_command_1.scopedMemoryFlags;
9
11
  async run() {
10
12
  this.requireAuth();
11
13
  const { args, flags } = await this.parse(MemoryVersionsShow);
12
- const store = await this.resolveStore(flags);
13
- const result = await this.memoryApi(flags.agent, `/stores/${store.id}/versions/${encodeURIComponent(args.id)}${this.query(flags)}`);
14
+ const result = await this.memoryHistoryApi(flags, { versionId: args.id });
14
15
  this.print(result, flags.json, `${result.id} ${result.operation}\n${JSON.stringify(result.payloadSnapshot, null, 2)}`);
15
16
  }
16
17
  }
@@ -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
+ }