@skrr-ai/cli 0.1.60 → 0.1.63

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 (197) 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/daemon/login.js +19 -1
  49. package/dist/commands/earnings/index.d.ts +15 -0
  50. package/dist/commands/earnings/index.js +46 -0
  51. package/dist/commands/earnings/payouts.d.ts +12 -0
  52. package/dist/commands/earnings/payouts.js +39 -0
  53. package/dist/commands/earnings/statements.d.ts +19 -0
  54. package/dist/commands/earnings/statements.js +70 -0
  55. package/dist/commands/goals/key-results/create.d.ts +1 -1
  56. package/dist/commands/goals/key-results/create.js +5 -1
  57. package/dist/commands/harnesses/show.js +11 -1
  58. package/dist/commands/logout.js +31 -0
  59. package/dist/commands/machines/show.js +10 -1
  60. package/dist/commands/managed-execution/show.d.ts +10 -0
  61. package/dist/commands/managed-execution/show.js +60 -0
  62. package/dist/commands/spaces/show.js +35 -1
  63. package/dist/commands/step-up.d.ts +23 -0
  64. package/dist/commands/step-up.js +96 -0
  65. package/dist/commands/store/acquisitions/approve.d.ts +30 -0
  66. package/dist/commands/store/acquisitions/approve.js +100 -0
  67. package/dist/commands/store/acquisitions/decline.d.ts +17 -0
  68. package/dist/commands/store/acquisitions/decline.js +47 -0
  69. package/dist/commands/store/acquisitions/show.d.ts +16 -0
  70. package/dist/commands/store/acquisitions/show.js +49 -0
  71. package/dist/commands/store/admissions/approve.d.ts +19 -0
  72. package/dist/commands/store/admissions/approve.js +50 -0
  73. package/dist/commands/store/admissions/list.d.ts +15 -0
  74. package/dist/commands/store/admissions/list.js +60 -0
  75. package/dist/commands/store/admissions/refuse.d.ts +18 -0
  76. package/dist/commands/store/admissions/refuse.js +49 -0
  77. package/dist/commands/store/advisories/artifact.d.ts +15 -0
  78. package/dist/commands/store/advisories/artifact.js +25 -0
  79. package/dist/commands/store/advisories/cancel.d.ts +13 -0
  80. package/dist/commands/store/advisories/cancel.js +34 -0
  81. package/dist/commands/store/advisories/close.d.ts +18 -0
  82. package/dist/commands/store/advisories/close.js +51 -0
  83. package/dist/commands/store/advisories/confirm.d.ts +17 -0
  84. package/dist/commands/store/advisories/confirm.js +40 -0
  85. package/dist/commands/store/advisories/issue.d.ts +20 -0
  86. package/dist/commands/store/advisories/issue.js +59 -0
  87. package/dist/commands/store/advisories/list.d.ts +15 -0
  88. package/dist/commands/store/advisories/list.js +49 -0
  89. package/dist/commands/store/advisories/show.d.ts +13 -0
  90. package/dist/commands/store/advisories/show.js +34 -0
  91. package/dist/commands/store/artifacts/release.d.ts +16 -0
  92. package/dist/commands/store/artifacts/release.js +31 -0
  93. package/dist/commands/store/artifacts/used-by.d.ts +12 -0
  94. package/dist/commands/store/artifacts/used-by.js +20 -0
  95. package/dist/commands/store/browse.d.ts +5 -0
  96. package/dist/commands/store/browse.js +28 -1
  97. package/dist/commands/store/channel.d.ts +21 -0
  98. package/dist/commands/store/channel.js +62 -0
  99. package/dist/commands/store/follow.d.ts +14 -0
  100. package/dist/commands/store/follow.js +45 -0
  101. package/dist/commands/store/governance/policy.d.ts +18 -5
  102. package/dist/commands/store/governance/policy.js +80 -12
  103. package/dist/commands/store/governance/requests.d.ts +28 -0
  104. package/dist/commands/store/governance/requests.js +116 -0
  105. package/dist/commands/store/install.d.ts +3 -0
  106. package/dist/commands/store/install.js +101 -2
  107. package/dist/commands/store/issues.d.ts +26 -0
  108. package/dist/commands/store/issues.js +118 -0
  109. package/dist/commands/store/maintainers/add.d.ts +13 -0
  110. package/dist/commands/store/maintainers/add.js +23 -0
  111. package/dist/commands/store/maintainers/remove.d.ts +13 -0
  112. package/dist/commands/store/maintainers/remove.js +22 -0
  113. package/dist/commands/store/publishers/approve.d.ts +11 -0
  114. package/dist/commands/store/publishers/approve.js +25 -0
  115. package/dist/commands/store/publishers/claim.d.ts +12 -0
  116. package/dist/commands/store/publishers/claim.js +20 -0
  117. package/dist/commands/store/publishers/confirm.d.ts +11 -0
  118. package/dist/commands/store/publishers/confirm.js +17 -0
  119. package/dist/commands/store/publishers/domains/begin.d.ts +12 -0
  120. package/dist/commands/store/publishers/domains/begin.js +20 -0
  121. package/dist/commands/store/publishers/domains/list.d.ts +9 -0
  122. package/dist/commands/store/publishers/domains/list.js +19 -0
  123. package/dist/commands/store/publishers/domains/verify.d.ts +12 -0
  124. package/dist/commands/store/publishers/domains/verify.js +20 -0
  125. package/dist/commands/store/publishers/namespaces.d.ts +8 -0
  126. package/dist/commands/store/publishers/namespaces.js +16 -0
  127. package/dist/commands/store/publishers/verified.d.ts +11 -0
  128. package/dist/commands/store/publishers/verified.js +34 -0
  129. package/dist/commands/store/refund.d.ts +22 -0
  130. package/dist/commands/store/refund.js +80 -0
  131. package/dist/commands/store/report.d.ts +20 -0
  132. package/dist/commands/store/report.js +59 -0
  133. package/dist/commands/store/reports.d.ts +11 -0
  134. package/dist/commands/store/reports.js +52 -0
  135. package/dist/commands/store/signals.d.ts +18 -0
  136. package/dist/commands/store/signals.js +43 -0
  137. package/dist/commands/store/star.d.ts +17 -0
  138. package/dist/commands/store/star.js +41 -0
  139. package/dist/commands/store/stars.d.ts +10 -0
  140. package/dist/commands/store/stars.js +33 -0
  141. package/dist/commands/store/trial.d.ts +11 -0
  142. package/dist/commands/store/trial.js +17 -0
  143. package/dist/commands/store/uninstall.d.ts +19 -0
  144. package/dist/commands/store/uninstall.js +118 -0
  145. package/dist/commands/store/update.d.ts +2 -0
  146. package/dist/commands/store/update.js +60 -2
  147. package/dist/commands/store/updates.d.ts +10 -4
  148. package/dist/commands/store/updates.js +60 -39
  149. package/dist/commands/store/watch.d.ts +18 -0
  150. package/dist/commands/store/watch.js +44 -0
  151. package/dist/commands/subscriptions/health.d.ts +12 -0
  152. package/dist/commands/subscriptions/health.js +39 -0
  153. package/dist/commands/subscriptions/list.js +3 -2
  154. package/dist/commands/subscriptions/status.js +7 -1
  155. package/dist/commands/subscriptions/subscribe.d.ts +9 -2
  156. package/dist/commands/subscriptions/subscribe.js +141 -12
  157. package/dist/commands/tasks/comments/list.js +9 -1
  158. package/dist/commands/tasks/labels/attach.js +15 -2
  159. package/dist/commands/tasks/show.js +17 -3
  160. package/dist/commands/tasks/update.js +15 -4
  161. package/dist/commands/tasks/updates/add.js +5 -1
  162. package/dist/lib/agent-config.js +1 -0
  163. package/dist/lib/agent-evals.d.ts +71 -0
  164. package/dist/lib/agent-evals.js +359 -0
  165. package/dist/lib/agent-spec.d.ts +28 -0
  166. package/dist/lib/agent-spec.js +58 -0
  167. package/dist/lib/auth-storage.d.ts +12 -0
  168. package/dist/lib/auth-storage.js +0 -33
  169. package/dist/lib/commerce.d.ts +8 -0
  170. package/dist/lib/commerce.js +10 -0
  171. package/dist/lib/earnings.d.ts +36 -0
  172. package/dist/lib/earnings.js +164 -0
  173. package/dist/lib/exec-runtime-binary.js +2 -2
  174. package/dist/lib/github-oidc.d.ts +13 -0
  175. package/dist/lib/github-oidc.js +41 -0
  176. package/dist/lib/governed-store.d.ts +43 -2
  177. package/dist/lib/governed-store.js +25 -1
  178. package/dist/lib/label-ref.js +16 -0
  179. package/dist/lib/live-runtime-binary.js +2 -1
  180. package/dist/lib/managed-execution.d.ts +10 -0
  181. package/dist/lib/managed-execution.js +43 -0
  182. package/dist/lib/principal-display.d.ts +20 -0
  183. package/dist/lib/principal-display.js +64 -0
  184. package/dist/lib/space-template-source.d.ts +14 -0
  185. package/dist/lib/space-template-source.js +41 -0
  186. package/dist/lib/step-up.d.ts +21 -0
  187. package/dist/lib/step-up.js +44 -0
  188. package/dist/lib/store-acquisition.d.ts +11 -0
  189. package/dist/lib/store-acquisition.js +40 -0
  190. package/dist/lib/store-advisories.d.ts +50 -0
  191. package/dist/lib/store-advisories.js +62 -0
  192. package/dist/lib/task-closure.js +1 -1
  193. package/dist/lib/web-url.d.ts +11 -0
  194. package/dist/lib/web-url.js +14 -0
  195. package/dist/node_modules/@skrr-ai/data-provider/index.js +25502 -24208
  196. package/oclif.manifest.json +22884 -18072
  197. package/package.json +21 -3
@@ -0,0 +1,116 @@
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 requests` — the queue a member's install request
8
+ * lands in and the owner answers (OSK-12262).
9
+ *
10
+ * A member asks for a release the workspace policy refuses. An owner
11
+ * approving only admits the release to the allowlist — the install still runs
12
+ * through the same evaluator, so the queue grants review, not a bypass.
13
+ *
14
+ * Members see their own requests; owners see the whole queue (`--status`
15
+ * narrows it; the default is `pending`, the part that needs an answer).
16
+ */
17
+ class StoreGovernanceRequests extends base_command_1.BaseCommand {
18
+ static description = 'List workspace Store install requests — or submit / answer one with --release, --approve or --decline';
19
+ static examples = [
20
+ '<%= config.bin %> store governance requests <workspace-id>',
21
+ '<%= config.bin %> store governance requests <workspace-id> --release <release-id> --note "for the support queue"',
22
+ '<%= config.bin %> store governance requests <workspace-id> --approve <request-id>',
23
+ '<%= config.bin %> store governance requests <workspace-id> --decline <request-id>',
24
+ ];
25
+ static args = {
26
+ workspace: core_1.Args.string({ description: 'Workspace id', required: true, ignoreStdin: true }),
27
+ };
28
+ static flags = {
29
+ status: core_1.Flags.string({
30
+ description: 'Filter the queue by status (owner: all requests; member: yours)',
31
+ options: ['pending', 'approved', 'declined'],
32
+ }),
33
+ release: core_1.Flags.string({
34
+ description: 'Submit a request for this release id (member action)',
35
+ }),
36
+ note: core_1.Flags.string({ description: 'Why you need the release (with --release)' }),
37
+ approve: core_1.Flags.string({ description: 'Approve this pending request id (owner)' }),
38
+ decline: core_1.Flags.string({ description: 'Decline this pending request id (owner)' }),
39
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
40
+ };
41
+ async run() {
42
+ this.requireAuth();
43
+ const { args, flags } = await this.parse(StoreGovernanceRequests);
44
+ if (flags.release && (flags.approve || flags.decline)) {
45
+ this.error('Use either --release to submit, or --approve/--decline to answer — not both', {
46
+ exit: 2,
47
+ });
48
+ }
49
+ if (flags.approve && flags.decline) {
50
+ this.error('--approve and --decline answer the same request differently; pick one', {
51
+ exit: 2,
52
+ });
53
+ }
54
+ if (flags.release) {
55
+ try {
56
+ const result = await (0, governed_store_1.submitStoreInstallRequest)(args.workspace, {
57
+ releaseId: flags.release,
58
+ ...(flags.note ? { note: flags.note } : {}),
59
+ });
60
+ if (flags.json) {
61
+ this.log(JSON.stringify(result, null, 2));
62
+ return;
63
+ }
64
+ const request = result.request;
65
+ this.log(`Requested ${request.releaseId ?? flags.release} — a workspace owner can approve it.`);
66
+ this.log(` request: ${request.requestId}`);
67
+ return;
68
+ }
69
+ catch (error) {
70
+ this.handleApiError(error);
71
+ return;
72
+ }
73
+ }
74
+ if (flags.approve || flags.decline) {
75
+ const requestId = flags.approve || flags.decline;
76
+ const decision = flags.approve ? 'approve' : 'decline';
77
+ try {
78
+ const result = await (0, governed_store_1.decideStoreInstallRequest)(args.workspace, requestId, decision);
79
+ if (flags.json) {
80
+ this.log(JSON.stringify(result, null, 2));
81
+ return;
82
+ }
83
+ const request = result.request;
84
+ this.log(decision === 'approve'
85
+ ? `Approved — ${request.releaseId ?? ''} is on the workspace allowlist now.`
86
+ : `Declined ${request.releaseId ?? ''}.`);
87
+ return;
88
+ }
89
+ catch (error) {
90
+ this.handleApiError(error);
91
+ return;
92
+ }
93
+ }
94
+ try {
95
+ const { requests } = await (0, governed_store_1.listStoreInstallRequests)(args.workspace, flags.status ?? 'pending');
96
+ if (flags.json) {
97
+ this.log(JSON.stringify(requests, null, 2));
98
+ return;
99
+ }
100
+ const rows = requests;
101
+ if (rows.length === 0) {
102
+ this.log('No requests in that state.');
103
+ return;
104
+ }
105
+ for (const request of rows) {
106
+ this.log(`${request.requestId} ${request.releaseId} ${request.status} by ${request.requesterId}`);
107
+ if (request.note)
108
+ this.log(` note: ${request.note}`);
109
+ }
110
+ }
111
+ catch (error) {
112
+ this.handleApiError(error);
113
+ }
114
+ }
115
+ }
116
+ exports.default = StoreGovernanceRequests;
@@ -11,6 +11,9 @@ export default class StoreInstall extends BaseCommand {
11
11
  space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
12
  'include-bootstrap': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
13
  'include-memory': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ 'run-on': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ 'share-outcomes': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
17
  };
15
18
  run(): Promise<void>;
16
19
  }
@@ -3,12 +3,24 @@ 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 prompt_1 = require("../../lib/prompt");
7
+ /**
8
+ * One line per placement, said the same way the web install rail says it: the
9
+ * difference is whether a stranger's instructions get this computer's shell,
10
+ * files and browser.
11
+ */
12
+ const PLACEMENT_NOTE = {
13
+ cloud: "It runs in the cloud, so its tools do not reach this computer. You can change that in the agent's Runtime settings.",
14
+ local: 'It may use tools on your own computer (shell, files, browser) whenever your daemon is connected.',
15
+ };
6
16
  class StoreInstall extends base_command_1.BaseCommand {
7
- static description = 'Install a published agent — you get your own copy of it';
17
+ static description = 'Install a published agent — you get your own copy of it. A paid agent shows its price and refund terms and asks you to confirm first.';
8
18
  static examples = [
9
19
  '<%= config.bin %> store install agent_abc123',
10
20
  '<%= config.bin %> store install agent_abc123 --release ar_def456',
11
- '<%= config.bin %> store install agent_abc123 --json',
21
+ '<%= config.bin %> store install agent_abc123 --run-on local',
22
+ '<%= config.bin %> store install agent_abc123 --share-outcomes',
23
+ '<%= config.bin %> store install agent_abc123 --yes --json',
12
24
  ];
13
25
  static args = {
14
26
  agentId: core_1.Args.string({
@@ -27,10 +39,78 @@ class StoreInstall extends base_command_1.BaseCommand {
27
39
  'include-memory': core_1.Flags.boolean({
28
40
  description: "Include the publisher's shared memories, if they published any",
29
41
  }),
42
+ yes: core_1.Flags.boolean({
43
+ char: 'y',
44
+ description: 'Confirm a paid purchase without prompting. The price and refund terms are still printed.',
45
+ }),
46
+ 'run-on': core_1.Flags.string({
47
+ description: 'Where the copy runs. cloud (the default) keeps its tools off this computer; ' +
48
+ 'local lets it use your shell, files and browser when your daemon is connected',
49
+ options: [...data_provider_1.STORE_INSTALL_EXECUTION_PLACEMENTS],
50
+ }),
51
+ 'share-outcomes': core_1.Flags.boolean({
52
+ allowNo: true,
53
+ description: "Let this copy's outcomes count towards the publisher's anonymized proof. Off unless " +
54
+ 'you pass it; the publisher only ever sees totals from at least five buyers',
55
+ }),
30
56
  };
31
57
  async run() {
32
58
  this.requireAuth();
33
59
  const { args, flags } = await this.parse(StoreInstall);
60
+ // The server still refuses a second install of a listing you own — this is
61
+ // the friendly read that says so before a quote or a prompt (OSK-12287:
62
+ // `installs` is the read model; `purchased` answers membership cheaply).
63
+ try {
64
+ const owned = await data_provider_1.dataService.getPurchasedAgents();
65
+ if ((owned?.purchasedAgentIds ?? []).includes(args.agentId)) {
66
+ this.error(`${args.agentId} is already installed. See it: skrr store updates, or update it: skrr store update ${args.agentId}`, { exit: 1 });
67
+ }
68
+ }
69
+ catch (err) {
70
+ // A read failure must not block an install — the server re-checks anyway.
71
+ if (err.exit)
72
+ throw err;
73
+ this.warn(`Could not check what you own (${err.message}); continuing.`);
74
+ }
75
+ // What installing would charge NOW, resolved by the server the way the
76
+ // install resolves it (OSK-12240). The install then pins what was shown, so
77
+ // a listing whose price moved in between is refused rather than charged.
78
+ let quote;
79
+ try {
80
+ quote = await data_provider_1.dataService.getStoreAgentAcquisitionQuote({
81
+ agentId: args.agentId,
82
+ ...(flags.release ? { releaseId: flags.release } : {}),
83
+ });
84
+ }
85
+ catch (err) {
86
+ this.handleApiError(err);
87
+ }
88
+ if (!quote) {
89
+ this.error('Could not read the price of this listing, so nothing was installed.', {
90
+ exit: 1,
91
+ });
92
+ }
93
+ const charge = Number(quote.charge) || 0;
94
+ if (charge > 0) {
95
+ const name = quote.listingName || args.agentId;
96
+ const version = quote.versionLabel ? ` v${quote.versionLabel}` : '';
97
+ // Printed before any prompt and even with --yes, so a scripted purchase
98
+ // still leaves the terms it agreed to in its own output.
99
+ this.logToStderr(`${name}${version} is a paid agent.`);
100
+ this.logToStderr(` Price: ${(0, data_provider_1.formatStoreAcquisitionPrice)(charge)} ${quote.currency}`);
101
+ this.logToStderr(` Refunds: ${(0, data_provider_1.describeStoreAcquisitionRefundTerms)(quote.refundTerms)}`);
102
+ // The price is one charge; the agent's runs are another (I5, C11).
103
+ this.logToStderr(` Runs paid by: ${(0, data_provider_1.describeStoreComputePayer)(quote.computePayer)}`);
104
+ this.logToStderr(` Buyer terms: ${quote.buyerTerms
105
+ ? `${quote.buyerTerms.termsVersion} — ${quote.buyerTerms.artifactUri}`
106
+ : 'not configured'}`);
107
+ this.logToStderr(` Offer: ${quote.offerVersionId}`);
108
+ const confirmed = await (0, prompt_1.confirmDestructive)(`Buy ${name} for ${(0, data_provider_1.formatStoreAcquisitionPrice)(charge)} and accept the buyer terms?`, flags.yes).catch((err) => this.error(err.message, { exit: err.exit ?? 1 }));
109
+ if (!confirmed) {
110
+ this.log('Cancelled. Nothing was bought.');
111
+ return;
112
+ }
113
+ }
34
114
  let response;
35
115
  try {
36
116
  response = await data_provider_1.dataService.installStoreAgent({
@@ -39,6 +119,18 @@ class StoreInstall extends base_command_1.BaseCommand {
39
119
  ...(flags.space ? { spaceId: flags.space } : {}),
40
120
  ...(flags['include-bootstrap'] ? { includeBootstrap: true } : {}),
41
121
  ...(flags['include-memory'] ? { includeMemory: true } : {}),
122
+ // Pin what the person was shown: the charge always, the offer when
123
+ // there is one to charge under.
124
+ expectedPrice: charge,
125
+ ...(charge > 0 ? { expectedOfferVersionId: quote.offerVersionId } : {}),
126
+ ...(flags['run-on']
127
+ ? { executionPlacement: flags['run-on'] }
128
+ : {}),
129
+ // Only an explicit answer is sent. Without one the server records
130
+ // nothing, which is not consent.
131
+ ...(flags['share-outcomes'] !== undefined
132
+ ? { outcomeSharing: { marketplaceProof: flags['share-outcomes'] === true } }
133
+ : {}),
42
134
  });
43
135
  }
44
136
  catch (err) {
@@ -50,6 +142,13 @@ class StoreInstall extends base_command_1.BaseCommand {
50
142
  }
51
143
  const installedId = response?.installedAgentId;
52
144
  this.log(`Installed as ${installedId ?? '-'}.`);
145
+ // Report only what the server says it wrote. A server that does not echo a
146
+ // placement predates it and wrote none, so naming one here would be a claim
147
+ // about a copy this CLI cannot see.
148
+ const placement = response?.executionPlacement;
149
+ if (placement === 'cloud' || placement === 'local') {
150
+ this.log(PLACEMENT_NOTE[placement]);
151
+ }
53
152
  // The thing worth saying once: this is a COPY, and it is yours. Edits you
54
153
  // make to it survive the publisher's future updates.
55
154
  this.log('This is your own copy. Edits you make to it are kept when the publisher ships an update.');
@@ -0,0 +1,26 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * Buyer-anchored listing issues (OSK-12290). A buyer files one on a copy they
4
+ * installed; the publisher answers. No Space, no ACL — the issue is the shared
5
+ * surface. Defaults to listing; `store issues reply` and `store issues close`
6
+ * are the two verbs that act on one.
7
+ */
8
+ export default class StoreIssues extends BaseCommand {
9
+ static description: string;
10
+ static examples: string[];
11
+ static args: {
12
+ agentId: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
13
+ };
14
+ static flags: {
15
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ status: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ mine: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ title: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ body: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ reply: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ close: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
22
+ reproduce: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
23
+ run: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
24
+ };
25
+ run(): Promise<void>;
26
+ }
@@ -0,0 +1,118 @@
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
+ /**
8
+ * Buyer-anchored listing issues (OSK-12290). A buyer files one on a copy they
9
+ * installed; the publisher answers. No Space, no ACL — the issue is the shared
10
+ * surface. Defaults to listing; `store issues reply` and `store issues close`
11
+ * are the two verbs that act on one.
12
+ */
13
+ class StoreIssues extends base_command_1.BaseCommand {
14
+ static description = 'List or file issues on a store listing you installed';
15
+ static examples = [
16
+ '<%= config.bin %> store issues agent_abc123',
17
+ '<%= config.bin %> store issues agent_abc123 --title "Tool never returns" --body "web_search hangs"',
18
+ '<%= config.bin %> store issues --reply issue_abc --body "fixed in 1.4.1"',
19
+ '<%= config.bin %> store issues --close issue_abc',
20
+ '<%= config.bin %> store issues --reproduce issue_abc --run run_def456',
21
+ ];
22
+ static args = {
23
+ agentId: core_1.Args.string({
24
+ description: 'The store listing (or your installed copy)',
25
+ required: false,
26
+ ignoreStdin: true,
27
+ }),
28
+ };
29
+ static flags = {
30
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
31
+ status: core_1.Flags.string({
32
+ description: 'Filter by status',
33
+ options: ['open', 'answered', 'closed'],
34
+ }),
35
+ mine: core_1.Flags.boolean({ description: 'Only your own issues (a publisher sees all by default)' }),
36
+ title: core_1.Flags.string({ description: 'File a new issue: its title' }),
37
+ body: core_1.Flags.string({ description: 'Issue or reply body' }),
38
+ reply: core_1.Flags.string({ description: 'Issue id to reply to (publisher only)' }),
39
+ close: core_1.Flags.string({ description: 'Issue id to close (the buyer who filed it)' }),
40
+ reproduce: core_1.Flags.string({
41
+ description: 'Issue id to attach a sanitized run reproduction to (the buyer who filed it; OSK-12291)',
42
+ }),
43
+ run: core_1.Flags.string({
44
+ description: 'Task execution run id to reproduce — used with --reproduce',
45
+ }),
46
+ };
47
+ async run() {
48
+ this.requireAuth();
49
+ const { args, flags } = await this.parse(StoreIssues);
50
+ try {
51
+ if (flags.reproduce) {
52
+ if (!flags.run)
53
+ this.error('--reproduce needs --run <runId>', { exit: 2 });
54
+ const res = await data_provider_1.dataService.attachStoreListingIssueReproduction(flags.reproduce, flags.run);
55
+ this.log(flags.json
56
+ ? JSON.stringify(res, null, 2)
57
+ : `Attached a sanitized reproduction of ${flags.run} to ${res.issue.issueId}.`);
58
+ return;
59
+ }
60
+ if (flags.reply) {
61
+ if (!flags.body)
62
+ this.error('--reply needs --body', { exit: 2 });
63
+ const res = await data_provider_1.dataService.replyStoreListingIssue(flags.reply, flags.body);
64
+ this.log(flags.json ? JSON.stringify(res, null, 2) : `Answered ${res.issue.issueId}.`);
65
+ return;
66
+ }
67
+ if (flags.close) {
68
+ const res = await data_provider_1.dataService.closeStoreListingIssue(flags.close);
69
+ this.log(flags.json ? JSON.stringify(res, null, 2) : `Closed ${res.issue.issueId}.`);
70
+ return;
71
+ }
72
+ if (!args.agentId) {
73
+ this.error('Pass a listing id, or --reply / --close with an issue id', { exit: 2 });
74
+ }
75
+ if (flags.title) {
76
+ if (!flags.body)
77
+ this.error('--title needs --body', { exit: 2 });
78
+ const res = await data_provider_1.dataService.createStoreListingIssue({
79
+ agentId: args.agentId,
80
+ title: flags.title,
81
+ body: flags.body,
82
+ });
83
+ this.log(flags.json
84
+ ? JSON.stringify(res, null, 2)
85
+ : `Filed ${res.issue.issueId} — the publisher sees it in their issue queue.`);
86
+ return;
87
+ }
88
+ const res = await data_provider_1.dataService.listStoreListingIssues(args.agentId, {
89
+ status: flags.status,
90
+ mine: flags.mine,
91
+ });
92
+ const issues = res?.issues ?? [];
93
+ if (flags.json) {
94
+ this.log(JSON.stringify(res, null, 2));
95
+ return;
96
+ }
97
+ if (!issues.length) {
98
+ this.log('No issues.');
99
+ return;
100
+ }
101
+ (0, format_1.renderTable)(issues.map((i) => ({
102
+ issueId: String(i.issueId),
103
+ status: String(i.status),
104
+ title: String(i.title),
105
+ release: i.releaseVersionLabel ?? '-',
106
+ })), [
107
+ { key: 'issueId', header: 'ISSUE' },
108
+ { key: 'status', header: 'STATUS' },
109
+ { key: 'title', header: 'TITLE', maxWidth: 40 },
110
+ { key: 'release', header: 'RELEASE' },
111
+ ], (line) => this.log(line));
112
+ }
113
+ catch (err) {
114
+ this.handleApiError(err);
115
+ }
116
+ }
117
+ }
118
+ exports.default = StoreIssues;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class StoreMaintainersAdd extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ entityType: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ entityId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ userId: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,23 @@
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
+ class StoreMaintainersAdd extends base_command_1.BaseCommand {
7
+ static description = 'Grant a listing maintainer — a listing-pipeline role, not an editor';
8
+ static args = {
9
+ entityType: core_1.Args.string({ required: true, ignoreStdin: true }),
10
+ entityId: core_1.Args.string({ required: true, ignoreStdin: true }),
11
+ };
12
+ static flags = {
13
+ userId: core_1.Flags.string({ required: true }),
14
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
15
+ };
16
+ async run() {
17
+ this.requireAuth();
18
+ const { args, flags } = await this.parse(StoreMaintainersAdd);
19
+ const result = await data_provider_1.dataService.grantStoreListingMaintainer(args.entityType, args.entityId, flags.userId);
20
+ this.log(JSON.stringify(result, null, 2));
21
+ }
22
+ }
23
+ exports.default = StoreMaintainersAdd;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class StoreMaintainersRemove extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ entityType: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ entityId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ userId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const core_2 = require("@oclif/core");
5
+ const data_provider_1 = require("@skrr-ai/data-provider");
6
+ const base_command_1 = require("../../../base-command");
7
+ class StoreMaintainersRemove extends base_command_1.BaseCommand {
8
+ static description = 'Revoke a listing maintainer grant';
9
+ static args = {
10
+ entityType: core_1.Args.string({ required: true, ignoreStdin: true }),
11
+ entityId: core_1.Args.string({ required: true, ignoreStdin: true }),
12
+ userId: core_1.Args.string({ required: true, ignoreStdin: true }),
13
+ };
14
+ static flags = { json: core_2.Flags.boolean({ description: 'Output JSON' }) };
15
+ async run() {
16
+ this.requireAuth();
17
+ const { args, flags } = await this.parse(StoreMaintainersRemove);
18
+ const result = await data_provider_1.dataService.revokeStoreListingMaintainer(args.entityType, args.entityId, args.userId);
19
+ this.log(JSON.stringify(result, null, 2));
20
+ }
21
+ }
22
+ exports.default = StoreMaintainersRemove;
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class StorePublishersApprove extends BaseCommand {
3
+ static description: string;
4
+ static flags: {
5
+ workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ entityType: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ entityId: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,25 @@
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
+ class StorePublishersApprove extends base_command_1.BaseCommand {
7
+ static description = 'Request a two-person org publish approval for a listing';
8
+ static flags = {
9
+ workspaceId: core_1.Flags.string({ required: true }),
10
+ entityType: core_1.Flags.string({ required: true }),
11
+ entityId: core_1.Flags.string({ required: true }),
12
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
13
+ };
14
+ async run() {
15
+ this.requireAuth();
16
+ const { flags } = await this.parse(StorePublishersApprove);
17
+ const result = await data_provider_1.dataService.requestStoreOrgPublishApproval({
18
+ workspaceId: flags.workspaceId,
19
+ entityType: flags.entityType,
20
+ entityId: flags.entityId,
21
+ });
22
+ this.log(JSON.stringify(result, null, 2));
23
+ }
24
+ }
25
+ exports.default = StorePublishersApprove;
@@ -0,0 +1,12 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class StorePublishersClaim extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ handle: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,20 @@
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
+ class StorePublishersClaim extends base_command_1.BaseCommand {
7
+ static description = 'Claim a publisher namespace handle — similar names are refused';
8
+ static args = { handle: core_1.Args.string({ required: true, ignoreStdin: true }) };
9
+ static flags = {
10
+ workspaceId: core_1.Flags.string({ description: 'Claim for this workspace' }),
11
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
12
+ };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { args, flags } = await this.parse(StorePublishersClaim);
16
+ const result = await data_provider_1.dataService.claimStorePublisherNamespace(args.handle, flags.workspaceId);
17
+ this.log(JSON.stringify(result, null, 2));
18
+ }
19
+ }
20
+ exports.default = StorePublishersClaim;
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class StorePublishersConfirm extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ approvalId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,17 @@
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
+ class StorePublishersConfirm extends base_command_1.BaseCommand {
7
+ static description = 'Confirm a pending org publish approval (must be a second owner/admin)';
8
+ static args = { approvalId: core_1.Args.string({ required: true, ignoreStdin: true }) };
9
+ static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
10
+ async run() {
11
+ this.requireAuth();
12
+ const { args, flags } = await this.parse(StorePublishersConfirm);
13
+ const result = await data_provider_1.dataService.confirmStoreOrgPublishApproval(args.approvalId);
14
+ this.log(JSON.stringify(result, null, 2));
15
+ }
16
+ }
17
+ exports.default = StorePublishersConfirm;
@@ -0,0 +1,12 @@
1
+ import { BaseCommand } from '../../../../base-command';
2
+ export default class StorePublisherDomainsBegin extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ domain: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,20 @@
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
+ class StorePublisherDomainsBegin extends base_command_1.BaseCommand {
7
+ static description = 'Claim a publisher domain — prints the DNS TXT record to place';
8
+ static args = { domain: core_1.Args.string({ required: true, ignoreStdin: true }) };
9
+ static flags = {
10
+ workspaceId: core_1.Flags.string({ description: 'Publish as this workspace' }),
11
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
12
+ };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { args, flags } = await this.parse(StorePublisherDomainsBegin);
16
+ const result = await data_provider_1.dataService.beginStorePublisherDomainVerification(args.domain, flags.workspaceId);
17
+ this.log(JSON.stringify(result, null, 2));
18
+ }
19
+ }
20
+ exports.default = StorePublisherDomainsBegin;
@@ -0,0 +1,9 @@
1
+ import { BaseCommand } from '../../../../base-command';
2
+ export default class StorePublisherDomainsList extends BaseCommand {
3
+ static description: string;
4
+ static flags: {
5
+ workspaceId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ };
8
+ run(): Promise<void>;
9
+ }