@skrr-ai/cli 0.1.47 → 0.1.48

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 (274) hide show
  1. package/README.md +1 -1
  2. package/dist/base-command.d.ts +18 -0
  3. package/dist/base-command.js +61 -1
  4. package/dist/commands/agents/chat.d.ts +21 -0
  5. package/dist/commands/agents/chat.js +26 -9
  6. package/dist/commands/balance/usage/breakdown.d.ts +14 -0
  7. package/dist/commands/balance/usage/breakdown.js +68 -0
  8. package/dist/commands/balance/usage.js +24 -0
  9. package/dist/commands/commerce/entitlements/explain.d.ts +22 -0
  10. package/dist/commands/commerce/entitlements/explain.js +40 -0
  11. package/dist/commands/commerce/incidents/audit.d.ts +20 -0
  12. package/dist/commands/commerce/incidents/audit.js +37 -0
  13. package/dist/commands/commerce/incidents/list.d.ts +22 -0
  14. package/dist/commands/commerce/incidents/list.js +49 -0
  15. package/dist/commands/commerce/incidents/resolve.d.ts +23 -0
  16. package/dist/commands/commerce/incidents/resolve.js +45 -0
  17. package/dist/commands/commerce/incidents/retry.d.ts +22 -0
  18. package/dist/commands/commerce/incidents/retry.js +45 -0
  19. package/dist/commands/commerce/incidents/show.d.ts +13 -0
  20. package/dist/commands/commerce/incidents/show.js +30 -0
  21. package/dist/commands/commerce/offers/approve.d.ts +17 -0
  22. package/dist/commands/commerce/offers/approve.js +33 -0
  23. package/dist/commands/commerce/offers/create.d.ts +18 -0
  24. package/dist/commands/commerce/offers/create.js +34 -0
  25. package/dist/commands/commerce/offers/publish.d.ts +13 -0
  26. package/dist/commands/commerce/offers/publish.js +28 -0
  27. package/dist/commands/commerce/offers/retire.d.ts +17 -0
  28. package/dist/commands/commerce/offers/retire.js +32 -0
  29. package/dist/commands/commerce/offers/validate.d.ts +18 -0
  30. package/dist/commands/commerce/offers/validate.js +33 -0
  31. package/dist/commands/commerce/products/create.d.ts +10 -0
  32. package/dist/commands/commerce/products/create.js +25 -0
  33. package/dist/commands/commerce/promotions/redeem.d.ts +13 -0
  34. package/dist/commands/commerce/promotions/redeem.js +32 -0
  35. package/dist/commands/commerce/terms/accept.d.ts +18 -0
  36. package/dist/commands/commerce/terms/accept.js +39 -0
  37. package/dist/commands/commerce/terms/show.d.ts +10 -0
  38. package/dist/commands/commerce/terms/show.js +34 -0
  39. package/dist/commands/commerce/trials/conversion-preview.d.ts +18 -0
  40. package/dist/commands/commerce/trials/conversion-preview.js +39 -0
  41. package/dist/commands/commerce/trials/start.d.ts +23 -0
  42. package/dist/commands/commerce/trials/start.js +58 -0
  43. package/dist/commands/commitments/accounting.d.ts +39 -0
  44. package/dist/commands/commitments/accounting.js +116 -0
  45. package/dist/commands/commitments/action-history.d.ts +1 -0
  46. package/dist/commands/commitments/action-history.js +8 -1
  47. package/dist/commands/commitments/case.d.ts +1 -0
  48. package/dist/commands/commitments/case.js +19 -3
  49. package/dist/commands/commitments/cases.d.ts +1 -0
  50. package/dist/commands/commitments/cases.js +11 -1
  51. package/dist/commands/commitments/checks.d.ts +1 -0
  52. package/dist/commands/commitments/checks.js +5 -1
  53. package/dist/commands/commitments/cost.d.ts +62 -0
  54. package/dist/commands/commitments/cost.js +130 -0
  55. package/dist/commands/commitments/create.js +1 -1
  56. package/dist/commands/commitments/delete.d.ts +1 -0
  57. package/dist/commands/commitments/delete.js +56 -6
  58. package/dist/commands/commitments/feedback.js +9 -1
  59. package/dist/commands/commitments/handover.js +16 -0
  60. package/dist/commands/commitments/hypotheses.d.ts +1 -0
  61. package/dist/commands/commitments/hypotheses.js +17 -2
  62. package/dist/commands/commitments/links/list.js +4 -1
  63. package/dist/commands/commitments/liveness.d.ts +18 -0
  64. package/dist/commands/commitments/liveness.js +80 -0
  65. package/dist/commands/commitments/metrics.d.ts +1 -0
  66. package/dist/commands/commitments/metrics.js +8 -1
  67. package/dist/commands/commitments/next-tick.d.ts +39 -0
  68. package/dist/commands/commitments/next-tick.js +122 -0
  69. package/dist/commands/commitments/observations.d.ts +1 -0
  70. package/dist/commands/commitments/observations.js +19 -2
  71. package/dist/commands/commitments/pause.js +12 -0
  72. package/dist/commands/commitments/receipt.d.ts +2 -0
  73. package/dist/commands/commitments/receipt.js +16 -2
  74. package/dist/commands/commitments/remediation-proposal.js +6 -2
  75. package/dist/commands/commitments/remediation-proposals.js +5 -1
  76. package/dist/commands/commitments/restore.d.ts +25 -0
  77. package/dist/commands/commitments/restore.js +46 -0
  78. package/dist/commands/commitments/show.js +32 -0
  79. package/dist/commands/commitments/trigger-status.js +33 -0
  80. package/dist/commands/commitments/update.d.ts +1 -0
  81. package/dist/commands/commitments/update.js +31 -5
  82. package/dist/commands/commitments/wake-capabilities.d.ts +0 -1
  83. package/dist/commands/commitments/wake-capabilities.js +8 -4
  84. package/dist/commands/enterprise/budgets/create.d.ts +11 -0
  85. package/dist/commands/enterprise/budgets/create.js +27 -0
  86. package/dist/commands/enterprise/budgets/evaluate.d.ts +17 -0
  87. package/dist/commands/enterprise/budgets/evaluate.js +32 -0
  88. package/dist/commands/enterprise/budgets/publish.d.ts +14 -0
  89. package/dist/commands/enterprise/budgets/publish.js +30 -0
  90. package/dist/commands/enterprise/contracts/activate.d.ts +14 -0
  91. package/dist/commands/enterprise/contracts/activate.js +30 -0
  92. package/dist/commands/enterprise/contracts/create.d.ts +14 -0
  93. package/dist/commands/enterprise/contracts/create.js +32 -0
  94. package/dist/commands/enterprise/contracts/issue.d.ts +18 -0
  95. package/dist/commands/enterprise/contracts/issue.js +34 -0
  96. package/dist/commands/enterprise/domains/begin.d.ts +20 -0
  97. package/dist/commands/enterprise/domains/begin.js +39 -0
  98. package/dist/commands/enterprise/domains/verify.d.ts +14 -0
  99. package/dist/commands/enterprise/domains/verify.js +32 -0
  100. package/dist/commands/enterprise/external-config/activate.d.ts +22 -0
  101. package/dist/commands/enterprise/external-config/activate.js +49 -0
  102. package/dist/commands/enterprise/external-config/set.d.ts +25 -0
  103. package/dist/commands/enterprise/external-config/set.js +123 -0
  104. package/dist/commands/enterprise/external-config/show.d.ts +12 -0
  105. package/dist/commands/enterprise/external-config/show.js +39 -0
  106. package/dist/commands/enterprise/external-config/suspend.d.ts +13 -0
  107. package/dist/commands/enterprise/external-config/suspend.js +41 -0
  108. package/dist/commands/enterprise/finance/close-snapshot.d.ts +11 -0
  109. package/dist/commands/enterprise/finance/close-snapshot.js +28 -0
  110. package/dist/commands/enterprise/finance/record-document.d.ts +18 -0
  111. package/dist/commands/enterprise/finance/record-document.js +35 -0
  112. package/dist/commands/enterprise/profile.d.ts +20 -0
  113. package/dist/commands/enterprise/profile.js +38 -0
  114. package/dist/commands/login.d.ts +13 -0
  115. package/dist/commands/login.js +77 -0
  116. package/dist/commands/machines/dedicated/index.js +3 -0
  117. package/dist/commands/machines/dedicated/service/apply.d.ts +23 -0
  118. package/dist/commands/machines/dedicated/service/apply.js +99 -0
  119. package/dist/commands/machines/dedicated/service/approve.d.ts +23 -0
  120. package/dist/commands/machines/dedicated/service/approve.js +52 -0
  121. package/dist/commands/machines/dedicated/service/create.d.ts +55 -0
  122. package/dist/commands/machines/dedicated/service/create.js +222 -0
  123. package/dist/commands/machines/dedicated/service/edit.d.ts +30 -0
  124. package/dist/commands/machines/dedicated/service/edit.js +146 -0
  125. package/dist/commands/machines/dedicated/service/exec.d.ts +26 -0
  126. package/dist/commands/machines/dedicated/service/exec.js +92 -0
  127. package/dist/commands/machines/dedicated/service/export.d.ts +29 -0
  128. package/dist/commands/machines/dedicated/service/export.js +106 -0
  129. package/dist/commands/machines/dedicated/service/index.d.ts +14 -0
  130. package/dist/commands/machines/dedicated/service/index.js +49 -0
  131. package/dist/commands/machines/dedicated/service/logs.d.ts +33 -0
  132. package/dist/commands/machines/dedicated/service/logs.js +148 -0
  133. package/dist/commands/machines/dedicated/service/ls.d.ts +20 -0
  134. package/dist/commands/machines/dedicated/service/ls.js +80 -0
  135. package/dist/commands/machines/dedicated/service/restart.d.ts +14 -0
  136. package/dist/commands/machines/dedicated/service/restart.js +29 -0
  137. package/dist/commands/machines/dedicated/service/rm.d.ts +20 -0
  138. package/dist/commands/machines/dedicated/service/rm.js +33 -0
  139. package/dist/commands/machines/dedicated/service/secret/index.d.ts +14 -0
  140. package/dist/commands/machines/dedicated/service/secret/index.js +25 -0
  141. package/dist/commands/machines/dedicated/service/secret/rm.d.ts +22 -0
  142. package/dist/commands/machines/dedicated/service/secret/rm.js +54 -0
  143. package/dist/commands/machines/dedicated/service/secret/set.d.ts +22 -0
  144. package/dist/commands/machines/dedicated/service/secret/set.js +93 -0
  145. package/dist/commands/machines/dedicated/service/start.d.ts +14 -0
  146. package/dist/commands/machines/dedicated/service/start.js +29 -0
  147. package/dist/commands/machines/dedicated/service/status.d.ts +21 -0
  148. package/dist/commands/machines/dedicated/service/status.js +85 -0
  149. package/dist/commands/machines/dedicated/service/stop.d.ts +20 -0
  150. package/dist/commands/machines/dedicated/service/stop.js +35 -0
  151. package/dist/commands/machines/dedicated/service/top.d.ts +22 -0
  152. package/dist/commands/machines/dedicated/service/top.js +120 -0
  153. package/dist/commands/machines/dedicated/sign-in-status.d.ts +22 -0
  154. package/dist/commands/machines/dedicated/sign-in-status.js +79 -0
  155. package/dist/commands/machines/dedicated/ssh-config.d.ts +28 -0
  156. package/dist/commands/machines/dedicated/ssh-config.js +66 -0
  157. package/dist/commands/machines/dedicated/ssh-proxy.d.ts +22 -0
  158. package/dist/commands/machines/dedicated/ssh-proxy.js +62 -0
  159. package/dist/commands/machines/dedicated/ssh.d.ts +29 -0
  160. package/dist/commands/machines/dedicated/ssh.js +121 -0
  161. package/dist/commands/native/allow-all.d.ts +14 -0
  162. package/dist/commands/native/allow-all.js +25 -0
  163. package/dist/commands/native/allow.d.ts +24 -0
  164. package/dist/commands/native/allow.js +45 -0
  165. package/dist/commands/native/deny.d.ts +24 -0
  166. package/dist/commands/native/deny.js +43 -0
  167. package/dist/commands/native/disable.d.ts +17 -0
  168. package/dist/commands/native/disable.js +28 -0
  169. package/dist/commands/native/enable.d.ts +12 -0
  170. package/dist/commands/native/enable.js +29 -0
  171. package/dist/commands/native/list-apps.d.ts +19 -0
  172. package/dist/commands/native/list-apps.js +30 -0
  173. package/dist/commands/native/restrict-to.d.ts +22 -0
  174. package/dist/commands/native/restrict-to.js +41 -0
  175. package/dist/commands/native/status.d.ts +19 -0
  176. package/dist/commands/native/status.js +33 -0
  177. package/dist/commands/native.d.ts +39 -0
  178. package/dist/commands/native.js +76 -0
  179. package/dist/commands/service/index.d.ts +14 -0
  180. package/dist/commands/service/index.js +31 -0
  181. package/dist/commands/service/logs.d.ts +18 -0
  182. package/dist/commands/service/logs.js +53 -0
  183. package/dist/commands/service/ls.d.ts +13 -0
  184. package/dist/commands/service/ls.js +48 -0
  185. package/dist/commands/service/propose.d.ts +34 -0
  186. package/dist/commands/service/propose.js +113 -0
  187. package/dist/commands/service/status.d.ts +17 -0
  188. package/dist/commands/service/status.js +56 -0
  189. package/dist/commands/spaces/auto-executor/runs.d.ts +13 -0
  190. package/dist/commands/spaces/auto-executor/runs.js +56 -0
  191. package/dist/commands/store/governance/artifacts.d.ts +25 -0
  192. package/dist/commands/store/governance/artifacts.js +55 -0
  193. package/dist/commands/store/governance/assign.d.ts +16 -0
  194. package/dist/commands/store/governance/assign.js +54 -0
  195. package/dist/commands/store/governance/create-license.d.ts +18 -0
  196. package/dist/commands/store/governance/create-license.js +35 -0
  197. package/dist/commands/store/governance/install-plan.d.ts +25 -0
  198. package/dist/commands/store/governance/install-plan.js +56 -0
  199. package/dist/commands/store/governance/license-policy.d.ts +30 -0
  200. package/dist/commands/store/governance/license-policy.js +69 -0
  201. package/dist/commands/store/governance/policy.d.ts +25 -0
  202. package/dist/commands/store/governance/policy.js +65 -0
  203. package/dist/commands/store/governance/publish-release.d.ts +17 -0
  204. package/dist/commands/store/governance/publish-release.js +34 -0
  205. package/dist/commands/tasks/deliverable/add.d.ts +15 -0
  206. package/dist/commands/tasks/deliverable/add.js +174 -0
  207. package/dist/commands/tasks/deliverable/archive.d.ts +35 -0
  208. package/dist/commands/tasks/deliverable/archive.js +205 -0
  209. package/dist/commands/tasks/labels/detach.js +3 -0
  210. package/dist/commands/tasks/labels/suggest.d.ts +24 -0
  211. package/dist/commands/tasks/labels/suggest.js +69 -0
  212. package/dist/commands/tasks/list.d.ts +16 -2
  213. package/dist/commands/tasks/list.js +100 -24
  214. package/dist/commands/tasks/show.d.ts +23 -0
  215. package/dist/commands/tasks/show.js +51 -1
  216. package/dist/commands/wiki/rm.d.ts +22 -1
  217. package/dist/commands/wiki/rm.js +52 -3
  218. package/dist/lib/agentic-stream.js +10 -2
  219. package/dist/lib/balance.d.ts +6 -1
  220. package/dist/lib/balance.js +15 -0
  221. package/dist/lib/commerce-command.d.ts +48 -0
  222. package/dist/lib/commerce-command.js +70 -0
  223. package/dist/lib/commerce.d.ts +93 -0
  224. package/dist/lib/commerce.js +129 -0
  225. package/dist/lib/commitment-product.js +1 -1
  226. package/dist/lib/commitments.d.ts +202 -29
  227. package/dist/lib/commitments.js +300 -33
  228. package/dist/lib/dedicated-lease-command.js +10 -0
  229. package/dist/lib/dedicated-machines.d.ts +37 -0
  230. package/dist/lib/dedicated-machines.js +47 -0
  231. package/dist/lib/dedicated-service-command.d.ts +60 -0
  232. package/dist/lib/dedicated-service-command.js +182 -0
  233. package/dist/lib/dedicated-service.d.ts +342 -0
  234. package/dist/lib/dedicated-service.js +741 -0
  235. package/dist/lib/dedicated-ssh.d.ts +136 -0
  236. package/dist/lib/dedicated-ssh.js +387 -0
  237. package/dist/lib/delegated-cli.js +51 -13
  238. package/dist/lib/enterprise-commerce.d.ts +67 -0
  239. package/dist/lib/enterprise-commerce.js +112 -0
  240. package/dist/lib/enterprise-external-configuration.d.ts +60 -0
  241. package/dist/lib/enterprise-external-configuration.js +58 -0
  242. package/dist/lib/first-party-harness.js +17 -3
  243. package/dist/lib/governed-store.d.ts +110 -0
  244. package/dist/lib/governed-store.js +79 -0
  245. package/dist/lib/guest-service-command.d.ts +16 -0
  246. package/dist/lib/guest-service-command.js +32 -0
  247. package/dist/lib/guest-service.d.ts +67 -0
  248. package/dist/lib/guest-service.js +112 -0
  249. package/dist/lib/prompt.d.ts +1 -0
  250. package/dist/lib/prompt.js +1 -0
  251. package/dist/lib/task-asset-upload.d.ts +20 -0
  252. package/dist/lib/task-asset-upload.js +30 -8
  253. package/dist/lib/task-extras.d.ts +23 -0
  254. package/dist/lib/task-extras.js +6 -0
  255. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.d.ts +9 -3
  256. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.js +10 -3
  257. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
  258. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +6 -5
  259. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.d.ts +16 -0
  260. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.js +21 -4
  261. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.d.ts +1 -1
  262. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +24 -2
  263. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.d.ts +9 -3
  264. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.js +10 -3
  265. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
  266. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
  267. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.d.ts +16 -0
  268. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.js +20 -4
  269. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.d.ts +1 -1
  270. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +24 -2
  271. package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
  272. package/dist/node_modules/@skrr-ai/data-provider/index.js +5060 -4827
  273. package/oclif.manifest.json +37416 -31416
  274. package/package.json +43 -1
@@ -0,0 +1,25 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * `skrr commitments restore <id>` — bring back a deleted commitment.
4
+ *
5
+ * Deleting is a soft tombstone, so the row and its whole history were always
6
+ * still there; until now there was simply no way for anyone to reach them
7
+ * again, which is the storage cost of a recoverable delete with none of the
8
+ * benefit.
9
+ *
10
+ * It comes back PAUSED, never active. Restoring the record and re-granting the
11
+ * authority to act are two decisions, and the second still has to pass the
12
+ * activation preflight — so a restore can never quietly put an agent back to
13
+ * work.
14
+ */
15
+ export default class CommitmentsRestore extends BaseCommand {
16
+ static description: string;
17
+ static examples: string[];
18
+ static args: {
19
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
20
+ };
21
+ static flags: {
22
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
23
+ };
24
+ run(): Promise<void>;
25
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../base-command");
5
+ const web_url_1 = require("../../lib/web-url");
6
+ const commitments_1 = require("../../lib/commitments");
7
+ /**
8
+ * `skrr commitments restore <id>` — bring back a deleted commitment.
9
+ *
10
+ * Deleting is a soft tombstone, so the row and its whole history were always
11
+ * still there; until now there was simply no way for anyone to reach them
12
+ * again, which is the storage cost of a recoverable delete with none of the
13
+ * benefit.
14
+ *
15
+ * It comes back PAUSED, never active. Restoring the record and re-granting the
16
+ * authority to act are two decisions, and the second still has to pass the
17
+ * activation preflight — so a restore can never quietly put an agent back to
18
+ * work.
19
+ */
20
+ class CommitmentsRestore extends base_command_1.BaseCommand {
21
+ static description = 'Restore a deleted commitment (it comes back paused — resume it separately)';
22
+ static examples = ['<%= config.bin %> commitments restore <commitment-id>'];
23
+ static args = {
24
+ id: core_1.Args.string({ description: 'Commitment ID', required: true, ignoreStdin: true }),
25
+ };
26
+ static flags = { json: core_1.Flags.boolean({ description: 'Output as JSON' }) };
27
+ async run() {
28
+ this.requireAuth();
29
+ const { args, flags } = await this.parse(CommitmentsRestore);
30
+ let commitment;
31
+ try {
32
+ commitment = await commitments_1.commitmentApi.restore(args.id);
33
+ }
34
+ catch (err) {
35
+ this.handleApiError(err);
36
+ }
37
+ if (flags.json) {
38
+ this.log(JSON.stringify((0, web_url_1.withCommitmentUrl)(this.cliConfig.baseURL, commitment), null, 2));
39
+ return;
40
+ }
41
+ this.log(`Restored commitment ${args.id}. It is paused.`);
42
+ this.log(` Start it again with: skrr commitments resume ${args.id}`);
43
+ (0, commitments_1.renderCommitmentSummary)(commitment, (line) => this.log(line));
44
+ }
45
+ }
46
+ exports.default = CommitmentsRestore;
@@ -50,6 +50,38 @@ class CommitmentsShow extends base_command_1.BaseCommand {
50
50
  return;
51
51
  }
52
52
  (0, commitments_1.renderCommitmentSummary)(response.commitment, (line) => this.log(line), response.latestCheck);
53
+ // `show` is the first surface a person reaches after linking something, and
54
+ // it used to render only watchedSources — a freshly linked goal or task was
55
+ // invisible until you knew to run `links list` (OSK-10963).
56
+ try {
57
+ const links = await commitments_1.commitmentApi.workLinks(args.id);
58
+ const active = (links.data || []).filter((link) => link.status === 'active');
59
+ if (active.length) {
60
+ this.log('Links:');
61
+ for (const link of active) {
62
+ const roles = Array.isArray(link.roles) ? link.roles.join(', ') : '';
63
+ this.log(` - ${link.targetType}:${link.targetId}${roles ? ` (${roles})` : ''}${link.isDelivery ? ' · delivery' : ''}`);
64
+ }
65
+ }
66
+ }
67
+ catch {
68
+ // The header still stands on its own when the links read is unavailable.
69
+ }
70
+ // `goals link` writes goal.commitmentId — an edge that lives on the GOAL,
71
+ // so `links list` can never see it. The lineage projection aggregates both
72
+ // link models; without it, a goal the commitment visibly advances is
73
+ // unrenderable from its own headline view (OSK-10963).
74
+ try {
75
+ const lineage = await commitments_1.commitmentApi.workLineage(args.id, 50);
76
+ const hasAny = ['goals', 'tasks', 'runs'].some((key) => Array.isArray(lineage?.[key]) && lineage[key].length > 0);
77
+ if (hasAny) {
78
+ this.log('');
79
+ (0, commitments_1.renderCommitmentLineage)(lineage, (line) => this.log(line));
80
+ }
81
+ }
82
+ catch {
83
+ // Lineage is a hint on the headline view, not load-bearing.
84
+ }
53
85
  try {
54
86
  const receipts = await commitments_1.commitmentApi.receipts(args.id, 1);
55
87
  if (receipts.receipts[0]) {
@@ -62,6 +62,25 @@ function formatTriggerStatus(status) {
62
62
  const lines = [];
63
63
  const commitmentId = String(status.commitmentId ?? '-');
64
64
  lines.push(`Trigger status for ${commitmentId} (plan generation ${String(status.planGeneration ?? '-')})`);
65
+ // OSK-10961: the one-word answer an operator came for — did the plan
66
+ // materialize. Absent on older servers; only rendered when present.
67
+ const convergence = status.convergence;
68
+ if (convergence?.verdict) {
69
+ lines.push(`Convergence: ${String(convergence.verdict).toUpperCase()}`);
70
+ for (const item of convergence.divergent ?? []) {
71
+ lines.push(` - ${item.id ?? '-'} [${String(item.state ?? 'unknown').toUpperCase()}]` +
72
+ (item.reason ? ` — ${item.reason}` : ''));
73
+ }
74
+ // OSK-10943: spent once-wakes and resolver-disabled orphans stay counted
75
+ // but no longer drown the live binding list.
76
+ const retired = convergence.retired;
77
+ if (retired && Number(retired.triggers) > 0) {
78
+ lines.push(` retired residue: ${Number(retired.triggers)} spent trigger` +
79
+ `${Number(retired.triggers) === 1 ? '' : 's'} across ` +
80
+ `${Number(retired.bindings)} binding${Number(retired.bindings) === 1 ? '' : 's'} ` +
81
+ '(fired or disabled — cannot wake this commitment)');
82
+ }
83
+ }
65
84
  const bindings = Array.isArray(status.bindings) ? status.bindings : [];
66
85
  lines.push('');
67
86
  if (bindings.length === 0) {
@@ -91,6 +110,20 @@ function formatTriggerStatus(status) {
91
110
  lines.push(` configured sources: ${(caps.configuredSources ?? []).join(', ') || 'none'}`);
92
111
  lines.push(` eligible sources: ${(caps.eligibleSources ?? []).join(', ') || 'none'}`);
93
112
  lines.push(` materialized sources: ${(caps.materializedSources ?? []).join(', ') || 'none'}`);
113
+ if ((caps.dormantSources ?? []).length) {
114
+ lines.push(` dormant sources: ${caps.dormantSources.join(', ')} (configured but the cadence never requests them)`);
115
+ }
116
+ if ((caps.unroutableSources ?? []).length) {
117
+ lines.push(` unroutable sources: ${caps
118
+ .unroutableSources.map((item) => `${item.source} (${item.reason})`)
119
+ .join(', ')} — materialized but no upstream producer can deliver events`);
120
+ }
121
+ if ((caps.permissionGaps ?? []).length) {
122
+ lines.push(` permission gaps: ${caps
123
+ .permissionGaps.map((gap) => `${gap.source} ${gap.capability ?? gap.permission}` +
124
+ ` (${gap.impact === 'evidence_read' ? 'needed by' : 'blocks'} ${(gap.events ?? []).join(', ')})`)
125
+ .join('; ')} — the routing GitHub installation does not hold the permission`);
126
+ }
94
127
  if (caps.degradedReason)
95
128
  lines.push(` degraded: ${caps.degradedReason}`);
96
129
  const recent = (status.recent ?? {});
@@ -27,6 +27,7 @@ export default class CommitmentsUpdate extends BaseCommand {
27
27
  };
28
28
  static flags: {
29
29
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
30
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
30
31
  'from-json': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
31
32
  'if-version': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
32
33
  title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
4
5
  const base_command_1 = require("../../base-command");
5
- const web_url_1 = require("../../lib/web-url");
6
6
  const prompt_1 = require("../../lib/prompt");
7
+ const web_url_1 = require("../../lib/web-url");
8
+ const prompt_2 = require("../../lib/prompt");
7
9
  const triggers_1 = require("../../lib/triggers");
8
10
  const commitments_1 = require("../../lib/commitments");
9
11
  /**
@@ -40,6 +42,10 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
40
42
  };
41
43
  static flags = {
42
44
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
45
+ yes: core_1.Flags.boolean({
46
+ char: 'y',
47
+ description: 'Skip the confirmation prompt for an irreversible status change',
48
+ }),
43
49
  'from-json': core_1.Flags.string({
44
50
  description: 'Path to a JSON file (or "-" for stdin) for fields not exposed as flags',
45
51
  }),
@@ -143,7 +149,7 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
143
149
  }
144
150
  let payload;
145
151
  try {
146
- payload = await (0, prompt_1.readJsonBody)(flags['from-json']);
152
+ payload = await (0, prompt_2.readJsonBody)(flags['from-json']);
147
153
  if (flags['if-version'] !== undefined)
148
154
  payload.expectedVersion = flags['if-version'];
149
155
  if (flags.title)
@@ -156,8 +162,30 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
156
162
  });
157
163
  if (agentDirective !== undefined)
158
164
  payload.agentDirective = agentDirective;
159
- if (flags.status)
165
+ if (flags.status) {
166
+ // `completed` and `cancelled` END the Commitment: `active` is not
167
+ // reachable from either in one step. They were settable through this
168
+ // generic PATCH with no ceremony at all, while `commitments delete` —
169
+ // whose data is all still on disk, and which is now restorable —
170
+ // prompts. Ceremony should track how hard something is to undo.
171
+ if ((0, data_provider_1.isTerminalCommitmentStatus)(flags.status)) {
172
+ let confirmed;
173
+ try {
174
+ confirmed = await (0, prompt_1.confirmDestructive)(`Set ${args.id} to ${flags.status}? This ends the Commitment — making it active again means archiving it first, then resuming.`, flags.yes);
175
+ }
176
+ catch (err) {
177
+ if (err.exit === 7) {
178
+ this.error(err.message, { exit: 7 });
179
+ }
180
+ throw err;
181
+ }
182
+ if (!confirmed) {
183
+ this.log('Cancelled.');
184
+ return;
185
+ }
186
+ }
160
187
  payload.status = flags.status;
188
+ }
161
189
  if (wantsTarget) {
162
190
  const existing = current?.target ?? {};
163
191
  const outcome = flags.outcome ?? existing.outcome;
@@ -212,8 +240,6 @@ class CommitmentsUpdate extends base_command_1.BaseCommand {
212
240
  cadence.intervalMs = existing.intervalMs;
213
241
  if (existing.timezone)
214
242
  cadence.timezone = existing.timezone;
215
- if (existing.nextCheckAt)
216
- cadence.nextCheckAt = existing.nextCheckAt;
217
243
  if (flags.cadence) {
218
244
  cadence.intervalMs = (0, commitments_1.parseIntervalToMs)(flags.cadence);
219
245
  // Setting an interval on a manual commitment implies interval mode.
@@ -13,7 +13,6 @@ export declare function wakePolicyHeadline(result: {
13
13
  * misconfiguration. Showing only one list would make those indistinguishable.
14
14
  */
15
15
  export default class CommitmentsWakeCapabilities extends BaseCommand {
16
- static hidden: boolean;
17
16
  static description: string;
18
17
  static examples: string[];
19
18
  static args: {
@@ -8,7 +8,12 @@ const format_1 = require("../../lib/format");
8
8
  function wakePolicyHeadline(result) {
9
9
  return result.workPromotionModel === 'monitor_prepare_execute_v1'
10
10
  ? 'Wake behavior: configured Commitment sources may wake it automatically; there is no separate permission level.'
11
- : 'Compatibility wake policy is in use. Migrate the Commitment by choosing Monitor, Prepare, or Execute.';
11
+ : // The Commitment's Monitor/Prepare/Execute mode is a different field —
12
+ // this policy predates the current wake contract, which is why a
13
+ // Commitment already in `execute` mode can still carry the legacy
14
+ // marker. Naming the field avoids the "migrate to what it already is"
15
+ // contradiction.
16
+ 'Wake behavior: this Commitment predates the current wake contract and runs the compatibility policy. Re-saving its mode (Monitor, Prepare, or Execute) stamps the current policy.';
12
17
  }
13
18
  /**
14
19
  * `skrr commitments wake-capabilities <id>` — which wakes an Agent may pick.
@@ -21,9 +26,8 @@ function wakePolicyHeadline(result) {
21
26
  * misconfiguration. Showing only one list would make those indistinguishable.
22
27
  */
23
28
  class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
24
- // Compatibility/operator diagnostic. Product users configure sources and
25
- // cadence directly; v2 has no separate wake-permission level.
26
- static hidden = true;
29
+ // A working command an operator cannot discover is an observability gap, not
30
+ // a product simplification — surfaced by dogfood (OSK-10941).
27
31
  static description = 'Inspect configured wake-source diagnostics for a commitment';
28
32
  static examples = [
29
33
  '<%= config.bin %> commitments wake-capabilities obj_abc123',
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** A draft policy. It constrains nothing until it is published. */
3
+ export default class EnterpriseBudgetsCreate extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const base_command_1 = require("../../../base-command");
4
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
5
+ const commerce_command_1 = require("../../../lib/commerce-command");
6
+ /** A draft policy. It constrains nothing until it is published. */
7
+ class EnterpriseBudgetsCreate extends base_command_1.BaseCommand {
8
+ static description = 'Draft a hierarchical budget policy (admin). It constrains nothing until published.';
9
+ static examples = ['<%= config.bin %> enterprise budgets create --file ./budget.json'];
10
+ static flags = { ...commerce_command_1.jsonBodyFlags };
11
+ async run() {
12
+ this.requireAuth();
13
+ const { flags } = await this.parse(EnterpriseBudgetsCreate);
14
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file);
15
+ let result;
16
+ try {
17
+ result = await (0, enterprise_commerce_1.createEnterpriseBudget)(body);
18
+ }
19
+ catch (error) {
20
+ this.handleApiError(error);
21
+ return;
22
+ }
23
+ this.log(JSON.stringify(result, null, 2));
24
+ this.log('\nDraft only. Next: `enterprise budgets publish <policy-id>`.');
25
+ }
26
+ }
27
+ exports.default = EnterpriseBudgetsCreate;
@@ -0,0 +1,17 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * A read shaped like a write: POST, changes nothing.
4
+ *
5
+ * Worth having as its own verb because it is the only budget command that is
6
+ * safe to run whenever you are unsure — it answers what the published
7
+ * policies WOULD do to a hypothetical charge, without anyone being charged.
8
+ */
9
+ export default class EnterpriseBudgetsEvaluate extends BaseCommand {
10
+ static description: string;
11
+ static examples: string[];
12
+ static flags: {
13
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ };
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const base_command_1 = require("../../../base-command");
4
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
5
+ const commerce_command_1 = require("../../../lib/commerce-command");
6
+ /**
7
+ * A read shaped like a write: POST, changes nothing.
8
+ *
9
+ * Worth having as its own verb because it is the only budget command that is
10
+ * safe to run whenever you are unsure — it answers what the published
11
+ * policies WOULD do to a hypothetical charge, without anyone being charged.
12
+ */
13
+ class EnterpriseBudgetsEvaluate extends base_command_1.BaseCommand {
14
+ static description = 'Ask what the published budget policies would do to a hypothetical charge (admin). Changes nothing.';
15
+ static examples = ['<%= config.bin %> enterprise budgets evaluate --file ./charge.json'];
16
+ static flags = { ...commerce_command_1.jsonBodyFlags };
17
+ async run() {
18
+ this.requireAuth();
19
+ const { flags } = await this.parse(EnterpriseBudgetsEvaluate);
20
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file);
21
+ let result;
22
+ try {
23
+ result = await (0, enterprise_commerce_1.evaluateEnterpriseBudget)(body);
24
+ }
25
+ catch (error) {
26
+ this.handleApiError(error);
27
+ return;
28
+ }
29
+ this.log(JSON.stringify(result, null, 2));
30
+ }
31
+ }
32
+ exports.default = EnterpriseBudgetsEvaluate;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** From here the policy starts refusing spend. Run `evaluate` first if unsure. */
3
+ export default class EnterpriseBudgetsPublish extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ policy: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
6
+ const commerce_command_1 = require("../../../lib/commerce-command");
7
+ /** From here the policy starts refusing spend. Run `evaluate` first if unsure. */
8
+ class EnterpriseBudgetsPublish extends base_command_1.BaseCommand {
9
+ static description = 'Publish a budget policy (admin) — from here it constrains real spend. `enterprise budgets evaluate` answers what it would do, first.';
10
+ static examples = ['<%= config.bin %> enterprise budgets publish <policy-id>'];
11
+ static args = {
12
+ policy: core_1.Args.string({ description: 'Budget policy id', required: true, ignoreStdin: true }),
13
+ };
14
+ static flags = { ...commerce_command_1.jsonBodyFlags };
15
+ async run() {
16
+ this.requireAuth();
17
+ const { args, flags } = await this.parse(EnterpriseBudgetsPublish);
18
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file, { required: false });
19
+ let result;
20
+ try {
21
+ result = await (0, enterprise_commerce_1.publishEnterpriseBudget)(args.policy, body);
22
+ }
23
+ catch (error) {
24
+ this.handleApiError(error);
25
+ return;
26
+ }
27
+ this.log(JSON.stringify(result, null, 2));
28
+ }
29
+ }
30
+ exports.default = EnterpriseBudgetsPublish;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** The step that starts billing. Named plainly for that reason. */
3
+ export default class EnterpriseContractsActivate extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ contract: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
6
+ const commerce_command_1 = require("../../../lib/commerce-command");
7
+ /** The step that starts billing. Named plainly for that reason. */
8
+ class EnterpriseContractsActivate extends base_command_1.BaseCommand {
9
+ static description = 'Activate an issued contract (admin). From here it bills.';
10
+ static examples = ['<%= config.bin %> enterprise contracts activate <contract-id>'];
11
+ static args = {
12
+ contract: core_1.Args.string({ description: 'Contract id', required: true, ignoreStdin: true }),
13
+ };
14
+ static flags = { ...commerce_command_1.jsonBodyFlags };
15
+ async run() {
16
+ this.requireAuth();
17
+ const { args, flags } = await this.parse(EnterpriseContractsActivate);
18
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file, { required: false });
19
+ let result;
20
+ try {
21
+ result = await (0, enterprise_commerce_1.activateEnterpriseContract)(args.contract, body);
22
+ }
23
+ catch (error) {
24
+ this.handleApiError(error);
25
+ return;
26
+ }
27
+ this.log(JSON.stringify(result, null, 2));
28
+ }
29
+ }
30
+ exports.default = EnterpriseContractsActivate;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * Draft a commercial contract. Nothing external happens here and nothing bills
4
+ * — `issue` reaches Stripe, `activate` starts the money.
5
+ */
6
+ export default class EnterpriseContractsCreate extends BaseCommand {
7
+ static description: string;
8
+ static examples: string[];
9
+ static flags: {
10
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const base_command_1 = require("../../../base-command");
4
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
5
+ const commerce_command_1 = require("../../../lib/commerce-command");
6
+ /**
7
+ * Draft a commercial contract. Nothing external happens here and nothing bills
8
+ * — `issue` reaches Stripe, `activate` starts the money.
9
+ */
10
+ class EnterpriseContractsCreate extends base_command_1.BaseCommand {
11
+ static description = 'Draft a commercial contract (admin). Nothing is issued or billed yet.';
12
+ static examples = [
13
+ '<%= config.bin %> enterprise contracts create --file ./contract.json',
14
+ ];
15
+ static flags = { ...commerce_command_1.jsonBodyFlags };
16
+ async run() {
17
+ this.requireAuth();
18
+ const { flags } = await this.parse(EnterpriseContractsCreate);
19
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file);
20
+ let result;
21
+ try {
22
+ result = await (0, enterprise_commerce_1.createEnterpriseContract)(body);
23
+ }
24
+ catch (error) {
25
+ this.handleApiError(error);
26
+ return;
27
+ }
28
+ this.log(JSON.stringify(result, null, 2));
29
+ this.log('\nDraft only. Next: `enterprise contracts issue <contract-id>`.');
30
+ }
31
+ }
32
+ exports.default = EnterpriseContractsCreate;
@@ -0,0 +1,18 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * Mint the contract with Stripe. The first step that reaches outside the
4
+ * platform, which is why it is its own verb and its description says so: an
5
+ * external object may exist after this even if the response never arrives.
6
+ */
7
+ export default class EnterpriseContractsIssue extends BaseCommand {
8
+ static description: string;
9
+ static examples: string[];
10
+ static args: {
11
+ contract: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
12
+ };
13
+ static flags: {
14
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ };
17
+ run(): Promise<void>;
18
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
6
+ const commerce_command_1 = require("../../../lib/commerce-command");
7
+ /**
8
+ * Mint the contract with Stripe. The first step that reaches outside the
9
+ * platform, which is why it is its own verb and its description says so: an
10
+ * external object may exist after this even if the response never arrives.
11
+ */
12
+ class EnterpriseContractsIssue extends base_command_1.BaseCommand {
13
+ static description = 'Issue a drafted contract with Stripe (admin). This reaches an external provider — an object may exist there even if this command fails to report back.';
14
+ static examples = ['<%= config.bin %> enterprise contracts issue <contract-id>'];
15
+ static args = {
16
+ contract: core_1.Args.string({ description: 'Contract id', required: true, ignoreStdin: true }),
17
+ };
18
+ static flags = { ...commerce_command_1.jsonBodyFlags };
19
+ async run() {
20
+ this.requireAuth();
21
+ const { args, flags } = await this.parse(EnterpriseContractsIssue);
22
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file, { required: false });
23
+ let result;
24
+ try {
25
+ result = await (0, enterprise_commerce_1.issueEnterpriseContract)(args.contract, body);
26
+ }
27
+ catch (error) {
28
+ this.handleApiError(error);
29
+ return;
30
+ }
31
+ this.log(JSON.stringify(result, null, 2));
32
+ }
33
+ }
34
+ exports.default = EnterpriseContractsIssue;
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * Start proving a domain. Hands back a challenge you publish yourself.
4
+ *
5
+ * Two commands rather than one for a reason: between `begin` and `verify` a
6
+ * human has to put something in DNS. A single command would have to either
7
+ * block on propagation or report having asked as having proved.
8
+ */
9
+ export default class EnterpriseDomainsBegin extends BaseCommand {
10
+ static description: string;
11
+ static examples: string[];
12
+ static args: {
13
+ workspace: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
14
+ };
15
+ static flags: {
16
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const enterprise_commerce_1 = require("../../../lib/enterprise-commerce");
6
+ const commerce_command_1 = require("../../../lib/commerce-command");
7
+ /**
8
+ * Start proving a domain. Hands back a challenge you publish yourself.
9
+ *
10
+ * Two commands rather than one for a reason: between `begin` and `verify` a
11
+ * human has to put something in DNS. A single command would have to either
12
+ * block on propagation or report having asked as having proved.
13
+ */
14
+ class EnterpriseDomainsBegin extends base_command_1.BaseCommand {
15
+ static description = 'Begin domain verification for an enterprise workspace (admin). Returns a challenge to publish; nothing is verified until `enterprise domains verify`.';
16
+ static examples = [
17
+ '<%= config.bin %> enterprise domains begin <workspace-id> --file ./domain.json',
18
+ ];
19
+ static args = {
20
+ workspace: core_1.Args.string({ description: 'Workspace id', required: true, ignoreStdin: true }),
21
+ };
22
+ static flags = { ...commerce_command_1.jsonBodyFlags };
23
+ async run() {
24
+ this.requireAuth();
25
+ const { args, flags } = await this.parse(EnterpriseDomainsBegin);
26
+ const body = await (0, commerce_command_1.jsonBodyFrom)(this, flags.file);
27
+ let result;
28
+ try {
29
+ result = await (0, enterprise_commerce_1.beginEnterpriseDomainVerification)(args.workspace, body);
30
+ }
31
+ catch (error) {
32
+ this.handleApiError(error);
33
+ return;
34
+ }
35
+ this.log(JSON.stringify(result, null, 2));
36
+ this.log('\nPublish the challenge above, then run `enterprise domains verify`.');
37
+ }
38
+ }
39
+ exports.default = EnterpriseDomainsBegin;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Go and look for the challenge. The server checks; the caller supplies no proof. */
3
+ export default class EnterpriseDomainsVerify extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ workspace: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }