@skrr-ai/cli 0.1.36 → 0.1.37

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 (152) hide show
  1. package/README.md +17 -4
  2. package/dist/commands/agents/actions/create.d.ts +5 -0
  3. package/dist/commands/agents/actions/create.js +26 -0
  4. package/dist/commands/agents/actions/update.d.ts +5 -0
  5. package/dist/commands/agents/actions/update.js +24 -0
  6. package/dist/commands/agents/api-actions/add.d.ts +41 -0
  7. package/dist/commands/agents/api-actions/add.js +202 -0
  8. package/dist/commands/agents/api-actions/index.d.ts +28 -0
  9. package/dist/commands/agents/api-actions/index.js +77 -0
  10. package/dist/commands/agents/api-actions/remove.d.ts +14 -0
  11. package/dist/commands/agents/api-actions/remove.js +36 -0
  12. package/dist/commands/agents/avatar/default/apply.d.ts +25 -0
  13. package/dist/commands/agents/avatar/default/apply.js +56 -0
  14. package/dist/commands/agents/avatar/default/index.d.ts +18 -0
  15. package/dist/commands/agents/avatar/default/index.js +44 -0
  16. package/dist/commands/agents/avatar/default/set.d.ts +23 -0
  17. package/dist/commands/agents/avatar/default/set.js +95 -0
  18. package/dist/commands/agents/avatar/library/delete.d.ts +20 -0
  19. package/dist/commands/agents/avatar/library/delete.js +47 -0
  20. package/dist/commands/agents/avatar/library/index.d.ts +16 -0
  21. package/dist/commands/agents/avatar/library/index.js +56 -0
  22. package/dist/commands/agents/avatar/presets.d.ts +19 -0
  23. package/dist/commands/agents/avatar/presets.js +56 -0
  24. package/dist/commands/agents/categories/create.d.ts +14 -0
  25. package/dist/commands/agents/categories/create.js +46 -0
  26. package/dist/commands/agents/categories/delete.d.ts +13 -0
  27. package/dist/commands/agents/categories/delete.js +33 -0
  28. package/dist/commands/agents/categories/index.d.ts +20 -0
  29. package/dist/commands/agents/categories/index.js +82 -0
  30. package/dist/commands/agents/categories/update.d.ts +22 -0
  31. package/dist/commands/agents/categories/update.js +59 -0
  32. package/dist/commands/agents/create.d.ts +10 -0
  33. package/dist/commands/agents/create.js +57 -3
  34. package/dist/commands/agents/ensure-default.d.ts +27 -0
  35. package/dist/commands/agents/ensure-default.js +65 -0
  36. package/dist/commands/agents/mute.d.ts +16 -0
  37. package/dist/commands/agents/mute.js +38 -0
  38. package/dist/commands/agents/pin.d.ts +16 -0
  39. package/dist/commands/agents/pin.js +38 -0
  40. package/dist/commands/agents/tools/auth.d.ts +19 -0
  41. package/dist/commands/agents/tools/auth.js +41 -0
  42. package/dist/commands/agents/tools/calls.d.ts +18 -0
  43. package/dist/commands/agents/tools/calls.js +54 -0
  44. package/dist/commands/agents/tools/index.d.ts +20 -0
  45. package/dist/commands/agents/tools/index.js +77 -0
  46. package/dist/commands/agents/unmute.d.ts +16 -0
  47. package/dist/commands/agents/unmute.js +38 -0
  48. package/dist/commands/agents/unpin.d.ts +16 -0
  49. package/dist/commands/agents/unpin.js +38 -0
  50. package/dist/commands/agents/update.d.ts +12 -0
  51. package/dist/commands/agents/update.js +64 -3
  52. package/dist/commands/followups/act.d.ts +22 -0
  53. package/dist/commands/followups/act.js +102 -0
  54. package/dist/commands/followups/cancel.d.ts +17 -0
  55. package/dist/commands/followups/cancel.js +40 -0
  56. package/dist/commands/followups/checkin.d.ts +27 -0
  57. package/dist/commands/followups/checkin.js +107 -0
  58. package/dist/commands/followups/list.d.ts +24 -0
  59. package/dist/commands/followups/list.js +90 -0
  60. package/dist/commands/followups/remind.d.ts +26 -0
  61. package/dist/commands/followups/remind.js +106 -0
  62. package/dist/commands/followups/reschedule.d.ts +15 -0
  63. package/dist/commands/followups/reschedule.js +48 -0
  64. package/dist/commands/followups/resolve.d.ts +23 -0
  65. package/dist/commands/followups/resolve.js +54 -0
  66. package/dist/commands/followups/show.d.ts +12 -0
  67. package/dist/commands/followups/show.js +45 -0
  68. package/dist/commands/followups/watch.d.ts +51 -0
  69. package/dist/commands/followups/watch.js +207 -0
  70. package/dist/commands/goals/labels/add.js +19 -2
  71. package/dist/commands/goals/labels/remove.js +22 -2
  72. package/dist/commands/labels/list.d.ts +24 -1
  73. package/dist/commands/labels/list.js +62 -19
  74. package/dist/commands/memory/governance/index.d.ts +21 -0
  75. package/dist/commands/memory/governance/index.js +64 -0
  76. package/dist/commands/memory/governance/set.d.ts +24 -0
  77. package/dist/commands/memory/governance/set.js +95 -0
  78. package/dist/commands/memory/provenance.d.ts +18 -0
  79. package/dist/commands/memory/provenance.js +66 -0
  80. package/dist/commands/spaces/create.d.ts +3 -0
  81. package/dist/commands/spaces/create.js +32 -2
  82. package/dist/commands/spaces/labels/add.js +19 -2
  83. package/dist/commands/spaces/labels/remove.js +22 -2
  84. package/dist/commands/spaces/show.js +2 -0
  85. package/dist/commands/spaces/update.d.ts +5 -0
  86. package/dist/commands/spaces/update.js +41 -4
  87. package/dist/commands/spaces/workflows/lifecycle-diagnostics.d.ts +11 -0
  88. package/dist/commands/spaces/workflows/lifecycle-diagnostics.js +45 -0
  89. package/dist/commands/tasks/complete.d.ts +1 -0
  90. package/dist/commands/tasks/complete.js +8 -1
  91. package/dist/commands/tasks/create.d.ts +3 -0
  92. package/dist/commands/tasks/create.js +34 -2
  93. package/dist/commands/tasks/expectations/assess.d.ts +11 -0
  94. package/dist/commands/tasks/expectations/assess.js +85 -14
  95. package/dist/commands/tasks/expectations.js +19 -2
  96. package/dist/commands/tasks/labels/attach.js +20 -3
  97. package/dist/commands/tasks/labels/detach.js +21 -3
  98. package/dist/commands/tasks/lifecycle/attach.d.ts +14 -0
  99. package/dist/commands/tasks/lifecycle/attach.js +47 -0
  100. package/dist/commands/tasks/lifecycle/definitions.d.ts +11 -0
  101. package/dist/commands/tasks/lifecycle/definitions.js +40 -0
  102. package/dist/commands/tasks/lifecycle/detach.d.ts +12 -0
  103. package/dist/commands/tasks/lifecycle/detach.js +32 -0
  104. package/dist/commands/tasks/lifecycle/history.d.ts +13 -0
  105. package/dist/commands/tasks/lifecycle/history.js +38 -0
  106. package/dist/commands/tasks/lifecycle/migrate.d.ts +12 -0
  107. package/dist/commands/tasks/lifecycle/migrate.js +29 -0
  108. package/dist/commands/tasks/lifecycle/reconcile.d.ts +11 -0
  109. package/dist/commands/tasks/lifecycle/reconcile.js +27 -0
  110. package/dist/commands/tasks/lifecycle/reopen.d.ts +13 -0
  111. package/dist/commands/tasks/lifecycle/reopen.js +34 -0
  112. package/dist/commands/tasks/lifecycle/show.d.ts +11 -0
  113. package/dist/commands/tasks/lifecycle/show.js +27 -0
  114. package/dist/commands/tasks/lifecycle/start.d.ts +12 -0
  115. package/dist/commands/tasks/lifecycle/start.js +30 -0
  116. package/dist/commands/tasks/lifecycle/transition.d.ts +15 -0
  117. package/dist/commands/tasks/lifecycle/transition.js +78 -0
  118. package/dist/commands/tasks/move.d.ts +1 -0
  119. package/dist/commands/tasks/move.js +31 -0
  120. package/dist/commands/tasks/result/submit.js +11 -1
  121. package/dist/commands/tasks/review-queue.d.ts +29 -0
  122. package/dist/commands/tasks/review-queue.js +165 -0
  123. package/dist/commands/tasks/show.js +42 -0
  124. package/dist/commands/tasks/update.d.ts +1 -0
  125. package/dist/commands/tasks/update.js +47 -0
  126. package/dist/lib/agent-actions.d.ts +36 -10
  127. package/dist/lib/agent-actions.js +63 -9
  128. package/dist/lib/agent-config.d.ts +11 -0
  129. package/dist/lib/agent-config.js +85 -3
  130. package/dist/lib/agent-pin-mute.d.ts +24 -0
  131. package/dist/lib/agent-pin-mute.js +17 -0
  132. package/dist/lib/agent-visual-refs.d.ts +6 -0
  133. package/dist/lib/agent-visual-refs.js +142 -0
  134. package/dist/lib/first-party-harness-agent.js +7 -0
  135. package/dist/lib/followups.d.ts +107 -0
  136. package/dist/lib/followups.js +102 -0
  137. package/dist/lib/label-ref.d.ts +95 -0
  138. package/dist/lib/label-ref.js +163 -0
  139. package/dist/lib/label-scope.d.ts +2 -2
  140. package/dist/lib/label-scope.js +3 -3
  141. package/dist/lib/task-closure.d.ts +32 -0
  142. package/dist/lib/task-closure.js +106 -0
  143. package/dist/lib/task-lifecycle-output.d.ts +14 -0
  144. package/dist/lib/task-lifecycle-output.js +101 -0
  145. package/dist/lib/tasks.d.ts +3 -0
  146. package/dist/lib/tasks.js +31 -0
  147. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.js +4 -0
  148. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.js +4 -0
  149. package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
  150. package/dist/node_modules/@skrr-ai/data-provider/index.js +5079 -4546
  151. package/oclif.manifest.json +20216 -16002
  152. package/package.json +16 -4
@@ -0,0 +1,18 @@
1
+ import { BaseCommand } from '../../../../base-command';
2
+ /**
3
+ * What face a NEW agent gets when its creator does not pick one.
4
+ *
5
+ * Wraps `GET /api/agents/avatar-default`. The policy is read exactly ONCE, at
6
+ * creation, and the drawn reference is written onto the agent — so changing it
7
+ * is structurally incapable of re-skinning an agent that already exists. That
8
+ * property is worth stating here, because "default" in most products means a
9
+ * live fallback and this one does not.
10
+ */
11
+ export default class AgentsAvatarDefaultShow extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static flags: {
15
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ };
17
+ run(): Promise<void>;
18
+ }
@@ -0,0 +1,44 @@
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
+ * What face a NEW agent gets when its creator does not pick one.
8
+ *
9
+ * Wraps `GET /api/agents/avatar-default`. The policy is read exactly ONCE, at
10
+ * creation, and the drawn reference is written onto the agent — so changing it
11
+ * is structurally incapable of re-skinning an agent that already exists. That
12
+ * property is worth stating here, because "default" in most products means a
13
+ * live fallback and this one does not.
14
+ */
15
+ class AgentsAvatarDefaultShow extends base_command_1.BaseCommand {
16
+ static description = 'Show the default-avatar policy new agents are drawn from';
17
+ static examples = [
18
+ '<%= config.bin %> agents avatar default',
19
+ '<%= config.bin %> agents avatar default --json',
20
+ ];
21
+ static flags = {
22
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
23
+ };
24
+ async run() {
25
+ this.requireAuth();
26
+ const { flags } = await this.parse(AgentsAvatarDefaultShow);
27
+ let response;
28
+ try {
29
+ response = await data_provider_1.dataService.getAgentAvatarDefault();
30
+ }
31
+ catch (err) {
32
+ this.handleApiError(err);
33
+ }
34
+ if (flags.json) {
35
+ this.log(JSON.stringify(response, null, 2));
36
+ return;
37
+ }
38
+ this.log((0, data_provider_1.describeAgentAvatarPolicy)(response.policy));
39
+ this.log('');
40
+ this.log('Applies to agents created from now on. Existing agents keep the face they have —');
41
+ this.log('`skrr agents avatar default apply` is the one path that changes them.');
42
+ }
43
+ }
44
+ exports.default = AgentsAvatarDefaultShow;
@@ -0,0 +1,23 @@
1
+ import { BaseCommand } from '../../../../base-command';
2
+ /**
3
+ * Choose the policy. Wraps `PUT /api/agents/avatar-default`.
4
+ *
5
+ * ONE value, not three switches: `--mode` selects which of the shapes in
6
+ * `AgentAvatarDefaultPolicy` is being written, and the other flags supply that
7
+ * shape's payload. The union is the server's contract, so the command refuses a
8
+ * combination that cannot be one of its members rather than sending a
9
+ * half-formed object and letting zod name the problem.
10
+ */
11
+ export default class AgentsAvatarDefaultSet extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static flags: {
15
+ mode: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ ref: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ category: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
+ };
21
+ private buildPolicy;
22
+ run(): Promise<void>;
23
+ }
@@ -0,0 +1,95 @@
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 agent_visual_refs_1 = require("../../../../lib/agent-visual-refs");
7
+ /**
8
+ * Choose the policy. Wraps `PUT /api/agents/avatar-default`.
9
+ *
10
+ * ONE value, not three switches: `--mode` selects which of the shapes in
11
+ * `AgentAvatarDefaultPolicy` is being written, and the other flags supply that
12
+ * shape's payload. The union is the server's contract, so the command refuses a
13
+ * combination that cannot be one of its members rather than sending a
14
+ * half-formed object and letting zod name the problem.
15
+ */
16
+ class AgentsAvatarDefaultSet extends base_command_1.BaseCommand {
17
+ static description = 'Set the default-avatar policy for agents you create from now on';
18
+ static examples = [
19
+ '<%= config.bin %> agents avatar default set --mode platform',
20
+ '<%= config.bin %> agents avatar default set --mode fixed --ref preset:kosmo',
21
+ '<%= config.bin %> agents avatar default set --mode random --scope category --category illustrations',
22
+ '<%= config.bin %> agents avatar default set --mode random --scope mine',
23
+ ];
24
+ static flags = {
25
+ mode: core_1.Flags.string({
26
+ description: 'platform = the shipped logo; fixed = one avatar; random = a different one each time',
27
+ options: ['platform', 'fixed', 'random'],
28
+ required: true,
29
+ }),
30
+ ref: core_1.Flags.string({
31
+ description: '--mode fixed: which avatar. default, preset:<id>, asset:<id>, or image:<filepath>@<source>',
32
+ }),
33
+ scope: core_1.Flags.string({
34
+ description: '--mode random: draw from the whole catalog, one category, or your own uploads',
35
+ options: ['all', 'category', 'mine'],
36
+ }),
37
+ category: core_1.Flags.string({
38
+ description: '--mode random --scope category: which category to draw from',
39
+ options: [...data_provider_1.AGENT_AVATAR_PRESET_CATEGORIES],
40
+ }),
41
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
42
+ };
43
+ buildPolicy(flags) {
44
+ if (flags.mode === 'platform')
45
+ return { mode: 'platform' };
46
+ if (flags.mode === 'fixed') {
47
+ if (!flags.ref) {
48
+ this.error('--mode fixed needs --ref to say which avatar. ' +
49
+ 'For example --ref preset:kosmo (`skrr agents avatar presets`) or ' +
50
+ '--ref asset:<id> (`skrr agents avatar library`).', { exit: 1 });
51
+ }
52
+ return { mode: 'fixed', ref: (0, agent_visual_refs_1.parseAvatarRefFlag)(flags.ref) };
53
+ }
54
+ if (!flags.scope) {
55
+ this.error('--mode random needs --scope: all (the whole catalog), category (one category, ' +
56
+ 'with --category), or mine (your own uploads).', { exit: 1 });
57
+ }
58
+ if (flags.scope === 'category') {
59
+ if (!flags.category) {
60
+ this.error('--scope category needs --category to say which one.', { exit: 1 });
61
+ }
62
+ return {
63
+ mode: 'random',
64
+ scope: 'category',
65
+ category: flags.category,
66
+ };
67
+ }
68
+ return { mode: 'random', scope: flags.scope };
69
+ }
70
+ async run() {
71
+ this.requireAuth();
72
+ const { flags } = await this.parse(AgentsAvatarDefaultSet);
73
+ let policy;
74
+ try {
75
+ policy = this.buildPolicy(flags);
76
+ }
77
+ catch (err) {
78
+ this.error(err.message, { exit: 1 });
79
+ }
80
+ let response;
81
+ try {
82
+ response = await data_provider_1.dataService.setAgentAvatarDefault(policy);
83
+ }
84
+ catch (err) {
85
+ this.handleApiError(err);
86
+ }
87
+ if (flags.json) {
88
+ this.log(JSON.stringify(response, null, 2));
89
+ return;
90
+ }
91
+ this.log(`Default avatar policy: ${(0, data_provider_1.describeAgentAvatarPolicy)(response.policy)}`);
92
+ this.log('Existing agents are unchanged. `skrr agents avatar default apply` changes those.');
93
+ }
94
+ }
95
+ exports.default = AgentsAvatarDefaultSet;
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from '../../../../base-command';
2
+ /**
3
+ * Remove one image from the caller's reusable avatar library.
4
+ *
5
+ * The server refuses with 409 while any of the caller's agents still wears the
6
+ * image — deleting it out from under them would leave a broken face, so the
7
+ * conflict is the feature. Say what to do about it rather than surfacing the
8
+ * bare status.
9
+ */
10
+ export default class AgentsAvatarLibraryDelete extends BaseCommand {
11
+ static description: string;
12
+ static examples: string[];
13
+ static args: {
14
+ assetId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
15
+ };
16
+ static flags: {
17
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../../../base-command");
6
+ /**
7
+ * Remove one image from the caller's reusable avatar library.
8
+ *
9
+ * The server refuses with 409 while any of the caller's agents still wears the
10
+ * image — deleting it out from under them would leave a broken face, so the
11
+ * conflict is the feature. Say what to do about it rather than surfacing the
12
+ * bare status.
13
+ */
14
+ class AgentsAvatarLibraryDelete extends base_command_1.BaseCommand {
15
+ static description = 'Delete one image from your reusable avatar library';
16
+ static examples = ['<%= config.bin %> agents avatar library delete <asset-id>'];
17
+ static args = {
18
+ assetId: core_1.Args.string({ description: 'Asset ID', required: true, ignoreStdin: true }),
19
+ };
20
+ static flags = {
21
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
22
+ };
23
+ async run() {
24
+ this.requireAuth();
25
+ const { args, flags } = await this.parse(AgentsAvatarLibraryDelete);
26
+ let result;
27
+ try {
28
+ result = await data_provider_1.dataService.deleteAvatarLibraryAsset(args.assetId);
29
+ }
30
+ catch (err) {
31
+ const status = err?.status ??
32
+ err?.response?.status;
33
+ if (status === 409) {
34
+ this.error(`Asset ${args.assetId} is still in use by at least one of your agents. ` +
35
+ 'Point those agents at another avatar first — ' +
36
+ '`skrr agents update <agent-id> --avatar preset:<id>` — then delete it.', { exit: 1 });
37
+ }
38
+ this.handleApiError(err);
39
+ }
40
+ if (flags.json) {
41
+ this.log(JSON.stringify(result, null, 2));
42
+ return;
43
+ }
44
+ this.log(`Deleted avatar asset ${args.assetId}`);
45
+ }
46
+ }
47
+ exports.default = AgentsAvatarLibraryDelete;
@@ -0,0 +1,16 @@
1
+ import { BaseCommand } from '../../../../base-command';
2
+ /**
3
+ * The caller's own uploaded avatar images, reusable across their agents.
4
+ *
5
+ * Wraps `GET /api/agents/avatar-library`. The ids listed here are what
6
+ * `--avatar asset:<id>` takes, so this is the other half of making that flag
7
+ * usable (`agents avatar presets` covers the built-ins).
8
+ */
9
+ export default class AgentsAvatarLibrary extends BaseCommand {
10
+ static description: string;
11
+ static examples: string[];
12
+ static flags: {
13
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../../../base-command");
6
+ const format_1 = require("../../../../lib/format");
7
+ /**
8
+ * The caller's own uploaded avatar images, reusable across their agents.
9
+ *
10
+ * Wraps `GET /api/agents/avatar-library`. The ids listed here are what
11
+ * `--avatar asset:<id>` takes, so this is the other half of making that flag
12
+ * usable (`agents avatar presets` covers the built-ins).
13
+ */
14
+ class AgentsAvatarLibrary extends base_command_1.BaseCommand {
15
+ static description = 'List your reusable avatar images (`--avatar asset:<id>` takes these ids)';
16
+ static examples = [
17
+ '<%= config.bin %> agents avatar library',
18
+ '<%= config.bin %> agents avatar library --json',
19
+ ];
20
+ static flags = {
21
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
22
+ };
23
+ async run() {
24
+ this.requireAuth();
25
+ const { flags } = await this.parse(AgentsAvatarLibrary);
26
+ let response;
27
+ try {
28
+ response = await data_provider_1.dataService.listAvatarLibrary();
29
+ }
30
+ catch (err) {
31
+ this.handleApiError(err);
32
+ }
33
+ const assets = response.assets ?? [];
34
+ if (flags.json) {
35
+ this.log(JSON.stringify(assets, null, 2));
36
+ return;
37
+ }
38
+ if (assets.length === 0) {
39
+ this.log('No avatar images in your library yet.');
40
+ this.log('Upload one with: skrr agents avatar upload <agent-id> --file <path>');
41
+ return;
42
+ }
43
+ (0, format_1.renderTable)(assets.map((asset) => ({
44
+ id: asset.id,
45
+ name: asset.name ?? '-',
46
+ created: asset.createdAt ? String(asset.createdAt).slice(0, 10) : '-',
47
+ lastUsed: asset.lastUsedAt ? String(asset.lastUsedAt).slice(0, 10) : '-',
48
+ })), [
49
+ { key: 'id', header: 'ID', verbatim: true },
50
+ { key: 'name', header: 'NAME', maxWidth: 32 },
51
+ { key: 'created', header: 'CREATED' },
52
+ { key: 'lastUsed', header: 'LAST USED' },
53
+ ], (line) => this.log(line));
54
+ }
55
+ }
56
+ exports.default = AgentsAvatarLibrary;
@@ -0,0 +1,19 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * The built-in avatar catalog.
4
+ *
5
+ * No network call, deliberately: the registry is CODE (`AGENT_AVATAR_PRESETS`
6
+ * in `@skrr-ai/data-provider`), which the CLI already links against, and the
7
+ * server has no endpoint that serves it. That is also why this command has to
8
+ * exist — `--avatar preset:<id>` is unusable without a way to learn the ids,
9
+ * and the web chooser's answer to that question is a grid of images.
10
+ */
11
+ export default class AgentsAvatarPresets extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static flags: {
15
+ category: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ };
18
+ run(): Promise<void>;
19
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../../base-command");
6
+ const format_1 = require("../../../lib/format");
7
+ /**
8
+ * The built-in avatar catalog.
9
+ *
10
+ * No network call, deliberately: the registry is CODE (`AGENT_AVATAR_PRESETS`
11
+ * in `@skrr-ai/data-provider`), which the CLI already links against, and the
12
+ * server has no endpoint that serves it. That is also why this command has to
13
+ * exist — `--avatar preset:<id>` is unusable without a way to learn the ids,
14
+ * and the web chooser's answer to that question is a grid of images.
15
+ */
16
+ class AgentsAvatarPresets extends base_command_1.BaseCommand {
17
+ static description = 'List the built-in avatar presets `--avatar preset:<id>` accepts';
18
+ static examples = [
19
+ '<%= config.bin %> agents avatar presets',
20
+ '<%= config.bin %> agents avatar presets --category illustrations',
21
+ '<%= config.bin %> agents avatar presets --json',
22
+ ];
23
+ static flags = {
24
+ category: core_1.Flags.string({
25
+ description: 'Only presets in this category',
26
+ options: [...data_provider_1.AGENT_AVATAR_PRESET_CATEGORIES],
27
+ }),
28
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
29
+ };
30
+ async run() {
31
+ const { flags } = await this.parse(AgentsAvatarPresets);
32
+ const presets = flags.category
33
+ ? data_provider_1.AGENT_AVATAR_PRESETS.filter((preset) => preset.category === flags.category)
34
+ : data_provider_1.AGENT_AVATAR_PRESETS;
35
+ if (flags.json) {
36
+ this.log(JSON.stringify(presets, null, 2));
37
+ return;
38
+ }
39
+ if (presets.length === 0) {
40
+ this.log(`No presets in category ${flags.category}.`);
41
+ return;
42
+ }
43
+ (0, format_1.renderTable)(presets.map((preset) => ({
44
+ id: preset.id,
45
+ name: preset.name,
46
+ category: data_provider_1.AGENT_AVATAR_CATEGORY_LABELS[preset.category],
47
+ })), [
48
+ { key: 'id', header: 'ID', verbatim: true },
49
+ { key: 'name', header: 'NAME', maxWidth: 32 },
50
+ { key: 'category', header: 'CATEGORY' },
51
+ ], (line) => this.log(line));
52
+ this.log('');
53
+ this.log(`Use one with: skrr agents update <agent-id> --avatar preset:${presets[0].id}`);
54
+ }
55
+ }
56
+ exports.default = AgentsAvatarPresets;
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Create one of the caller's own agent categories. Wraps `POST /api/agents/categories`. */
3
+ export default class AgentsCategoriesCreate extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ value: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ label: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ order: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,46 @@
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
+ /** Create one of the caller's own agent categories. Wraps `POST /api/agents/categories`. */
7
+ class AgentsCategoriesCreate extends base_command_1.BaseCommand {
8
+ static description = 'Create a custom agent category';
9
+ static examples = [
10
+ '<%= config.bin %> agents categories create --value ops --label "Operations"',
11
+ '<%= config.bin %> agents categories create --value ops --label "Operations" --description "Runbooks and on-call" --order 3',
12
+ ];
13
+ static flags = {
14
+ value: core_1.Flags.string({
15
+ description: 'Stable identifier — this is what `--category` takes',
16
+ required: true,
17
+ }),
18
+ label: core_1.Flags.string({ description: 'Display name', required: true }),
19
+ description: core_1.Flags.string({ description: 'What belongs in this category' }),
20
+ order: core_1.Flags.integer({ description: 'Sort position among your categories' }),
21
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
22
+ };
23
+ async run() {
24
+ this.requireAuth();
25
+ const { flags } = await this.parse(AgentsCategoriesCreate);
26
+ let created;
27
+ try {
28
+ created = await data_provider_1.dataService.createUserCategory({
29
+ value: flags.value,
30
+ label: flags.label,
31
+ ...(flags.description === undefined ? {} : { description: flags.description }),
32
+ ...(flags.order === undefined ? {} : { order: flags.order }),
33
+ });
34
+ }
35
+ catch (err) {
36
+ this.handleApiError(err);
37
+ }
38
+ if (flags.json) {
39
+ this.log(JSON.stringify(created, null, 2));
40
+ return;
41
+ }
42
+ this.log(`Created category ${flags.value} — ${flags.label}`);
43
+ this.log(`Use it with: skrr agents create --category ${flags.value} …`);
44
+ }
45
+ }
46
+ exports.default = AgentsCategoriesCreate;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Delete one of the caller's own categories. Wraps `DELETE /api/agents/categories/:value`. */
3
+ export default class AgentsCategoriesDelete extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ value: 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,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
+ /** Delete one of the caller's own categories. Wraps `DELETE /api/agents/categories/:value`. */
7
+ class AgentsCategoriesDelete extends base_command_1.BaseCommand {
8
+ static description = 'Delete a custom agent category';
9
+ static examples = ['<%= config.bin %> agents categories delete ops'];
10
+ static args = {
11
+ value: core_1.Args.string({ description: 'Category value', required: true, ignoreStdin: true }),
12
+ };
13
+ static flags = {
14
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
15
+ };
16
+ async run() {
17
+ this.requireAuth();
18
+ const { args, flags } = await this.parse(AgentsCategoriesDelete);
19
+ let result;
20
+ try {
21
+ result = await data_provider_1.dataService.deleteUserCategory(args.value);
22
+ }
23
+ catch (err) {
24
+ this.handleApiError(err);
25
+ }
26
+ if (flags.json) {
27
+ this.log(JSON.stringify(result, null, 2));
28
+ return;
29
+ }
30
+ this.log(`Deleted category ${args.value}`);
31
+ }
32
+ }
33
+ exports.default = AgentsCategoriesDelete;
@@ -0,0 +1,20 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * The vocabulary `--category` accepts.
4
+ *
5
+ * Three reads, because they answer three different questions and the server
6
+ * keeps them apart: the GLOBAL catalog with marketplace counts, the caller's
7
+ * view (global + their own), and the caller's own rows alone. `--mine` is the
8
+ * one most people want, so the flags name the other two rather than making the
9
+ * common case the odd one out.
10
+ */
11
+ export default class AgentsCategoriesList extends BaseCommand {
12
+ static description: string;
13
+ static examples: string[];
14
+ static flags: {
15
+ mine: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ 'custom-only': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,82 @@
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
+ * The vocabulary `--category` accepts.
9
+ *
10
+ * Three reads, because they answer three different questions and the server
11
+ * keeps them apart: the GLOBAL catalog with marketplace counts, the caller's
12
+ * view (global + their own), and the caller's own rows alone. `--mine` is the
13
+ * one most people want, so the flags name the other two rather than making the
14
+ * common case the odd one out.
15
+ */
16
+ class AgentsCategoriesList extends base_command_1.BaseCommand {
17
+ static description = 'List the agent categories `--category` accepts';
18
+ static examples = [
19
+ '<%= config.bin %> agents categories',
20
+ '<%= config.bin %> agents categories --mine',
21
+ '<%= config.bin %> agents categories --custom-only --json',
22
+ ];
23
+ static flags = {
24
+ mine: core_1.Flags.boolean({
25
+ description: 'Your view: the global catalog plus your own custom categories',
26
+ exclusive: ['custom-only'],
27
+ }),
28
+ 'custom-only': core_1.Flags.boolean({
29
+ description: 'Only the custom categories you created',
30
+ exclusive: ['mine'],
31
+ }),
32
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
33
+ };
34
+ async run() {
35
+ this.requireAuth();
36
+ const { flags } = await this.parse(AgentsCategoriesList);
37
+ let rows;
38
+ try {
39
+ if (flags['custom-only']) {
40
+ rows = (await data_provider_1.dataService.getUserCustomCategories());
41
+ }
42
+ else if (flags.mine) {
43
+ rows = (await data_provider_1.dataService.getUserAgentCategories());
44
+ }
45
+ else {
46
+ rows = (await data_provider_1.dataService.getAgentCategories());
47
+ }
48
+ }
49
+ catch (err) {
50
+ this.handleApiError(err);
51
+ }
52
+ const items = rows ?? [];
53
+ if (flags.json) {
54
+ this.log(JSON.stringify(items, null, 2));
55
+ return;
56
+ }
57
+ if (items.length === 0) {
58
+ this.log(flags['custom-only']
59
+ ? 'You have no custom categories. Create one with: skrr agents categories create'
60
+ : 'No categories.');
61
+ return;
62
+ }
63
+ (0, format_1.renderTable)(items.map((row) => ({
64
+ value: String(row.value ?? '-'),
65
+ label: String(row.label ?? '-'),
66
+ custom: row.custom ? 'yes' : 'no',
67
+ count: row.count === undefined
68
+ ? '-'
69
+ : String(row.count),
70
+ description: String(row.description ?? ''),
71
+ })), [
72
+ { key: 'value', header: 'VALUE', verbatim: true },
73
+ { key: 'label', header: 'LABEL', maxWidth: 28 },
74
+ { key: 'custom', header: 'CUSTOM' },
75
+ { key: 'count', header: 'AGENTS' },
76
+ { key: 'description', header: 'DESCRIPTION', maxWidth: 48 },
77
+ ], (line) => this.log(line));
78
+ this.log('');
79
+ this.log('VALUE is what `skrr agents create --category <value>` takes.');
80
+ }
81
+ }
82
+ exports.default = AgentsCategoriesList;
@@ -0,0 +1,22 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /**
3
+ * Edit one of the caller's own categories. Wraps `PATCH /api/agents/categories/:value`.
4
+ *
5
+ * `value` is the identity, not a field: agents point at it, so it is the ARG and
6
+ * cannot be changed here. Renaming means `--label`.
7
+ */
8
+ export default class AgentsCategoriesUpdate extends BaseCommand {
9
+ static description: string;
10
+ static examples: string[];
11
+ static args: {
12
+ value: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
13
+ };
14
+ static flags: {
15
+ label: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ order: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ active: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
20
+ };
21
+ run(): Promise<void>;
22
+ }