@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,31 @@
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 StoreArtifactsRelease extends base_command_1.BaseCommand {
7
+ static description = 'Publish an immutable dependency release for your own skill or action';
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
+ versionLabel: core_1.Flags.string({ required: true }),
14
+ artifactRef: core_1.Flags.string({ required: true }),
15
+ price: core_1.Flags.integer({ description: 'Price in micro-USD; omit for zero-price' }),
16
+ workspaceId: core_1.Flags.string({ description: 'Publish as this workspace' }),
17
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
18
+ };
19
+ async run() {
20
+ this.requireAuth();
21
+ const { args, flags } = await this.parse(StoreArtifactsRelease);
22
+ const result = await data_provider_1.dataService.publishStoreArtifactRelease(args.entityType, args.entityId, {
23
+ versionLabel: flags.versionLabel,
24
+ artifactRef: flags.artifactRef,
25
+ ...(flags.price !== undefined ? { price: flags.price } : {}),
26
+ ...(flags.workspaceId ? { publishAs: { workspaceId: flags.workspaceId } } : {}),
27
+ });
28
+ this.log(JSON.stringify(result, null, 2));
29
+ }
30
+ }
31
+ exports.default = StoreArtifactsRelease;
@@ -0,0 +1,12 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class StoreArtifactsUsedBy 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
+ 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 StoreArtifactsUsedBy extends base_command_1.BaseCommand {
7
+ static description = 'Reverse dependency index — public releases declaring this artifact';
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 = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { args, flags } = await this.parse(StoreArtifactsUsedBy);
16
+ const result = await data_provider_1.dataService.getStoreArtifactUsedBy(args.entityType, args.entityId);
17
+ this.log(JSON.stringify(result, null, 2));
18
+ }
19
+ }
20
+ exports.default = StoreArtifactsUsedBy;
@@ -9,6 +9,11 @@ export default class StoreBrowse extends BaseCommand {
9
9
  limit: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
10
10
  cursor: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
11
  sort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ pricing: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ capability: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ permission: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ placement: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ 'max-run-cost': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
17
  };
13
18
  run(): Promise<void>;
14
19
  }
@@ -10,6 +10,7 @@ class StoreBrowse extends base_command_1.BaseCommand {
10
10
  '<%= config.bin %> store browse',
11
11
  '<%= config.bin %> store browse --q "cost watchdog"',
12
12
  '<%= config.bin %> store browse --category engineering --limit 10 --json',
13
+ '<%= config.bin %> store browse --sort top --pricing free',
13
14
  ];
14
15
  static flags = {
15
16
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -17,7 +18,28 @@ class StoreBrowse extends base_command_1.BaseCommand {
17
18
  category: core_1.Flags.string({ description: 'Filter by category' }),
18
19
  limit: core_1.Flags.integer({ description: 'Max results', default: 20 }),
19
20
  cursor: core_1.Flags.string({ description: 'Pagination cursor from a previous page' }),
20
- sort: core_1.Flags.string({ description: 'Sort order', options: ['popular', 'newest', 'rating'] }),
21
+ sort: core_1.Flags.string({
22
+ description: 'Sort order. newest = latest release first; top = server ranking that weighs ratings as much as installs and excludes the author’s own',
23
+ options: [...data_provider_1.STORE_AGENT_SORT_OPTIONS],
24
+ }),
25
+ pricing: core_1.Flags.string({
26
+ description: 'Only free or only paid listings (by the latest release’s price)',
27
+ options: [...data_provider_1.STORE_AGENT_PRICING_FILTERS],
28
+ }),
29
+ // DIS02 facets — what the release connects to, where it runs, what it costs to run.
30
+ capability: core_1.Flags.string({
31
+ description: 'Only listings whose latest release declares this capability or tool',
32
+ }),
33
+ permission: core_1.Flags.string({
34
+ description: 'Only listings whose permission manifest covers this key (e.g. network:api.github.com)',
35
+ }),
36
+ placement: core_1.Flags.string({
37
+ description: 'Only listings runnable in this placement',
38
+ options: ['cloud', 'local'],
39
+ }),
40
+ 'max-run-cost': core_1.Flags.integer({
41
+ description: 'Only listings whose measured per-run cost ceiling is ≤ this many micros (1,000,000 = $1)',
42
+ }),
21
43
  };
22
44
  async run() {
23
45
  this.requireAuth();
@@ -30,6 +52,11 @@ class StoreBrowse extends base_command_1.BaseCommand {
30
52
  ...(flags.category ? { category: flags.category } : {}),
31
53
  ...(flags.cursor ? { cursor: flags.cursor } : {}),
32
54
  ...(flags.sort ? { sortBy: flags.sort } : {}),
55
+ ...(flags.pricing ? { pricing: flags.pricing } : {}),
56
+ ...(flags.capability ? { capability: flags.capability } : {}),
57
+ ...(flags.permission ? { permission: flags.permission } : {}),
58
+ ...(flags.placement ? { placement: flags.placement } : {}),
59
+ ...(flags['max-run-cost'] != null ? { maxRunCostMicros: flags['max-run-cost'] } : {}),
33
60
  });
34
61
  }
35
62
  catch (err) {
@@ -0,0 +1,21 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * The buyer's update channel for one installed copy (OSK-12288).
4
+ *
5
+ * `manual` waits for `skrr store update`; `auto_minor` rolls forward inside the
6
+ * installed major; `beta` does the same and takes `beta`-visibility releases —
7
+ * the channel is the access control on them, so setting it is the opt-in.
8
+ * No channel crosses a major: a new major is a purchase, never an update.
9
+ */
10
+ export default class StoreChannel extends BaseCommand {
11
+ static description: string;
12
+ static examples: string[];
13
+ static args: {
14
+ agentId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
15
+ channel: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
16
+ };
17
+ static flags: {
18
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ };
20
+ run(): Promise<void>;
21
+ }
@@ -0,0 +1,62 @@
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
+ * The buyer's update channel for one installed copy (OSK-12288).
8
+ *
9
+ * `manual` waits for `skrr store update`; `auto_minor` rolls forward inside the
10
+ * installed major; `beta` does the same and takes `beta`-visibility releases —
11
+ * the channel is the access control on them, so setting it is the opt-in.
12
+ * No channel crosses a major: a new major is a purchase, never an update.
13
+ */
14
+ class StoreChannel extends base_command_1.BaseCommand {
15
+ static description = 'Set the update channel of an installed store copy';
16
+ static examples = [
17
+ '<%= config.bin %> store channel agent_abc123 auto_minor',
18
+ '<%= config.bin %> store channel agent_abc123 beta',
19
+ '<%= config.bin %> store channel agent_abc123 manual',
20
+ ];
21
+ static args = {
22
+ agentId: core_1.Args.string({
23
+ description: 'The store agent or your installed copy',
24
+ required: true,
25
+ ignoreStdin: true,
26
+ }),
27
+ channel: core_1.Args.string({
28
+ description: `One of ${data_provider_1.STORE_UPDATE_CHANNELS.join(', ')}`,
29
+ required: true,
30
+ ignoreStdin: true,
31
+ options: [...data_provider_1.STORE_UPDATE_CHANNELS],
32
+ }),
33
+ };
34
+ static flags = {
35
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
36
+ };
37
+ async run() {
38
+ this.requireAuth();
39
+ const { args, flags } = await this.parse(StoreChannel);
40
+ const channel = (0, data_provider_1.normalizeStoreUpdateChannel)(args.channel);
41
+ if (!channel) {
42
+ this.error(`Unknown channel "${args.channel}" — one of ${data_provider_1.STORE_UPDATE_CHANNELS.join(', ')}`, {
43
+ exit: 2,
44
+ });
45
+ }
46
+ try {
47
+ const result = await data_provider_1.dataService.setStoreAgentUpdatePolicy({
48
+ agentId: args.agentId,
49
+ channel,
50
+ });
51
+ if (flags.json) {
52
+ this.log(JSON.stringify(result, null, 2));
53
+ return;
54
+ }
55
+ this.log(`${args.agentId} now follows the ${result.updatePolicy} channel.`);
56
+ }
57
+ catch (err) {
58
+ this.handleApiError(err);
59
+ }
60
+ }
61
+ }
62
+ exports.default = StoreChannel;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /** Follow a public publisher by canonical handle, never its raw account id. */
3
+ export default class StoreFollow extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ handle: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ undo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,45 @@
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
+ /** Follow a public publisher by canonical handle, never its raw account id. */
7
+ class StoreFollow extends base_command_1.BaseCommand {
8
+ static description = 'Follow a public publisher by canonical handle — or unfollow with --undo. Following is an intent signal, not a notification subscription.';
9
+ static examples = [
10
+ '<%= config.bin %> store follow @acme',
11
+ '<%= config.bin %> store follow acme --undo',
12
+ ];
13
+ static args = {
14
+ handle: core_1.Args.string({
15
+ description: 'The public publisher handle (with or without @)',
16
+ required: true,
17
+ ignoreStdin: true,
18
+ }),
19
+ };
20
+ static flags = {
21
+ undo: core_1.Flags.boolean({ description: 'Unfollow the publisher' }),
22
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
23
+ };
24
+ async run() {
25
+ this.requireAuth();
26
+ const { args, flags } = await this.parse(StoreFollow);
27
+ try {
28
+ const result = flags.undo
29
+ ? await data_provider_1.dataService.unfollowStorePublisherByHandle(args.handle)
30
+ : await data_provider_1.dataService.followStorePublisherByHandle(args.handle);
31
+ if (flags.json) {
32
+ this.log(JSON.stringify(result, null, 2));
33
+ return;
34
+ }
35
+ const handle = args.handle.startsWith('@') ? args.handle : `@${args.handle}`;
36
+ this.log(flags.undo
37
+ ? `Unfollowed ${handle}.`
38
+ : `Following ${handle}. This is an intent signal, not a notification subscription.`);
39
+ }
40
+ catch (err) {
41
+ this.handleApiError(err);
42
+ }
43
+ }
44
+ }
45
+ exports.default = StoreFollow;
@@ -1,12 +1,24 @@
1
1
  import { BaseCommand } from '../../../base-command';
2
2
  /**
3
- * `skrr store governance policy` — which releases a workspace may run at all.
3
+ * `skrr store governance policy` — which Store releases a workspace may
4
+ * install and run.
4
5
  *
5
- * `deny_all` and `allowlist` are the two modes the server accepts, and the
6
- * command refuses an allowlist with nothing in it: an empty allowlist and
6
+ * Three modes, the ones the server's single evaluator honours (OSK-12252):
7
+ * `open` admits every listing and is also what a workspace with no policy
8
+ * means, `deny_all` admits none, `allowlist` admits the named releases. It is
9
+ * enforced on every real install path and again when an installed Store copy
10
+ * runs.
11
+ *
12
+ * The command refuses an allowlist with nothing in it: an empty allowlist and
7
13
  * `deny_all` have the same effect but say different things, and a workspace
8
14
  * that reads "allowlist" while permitting nothing is a policy nobody can
9
- * explain six months later. If you mean deny everything, say `deny_all`.
15
+ * explain six months later. If you mean deny everything, say `deny_all`. For
16
+ * the same reason `--release` is refused beside `open` or `deny_all`, where a
17
+ * stored list would govern nothing.
18
+ *
19
+ * What it governs is PROVENANCE, not behaviour: which Store sources a
20
+ * workspace accepts. Copying a listing's prompt into a self-built Agent is not
21
+ * a Store install, and no policy here reaches it.
10
22
  */
11
23
  export default class StoreGovernancePolicy extends BaseCommand {
12
24
  static description: string;
@@ -15,7 +27,8 @@ export default class StoreGovernancePolicy extends BaseCommand {
15
27
  workspace: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
16
28
  };
17
29
  static flags: {
18
- mode: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
30
+ mode: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
31
+ ceiling: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
32
  release: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
33
  'policy-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
34
  'expect-revision': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -4,31 +4,47 @@ const core_1 = require("@oclif/core");
4
4
  const base_command_1 = require("../../../base-command");
5
5
  const governed_store_1 = require("../../../lib/governed-store");
6
6
  /**
7
- * `skrr store governance policy` — which releases a workspace may run at all.
7
+ * `skrr store governance policy` — which Store releases a workspace may
8
+ * install and run.
8
9
  *
9
- * `deny_all` and `allowlist` are the two modes the server accepts, and the
10
- * command refuses an allowlist with nothing in it: an empty allowlist and
10
+ * Three modes, the ones the server's single evaluator honours (OSK-12252):
11
+ * `open` admits every listing and is also what a workspace with no policy
12
+ * means, `deny_all` admits none, `allowlist` admits the named releases. It is
13
+ * enforced on every real install path and again when an installed Store copy
14
+ * runs.
15
+ *
16
+ * The command refuses an allowlist with nothing in it: an empty allowlist and
11
17
  * `deny_all` have the same effect but say different things, and a workspace
12
18
  * that reads "allowlist" while permitting nothing is a policy nobody can
13
- * explain six months later. If you mean deny everything, say `deny_all`.
19
+ * explain six months later. If you mean deny everything, say `deny_all`. For
20
+ * the same reason `--release` is refused beside `open` or `deny_all`, where a
21
+ * stored list would govern nothing.
22
+ *
23
+ * What it governs is PROVENANCE, not behaviour: which Store sources a
24
+ * workspace accepts. Copying a listing's prompt into a self-built Agent is not
25
+ * a Store install, and no policy here reaches it.
14
26
  */
15
27
  class StoreGovernancePolicy extends base_command_1.BaseCommand {
16
- static description = 'Set which governed releases a workspace may run. `deny_all`, or an allowlist of release ids.';
28
+ static description = "Set which Store releases a workspace may install and run: `open`, `deny_all`, or an allowlist of release ids. It governs where an Agent comes from, not what it does — copying a listing's prompt into a self-built Agent is not a Store install and is not covered.";
17
29
  static examples = [
30
+ '<%= config.bin %> store governance policy <workspace-id> --mode open',
18
31
  '<%= config.bin %> store governance policy <workspace-id> --mode deny_all',
19
32
  '<%= config.bin %> store governance policy <workspace-id> --mode allowlist --release <id> --release <id>',
33
+ `<%= config.bin %> store governance policy <workspace-id> --ceiling '{"delegation":"specific","proactive":false}'`,
20
34
  ];
21
35
  static args = {
22
36
  workspace: core_1.Args.string({ description: 'Workspace id', required: true, ignoreStdin: true }),
23
37
  };
24
38
  static flags = {
25
39
  mode: core_1.Flags.string({
26
- description: 'deny_all, or allowlist the releases named by --release',
27
- options: ['deny_all', 'allowlist'],
28
- required: true,
40
+ description: 'open (every listing), deny_all (none), or allowlist (only the releases named by --release)',
41
+ options: ['open', 'deny_all', 'allowlist'],
42
+ }),
43
+ ceiling: core_1.Flags.string({
44
+ description: 'Capability ceiling as JSON (OSK-12262): facet names from the release capability manifest — builtinTools, platformCapabilities, delegation, proactive, firstContact, sharedData, permissions. "{}" clears it. Applied with --mode, or alone to keep the current mode.',
29
45
  }),
30
46
  release: core_1.Flags.string({
31
- description: 'Release id to allow (repeatable). Required with --mode allowlist.',
47
+ description: 'Release id to allow (repeatable; --mode allowlist only). An Agent is named by its published Agent release id; a Team, Service, Skill, Action or template by its Store release id.',
32
48
  multiple: true,
33
49
  }),
34
50
  'policy-id': core_1.Flags.string({ description: 'Policy id, when replacing a specific one' }),
@@ -40,15 +56,67 @@ class StoreGovernancePolicy extends base_command_1.BaseCommand {
40
56
  async run() {
41
57
  this.requireAuth();
42
58
  const { args, flags } = await this.parse(StoreGovernancePolicy);
59
+ // Read: no --mode and no --ceiling asks for the policy a workspace already
60
+ // has — the same endpoint the web settings page writes.
61
+ if (!flags.mode && flags.ceiling === undefined) {
62
+ const read = await (0, governed_store_1.getWorkspaceStorePolicy)(args.workspace);
63
+ if (flags.json) {
64
+ this.log(JSON.stringify(read, null, 2));
65
+ return;
66
+ }
67
+ const policy = read.policy;
68
+ this.log(`mode: ${policy.mode ?? 'open'}`);
69
+ if (policy.allowedReleaseIds?.length) {
70
+ for (const releaseId of policy.allowedReleaseIds)
71
+ this.log(` allow: ${releaseId}`);
72
+ }
73
+ if (policy.capabilityCeiling && Object.keys(policy.capabilityCeiling).length) {
74
+ this.log(`ceiling: ${JSON.stringify(policy.capabilityCeiling)}`);
75
+ }
76
+ this.log(`revision: ${policy.revision ?? 0}`);
77
+ return;
78
+ }
43
79
  const releases = flags.release ?? [];
44
- if (flags.mode === 'allowlist' && releases.length === 0) {
80
+ const mode = flags.mode;
81
+ if (mode === 'allowlist' && releases.length === 0) {
45
82
  this.error('An allowlist with no --release permits nothing, which is what --mode deny_all says plainly. Pass at least one release, or say deny_all.', { exit: 2 });
46
83
  }
84
+ if (mode !== 'allowlist' && releases.length > 0) {
85
+ this.error(`--mode ${mode} ignores every release, so a --release list would be stored and govern nothing. Drop --release, or use --mode allowlist.`, { exit: 2 });
86
+ }
87
+ let capabilityCeiling;
88
+ if (flags.ceiling !== undefined) {
89
+ try {
90
+ const parsed = JSON.parse(flags.ceiling);
91
+ capabilityCeiling =
92
+ parsed && typeof parsed === 'object' && Object.keys(parsed).length > 0
93
+ ? parsed
94
+ : null;
95
+ }
96
+ catch {
97
+ this.error(`--ceiling must be valid JSON, e.g. '{"delegation":"none"}'`, { exit: 2 });
98
+ }
99
+ }
47
100
  let result;
48
101
  try {
102
+ // A write under an existing policy keeps the mode and releases it has
103
+ // unless new ones were named; the server's revision check then stands.
104
+ let body;
105
+ if (mode) {
106
+ body = { mode, allowedReleaseIds: releases };
107
+ }
108
+ else {
109
+ const current = (await (0, governed_store_1.getWorkspaceStorePolicy)(args.workspace)).policy;
110
+ body = {
111
+ mode: current.mode ?? 'open',
112
+ allowedReleaseIds: releases.length ? releases : (current.allowedReleaseIds ?? []),
113
+ expectedRevision: current.revision,
114
+ };
115
+ }
116
+ if (capabilityCeiling !== undefined)
117
+ body.capabilityCeiling = capabilityCeiling;
49
118
  result = await (0, governed_store_1.setWorkspaceStorePolicy)(args.workspace, {
50
- mode: flags.mode,
51
- allowedReleaseIds: releases,
119
+ ...body,
52
120
  ...(flags['policy-id'] ? { policyId: flags['policy-id'] } : {}),
53
121
  ...(flags['expect-revision'] !== undefined
54
122
  ? { expectedRevision: flags['expect-revision'] }
@@ -0,0 +1,28 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * `skrr store governance requests` — the queue a member's install request
4
+ * lands in and the owner answers (OSK-12262).
5
+ *
6
+ * A member asks for a release the workspace policy refuses. An owner
7
+ * approving only admits the release to the allowlist — the install still runs
8
+ * through the same evaluator, so the queue grants review, not a bypass.
9
+ *
10
+ * Members see their own requests; owners see the whole queue (`--status`
11
+ * narrows it; the default is `pending`, the part that needs an answer).
12
+ */
13
+ export default class StoreGovernanceRequests extends BaseCommand {
14
+ static description: string;
15
+ static examples: string[];
16
+ static args: {
17
+ workspace: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
18
+ };
19
+ static flags: {
20
+ status: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ release: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
22
+ note: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
23
+ approve: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
24
+ decline: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
25
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
26
+ };
27
+ run(): Promise<void>;
28
+ }
@@ -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
  }