@skrr-ai/cli 0.1.13 → 0.1.15

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 (136) hide show
  1. package/dist/base-command.d.ts +12 -36
  2. package/dist/base-command.js +96 -11
  3. package/dist/commands/agents/create.d.ts +1 -0
  4. package/dist/commands/agents/create.js +6 -1
  5. package/dist/commands/agents/instructions/add.d.ts +21 -0
  6. package/dist/commands/agents/instructions/add.js +115 -0
  7. package/dist/commands/agents/instructions/disable.d.ts +13 -0
  8. package/dist/commands/agents/instructions/disable.js +50 -0
  9. package/dist/commands/agents/instructions/edit.d.ts +16 -0
  10. package/dist/commands/agents/instructions/edit.js +79 -0
  11. package/dist/commands/agents/instructions/enable.d.ts +13 -0
  12. package/dist/commands/agents/instructions/enable.js +50 -0
  13. package/dist/commands/agents/instructions/move.d.ts +15 -0
  14. package/dist/commands/agents/instructions/move.js +61 -0
  15. package/dist/commands/agents/instructions/preview.d.ts +13 -0
  16. package/dist/commands/agents/instructions/preview.js +59 -0
  17. package/dist/commands/agents/instructions/remove.d.ts +13 -0
  18. package/dist/commands/agents/instructions/remove.js +49 -0
  19. package/dist/commands/agents/instructions/set.d.ts +17 -0
  20. package/dist/commands/agents/instructions/set.js +79 -0
  21. package/dist/commands/agents/instructions/show.d.ts +15 -0
  22. package/dist/commands/agents/instructions/show.js +76 -0
  23. package/dist/commands/agents/instructions/upgrade.d.ts +16 -0
  24. package/dist/commands/agents/instructions/upgrade.js +77 -0
  25. package/dist/commands/agents/list.d.ts +10 -0
  26. package/dist/commands/agents/list.js +16 -1
  27. package/dist/commands/agents/show.js +5 -0
  28. package/dist/commands/agents/triggers/policy.js +8 -2
  29. package/dist/commands/agents/update.d.ts +1 -0
  30. package/dist/commands/agents/update.js +8 -2
  31. package/dist/commands/browser.js +5 -5
  32. package/dist/commands/commitments/create.d.ts +2 -0
  33. package/dist/commands/commitments/create.js +30 -13
  34. package/dist/commands/commitments/update.d.ts +2 -0
  35. package/dist/commands/commitments/update.js +24 -4
  36. package/dist/commands/daemon/byok.js +5 -5
  37. package/dist/commands/daemon/index.js +5 -3
  38. package/dist/commands/daemon/install.js +8 -5
  39. package/dist/commands/daemon/login.js +5 -5
  40. package/dist/commands/daemon/logs.js +5 -5
  41. package/dist/commands/daemon/recover-offline-queue.d.ts +9 -0
  42. package/dist/commands/daemon/recover-offline-queue.js +24 -0
  43. package/dist/commands/daemon/restart.js +5 -5
  44. package/dist/commands/daemon/start.js +34 -6
  45. package/dist/commands/daemon/status.js +5 -5
  46. package/dist/commands/daemon/stop.js +5 -5
  47. package/dist/commands/daemon/uninstall.js +5 -5
  48. package/dist/commands/daemon/unlock.js +5 -5
  49. package/dist/commands/daemon/usage.js +6 -6
  50. package/dist/commands/instruction-blocks/create.d.ts +19 -0
  51. package/dist/commands/instruction-blocks/create.js +94 -0
  52. package/dist/commands/instruction-blocks/delete.d.ts +13 -0
  53. package/dist/commands/instruction-blocks/delete.js +35 -0
  54. package/dist/commands/instruction-blocks/list.d.ts +13 -0
  55. package/dist/commands/instruction-blocks/list.js +71 -0
  56. package/dist/commands/instruction-blocks/show.d.ts +12 -0
  57. package/dist/commands/instruction-blocks/show.js +35 -0
  58. package/dist/commands/instruction-blocks/update.d.ts +23 -0
  59. package/dist/commands/instruction-blocks/update.js +94 -0
  60. package/dist/commands/login.js +7 -2
  61. package/dist/commands/spaces/auto-executor/preview.d.ts +1 -0
  62. package/dist/commands/spaces/auto-executor/preview.js +62 -3
  63. package/dist/commands/spaces/auto-executor/update.d.ts +4 -0
  64. package/dist/commands/spaces/auto-executor/update.js +78 -7
  65. package/dist/commands/spaces/capacity.js +14 -2
  66. package/dist/commands/spaces/list.d.ts +13 -0
  67. package/dist/commands/spaces/list.js +20 -1
  68. package/dist/commands/spaces/update.d.ts +4 -0
  69. package/dist/commands/spaces/update.js +49 -2
  70. package/dist/commands/tasks/complete.d.ts +12 -5
  71. package/dist/commands/tasks/complete.js +50 -28
  72. package/dist/commands/tasks/continue-ready.js +9 -1
  73. package/dist/commands/tasks/create.d.ts +1 -0
  74. package/dist/commands/tasks/create.js +25 -1
  75. package/dist/commands/tasks/deliverable/add.d.ts +23 -0
  76. package/dist/commands/tasks/deliverable/add.js +70 -0
  77. package/dist/commands/tasks/events/append.d.ts +1 -1
  78. package/dist/commands/tasks/events/append.js +4 -4
  79. package/dist/commands/tasks/expectations.d.ts +12 -0
  80. package/dist/commands/tasks/expectations.js +92 -0
  81. package/dist/commands/tasks/judge.d.ts +29 -0
  82. package/dist/commands/tasks/judge.js +68 -0
  83. package/dist/commands/tasks/list.d.ts +11 -0
  84. package/dist/commands/tasks/list.js +82 -11
  85. package/dist/commands/tasks/report.d.ts +1 -1
  86. package/dist/commands/tasks/report.js +3 -3
  87. package/dist/commands/tasks/update.d.ts +1 -0
  88. package/dist/commands/tasks/update.js +34 -4
  89. package/dist/commands/tasks/waive.d.ts +25 -0
  90. package/dist/commands/tasks/waive.js +58 -0
  91. package/dist/commands/wiki/cat.js +2 -1
  92. package/dist/commands/wiki/mv.js +5 -1
  93. package/dist/commands/wiki/write.js +5 -1
  94. package/dist/lib/agent-config.js +5 -0
  95. package/dist/lib/agent-instructions.d.ts +15 -0
  96. package/dist/lib/agent-instructions.js +55 -0
  97. package/dist/lib/api-fetch.d.ts +2 -1
  98. package/dist/lib/api-fetch.js +9 -2
  99. package/dist/lib/command-hygiene.d.ts +6 -1
  100. package/dist/lib/command-hygiene.js +49 -29
  101. package/dist/lib/commitments.d.ts +44 -0
  102. package/dist/lib/commitments.js +123 -0
  103. package/dist/lib/daemon-binding.d.ts +3 -4
  104. package/dist/lib/daemon-binding.js +11 -10
  105. package/dist/lib/daemon-handoff-opt-out.d.ts +8 -0
  106. package/dist/lib/daemon-handoff-opt-out.js +17 -0
  107. package/dist/lib/daemon-installer.d.ts +1 -1
  108. package/dist/lib/daemon-installer.js +2 -2
  109. package/dist/lib/daemon-setup.js +13 -7
  110. package/dist/lib/daemonHandoff.d.ts +1 -1
  111. package/dist/lib/daemonHandoff.js +20 -7
  112. package/dist/lib/delegated-cli.d.ts +0 -9
  113. package/dist/lib/delegated-cli.js +149 -6
  114. package/dist/lib/{exec-oversky.d.ts → exec-runtime-binary.d.ts} +28 -4
  115. package/dist/lib/{exec-oversky.js → exec-runtime-binary.js} +138 -37
  116. package/dist/lib/git-task.d.ts +37 -0
  117. package/dist/lib/git-task.js +151 -0
  118. package/dist/lib/instruction-blocks.d.ts +29 -0
  119. package/dist/lib/instruction-blocks.js +159 -0
  120. package/dist/lib/node-adapter.js +6 -0
  121. package/dist/lib/runtime-start-verification.d.ts +49 -0
  122. package/dist/lib/runtime-start-verification.js +108 -0
  123. package/dist/lib/sky-code.d.ts +1 -1
  124. package/dist/lib/sky-code.js +1 -1
  125. package/dist/lib/task-execution.d.ts +18 -2
  126. package/dist/lib/task-execution.js +19 -14
  127. package/dist/lib/task-transcript.js +1 -1
  128. package/dist/lib/tasks.d.ts +50 -0
  129. package/dist/lib/tasks.js +66 -1
  130. package/dist/lib/usage-discovery.js +1 -1
  131. package/dist/lib/web-url.d.ts +16 -0
  132. package/dist/lib/web-url.js +25 -0
  133. package/dist/node_modules/@skrr-ai/data-provider/index.js +4075 -3905
  134. package/dist/node_modules/@skrr-ai/inference-broker/package.json +1 -1
  135. package/oclif.manifest.json +12364 -10488
  136. package/package.json +4 -1
@@ -0,0 +1,61 @@
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 agent_resolver_1 = require("../../../lib/agent-resolver");
6
+ const agent_instructions_1 = require("../../../lib/agent-instructions");
7
+ const instruction_blocks_1 = require("../../../lib/instruction-blocks");
8
+ class AgentsInstructionsMove extends base_command_1.BaseCommand {
9
+ static description = 'Reorder one instruction block; later enabled blocks can supplement or narrow earlier ones';
10
+ static examples = [
11
+ '<%= config.bin %> agents instructions move library_… --agent <agent-id> --before inline_…',
12
+ '<%= config.bin %> agents instructions move inline_… --agent <agent-id> --after library_…',
13
+ ];
14
+ static args = {
15
+ instance: core_1.Args.string({
16
+ description: 'Block instance to move',
17
+ required: true,
18
+ ignoreStdin: true,
19
+ }),
20
+ };
21
+ static flags = {
22
+ json: core_1.Flags.boolean({ description: 'Output the updated Agent as JSON' }),
23
+ agent: core_1.Flags.string({ description: 'Agent ID (alias for the positional argument)' }),
24
+ before: core_1.Flags.string({ description: 'Move immediately before this instance ID' }),
25
+ after: core_1.Flags.string({ description: 'Move immediately after this instance ID' }),
26
+ };
27
+ async run() {
28
+ this.requireAuth();
29
+ const { args, flags } = await this.parse(AgentsInstructionsMove);
30
+ if (Boolean(flags.before) === Boolean(flags.after)) {
31
+ this.error('Choose exactly one placement: --before <instance> or --after <instance>.', {
32
+ exit: 2,
33
+ });
34
+ }
35
+ let agentId;
36
+ try {
37
+ agentId = await (0, agent_instructions_1.resolveInstructionAgentId)(undefined, flags.agent);
38
+ }
39
+ catch (error) {
40
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(error);
41
+ this.failWithCliError({
42
+ message: failure.message,
43
+ code: failure.code,
44
+ exit: 2,
45
+ retryable: false,
46
+ });
47
+ }
48
+ let updated;
49
+ try {
50
+ const { composition } = await (0, agent_instructions_1.loadAgentInstructions)(agentId);
51
+ updated = await (0, agent_instructions_1.saveAgentInstructions)(agentId, (0, instruction_blocks_1.moveEntry)(composition, args.instance, (flags.before ?? flags.after), flags.before ? 'before' : 'after'));
52
+ }
53
+ catch (error) {
54
+ this.handleApiError(error);
55
+ }
56
+ if (flags.json)
57
+ return this.log(JSON.stringify(updated, null, 2));
58
+ this.log(`Moved ${args.instance} ${flags.before ? 'before' : 'after'} ${flags.before ?? flags.after}.`);
59
+ }
60
+ }
61
+ exports.default = AgentsInstructionsMove;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class AgentsInstructionsPreview extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -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
+ const agent_resolver_1 = require("../../../lib/agent-resolver");
7
+ const agent_instructions_1 = require("../../../lib/agent-instructions");
8
+ class AgentsInstructionsPreview extends base_command_1.BaseCommand {
9
+ static description = 'Revalidate and preview the exact custom instructions an Agent composition renders';
10
+ static examples = [
11
+ '<%= config.bin %> agents instructions preview <agent-id>',
12
+ '<%= config.bin %> agents instructions preview --json',
13
+ ];
14
+ static args = {
15
+ id: core_1.Args.string({
16
+ description: 'Agent ID. Omit to use OVERSKY_SESSION_AGENT_ID.',
17
+ required: false,
18
+ ignoreStdin: true,
19
+ }),
20
+ };
21
+ static flags = {
22
+ json: core_1.Flags.boolean({ description: 'Output preview metadata and text as JSON' }),
23
+ agent: core_1.Flags.string({ description: 'Agent ID (alias for the positional argument)' }),
24
+ };
25
+ async run() {
26
+ this.requireAuth();
27
+ const { args, flags } = await this.parse(AgentsInstructionsPreview);
28
+ let agentId;
29
+ try {
30
+ agentId = await (0, agent_instructions_1.resolveInstructionAgentId)(args.id, flags.agent);
31
+ }
32
+ catch (error) {
33
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(error);
34
+ this.failWithCliError({
35
+ message: failure.message,
36
+ code: failure.code,
37
+ exit: 2,
38
+ retryable: false,
39
+ });
40
+ }
41
+ let preview;
42
+ try {
43
+ const { composition } = await (0, agent_instructions_1.loadAgentInstructions)(agentId);
44
+ preview = await data_provider_1.dataService.previewInstructionComposition(composition);
45
+ }
46
+ catch (error) {
47
+ this.handleApiError(error);
48
+ }
49
+ if (flags.json)
50
+ return this.log(JSON.stringify({ agentId, ...preview }, null, 2));
51
+ this.log(`Agent: ${agentId}`);
52
+ this.log(`Compiled: ${preview.bytes} bytes · ~${preview.estimatedTokens} tokens · ${preview.composition.entries.length} block(s)`);
53
+ this.log('');
54
+ this.log(preview.instructions || '(No enabled custom instruction blocks.)');
55
+ this.log('');
56
+ this.log('This is behavior guidance only; it does not grant tools, integrations, scope, or approval authority.');
57
+ }
58
+ }
59
+ exports.default = AgentsInstructionsPreview;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class AgentsInstructionsRemove extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ instance: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
+ };
8
+ static flags: {
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,49 @@
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 agent_resolver_1 = require("../../../lib/agent-resolver");
6
+ const agent_instructions_1 = require("../../../lib/agent-instructions");
7
+ const instruction_blocks_1 = require("../../../lib/instruction-blocks");
8
+ class AgentsInstructionsRemove extends base_command_1.BaseCommand {
9
+ static description = 'Remove one instruction block from an Agent (the library source remains intact)';
10
+ static examples = [
11
+ '<%= config.bin %> agents instructions remove library_… --agent <agent-id>',
12
+ ];
13
+ static args = {
14
+ instance: core_1.Args.string({ description: 'Block instance ID', required: true, ignoreStdin: true }),
15
+ };
16
+ static flags = {
17
+ json: core_1.Flags.boolean({ description: 'Output the updated Agent as JSON' }),
18
+ agent: core_1.Flags.string({ description: 'Agent ID (alias for the positional argument)' }),
19
+ };
20
+ async run() {
21
+ this.requireAuth();
22
+ const { args, flags } = await this.parse(AgentsInstructionsRemove);
23
+ let agentId;
24
+ try {
25
+ agentId = await (0, agent_instructions_1.resolveInstructionAgentId)(undefined, flags.agent);
26
+ }
27
+ catch (error) {
28
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(error);
29
+ this.failWithCliError({
30
+ message: failure.message,
31
+ code: failure.code,
32
+ exit: 2,
33
+ retryable: false,
34
+ });
35
+ }
36
+ let updated;
37
+ try {
38
+ const { composition } = await (0, agent_instructions_1.loadAgentInstructions)(agentId);
39
+ updated = await (0, agent_instructions_1.saveAgentInstructions)(agentId, (0, instruction_blocks_1.removeEntry)(composition, args.instance));
40
+ }
41
+ catch (error) {
42
+ this.handleApiError(error);
43
+ }
44
+ if (flags.json)
45
+ return this.log(JSON.stringify(updated, null, 2));
46
+ this.log(`Removed ${args.instance} from ${agentId}. The reusable library block, if any, was not changed.`);
47
+ }
48
+ }
49
+ exports.default = AgentsInstructionsRemove;
@@ -0,0 +1,17 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Replace a composition atomically — the automation-friendly escape hatch. */
3
+ export default class AgentsInstructionsSet extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ id: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ empty: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ };
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,79 @@
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 agent_resolver_1 = require("../../../lib/agent-resolver");
6
+ const agent_instructions_1 = require("../../../lib/agent-instructions");
7
+ const prompt_1 = require("../../../lib/prompt");
8
+ /** Replace a composition atomically — the automation-friendly escape hatch. */
9
+ class AgentsInstructionsSet extends base_command_1.BaseCommand {
10
+ static description = 'Replace an Agent’s instruction composition from JSON (the server validates and compiles it atomically)';
11
+ static examples = [
12
+ '<%= config.bin %> agents instructions set <agent-id> --file composition.json',
13
+ 'cat composition.json | <%= config.bin %> agents instructions set --file -',
14
+ '<%= config.bin %> agents instructions set <agent-id> --empty --yes',
15
+ ];
16
+ static args = {
17
+ id: core_1.Args.string({
18
+ description: 'Agent ID. Omit to use OVERSKY_SESSION_AGENT_ID.',
19
+ required: false,
20
+ ignoreStdin: true,
21
+ }),
22
+ };
23
+ static flags = {
24
+ json: core_1.Flags.boolean({ description: 'Output the updated Agent as JSON' }),
25
+ agent: core_1.Flags.string({ description: 'Agent ID (alias for the positional argument)' }),
26
+ file: core_1.Flags.string({ description: 'Composition JSON file, or - for stdin' }),
27
+ empty: core_1.Flags.boolean({ description: 'Remove every custom instruction block' }),
28
+ yes: core_1.Flags.boolean({ char: 'y', description: 'Required with --empty' }),
29
+ };
30
+ async run() {
31
+ this.requireAuth();
32
+ const { args, flags } = await this.parse(AgentsInstructionsSet);
33
+ if (Boolean(flags.file) === Boolean(flags.empty)) {
34
+ this.error('Provide exactly one of --file or --empty.', { exit: 2 });
35
+ }
36
+ if (flags.empty && !flags.yes) {
37
+ this.error('Refusing to remove all custom instructions without --yes.', { exit: 2 });
38
+ }
39
+ let agentId;
40
+ try {
41
+ agentId = await (0, agent_instructions_1.resolveInstructionAgentId)(args.id, flags.agent);
42
+ }
43
+ catch (error) {
44
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(error);
45
+ this.failWithCliError({
46
+ message: failure.message,
47
+ code: failure.code,
48
+ exit: 2,
49
+ retryable: false,
50
+ });
51
+ }
52
+ let composition;
53
+ try {
54
+ composition = flags.empty
55
+ ? { schemaVersion: 1, entries: [] }
56
+ : (await (0, prompt_1.readJsonBody)(flags.file));
57
+ if (!composition ||
58
+ typeof composition !== 'object' ||
59
+ composition.schemaVersion !== 1 ||
60
+ !Array.isArray(composition.entries)) {
61
+ throw new Error('Composition JSON must contain { "schemaVersion": 1, "entries": [...] }.');
62
+ }
63
+ }
64
+ catch (error) {
65
+ this.error(error.message, { exit: 2 });
66
+ }
67
+ let updated;
68
+ try {
69
+ updated = await (0, agent_instructions_1.saveAgentInstructions)(agentId, composition);
70
+ }
71
+ catch (error) {
72
+ this.handleApiError(error);
73
+ }
74
+ if (flags.json)
75
+ return this.log(JSON.stringify(updated, null, 2));
76
+ this.log(`Replaced custom instructions for ${agentId}; the server compiled and saved the new composition.`);
77
+ }
78
+ }
79
+ exports.default = AgentsInstructionsSet;
@@ -0,0 +1,15 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Inspect the editable composition, not merely its legacy rendered string. */
3
+ export default class AgentsInstructionsShow extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ id: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ rendered: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,76 @@
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 agent_resolver_1 = require("../../../lib/agent-resolver");
6
+ const agent_instructions_1 = require("../../../lib/agent-instructions");
7
+ /** Inspect the editable composition, not merely its legacy rendered string. */
8
+ class AgentsInstructionsShow extends base_command_1.BaseCommand {
9
+ static description = 'Show an Agent’s custom-instruction composition, ordering, versions, and instance IDs';
10
+ static examples = [
11
+ '<%= config.bin %> agents instructions show <agent-id>',
12
+ '<%= config.bin %> agents instructions show --rendered',
13
+ '<%= config.bin %> agents instructions show <agent-id> --json',
14
+ ];
15
+ static args = {
16
+ id: core_1.Args.string({
17
+ description: 'Agent ID. Omit to use OVERSKY_SESSION_AGENT_ID.',
18
+ required: false,
19
+ ignoreStdin: true,
20
+ }),
21
+ };
22
+ static flags = {
23
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
24
+ agent: core_1.Flags.string({ description: 'Agent ID (alias for the positional argument)' }),
25
+ rendered: core_1.Flags.boolean({ description: 'Also print the exact compiled custom instructions' }),
26
+ };
27
+ async run() {
28
+ this.requireAuth();
29
+ const { args, flags } = await this.parse(AgentsInstructionsShow);
30
+ let agentId;
31
+ try {
32
+ agentId = await (0, agent_instructions_1.resolveInstructionAgentId)(args.id, flags.agent);
33
+ }
34
+ catch (error) {
35
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(error);
36
+ this.failWithCliError({
37
+ message: failure.message,
38
+ code: failure.code,
39
+ exit: 2,
40
+ retryable: false,
41
+ details: { suggestion: failure.suggestion, context: failure.details },
42
+ });
43
+ }
44
+ let loaded;
45
+ try {
46
+ loaded = await (0, agent_instructions_1.loadAgentInstructions)(agentId);
47
+ }
48
+ catch (error) {
49
+ this.handleApiError(error);
50
+ }
51
+ const { agent, composition } = loaded;
52
+ if (flags.json) {
53
+ this.log(JSON.stringify({
54
+ agentId,
55
+ composition,
56
+ instructions: agent.instructions ?? '',
57
+ }, null, 2));
58
+ return;
59
+ }
60
+ this.log(`Agent: ${agent.name ?? agentId} (${agentId})`);
61
+ this.log(`Revision: ${composition.revisionId ?? 'legacy/unsaved'} · ${composition.entries.length} block(s)`);
62
+ this.log('');
63
+ for (const line of (0, agent_instructions_1.renderCompositionLines)(composition))
64
+ this.log(line);
65
+ if (flags.rendered) {
66
+ this.log('');
67
+ this.log('Compiled instructions:');
68
+ this.log(agent.instructions || '(No enabled custom instruction blocks.)');
69
+ }
70
+ else {
71
+ this.log('');
72
+ this.log('Use --rendered to inspect the exact compiled text, or `preview` to revalidate it.');
73
+ }
74
+ }
75
+ }
76
+ exports.default = AgentsInstructionsShow;
@@ -0,0 +1,16 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ /** Explicit is intentional: no library editor can silently change a live Agent. */
3
+ export default class AgentsInstructionsUpgrade extends BaseCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static args: {
7
+ instance: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
8
+ };
9
+ static flags: {
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ version: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ latest: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,77 @@
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_resolver_1 = require("../../../lib/agent-resolver");
7
+ const agent_instructions_1 = require("../../../lib/agent-instructions");
8
+ const instruction_blocks_1 = require("../../../lib/instruction-blocks");
9
+ /** Explicit is intentional: no library editor can silently change a live Agent. */
10
+ class AgentsInstructionsUpgrade extends base_command_1.BaseCommand {
11
+ static description = 'Move one attached library block to a reviewed version explicitly';
12
+ static examples = [
13
+ '<%= config.bin %> agents instructions upgrade library_… --agent <agent-id> --version 2',
14
+ '<%= config.bin %> agents instructions upgrade library_… --agent <agent-id> --latest',
15
+ ];
16
+ static args = {
17
+ instance: core_1.Args.string({
18
+ description: 'Library block instance ID',
19
+ required: true,
20
+ ignoreStdin: true,
21
+ }),
22
+ };
23
+ static flags = {
24
+ json: core_1.Flags.boolean({ description: 'Output the updated Agent as JSON' }),
25
+ agent: core_1.Flags.string({ description: 'Agent ID (alias for the positional argument)' }),
26
+ version: core_1.Flags.integer({ description: 'Exact version to pin' }),
27
+ latest: core_1.Flags.boolean({ description: 'Pin the source’s current version' }),
28
+ };
29
+ async run() {
30
+ this.requireAuth();
31
+ const { args, flags } = await this.parse(AgentsInstructionsUpgrade);
32
+ if (Boolean(flags.version) === Boolean(flags.latest)) {
33
+ this.error('Choose exactly one of --version <n> or --latest.', { exit: 2 });
34
+ }
35
+ let agentId;
36
+ try {
37
+ agentId = await (0, agent_instructions_1.resolveInstructionAgentId)(undefined, flags.agent);
38
+ }
39
+ catch (error) {
40
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(error);
41
+ this.failWithCliError({
42
+ message: failure.message,
43
+ code: failure.code,
44
+ exit: 2,
45
+ retryable: false,
46
+ });
47
+ }
48
+ let updated;
49
+ let selectedVersion;
50
+ try {
51
+ const { composition } = await (0, agent_instructions_1.loadAgentInstructions)(agentId);
52
+ const entry = (0, instruction_blocks_1.entryByInstance)(composition, args.instance);
53
+ if (entry.source.kind !== 'library') {
54
+ throw new Error(`${args.instance} is an inline block and has no library version to upgrade.`);
55
+ }
56
+ const block = await data_provider_1.dataService.getInstructionBlock(entry.source.blockId);
57
+ selectedVersion = flags.latest ? block.currentVersion : flags.version;
58
+ if (!block.versions.some((candidate) => candidate.version === selectedVersion)) {
59
+ throw new Error(`${block.id} has no v${selectedVersion}. Run \`skrr instruction-blocks show ${block.id}\`.`);
60
+ }
61
+ updated = await (0, agent_instructions_1.saveAgentInstructions)(agentId, (0, instruction_blocks_1.replaceEntry)(composition, args.instance, {
62
+ ...entry,
63
+ source: { kind: 'library', blockId: entry.source.blockId, version: selectedVersion },
64
+ // The controller resolves the selected source server-side and writes
65
+ // a new immutable snapshot. Never carry the old snapshot forward.
66
+ resolved: undefined,
67
+ }));
68
+ }
69
+ catch (error) {
70
+ this.handleApiError(error);
71
+ }
72
+ if (flags.json)
73
+ return this.log(JSON.stringify(updated, null, 2));
74
+ this.log(`Upgraded ${args.instance} on ${agentId} to v${selectedVersion}.`);
75
+ }
76
+ }
77
+ exports.default = AgentsInstructionsUpgrade;
@@ -12,6 +12,16 @@ export declare function agentRow(a: Record<string, unknown>): {
12
12
  name: string;
13
13
  description: string;
14
14
  };
15
+ /**
16
+ * What the zero-row case is allowed to say. The account-is-new empty state
17
+ * showed a bare `No agents.` and named no next step, which is what the
18
+ * `commitments/list.ts` empty state was fixed to stop doing. Point at the
19
+ * shortest path a new user actually wants (`skrr code`, which lazily creates
20
+ * a `Sky Code` agent), and at `agents create` for the explicit path.
21
+ *
22
+ * Exported and pure so the wording is testable without an oclif runtime.
23
+ */
24
+ export declare function noAgentsEmptyMessage(bin?: string): string;
15
25
  export default class AgentsList extends BaseCommand {
16
26
  static description: string;
17
27
  static examples: string[];
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agentRow = agentRow;
4
+ exports.noAgentsEmptyMessage = noAgentsEmptyMessage;
4
5
  const core_1 = require("@oclif/core");
5
6
  const data_provider_1 = require("@skrr-ai/data-provider");
6
7
  const base_command_1 = require("../../base-command");
@@ -21,6 +22,20 @@ function agentRow(a) {
21
22
  description: (0, format_1.formatCell)(a.description, ''),
22
23
  };
23
24
  }
25
+ /**
26
+ * What the zero-row case is allowed to say. The account-is-new empty state
27
+ * showed a bare `No agents.` and named no next step, which is what the
28
+ * `commitments/list.ts` empty state was fixed to stop doing. Point at the
29
+ * shortest path a new user actually wants (`skrr code`, which lazily creates
30
+ * a `Sky Code` agent), and at `agents create` for the explicit path.
31
+ *
32
+ * Exported and pure so the wording is testable without an oclif runtime.
33
+ */
34
+ function noAgentsEmptyMessage(bin = 'skrr') {
35
+ return ('No agents yet.\n' +
36
+ ` → Start a coding session and one will be created for you: \`${bin} code\`\n` +
37
+ ` → Or create one explicitly: \`${bin} agents create --name "..." --provider anthropic --model claude-sonnet-4-5 --target hosted-machine\``);
38
+ }
24
39
  class AgentsList extends base_command_1.BaseCommand {
25
40
  static description = 'List agents available to you';
26
41
  static examples = [
@@ -57,7 +72,7 @@ class AgentsList extends base_command_1.BaseCommand {
57
72
  ? r
58
73
  : (r?.data ?? r?.agents ?? []);
59
74
  if (items.length === 0) {
60
- this.log('No agents.');
75
+ this.log(noAgentsEmptyMessage(this.config.bin));
61
76
  return;
62
77
  }
63
78
  const rows = items.map((item) => ({
@@ -112,6 +112,11 @@ class AgentsShow extends base_command_1.BaseCommand {
112
112
  this.log(`Tone: ${agentToneLine(a)}`);
113
113
  this.log(`Category: ${a.category ?? '-'}`);
114
114
  this.log(`Author: ${a.author ?? '-'}`);
115
+ // A cap the user cannot see is a cap they cannot diagnose: a saturated
116
+ // agent makes its assigned tasks wait, which reads as "the board is stuck".
117
+ this.log(`Task limit: ${typeof a.maxConcurrentTaskExecutions === 'number' && a.maxConcurrentTaskExecutions > 0
118
+ ? `${a.maxConcurrentTaskExecutions} concurrent across all spaces`
119
+ : 'unlimited'}`);
115
120
  for (const line of agentExecutionOrderLines(a))
116
121
  this.log(line);
117
122
  if (a.harnessName || a.harnessProvider || a.harnessStatus) {
@@ -4,7 +4,10 @@ const core_1 = require("@oclif/core");
4
4
  const base_command_1 = require("../../../base-command");
5
5
  const prompt_1 = require("../../../lib/prompt");
6
6
  const triggers_1 = require("../../../lib/triggers");
7
- const POLICY_MODES = ['off', 'suggestions_only', 'ask_first', 'auto_run_limited'];
7
+ // The server validates `mode` against the full autonomy ladder. This command
8
+ // used to carry its own copy that stopped one rung short, so `auto_run` was
9
+ // accepted by the API and unreachable from the CLI.
10
+ const data_provider_1 = require("@skrr-ai/data-provider");
8
11
  class AgentsTriggersPolicy extends base_command_1.BaseCommand {
9
12
  static description = "Show or update an agent's initiative policy for agent-scoped triggers";
10
13
  static examples = [
@@ -23,7 +26,10 @@ class AgentsTriggersPolicy extends base_command_1.BaseCommand {
23
26
  'audit-limit': core_1.Flags.integer({
24
27
  description: 'Recent fire rows to include when showing policy',
25
28
  }),
26
- mode: core_1.Flags.string({ description: 'Initiative policy mode', options: [...POLICY_MODES] }),
29
+ mode: core_1.Flags.string({
30
+ description: 'Initiative policy mode',
31
+ options: [...data_provider_1.AGENT_INITIATIVE_POLICY_MODES],
32
+ }),
27
33
  'allowed-kind': core_1.Flags.string({
28
34
  description: 'Allowed trigger kind under auto_run_limited (repeatable or comma-separated)',
29
35
  multiple: true,
@@ -29,6 +29,7 @@ export default class AgentsUpdate extends BaseCommand {
29
29
  'tone-mode': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
30
30
  'tone-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
31
31
  'tone-notes': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
32
+ 'max-concurrent-task-executions': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
32
33
  skills: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
33
34
  'agent-actions': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
34
35
  'tool-policy': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -11,7 +11,7 @@ class AgentsUpdate extends base_command_1.BaseCommand {
11
11
  static description = 'Update an existing agent (partial patch)';
12
12
  static examples = [
13
13
  '<%= config.bin %> agents update <agent-id> --name "New name"',
14
- '<%= config.bin %> agents update <agent-id> --instructions "You are a helpful..."',
14
+ '<%= config.bin %> agents instructions add <agent-id> --inline --title "Working preferences" --body "Lead with the answer."',
15
15
  '<%= config.bin %> agents update <agent-id> --model claude-sonnet-5',
16
16
  '<%= config.bin %> agents update <agent-id> --target sbs_123',
17
17
  '<%= config.bin %> agents update <agent-id> --target rt_local --next-target hosted-machine',
@@ -27,7 +27,9 @@ class AgentsUpdate extends base_command_1.BaseCommand {
27
27
  }),
28
28
  name: core_1.Flags.string({ description: 'New name' }),
29
29
  description: core_1.Flags.string({ description: 'New description' }),
30
- instructions: core_1.Flags.string({ description: 'New system instructions' }),
30
+ instructions: core_1.Flags.string({
31
+ description: 'Replace all custom instructions with one raw legacy block. For block-aware edits use `agents instructions`.',
32
+ }),
31
33
  provider: core_1.Flags.string({ description: 'New provider' }),
32
34
  model: core_1.Flags.string({ description: 'New model' }),
33
35
  category: core_1.Flags.string({ description: 'New category' }),
@@ -56,6 +58,10 @@ class AgentsUpdate extends base_command_1.BaseCommand {
56
58
  'tone-mode': core_1.Flags.string({ description: 'Tone mode' }),
57
59
  'tone-id': core_1.Flags.string({ description: 'Tone ID' }),
58
60
  'tone-notes': core_1.Flags.string({ description: 'Per-agent tone notes' }),
61
+ 'max-concurrent-task-executions': core_1.Flags.integer({
62
+ description: 'Max Task executions this agent may run at once ACROSS every space (0 = unlimited). ' +
63
+ 'Ready tasks assigned to a saturated agent wait instead of starting.',
64
+ }),
59
65
  skills: core_1.Flags.string({ description: 'Skills JSON array' }),
60
66
  'agent-actions': core_1.Flags.string({ description: 'Embedded actions JSON array' }),
61
67
  'tool-policy': core_1.Flags.string({ description: 'Tool policy JSON object' }),
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildBrowserArgs = buildBrowserArgs;
4
4
  exports.forwardBrowserCommand = forwardBrowserCommand;
5
5
  const core_1 = require("@oclif/core");
6
- const exec_oversky_1 = require("../lib/exec-oversky");
6
+ const exec_runtime_binary_1 = require("../lib/exec-runtime-binary");
7
7
  function buildBrowserArgs(passthrough) {
8
8
  return ['browser', ...passthrough];
9
9
  }
@@ -17,14 +17,14 @@ async function forwardBrowserCommand(command, passthrough) {
17
17
  // Older daemons treated unknown subcommands as a daemon startup in some
18
18
  // releases. Probe the command list before forwarding so an install command
19
19
  // cannot turn into a surprising service mutation.
20
- if ((await (0, exec_oversky_1.overskySupportsSubcommand)('browser')) === false) {
20
+ if ((await (0, exec_runtime_binary_1.runtimeBinarySupportsSubcommand)('browser')) === false) {
21
21
  command.error('The local `oversky` daemon does not support skrr Browser yet. Update or reinstall the daemon, then retry `skrr browser`.', { exit: 2 });
22
22
  }
23
- command.exit(await (0, exec_oversky_1.execOversky)(buildBrowserArgs(passthrough)));
23
+ command.exit(await (0, exec_runtime_binary_1.execRuntimeBinary)(buildBrowserArgs(passthrough)));
24
24
  }
25
25
  catch (error) {
26
- if (error.message === 'oversky-not-installed') {
27
- command.log((0, exec_oversky_1.notInstalledMessage)());
26
+ if (error.message === 'runtime-binary-not-installed') {
27
+ command.log((0, exec_runtime_binary_1.notInstalledMessage)());
28
28
  command.exit(127);
29
29
  }
30
30
  throw error;