@skrr-ai/cli 0.1.92 → 0.1.94

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 (323) hide show
  1. package/dist/base-command.d.ts +44 -0
  2. package/dist/base-command.js +96 -0
  3. package/dist/commands/agents/badge.d.ts +41 -0
  4. package/dist/commands/agents/badge.js +158 -0
  5. package/dist/commands/agents/create.d.ts +24 -0
  6. package/dist/commands/agents/create.js +212 -0
  7. package/dist/commands/agents/embed.d.ts +20 -0
  8. package/dist/commands/agents/embed.js +61 -0
  9. package/dist/commands/agents/operating-plan.d.ts +11 -0
  10. package/dist/commands/agents/operating-plan.js +54 -0
  11. package/dist/commands/agents/roles/example.d.ts +11 -0
  12. package/dist/commands/agents/roles/example.js +30 -0
  13. package/dist/commands/{commitments/mode.d.ts → agents/roles/export.d.ts} +5 -5
  14. package/dist/commands/agents/roles/export.js +81 -0
  15. package/dist/commands/agents/roles/install.d.ts +12 -0
  16. package/dist/commands/agents/roles/install.js +48 -0
  17. package/dist/commands/agents/roles/list.d.ts +11 -0
  18. package/dist/commands/agents/roles/list.js +36 -0
  19. package/dist/commands/agents/roles/preview.d.ts +14 -0
  20. package/dist/commands/agents/roles/preview.js +49 -0
  21. package/dist/commands/agents/roles/withdraw.d.ts +13 -0
  22. package/dist/commands/agents/roles/withdraw.js +43 -0
  23. package/dist/commands/agents/share.d.ts +27 -0
  24. package/dist/commands/agents/share.js +100 -0
  25. package/dist/commands/agents/vanity.d.ts +21 -0
  26. package/dist/commands/agents/vanity.js +77 -0
  27. package/dist/commands/agents/visibility.d.ts +21 -1
  28. package/dist/commands/agents/visibility.js +112 -0
  29. package/dist/commands/commands.d.ts +1 -0
  30. package/dist/commands/commands.js +22 -9
  31. package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.d.ts +5 -7
  32. package/dist/commands/commitments/{autonomy-requests → cadence-requests}/decide.js +13 -15
  33. package/dist/commands/commitments/cost.d.ts +1 -1
  34. package/dist/commands/commitments/cost.js +1 -1
  35. package/dist/commands/commitments/create.d.ts +0 -7
  36. package/dist/commands/commitments/create.js +9 -98
  37. package/dist/commands/commitments/delivery.js +3 -21
  38. package/dist/commands/commitments/doctor.js +28 -27
  39. package/dist/commands/commitments/effective-policy.js +5 -36
  40. package/dist/commands/commitments/evaluations.d.ts +15 -0
  41. package/dist/commands/commitments/evaluations.js +54 -0
  42. package/dist/commands/commitments/pack/activate.d.ts +11 -0
  43. package/dist/commands/commitments/pack/activate.js +22 -0
  44. package/dist/commands/commitments/pack/bind.js +1 -1
  45. package/dist/commands/commitments/remediate.js +2 -5
  46. package/dist/commands/commitments/show.js +1 -1
  47. package/dist/commands/commitments/update.js +9 -9
  48. package/dist/commands/commitments/wake-capabilities.d.ts +1 -3
  49. package/dist/commands/commitments/wake-capabilities.js +5 -21
  50. package/dist/commands/earnings/attributions.d.ts +17 -0
  51. package/dist/commands/earnings/attributions.js +82 -0
  52. package/dist/commands/earnings/index.js +2 -1
  53. package/dist/commands/generate-recovery-code.js +4 -3
  54. package/dist/commands/github/allow-tools.d.ts +1 -0
  55. package/dist/commands/github/app/install.d.ts +1 -0
  56. package/dist/commands/github/app/status.d.ts +1 -0
  57. package/dist/commands/github/connect.d.ts +1 -0
  58. package/dist/commands/github/connections.d.ts +1 -0
  59. package/dist/commands/github/disconnect.d.ts +1 -0
  60. package/dist/commands/github/finalize.d.ts +1 -0
  61. package/dist/commands/github/reconnect.d.ts +1 -0
  62. package/dist/commands/github/run.d.ts +1 -0
  63. package/dist/commands/github/tools.d.ts +1 -0
  64. package/dist/commands/integrations/connections/connect.d.ts +1 -0
  65. package/dist/commands/integrations/connections/disconnect.d.ts +1 -0
  66. package/dist/commands/integrations/connections/finalize.d.ts +1 -0
  67. package/dist/commands/integrations/connections/list.d.ts +1 -0
  68. package/dist/commands/integrations/connections/reconnect.d.ts +1 -0
  69. package/dist/commands/integrations/execute.d.ts +1 -0
  70. package/dist/commands/integrations/search.d.ts +1 -0
  71. package/dist/commands/integrations/toolkits.d.ts +1 -0
  72. package/dist/commands/integrations/tools/allow.d.ts +1 -0
  73. package/dist/commands/integrations/tools/list.d.ts +1 -0
  74. package/dist/commands/login.js +12 -0
  75. package/dist/commands/machines/dedicated/logs.d.ts +19 -0
  76. package/dist/commands/machines/dedicated/logs.js +103 -0
  77. package/dist/commands/machines/dedicated/power/set.js +1 -1
  78. package/dist/commands/open.d.ts +24 -0
  79. package/dist/commands/open.js +74 -0
  80. package/dist/commands/projects/archive.d.ts +1 -0
  81. package/dist/commands/projects/archive.js +23 -0
  82. package/dist/commands/projects/delete.d.ts +1 -0
  83. package/dist/commands/projects/delete.js +23 -0
  84. package/dist/commands/projects/list.d.ts +3 -0
  85. package/dist/commands/projects/list.js +12 -2
  86. package/dist/commands/spaces/actions/add.js +4 -3
  87. package/dist/commands/spaces/actions/available.js +3 -2
  88. package/dist/commands/spaces/actions/list.js +5 -4
  89. package/dist/commands/spaces/actions/replace.js +6 -5
  90. package/dist/commands/spaces/archive.js +3 -2
  91. package/dist/commands/spaces/auto-executor/preview.js +4 -3
  92. package/dist/commands/spaces/auto-executor/run.js +4 -3
  93. package/dist/commands/spaces/auto-executor/runs.js +3 -2
  94. package/dist/commands/spaces/auto-executor/update.js +4 -3
  95. package/dist/commands/spaces/bootstrap.js +3 -2
  96. package/dist/commands/spaces/briefs/delete.js +3 -2
  97. package/dist/commands/spaces/briefs/get.js +3 -2
  98. package/dist/commands/spaces/briefs/list.js +3 -2
  99. package/dist/commands/spaces/briefs/set.js +5 -4
  100. package/dist/commands/spaces/capacity.js +5 -4
  101. package/dist/commands/spaces/conversations.js +3 -2
  102. package/dist/commands/spaces/cycles/create.js +3 -2
  103. package/dist/commands/spaces/cycles/graph.js +2 -1
  104. package/dist/commands/spaces/cycles/list.js +3 -2
  105. package/dist/commands/spaces/cycles/settings.js +4 -3
  106. package/dist/commands/spaces/cycles/show.js +3 -2
  107. package/dist/commands/spaces/cycles/update.js +3 -2
  108. package/dist/commands/spaces/delete.js +4 -3
  109. package/dist/commands/spaces/expertise-suggestions.js +4 -3
  110. package/dist/commands/spaces/files/delete.js +3 -2
  111. package/dist/commands/spaces/files/folders/create.js +3 -2
  112. package/dist/commands/spaces/files/folders/delete.js +3 -2
  113. package/dist/commands/spaces/files/folders/list.js +3 -2
  114. package/dist/commands/spaces/files/folders/update.js +3 -2
  115. package/dist/commands/spaces/files/list.js +3 -2
  116. package/dist/commands/spaces/files/move.js +3 -2
  117. package/dist/commands/spaces/files/rename.js +3 -2
  118. package/dist/commands/spaces/files/upload.js +6 -5
  119. package/dist/commands/spaces/github-automations/set.js +3 -2
  120. package/dist/commands/spaces/github-automations/show.js +3 -2
  121. package/dist/commands/spaces/goals.js +2 -1
  122. package/dist/commands/spaces/heartbeats/create.js +4 -3
  123. package/dist/commands/spaces/heartbeats/delete.js +4 -3
  124. package/dist/commands/spaces/heartbeats/list.js +4 -3
  125. package/dist/commands/spaces/heartbeats/status.js +3 -2
  126. package/dist/commands/spaces/heartbeats/update.js +4 -3
  127. package/dist/commands/spaces/insights.js +5 -4
  128. package/dist/commands/spaces/labels/add.js +4 -3
  129. package/dist/commands/spaces/labels/list.js +2 -1
  130. package/dist/commands/spaces/labels/remove.js +4 -3
  131. package/dist/commands/spaces/list.d.ts +3 -0
  132. package/dist/commands/spaces/list.js +11 -2
  133. package/dist/commands/spaces/live/cards/create.js +3 -2
  134. package/dist/commands/spaces/live/cards/list.js +3 -2
  135. package/dist/commands/spaces/live/cards/reorder.js +7 -2
  136. package/dist/commands/spaces/live/scene.js +4 -3
  137. package/dist/commands/spaces/members/add.js +7 -6
  138. package/dist/commands/spaces/members/list.js +4 -3
  139. package/dist/commands/spaces/members/remove.js +7 -6
  140. package/dist/commands/spaces/move.js +3 -2
  141. package/dist/commands/spaces/pin.js +5 -4
  142. package/dist/commands/spaces/preferences/show.js +4 -3
  143. package/dist/commands/spaces/preferences/tabs.js +4 -3
  144. package/dist/commands/spaces/revisions.js +3 -2
  145. package/dist/commands/spaces/room/ensure.js +5 -4
  146. package/dist/commands/spaces/room/messages.js +3 -2
  147. package/dist/commands/spaces/room/show.js +5 -4
  148. package/dist/commands/spaces/skills/add.js +4 -3
  149. package/dist/commands/spaces/skills/list.js +3 -2
  150. package/dist/commands/spaces/skills/pin.js +4 -3
  151. package/dist/commands/spaces/skills/remove.js +4 -3
  152. package/dist/commands/spaces/snapshot.js +3 -2
  153. package/dist/commands/spaces/states/archive.js +3 -2
  154. package/dist/commands/spaces/states/create.js +3 -2
  155. package/dist/commands/spaces/states/list.js +3 -2
  156. package/dist/commands/spaces/states/reorder.js +2 -1
  157. package/dist/commands/spaces/states/update.js +3 -2
  158. package/dist/commands/spaces/summary.js +4 -3
  159. package/dist/commands/spaces/tasks.d.ts +3 -0
  160. package/dist/commands/spaces/tasks.js +14 -3
  161. package/dist/commands/spaces/triggers/delete.js +5 -4
  162. package/dist/commands/spaces/triggers/set.js +4 -3
  163. package/dist/commands/spaces/triggers/show.js +4 -3
  164. package/dist/commands/spaces/unarchive.js +3 -2
  165. package/dist/commands/spaces/update.js +5 -4
  166. package/dist/commands/spaces/views/create.js +3 -2
  167. package/dist/commands/spaces/views/list.js +3 -2
  168. package/dist/commands/spaces/views/reorder.js +6 -3
  169. package/dist/commands/spaces/views/subscribe.js +2 -1
  170. package/dist/commands/spaces/views/subscriptions.js +1 -0
  171. package/dist/commands/spaces/views/unsubscribe.js +2 -1
  172. package/dist/commands/spaces/widgets/add.js +4 -3
  173. package/dist/commands/spaces/widgets/list.js +3 -2
  174. package/dist/commands/spaces/widgets/remove.js +5 -4
  175. package/dist/commands/spaces/work-graph.js +2 -1
  176. package/dist/commands/store/install.d.ts +1 -1
  177. package/dist/commands/store/install.js +24 -8
  178. package/dist/commands/store/show.d.ts +25 -0
  179. package/dist/commands/store/show.js +203 -0
  180. package/dist/commands/store/stats.d.ts +33 -0
  181. package/dist/commands/store/stats.js +258 -0
  182. package/dist/commands/tasks/actions/attach.js +1 -1
  183. package/dist/commands/tasks/actions/detach.js +4 -3
  184. package/dist/commands/tasks/activity.js +3 -2
  185. package/dist/commands/tasks/ancestors.js +2 -1
  186. package/dist/commands/tasks/approvals/create.js +2 -1
  187. package/dist/commands/tasks/approvals/delete.js +3 -2
  188. package/dist/commands/tasks/approvals/list.js +5 -4
  189. package/dist/commands/tasks/approvals/resolve.js +2 -1
  190. package/dist/commands/tasks/archive.js +3 -2
  191. package/dist/commands/tasks/assign.js +4 -3
  192. package/dist/commands/tasks/attachments/delete.js +3 -2
  193. package/dist/commands/tasks/attachments/download.d.ts +1 -0
  194. package/dist/commands/tasks/attachments/download.js +20 -1
  195. package/dist/commands/tasks/attachments/list.js +2 -1
  196. package/dist/commands/tasks/attachments/set-role.js +2 -1
  197. package/dist/commands/tasks/attachments/upload.js +2 -1
  198. package/dist/commands/tasks/bulk-update.d.ts +1 -0
  199. package/dist/commands/tasks/bulk-update.js +106 -15
  200. package/dist/commands/tasks/cancel-cascade.d.ts +1 -0
  201. package/dist/commands/tasks/cancel-cascade.js +13 -3
  202. package/dist/commands/tasks/cascade-status.js +2 -1
  203. package/dist/commands/tasks/checkout.js +3 -2
  204. package/dist/commands/tasks/children.js +2 -1
  205. package/dist/commands/tasks/comments/add.js +7 -6
  206. package/dist/commands/tasks/comments/anchor.js +8 -7
  207. package/dist/commands/tasks/comments/delete.js +3 -2
  208. package/dist/commands/tasks/comments/list.js +2 -1
  209. package/dist/commands/tasks/comments/reopen.js +3 -2
  210. package/dist/commands/tasks/comments/resolve.js +3 -2
  211. package/dist/commands/tasks/create-tree.d.ts +63 -0
  212. package/dist/commands/tasks/create-tree.js +197 -4
  213. package/dist/commands/tasks/delete.js +5 -4
  214. package/dist/commands/tasks/descendants.js +2 -1
  215. package/dist/commands/tasks/dri-plan.js +3 -2
  216. package/dist/commands/tasks/dri-run.js +3 -2
  217. package/dist/commands/tasks/dri-status.js +2 -1
  218. package/dist/commands/tasks/duplicate-pipeline.js +2 -1
  219. package/dist/commands/tasks/execution-summary.js +2 -1
  220. package/dist/commands/tasks/execution-timeline.js +2 -1
  221. package/dist/commands/tasks/fork.js +1 -0
  222. package/dist/commands/tasks/forward.js +4 -3
  223. package/dist/commands/tasks/handover.js +1 -0
  224. package/dist/commands/tasks/interrupt.js +3 -2
  225. package/dist/commands/tasks/labels/attach.js +4 -3
  226. package/dist/commands/tasks/labels/detach.js +4 -3
  227. package/dist/commands/tasks/labels/suggest.js +5 -4
  228. package/dist/commands/tasks/list.d.ts +27 -1
  229. package/dist/commands/tasks/list.js +101 -3
  230. package/dist/commands/tasks/move.js +4 -3
  231. package/dist/commands/tasks/output.js +6 -5
  232. package/dist/commands/tasks/pause-schedule.js +3 -2
  233. package/dist/commands/tasks/promote.js +1 -0
  234. package/dist/commands/tasks/prompt-log.js +2 -1
  235. package/dist/commands/tasks/release.js +5 -4
  236. package/dist/commands/tasks/remind.js +2 -1
  237. package/dist/commands/tasks/replay.js +3 -2
  238. package/dist/commands/tasks/report.js +1 -0
  239. package/dist/commands/tasks/resume-schedule.js +3 -2
  240. package/dist/commands/tasks/retry-schedule.js +3 -2
  241. package/dist/commands/tasks/retry.js +10 -9
  242. package/dist/commands/tasks/revisions.js +2 -1
  243. package/dist/commands/tasks/runs.js +6 -5
  244. package/dist/commands/tasks/schedule.js +3 -2
  245. package/dist/commands/tasks/self-schedule.js +6 -5
  246. package/dist/commands/tasks/skills/pin.js +3 -2
  247. package/dist/commands/tasks/skills/unpin.js +3 -2
  248. package/dist/commands/tasks/snooze.js +6 -5
  249. package/dist/commands/tasks/start-all.js +5 -4
  250. package/dist/commands/tasks/subscribe.js +1 -0
  251. package/dist/commands/tasks/tags/add.js +4 -3
  252. package/dist/commands/tasks/tags/remove.js +4 -3
  253. package/dist/commands/tasks/timeline.js +3 -2
  254. package/dist/commands/tasks/today.d.ts +4 -1
  255. package/dist/commands/tasks/today.js +12 -2
  256. package/dist/commands/tasks/transcript.js +6 -5
  257. package/dist/commands/tasks/unschedule.js +3 -2
  258. package/dist/commands/tasks/unsnooze.js +3 -2
  259. package/dist/commands/tasks/unsubscribe.js +2 -1
  260. package/dist/commands/tasks/update.js +5 -4
  261. package/dist/commands/tasks/wait.js +5 -4
  262. package/dist/lib/agent-distribution.d.ts +37 -0
  263. package/dist/lib/agent-distribution.js +63 -0
  264. package/dist/lib/agent-ref.d.ts +69 -0
  265. package/dist/lib/agent-ref.js +168 -0
  266. package/dist/lib/api-fetch.d.ts +2 -0
  267. package/dist/lib/api-fetch.js +14 -3
  268. package/dist/lib/command-hygiene.d.ts +13 -0
  269. package/dist/lib/command-hygiene.js +62 -2
  270. package/dist/lib/commitment-product.d.ts +0 -6
  271. package/dist/lib/commitment-product.js +1 -30
  272. package/dist/lib/commitments.d.ts +9 -45
  273. package/dist/lib/commitments.js +24 -95
  274. package/dist/lib/dedicated-power.d.ts +5 -0
  275. package/dist/lib/dedicated-power.js +30 -2
  276. package/dist/lib/dry-run-plans.d.ts +50 -0
  277. package/dist/lib/dry-run-plans.js +85 -0
  278. package/dist/lib/json-output.d.ts +31 -0
  279. package/dist/lib/json-output.js +78 -0
  280. package/dist/lib/list-output.d.ts +75 -0
  281. package/dist/lib/list-output.js +266 -0
  282. package/dist/lib/machine-daemon-log.d.ts +36 -0
  283. package/dist/lib/machine-daemon-log.js +78 -0
  284. package/dist/lib/node-adapter.js +10 -1
  285. package/dist/lib/northstars.js +1 -1
  286. package/dist/lib/open-target.d.ts +12 -0
  287. package/dist/lib/open-target.js +108 -0
  288. package/dist/lib/rate-limit-retry.d.ts +45 -0
  289. package/dist/lib/rate-limit-retry.js +88 -0
  290. package/dist/lib/roles.d.ts +98 -0
  291. package/dist/lib/roles.js +45 -0
  292. package/dist/lib/store-listing.d.ts +45 -0
  293. package/dist/lib/store-listing.js +186 -0
  294. package/dist/lib/task-batch.d.ts +67 -0
  295. package/dist/lib/task-batch.js +227 -0
  296. package/dist/lib/terminal-qr.d.ts +55 -0
  297. package/dist/lib/terminal-qr.js +119 -0
  298. package/dist/lib/web-url.d.ts +11 -0
  299. package/dist/lib/web-url.js +24 -0
  300. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.d.ts +45 -0
  301. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/commitmentExecutionContract.js +550 -0
  302. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +68 -0
  303. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -1
  304. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +7 -44
  305. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +8 -47
  306. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.d.ts +45 -0
  307. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/commitmentExecutionContract.js +545 -0
  308. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +68 -0
  309. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +46 -0
  310. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +7 -44
  311. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -47
  312. package/dist/node_modules/@skrr-ai/auth-core/package.json +11 -1
  313. package/dist/node_modules/@skrr-ai/data-provider/index.js +7285 -6673
  314. package/dist/node_modules/@skrr-ai/data-provider/package.json +2 -2
  315. package/oclif.manifest.json +35937 -26820
  316. package/package.json +6 -2
  317. package/dist/commands/commitments/autonomy.d.ts +0 -30
  318. package/dist/commands/commitments/autonomy.js +0 -67
  319. package/dist/commands/commitments/mode.js +0 -58
  320. package/dist/commands/commitments/pack/promote.d.ts +0 -19
  321. package/dist/commands/commitments/pack/promote.js +0 -46
  322. package/dist/commands/commitments/pack/shadow.d.ts +0 -20
  323. package/dist/commands/commitments/pack/shadow.js +0 -42
@@ -0,0 +1,24 @@
1
+ import { BaseCommand } from '../base-command';
2
+ /**
3
+ * Open a Skrr web page in the browser: a URL someone sent you, a site path, or
4
+ * a typed reference such as `space:<id>` or `listing:<agentId>`.
5
+ *
6
+ * Not signed-in on purpose: a link is an address, not a permission — the page
7
+ * itself decides what the viewer sees. The one API read it can make is the
8
+ * anonymous share-code resolve, for an app-scheme link that names nothing but
9
+ * a code.
10
+ * Like every `<entity> open`, a non-interactive shell (a pipe, a script, an
11
+ * agent) gets the URL printed instead of a browser it cannot see.
12
+ */
13
+ export default class Open extends BaseCommand {
14
+ static description: string;
15
+ static examples: string[];
16
+ static args: {
17
+ target: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
18
+ };
19
+ static flags: {
20
+ print: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
22
+ };
23
+ run(): Promise<void>;
24
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../base-command");
6
+ const entity_open_1 = require("../lib/entity-open");
7
+ const open_target_1 = require("../lib/open-target");
8
+ /**
9
+ * Open a Skrr web page in the browser: a URL someone sent you, a site path, or
10
+ * a typed reference such as `space:<id>` or `listing:<agentId>`.
11
+ *
12
+ * Not signed-in on purpose: a link is an address, not a permission — the page
13
+ * itself decides what the viewer sees. The one API read it can make is the
14
+ * anonymous share-code resolve, for an app-scheme link that names nothing but
15
+ * a code.
16
+ * Like every `<entity> open`, a non-interactive shell (a pipe, a script, an
17
+ * agent) gets the URL printed instead of a browser it cannot see.
18
+ */
19
+ class Open extends base_command_1.BaseCommand {
20
+ static description = `Open a ${data_provider_1.BRAND.displayName} URL, site path or <kind>:<id> reference in the browser (--print to only print the URL)`;
21
+ static examples = [
22
+ '<%= config.bin %> open https://skrr.ai/a/agent_abc123',
23
+ '<%= config.bin %> open listing:agent_abc123',
24
+ '<%= config.bin %> open skrr://agent/agent_abc123',
25
+ '<%= config.bin %> open space:sp_123 --print',
26
+ '<%= config.bin %> open /spaces/sp_123/tasks --json',
27
+ ];
28
+ static args = {
29
+ target: core_1.Args.string({
30
+ required: true,
31
+ ignoreStdin: true,
32
+ description: `A ${data_provider_1.BRAND.displayName} URL, a site path (/…), <kind>:<id> (${open_target_1.OPEN_REF_KINDS.join(', ')}), or an agent id or skrr:// link (opens its listing)`,
33
+ }),
34
+ };
35
+ static flags = {
36
+ print: core_1.Flags.boolean({ char: 'p', description: 'Print the URL without opening a browser' }),
37
+ json: core_1.Flags.boolean({ description: 'Print {url, form, opened} as JSON without opening' }),
38
+ };
39
+ async run() {
40
+ const { args, flags } = await this.parse(Open);
41
+ let resolved;
42
+ try {
43
+ resolved = await (0, open_target_1.resolveOpenTarget)(args.target, this.cliConfig.baseURL);
44
+ }
45
+ catch (err) {
46
+ if (err instanceof open_target_1.OpenTargetError) {
47
+ this.failWithCliError({ message: err.message, code: err.code, exit: 1, retryable: false });
48
+ }
49
+ throw err;
50
+ }
51
+ const launch = !flags.print && !flags.json && Boolean(process.stdout.isTTY);
52
+ if (launch) {
53
+ try {
54
+ await (0, entity_open_1.launchEntityUrl)(resolved.url, 'web');
55
+ }
56
+ catch (err) {
57
+ // Say what failed and still hand over the URL — the person can open it.
58
+ this.failWithCliError({
59
+ message: `Could not open a browser (${err.message}). The URL: ${resolved.url}`,
60
+ code: 'OPEN_BROWSER_FAILED',
61
+ exit: 1,
62
+ retryable: true,
63
+ details: { url: resolved.url },
64
+ });
65
+ }
66
+ }
67
+ if (flags.json) {
68
+ this.log(JSON.stringify({ ...resolved, opened: launch }, null, 2));
69
+ return;
70
+ }
71
+ this.log(launch ? `Opened browser: ${resolved.url}` : resolved.url);
72
+ }
73
+ }
74
+ exports.default = Open;
@@ -14,6 +14,7 @@ export default class ProjectsArchive extends BaseCommand {
14
14
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
15
  space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
16
  unarchive: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
18
  };
18
19
  run(): Promise<void>;
19
20
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../base-command");
6
+ const dry_run_plans_1 = require("../../lib/dry-run-plans");
6
7
  /**
7
8
  * Same verb shape as `goals archive` — one command, `--unarchive` to restore.
8
9
  * Archive rides the DELETE route (which archives by default); unarchive is a
@@ -13,6 +14,7 @@ class ProjectsArchive extends base_command_1.BaseCommand {
13
14
  static examples = [
14
15
  '<%= config.bin %> projects archive <project-id> --space <space>',
15
16
  '<%= config.bin %> projects archive <project-id> --space <space> --unarchive',
17
+ '<%= config.bin %> projects archive <project-id> --space <space> --dry-run --json',
16
18
  ];
17
19
  static args = {
18
20
  id: core_1.Args.string({
@@ -27,11 +29,32 @@ class ProjectsArchive extends base_command_1.BaseCommand {
27
29
  description: 'Owning space — id, ref, or name. Needed only for a bare ref (OSK-P-12); an id or a qualified ref `<space>/<project>` resolves on its own.',
28
30
  }),
29
31
  unarchive: core_1.Flags.boolean({ description: 'Unarchive the project instead of archiving it' }),
32
+ 'dry-run': core_1.Flags.boolean({
33
+ description: 'Read the project and print what would change without changing it',
34
+ }),
30
35
  };
31
36
  async run() {
32
37
  this.requireAuth();
33
38
  const { args, flags } = await this.parse(ProjectsArchive);
34
39
  const { projectRef, spaceId } = await this.resolveProjectReference(args.id, flags.space);
40
+ if (flags['dry-run']) {
41
+ let project;
42
+ try {
43
+ project = (await data_provider_1.dataService.getSpaceProject(spaceId, projectRef));
44
+ }
45
+ catch (err) {
46
+ this.handleApiError(err, { subject: `project ${projectRef}` });
47
+ }
48
+ const plan = (0, dry_run_plans_1.planProjectChange)(flags.unarchive ? 'unarchive' : 'archive', project, projectRef);
49
+ if (flags.json)
50
+ this.log(JSON.stringify(plan, null, 2));
51
+ else {
52
+ this.log(`Dry run: would ${plan.action} project ${projectRef}. Nothing was changed.`);
53
+ for (const note of plan.notes)
54
+ this.log(`Note: ${note}`);
55
+ }
56
+ return;
57
+ }
35
58
  let result;
36
59
  try {
37
60
  result = flags.unarchive
@@ -13,6 +13,7 @@ export default class ProjectsDelete extends BaseCommand {
13
13
  static flags: {
14
14
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
15
  space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
17
  yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
18
  };
18
19
  run(): Promise<void>;
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../base-command");
6
6
  const prompt_1 = require("../../lib/prompt");
7
+ const dry_run_plans_1 = require("../../lib/dry-run-plans");
7
8
  /**
8
9
  * Hard delete (`?mode=delete`): removes the project and detaches member
9
10
  * tasks/goals (invariant P3 — never cascades into the work itself). The
@@ -14,6 +15,7 @@ class ProjectsDelete extends base_command_1.BaseCommand {
14
15
  static examples = [
15
16
  '<%= config.bin %> projects delete <project-id> --space <space>',
16
17
  '<%= config.bin %> projects delete <project-id> --space <space> --yes',
18
+ '<%= config.bin %> projects delete <project-id> --space <space> --dry-run --json',
17
19
  ];
18
20
  static args = {
19
21
  id: core_1.Args.string({
@@ -27,6 +29,9 @@ class ProjectsDelete extends base_command_1.BaseCommand {
27
29
  space: core_1.Flags.string({
28
30
  description: 'Owning space — id, ref, or name. Needed only for a bare ref (OSK-P-12); an id or a qualified ref `<space>/<project>` resolves on its own.',
29
31
  }),
32
+ 'dry-run': core_1.Flags.boolean({
33
+ description: 'Read the project and print what a delete would remove and detach, without deleting or prompting',
34
+ }),
30
35
  yes: core_1.Flags.boolean({
31
36
  char: 'y',
32
37
  aliases: ['force'],
@@ -37,6 +42,24 @@ class ProjectsDelete extends base_command_1.BaseCommand {
37
42
  this.requireAuth();
38
43
  const { args, flags } = await this.parse(ProjectsDelete);
39
44
  const { projectRef, spaceId } = await this.resolveProjectReference(args.id, flags.space);
45
+ if (flags['dry-run']) {
46
+ let project;
47
+ try {
48
+ project = (await data_provider_1.dataService.getSpaceProject(spaceId, projectRef));
49
+ }
50
+ catch (err) {
51
+ this.handleApiError(err, { subject: `project ${projectRef}` });
52
+ }
53
+ const plan = (0, dry_run_plans_1.planProjectChange)('delete', project, projectRef);
54
+ if (flags.json)
55
+ this.log(JSON.stringify(plan, null, 2));
56
+ else {
57
+ const detached = plan.changes
58
+ .detachedTasksEstimate;
59
+ this.log(`Dry run: would permanently delete project ${projectRef} and detach ${detached ?? 'its'} task(s). Nothing was changed.`);
60
+ }
61
+ return;
62
+ }
40
63
  let confirmed;
41
64
  try {
42
65
  confirmed = await (0, prompt_1.confirmDestructive)(`Delete project ${projectRef}? Member tasks and goals are detached, not deleted. This cannot be undone.`, flags.yes);
@@ -16,6 +16,9 @@ export default class ProjectsList extends BaseCommand {
16
16
  space: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
17
17
  };
18
18
  static flags: {
19
+ fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ compact: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
+ ndjson: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
22
  space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
23
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
24
  'include-archived': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -5,6 +5,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../base-command");
6
6
  const space_argument_1 = require("../../lib/space-argument");
7
7
  const format_1 = require("../../lib/format");
8
+ const list_output_1 = require("../../lib/list-output");
8
9
  const projects_1 = require("../../lib/projects");
9
10
  /**
10
11
  * `skrr projects list [space]` — the projects in a space, or across every space
@@ -23,6 +24,7 @@ class ProjectsList extends base_command_1.BaseCommand {
23
24
  '<%= config.bin %> projects list --q "billing"',
24
25
  '<%= config.bin %> projects list <space> --include-archived',
25
26
  '<%= config.bin %> projects list --q billing --json',
27
+ '<%= config.bin %> projects list <space> --compact --json',
26
28
  ];
27
29
  static args = {
28
30
  space: core_1.Args.string({
@@ -41,6 +43,7 @@ class ProjectsList extends base_command_1.BaseCommand {
41
43
  description: 'Case-insensitive match on title, description, or ref. Searches every visible space unless one is named.',
42
44
  }),
43
45
  limit: core_1.Flags.integer({ description: 'Max results when searching (1-200)', default: 50 }),
46
+ ...list_output_1.listOutputFlags,
44
47
  };
45
48
  async run() {
46
49
  this.requireAuth();
@@ -73,8 +76,15 @@ class ProjectsList extends base_command_1.BaseCommand {
73
76
  catch (err) {
74
77
  this.handleApiError(err, { subject: spaceId ? `space ${spaceId}` : 'projects' });
75
78
  }
76
- if (flags.json) {
77
- this.log(JSON.stringify(response, null, 2));
79
+ if (flags.json || flags.ndjson) {
80
+ // P3: the in-space list answered a bare `{data}` while the cross-space
81
+ // search answered a full envelope. One shape for both; `data` stays.
82
+ this.printList((0, list_output_1.shapeListResponse)(response, {
83
+ resource: 'project',
84
+ fields: flags.fields,
85
+ compact: flags.compact,
86
+ requestedLimit: crossSpace ? flags.limit : undefined,
87
+ }), Boolean(flags.ndjson));
78
88
  return;
79
89
  }
80
90
  // Qualify the ref only when rows can come from more than one space —
@@ -25,6 +25,7 @@ class SpacesActionsAdd extends base_command_1.BaseCommand {
25
25
  async run() {
26
26
  this.requireAuth();
27
27
  const { args, flags } = await this.parse(SpacesActionsAdd);
28
+ const spaceRef = await this.resolveEntityRef('space', args.id);
28
29
  let body = {};
29
30
  try {
30
31
  body = await (0, prompt_1.readJsonBody)(flags['from-json']);
@@ -52,7 +53,7 @@ class SpacesActionsAdd extends base_command_1.BaseCommand {
52
53
  let result;
53
54
  try {
54
55
  result = await data_provider_1.dataService.addSpaceCustomAction({
55
- spaceId: args.id,
56
+ spaceId: spaceRef,
56
57
  action: payload,
57
58
  });
58
59
  }
@@ -65,12 +66,12 @@ class SpacesActionsAdd extends base_command_1.BaseCommand {
65
66
  // returns just the action. A create returns the thing it created.
66
67
  const stored = (result?.customActions ?? []).find((action) => action.id === payload.id) ?? payload;
67
68
  if (flags.json)
68
- this.log(JSON.stringify((0, space_output_1.withSpaceResourceUrls)(this.cliConfig.baseURL, args.id, 'actions', stored, ['id']), null, 2));
69
+ this.log(JSON.stringify((0, space_output_1.withSpaceResourceUrls)(this.cliConfig.baseURL, spaceRef, 'actions', stored, ['id']), null, 2));
69
70
  else
70
71
  this.log(`Added custom action ${String(payload.id)}.`);
71
72
  // On stderr, so `--json` stays parseable: the action was saved, and still
72
73
  // cannot run until the space has a Leader (OSK-9641).
73
- const unrunnable = (0, space_custom_actions_1.spaceActionsNotRunnableReason)({ id: args.id, leadAgentId: result?.leadAgentId }, this.config.bin);
74
+ const unrunnable = (0, space_custom_actions_1.spaceActionsNotRunnableReason)({ id: spaceRef, leadAgentId: result?.leadAgentId }, this.config.bin);
74
75
  if (unrunnable)
75
76
  this.warn(unrunnable);
76
77
  }
@@ -25,9 +25,10 @@ class SpacesActionsAvailable extends base_command_1.BaseCommand {
25
25
  async run() {
26
26
  this.requireAuth();
27
27
  const { args, flags } = await this.parse(SpacesActionsAvailable);
28
+ const spaceRef = await this.resolveEntityRef('space', args.id);
28
29
  let response;
29
30
  try {
30
- response = await data_provider_1.dataService.listSpaceAvailableActions(args.id);
31
+ response = await data_provider_1.dataService.listSpaceAvailableActions(spaceRef);
31
32
  }
32
33
  catch (err) {
33
34
  this.handleApiError(err);
@@ -54,7 +55,7 @@ class SpacesActionsAvailable extends base_command_1.BaseCommand {
54
55
  // The REF is for two commands, and they need different rights: attaching
55
56
  // works for any space member, running needs VIEW on the agent (OSK-9663).
56
57
  this.log('Attach to a task: skrr tasks actions attach <task-id> <agentId>:<actionId>');
57
- this.log(`Run one in this space: skrr spaces actions run ${args.id} <agentId>:<actionId> (needs access to the agent; see what you can run with: skrr spaces actions list ${args.id} --all)`);
58
+ this.log(`Run one in this space: skrr spaces actions run ${spaceRef} <agentId>:<actionId> (needs access to the agent; see what you can run with: skrr spaces actions list ${spaceRef} --all)`);
58
59
  }
59
60
  }
60
61
  exports.default = SpacesActionsAvailable;
@@ -24,9 +24,10 @@ class SpacesActionsList extends base_command_1.BaseCommand {
24
24
  async run() {
25
25
  this.requireAuth();
26
26
  const { args, flags } = await this.parse(SpacesActionsList);
27
+ const spaceRef = await this.resolveEntityRef('space', args.id);
27
28
  let space;
28
29
  try {
29
- space = await data_provider_1.dataService.getSpace(args.id);
30
+ space = await data_provider_1.dataService.getSpace(spaceRef);
30
31
  }
31
32
  catch (err) {
32
33
  this.handleApiError(err);
@@ -35,12 +36,12 @@ class SpacesActionsList extends base_command_1.BaseCommand {
35
36
  if (flags.all)
36
37
  return this.listAll(space, flags.json);
37
38
  if (flags.json)
38
- return void this.log(JSON.stringify((0, space_output_1.withSpaceResourceUrls)(this.cliConfig.baseURL, args.id, 'actions', { data: actions }, [
39
+ return void this.log(JSON.stringify((0, space_output_1.withSpaceResourceUrls)(this.cliConfig.baseURL, spaceRef, 'actions', { data: actions }, [
39
40
  'id',
40
41
  ]), null, 2));
41
42
  if (!actions.length) {
42
43
  this.log('No custom actions.');
43
- this.log(`Agent actions offered here: ${this.config.bin} spaces actions list ${args.id} --all`);
44
+ this.log(`Agent actions offered here: ${this.config.bin} spaces actions list ${spaceRef} --all`);
44
45
  return;
45
46
  }
46
47
  (0, format_1.renderTable)(actions.map((a) => ({
@@ -57,7 +58,7 @@ class SpacesActionsList extends base_command_1.BaseCommand {
57
58
  { key: 'id', header: 'ID' },
58
59
  ], (line) => this.log(line));
59
60
  this.noteUnrunnable(space);
60
- this.log(`Agent actions offered here too: ${this.config.bin} spaces actions list ${args.id} --all`);
61
+ this.log(`Agent actions offered here too: ${this.config.bin} spaces actions list ${spaceRef} --all`);
61
62
  }
62
63
  /** Say, on stderr, when none of the listed space actions can run. */
63
64
  noteUnrunnable(space) {
@@ -24,6 +24,7 @@ class SpacesActionsReplace extends base_command_1.BaseCommand {
24
24
  async run() {
25
25
  this.requireAuth();
26
26
  const { args, flags } = await this.parse(SpacesActionsReplace);
27
+ const spaceRef = await this.resolveEntityRef('space', args.id);
27
28
  let raw;
28
29
  try {
29
30
  raw = await (0, prompt_1.readJsonValue)(flags['from-json']);
@@ -37,19 +38,19 @@ class SpacesActionsReplace extends base_command_1.BaseCommand {
37
38
  if (flags['dry-run']) {
38
39
  const output = {
39
40
  dryRun: true,
40
- spaceId: args.id,
41
+ spaceId: spaceRef,
41
42
  actions,
42
43
  expectedActionIds: flags['expected-id'] ?? [],
43
44
  };
44
45
  this.log(flags.json
45
46
  ? JSON.stringify(output, null, 2)
46
- : `Dry run: would replace custom actions for space ${args.id}.`);
47
+ : `Dry run: would replace custom actions for space ${spaceRef}.`);
47
48
  return;
48
49
  }
49
50
  let result;
50
51
  try {
51
52
  result = await data_provider_1.dataService.replaceSpaceCustomActions({
52
- spaceId: args.id,
53
+ spaceId: spaceRef,
53
54
  actions: actions,
54
55
  expectedActionIds: flags['expected-id'],
55
56
  });
@@ -58,9 +59,9 @@ class SpacesActionsReplace extends base_command_1.BaseCommand {
58
59
  this.handleApiError(err);
59
60
  }
60
61
  if (flags.json)
61
- this.log(JSON.stringify((0, space_output_1.withSpaceResourceUrls)(this.cliConfig.baseURL, args.id, 'actions', result, ['id']), null, 2));
62
+ this.log(JSON.stringify((0, space_output_1.withSpaceResourceUrls)(this.cliConfig.baseURL, spaceRef, 'actions', result, ['id']), null, 2));
62
63
  else
63
- this.log(`Replaced custom actions for space ${args.id}.`);
64
+ this.log(`Replaced custom actions for space ${spaceRef}.`);
64
65
  }
65
66
  }
66
67
  exports.default = SpacesActionsReplace;
@@ -16,9 +16,10 @@ class SpacesArchive extends base_command_1.BaseCommand {
16
16
  async run() {
17
17
  this.requireAuth();
18
18
  const { args, flags } = await this.parse(SpacesArchive);
19
+ const spaceId = await this.resolveEntityRef('space', args.id);
19
20
  let updated;
20
21
  try {
21
- updated = await data_provider_1.dataService.archiveSpace(args.id);
22
+ updated = await data_provider_1.dataService.archiveSpace(spaceId);
22
23
  }
23
24
  catch (err) {
24
25
  this.handleApiError(err);
@@ -28,7 +29,7 @@ class SpacesArchive extends base_command_1.BaseCommand {
28
29
  return;
29
30
  }
30
31
  const s = updated;
31
- this.log(`Archived space ${s.id ?? s._id ?? args.id} - ${s.title ?? '(no title)'}`);
32
+ this.log(`Archived space ${s.id ?? s._id ?? spaceId} - ${s.title ?? '(no title)'}`);
32
33
  }
33
34
  }
34
35
  exports.default = SpacesArchive;
@@ -21,15 +21,16 @@ class SpacesAutoExecutorPreview extends base_command_1.BaseCommand {
21
21
  // ignored, and raw JSON printed unconditionally. There was no readable
22
22
  // rendering of a preview anywhere in the CLI.
23
23
  const { args, flags } = await this.parse(SpacesAutoExecutorPreview);
24
+ const spaceRef = await this.resolveEntityRef('space', args.id);
24
25
  let result;
25
26
  try {
26
- result = (await data_provider_1.dataService.previewSpaceAutoExecutor(args.id));
27
+ result = (await data_provider_1.dataService.previewSpaceAutoExecutor(spaceRef));
27
28
  }
28
29
  catch (err) {
29
30
  this.handleApiError(err);
30
31
  }
31
32
  if (flags.json) {
32
- this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'execution', { result }), null, 2));
33
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'execution', { result }), null, 2));
33
34
  return;
34
35
  }
35
36
  const { space, plan } = result;
@@ -37,7 +38,7 @@ class SpacesAutoExecutorPreview extends base_command_1.BaseCommand {
37
38
  this.log('No plan was returned for this space.');
38
39
  return;
39
40
  }
40
- this.log(`Space: ${space.title ?? args.id}`);
41
+ this.log(`Space: ${space.title ?? spaceRef}`);
41
42
  this.log(`Autopilot: ${space.autoExecuteEnabled ? 'enabled' : 'disabled'}` +
42
43
  (space.autoExecuteLifecycleState === 'sleeping'
43
44
  ? ` (sleeping${space.autoExecuteSuspensionReason ? `: ${String(space.autoExecuteSuspensionReason).replace(/_/g, ' ')}` : ''})`
@@ -13,17 +13,18 @@ class SpacesAutoExecutorRun extends base_command_1.BaseCommand {
13
13
  async run() {
14
14
  this.requireAuth();
15
15
  const { args, flags } = await this.parse(SpacesAutoExecutorRun);
16
+ const spaceRef = await this.resolveEntityRef('space', args.id);
16
17
  let result;
17
18
  try {
18
- result = await data_provider_1.dataService.triggerSpaceAutoExecutor(args.id);
19
+ result = await data_provider_1.dataService.triggerSpaceAutoExecutor(spaceRef);
19
20
  }
20
21
  catch (err) {
21
22
  this.handleApiError(err);
22
23
  }
23
24
  if (flags.json)
24
- this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'execution', { result }), null, 2));
25
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'execution', { result }), null, 2));
25
26
  else
26
- this.log(`Triggered auto-executor for space ${args.id}.`);
27
+ this.log(`Triggered auto-executor for space ${spaceRef}.`);
27
28
  }
28
29
  }
29
30
  exports.default = SpacesAutoExecutorRun;
@@ -22,15 +22,16 @@ class SpacesAutoExecutorRuns extends base_command_1.BaseCommand {
22
22
  async run() {
23
23
  this.requireAuth();
24
24
  const { args, flags } = await this.parse(SpacesAutoExecutorRuns);
25
+ const spaceRef = await this.resolveEntityRef('space', args.id);
25
26
  let result;
26
27
  try {
27
- result = await data_provider_1.dataService.getSpaceOrchestrationRuns(args.id, flags.limit);
28
+ result = await data_provider_1.dataService.getSpaceOrchestrationRuns(spaceRef, flags.limit);
28
29
  }
29
30
  catch (err) {
30
31
  this.handleApiError(err);
31
32
  }
32
33
  if (flags.json) {
33
- this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'execution', { result }), null, 2));
34
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'execution', { result }), null, 2));
34
35
  return;
35
36
  }
36
37
  this.log(`Orchestration: ${result.enabled ? 'enabled' : 'disabled'}`);
@@ -57,6 +57,7 @@ class SpacesAutoExecutorUpdate extends base_command_1.BaseCommand {
57
57
  async run() {
58
58
  this.requireAuth();
59
59
  const { args, flags } = await this.parse(SpacesAutoExecutorUpdate);
60
+ const spaceRef = await this.resolveEntityRef('space', args.id);
60
61
  let body = {};
61
62
  try {
62
63
  body = await (0, prompt_1.readJsonBody)(flags['from-json']);
@@ -104,7 +105,7 @@ class SpacesAutoExecutorUpdate extends base_command_1.BaseCommand {
104
105
  let response;
105
106
  try {
106
107
  response = await data_provider_1.dataService.updateSpaceAutoExecutor({
107
- spaceId: args.id,
108
+ spaceId: spaceRef,
108
109
  data: payload,
109
110
  });
110
111
  }
@@ -112,14 +113,14 @@ class SpacesAutoExecutorUpdate extends base_command_1.BaseCommand {
112
113
  this.handleApiError(err);
113
114
  }
114
115
  if (flags.json) {
115
- this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'execution', response), null, 2));
116
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'execution', response), null, 2));
116
117
  return;
117
118
  }
118
119
  const space = response?.space ?? {};
119
120
  // A stored `0` means unlimited. Printing the raw number told the user the
120
121
  // opposite of what the setting does.
121
122
  const limit = (value) => typeof value === 'number' ? (0, data_provider_1.formatLimit)(value === 0 ? null : value) : '-';
122
- this.log(`Updated auto-executor for ${space.id ?? args.id}`);
123
+ this.log(`Updated auto-executor for ${space.id ?? spaceRef}`);
123
124
  this.log(`Enabled: ${space.autoExecuteEnabled ? 'yes' : 'no'}`);
124
125
  this.log(`Mode: ${space.autoExecuteMode ?? '-'}`);
125
126
  this.log(`Interval: ${formatIntervalMs(space.autoExecuteIntervalMs)}`);
@@ -78,15 +78,16 @@ class SpacesBootstrap extends base_command_1.BaseCommand {
78
78
  async run() {
79
79
  this.requireAuth();
80
80
  const { args, flags } = await this.parse(SpacesBootstrap);
81
+ const spaceRef = await this.resolveEntityRef('space', args.id);
81
82
  let result;
82
83
  try {
83
- result = await data_provider_1.dataService.getSpaceBootstrap(args.id);
84
+ result = await data_provider_1.dataService.getSpaceBootstrap(spaceRef);
84
85
  }
85
86
  catch (err) {
86
87
  this.handleApiError(err);
87
88
  }
88
89
  const output = result && typeof result === 'object'
89
- ? (0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'dashboard', result)
90
+ ? (0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'dashboard', result)
90
91
  : result;
91
92
  // `--json` was previously accepted and ignored — every invocation printed
92
93
  // JSON. It now selects between the raw payload and the human summary,
@@ -25,9 +25,10 @@ class SpacesBriefsDelete extends base_command_1.BaseCommand {
25
25
  async run() {
26
26
  this.requireAuth();
27
27
  const { args, flags } = await this.parse(SpacesBriefsDelete);
28
+ const spaceRef = await this.resolveEntityRef('space', args.id);
28
29
  let confirmed;
29
30
  try {
30
- confirmed = await (0, prompt_1.confirmDestructive)(`Delete brief for ${flags.principal} ${flags.id} in space ${args.id}? This cannot be undone.`, flags.yes);
31
+ confirmed = await (0, prompt_1.confirmDestructive)(`Delete brief for ${flags.principal} ${flags.id} in space ${spaceRef}? This cannot be undone.`, flags.yes);
31
32
  }
32
33
  catch (err) {
33
34
  this.error(err.message, {
@@ -39,7 +40,7 @@ class SpacesBriefsDelete extends base_command_1.BaseCommand {
39
40
  return;
40
41
  }
41
42
  try {
42
- await data_provider_1.dataService.deleteSpaceBrief(args.id, flags.principal, flags.id);
43
+ await data_provider_1.dataService.deleteSpaceBrief(spaceRef, flags.principal, flags.id);
43
44
  }
44
45
  catch (err) {
45
46
  this.handleApiError(err);
@@ -26,15 +26,16 @@ class SpacesBriefsGet extends base_command_1.BaseCommand {
26
26
  async run() {
27
27
  this.requireAuth();
28
28
  const { args, flags } = await this.parse(SpacesBriefsGet);
29
+ const spaceRef = await this.resolveEntityRef('space', args.id);
29
30
  let result;
30
31
  try {
31
- result = await data_provider_1.dataService.getSpaceBrief(args.id, flags.principal, flags.id);
32
+ result = await data_provider_1.dataService.getSpaceBrief(spaceRef, flags.principal, flags.id);
32
33
  }
33
34
  catch (err) {
34
35
  this.handleApiError(err);
35
36
  }
36
37
  if (flags.json) {
37
- this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'members', result), null, 2));
38
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'members', result), null, 2));
38
39
  return;
39
40
  }
40
41
  const b = result;
@@ -20,15 +20,16 @@ class SpacesBriefsList extends base_command_1.BaseCommand {
20
20
  async run() {
21
21
  this.requireAuth();
22
22
  const { args, flags } = await this.parse(SpacesBriefsList);
23
+ const spaceRef = await this.resolveEntityRef('space', args.id);
23
24
  let response;
24
25
  try {
25
- response = await data_provider_1.dataService.listSpaceBriefs(args.id);
26
+ response = await data_provider_1.dataService.listSpaceBriefs(spaceRef);
26
27
  }
27
28
  catch (err) {
28
29
  this.handleApiError(err);
29
30
  }
30
31
  if (flags.json) {
31
- this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'members', { data: response }), null, 2));
32
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, spaceRef, 'members', { data: response }), null, 2));
32
33
  return;
33
34
  }
34
35
  const items = Array.isArray(response) ? response : [];