@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
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * The in-product refund channel the buyer terms promise, for a person or an
4
+ * agent working from a terminal (OSK-12279). It goes through the same gate as
5
+ * the web: one of three answers — refunded now, sent to a person, or refused
6
+ * citing the terms the purchase was made under — and all three are answers,
7
+ * so none of them is an error exit.
8
+ */
9
+ export default class StoreRefund extends BaseCommand {
10
+ static description: string;
11
+ static examples: string[];
12
+ static args: {
13
+ agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
14
+ };
15
+ static flags: {
16
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ note: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ 'statutory-rights': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
+ };
21
+ run(): Promise<void>;
22
+ }
@@ -0,0 +1,80 @@
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
+ // A proactive template may declare reasons of its own, so the server — which
7
+ // answers with the accepted list when it refuses one — is the check, not oclif.
8
+ const REASON_HELP = `${data_provider_1.STORE_REFUND_REASON_CODES.join(', ')}, or a reason the template declares`;
9
+ /**
10
+ * The in-product refund channel the buyer terms promise, for a person or an
11
+ * agent working from a terminal (OSK-12279). It goes through the same gate as
12
+ * the web: one of three answers — refunded now, sent to a person, or refused
13
+ * citing the terms the purchase was made under — and all three are answers,
14
+ * so none of them is an error exit.
15
+ */
16
+ class StoreRefund extends base_command_1.BaseCommand {
17
+ static description = 'Ask for a refund of an agent you bought. The answer is one of: refunded now, sent to a person for review, or not refundable under the terms you bought it on.';
18
+ static examples = [
19
+ '<%= config.bin %> store refund agent_abc123',
20
+ '<%= config.bin %> store refund agent_abc123 --reason material_defect --note "It never answers"',
21
+ '<%= config.bin %> store refund agent_abc123 --statutory-rights',
22
+ ];
23
+ static args = {
24
+ agentId: core_1.Args.string({
25
+ description: 'The store agent you bought (its listing id)',
26
+ required: true,
27
+ ignoreStdin: true,
28
+ }),
29
+ };
30
+ static flags = {
31
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
32
+ reason: core_1.Flags.string({
33
+ description: `Why (${REASON_HELP}). A failed delivery, a defect, or a payment error always goes to a person, whatever the terms say.`,
34
+ }),
35
+ note: core_1.Flags.string({ description: 'Anything a reviewer should know' }),
36
+ 'statutory-rights': core_1.Flags.boolean({
37
+ description: 'Invoke your statutory consumer rights. Such a request is always decided by a person, not by the listing terms.',
38
+ }),
39
+ };
40
+ async run() {
41
+ this.requireAuth();
42
+ const { args, flags } = await this.parse(StoreRefund);
43
+ let response;
44
+ try {
45
+ response = await data_provider_1.dataService.requestStoreAgentRefund({
46
+ agentId: args.agentId,
47
+ ...(flags.reason ? { reasonCode: flags.reason } : {}),
48
+ ...(flags.note ? { note: flags.note } : {}),
49
+ ...(flags['statutory-rights'] ? { statutoryRightsClaim: true } : {}),
50
+ });
51
+ }
52
+ catch (err) {
53
+ this.handleApiError(err);
54
+ }
55
+ if (!response) {
56
+ this.error('The refund request got no answer. Nothing was refunded.', { exit: 1 });
57
+ }
58
+ if (flags.json) {
59
+ this.log(JSON.stringify(response, null, 2));
60
+ return;
61
+ }
62
+ const copy = (0, data_provider_1.describeStoreRefundDecision)(response.decision, response.decisionCode);
63
+ let replay = '';
64
+ if (response.alreadyRefunded)
65
+ replay = ' (already refunded earlier)';
66
+ else if (response.alreadyPending)
67
+ replay = ' (a request is already waiting for review)';
68
+ this.log(`${copy.label}${replay}`);
69
+ if (copy.detail)
70
+ this.log(copy.detail);
71
+ if (copy.reason)
72
+ this.log(`Why: ${copy.reason}`);
73
+ if (response.termsClause)
74
+ this.log(`Terms: ${response.termsClause}`);
75
+ if (response.decision === 'denied_by_terms') {
76
+ this.log('If you believe your statutory consumer rights apply, run this again with --statutory-rights and a person will decide.');
77
+ }
78
+ }
79
+ }
80
+ exports.default = StoreRefund;
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * Report a Store agent. Any reason for an agent you installed; `security` — the
4
+ * private channel — for any agent you can see, installed or not. Only the Store
5
+ * review team reads a report; the publisher is told the outcome and a count.
6
+ */
7
+ export default class StoreReport extends BaseCommand {
8
+ static description: string;
9
+ static examples: string[];
10
+ static args: {
11
+ agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
12
+ };
13
+ static flags: {
14
+ reason: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ release: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,59 @@
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
+ * Report a Store agent. Any reason for an agent you installed; `security` — the
8
+ * private channel — for any agent you can see, installed or not. Only the Store
9
+ * review team reads a report; the publisher is told the outcome and a count.
10
+ */
11
+ class StoreReport extends base_command_1.BaseCommand {
12
+ static description = 'Report a Store agent (use --reason security to report a vulnerability privately, no install needed)';
13
+ static examples = [
14
+ '<%= config.bin %> store report agent_abc --reason broken --description "Fails on every run"',
15
+ '<%= config.bin %> store report agent_abc --reason security --description "Sends my token to an undeclared host"',
16
+ ];
17
+ static args = {
18
+ agentId: core_1.Args.string({ required: true, ignoreStdin: true }),
19
+ };
20
+ static flags = {
21
+ reason: core_1.Flags.string({
22
+ required: true,
23
+ options: data_provider_1.STORE_REPORT_REASONS.map((entry) => entry.value),
24
+ }),
25
+ description: core_1.Flags.string({ description: 'What happened (required for security reports)' }),
26
+ release: core_1.Flags.string({ description: 'Release id the report is about' }),
27
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
28
+ };
29
+ async run() {
30
+ this.requireAuth();
31
+ const { args, flags } = await this.parse(StoreReport);
32
+ const reason = flags.reason;
33
+ if (reason === data_provider_1.STORE_SECURITY_REPORT_REASON && !flags.description?.trim()) {
34
+ this.error('A security report needs --description so a reviewer can reproduce it', {
35
+ exit: 1,
36
+ });
37
+ }
38
+ try {
39
+ const result = await data_provider_1.dataService.reportAgent({
40
+ agentId: args.agentId,
41
+ reason,
42
+ releaseId: flags.release,
43
+ description: flags.description,
44
+ });
45
+ if (flags.json) {
46
+ this.log(JSON.stringify(result, null, 2));
47
+ return;
48
+ }
49
+ this.log(result.private
50
+ ? `Security report ${result.reportId} sent privately to the Store review team.`
51
+ : `Report ${result.reportId} submitted.`);
52
+ this.log(`Follow it with: skrr store reports --agent ${args.agentId}`);
53
+ }
54
+ catch (err) {
55
+ this.handleApiError(err);
56
+ }
57
+ }
58
+ }
59
+ exports.default = StoreReport;
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /** Your own Store reports and where each stands. Never anyone else's. */
3
+ export default class StoreReports extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,52 @@
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
+ /** Your own Store reports and where each stands. Never anyone else's. */
8
+ class StoreReports extends base_command_1.BaseCommand {
9
+ static description = 'Show your Store reports and where each stands';
10
+ static examples = [
11
+ '<%= config.bin %> store reports',
12
+ '<%= config.bin %> store reports --agent agent_abc --json',
13
+ ];
14
+ static flags = {
15
+ agent: core_1.Flags.string({ description: 'Only reports on this agent' }),
16
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
17
+ };
18
+ async run() {
19
+ this.requireAuth();
20
+ const { flags } = await this.parse(StoreReports);
21
+ let result;
22
+ try {
23
+ result = await data_provider_1.dataService.getMyStoreReports({ agentId: flags.agent });
24
+ }
25
+ catch (err) {
26
+ this.handleApiError(err);
27
+ }
28
+ const reports = result?.data ?? [];
29
+ if (flags.json) {
30
+ this.log(JSON.stringify(reports, null, 2));
31
+ return;
32
+ }
33
+ if (reports.length === 0) {
34
+ this.log('You have not filed any Store reports.');
35
+ return;
36
+ }
37
+ (0, format_1.renderTable)(reports.map((report) => ({
38
+ agent: report.agentId,
39
+ reason: (0, data_provider_1.storeReportReasonLabel)(report.reason),
40
+ version: report.versionLabel ?? '-',
41
+ filed: report.createdAt ? String(report.createdAt).slice(0, 10) : '-',
42
+ status: (0, data_provider_1.describeMyStoreReport)(report),
43
+ })), [
44
+ { key: 'agent', header: 'AGENT', verbatim: true },
45
+ { key: 'reason', header: 'REASON' },
46
+ { key: 'version', header: 'VERSION' },
47
+ { key: 'filed', header: 'FILED' },
48
+ { key: 'status', header: 'STATUS', maxWidth: 60 },
49
+ ], (line) => this.log(line));
50
+ }
51
+ }
52
+ exports.default = StoreReports;
@@ -0,0 +1,18 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * A store listing's social signals (OSK-12309): watchers, stars, and —
4
+ * because an intent count means nothing alone — the release's measured run
5
+ * cost beside them. Publisher follows live on the canonical public profile,
6
+ * where counts may be intentionally withheld by the privacy threshold.
7
+ */
8
+ export default class StoreSignals extends BaseCommand {
9
+ static description: string;
10
+ static examples: string[];
11
+ static args: {
12
+ agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
13
+ };
14
+ static flags: {
15
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ };
17
+ run(): Promise<void>;
18
+ }
@@ -0,0 +1,43 @@
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
+ * A store listing's social signals (OSK-12309): watchers, stars, and —
8
+ * because an intent count means nothing alone — the release's measured run
9
+ * cost beside them. Publisher follows live on the canonical public profile,
10
+ * where counts may be intentionally withheld by the privacy threshold.
11
+ */
12
+ class StoreSignals extends base_command_1.BaseCommand {
13
+ static description = "Show a store listing's watch/star signals and measured run cost";
14
+ static examples = ['<%= config.bin %> store signals agent_abc123'];
15
+ static args = {
16
+ agentId: core_1.Args.string({ description: 'The store agent id', required: true, ignoreStdin: true }),
17
+ };
18
+ static flags = {
19
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
20
+ };
21
+ async run() {
22
+ this.requireAuth();
23
+ const { args, flags } = await this.parse(StoreSignals);
24
+ try {
25
+ const response = await data_provider_1.dataService.getStoreListingSocial(args.agentId);
26
+ const s = response.signals;
27
+ if (flags.json) {
28
+ this.log(JSON.stringify(s, null, 2));
29
+ return;
30
+ }
31
+ this.log(`Watchers ${s.watch.count}${s.watch.watching ? ' (you watch)' : ''}`);
32
+ this.log(`Stars ${s.star.count}${s.star.starredByMe ? ' (starred)' : ''}`);
33
+ if (s.measuredRunCost?.sufficient) {
34
+ const fmt = (v) => `$${((v ?? 0) / 1_000_000).toFixed(4)}`;
35
+ this.log(`Run cost ${fmt(s.measuredRunCost.minCostMicros)}–${fmt(s.measuredRunCost.maxCostMicros)} per run (measured, ${s.measuredRunCost.cohorts} buyers, ${s.measuredRunCost.windowDays}d)`);
36
+ }
37
+ }
38
+ catch (err) {
39
+ this.handleApiError(err);
40
+ }
41
+ }
42
+ }
43
+ exports.default = StoreSignals;
@@ -0,0 +1,17 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * Star a store listing (OSK-12309): an intent signal for you and the
4
+ * publisher — it never weighs into ranking and never notifies.
5
+ */
6
+ export default class StoreStar extends BaseCommand {
7
+ static description: string;
8
+ static examples: string[];
9
+ static args: {
10
+ agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
11
+ };
12
+ static flags: {
13
+ undo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ };
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,41 @@
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
+ * Star a store listing (OSK-12309): an intent signal for you and the
8
+ * publisher — it never weighs into ranking and never notifies.
9
+ */
10
+ class StoreStar extends base_command_1.BaseCommand {
11
+ static description = 'Star a store agent — or remove your star with --undo';
12
+ static examples = [
13
+ '<%= config.bin %> store star agent_abc123',
14
+ '<%= config.bin %> store star agent_abc123 --undo',
15
+ ];
16
+ static args = {
17
+ agentId: core_1.Args.string({ description: 'The store agent id', required: true, ignoreStdin: true }),
18
+ };
19
+ static flags = {
20
+ undo: core_1.Flags.boolean({ description: 'Remove your star' }),
21
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
22
+ };
23
+ async run() {
24
+ this.requireAuth();
25
+ const { args, flags } = await this.parse(StoreStar);
26
+ try {
27
+ const result = flags.undo
28
+ ? await data_provider_1.dataService.unstarStoreListing(args.agentId)
29
+ : await data_provider_1.dataService.starStoreListing(args.agentId);
30
+ if (flags.json) {
31
+ this.log(JSON.stringify(result, null, 2));
32
+ return;
33
+ }
34
+ this.log(flags.undo ? 'Star removed.' : 'Starred.');
35
+ }
36
+ catch (err) {
37
+ this.handleApiError(err);
38
+ }
39
+ }
40
+ }
41
+ exports.default = StoreStar;
@@ -0,0 +1,10 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /** Your starred store listings (OSK-12309) — the saved-intent list. */
3
+ export default class StoreStars 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,33 @@
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
+ /** Your starred store listings (OSK-12309) — the saved-intent list. */
7
+ class StoreStars extends base_command_1.BaseCommand {
8
+ static description = 'List the store listings you have starred';
9
+ static examples = ['<%= config.bin %> store stars'];
10
+ static flags = {
11
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
12
+ };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { flags } = await this.parse(StoreStars);
16
+ try {
17
+ const result = await data_provider_1.dataService.getMyStarredListings();
18
+ if (flags.json) {
19
+ this.log(JSON.stringify(result, null, 2));
20
+ return;
21
+ }
22
+ for (const item of result.items || []) {
23
+ this.log(`${item.agentId}${item.listingTitle ? ` ${item.listingTitle}` : ''}`);
24
+ }
25
+ if (!result.items?.length)
26
+ this.log('No starred listings.');
27
+ }
28
+ catch (err) {
29
+ this.handleApiError(err);
30
+ }
31
+ }
32
+ }
33
+ exports.default = StoreStars;
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ export default class StoreTrial extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ agentId: 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 StoreTrial extends base_command_1.BaseCommand {
7
+ static description = 'Start a card-free trial on a store service — subscribe with the returned grantId';
8
+ static args = { agentId: 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(StoreTrial);
13
+ const result = await data_provider_1.dataService.startStoreServiceTrial(args.agentId);
14
+ this.log(JSON.stringify(result, null, 2));
15
+ }
16
+ }
17
+ exports.default = StoreTrial;
@@ -0,0 +1,19 @@
1
+ import type { StoreUninstallResponse } from '@skrr-ai/data-provider';
2
+ import { BaseCommand } from '../../base-command';
3
+ /** The uninstall line, read from what the server says it uninstalled. */
4
+ export declare function storeUninstallReport(response: StoreUninstallResponse): string;
5
+ /** Everything the command prints for a receipt, in order. */
6
+ export declare function storeUninstallLines(response: StoreUninstallResponse): string[];
7
+ export default class StoreUninstall extends BaseCommand {
8
+ static description: string;
9
+ static examples: string[];
10
+ static args: {
11
+ agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
12
+ };
13
+ static flags: {
14
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ erase: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ };
18
+ run(): Promise<void>;
19
+ }
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.storeUninstallReport = storeUninstallReport;
4
+ exports.storeUninstallLines = storeUninstallLines;
5
+ const core_1 = require("@oclif/core");
6
+ const data_provider_1 = require("@skrr-ai/data-provider");
7
+ const base_command_1 = require("../../base-command");
8
+ const prompt_1 = require("../../lib/prompt");
9
+ /** The uninstall line, read from what the server says it uninstalled. */
10
+ function storeUninstallReport(response) {
11
+ const kind = (0, data_provider_1.agentRemovalKind)({ uninstalled: true, result: response.result });
12
+ if (kind === 'team_uninstalled') {
13
+ const ids = response.result.entityType === 'team' ? response.result.installedAgentIds : [];
14
+ const scope = ids?.length ? ` (${ids.length} agents)` : '';
15
+ return `Uninstalled the team ${response.agentId} was installed with${scope}.`;
16
+ }
17
+ return `Uninstalled ${response.agentId}.`;
18
+ }
19
+ /** Everything the command prints for a receipt, in order. */
20
+ function storeUninstallLines(response) {
21
+ if (!response.erasure) {
22
+ return [
23
+ storeUninstallReport(response),
24
+ 'Nothing was erased: reinstall it from the store to restore it, or run this again with --erase to remove its memory.',
25
+ ];
26
+ }
27
+ return [storeUninstallReport(response), ...(0, data_provider_1.describeStoreErasure)(response.erasure)];
28
+ }
29
+ function parseReceipt(body) {
30
+ let parsed = body;
31
+ if (typeof body === 'string') {
32
+ try {
33
+ parsed = JSON.parse(body);
34
+ }
35
+ catch {
36
+ return null;
37
+ }
38
+ }
39
+ const receipt = parsed;
40
+ return receipt?.uninstalled === true && receipt.result
41
+ ? receipt
42
+ : null;
43
+ }
44
+ class StoreUninstall extends base_command_1.BaseCommand {
45
+ static description = 'Uninstall an agent you installed from the store. Reinstalling restores it — unless you pass --erase, which also deletes its memory and ends its commitments (irreversible). The agent, your purchase and its delivered tasks are always kept.';
46
+ static examples = [
47
+ '<%= config.bin %> store uninstall agent_abc123',
48
+ '<%= config.bin %> store uninstall agent_abc123 --erase',
49
+ '<%= config.bin %> store uninstall agent_abc123 --erase --yes --json',
50
+ ];
51
+ static args = {
52
+ agentId: core_1.Args.string({
53
+ description: 'Your installed copy, or the store agent you installed',
54
+ required: true,
55
+ ignoreStdin: true,
56
+ }),
57
+ };
58
+ static flags = {
59
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
60
+ erase: core_1.Flags.boolean({
61
+ description: "Also erase the copy's memory and end its commitments. Works on a copy you already uninstalled.",
62
+ }),
63
+ yes: core_1.Flags.boolean({ char: 'y', description: 'Skip the confirmation prompt for --erase' }),
64
+ };
65
+ async run() {
66
+ this.requireAuth();
67
+ const { args, flags } = await this.parse(StoreUninstall);
68
+ if (flags.erase) {
69
+ let ok;
70
+ try {
71
+ ok = await (0, prompt_1.confirmDestructive)(`Uninstall and erase ${args.agentId}? Its memory is deleted and cannot be recovered. ${data_provider_1.STORE_ERASURE_KEEPS}`, flags.yes);
72
+ }
73
+ catch (err) {
74
+ const e = err;
75
+ this.error(e.message ?? 'Confirmation required.', { exit: e.exit ?? 1 });
76
+ }
77
+ if (!ok) {
78
+ this.log('Cancelled. Nothing was uninstalled or erased.');
79
+ return;
80
+ }
81
+ }
82
+ let response;
83
+ try {
84
+ response = await data_provider_1.dataService.uninstallStoreAgent({
85
+ agentId: args.agentId,
86
+ ...(flags.erase ? { erase: true } : {}),
87
+ });
88
+ }
89
+ catch (err) {
90
+ // 503 ERASURE_INCOMPLETE still carries a receipt: the copy IS uninstalled
91
+ // and part of it may be erased. Say exactly that, then fail, so a script
92
+ // knows to run the same command again.
93
+ const failure = err;
94
+ const receipt = failure?.status === 503 ? parseReceipt(failure.body) : null;
95
+ if (receipt) {
96
+ if (flags.json) {
97
+ this.log(JSON.stringify(receipt, null, 2));
98
+ }
99
+ else {
100
+ for (const line of storeUninstallLines(receipt))
101
+ this.log(line);
102
+ }
103
+ this.error('Erasure not finished.', { exit: 1 });
104
+ }
105
+ this.handleApiError(err);
106
+ }
107
+ if (!response) {
108
+ this.error('The server did not say what it uninstalled.', { exit: 1 });
109
+ }
110
+ if (flags.json) {
111
+ this.log(JSON.stringify(response, null, 2));
112
+ return;
113
+ }
114
+ for (const line of storeUninstallLines(response))
115
+ this.log(line);
116
+ }
117
+ }
118
+ exports.default = StoreUninstall;
@@ -10,6 +10,8 @@ export default class StoreUpdate extends BaseCommand {
10
10
  release: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
11
  installed: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
12
  strategy: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ 'accept-capabilities': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ decline: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
15
  };
14
16
  run(): Promise<void>;
15
17
  }