@skrr-ai/cli 0.1.47 → 0.1.49

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 (286) 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/agent-worker.d.ts +12 -0
  5. package/dist/commands/agent-worker.js +140 -0
  6. package/dist/commands/agents/chat.d.ts +21 -0
  7. package/dist/commands/agents/chat.js +26 -9
  8. package/dist/commands/balance/usage/breakdown.d.ts +14 -0
  9. package/dist/commands/balance/usage/breakdown.js +68 -0
  10. package/dist/commands/balance/usage.js +24 -0
  11. package/dist/commands/commerce/entitlements/explain.d.ts +22 -0
  12. package/dist/commands/commerce/entitlements/explain.js +40 -0
  13. package/dist/commands/commerce/incidents/audit.d.ts +20 -0
  14. package/dist/commands/commerce/incidents/audit.js +37 -0
  15. package/dist/commands/commerce/incidents/list.d.ts +22 -0
  16. package/dist/commands/commerce/incidents/list.js +49 -0
  17. package/dist/commands/commerce/incidents/resolve.d.ts +23 -0
  18. package/dist/commands/commerce/incidents/resolve.js +45 -0
  19. package/dist/commands/commerce/incidents/retry.d.ts +22 -0
  20. package/dist/commands/commerce/incidents/retry.js +45 -0
  21. package/dist/commands/commerce/incidents/show.d.ts +13 -0
  22. package/dist/commands/commerce/incidents/show.js +30 -0
  23. package/dist/commands/commerce/offers/approve.d.ts +17 -0
  24. package/dist/commands/commerce/offers/approve.js +33 -0
  25. package/dist/commands/commerce/offers/create.d.ts +18 -0
  26. package/dist/commands/commerce/offers/create.js +34 -0
  27. package/dist/commands/commerce/offers/publish.d.ts +13 -0
  28. package/dist/commands/commerce/offers/publish.js +28 -0
  29. package/dist/commands/commerce/offers/retire.d.ts +17 -0
  30. package/dist/commands/commerce/offers/retire.js +32 -0
  31. package/dist/commands/commerce/offers/validate.d.ts +18 -0
  32. package/dist/commands/commerce/offers/validate.js +33 -0
  33. package/dist/commands/commerce/products/create.d.ts +10 -0
  34. package/dist/commands/commerce/products/create.js +25 -0
  35. package/dist/commands/commerce/promotions/redeem.d.ts +13 -0
  36. package/dist/commands/commerce/promotions/redeem.js +32 -0
  37. package/dist/commands/commerce/terms/accept.d.ts +18 -0
  38. package/dist/commands/commerce/terms/accept.js +39 -0
  39. package/dist/commands/commerce/terms/show.d.ts +10 -0
  40. package/dist/commands/commerce/terms/show.js +34 -0
  41. package/dist/commands/commerce/trials/conversion-preview.d.ts +18 -0
  42. package/dist/commands/commerce/trials/conversion-preview.js +39 -0
  43. package/dist/commands/commerce/trials/start.d.ts +23 -0
  44. package/dist/commands/commerce/trials/start.js +58 -0
  45. package/dist/commands/commitments/accounting.d.ts +39 -0
  46. package/dist/commands/commitments/accounting.js +116 -0
  47. package/dist/commands/commitments/action-history.d.ts +1 -0
  48. package/dist/commands/commitments/action-history.js +8 -1
  49. package/dist/commands/commitments/case.d.ts +1 -0
  50. package/dist/commands/commitments/case.js +19 -3
  51. package/dist/commands/commitments/cases.d.ts +1 -0
  52. package/dist/commands/commitments/cases.js +11 -1
  53. package/dist/commands/commitments/checks.d.ts +1 -0
  54. package/dist/commands/commitments/checks.js +5 -1
  55. package/dist/commands/commitments/cost.d.ts +62 -0
  56. package/dist/commands/commitments/cost.js +130 -0
  57. package/dist/commands/commitments/create.js +1 -1
  58. package/dist/commands/commitments/delete.d.ts +1 -0
  59. package/dist/commands/commitments/delete.js +56 -6
  60. package/dist/commands/commitments/feedback.js +9 -1
  61. package/dist/commands/commitments/handover.js +16 -0
  62. package/dist/commands/commitments/hypotheses.d.ts +1 -0
  63. package/dist/commands/commitments/hypotheses.js +17 -2
  64. package/dist/commands/commitments/links/list.js +4 -1
  65. package/dist/commands/commitments/liveness.d.ts +18 -0
  66. package/dist/commands/commitments/liveness.js +80 -0
  67. package/dist/commands/commitments/metrics.d.ts +1 -0
  68. package/dist/commands/commitments/metrics.js +8 -1
  69. package/dist/commands/commitments/next-tick.d.ts +39 -0
  70. package/dist/commands/commitments/next-tick.js +122 -0
  71. package/dist/commands/commitments/observations.d.ts +1 -0
  72. package/dist/commands/commitments/observations.js +19 -2
  73. package/dist/commands/commitments/pause.js +12 -0
  74. package/dist/commands/commitments/receipt.d.ts +2 -0
  75. package/dist/commands/commitments/receipt.js +16 -2
  76. package/dist/commands/commitments/remediation-proposal.js +6 -2
  77. package/dist/commands/commitments/remediation-proposals.js +5 -1
  78. package/dist/commands/commitments/restore.d.ts +25 -0
  79. package/dist/commands/commitments/restore.js +46 -0
  80. package/dist/commands/commitments/show.js +32 -0
  81. package/dist/commands/commitments/trigger-status.js +33 -0
  82. package/dist/commands/commitments/update.d.ts +1 -0
  83. package/dist/commands/commitments/update.js +31 -5
  84. package/dist/commands/commitments/wake-capabilities.d.ts +0 -1
  85. package/dist/commands/commitments/wake-capabilities.js +8 -4
  86. package/dist/commands/enterprise/budgets/create.d.ts +11 -0
  87. package/dist/commands/enterprise/budgets/create.js +27 -0
  88. package/dist/commands/enterprise/budgets/evaluate.d.ts +17 -0
  89. package/dist/commands/enterprise/budgets/evaluate.js +32 -0
  90. package/dist/commands/enterprise/budgets/publish.d.ts +14 -0
  91. package/dist/commands/enterprise/budgets/publish.js +30 -0
  92. package/dist/commands/enterprise/contracts/activate.d.ts +14 -0
  93. package/dist/commands/enterprise/contracts/activate.js +30 -0
  94. package/dist/commands/enterprise/contracts/create.d.ts +14 -0
  95. package/dist/commands/enterprise/contracts/create.js +32 -0
  96. package/dist/commands/enterprise/contracts/issue.d.ts +18 -0
  97. package/dist/commands/enterprise/contracts/issue.js +34 -0
  98. package/dist/commands/enterprise/domains/begin.d.ts +20 -0
  99. package/dist/commands/enterprise/domains/begin.js +39 -0
  100. package/dist/commands/enterprise/domains/verify.d.ts +14 -0
  101. package/dist/commands/enterprise/domains/verify.js +32 -0
  102. package/dist/commands/enterprise/external-config/activate.d.ts +22 -0
  103. package/dist/commands/enterprise/external-config/activate.js +49 -0
  104. package/dist/commands/enterprise/external-config/set.d.ts +25 -0
  105. package/dist/commands/enterprise/external-config/set.js +123 -0
  106. package/dist/commands/enterprise/external-config/show.d.ts +12 -0
  107. package/dist/commands/enterprise/external-config/show.js +39 -0
  108. package/dist/commands/enterprise/external-config/suspend.d.ts +13 -0
  109. package/dist/commands/enterprise/external-config/suspend.js +41 -0
  110. package/dist/commands/enterprise/finance/close-snapshot.d.ts +11 -0
  111. package/dist/commands/enterprise/finance/close-snapshot.js +28 -0
  112. package/dist/commands/enterprise/finance/record-document.d.ts +18 -0
  113. package/dist/commands/enterprise/finance/record-document.js +35 -0
  114. package/dist/commands/enterprise/profile.d.ts +20 -0
  115. package/dist/commands/enterprise/profile.js +38 -0
  116. package/dist/commands/login.d.ts +13 -0
  117. package/dist/commands/login.js +77 -0
  118. package/dist/commands/machines/dedicated/index.js +3 -0
  119. package/dist/commands/machines/dedicated/service/apply.d.ts +23 -0
  120. package/dist/commands/machines/dedicated/service/apply.js +99 -0
  121. package/dist/commands/machines/dedicated/service/approve.d.ts +23 -0
  122. package/dist/commands/machines/dedicated/service/approve.js +52 -0
  123. package/dist/commands/machines/dedicated/service/create.d.ts +55 -0
  124. package/dist/commands/machines/dedicated/service/create.js +222 -0
  125. package/dist/commands/machines/dedicated/service/edit.d.ts +30 -0
  126. package/dist/commands/machines/dedicated/service/edit.js +146 -0
  127. package/dist/commands/machines/dedicated/service/exec.d.ts +26 -0
  128. package/dist/commands/machines/dedicated/service/exec.js +92 -0
  129. package/dist/commands/machines/dedicated/service/export.d.ts +29 -0
  130. package/dist/commands/machines/dedicated/service/export.js +106 -0
  131. package/dist/commands/machines/dedicated/service/index.d.ts +14 -0
  132. package/dist/commands/machines/dedicated/service/index.js +49 -0
  133. package/dist/commands/machines/dedicated/service/logs.d.ts +33 -0
  134. package/dist/commands/machines/dedicated/service/logs.js +148 -0
  135. package/dist/commands/machines/dedicated/service/ls.d.ts +20 -0
  136. package/dist/commands/machines/dedicated/service/ls.js +80 -0
  137. package/dist/commands/machines/dedicated/service/restart.d.ts +14 -0
  138. package/dist/commands/machines/dedicated/service/restart.js +29 -0
  139. package/dist/commands/machines/dedicated/service/rm.d.ts +20 -0
  140. package/dist/commands/machines/dedicated/service/rm.js +33 -0
  141. package/dist/commands/machines/dedicated/service/secret/index.d.ts +14 -0
  142. package/dist/commands/machines/dedicated/service/secret/index.js +25 -0
  143. package/dist/commands/machines/dedicated/service/secret/rm.d.ts +22 -0
  144. package/dist/commands/machines/dedicated/service/secret/rm.js +54 -0
  145. package/dist/commands/machines/dedicated/service/secret/set.d.ts +22 -0
  146. package/dist/commands/machines/dedicated/service/secret/set.js +93 -0
  147. package/dist/commands/machines/dedicated/service/start.d.ts +14 -0
  148. package/dist/commands/machines/dedicated/service/start.js +29 -0
  149. package/dist/commands/machines/dedicated/service/status.d.ts +21 -0
  150. package/dist/commands/machines/dedicated/service/status.js +85 -0
  151. package/dist/commands/machines/dedicated/service/stop.d.ts +20 -0
  152. package/dist/commands/machines/dedicated/service/stop.js +35 -0
  153. package/dist/commands/machines/dedicated/service/top.d.ts +22 -0
  154. package/dist/commands/machines/dedicated/service/top.js +120 -0
  155. package/dist/commands/machines/dedicated/sign-in-status.d.ts +22 -0
  156. package/dist/commands/machines/dedicated/sign-in-status.js +79 -0
  157. package/dist/commands/machines/dedicated/ssh-config.d.ts +28 -0
  158. package/dist/commands/machines/dedicated/ssh-config.js +66 -0
  159. package/dist/commands/machines/dedicated/ssh-proxy.d.ts +22 -0
  160. package/dist/commands/machines/dedicated/ssh-proxy.js +62 -0
  161. package/dist/commands/machines/dedicated/ssh.d.ts +29 -0
  162. package/dist/commands/machines/dedicated/ssh.js +121 -0
  163. package/dist/commands/native/allow-all.d.ts +14 -0
  164. package/dist/commands/native/allow-all.js +25 -0
  165. package/dist/commands/native/allow.d.ts +24 -0
  166. package/dist/commands/native/allow.js +45 -0
  167. package/dist/commands/native/deny.d.ts +24 -0
  168. package/dist/commands/native/deny.js +43 -0
  169. package/dist/commands/native/disable.d.ts +17 -0
  170. package/dist/commands/native/disable.js +28 -0
  171. package/dist/commands/native/enable.d.ts +12 -0
  172. package/dist/commands/native/enable.js +29 -0
  173. package/dist/commands/native/list-apps.d.ts +19 -0
  174. package/dist/commands/native/list-apps.js +30 -0
  175. package/dist/commands/native/restrict-to.d.ts +22 -0
  176. package/dist/commands/native/restrict-to.js +41 -0
  177. package/dist/commands/native/status.d.ts +19 -0
  178. package/dist/commands/native/status.js +33 -0
  179. package/dist/commands/native.d.ts +39 -0
  180. package/dist/commands/native.js +76 -0
  181. package/dist/commands/service/index.d.ts +14 -0
  182. package/dist/commands/service/index.js +31 -0
  183. package/dist/commands/service/logs.d.ts +18 -0
  184. package/dist/commands/service/logs.js +53 -0
  185. package/dist/commands/service/ls.d.ts +13 -0
  186. package/dist/commands/service/ls.js +48 -0
  187. package/dist/commands/service/propose.d.ts +34 -0
  188. package/dist/commands/service/propose.js +113 -0
  189. package/dist/commands/service/status.d.ts +17 -0
  190. package/dist/commands/service/status.js +56 -0
  191. package/dist/commands/spaces/auto-executor/runs.d.ts +13 -0
  192. package/dist/commands/spaces/auto-executor/runs.js +56 -0
  193. package/dist/commands/store/governance/artifacts.d.ts +25 -0
  194. package/dist/commands/store/governance/artifacts.js +55 -0
  195. package/dist/commands/store/governance/assign.d.ts +16 -0
  196. package/dist/commands/store/governance/assign.js +54 -0
  197. package/dist/commands/store/governance/create-license.d.ts +18 -0
  198. package/dist/commands/store/governance/create-license.js +35 -0
  199. package/dist/commands/store/governance/install-plan.d.ts +25 -0
  200. package/dist/commands/store/governance/install-plan.js +56 -0
  201. package/dist/commands/store/governance/license-policy.d.ts +30 -0
  202. package/dist/commands/store/governance/license-policy.js +69 -0
  203. package/dist/commands/store/governance/policy.d.ts +25 -0
  204. package/dist/commands/store/governance/policy.js +65 -0
  205. package/dist/commands/store/governance/publish-release.d.ts +17 -0
  206. package/dist/commands/store/governance/publish-release.js +34 -0
  207. package/dist/commands/tasks/deliverable/add.d.ts +15 -0
  208. package/dist/commands/tasks/deliverable/add.js +174 -0
  209. package/dist/commands/tasks/deliverable/archive.d.ts +35 -0
  210. package/dist/commands/tasks/deliverable/archive.js +205 -0
  211. package/dist/commands/tasks/labels/detach.js +3 -0
  212. package/dist/commands/tasks/labels/suggest.d.ts +24 -0
  213. package/dist/commands/tasks/labels/suggest.js +69 -0
  214. package/dist/commands/tasks/list.d.ts +16 -2
  215. package/dist/commands/tasks/list.js +100 -24
  216. package/dist/commands/tasks/show.d.ts +23 -0
  217. package/dist/commands/tasks/show.js +51 -1
  218. package/dist/commands/wiki/rm.d.ts +22 -1
  219. package/dist/commands/wiki/rm.js +52 -3
  220. package/dist/lib/agentic-stream.js +10 -2
  221. package/dist/lib/balance.d.ts +6 -1
  222. package/dist/lib/balance.js +15 -0
  223. package/dist/lib/commerce-command.d.ts +48 -0
  224. package/dist/lib/commerce-command.js +70 -0
  225. package/dist/lib/commerce.d.ts +93 -0
  226. package/dist/lib/commerce.js +129 -0
  227. package/dist/lib/commitment-product.js +1 -1
  228. package/dist/lib/commitments.d.ts +202 -29
  229. package/dist/lib/commitments.js +300 -33
  230. package/dist/lib/daemon-installer.d.ts +6 -5
  231. package/dist/lib/daemon-installer.js +4 -17
  232. package/dist/lib/dedicated-lease-command.js +10 -0
  233. package/dist/lib/dedicated-machines.d.ts +37 -0
  234. package/dist/lib/dedicated-machines.js +47 -0
  235. package/dist/lib/dedicated-service-command.d.ts +60 -0
  236. package/dist/lib/dedicated-service-command.js +182 -0
  237. package/dist/lib/dedicated-service.d.ts +342 -0
  238. package/dist/lib/dedicated-service.js +741 -0
  239. package/dist/lib/dedicated-ssh.d.ts +136 -0
  240. package/dist/lib/dedicated-ssh.js +387 -0
  241. package/dist/lib/delegated-cli.js +51 -13
  242. package/dist/lib/enterprise-commerce.d.ts +67 -0
  243. package/dist/lib/enterprise-commerce.js +112 -0
  244. package/dist/lib/enterprise-external-configuration.d.ts +60 -0
  245. package/dist/lib/enterprise-external-configuration.js +58 -0
  246. package/dist/lib/first-party-harness.js +17 -3
  247. package/dist/lib/governed-store.d.ts +110 -0
  248. package/dist/lib/governed-store.js +79 -0
  249. package/dist/lib/guest-service-command.d.ts +16 -0
  250. package/dist/lib/guest-service-command.js +32 -0
  251. package/dist/lib/guest-service.d.ts +67 -0
  252. package/dist/lib/guest-service.js +112 -0
  253. package/dist/lib/prompt.d.ts +1 -0
  254. package/dist/lib/prompt.js +1 -0
  255. package/dist/lib/task-asset-upload.d.ts +20 -0
  256. package/dist/lib/task-asset-upload.js +30 -8
  257. package/dist/lib/task-extras.d.ts +23 -0
  258. package/dist/lib/task-extras.js +6 -0
  259. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.d.ts +9 -3
  260. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.js +10 -3
  261. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.d.ts +1 -1
  262. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.js +1 -1
  263. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +2 -2
  264. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +8 -5
  265. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.d.ts +16 -0
  266. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.js +21 -4
  267. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseManifest.d.ts +38 -0
  268. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/releaseManifest.js +66 -1
  269. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.d.ts +1 -1
  270. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +24 -2
  271. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.d.ts +9 -3
  272. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.js +10 -3
  273. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.d.ts +1 -1
  274. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.js +1 -1
  275. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +2 -2
  276. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -2
  277. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.d.ts +16 -0
  278. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.js +20 -4
  279. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseManifest.d.ts +38 -0
  280. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/releaseManifest.js +64 -0
  281. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.d.ts +1 -1
  282. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +24 -2
  283. package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
  284. package/dist/node_modules/@skrr-ai/data-provider/index.js +5060 -4827
  285. package/oclif.manifest.json +35194 -29157
  286. package/package.json +43 -1
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nativeProfileFlag = void 0;
4
+ exports.profilePassthrough = profilePassthrough;
5
+ exports.buildNativeArgs = buildNativeArgs;
6
+ exports.forwardNativeCommand = forwardNativeCommand;
7
+ const core_1 = require("@oclif/core");
8
+ const exec_runtime_binary_1 = require("../lib/exec-runtime-binary");
9
+ /**
10
+ * `--profile` is a GLOBAL flag on the runtime binary, so every `skrr native`
11
+ * subcommand has to declare it to be reachable — `native status` itself tells
12
+ * users "use --profile to target one" when sibling profiles have live daemons,
13
+ * and without this declaration that advice could not be followed (OSK-11100).
14
+ */
15
+ exports.nativeProfileFlag = {
16
+ profile: core_1.Flags.string({
17
+ description: 'Which daemon profile to target — `native status` lists the running ones',
18
+ }),
19
+ };
20
+ /** The passthrough form of the parsed profile flag, or nothing. */
21
+ function profilePassthrough(profile) {
22
+ return profile ? ['--profile', profile] : [];
23
+ }
24
+ function buildNativeArgs(passthrough) {
25
+ return ['native', ...passthrough];
26
+ }
27
+ /**
28
+ * Forward one `skrr native` command to the daemon.
29
+ *
30
+ * Native application control is consent that belongs to the person at the
31
+ * machine, so the setting lives in that machine's `daemon.json` and a cloud
32
+ * request can never write it (OSK-11018). The CLI is a bridge for the same
33
+ * reason `skrr browser` is: the capability is the daemon's, and a second
34
+ * implementation here would be a second place for the policy to drift.
35
+ *
36
+ * Until this existed the setting had NO command at all. The executor's own
37
+ * refusal told users to "set `nativeUi.enabled` and `nativeUi.allowCloudAgents`
38
+ * in the local daemon configuration" — a file it did not name — so the product's
39
+ * answer to "how do I turn this on" was to open a JSON file.
40
+ */
41
+ async function forwardNativeCommand(command, passthrough) {
42
+ try {
43
+ if ((await (0, exec_runtime_binary_1.runtimeBinarySupportsSubcommand)('native')) === false) {
44
+ command.error('The local `skrr` daemon does not support native application control yet. ' +
45
+ 'Update or reinstall the daemon, then retry `skrr native`.', { exit: 2 });
46
+ }
47
+ command.exit(await (0, exec_runtime_binary_1.execRuntimeBinary)(buildNativeArgs(passthrough)));
48
+ }
49
+ catch (error) {
50
+ if (error.message === 'runtime-binary-not-installed') {
51
+ command.log((0, exec_runtime_binary_1.notInstalledMessage)());
52
+ command.exit(127);
53
+ }
54
+ throw error;
55
+ }
56
+ }
57
+ /**
58
+ * `skrr native` is the stable user-facing entry point for native application
59
+ * control. Keeping it a thin bridge is what stops the REST CLI acquiring its
60
+ * own copy of the app-scope rules.
61
+ */
62
+ class Native extends core_1.Command {
63
+ static description = 'Configure and diagnose native application control on this computer';
64
+ static examples = [
65
+ '<%= config.bin %> native status',
66
+ '<%= config.bin %> native enable --cloud-agents',
67
+ '<%= config.bin %> native list-apps',
68
+ '<%= config.bin %> native allow "Slack"',
69
+ ];
70
+ static strict = false;
71
+ async run() {
72
+ const { argv } = await this.parse(Native);
73
+ await forwardNativeCommand(this, argv);
74
+ }
75
+ }
76
+ exports.default = Native;
@@ -0,0 +1,14 @@
1
+ import { Command } from '@oclif/core';
2
+ /**
3
+ * `skrr service` — the guest-local face of declared services.
4
+ *
5
+ * These commands run INSIDE a Dedicated Runtime guest, on the daemon's
6
+ * workload socket — the lane agents use to propose a service to the owner
7
+ * and to read what services exist. The owner-facing equivalents live at
8
+ * `skrr machines dedicated service`.
9
+ */
10
+ export default class ServiceCommands extends Command {
11
+ static description: string;
12
+ static examples: string[];
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ /**
5
+ * `skrr service` — the guest-local face of declared services.
6
+ *
7
+ * These commands run INSIDE a Dedicated Runtime guest, on the daemon's
8
+ * workload socket — the lane agents use to propose a service to the owner
9
+ * and to read what services exist. The owner-facing equivalents live at
10
+ * `skrr machines dedicated service`.
11
+ */
12
+ class ServiceCommands extends core_1.Command {
13
+ static description = 'Services on this Dedicated Runtime — propose one to the owner, or list/status/logs what is declared (guest-local)';
14
+ static examples = [
15
+ '<%= config.bin %> service propose --file service.json',
16
+ '<%= config.bin %> service propose --name worker --cwd /workspace/repos/app -- node dist/worker.js',
17
+ '<%= config.bin %> service ls',
18
+ '<%= config.bin %> service status <name>',
19
+ '<%= config.bin %> service logs <name> --tail 4096',
20
+ ];
21
+ async run() {
22
+ this.log('skrr service commands (run on the machine itself):');
23
+ this.log(' skrr service propose ask the owner to declare a service (agent lane)');
24
+ this.log(' skrr service ls list declared services');
25
+ this.log(' skrr service status one service’s computed state');
26
+ this.log(' skrr service logs print a service’s log tail');
27
+ this.log('');
28
+ this.log('Owner-side management from your own machine: `skrr machines dedicated service`.');
29
+ }
30
+ }
31
+ exports.default = ServiceCommands;
@@ -0,0 +1,18 @@
1
+ import { GuestServiceCommand } from '../../lib/guest-service-command';
2
+ /**
3
+ * `skrr service logs` — a byte tail of a service's stored log, read on the
4
+ * machine itself (guest-local, read-only, no follow — the owner lane follows
5
+ * over the relay).
6
+ */
7
+ export default class ServiceLogs extends GuestServiceCommand {
8
+ static summary: string;
9
+ static examples: string[];
10
+ static args: {
11
+ name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
12
+ };
13
+ static flags: {
14
+ tail: import("@oclif/core/lib/interfaces").OptionFlag<number | 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,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const guest_service_command_1 = require("../../lib/guest-service-command");
5
+ /**
6
+ * `skrr service logs` — a byte tail of a service's stored log, read on the
7
+ * machine itself (guest-local, read-only, no follow — the owner lane follows
8
+ * over the relay).
9
+ */
10
+ class ServiceLogs extends guest_service_command_1.GuestServiceCommand {
11
+ static summary = 'Print a service’s log tail on this machine (guest-local)';
12
+ static examples = [
13
+ '<%= config.bin %> service logs <name>',
14
+ '<%= config.bin %> service logs <name> --tail 4096',
15
+ ];
16
+ static args = {
17
+ name: core_1.Args.string({ description: 'Service name', required: true, ignoreStdin: true }),
18
+ };
19
+ static flags = {
20
+ tail: core_1.Flags.integer({
21
+ description: 'Bytes from the end of the stored log to print (daemon rotates at 8 MiB)',
22
+ min: 0,
23
+ }),
24
+ json: core_1.Flags.boolean({ description: 'Output the reply as JSON' }),
25
+ };
26
+ async run() {
27
+ this.requireGuest();
28
+ const { args, flags } = await this.parse(ServiceLogs);
29
+ const reply = await this.guestRead('logs', {
30
+ name: args.name,
31
+ ...(flags.tail !== undefined ? { tailBytes: flags.tail } : {}),
32
+ });
33
+ const result = (reply.result ?? reply);
34
+ if (flags.json) {
35
+ this.log(JSON.stringify(result, null, 2));
36
+ return;
37
+ }
38
+ // The daemon's `data` is base64 — write the decoded BYTES verbatim; a
39
+ // utf8 round-trip mangles non-text output (the same rule the owner-lane
40
+ // `service logs` follows).
41
+ if (typeof result.data === 'string' && result.data.length > 0) {
42
+ const bytes = Buffer.from(result.data, 'base64');
43
+ process.stdout.write(bytes);
44
+ if (bytes.length > 0 && bytes[bytes.length - 1] !== 0x0a)
45
+ process.stdout.write('\n');
46
+ return;
47
+ }
48
+ const text = result.log ?? '';
49
+ if (text)
50
+ process.stdout.write(text.endsWith('\n') ? text : `${text}\n`);
51
+ }
52
+ }
53
+ exports.default = ServiceLogs;
@@ -0,0 +1,13 @@
1
+ import { GuestServiceCommand } from '../../lib/guest-service-command';
2
+ /**
3
+ * `skrr service ls` — the services declared on this machine, read from the
4
+ * daemon's workload socket (guest-local, read-only).
5
+ */
6
+ export default class ServiceLs extends GuestServiceCommand {
7
+ static summary: string;
8
+ static examples: string[];
9
+ static flags: {
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const guest_service_command_1 = require("../../lib/guest-service-command");
5
+ const format_1 = require("../../lib/format");
6
+ /**
7
+ * `skrr service ls` — the services declared on this machine, read from the
8
+ * daemon's workload socket (guest-local, read-only).
9
+ */
10
+ class ServiceLs extends guest_service_command_1.GuestServiceCommand {
11
+ static summary = 'List services declared on this machine (guest-local)';
12
+ static examples = [
13
+ '<%= config.bin %> service ls',
14
+ '<%= config.bin %> service ls --json',
15
+ ];
16
+ static flags = {
17
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
18
+ };
19
+ async run() {
20
+ this.requireGuest();
21
+ const { flags } = await this.parse(ServiceLs);
22
+ const reply = await this.guestRead('list');
23
+ const result = (reply.result ?? reply);
24
+ if (flags.json) {
25
+ this.log(JSON.stringify(result, null, 2));
26
+ return;
27
+ }
28
+ const services = result.services ?? [];
29
+ if (services.length === 0) {
30
+ this.log('No declared services on this machine.');
31
+ return;
32
+ }
33
+ (0, format_1.renderTable)(services.map((svc) => ({
34
+ // The daemon's list rows name a service only under `spec.name` —
35
+ // without the fallback every NAME cell renders "-".
36
+ name: (0, format_1.formatCell)(svc.name ?? svc.spec?.name),
37
+ status: (0, format_1.formatCell)(svc.status ?? 'unknown'),
38
+ restart: (0, format_1.formatCell)(svc.restart ?? svc.spec?.restart),
39
+ createdBy: (0, format_1.formatCell)(svc.createdBy ?? svc.spec?.createdBy),
40
+ })), [
41
+ { key: 'name', header: 'NAME', verbatim: true },
42
+ { key: 'status', header: 'STATUS' },
43
+ { key: 'restart', header: 'RESTART' },
44
+ { key: 'createdBy', header: 'CREATED BY' },
45
+ ], (line) => this.log(line));
46
+ }
47
+ }
48
+ exports.default = ServiceLs;
@@ -0,0 +1,34 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * `skrr service propose` — the agent lane for a service that should keep
4
+ * running.
5
+ *
6
+ * Runs INSIDE a Dedicated Runtime guest: the spec is written to the daemon's
7
+ * workload socket and lands as a proposal the owner approves or rejects —
8
+ * nothing runs on the proposal alone. The daemon derives who proposed it
9
+ * from the calling process, so provenance is real, not a claim in the JSON.
10
+ */
11
+ export default class ServicePropose extends BaseCommand {
12
+ static summary: string;
13
+ static description: string;
14
+ static examples: string[];
15
+ static usage: string;
16
+ static args: {
17
+ command: import("@oclif/core/lib/interfaces").Arg<string[] | undefined, Record<string, unknown>>;
18
+ };
19
+ static flags: {
20
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
22
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
23
+ cwd: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
24
+ env: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
25
+ restart: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
26
+ notify: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
27
+ 'stop-timeout': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
28
+ 'limit-memory': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
29
+ 'limit-cpu': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
30
+ 'limit-pids': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
31
+ };
32
+ run(): Promise<void>;
33
+ private resolveSpec;
34
+ }
@@ -0,0 +1,113 @@
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 dedicated_service_command_1 = require("../../lib/dedicated-service-command");
6
+ const dedicated_service_1 = require("../../lib/dedicated-service");
7
+ const guest_service_1 = require("../../lib/guest-service");
8
+ const exec_1 = require("../machines/hosted/exec");
9
+ /**
10
+ * `skrr service propose` — the agent lane for a service that should keep
11
+ * running.
12
+ *
13
+ * Runs INSIDE a Dedicated Runtime guest: the spec is written to the daemon's
14
+ * workload socket and lands as a proposal the owner approves or rejects —
15
+ * nothing runs on the proposal alone. The daemon derives who proposed it
16
+ * from the calling process, so provenance is real, not a claim in the JSON.
17
+ */
18
+ class ServicePropose extends base_command_1.BaseCommand {
19
+ static summary = 'Propose an always-on service to this machine’s owner (guest-local)';
20
+ static description = 'Writes a service spec to the machine’s daemon, which parks it as a pending proposal. ' +
21
+ 'The owner approves it with `skrr machines dedicated service approve <lease-id> <name>` — ' +
22
+ 'approval is what makes it run. Runs only on a Dedicated Runtime guest.';
23
+ static examples = [
24
+ '<%= config.bin %> service propose --file service.json',
25
+ '<%= config.bin %> service propose --name worker --cwd /workspace/repos/app -- node dist/worker.js',
26
+ ];
27
+ static usage = 'service propose [flags] -- <command...>';
28
+ static args = {
29
+ command: core_1.Args.string({
30
+ description: 'The service command and its arguments, after --',
31
+ multiple: true,
32
+ required: false,
33
+ ignoreStdin: true,
34
+ }),
35
+ };
36
+ static flags = {
37
+ ...dedicated_service_command_1.serviceSpecFlags,
38
+ file: core_1.Flags.string({ description: 'Read the spec from a service.json file instead of flags' }),
39
+ json: core_1.Flags.boolean({ description: 'Output the proposal as JSON' }),
40
+ };
41
+ async run() {
42
+ if (!(0, dedicated_service_1.runningOnDedicatedRuntimeGuest)()) {
43
+ this.error('`skrr service propose` runs inside a Dedicated Runtime guest — this is not one. ' +
44
+ 'To declare a service on your own machine use `skrr machines dedicated service create <lease-id> …`.', { exit: 2 });
45
+ }
46
+ const { head, tail } = (0, exec_1.splitExecArgv)(this.argv);
47
+ const { args, flags } = await this.parse(ServicePropose, head);
48
+ let spec;
49
+ try {
50
+ spec = this.resolveSpec(flags, tail ?? args.command ?? []);
51
+ }
52
+ catch (err) {
53
+ if (err instanceof dedicated_service_1.DedicatedServiceError)
54
+ this.error(err.message, { exit: 2 });
55
+ throw err;
56
+ }
57
+ const errors = (0, dedicated_service_1.validateServiceSpec)(spec);
58
+ if (errors.length > 0) {
59
+ this.error(`The service spec is not valid:\n${errors.map((e) => ` - ${e}`).join('\n')}`, {
60
+ exit: 2,
61
+ });
62
+ }
63
+ let proposalId;
64
+ let reply;
65
+ try {
66
+ ({ proposalId, reply } = await (0, guest_service_1.proposeGuestService)(spec));
67
+ }
68
+ catch (err) {
69
+ if (err instanceof dedicated_service_1.DedicatedServiceError)
70
+ this.error(err.message, { exit: 1 });
71
+ throw err;
72
+ }
73
+ if (flags.json) {
74
+ this.log(JSON.stringify({ proposalId: proposalId || undefined, spec: (0, dedicated_service_1.specPayload)(spec), reply }, null, 2));
75
+ return;
76
+ }
77
+ this.log(`Proposed service ${spec.name}${proposalId ? ` (proposal ${proposalId})` : ''}. ` +
78
+ 'Nothing runs until the owner approves it with ' +
79
+ `\`skrr machines dedicated service approve <lease-id> ${spec.name}\`.`);
80
+ }
81
+ resolveSpec(flags, argv) {
82
+ const file = flags.file;
83
+ const flagSpecUsed = Boolean(flags.name ||
84
+ flags.cwd ||
85
+ flags.env?.length ||
86
+ flags.restart ||
87
+ flags.notify !== undefined ||
88
+ flags['stop-timeout'] !== undefined ||
89
+ flags['limit-memory'] ||
90
+ flags['limit-cpu'] !== undefined ||
91
+ flags['limit-pids'] !== undefined);
92
+ if (file && (flagSpecUsed || argv.length > 0)) {
93
+ throw new dedicated_service_1.DedicatedServiceError('--file is the whole spec — it cannot be combined with spec flags or a command after --.', 'SPEC_INVALID');
94
+ }
95
+ if (file)
96
+ return (0, guest_service_1.readGuestSpecFile)(file);
97
+ return (0, dedicated_service_1.specFromFlags)({
98
+ name: flags.name,
99
+ argv,
100
+ cwd: flags.cwd,
101
+ env: (0, dedicated_service_1.parseEnvEntries)(flags.env),
102
+ restart: flags.restart,
103
+ notify: flags.notify,
104
+ stopTimeoutSeconds: flags['stop-timeout'],
105
+ limits: {
106
+ memoryMax: flags['limit-memory'],
107
+ cpuQuotaPercent: flags['limit-cpu'],
108
+ pidsMax: flags['limit-pids'],
109
+ },
110
+ });
111
+ }
112
+ }
113
+ exports.default = ServicePropose;
@@ -0,0 +1,17 @@
1
+ import { GuestServiceCommand } from '../../lib/guest-service-command';
2
+ /**
3
+ * `skrr service status` — one service's computed state, read on the machine
4
+ * itself (guest-local, read-only). The `systemctl status` of a guest: tenant
5
+ * code sees its own services without a credential or a round-trip to the API.
6
+ */
7
+ export default class ServiceStatus extends GuestServiceCommand {
8
+ static summary: string;
9
+ static examples: string[];
10
+ static args: {
11
+ name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
12
+ };
13
+ static flags: {
14
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ };
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const guest_service_command_1 = require("../../lib/guest-service-command");
5
+ const format_1 = require("../../lib/format");
6
+ const dedicated_service_1 = require("../../lib/dedicated-service");
7
+ /**
8
+ * `skrr service status` — one service's computed state, read on the machine
9
+ * itself (guest-local, read-only). The `systemctl status` of a guest: tenant
10
+ * code sees its own services without a credential or a round-trip to the API.
11
+ */
12
+ class ServiceStatus extends guest_service_command_1.GuestServiceCommand {
13
+ static summary = 'One service’s computed state on this machine (guest-local)';
14
+ static examples = [
15
+ '<%= config.bin %> service status <name>',
16
+ '<%= config.bin %> service status <name> --json',
17
+ ];
18
+ static args = {
19
+ name: core_1.Args.string({ description: 'Service name', required: true, ignoreStdin: true }),
20
+ };
21
+ static flags = {
22
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
23
+ };
24
+ async run() {
25
+ this.requireGuest();
26
+ const { args, flags } = await this.parse(ServiceStatus);
27
+ const reply = await this.guestRead('status', { name: args.name });
28
+ const result = (reply.result ?? reply);
29
+ if (flags.json) {
30
+ this.log(JSON.stringify(result, null, 2));
31
+ return;
32
+ }
33
+ const spec = result.spec ?? {};
34
+ this.log(`service ${args.name}`);
35
+ const row = (label, value) => {
36
+ const cell = (0, format_1.formatCell)(value);
37
+ if (cell !== '-')
38
+ this.log(` ${label.padEnd(13)}${cell}`);
39
+ };
40
+ // detail arrives as a string or a structured object — render its fields.
41
+ row('status', [result.status, (0, dedicated_service_1.serviceDetailText)(result.detail)].filter(Boolean).join(' — ') || undefined);
42
+ row('restart', spec.restart);
43
+ row('command', Array.isArray(spec.command) ? spec.command.join(' ') : spec.shell);
44
+ row('cwd', spec.cwd);
45
+ row('updated', spec.updatedAt ? (0, format_1.localStamp)(spec.updatedAt) : undefined);
46
+ const exits = result.exits ?? [];
47
+ if (exits.length > 0) {
48
+ this.log('');
49
+ this.log('recent exits:');
50
+ for (const exit of exits.slice(-10)) {
51
+ this.log(` ${(0, format_1.localStamp)(exit.at)} exit ${exit.exitCode ?? '-'}${exit.signal ? ` ${exit.signal}` : ''}`);
52
+ }
53
+ }
54
+ }
55
+ }
56
+ exports.default = ServiceStatus;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class SpacesAutoExecutorRuns extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../../base-command");
6
+ const space_output_1 = require("../../../lib/space-output");
7
+ class SpacesAutoExecutorRuns extends base_command_1.BaseCommand {
8
+ static description = "List a space's recent auto-orchestration runs and its Lead health";
9
+ static examples = [
10
+ '<%= config.bin %> spaces auto-executor runs <space-id>',
11
+ '<%= config.bin %> spaces auto-executor runs <space-id> --limit 50 --json',
12
+ ];
13
+ static args = {
14
+ id: core_1.Args.string({ description: 'Space ID', required: true, ignoreStdin: true }),
15
+ };
16
+ static flags = {
17
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
18
+ limit: core_1.Flags.integer({
19
+ description: 'Maximum runs to return (server clamps to 1..50, default 20)',
20
+ }),
21
+ };
22
+ async run() {
23
+ this.requireAuth();
24
+ const { args, flags } = await this.parse(SpacesAutoExecutorRuns);
25
+ let result;
26
+ try {
27
+ result = await data_provider_1.dataService.getSpaceOrchestrationRuns(args.id, flags.limit);
28
+ }
29
+ catch (err) {
30
+ this.handleApiError(err);
31
+ }
32
+ if (flags.json) {
33
+ this.log(JSON.stringify((0, space_output_1.withSpacePerspectiveUrl)(this.cliConfig.baseURL, args.id, 'execution', { result }), null, 2));
34
+ return;
35
+ }
36
+ this.log(`Orchestration: ${result.enabled ? 'enabled' : 'disabled'}`);
37
+ this.log(`Lead health: ${result.leadHealth}`);
38
+ if (result.consecutiveFailures > 0) {
39
+ this.log(`Failures: ${result.consecutiveFailures} consecutive`);
40
+ }
41
+ if (result.lastFailureReason) {
42
+ this.log(`Last failure: ${result.lastFailureReason}`);
43
+ }
44
+ if (result.runs.length === 0) {
45
+ this.log('No orchestration runs recorded.');
46
+ return;
47
+ }
48
+ this.log('');
49
+ for (const run of result.runs) {
50
+ const when = run.triggeredAt ?? 'unknown-time';
51
+ const failure = run.failureReason ? ` — ${run.failureReason}` : '';
52
+ this.log(`${when} ${run.status}${failure}`);
53
+ }
54
+ }
55
+ }
56
+ exports.default = SpacesAutoExecutorRuns;
@@ -0,0 +1,25 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr store governance artifacts` — the catalogue, searched by what an
4
+ * artifact CAN DO rather than what it is called.
5
+ *
6
+ * Distinct from `skrr store browse`, which finds published agents to install.
7
+ * This searches every governed entity type by capability, permission,
8
+ * verified outcome and cost — the questions you ask when deciding what a
9
+ * workspace should be licensed for, not which agent you personally want.
10
+ */
11
+ export default class StoreGovernanceArtifacts extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static flags: {
15
+ 'entity-type': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ capability: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ permission: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ 'verified-outcome': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ 'min-cost-micros': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ 'max-cost-micros': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
22
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
23
+ };
24
+ run(): Promise<void>;
25
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const governed_store_1 = require("../../../lib/governed-store");
6
+ /**
7
+ * `skrr store governance artifacts` — the catalogue, searched by what an
8
+ * artifact CAN DO rather than what it is called.
9
+ *
10
+ * Distinct from `skrr store browse`, which finds published agents to install.
11
+ * This searches every governed entity type by capability, permission,
12
+ * verified outcome and cost — the questions you ask when deciding what a
13
+ * workspace should be licensed for, not which agent you personally want.
14
+ */
15
+ class StoreGovernanceArtifacts extends base_command_1.BaseCommand {
16
+ static description = 'Search the governed store catalogue by capability, permission, verified outcome and cost. For finding an agent to install, use `store browse`.';
17
+ static examples = [
18
+ '<%= config.bin %> store governance artifacts --capability code_review',
19
+ '<%= config.bin %> store governance artifacts --entity-type skill --max-cost-micros 500000',
20
+ ];
21
+ static flags = {
22
+ 'entity-type': core_1.Flags.string({
23
+ description: 'agent, skill, action, service, team, bundle, space_template or connector',
24
+ }),
25
+ capability: core_1.Flags.string({ description: 'Capability the artifact provides' }),
26
+ permission: core_1.Flags.string({ description: 'Permission the artifact requires' }),
27
+ 'verified-outcome': core_1.Flags.string({ description: 'A verified outcome key it claims' }),
28
+ 'min-cost-micros': core_1.Flags.integer({ description: 'Lower bound on cost, in micros' }),
29
+ 'max-cost-micros': core_1.Flags.integer({ description: 'Upper bound on cost, in micros' }),
30
+ limit: core_1.Flags.integer({ description: 'Maximum rows (1-100)' }),
31
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
32
+ };
33
+ async run() {
34
+ this.requireAuth();
35
+ const { flags } = await this.parse(StoreGovernanceArtifacts);
36
+ let result;
37
+ try {
38
+ result = await (0, governed_store_1.searchGovernedStoreArtifacts)({
39
+ entityType: flags['entity-type'],
40
+ capability: flags.capability,
41
+ permission: flags.permission,
42
+ verifiedOutcome: flags['verified-outcome'],
43
+ minCostMicros: flags['min-cost-micros'],
44
+ maxCostMicros: flags['max-cost-micros'],
45
+ limit: flags.limit,
46
+ });
47
+ }
48
+ catch (error) {
49
+ this.handleApiError(error);
50
+ return;
51
+ }
52
+ this.log(JSON.stringify(result, null, 2));
53
+ }
54
+ }
55
+ exports.default = StoreGovernanceArtifacts;
@@ -0,0 +1,16 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Give a workspace-held license to a member or a Space. */
3
+ export default class StoreGovernanceAssign 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
+ license: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ to: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ 'assignment-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }