@skrr-ai/cli 0.1.206 → 0.1.208

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 (155) hide show
  1. package/dist/commands/agent/message/resolve.d.ts +31 -0
  2. package/dist/commands/agent/message/resolve.js +111 -0
  3. package/dist/commands/agent/message/send.d.ts +17 -5
  4. package/dist/commands/agent/message/send.js +77 -26
  5. package/dist/commands/agent/request/list.d.ts +15 -0
  6. package/dist/commands/agent/request/list.js +82 -0
  7. package/dist/commands/agent/request/send.d.ts +18 -0
  8. package/dist/commands/agent/request/send.js +56 -0
  9. package/dist/commands/agents/access/approve.d.ts +17 -0
  10. package/dist/commands/agents/access/approve.js +94 -0
  11. package/dist/commands/agents/access/deny.d.ts +10 -0
  12. package/dist/commands/agents/access/deny.js +36 -0
  13. package/dist/commands/agents/access/list.d.ts +10 -0
  14. package/dist/commands/agents/access/list.js +53 -0
  15. package/dist/commands/agents/access/reach.d.ts +13 -0
  16. package/dist/commands/agents/access/reach.js +53 -0
  17. package/dist/commands/agents/access/revoke.d.ts +13 -0
  18. package/dist/commands/agents/access/revoke.js +50 -0
  19. package/dist/commands/agents/import.d.ts +15 -1
  20. package/dist/commands/agents/import.js +211 -23
  21. package/dist/commands/agents/intuitions/accept.d.ts +0 -1
  22. package/dist/commands/agents/intuitions/accept.js +22 -7
  23. package/dist/commands/agents/intuitions/generate.d.ts +0 -1
  24. package/dist/commands/agents/intuitions/generate.js +4 -16
  25. package/dist/commands/agents/intuitions/list.js +9 -3
  26. package/dist/commands/agents/intuitions/resume.d.ts +11 -0
  27. package/dist/commands/agents/intuitions/resume.js +37 -0
  28. package/dist/commands/agents/models.d.ts +11 -0
  29. package/dist/commands/agents/models.js +51 -0
  30. package/dist/commands/agents/shared-memory.d.ts +24 -0
  31. package/dist/commands/agents/shared-memory.js +67 -0
  32. package/dist/commands/agents/visibility.d.ts +1 -0
  33. package/dist/commands/agents/visibility.js +14 -0
  34. package/dist/commands/balance/route-premiums.d.ts +9 -0
  35. package/dist/commands/balance/route-premiums.js +33 -0
  36. package/dist/commands/code/migrate.js +3 -1
  37. package/dist/commands/convos/transcript.d.ts +0 -1
  38. package/dist/commands/convos/transcript.js +0 -1
  39. package/dist/commands/duties/advance-next.js +15 -6
  40. package/dist/commands/followups/show.js +9 -0
  41. package/dist/commands/followups/watch-pr.d.ts +27 -0
  42. package/dist/commands/followups/watch-pr.js +123 -0
  43. package/dist/commands/goals/create.d.ts +1 -0
  44. package/dist/commands/goals/create.js +8 -0
  45. package/dist/commands/goals/creation-receipt.d.ts +10 -0
  46. package/dist/commands/goals/creation-receipt.js +43 -0
  47. package/dist/commands/goals/key-results/create.d.ts +2 -0
  48. package/dist/commands/goals/key-results/create.js +14 -0
  49. package/dist/commands/goals/key-results/creation-receipt.d.ts +13 -0
  50. package/dist/commands/goals/key-results/creation-receipt.js +51 -0
  51. package/dist/commands/harnesses/forget.d.ts +2 -0
  52. package/dist/commands/harnesses/forget.js +31 -0
  53. package/dist/commands/harnesses/removal-receipt.d.ts +11 -0
  54. package/dist/commands/harnesses/removal-receipt.js +32 -0
  55. package/dist/commands/harnesses/removal-review.d.ts +11 -0
  56. package/dist/commands/harnesses/removal-review.js +28 -0
  57. package/dist/commands/memory/consolidation/index.d.ts +20 -0
  58. package/dist/commands/memory/consolidation/index.js +78 -0
  59. package/dist/commands/memory/consolidation/resume.d.ts +14 -0
  60. package/dist/commands/memory/consolidation/resume.js +46 -0
  61. package/dist/commands/memory/consolidation/undo.d.ts +18 -0
  62. package/dist/commands/memory/consolidation/undo.js +60 -0
  63. package/dist/commands/slack/mutes.d.ts +10 -0
  64. package/dist/commands/slack/mutes.js +62 -0
  65. package/dist/commands/slack/unmute.d.ts +12 -0
  66. package/dist/commands/slack/unmute.js +44 -0
  67. package/dist/commands/spaces/loops/release-receipt.d.ts +14 -0
  68. package/dist/commands/spaces/loops/release-receipt.js +48 -0
  69. package/dist/commands/spaces/loops/release.js +1 -1
  70. package/dist/commands/spaces/workflow-templates/archive.d.ts +1 -0
  71. package/dist/commands/spaces/workflow-templates/archive.js +9 -1
  72. package/dist/commands/spaces/workflow-templates/show.js +2 -0
  73. package/dist/commands/spaces/workflow-templates/update.d.ts +1 -0
  74. package/dist/commands/spaces/workflow-templates/update.js +12 -1
  75. package/dist/commands/spaces/workflows/publish.d.ts +1 -0
  76. package/dist/commands/spaces/workflows/publish.js +41 -2
  77. package/dist/commands/tasks/actionability.js +9 -0
  78. package/dist/commands/tasks/ask.d.ts +50 -0
  79. package/dist/commands/tasks/ask.js +190 -0
  80. package/dist/commands/tasks/create.d.ts +2 -0
  81. package/dist/commands/tasks/create.js +19 -6
  82. package/dist/commands/tasks/creation-receipt.d.ts +12 -0
  83. package/dist/commands/tasks/creation-receipt.js +53 -0
  84. package/dist/commands/tasks/delete.d.ts +1 -0
  85. package/dist/commands/tasks/delete.js +22 -4
  86. package/dist/commands/tasks/deletion-receipt.d.ts +12 -0
  87. package/dist/commands/tasks/deletion-receipt.js +37 -0
  88. package/dist/commands/tasks/handover.js +14 -0
  89. package/dist/commands/tasks/input/answer.js +8 -2
  90. package/dist/commands/tasks/input/show.d.ts +26 -0
  91. package/dist/commands/tasks/input/show.js +185 -17
  92. package/dist/commands/tasks/move.d.ts +11 -0
  93. package/dist/commands/tasks/move.js +82 -1
  94. package/dist/commands/tasks/result/submit.js +3 -0
  95. package/dist/commands/tasks/runs.d.ts +4 -1
  96. package/dist/commands/tasks/runs.js +22 -3
  97. package/dist/commands/tasks/show.js +22 -1
  98. package/dist/commands/tasks/update.d.ts +1 -0
  99. package/dist/commands/tasks/update.js +52 -1
  100. package/dist/commands/tasks/updates/add.js +3 -0
  101. package/dist/commands/tasks/wait.d.ts +20 -0
  102. package/dist/commands/tasks/wait.js +102 -1
  103. package/dist/generated/agent-guides.json +501 -92
  104. package/dist/generated/managed-instruction-guides.json +1 -1
  105. package/dist/lib/agent-access-command.d.ts +19 -0
  106. package/dist/lib/agent-access-command.js +44 -0
  107. package/dist/lib/agent-access.d.ts +18 -0
  108. package/dist/lib/agent-access.js +48 -0
  109. package/dist/lib/agent-import/apply.d.ts +50 -0
  110. package/dist/lib/agent-import/apply.js +85 -0
  111. package/dist/lib/agent-import/plan.d.ts +132 -0
  112. package/dist/lib/agent-import/plan.js +504 -0
  113. package/dist/lib/agent-import/reader.d.ts +94 -0
  114. package/dist/lib/agent-import/reader.js +326 -0
  115. package/dist/lib/agent-import/schedule.d.ts +46 -0
  116. package/dist/lib/agent-import/schedule.js +220 -0
  117. package/dist/lib/agent-import/sources.d.ts +124 -0
  118. package/dist/lib/agent-import/sources.js +797 -0
  119. package/dist/lib/execution-target.d.ts +1 -1
  120. package/dist/lib/execution-target.js +4 -0
  121. package/dist/lib/followups.d.ts +61 -0
  122. package/dist/lib/followups.js +39 -0
  123. package/dist/lib/handover-interview.d.ts +18 -0
  124. package/dist/lib/handover-interview.js +53 -0
  125. package/dist/lib/harnesses.d.ts +25 -0
  126. package/dist/lib/harnesses.js +15 -0
  127. package/dist/lib/input-queue.js +2 -1
  128. package/dist/lib/intuition-look.d.ts +10 -0
  129. package/dist/lib/intuition-look.js +64 -0
  130. package/dist/lib/record-output.d.ts +1 -1
  131. package/dist/lib/record-output.js +2 -0
  132. package/dist/lib/request-uuid.d.ts +2 -0
  133. package/dist/lib/request-uuid.js +10 -0
  134. package/dist/lib/skill-import.d.ts +19 -0
  135. package/dist/lib/skill-import.js +34 -0
  136. package/dist/lib/slack-thread-mutes.d.ts +25 -0
  137. package/dist/lib/slack-thread-mutes.js +12 -0
  138. package/dist/lib/task-carriers.d.ts +18 -0
  139. package/dist/lib/task-carriers.js +43 -0
  140. package/dist/lib/task-extras.d.ts +5 -0
  141. package/dist/lib/task-extras.js +5 -0
  142. package/dist/lib/task-recurrence-summary.d.ts +15 -0
  143. package/dist/lib/task-recurrence-summary.js +22 -0
  144. package/dist/lib/task-version.d.ts +44 -0
  145. package/dist/lib/task-version.js +73 -0
  146. package/dist/lib/task-write-attribution.d.ts +7 -0
  147. package/dist/lib/task-write-attribution.js +14 -0
  148. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/turnPacing.d.ts +75 -0
  149. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/turnPacing.js +124 -0
  150. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/turnPacing.d.ts +75 -0
  151. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/turnPacing.js +141 -0
  152. package/dist/node_modules/@skrr-ai/auth-core/package.json +10 -0
  153. package/dist/node_modules/@skrr-ai/data-provider/index.js +13350 -12579
  154. package/oclif.manifest.json +3044 -563
  155. package/package.json +5 -2
@@ -4,10 +4,9 @@ const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../../base-command");
6
6
  class AgentsIntuitionsGenerate extends base_command_1.BaseCommand {
7
- static description = 'Generate fresh intuitions for an agent';
7
+ static description = 'Ask an agent to look around now (read-only) and suggest what it can point to. Owner only';
8
8
  static args = { agentId: core_1.Args.string({ required: true, ignoreStdin: true }) };
9
9
  static flags = {
10
- force: core_1.Flags.boolean({ description: 'Regenerate even when cached intuitions exist' }),
11
10
  json: core_1.Flags.boolean({ description: 'Output JSON' }),
12
11
  };
13
12
  async run() {
@@ -15,7 +14,7 @@ class AgentsIntuitionsGenerate extends base_command_1.BaseCommand {
15
14
  const { args, flags } = await this.parse(AgentsIntuitionsGenerate);
16
15
  let result;
17
16
  try {
18
- result = await data_provider_1.dataService.generateAgentIntuitions(args.agentId, flags.force);
17
+ result = await data_provider_1.dataService.lookAroundAgentIntuitions(args.agentId);
19
18
  }
20
19
  catch (err) {
21
20
  this.handleApiError(err);
@@ -24,19 +23,8 @@ class AgentsIntuitionsGenerate extends base_command_1.BaseCommand {
24
23
  this.log(this.agentJson(args.agentId, result));
25
24
  return;
26
25
  }
27
- const response = result;
28
- if (response.outcome === 'insufficient_context') {
29
- this.log('No intuitions yet: add relevant agent memories or activity, then try again.');
30
- }
31
- else if (response.outcome === 'no_suggestions') {
32
- this.log('No intuitions were suggested from the available context. Try again after more activity.');
33
- }
34
- else if (response.intuitions?.length === 0) {
35
- this.log('No intuitions were returned. Add relevant memories or activity, then try again.');
36
- }
37
- else {
38
- this.log(`Generated intuitions for agent ${args.agentId}`);
39
- }
26
+ // The look runs on an agent worker; the server only queued it.
27
+ this.log(`The agent is looking around. See what it found with: skrr agents intuitions list ${args.agentId}`);
40
28
  this.printAgentUrl(args.agentId);
41
29
  }
42
30
  }
@@ -4,8 +4,9 @@ const list_output_1 = require("../../../lib/list-output");
4
4
  const core_1 = require("@oclif/core");
5
5
  const data_provider_1 = require("@skrr-ai/data-provider");
6
6
  const base_command_1 = require("../../../base-command");
7
+ const intuition_look_1 = require("../../../lib/intuition-look");
7
8
  class AgentsIntuitionsList extends base_command_1.BaseCommand {
8
- static description = "List an agent's generated intuitions";
9
+ static description = "List an agent's open suggestions, each with the source it read";
9
10
  static args = { agentId: core_1.Args.string({ required: true, ignoreStdin: true }) };
10
11
  static flags = { json: core_1.Flags.boolean({ description: 'Output JSON' }) };
11
12
  async run() {
@@ -16,13 +17,18 @@ class AgentsIntuitionsList extends base_command_1.BaseCommand {
16
17
  this.printJsonResult((0, list_output_1.listResult)(this.withAgentContext(args.agentId, result), 'intuitions'));
17
18
  return;
18
19
  }
19
- const intuitions = result.intuitions ?? result;
20
+ const response = result;
21
+ const intuitions = response.intuitions ?? result;
20
22
  if (Array.isArray(intuitions) && intuitions.length === 0) {
21
- this.log(`No active intuitions. Run skrr agents intuitions generate ${args.agentId} to look for suggestions.`);
23
+ this.log(response.canLook
24
+ ? `No open suggestions. Ask it to look around now: skrr agents intuitions generate ${args.agentId}`
25
+ : 'No open suggestions.');
22
26
  }
23
27
  else {
24
28
  this.printJsonResult(intuitions);
25
29
  }
30
+ for (const line of (0, intuition_look_1.describeLookAround)(response.lookAround, args.agentId))
31
+ this.log(line);
26
32
  this.printAgentUrl(args.agentId);
27
33
  }
28
34
  }
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class AgentsIntuitionsResume extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ agentId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,37 @@
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 intuition_look_1 = require("../../../lib/intuition-look");
7
+ class AgentsIntuitionsResume extends base_command_1.BaseCommand {
8
+ static description = "Resume an agent's look around after it paused itself on repeated failures. Owner only";
9
+ static args = { agentId: core_1.Args.string({ required: true, ignoreStdin: true }) };
10
+ static flags = {
11
+ json: core_1.Flags.boolean({ description: 'Output JSON' }),
12
+ };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { args, flags } = await this.parse(AgentsIntuitionsResume);
16
+ let result;
17
+ try {
18
+ result = await data_provider_1.dataService.resumeAgentIntuitionLook(args.agentId);
19
+ }
20
+ catch (err) {
21
+ this.handleApiError(err);
22
+ }
23
+ if (flags.json) {
24
+ this.log(this.agentJson(args.agentId, result));
25
+ return;
26
+ }
27
+ const lookAround = result
28
+ ?.lookAround;
29
+ this.log(lookAround?.state === 'paused'
30
+ ? 'Looking around is still paused.'
31
+ : 'Looking around resumed.');
32
+ for (const line of (0, intuition_look_1.describeLookAround)(lookAround, args.agentId))
33
+ this.log(line);
34
+ this.printAgentUrl(args.agentId);
35
+ }
36
+ }
37
+ exports.default = AgentsIntuitionsResume;
@@ -0,0 +1,11 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ export default class AgentsModels extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ purpose: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
+ placement: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,51 @@
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 placements = ['cloud-worker', 'machine'];
7
+ class AgentsModels extends base_command_1.BaseCommand {
8
+ static description = 'Show managed Agent models, capability admission, and price status';
9
+ static examples = [
10
+ '<%= config.bin %> agents models',
11
+ '<%= config.bin %> agents models --purpose agent.turn --placement machine --json',
12
+ ];
13
+ static flags = {
14
+ purpose: core_1.Flags.string({ description: 'Model purpose', default: 'agent.turn' }),
15
+ placement: core_1.Flags.string({
16
+ description: 'Execution placement',
17
+ options: placements,
18
+ default: 'cloud-worker',
19
+ }),
20
+ json: core_1.Flags.boolean({ description: 'Output the model catalog as JSON' }),
21
+ };
22
+ async run() {
23
+ this.requireAuth();
24
+ const { flags } = await this.parse(AgentsModels);
25
+ let catalog;
26
+ try {
27
+ catalog = await data_provider_1.dataService.getAgentModelOptions(flags.purpose, flags.placement);
28
+ }
29
+ catch (error) {
30
+ this.handleApiError(error, { subject: 'Managed Agent model catalog' });
31
+ }
32
+ if (flags.json)
33
+ return this.printJsonResult(catalog);
34
+ this.log(`Managed Agent models for ${catalog.purpose} (${flags.placement})`);
35
+ this.log(`Price book ${catalog.priceBookVersion ?? 'not reported'}`);
36
+ if (catalog.options.length === 0)
37
+ this.log('No models listed for this purpose and placement.');
38
+ for (const { alias, admitted, availability, decisions, price } of catalog.options) {
39
+ this.log(` ${alias} ${admitted ? 'admitted' : 'refused'}`);
40
+ if (availability?.message)
41
+ this.log(` ${availability.message}`);
42
+ for (const [capability, decision] of Object.entries(decisions)) {
43
+ this.log(` ${capability} ${decision.admitted ? 'admitted' : 'refused'} (${decision.reason})`);
44
+ }
45
+ this.log(price.status === 'priced'
46
+ ? ` priced ${price.currency} ${price.inputPerMTok} input / ${price.outputPerMTok} output per 1M tokens`
47
+ : ` price ${price.status}`);
48
+ }
49
+ }
50
+ }
51
+ exports.default = AgentsModels;
@@ -0,0 +1,24 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /** One shared row as a line: the key, then the start of its content on one line. */
3
+ export declare function sharedMemoryLine(row: {
4
+ key: string;
5
+ content: string;
6
+ }, width?: number): string;
7
+ /**
8
+ * The exact memory rows a release of this agent would carry (share mode
9
+ * `memory` or `full`), and the rows the publish scan keeps back with the reason
10
+ * for each (OSK-33159). Installers receive the rows marked as shared by you:
11
+ * notes, not instructions. Pass the printed digest to `skrr agents visibility
12
+ * --shared-memory-digest` and the publish is refused if the rows changed since.
13
+ */
14
+ export default class AgentsSharedMemory extends BaseCommand {
15
+ static description: string;
16
+ static examples: string[];
17
+ static args: {
18
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
19
+ };
20
+ static flags: {
21
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
22
+ };
23
+ run(): Promise<void>;
24
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sharedMemoryLine = sharedMemoryLine;
4
+ const core_1 = require("@oclif/core");
5
+ const data_provider_1 = require("@skrr-ai/data-provider");
6
+ const base_command_1 = require("../../base-command");
7
+ /** One shared row as a line: the key, then the start of its content on one line. */
8
+ function sharedMemoryLine(row, width = 100) {
9
+ const content = row.content.replace(/\s+/g, ' ').trim();
10
+ const shown = content.length > width ? `${content.slice(0, width - 1)}…` : content;
11
+ return ` ${row.key}: ${shown}`;
12
+ }
13
+ /**
14
+ * The exact memory rows a release of this agent would carry (share mode
15
+ * `memory` or `full`), and the rows the publish scan keeps back with the reason
16
+ * for each (OSK-33159). Installers receive the rows marked as shared by you:
17
+ * notes, not instructions. Pass the printed digest to `skrr agents visibility
18
+ * --shared-memory-digest` and the publish is refused if the rows changed since.
19
+ */
20
+ class AgentsSharedMemory extends base_command_1.BaseCommand {
21
+ static description = 'Show the memory rows a release of an agent would share, and the rows kept back';
22
+ static examples = [
23
+ '<%= config.bin %> agents shared-memory <agent-id>',
24
+ '<%= config.bin %> agents shared-memory <agent-id> --json',
25
+ ];
26
+ static args = {
27
+ id: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
28
+ };
29
+ static flags = {
30
+ json: core_1.Flags.boolean({ description: 'Output the preview as JSON' }),
31
+ };
32
+ async run() {
33
+ this.requireAuth();
34
+ const { args, flags } = await this.parse(AgentsSharedMemory);
35
+ let preview;
36
+ try {
37
+ preview = await data_provider_1.dataService.getAgentSharedMemoryPreview(args.id);
38
+ }
39
+ catch (err) {
40
+ this.handleApiError(err);
41
+ }
42
+ if (flags.json) {
43
+ this.log(JSON.stringify(preview, null, 2));
44
+ return;
45
+ }
46
+ const { memories, withheld, omitted, digest } = preview;
47
+ if (!memories.length) {
48
+ this.log('No memories would ship with a release of this agent.');
49
+ }
50
+ else {
51
+ this.log(`Installers receive ${memories.length} ${memories.length === 1 ? 'memory' : 'memories'}, marked as shared by you: notes, not instructions.`);
52
+ for (const row of memories)
53
+ this.log(sharedMemoryLine(row));
54
+ }
55
+ if (omitted)
56
+ this.log(`${omitted} more past the limit are not shared.`);
57
+ if (withheld.length) {
58
+ this.log('');
59
+ this.log(`Kept back (${withheld.length}):`);
60
+ for (const row of withheld)
61
+ this.log(` ${row.key}: ${(0, data_provider_1.sharedMemoryWithheldCopy)(row.reason)}`);
62
+ }
63
+ this.log('');
64
+ this.log(`To publish exactly these rows: skrr agents visibility ${args.id} --public --share-mode memory --shared-memory-digest ${digest}`);
65
+ }
66
+ }
67
+ exports.default = AgentsSharedMemory;
@@ -59,6 +59,7 @@ export default class AgentsVisibility extends BaseCommand {
59
59
  private: import("@oclif/core/interfaces").BooleanFlag<boolean>;
60
60
  price: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
61
61
  'share-mode': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
62
+ 'shared-memory-digest': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
62
63
  changelog: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
63
64
  'version-major': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
64
65
  'version-minor': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -146,6 +146,7 @@ class AgentsVisibility extends base_command_1.BaseCommand {
146
146
  '<%= config.bin %> agents visibility <agent-id> --public --license proprietary --source-visibility sealed',
147
147
  '<%= config.bin %> agents visibility <agent-id> --public --slug trip-planner',
148
148
  '<%= config.bin %> agents visibility <agent-id> --public --price 5000000 --trial-brief @trial-brief.md',
149
+ '<%= config.bin %> agents visibility <agent-id> --public --share-mode memory --shared-memory-digest <digest>',
149
150
  ];
150
151
  static args = {
151
152
  id: core_1.Args.string({ description: 'Agent ID', required: true, ignoreStdin: true }),
@@ -167,6 +168,11 @@ class AgentsVisibility extends base_command_1.BaseCommand {
167
168
  description: 'Published data sharing mode',
168
169
  options: ['none', 'bootstrap', 'memory', 'full'],
169
170
  }),
171
+ 'shared-memory-digest': core_1.Flags.string({
172
+ description: 'The digest `skrr agents shared-memory <id>` printed for the memory rows you reviewed. ' +
173
+ 'With it, the publish is refused (SHARED_MEMORY_CHANGED) if the rows a memory or full ' +
174
+ 'share mode would carry changed since; without it they ship as they are now',
175
+ }),
170
176
  changelog: core_1.Flags.string({ description: 'Release changelog' }),
171
177
  'version-major': core_1.Flags.integer({ description: 'Explicit release major version' }),
172
178
  'version-minor': core_1.Flags.integer({ description: 'Explicit release minor version' }),
@@ -250,6 +256,11 @@ class AgentsVisibility extends base_command_1.BaseCommand {
250
256
  if ((license || sourceVisibility) && !isPublic) {
251
257
  this.error('--license, --remix and --source-visibility are terms of a public release; pass them with --public.', { exit: 1 });
252
258
  }
259
+ if (flags['shared-memory-digest'] && !isPublic) {
260
+ this.error('--shared-memory-digest binds the rows of a public release; pass it with --public.', {
261
+ exit: 1,
262
+ });
263
+ }
253
264
  const { trialBrief, error: trialBriefError } = resolveTrialBrief(flags['trial-brief']);
254
265
  if (trialBriefError)
255
266
  this.error(trialBriefError, { exit: 1 });
@@ -275,6 +286,9 @@ class AgentsVisibility extends base_command_1.BaseCommand {
275
286
  isPublic,
276
287
  price: flags.price,
277
288
  shareMode: flags['share-mode'],
289
+ ...(flags['shared-memory-digest']
290
+ ? { sharedMemoryDigest: flags['shared-memory-digest'] }
291
+ : {}),
278
292
  changelog: flags.changelog,
279
293
  versionMajor: flags['version-major'],
280
294
  versionMinor: flags['version-minor'],
@@ -0,0 +1,9 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ export default class BalanceRoutePremiums extends BaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -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
+ class BalanceRoutePremiums extends base_command_1.BaseCommand {
7
+ static description = 'Show model routing premiums currently in effect and when they expire';
8
+ static examples = [
9
+ '<%= config.bin %> balance route-premiums',
10
+ '<%= config.bin %> balance route-premiums --json',
11
+ ];
12
+ static flags = { json: core_1.Flags.boolean({ description: 'Output route premiums as JSON' }) };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { flags } = await this.parse(BalanceRoutePremiums);
16
+ let report;
17
+ try {
18
+ report = await data_provider_1.dataService.getRoutePremiums();
19
+ }
20
+ catch (error) {
21
+ this.handleApiError(error, { subject: 'Current route premiums' });
22
+ }
23
+ if (flags.json)
24
+ return this.printJsonResult(report);
25
+ this.log(`Route premiums as of ${report.asOf}`);
26
+ if (report.premiums.length === 0)
27
+ this.log('No active route premiums.');
28
+ for (const { alias, multiplier, reason, until } of report.premiums) {
29
+ this.log(` ${alias} up to ${multiplier}x list price (${reason}), until ${until}`);
30
+ }
31
+ }
32
+ }
33
+ exports.default = BalanceRoutePremiums;
@@ -35,10 +35,12 @@ class CodeMigrate extends core_1.Command {
35
35
  description: 'Actually perform the migration (default is a dry run)',
36
36
  default: false,
37
37
  }),
38
+ // No `dependsOn: ['apply']`: `--apply` defaults to false, so oclif counted it as
39
+ // present and the dependency never fired. Without --apply this is a dry run that
40
+ // previews what --overwrite would replace, which is what it has always done.
38
41
  overwrite: core_1.Flags.boolean({
39
42
  description: `Replace existing ${auth_core_1.FIRST_PARTY_HARNESS.displayName} files, moving each aside to a timestamped .bak first`,
40
43
  default: false,
41
- dependsOn: ['apply'],
42
44
  }),
43
45
  scope: core_1.Flags.string({
44
46
  description: 'Which configuration scope to migrate',
@@ -9,7 +9,6 @@ export declare const CONTEXT_BREAK_WORDS: Record<ContextBreakReason, string>;
9
9
  export declare const TRANSCRIPT_SOURCE_WORDS: Record<TurnTranscriptSource, string>;
10
10
  /**
11
11
  * Where a continuation sent to an imported session is, as its receipt says. Exhaustive by type.
12
- * (An imported session is read only with a first-party app's session; a CLI token is refused.)
13
12
  */
14
13
  export declare const CONTINUATION_STATE_WORDS: Record<LocalSessionContinuationState, string>;
15
14
  /** Whether the harness context continued into this turn, in words. Never guesses "continued". */
@@ -39,7 +39,6 @@ exports.TRANSCRIPT_SOURCE_WORDS = {
39
39
  };
40
40
  /**
41
41
  * Where a continuation sent to an imported session is, as its receipt says. Exhaustive by type.
42
- * (An imported session is read only with a first-party app's session; a CLI token is refused.)
43
42
  */
44
43
  exports.CONTINUATION_STATE_WORDS = {
45
44
  preparing: 'sent from here, still being prepared',
@@ -17,20 +17,23 @@ class DutiesAdvanceNext extends base_command_1.BaseCommand {
17
17
  };
18
18
  static flags = {
19
19
  at: core_1.Flags.string({ description: 'Earlier time in ISO 8601 with a timezone' }),
20
- confirm: core_1.Flags.boolean({ description: 'Schedule the earlier check after checking the current slot' }),
21
- fresh: core_1.Flags.boolean({ description: 'Request a refresh of declared Agent observations for this Check' }),
20
+ confirm: core_1.Flags.boolean({
21
+ description: 'Schedule the earlier check after checking the current slot',
22
+ }),
23
+ fresh: core_1.Flags.boolean({
24
+ description: 'Request a refresh of declared Agent observations for this Check',
25
+ }),
22
26
  'request-id': core_1.Flags.string({ description: 'UUID to reuse when retrying a confirmed request' }),
23
27
  cancel: core_1.Flags.string({ description: 'Cancel a pending advance by its ID' }),
24
28
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
25
29
  };
26
30
  async run() {
27
31
  this.requireAuth();
28
- const { args: { id }, flags } = await this.parse(DutiesAdvanceNext);
32
+ const { args: { id }, flags, } = await this.parse(DutiesAdvanceNext);
29
33
  if (flags.cancel && (flags.at || flags.confirm || flags.fresh || flags['request-id'])) {
30
34
  this.error('Use --cancel by itself.');
31
35
  }
32
- if (((flags.confirm || flags.fresh) && !flags.at) ||
33
- (flags['request-id'] && !flags.confirm)) {
36
+ if (((flags.confirm || flags.fresh) && !flags.at) || (flags['request-id'] && !flags.confirm)) {
34
37
  this.error('Provide --at with --confirm or --fresh. Use --request-id with --confirm.');
35
38
  }
36
39
  let result;
@@ -86,7 +89,7 @@ class DutiesAdvanceNext extends base_command_1.BaseCommand {
86
89
  : 'Evidence Use the Duty’s configured evidence');
87
90
  }
88
91
  if (result.current) {
89
- const { status, id: advanceId, at, originalAt, occurrenceId, checkId, reason } = result.current;
92
+ const { status, id: advanceId, at, originalAt, occurrenceId, checkId, reason, } = result.current;
90
93
  this.log(`Advance ${status} (${advanceId})`);
91
94
  this.log(`Earlier check ${at}`);
92
95
  this.log(`Original slot ${originalAt}`);
@@ -98,6 +101,8 @@ class DutiesAdvanceNext extends base_command_1.BaseCommand {
98
101
  const receipt = new URL(url);
99
102
  receipt.searchParams.set('view', 'activity');
100
103
  receipt.searchParams.set('checkId', checkId);
104
+ // Without it the page opens the raw Check and not its execution receipt (OSK-33097).
105
+ receipt.searchParams.set('receipt', '1');
101
106
  this.log(`Check receipt ${receipt.toString()}`);
102
107
  }
103
108
  if (result.current.handoff === 'coalesced' && !checkId) {
@@ -111,6 +116,10 @@ class DutiesAdvanceNext extends base_command_1.BaseCommand {
111
116
  }
112
117
  else if (!result.proposal) {
113
118
  this.log('There is no earlier check scheduled.');
119
+ // A bare call is a status read, so say what moves a check (OSK-33184).
120
+ if (!flags.at) {
121
+ this.log('To move the next check earlier, preview it with --at <ISO 8601 time>, then add --confirm.');
122
+ }
114
123
  }
115
124
  if (result.allowance?.runsToday != null && result.allowance.maxRunsPerDay != null) {
116
125
  this.log(`Agent Runs used today ${result.allowance.runsToday}/${result.allowance.maxRunsPerDay}`);
@@ -57,6 +57,15 @@ class FollowupsShow extends base_command_1.BaseCommand {
57
57
  : undefined,
58
58
  ],
59
59
  ['deadline', row.deadlineAt],
60
+ ['pull request', (0, followups_1.pullRequestLine)(row)],
61
+ ['woke', (0, followups_1.wakeLine)(row)],
62
+ ['stopped', (0, followups_1.stopReasonLine)(row)],
63
+ [
64
+ 'blocks',
65
+ row.taskHold
66
+ ? `task ${row.taskHold.taskId}${row.taskHold.releasedAt ? ` (moved back to ${row.taskHold.previousStatus ?? 'its status'} at ${row.taskHold.releasedAt})` : ''}`
67
+ : undefined,
68
+ ],
60
69
  [
61
70
  'waiting',
62
71
  row.parkedAt && !row.terminal
@@ -0,0 +1,27 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ /**
3
+ * `skrr followups watch-pr <pr>` — watch one pull request to the end.
4
+ *
5
+ * One command for what an agent driving a PR needs: wake me once, when CI settles on the PR's
6
+ * current head, when it conflicts, when a review lands, or when it is merged or closed, and tell me
7
+ * which. The server holds the fix-attempt budget; once it is spent, the next failure is handed to
8
+ * the owner instead of waking the agent.
9
+ */
10
+ export default class FollowupsWatchPr extends BaseCommand {
11
+ static summary: string;
12
+ static description: string;
13
+ static examples: string[];
14
+ static args: {
15
+ ref: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
16
+ };
17
+ static flags: {
18
+ agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ subject: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ why: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ deadline: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ 'max-fix-attempts': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ 'reset-attempts': import("@oclif/core/interfaces").BooleanFlag<boolean>;
24
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
25
+ };
26
+ run(): Promise<void>;
27
+ }
@@ -0,0 +1,123 @@
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 followups_1 = require("../../lib/followups");
7
+ const agent_resolver_1 = require("../../lib/agent-resolver");
8
+ /**
9
+ * `skrr followups watch-pr <pr>` — watch one pull request to the end.
10
+ *
11
+ * One command for what an agent driving a PR needs: wake me once, when CI settles on the PR's
12
+ * current head, when it conflicts, when a review lands, or when it is merged or closed, and tell me
13
+ * which. The server holds the fix-attempt budget; once it is spent, the next failure is handed to
14
+ * the owner instead of waking the agent.
15
+ */
16
+ class FollowupsWatchPr extends base_command_1.BaseCommand {
17
+ static summary = 'Watch a pull request until it is merged or closed, with a fix budget';
18
+ static description = [
19
+ "Arms one wait that wakes the agent ONCE, on the first of: CI settled on the PR's current head (pass or fail; an older head is ignored, and a push starts the wait for CI again), a merge conflict, a submitted review, the merge, or a close without merge. The wake says which event it was.",
20
+ 'Each wake for a failed CI run or requested changes spends one fix attempt (default 2). When they are spent, the next failure does not wake the agent: the watch stops, and its owner gets a card and an Update on the task. A good-news wake (CI passed, approved) starts the count again. Only the owner resets it, with --reset-attempts or --max-fix-attempts.',
21
+ 'After acting on a wake, the agent arms the next watch with the same command; the attempt count carries over. The default deadline is 6h, the longest a GitHub Actions job can run.',
22
+ ].join('\n\n');
23
+ static examples = [
24
+ '<%= config.bin %> followups watch-pr acme/api#42',
25
+ '<%= config.bin %> followups watch-pr https://github.com/acme/api/pull/42 --subject task:OSK-42',
26
+ '<%= config.bin %> followups watch-pr acme/api#42 --deadline 2d',
27
+ '<%= config.bin %> followups watch-pr acme/api#42 --agent agent_abc --reset-attempts',
28
+ ];
29
+ static args = {
30
+ ref: core_1.Args.string({
31
+ description: 'The pull request: owner/repo#number or its github.com URL',
32
+ required: true,
33
+ }),
34
+ };
35
+ static flags = {
36
+ agent: core_1.Flags.string({ description: 'Agent ID (default: bound session agent)' }),
37
+ subject: core_1.Flags.string({
38
+ description: 'What the watch is about, type:externalKey (task:OSK-42 posts its outcome on that task); default: the pull request itself',
39
+ }),
40
+ why: core_1.Flags.string({ description: 'Why this watch exists, in one line' }),
41
+ deadline: core_1.Flags.string({
42
+ description: 'When the watch stops if nothing happened: 10m to 7d, such as 6h or 2d (default 6h)',
43
+ }),
44
+ 'max-fix-attempts': core_1.Flags.integer({
45
+ description: `Set the fix-attempt budget (1-${data_provider_1.PULL_REQUEST_WATCH_MAX_FIX_ATTEMPTS}) and start the count again. The owner's to set: refused from an agent run`,
46
+ }),
47
+ 'reset-attempts': core_1.Flags.boolean({
48
+ description: "Start the fix-attempt count again. The owner's to set: refused from an agent run",
49
+ }),
50
+ json: core_1.Flags.boolean({ description: 'Output as JSON' }),
51
+ };
52
+ async run() {
53
+ this.requireAuth();
54
+ const { args, flags } = await this.parse(FollowupsWatchPr);
55
+ if (!(0, data_provider_1.parsePullRequestRef)(args.ref)) {
56
+ this.failWithCliError({
57
+ message: `"${args.ref}" does not name a pull request. Use owner/repo#number or https://github.com/owner/repo/pull/number, for example: skrr followups watch-pr acme/api#42`,
58
+ code: 'FOLLOWUP_INVALID_FIELD',
59
+ exit: 2,
60
+ retryable: false,
61
+ });
62
+ }
63
+ let agent;
64
+ try {
65
+ agent = (0, followups_1.resolveFollowUpAgent)(flags.agent);
66
+ }
67
+ catch (err) {
68
+ const failure = (0, agent_resolver_1.agentResolutionFailure)(err);
69
+ this.failWithCliError({
70
+ message: failure.message,
71
+ code: failure.code,
72
+ exit: 2,
73
+ retryable: false,
74
+ details: { suggestion: failure.suggestion, context: failure.details },
75
+ });
76
+ }
77
+ let subject;
78
+ if (flags.subject) {
79
+ try {
80
+ subject = (0, followups_1.parseSubjectRef)(flags.subject);
81
+ }
82
+ catch (err) {
83
+ this.failWithCliError({
84
+ message: err.message,
85
+ code: 'FOLLOWUP_INVALID_FIELD',
86
+ exit: 2,
87
+ retryable: false,
88
+ });
89
+ }
90
+ }
91
+ let response;
92
+ try {
93
+ response = await followups_1.followupsApi.watchPullRequest({
94
+ ref: args.ref,
95
+ agentId: agent.id,
96
+ producer: agent.boundToSession ? 'agent_in_turn' : 'user_explicit',
97
+ ...(subject ? { subject } : {}),
98
+ ...(flags.why ? { why: flags.why } : {}),
99
+ ...(flags.deadline ? { deadline: flags.deadline } : {}),
100
+ ...(flags['max-fix-attempts'] !== undefined
101
+ ? { maxFixAttempts: flags['max-fix-attempts'] }
102
+ : {}),
103
+ ...(flags['reset-attempts'] ? { resetAttempts: true } : {}),
104
+ });
105
+ }
106
+ catch (err) {
107
+ this.handleApiError(err);
108
+ return;
109
+ }
110
+ if (flags.json) {
111
+ this.log(JSON.stringify(response, null, 2));
112
+ return;
113
+ }
114
+ const notice = (0, followups_1.producerDowngradeNotice)(response);
115
+ if (notice)
116
+ this.log(notice);
117
+ const row = response.followup;
118
+ const pr = row ? (0, followups_1.pullRequestLine)(row) : undefined;
119
+ this.log(`${response.reused ? 'Already watching' : 'Watching'} ${pr ?? response.pullRequest?.ref ?? args.ref}: ${row?.id ?? '—'}${row?.deadlineAt ? `, until ${row.deadlineAt}` : ''}.`);
120
+ this.log('It wakes the agent once, on CI settling, a conflict, a review, the merge or a close. Re-arm it with this command after acting on a wake.');
121
+ }
122
+ }
123
+ exports.default = FollowupsWatchPr;