@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
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.describeKnowledgeDefault = describeKnowledgeDefault;
3
4
  const core_1 = require("@oclif/core");
4
5
  const base_command_1 = require("../../../base-command");
5
6
  const commitments_1 = require("../../../lib/commitments");
@@ -10,11 +11,18 @@ const web_url_1 = require("../../../lib/web-url");
10
11
  * Binding is idempotent by design — the API answers 200 with `reused: true`
11
12
  * rather than minting a second draft, because a retried bind used to leave
12
13
  * duplicate Commitments behind (OSK-5763).
14
+ *
15
+ * `--space` binds the Pack into a Space as that Space's loop: held by the
16
+ * Space's lead unless `--agent` names another member, owned by the person
17
+ * binding, who must be the Space's execution-principal user and hold SHARE on
18
+ * it. The server refuses, and writes nothing, when the Space cannot take it.
13
19
  */
14
20
  class CommitmentsPackBind extends base_command_1.BaseCommand {
15
21
  static description = 'Create the Commitment a Pack describes (idempotent)';
16
22
  static examples = [
17
23
  '<%= config.bin %> commitments pack bind --pack pr_ci_guardian --agent <agent-id> --repository owner/repo --required-check "Pipeline Summary" --installation-id 155117997',
24
+ '<%= config.bin %> commitments pack bind --pack <pack-id> --space <space-id>',
25
+ '<%= config.bin %> commitments pack bind --pack goal_advance --space <space-id> --goal <goal-id> --interval-minutes 1440',
18
26
  ];
19
27
  static flags = {
20
28
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -25,7 +33,20 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
25
33
  'pack-version': core_1.Flags.string({
26
34
  description: 'Pack version (defaults to the latest installed)',
27
35
  }),
28
- agent: core_1.Flags.string({ description: 'Agent ID that will hold the Commitment', required: true }),
36
+ agent: core_1.Flags.string({
37
+ description: 'Agent ID that will hold the Commitment (with --space, defaults to the Space lead)',
38
+ }),
39
+ space: core_1.Flags.string({
40
+ description: "Space ID to bind the Pack into as that Space's loop (you must be its execution-principal user)",
41
+ }),
42
+ goal: core_1.Flags.string({
43
+ description: 'Goal ID the Pack advances (goal_advance; the Goal must be in --space)',
44
+ }),
45
+ 'interval-minutes': core_1.Flags.integer({
46
+ description: "How often a goal_advance loop looks when nothing wakes it, in minutes (default one day; the Goal's events wake it sooner)",
47
+ min: 1,
48
+ max: 30 * 24 * 60,
49
+ }),
29
50
  repository: core_1.Flags.string({ description: 'Repository the Pack binds to, as owner/repo' }),
30
51
  'required-check': core_1.Flags.string({
31
52
  description: 'Required CI check name (repeatable). Must match a real Check Run name.',
@@ -47,20 +68,27 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
47
68
  const { flags } = await this.parse(CommitmentsPackBind);
48
69
  const requiredChecks = (flags['required-check'] ?? []).map((c) => c.trim()).filter(Boolean);
49
70
  const grants = (flags.grant ?? []).map((g) => g.trim()).filter(Boolean);
50
- // The API rejects both-or-neither too; failing here costs no round trip and
51
- // names the two flags the caller actually typed.
71
+ if (!flags.agent && !flags.space) {
72
+ this.error('Pass --agent (the Agent that holds it) or --space (bind it into a Space).', {
73
+ exit: 1,
74
+ });
75
+ }
76
+ // The API rejects both too; failing here costs no round trip and names the
77
+ // two flags the caller actually typed. Whether a Grant is needed at all is
78
+ // the Pack's plan to say (PR / CI Guardian needs one; most Packs do not),
79
+ // so neither is the server's to refuse.
52
80
  if (flags['installation-id'] && grants.length) {
53
81
  this.error('Choose either --installation-id or --grant, not both.', { exit: 1 });
54
82
  }
55
- if (!flags['installation-id'] && !grants.length) {
56
- this.error('Pass --installation-id (GitHub App) or at least one --grant.', { exit: 1 });
57
- }
58
83
  let result;
59
84
  try {
60
85
  result = await commitments_1.commitmentPackApi.bind({
61
86
  packId: flags.pack,
62
87
  ...(flags['pack-version'] ? { version: flags['pack-version'] } : {}),
63
- agentId: flags.agent,
88
+ ...(flags.agent ? { agentId: flags.agent } : {}),
89
+ ...(flags.space ? { spaceId: flags.space } : {}),
90
+ ...(flags.goal ? { goalId: flags.goal } : {}),
91
+ ...(flags['interval-minutes'] ? { intervalMs: flags['interval-minutes'] * 60_000 } : {}),
64
92
  ...(flags.repository ? { repository: flags.repository } : {}),
65
93
  ...(requiredChecks.length ? { requiredChecks } : {}),
66
94
  ...(flags['installation-id'] ? { installationId: flags['installation-id'] } : {}),
@@ -76,7 +104,18 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
76
104
  this.log(JSON.stringify((0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, result), null, 2));
77
105
  return;
78
106
  }
79
- this.log(`${result.reused ? 'Reused existing' : 'Created'} commitment ${result.commitment?.id} from ${result.pack?.id}@${result.pack?.version}`);
107
+ this.log(`${result.reused ? 'Reused existing' : 'Created'} commitment ${result.commitment?.id} from ${result.pack?.id ?? result.plan?.pack?.id}@${result.pack?.version ?? result.plan?.pack?.version}`);
108
+ const loop = result.spaceLoop;
109
+ if (loop) {
110
+ const holder = loop.holder === 'space_lead' ? ' (the Space lead)' : '';
111
+ this.log(`Space loop: ${loop.spaceId}, held by ${loop.agentId}${holder}`);
112
+ const knowledge = describeKnowledgeDefault(loop.knowledgeScope);
113
+ if (knowledge)
114
+ this.log(`Space knowledge: ${knowledge}`);
115
+ }
116
+ for (const link of result.workLinks ?? []) {
117
+ this.log(`Linked ${link.targetType} ${link.targetId} (${link.roles.join(', ')})`);
118
+ }
80
119
  const { url } = (0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, {
81
120
  id: result.commitment?.id,
82
121
  });
@@ -86,3 +125,22 @@ class CommitmentsPackBind extends base_command_1.BaseCommand {
86
125
  }
87
126
  }
88
127
  exports.default = CommitmentsPackBind;
128
+ /**
129
+ * The Space knowledge default a loop's home link reports
130
+ * (`CommitmentSpaceLoop.KNOWLEDGE_DEFAULT_OUTCOMES`), in words. Empty for an
131
+ * outcome this CLI does not know, rather than a guess.
132
+ */
133
+ function describeKnowledgeDefault(scope) {
134
+ switch (scope?.default) {
135
+ case 'applied':
136
+ return "on — the loop reads this Space's memory and wiki";
137
+ case 'owner_declared':
138
+ return `${scope.enabled ? 'on' : 'off'}, as its owner had already set it`;
139
+ case 'owner_decision_required':
140
+ return 'off until its owner turns it on (it was bound with an Agent or token credential)';
141
+ case 'not_applied':
142
+ return 'off — the default could not be written, so it stays off until its owner turns it on';
143
+ default:
144
+ return '';
145
+ }
146
+ }
@@ -13,7 +13,10 @@ export default class CommitmentsPackPlan extends BaseCommand {
13
13
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
14
  pack: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
15
  'pack-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
- agent: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ space: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ goal: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'interval-minutes': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
20
  repository: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
21
  'required-check': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
22
  'installation-id': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -14,6 +14,8 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
14
14
  static description = 'Draft the Commitment a Pack would create, without creating it (read-only)';
15
15
  static examples = [
16
16
  '<%= config.bin %> commitments pack plan --pack pr_ci_guardian --agent <agent-id> --repository owner/repo --required-check "Pipeline Summary"',
17
+ '<%= config.bin %> commitments pack plan --pack <pack-id> --space <space-id>',
18
+ '<%= config.bin %> commitments pack plan --pack goal_advance --space <space-id> --goal <goal-id>',
17
19
  ];
18
20
  static flags = {
19
21
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -24,7 +26,20 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
24
26
  'pack-version': core_1.Flags.string({
25
27
  description: 'Pack version (defaults to the latest installed)',
26
28
  }),
27
- agent: core_1.Flags.string({ description: 'Agent ID that will hold the Commitment', required: true }),
29
+ agent: core_1.Flags.string({
30
+ description: 'Agent ID that will hold the Commitment (with --space, defaults to the Space lead)',
31
+ }),
32
+ space: core_1.Flags.string({
33
+ description: "Space ID to bind the Pack into as that Space's loop",
34
+ }),
35
+ goal: core_1.Flags.string({
36
+ description: 'Goal ID the Pack advances (goal_advance; the Goal must be in --space)',
37
+ }),
38
+ 'interval-minutes': core_1.Flags.integer({
39
+ description: "How often a goal_advance loop looks when nothing wakes it, in minutes (default one day; the Goal's events wake it sooner)",
40
+ min: 1,
41
+ max: 30 * 24 * 60,
42
+ }),
28
43
  repository: core_1.Flags.string({ description: 'Repository the Pack binds to, as owner/repo' }),
29
44
  'required-check': core_1.Flags.string({
30
45
  description: 'Required CI check name (repeatable). Must match a real Check Run name.',
@@ -38,12 +53,20 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
38
53
  // Check NAMES are free text and legitimately contain commas, so they are
39
54
  // never comma-split the way an id list would be.
40
55
  const requiredChecks = (flags['required-check'] ?? []).map((c) => c.trim()).filter(Boolean);
56
+ if (!flags.agent && !flags.space) {
57
+ this.error('Pass --agent (the Agent that holds it) or --space (bind it into a Space).', {
58
+ exit: 1,
59
+ });
60
+ }
41
61
  let result;
42
62
  try {
43
63
  result = await commitments_1.commitmentPackApi.plan({
44
64
  packId: flags.pack,
45
65
  ...(flags['pack-version'] ? { version: flags['pack-version'] } : {}),
46
- agentId: flags.agent,
66
+ ...(flags.agent ? { agentId: flags.agent } : {}),
67
+ ...(flags.space ? { spaceId: flags.space } : {}),
68
+ ...(flags.goal ? { goalId: flags.goal } : {}),
69
+ ...(flags['interval-minutes'] ? { intervalMs: flags['interval-minutes'] * 60_000 } : {}),
47
70
  ...(flags.repository ? { repository: flags.repository } : {}),
48
71
  ...(requiredChecks.length ? { requiredChecks } : {}),
49
72
  ...(flags['installation-id'] ? { installationId: flags['installation-id'] } : {}),
@@ -59,6 +82,11 @@ class CommitmentsPackPlan extends base_command_1.BaseCommand {
59
82
  }
60
83
  this.log(`Pack: ${result.pack?.id}@${result.pack?.version}`);
61
84
  this.log(`planDigest: ${result.planDigest}`);
85
+ const placement = result.spacePlacement;
86
+ if (placement) {
87
+ const holder = placement.holder === 'space_lead' ? ' (the Space lead)' : '';
88
+ this.log(`Space loop: ${placement.spaceId}, held by ${placement.agentId}${holder}`);
89
+ }
62
90
  this.log('\nNothing was created. Pass this digest to `skrr commitments pack bind --plan-digest`.');
63
91
  }
64
92
  }
@@ -32,7 +32,7 @@ const commitments_1 = require("../../lib/commitments");
32
32
  */
33
33
  class CommitmentsUpdate extends base_command_1.BaseCommand {
34
34
  static description = "Update a commitment's contract (title, target, cadence, sources). A cadence is manual, an interval or daily clock times; " +
35
- 'it has no weekday, holiday, business-day or trading-calendar fields';
35
+ 'activeHours and daysOfWeek in --from-json select hours and weekdays. No holiday, business-day or trading-calendar fields';
36
36
  static examples = [
37
37
  '<%= config.bin %> commitments update <commitment-id> --cadence 12h',
38
38
  '<%= config.bin %> commitments update <commitment-id> --title "Ship v2 (Q3)" --outcome "v2 is live for all users"',
@@ -43,7 +43,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
43
43
  <%= config.bin %> commitments show <commitment-id> --json
44
44
  cat > commitment-patch.json <<'JSON'
45
45
  {
46
- "cadence": { "mode": "daily", "times": ["09:15", "17:45"], "timezone": "Asia/Shanghai" },
46
+ "cadence": { "mode": "interval", "intervalMs": 3600000, "activeHours": { "start": "09:00", "end": "22:00" }, "daysOfWeek": ["mon", "tue", "wed", "thu", "fri"], "timezone": "Asia/Shanghai" },
47
47
  "policy": { "executionBudget": { "maxObservationRunsPerDay": 0 } }
48
48
  }
49
49
  JSON
@@ -350,6 +350,12 @@ JSON
350
350
  delete cadence.jitterRatio;
351
351
  }
352
352
  }
353
+ if (!['interval', 'daily', 'event_plus_interval'].includes(String(cadence.mode)) &&
354
+ !Object.hasOwn(authoredCadence ?? {}, 'activeHours'))
355
+ delete cadence.activeHours;
356
+ if (!['interval', 'event_plus_interval', 'daily'].includes(String(cadence.mode)) &&
357
+ !Object.hasOwn(authoredCadence ?? {}, 'daysOfWeek'))
358
+ delete cadence.daysOfWeek;
353
359
  payload.cadence = cadence;
354
360
  if (payload.expectedVersion === undefined && current?.version !== undefined) {
355
361
  payload.expectedVersion = current.version;
@@ -45,7 +45,7 @@ class Completion extends base_command_1.BaseCommand {
45
45
  const { args, flags } = await this.parse(Completion);
46
46
  // This is intentionally best-effort. `completion` is useful before login
47
47
  // and when offline; static manifest-derived suggestions still work either way.
48
- await (0, completion_index_1.refreshCompletionIndex)(this.config.cacheDir);
48
+ await (0, completion_index_1.refreshCompletionIndex)(this.config.cacheDir, this.completionCacheScope());
49
49
  if (flags['refresh-cache'])
50
50
  return;
51
51
  const shell = args.shell;
@@ -19,7 +19,7 @@ class CompletionValues extends base_command_1.BaseCommand {
19
19
  async run() {
20
20
  const { args } = await this.parse(CompletionValues);
21
21
  // Never log or fail here: shell command substitution treats output as data.
22
- const values = await (0, completion_index_1.completionCandidates)(this.config.cacheDir, args.kind, args.query ?? '');
22
+ const values = await (0, completion_index_1.completionCandidates)(this.config.cacheDir, this.completionCacheScope(), args.kind, args.query ?? '');
23
23
  if (values.length > 0)
24
24
  this.log(values.join('\n'));
25
25
  }
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseAudio extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseAudio extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Configure optional computer audio with status, enable or disable';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use audio --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'audio';
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseBrowser extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  static examples: string[];
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseBrowser extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Configure original Chrome, inspect its extension, and manage its native host';
6
7
  static description = 'Actions: status, enable, disable, setup, update, verify. Setup uses the original LCU installer: private relay files belong to the selected skrr profile, while native-host registration is shared by the desktop account and supported Chromium browsers. Verify initializes the original MCP schema without browser actions. Flags are forwarded unchanged; run `skrrd computer-use browser --help` for all options.';
7
8
  static examples = [
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseDisable extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseDisable extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Revoke Computer Use consent and stop the active controller';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use disable --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'disable';
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseEnable extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseEnable extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Enable Computer Use locally; --cloud-agents separately grants cloud Agent access';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use enable --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'enable';
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUse extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: undefined;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUse extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Install and control optional Computer Use on this machine';
6
7
  static description = 'Computer Use uses your installed official app runtime. Run `skrr computer-use status`; use `skrrd computer-use --help` for all options, including --profile and --json.';
7
8
  action = undefined;
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseInstall extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseInstall extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Install a pinned thin release from an explicit local archive and trusted SHA-256';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use install --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'install';
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseRecover extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseRecover extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Retry runtime recovery only after confirmed execution cleanup';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use recover --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'recover';
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseStatus extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseStatus extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Show configuration and live Computer Use availability without desktop interaction';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use status --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'status';
@@ -1,5 +1,6 @@
1
1
  import { ComputerUseCommand } from '../../lib/computer-use';
2
2
  export default class ComputerUseStop extends ComputerUseCommand {
3
+ static strict: boolean;
3
4
  static summary: string;
4
5
  static description: string;
5
6
  protected action: string;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const computer_use_1 = require("../../lib/computer-use");
4
4
  class ComputerUseStop extends computer_use_1.ComputerUseCommand {
5
+ static strict = false;
5
6
  static summary = 'Stop the running Computer Use controller and confirm cleanup';
6
7
  static description = 'Flags are forwarded unchanged. Run `skrrd computer-use stop --help` for options; --profile selects the local daemon profile and --json emits one stable document.';
7
8
  action = 'stop';
@@ -26,9 +26,11 @@ class Context extends base_command_1.BaseCommand {
26
26
  async run() {
27
27
  const { flags } = await this.parse(Context);
28
28
  const runtime = (0, runtime_context_1.readRuntimeContext)();
29
+ const unboundRuntime = !runtime.agent?.boundToSession;
30
+ const authResolution = this.authResolution();
29
31
  // The task block must answer the same question an id-less `skrr tasks …`
30
32
  // does, or a reader concludes "no task" while the next command it runs
31
- // acts on the checked-out `oversky/task/<REF>` branch. The resolver's
33
+ // acts on the checked-out canonical task branch. The resolver's
32
34
  // precedence is preserved exactly: runtime-bound sources first, the git
33
35
  // branch only after them — a daemon-bound task must not silently become
34
36
  // whichever branch is checked out.
@@ -55,6 +57,8 @@ class Context extends base_command_1.BaseCommand {
55
57
  node: process.version,
56
58
  },
57
59
  server: this.cliConfig.baseURL,
60
+ // Additive provenance: `server` remains a string for existing scripts.
61
+ serverSource: authResolution.server.source,
58
62
  profile: (0, keychain_1.getActiveProfile)(),
59
63
  config: {
60
64
  path: (0, config_1.getConfigPath)(),
@@ -66,6 +70,7 @@ class Context extends base_command_1.BaseCommand {
66
70
  tokenKind: this.resolvedCredential?.kind ?? null,
67
71
  account,
68
72
  accountError,
73
+ resolution: authResolution,
69
74
  },
70
75
  /**
71
76
  * The workspace this machine works in.
@@ -94,19 +99,20 @@ class Context extends base_command_1.BaseCommand {
94
99
  writeAttribution: (0, task_write_attribution_1.runtimeWriteAttribution)(runtime),
95
100
  warnings: [
96
101
  ...runtime.warnings,
97
- ...(!runtime.agent?.boundToSession ? [(0, task_write_attribution_1.runtimeWriteAttribution)(runtime).notice] : []),
102
+ ...(unboundRuntime ? [(0, task_write_attribution_1.runtimeWriteAttribution)(runtime).notice] : []),
98
103
  ],
104
+ setup: unboundRuntime ? { agentRuntime: (0, task_write_attribution_1.unboundRuntimeSetup)(this.config.bin) } : null,
99
105
  agent: runtime.agent,
100
106
  task: { ...runtime.task, resolved: resolvedTask },
101
107
  conversation: runtime.conversation,
102
- recommendations: recommendationsFor(runtime),
108
+ recommendations: recommendationsFor(runtime, this.config.bin),
103
109
  };
104
110
  if (flags.json) {
105
111
  this.log(JSON.stringify(payload, null, 2));
106
112
  return;
107
113
  }
108
114
  this.log(`Runtime: ${runtime.kind}`);
109
- this.log(`Server: ${this.cliConfig.baseURL}`);
115
+ this.log(`Server: ${authResolution.server.origin ?? 'configured server (invalid URL)'} (${payload.serverSource})`);
110
116
  this.log(
111
117
  // "Workspace", never "Space" — they are different things in this product
112
118
  // and this whole workstream exists because the two got conflated.
@@ -126,8 +132,8 @@ class Context extends base_command_1.BaseCommand {
126
132
  this.log(`Task: ${runtime.task.identifier ?? resolvedTask.id} (${resolvedTask.source})`);
127
133
  }
128
134
  this.log(`Task writes: ${payload.writeAttribution.notice}`);
129
- if (!runtime.agent?.boundToSession)
130
- this.log(task_write_attribution_1.AGENT_BINDING_GUIDANCE);
135
+ if (unboundRuntime)
136
+ this.log((0, task_write_attribution_1.agentBindingGuidance)(this.config.bin));
131
137
  if (runtime.warnings.length > 0) {
132
138
  this.log('Warnings:');
133
139
  for (const warning of runtime.warnings)
@@ -136,12 +142,11 @@ class Context extends base_command_1.BaseCommand {
136
142
  }
137
143
  }
138
144
  exports.default = Context;
139
- function recommendationsFor(runtime) {
145
+ function recommendationsFor(runtime, bin) {
140
146
  const recommendations = [];
141
- if (!runtime.agent) {
142
- recommendations.push(task_write_attribution_1.AGENT_BINDING_GUIDANCE);
143
- }
144
- else if (!runtime.agent.canonical) {
147
+ if (!runtime.agent?.boundToSession)
148
+ recommendations.push((0, task_write_attribution_1.agentBindingGuidance)(bin));
149
+ if (runtime.agent && !runtime.agent.canonical) {
145
150
  recommendations.push('Prefer OVERSKY_SESSION_AGENT_ID over legacy OVERSKY_AGENT_ID in daemon runtimes.');
146
151
  }
147
152
  if (runtime.isDaemonSession && !runtime.session.requestId) {
@@ -49,7 +49,7 @@ class ConvosRecovery extends base_command_1.BaseCommand {
49
49
  this.handleApiError(error);
50
50
  }
51
51
  if (flags.json) {
52
- this.log(JSON.stringify(result, null, 2));
52
+ this.printJsonResult(result);
53
53
  return;
54
54
  }
55
55
  if (args.action === 'list') {
@@ -0,0 +1,9 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class DaemonDiagnostics extends Command {
3
+ static aliases: string[];
4
+ static summary: string;
5
+ static description: string;
6
+ static strict: boolean;
7
+ static examples: string[];
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const exec_runtime_binary_1 = require("../../lib/exec-runtime-binary");
5
+ class DaemonDiagnostics extends core_1.Command {
6
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
7
+ // whole topic, and without a per-command alias only the bare topic
8
+ // resolved: every subcommand under it failed.
9
+ static aliases = ['daemons:diagnostics'];
10
+ static summary = 'Write a support bundle (status, logs, run history) as one text file, with secrets masked';
11
+ static description = (0, exec_runtime_binary_1.forwardedFlagsNote)('diagnostics');
12
+ static strict = false; // forward all args verbatim — see run()
13
+ static examples = [
14
+ '<%= config.bin %> daemon diagnostics',
15
+ '<%= config.bin %> daemon diagnostics --lines 1000',
16
+ '<%= config.bin %> daemon diagnostics --out -',
17
+ '<%= config.bin %> daemon diagnostics --profile work',
18
+ ];
19
+ async run() {
20
+ // The bundle is what answers "send me your logs", so it is reached for when
21
+ // something is already wrong — often on a machine whose runtime has not been
22
+ // updated since before the verb existed. A bare forward would then be
23
+ // unsafe: a stale runtime treats a subcommand it does not know as `start`,
24
+ // which collides with the healthy daemon's singleton lock and reports an
25
+ // alarming startup failure instead of the real cause. So the runtime's
26
+ // top-level help is read first (it starts nothing), and only a runtime that
27
+ // positively lacks the verb is refused; one whose help cannot be read is
28
+ // forwarded to, as every other wrapper does.
29
+ //
30
+ // `this.argv`, NOT `this.parse()`: `strict = false` relaxes POSITIONAL arity
31
+ // and oclif still rejects any flag this command has not declared, which
32
+ // would make `--out` and `--lines` unreachable (OSK-296).
33
+ const argv = this.argv;
34
+ try {
35
+ if ((await (0, exec_runtime_binary_1.runtimeBinarySupportsSubcommand)('diagnostics')) === false) {
36
+ this.error('The installed skrr background service is older than this skrr CLI and has no ' +
37
+ '`diagnostics` command. Update it with `skrr daemon update`, then rerun ' +
38
+ '`skrr daemon diagnostics`. Until then `skrr daemon logs` prints its recent log; ' +
39
+ 'do not stop a healthy running daemon to work around this.', { exit: 2 });
40
+ }
41
+ const code = await (0, exec_runtime_binary_1.execRuntimeBinary)(['diagnostics', ...argv]);
42
+ this.exit(code);
43
+ }
44
+ catch (err) {
45
+ if (err.message === 'runtime-binary-not-installed') {
46
+ this.log((0, exec_runtime_binary_1.notInstalledMessage)());
47
+ this.exit(127);
48
+ }
49
+ throw err;
50
+ }
51
+ }
52
+ }
53
+ exports.default = DaemonDiagnostics;
@@ -28,6 +28,7 @@ class Daemon extends core_1.Command {
28
28
  '<%= config.bin %> daemon stop',
29
29
  '<%= config.bin %> daemon update',
30
30
  '<%= config.bin %> daemon logs',
31
+ '<%= config.bin %> daemon diagnostics',
31
32
  '<%= config.bin %> daemon recover-offline-queue --apply',
32
33
  '<%= config.bin %> daemon usage --refresh',
33
34
  '<%= config.bin %> daemon byok status',
@@ -49,6 +50,7 @@ class Daemon extends core_1.Command {
49
50
  this.log(' skrr daemon status — show running state and config');
50
51
  this.log(' skrr daemon config — set config, e.g. a tool category: --mode bash=manual');
51
52
  this.log(' skrr daemon logs — tail recent daemon logs');
53
+ this.log(' skrr daemon diagnostics — write a support bundle (status, logs) to send with a bug report');
52
54
  this.log(' skrr daemon recover-offline-queue — restore recoverable offline WALs');
53
55
  this.log(' skrr daemon usage — show local Claude Code and Codex usage limits');
54
56
  this.log(' skrr daemon byok — manage local BYOK Keychain credentials');
@@ -0,0 +1,15 @@
1
+ import { DaemonMaintenanceCommand } from '../../../lib/daemon-maintenance-command';
2
+ export default class DaemonMaintenanceAttest extends DaemonMaintenanceCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ machine: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ ready: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ proceed: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
+ generation: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ };
14
+ run(): Promise<void>;
15
+ }