@skrr-ai/cli 0.1.60 → 0.1.62

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 (194) hide show
  1. package/dist/base-command.js +16 -0
  2. package/dist/commands/agents/create.d.ts +1 -0
  3. package/dist/commands/agents/create.js +8 -1
  4. package/dist/commands/agents/delete.d.ts +14 -0
  5. package/dist/commands/agents/delete.js +52 -4
  6. package/dist/commands/agents/eval/index.d.ts +38 -0
  7. package/dist/commands/agents/eval/index.js +157 -0
  8. package/dist/commands/agents/eval/list.d.ts +13 -0
  9. package/dist/commands/agents/eval/list.js +53 -0
  10. package/dist/commands/agents/eval/show.d.ts +13 -0
  11. package/dist/commands/agents/eval/show.js +36 -0
  12. package/dist/commands/agents/import.d.ts +37 -0
  13. package/dist/commands/agents/import.js +233 -0
  14. package/dist/commands/agents/pull.d.ts +27 -0
  15. package/dist/commands/agents/pull.js +82 -0
  16. package/dist/commands/agents/push.d.ts +28 -0
  17. package/dist/commands/agents/push.js +112 -0
  18. package/dist/commands/agents/releases/ci-publish.d.ts +32 -0
  19. package/dist/commands/agents/releases/ci-publish.js +99 -0
  20. package/dist/commands/agents/releases/create.d.ts +3 -0
  21. package/dist/commands/agents/releases/create.js +27 -6
  22. package/dist/commands/agents/releases/known-issues/add.d.ts +19 -0
  23. package/dist/commands/agents/releases/known-issues/add.js +43 -0
  24. package/dist/commands/agents/releases/known-issues/list.d.ts +17 -0
  25. package/dist/commands/agents/releases/known-issues/list.js +55 -0
  26. package/dist/commands/agents/releases/known-issues/update.d.ts +18 -0
  27. package/dist/commands/agents/releases/known-issues/update.js +47 -0
  28. package/dist/commands/agents/releases/list.js +25 -3
  29. package/dist/commands/agents/releases/rollback.js +12 -4
  30. package/dist/commands/agents/releases/test-install.d.ts +22 -0
  31. package/dist/commands/agents/releases/test-install.js +70 -0
  32. package/dist/commands/agents/releases/trusted-publishers/list.d.ts +17 -0
  33. package/dist/commands/agents/releases/trusted-publishers/list.js +55 -0
  34. package/dist/commands/agents/releases/trusted-publishers/remove.d.ts +17 -0
  35. package/dist/commands/agents/releases/trusted-publishers/remove.js +45 -0
  36. package/dist/commands/agents/releases/trusted-publishers/set.d.ts +27 -0
  37. package/dist/commands/agents/releases/trusted-publishers/set.js +82 -0
  38. package/dist/commands/agents/update.d.ts +1 -0
  39. package/dist/commands/agents/update.js +8 -1
  40. package/dist/commands/agents/usage-cap.d.ts +20 -0
  41. package/dist/commands/agents/usage-cap.js +76 -0
  42. package/dist/commands/agents/validate.d.ts +22 -0
  43. package/dist/commands/agents/validate.js +66 -0
  44. package/dist/commands/agents/visibility.d.ts +13 -0
  45. package/dist/commands/agents/visibility.js +84 -2
  46. package/dist/commands/commerce/fees/show.d.ts +19 -0
  47. package/dist/commands/commerce/fees/show.js +75 -0
  48. package/dist/commands/earnings/index.d.ts +15 -0
  49. package/dist/commands/earnings/index.js +46 -0
  50. package/dist/commands/earnings/payouts.d.ts +12 -0
  51. package/dist/commands/earnings/payouts.js +39 -0
  52. package/dist/commands/earnings/statements.d.ts +19 -0
  53. package/dist/commands/earnings/statements.js +70 -0
  54. package/dist/commands/goals/key-results/create.d.ts +1 -1
  55. package/dist/commands/goals/key-results/create.js +5 -1
  56. package/dist/commands/harnesses/show.js +11 -1
  57. package/dist/commands/logout.js +31 -0
  58. package/dist/commands/machines/show.js +10 -1
  59. package/dist/commands/managed-execution/show.d.ts +10 -0
  60. package/dist/commands/managed-execution/show.js +60 -0
  61. package/dist/commands/spaces/show.js +35 -1
  62. package/dist/commands/step-up.d.ts +23 -0
  63. package/dist/commands/step-up.js +96 -0
  64. package/dist/commands/store/acquisitions/approve.d.ts +30 -0
  65. package/dist/commands/store/acquisitions/approve.js +100 -0
  66. package/dist/commands/store/acquisitions/decline.d.ts +17 -0
  67. package/dist/commands/store/acquisitions/decline.js +47 -0
  68. package/dist/commands/store/acquisitions/show.d.ts +16 -0
  69. package/dist/commands/store/acquisitions/show.js +49 -0
  70. package/dist/commands/store/admissions/approve.d.ts +19 -0
  71. package/dist/commands/store/admissions/approve.js +50 -0
  72. package/dist/commands/store/admissions/list.d.ts +15 -0
  73. package/dist/commands/store/admissions/list.js +60 -0
  74. package/dist/commands/store/admissions/refuse.d.ts +18 -0
  75. package/dist/commands/store/admissions/refuse.js +49 -0
  76. package/dist/commands/store/advisories/artifact.d.ts +15 -0
  77. package/dist/commands/store/advisories/artifact.js +25 -0
  78. package/dist/commands/store/advisories/cancel.d.ts +13 -0
  79. package/dist/commands/store/advisories/cancel.js +34 -0
  80. package/dist/commands/store/advisories/close.d.ts +18 -0
  81. package/dist/commands/store/advisories/close.js +51 -0
  82. package/dist/commands/store/advisories/confirm.d.ts +17 -0
  83. package/dist/commands/store/advisories/confirm.js +40 -0
  84. package/dist/commands/store/advisories/issue.d.ts +20 -0
  85. package/dist/commands/store/advisories/issue.js +59 -0
  86. package/dist/commands/store/advisories/list.d.ts +15 -0
  87. package/dist/commands/store/advisories/list.js +49 -0
  88. package/dist/commands/store/advisories/show.d.ts +13 -0
  89. package/dist/commands/store/advisories/show.js +34 -0
  90. package/dist/commands/store/artifacts/release.d.ts +16 -0
  91. package/dist/commands/store/artifacts/release.js +31 -0
  92. package/dist/commands/store/artifacts/used-by.d.ts +12 -0
  93. package/dist/commands/store/artifacts/used-by.js +20 -0
  94. package/dist/commands/store/browse.d.ts +5 -0
  95. package/dist/commands/store/browse.js +28 -1
  96. package/dist/commands/store/channel.d.ts +21 -0
  97. package/dist/commands/store/channel.js +62 -0
  98. package/dist/commands/store/follow.d.ts +14 -0
  99. package/dist/commands/store/follow.js +45 -0
  100. package/dist/commands/store/governance/policy.d.ts +18 -5
  101. package/dist/commands/store/governance/policy.js +80 -12
  102. package/dist/commands/store/governance/requests.d.ts +28 -0
  103. package/dist/commands/store/governance/requests.js +116 -0
  104. package/dist/commands/store/install.d.ts +3 -0
  105. package/dist/commands/store/install.js +101 -2
  106. package/dist/commands/store/issues.d.ts +26 -0
  107. package/dist/commands/store/issues.js +118 -0
  108. package/dist/commands/store/maintainers/add.d.ts +13 -0
  109. package/dist/commands/store/maintainers/add.js +23 -0
  110. package/dist/commands/store/maintainers/remove.d.ts +13 -0
  111. package/dist/commands/store/maintainers/remove.js +22 -0
  112. package/dist/commands/store/publishers/approve.d.ts +11 -0
  113. package/dist/commands/store/publishers/approve.js +25 -0
  114. package/dist/commands/store/publishers/claim.d.ts +12 -0
  115. package/dist/commands/store/publishers/claim.js +20 -0
  116. package/dist/commands/store/publishers/confirm.d.ts +11 -0
  117. package/dist/commands/store/publishers/confirm.js +17 -0
  118. package/dist/commands/store/publishers/domains/begin.d.ts +12 -0
  119. package/dist/commands/store/publishers/domains/begin.js +20 -0
  120. package/dist/commands/store/publishers/domains/list.d.ts +9 -0
  121. package/dist/commands/store/publishers/domains/list.js +19 -0
  122. package/dist/commands/store/publishers/domains/verify.d.ts +12 -0
  123. package/dist/commands/store/publishers/domains/verify.js +20 -0
  124. package/dist/commands/store/publishers/namespaces.d.ts +8 -0
  125. package/dist/commands/store/publishers/namespaces.js +16 -0
  126. package/dist/commands/store/publishers/verified.d.ts +11 -0
  127. package/dist/commands/store/publishers/verified.js +34 -0
  128. package/dist/commands/store/refund.d.ts +22 -0
  129. package/dist/commands/store/refund.js +80 -0
  130. package/dist/commands/store/report.d.ts +20 -0
  131. package/dist/commands/store/report.js +59 -0
  132. package/dist/commands/store/reports.d.ts +11 -0
  133. package/dist/commands/store/reports.js +52 -0
  134. package/dist/commands/store/signals.d.ts +18 -0
  135. package/dist/commands/store/signals.js +43 -0
  136. package/dist/commands/store/star.d.ts +17 -0
  137. package/dist/commands/store/star.js +41 -0
  138. package/dist/commands/store/stars.d.ts +10 -0
  139. package/dist/commands/store/stars.js +33 -0
  140. package/dist/commands/store/trial.d.ts +11 -0
  141. package/dist/commands/store/trial.js +17 -0
  142. package/dist/commands/store/uninstall.d.ts +19 -0
  143. package/dist/commands/store/uninstall.js +118 -0
  144. package/dist/commands/store/update.d.ts +2 -0
  145. package/dist/commands/store/update.js +60 -2
  146. package/dist/commands/store/updates.d.ts +10 -4
  147. package/dist/commands/store/updates.js +60 -39
  148. package/dist/commands/store/watch.d.ts +18 -0
  149. package/dist/commands/store/watch.js +44 -0
  150. package/dist/commands/subscriptions/health.d.ts +12 -0
  151. package/dist/commands/subscriptions/health.js +39 -0
  152. package/dist/commands/subscriptions/list.js +3 -2
  153. package/dist/commands/subscriptions/status.js +7 -1
  154. package/dist/commands/subscriptions/subscribe.d.ts +9 -2
  155. package/dist/commands/subscriptions/subscribe.js +141 -12
  156. package/dist/commands/tasks/comments/list.js +9 -1
  157. package/dist/commands/tasks/labels/attach.js +15 -2
  158. package/dist/commands/tasks/show.js +17 -3
  159. package/dist/commands/tasks/update.js +15 -4
  160. package/dist/commands/tasks/updates/add.js +5 -1
  161. package/dist/lib/agent-config.js +1 -0
  162. package/dist/lib/agent-evals.d.ts +71 -0
  163. package/dist/lib/agent-evals.js +359 -0
  164. package/dist/lib/agent-spec.d.ts +28 -0
  165. package/dist/lib/agent-spec.js +58 -0
  166. package/dist/lib/auth-storage.d.ts +12 -0
  167. package/dist/lib/auth-storage.js +0 -33
  168. package/dist/lib/commerce.d.ts +8 -0
  169. package/dist/lib/commerce.js +10 -0
  170. package/dist/lib/earnings.d.ts +36 -0
  171. package/dist/lib/earnings.js +164 -0
  172. package/dist/lib/github-oidc.d.ts +13 -0
  173. package/dist/lib/github-oidc.js +41 -0
  174. package/dist/lib/governed-store.d.ts +43 -2
  175. package/dist/lib/governed-store.js +25 -1
  176. package/dist/lib/label-ref.js +16 -0
  177. package/dist/lib/managed-execution.d.ts +10 -0
  178. package/dist/lib/managed-execution.js +43 -0
  179. package/dist/lib/principal-display.d.ts +20 -0
  180. package/dist/lib/principal-display.js +64 -0
  181. package/dist/lib/space-template-source.d.ts +14 -0
  182. package/dist/lib/space-template-source.js +41 -0
  183. package/dist/lib/step-up.d.ts +21 -0
  184. package/dist/lib/step-up.js +44 -0
  185. package/dist/lib/store-acquisition.d.ts +11 -0
  186. package/dist/lib/store-acquisition.js +40 -0
  187. package/dist/lib/store-advisories.d.ts +50 -0
  188. package/dist/lib/store-advisories.js +62 -0
  189. package/dist/lib/task-closure.js +1 -1
  190. package/dist/lib/web-url.d.ts +11 -0
  191. package/dist/lib/web-url.js +14 -0
  192. package/dist/node_modules/@skrr-ai/data-provider/index.js +25471 -24177
  193. package/oclif.manifest.json +38931 -34119
  194. package/package.json +21 -3
@@ -39,8 +39,12 @@ class GoalsKeyResultsCreate extends base_command_1.BaseCommand {
39
39
  max: 100,
40
40
  }),
41
41
  'progress-mode': core_1.Flags.string({
42
- description: 'How progress is tracked',
42
+ // Auto reads as "-" forever from the CLI — task↔key-result linking is a
43
+ // documented omission from this surface (see AUTO_MODE_NOTE below) — so
44
+ // the CLI default is the mode a CLI caller can actually move.
45
+ description: 'How progress is tracked (default: manual — see note below)',
43
46
  options: [...data_provider_1.KEY_RESULT_PROGRESS_MODES],
47
+ default: 'manual',
44
48
  }),
45
49
  status: core_1.Flags.string({
46
50
  description: 'Key result status',
@@ -6,6 +6,7 @@ exports.resolveHarnessRef = resolveHarnessRef;
6
6
  exports.pickHarnessRef = pickHarnessRef;
7
7
  const core_1 = require("@oclif/core");
8
8
  const base_command_1 = require("../../base-command");
9
+ const web_url_1 = require("../../lib/web-url");
9
10
  const harness_provider_input_1 = require("../../lib/harness-provider-input");
10
11
  const harnesses_1 = require("../../lib/harnesses");
11
12
  const harness_labels_1 = require("../../lib/harness-labels");
@@ -84,7 +85,13 @@ class HarnessesShow extends base_command_1.BaseCommand {
84
85
  // daemon, so a script read a signed-out Devin as "ok" (OSK-9263/OSK-9265
85
86
  // verifiers). `readiness` is the per-provider answer the text prints;
86
87
  // null when it was not asked (not a live local row) or not reported.
87
- this.log(JSON.stringify({ ...harness, readiness: verdict ?? null }, null, 2));
88
+ this.log(JSON.stringify({
89
+ ...harness,
90
+ readiness: verdict ?? null,
91
+ url: this.cliConfig?.baseURL
92
+ ? (0, web_url_1.webUrl)(this.cliConfig.baseURL, { kind: 'harness', harnessId: harness._id })
93
+ : null,
94
+ }, null, 2));
88
95
  return;
89
96
  }
90
97
  // The same rule the list applies (OSK-9649): a no-engine placeholder's
@@ -92,6 +99,9 @@ class HarnessesShow extends base_command_1.BaseCommand {
92
99
  // provider name that is not one.
93
100
  this.log(`${harness.name ? (0, data_provider_1.canonicalizeHarnessLabel)(harness.name) : harness._id}`);
94
101
  this.log(` id ${harness._id}`);
102
+ this.log(` url ${this.cliConfig?.baseURL
103
+ ? ((0, web_url_1.webUrl)(this.cliConfig.baseURL, { kind: 'harness', harnessId: harness._id }) ?? '-')
104
+ : '-'}`);
95
105
  this.log(` provider ${(0, harness_labels_1.harnessProviderDescription)(harness.provider)}`);
96
106
  // `harnessLocation` is the difference between "your laptop" and "a cloud row",
97
107
  // and it decides which verbs apply: ping and claudeEngine are local-only.
@@ -35,6 +35,9 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.shouldSkipLocalLogout = shouldSkipLocalLogout;
37
37
  const core_1 = require("@oclif/core");
38
+ const fs = __importStar(require("node:fs"));
39
+ const os = __importStar(require("node:os"));
40
+ const path = __importStar(require("node:path"));
38
41
  const base_command_1 = require("../base-command");
39
42
  const config_1 = require("../lib/config");
40
43
  const first_party_harness_managed_1 = require("../lib/first-party-harness-managed");
@@ -109,6 +112,21 @@ function shouldSkipLocalLogout(input) {
109
112
  function platformManagedHandoff() {
110
113
  return (0, dedicated_service_1.runningOnDedicatedRuntimeGuest)() && Boolean((0, daemonBroker_1.findBrokeredHandoffDescriptor)());
111
114
  }
115
+ /**
116
+ * Whether this computer has a configured skrr background service — the file
117
+ * `skrr daemon install` writes, which a logout deliberately does not remove
118
+ * (the service's OWN credential is what becomes unreadable; OSK-12483).
119
+ * The daemon's profile dir is `~/.skrr/profiles/<name>` for every profile,
120
+ * including `default`.
121
+ */
122
+ function daemonConfigPresent(profile) {
123
+ try {
124
+ return fs.existsSync(path.join(os.homedir(), '.skrr', 'profiles', profile, 'daemon.json'));
125
+ }
126
+ catch {
127
+ return false;
128
+ }
129
+ }
112
130
  const SIGN_IN_AGAIN = 'To sign in again, run `skrr login`.';
113
131
  class Logout extends base_command_1.BaseCommand {
114
132
  static description = 'Sign out and clear locally-stored tokens. ' +
@@ -282,6 +300,19 @@ class Logout extends base_command_1.BaseCommand {
282
300
  }
283
301
  else {
284
302
  this.log(SIGN_IN_AGAIN);
303
+ // OSK-12483 — the shared envelope wipe above also orphans THIS machine's
304
+ // daemon credential (it is sealed under the DEK just deleted). The
305
+ // running daemon keeps working on its in-memory copy, but its next start
306
+ // cannot read the stored one and needs `skrr daemon login` — a plain
307
+ // `skrr login` mints a cli-scope credential and does not re-enroll it.
308
+ // Say that now, while the person is still looking at a screen; otherwise
309
+ // the daemon simply never comes back and nothing anywhere names why.
310
+ // `daemon.json` is written when the service is installed/configured and
311
+ // survives this logout.
312
+ if (daemonConfigPresent(keychain.getActiveProfile())) {
313
+ this.log("This also signs out this computer's skrr background service — it will need " +
314
+ '`skrr daemon login` before it runs again.');
315
+ }
285
316
  }
286
317
  if (sweptLegacy.length > 0) {
287
318
  this.log(`Also removed ${sweptLegacy.length} credential${sweptLegacy.length === 1 ? '' : 's'} left by the previous product identity:`);
@@ -6,6 +6,7 @@ const format_1 = require("../../lib/format");
6
6
  const machines_1 = require("../../lib/machines");
7
7
  const cli_installers_1 = require("../../lib/cli-installers");
8
8
  const harness_labels_1 = require("../../lib/harness-labels");
9
+ const web_url_1 = require("../../lib/web-url");
9
10
  /** One machine: its identity, its harnesses, and what you may do to it. */
10
11
  class MachinesShow extends base_command_1.BaseCommand {
11
12
  static description = 'Show one machine — its identity, harnesses, and available actions';
@@ -45,11 +46,19 @@ class MachinesShow extends base_command_1.BaseCommand {
45
46
  this.error('Machine not found.', { exit: 1 });
46
47
  }
47
48
  if (flags.json) {
48
- this.log(JSON.stringify(machine, null, 2));
49
+ this.log(JSON.stringify({
50
+ ...machine,
51
+ url: this.cliConfig?.baseURL
52
+ ? (0, web_url_1.webUrl)(this.cliConfig.baseURL, { kind: 'machine', machineId: machine.id })
53
+ : null,
54
+ }, null, 2));
49
55
  return;
50
56
  }
51
57
  this.log(`${machine.preferences?.name || machine.name}`);
52
58
  this.log(` id ${machine.id}`);
59
+ this.log(` url ${this.cliConfig?.baseURL
60
+ ? ((0, web_url_1.webUrl)(this.cliConfig.baseURL, { kind: 'machine', machineId: machine.id }) ?? '-')
61
+ : '-'}`);
53
62
  this.log(` identity ${machine.identityKind}`);
54
63
  // The label the lists print. A paused lease read `paused` in both tables and
55
64
  // `offline` here, with the reason one line below (OSK-9996). `--json` keeps
@@ -0,0 +1,10 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /** Show the agents configured to use the shared Agent Worker target. */
3
+ export default class ManagedExecutionShow extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ };
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,60 @@
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 format_1 = require("../../lib/format");
7
+ const managed_execution_1 = require("../../lib/managed-execution");
8
+ const web_url_1 = require("../../lib/web-url");
9
+ /** Show the agents configured to use the shared Agent Worker target. */
10
+ class ManagedExecutionShow extends base_command_1.BaseCommand {
11
+ static description = 'Show the shared Agent Worker target and the agents configured to use it';
12
+ static examples = [
13
+ '<%= config.bin %> managed-execution show',
14
+ '<%= config.bin %> managed-execution show --json',
15
+ ];
16
+ static flags = {
17
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
18
+ };
19
+ async run() {
20
+ this.requireAuth();
21
+ const { flags } = await this.parse(ManagedExecutionShow);
22
+ let response;
23
+ try {
24
+ response = await data_provider_1.dataService.listAgents({ requiredPermission: data_provider_1.PermissionBits.VIEW });
25
+ }
26
+ catch (err) {
27
+ this.handleApiError(err);
28
+ }
29
+ const agents = (0, managed_execution_1.managedExecutionAgents)(response);
30
+ const payload = {
31
+ kind: 'managed-execution',
32
+ target: 'agent-worker',
33
+ url: this.cliConfig?.baseURL
34
+ ? (0, web_url_1.webUrl)(this.cliConfig.baseURL, { kind: 'managedExecution' })
35
+ : null,
36
+ configuredAgents: agents,
37
+ };
38
+ if (flags.json) {
39
+ this.log(JSON.stringify(payload, null, 2));
40
+ return;
41
+ }
42
+ this.log('Managed execution');
43
+ this.log(' target Agent Worker (shared managed execution; not a Machine or Harness)');
44
+ this.log(` url ${payload.url ?? '-'}`);
45
+ this.log(` agents ${agents.length} configured`);
46
+ if (agents.length === 0)
47
+ return;
48
+ this.log('');
49
+ (0, format_1.renderTable)(agents.map((agent) => ({
50
+ position: String(agent.position),
51
+ id: (0, format_1.formatCell)(agent.id),
52
+ name: (0, format_1.formatCell)(agent.name),
53
+ })), [
54
+ { key: 'position', header: 'ORDER' },
55
+ { key: 'id', header: 'AGENT ID', verbatim: true },
56
+ { key: 'name', header: 'NAME', maxWidth: 48 },
57
+ ], (line) => this.log(` ${line}`));
58
+ }
59
+ }
60
+ exports.default = ManagedExecutionShow;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../base-command");
6
+ const space_template_source_1 = require("../../lib/space-template-source");
6
7
  const web_url_1 = require("../../lib/web-url");
7
8
  class SpacesShow extends base_command_1.BaseCommand {
8
9
  static description = 'Show details for a single space';
@@ -37,8 +38,31 @@ class SpacesShow extends base_command_1.BaseCommand {
37
38
  }
38
39
  const s = space;
39
40
  const url = (0, web_url_1.spaceUrlFrom)(this.cliConfig.baseURL, s);
41
+ // Only a Space a template install created has a source to check. The
42
+ // check is a second request, so a failure reports itself instead of
43
+ // failing the whole command — or being mistaken for "no update".
44
+ const templateSource = s.templateSource;
45
+ let templateCheck = null;
46
+ let templateCheckError;
47
+ if (templateSource?.templateId) {
48
+ try {
49
+ templateCheck = await data_provider_1.dataService.getSpaceTemplateSource(spaceId);
50
+ }
51
+ catch (err) {
52
+ templateCheckError = err instanceof Error ? err.message : String(err);
53
+ }
54
+ }
40
55
  if (flags.json) {
41
- this.log(JSON.stringify({ ...s, url }, null, 2));
56
+ this.log(JSON.stringify({
57
+ ...s,
58
+ url,
59
+ ...(templateSource?.templateId
60
+ ? {
61
+ templateUpdate: templateCheck,
62
+ ...(templateCheckError ? { templateUpdateError: templateCheckError } : {}),
63
+ }
64
+ : {}),
65
+ }, null, 2));
42
66
  return;
43
67
  }
44
68
  const ancestors = Array.isArray(s.ancestorSpaceIds) ? s.ancestorSpaceIds : [];
@@ -67,6 +91,16 @@ class SpacesShow extends base_command_1.BaseCommand {
67
91
  this.log(`Depth: ${s.depth ?? 0}`);
68
92
  this.log(`Ancestors: ${ancestors.length > 0 ? ancestors.join(' › ') : '-'}`);
69
93
  this.log(`Inherits ACL: ${s.inheritAccess === false ? 'no (private subspace)' : 'yes'}`);
94
+ if (templateSource?.templateId) {
95
+ for (const line of (0, space_template_source_1.templateSourceLines)({
96
+ source: templateSource,
97
+ check: templateCheck,
98
+ checkError: templateCheckError,
99
+ baseURL: this.cliConfig.baseURL,
100
+ })) {
101
+ this.log(line);
102
+ }
103
+ }
70
104
  if (s.description) {
71
105
  this.log('');
72
106
  this.log('Description:');
@@ -0,0 +1,23 @@
1
+ import { BaseCommand } from '../base-command';
2
+ /**
3
+ * `skrr step-up` — confirm it is you before publishing to the Store
4
+ * (OSK-12275).
5
+ *
6
+ * Making a release public, rolling the public listing back, or publishing a
7
+ * governed release all reach buyers, so the server refuses them from a login
8
+ * that has not recently proved a second factor. This command proves one — the
9
+ * code from the account's authenticator app, or an unused backup code — and
10
+ * the verification is bound to THIS login only, for a few minutes. A token
11
+ * stolen from another device, or a browser session, is not covered by it.
12
+ */
13
+ export default class StepUp extends BaseCommand {
14
+ static description: string;
15
+ static examples: string[];
16
+ static flags: {
17
+ otp: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ 'backup-code': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ status: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
+ };
22
+ run(): Promise<void>;
23
+ }
@@ -0,0 +1,96 @@
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 prompt_1 = require("../lib/prompt");
7
+ const step_up_1 = require("../lib/step-up");
8
+ /**
9
+ * `skrr step-up` — confirm it is you before publishing to the Store
10
+ * (OSK-12275).
11
+ *
12
+ * Making a release public, rolling the public listing back, or publishing a
13
+ * governed release all reach buyers, so the server refuses them from a login
14
+ * that has not recently proved a second factor. This command proves one — the
15
+ * code from the account's authenticator app, or an unused backup code — and
16
+ * the verification is bound to THIS login only, for a few minutes. A token
17
+ * stolen from another device, or a browser session, is not covered by it.
18
+ */
19
+ class StepUp extends base_command_1.BaseCommand {
20
+ static description = 'Confirm it is you with an authenticator code before publishing to the Store';
21
+ static examples = [
22
+ '<%= config.bin %> step-up',
23
+ '<%= config.bin %> step-up --otp 123456',
24
+ '<%= config.bin %> step-up --backup-code 1a2b3c4d',
25
+ '<%= config.bin %> step-up --status --json',
26
+ ];
27
+ static flags = {
28
+ otp: core_1.Flags.string({
29
+ description: 'The current 6-digit code from your authenticator app',
30
+ exclusive: ['backup-code', 'status'],
31
+ }),
32
+ 'backup-code': core_1.Flags.string({
33
+ description: 'One of your unused backup codes (it is spent)',
34
+ exclusive: ['otp', 'status'],
35
+ }),
36
+ status: core_1.Flags.boolean({
37
+ description: 'Show whether this login is verified for publishing, without verifying',
38
+ }),
39
+ json: core_1.Flags.boolean({ description: 'Output the result as JSON' }),
40
+ };
41
+ async run() {
42
+ this.requireAuth();
43
+ const { flags } = await this.parse(StepUp);
44
+ const bin = this.config.bin;
45
+ let status;
46
+ try {
47
+ status = await data_provider_1.dataService.getStepUpStatus(data_provider_1.STORE_PUBLISH_STEP_UP_PURPOSE);
48
+ }
49
+ catch (err) {
50
+ this.handleApiError(err);
51
+ }
52
+ const hasCode = Boolean(flags.otp || flags['backup-code']);
53
+ if (flags.status || (status.active && !hasCode)) {
54
+ if (flags.json) {
55
+ this.log(JSON.stringify(status, null, 2));
56
+ return;
57
+ }
58
+ this.log(status.active
59
+ ? `Verified for publishing from this login until ${(0, step_up_1.formatStepUpExpiry)(status.expiresAt)}.`
60
+ : `Not verified for publishing from this login. Run \`${bin} step-up\` to verify.`);
61
+ return;
62
+ }
63
+ if (!status.sessionBound) {
64
+ this.error(`This credential is not tied to a sign-in session, so it cannot be verified for publishing. Run \`${bin} login\`, then \`${bin} step-up\`.`, { code: 'STEP_UP_SESSION_UNBOUND', exit: 2 });
65
+ }
66
+ if (status.methods.length === 0) {
67
+ this.error('Publishing to the Store needs two-factor authentication, and this account has none. ' +
68
+ `Turn it on in the web app (Settings → Account → Two-factor authentication), then run \`${bin} step-up\`.`, { code: 'STEP_UP_TWO_FACTOR_REQUIRED', exit: 2 });
69
+ }
70
+ let token = flags.otp?.trim();
71
+ const backupCode = flags['backup-code']?.trim();
72
+ if (!token && !backupCode) {
73
+ if (!process.stdin.isTTY) {
74
+ this.error('Refusing to prompt for a code — stdin is not a terminal. Pass --otp <code> or --backup-code <code>.', { code: 'STEP_UP_PROOF_REQUIRED', exit: 2 });
75
+ }
76
+ token = await (0, prompt_1.prompt)('Code from your authenticator app: ');
77
+ }
78
+ let result;
79
+ try {
80
+ result = await data_provider_1.dataService.verifyStepUp({
81
+ purpose: data_provider_1.STORE_PUBLISH_STEP_UP_PURPOSE,
82
+ ...(token ? { token } : { backupCode }),
83
+ });
84
+ }
85
+ catch (err) {
86
+ this.handleApiError(err);
87
+ }
88
+ if (flags.json) {
89
+ this.log(JSON.stringify(result, null, 2));
90
+ return;
91
+ }
92
+ const via = result.method === 'backup_code' ? 'a backup code' : 'your authenticator app';
93
+ this.log(`Verified with ${via}. Store publishing from this login is allowed until ${(0, step_up_1.formatStepUpExpiry)(result.expiresAt)}.`);
94
+ }
95
+ }
96
+ exports.default = StepUp;
@@ -0,0 +1,30 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * Approve a purchase an agent asked to make (OSK-12240).
4
+ *
5
+ * The terminal counterpart of the web approval card, for a request the card
6
+ * cannot reach: a Slack or scheduled run, or a Task run nobody has opened. It
7
+ * prints the server's stored request (never anything the agent wrote), asks
8
+ * for an explicit yes, and sends only the decision and the terms acceptance —
9
+ * the price and offer are whatever the stored request says.
10
+ *
11
+ * Approving does not buy anything. It lets the agent complete THIS purchase at
12
+ * THIS price; a listing whose offer moves in the meantime supersedes it.
13
+ *
14
+ * Like `skrr store install`, this acts with your full authority: an agent that
15
+ * holds your CLI login can run it too. That is the product statement in
16
+ * docs/architecture/agent-initiated-paid-acquisition-2026-09-27.md, not a
17
+ * boundary this command could enforce.
18
+ */
19
+ export default class StoreAcquisitionsApprove extends BaseCommand {
20
+ static description: string;
21
+ static examples: string[];
22
+ static args: {
23
+ requestId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
24
+ };
25
+ static flags: {
26
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
27
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
28
+ };
29
+ run(): Promise<void>;
30
+ }
@@ -0,0 +1,100 @@
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 prompt_1 = require("../../../lib/prompt");
7
+ const store_acquisition_1 = require("../../../lib/store-acquisition");
8
+ /**
9
+ * Approve a purchase an agent asked to make (OSK-12240).
10
+ *
11
+ * The terminal counterpart of the web approval card, for a request the card
12
+ * cannot reach: a Slack or scheduled run, or a Task run nobody has opened. It
13
+ * prints the server's stored request (never anything the agent wrote), asks
14
+ * for an explicit yes, and sends only the decision and the terms acceptance —
15
+ * the price and offer are whatever the stored request says.
16
+ *
17
+ * Approving does not buy anything. It lets the agent complete THIS purchase at
18
+ * THIS price; a listing whose offer moves in the meantime supersedes it.
19
+ *
20
+ * Like `skrr store install`, this acts with your full authority: an agent that
21
+ * holds your CLI login can run it too. That is the product statement in
22
+ * docs/architecture/agent-initiated-paid-acquisition-2026-09-27.md, not a
23
+ * boundary this command could enforce.
24
+ */
25
+ class StoreAcquisitionsApprove extends base_command_1.BaseCommand {
26
+ static description = 'Approve a purchase an agent asked to make, after showing its price and terms. The agent then completes it at that price only';
27
+ static examples = [
28
+ '<%= config.bin %> store acquisitions approve acqr_0123456789abcdef01234567',
29
+ '<%= config.bin %> store acquisitions approve acqr_0123456789abcdef01234567 --yes --json',
30
+ ];
31
+ static args = {
32
+ requestId: core_1.Args.string({
33
+ description: 'The acquisition request id (acqr_…) the agent was given',
34
+ required: true,
35
+ ignoreStdin: true,
36
+ }),
37
+ };
38
+ static flags = {
39
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
40
+ yes: core_1.Flags.boolean({
41
+ char: 'y',
42
+ description: 'Approve without prompting and accept the buyer terms. The price and terms are still printed.',
43
+ }),
44
+ };
45
+ async run() {
46
+ this.requireAuth();
47
+ const { args, flags } = await this.parse(StoreAcquisitionsApprove);
48
+ let request;
49
+ try {
50
+ request = await data_provider_1.dataService.getStoreAcquisitionRequest(args.requestId);
51
+ }
52
+ catch (err) {
53
+ this.handleApiError(err);
54
+ }
55
+ if (!request) {
56
+ this.error('The purchase request could not be read, so nothing was approved.', { exit: 1 });
57
+ }
58
+ // Printed before any prompt and even with --yes, so a scripted approval
59
+ // still leaves the terms it agreed to in its own output.
60
+ for (const line of (0, store_acquisition_1.describeAcquisitionRequestLines)(request)) {
61
+ this.logToStderr(line);
62
+ }
63
+ if (request.status !== 'pending') {
64
+ const status = (0, data_provider_1.describeStoreAcquisitionStatus)(request.status);
65
+ this.error(`This request is ${status.label.toLowerCase()}, so there is nothing to approve.`, {
66
+ exit: 1,
67
+ });
68
+ }
69
+ if (!request.buyerTerms) {
70
+ this.error('Buyer terms are not configured, so this purchase cannot be approved.', {
71
+ exit: 1,
72
+ });
73
+ }
74
+ const name = request.listingName || request.entityId;
75
+ const price = (0, data_provider_1.formatStoreAcquisitionPrice)(request.price);
76
+ const confirmed = await (0, prompt_1.confirmDestructive)(`Approve buying ${name} for ${price} and accept the buyer terms (${request.buyerTerms.termsVersion})?`, flags.yes).catch((err) => this.error(err.message, { exit: err.exit ?? 1 }));
77
+ if (!confirmed) {
78
+ this.log('Cancelled. Nothing was approved.');
79
+ return;
80
+ }
81
+ let decided;
82
+ try {
83
+ decided = await data_provider_1.dataService.decideStoreAcquisitionRequest({
84
+ requestId: request.id,
85
+ decision: 'approve',
86
+ acceptTerms: true,
87
+ });
88
+ }
89
+ catch (err) {
90
+ this.handleApiError(err);
91
+ }
92
+ if (flags.json) {
93
+ this.log(JSON.stringify(decided, null, 2));
94
+ return;
95
+ }
96
+ const status = (0, data_provider_1.describeStoreAcquisitionStatus)(decided?.status);
97
+ this.log(`${status.label}. ${status.detail}`.trim());
98
+ }
99
+ }
100
+ exports.default = StoreAcquisitionsApprove;
@@ -0,0 +1,17 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * Decline a purchase an agent asked to make (OSK-12240). Declining charges
4
+ * nothing and cannot spend money, so it asks no question; a declined request
5
+ * can never be used for a purchase.
6
+ */
7
+ export default class StoreAcquisitionsDecline extends BaseCommand {
8
+ static description: string;
9
+ static examples: string[];
10
+ static args: {
11
+ requestId: 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,47 @@
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
+ /**
7
+ * Decline a purchase an agent asked to make (OSK-12240). Declining charges
8
+ * nothing and cannot spend money, so it asks no question; a declined request
9
+ * can never be used for a purchase.
10
+ */
11
+ class StoreAcquisitionsDecline extends base_command_1.BaseCommand {
12
+ static description = 'Decline a purchase an agent asked to make. Nothing is charged, and the request cannot be used again';
13
+ static examples = [
14
+ '<%= config.bin %> store acquisitions decline acqr_0123456789abcdef01234567',
15
+ ];
16
+ static args = {
17
+ requestId: core_1.Args.string({
18
+ description: 'The acquisition request id (acqr_…) the agent was given',
19
+ required: true,
20
+ ignoreStdin: true,
21
+ }),
22
+ };
23
+ static flags = {
24
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
25
+ };
26
+ async run() {
27
+ this.requireAuth();
28
+ const { args, flags } = await this.parse(StoreAcquisitionsDecline);
29
+ let decided;
30
+ try {
31
+ decided = await data_provider_1.dataService.decideStoreAcquisitionRequest({
32
+ requestId: args.requestId,
33
+ decision: 'decline',
34
+ });
35
+ }
36
+ catch (err) {
37
+ this.handleApiError(err);
38
+ }
39
+ if (flags.json) {
40
+ this.log(JSON.stringify(decided, null, 2));
41
+ return;
42
+ }
43
+ const status = (0, data_provider_1.describeStoreAcquisitionStatus)(decided?.status);
44
+ this.log(`${status.label}. ${status.detail}`.trim());
45
+ }
46
+ }
47
+ exports.default = StoreAcquisitionsDecline;
@@ -0,0 +1,16 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * A purchase an agent asked to make, read from the server's stored request
4
+ * (OSK-12240) — the same data the web approval card shows.
5
+ */
6
+ export default class StoreAcquisitionsShow extends BaseCommand {
7
+ static description: string;
8
+ static examples: string[];
9
+ static args: {
10
+ requestId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
11
+ };
12
+ static flags: {
13
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,49 @@
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 store_acquisition_1 = require("../../../lib/store-acquisition");
7
+ /**
8
+ * A purchase an agent asked to make, read from the server's stored request
9
+ * (OSK-12240) — the same data the web approval card shows.
10
+ */
11
+ class StoreAcquisitionsShow extends base_command_1.BaseCommand {
12
+ static description = 'Show a purchase an agent asked to make: its price, refund and buyer terms, and what it can do';
13
+ static examples = [
14
+ '<%= config.bin %> store acquisitions show acqr_0123456789abcdef01234567',
15
+ '<%= config.bin %> store acquisitions show acqr_0123456789abcdef01234567 --json',
16
+ ];
17
+ static args = {
18
+ requestId: core_1.Args.string({
19
+ description: 'The acquisition request id (acqr_…) the agent was given',
20
+ required: true,
21
+ ignoreStdin: true,
22
+ }),
23
+ };
24
+ static flags = {
25
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
26
+ };
27
+ async run() {
28
+ this.requireAuth();
29
+ const { args, flags } = await this.parse(StoreAcquisitionsShow);
30
+ let request;
31
+ try {
32
+ request = await data_provider_1.dataService.getStoreAcquisitionRequest(args.requestId);
33
+ }
34
+ catch (err) {
35
+ this.handleApiError(err);
36
+ }
37
+ if (!request) {
38
+ this.error('The purchase request could not be read.', { exit: 1 });
39
+ }
40
+ if (flags.json) {
41
+ this.log(JSON.stringify(request, null, 2));
42
+ return;
43
+ }
44
+ for (const line of (0, store_acquisition_1.describeAcquisitionRequestLines)(request)) {
45
+ this.log(line);
46
+ }
47
+ }
48
+ }
49
+ exports.default = StoreAcquisitionsShow;