@skrr-ai/cli 0.1.232 → 0.1.233

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 (118) hide show
  1. package/README.md +29 -13
  2. package/bin/dev.cjs +0 -1
  3. package/bin/run.js +0 -15
  4. package/dist/base-command.d.ts +6 -1
  5. package/dist/base-command.js +24 -4
  6. package/dist/commands/agenda/plan.d.ts +2 -1
  7. package/dist/commands/agenda/plan.js +18 -4
  8. package/dist/commands/agents/chat.d.ts +2 -0
  9. package/dist/commands/agents/chat.js +59 -13
  10. package/dist/commands/agents/eval/list.d.ts +4 -0
  11. package/dist/commands/agents/eval/list.js +33 -0
  12. package/dist/commands/agents/permissions/policy.js +25 -2
  13. package/dist/commands/agents/spawn.js +61 -24
  14. package/dist/commands/agents/triggers/fire.js +1 -1
  15. package/dist/commands/agents/triggers/runs.js +3 -0
  16. package/dist/commands/code/jobs/approve.d.ts +1 -11
  17. package/dist/commands/code/jobs/approve.js +3 -15
  18. package/dist/commands/code/jobs/cancel.js +3 -2
  19. package/dist/commands/code/jobs/index.js +1 -1
  20. package/dist/commands/code/jobs/list.js +4 -11
  21. package/dist/commands/code/jobs/run.js +13 -7
  22. package/dist/commands/code/jobs/show.js +51 -6
  23. package/dist/commands/commands.d.ts +1 -0
  24. package/dist/commands/commands.js +5 -1
  25. package/dist/commands/context.d.ts +1 -0
  26. package/dist/commands/context.js +1 -0
  27. package/dist/commands/duties/catalog/add.d.ts +18 -0
  28. package/dist/commands/duties/catalog/add.js +52 -0
  29. package/dist/commands/duties/catalog/index.d.ts +18 -0
  30. package/dist/commands/duties/catalog/index.js +88 -0
  31. package/dist/commands/duties/receipt.js +56 -1
  32. package/dist/commands/goals/planner-compare.js +5 -3
  33. package/dist/commands/instructions/discovery.d.ts +10 -0
  34. package/dist/commands/instructions/discovery.js +74 -0
  35. package/dist/commands/runs/admission.d.ts +12 -0
  36. package/dist/commands/runs/admission.js +66 -0
  37. package/dist/commands/runs/events.d.ts +2 -0
  38. package/dist/commands/runs/events.js +40 -10
  39. package/dist/commands/runs/list.d.ts +7 -1
  40. package/dist/commands/runs/list.js +81 -17
  41. package/dist/commands/runs/show.d.ts +1 -0
  42. package/dist/commands/runs/show.js +225 -15
  43. package/dist/commands/runs/stop.d.ts +1 -0
  44. package/dist/commands/runs/stop.js +34 -7
  45. package/dist/commands/runs/transcript.d.ts +2 -0
  46. package/dist/commands/runs/transcript.js +102 -17
  47. package/dist/commands/tasks/attachments/download.d.ts +1 -0
  48. package/dist/commands/tasks/attachments/download.js +6 -4
  49. package/dist/commands/tasks/attachments/source.d.ts +6 -0
  50. package/dist/commands/tasks/attachments/source.js +18 -0
  51. package/dist/commands/tasks/chat/exchange.d.ts +0 -14
  52. package/dist/commands/tasks/chat/exchange.js +8 -39
  53. package/dist/commands/tasks/chat/reply-run.d.ts +15 -0
  54. package/dist/commands/tasks/chat/reply-run.js +69 -0
  55. package/dist/commands/tasks/complete.js +1 -1
  56. package/dist/commands/tasks/lifecycle/transition.d.ts +1 -0
  57. package/dist/commands/tasks/lifecycle/transition.js +51 -13
  58. package/dist/commands/tasks/operations/show.js +5 -0
  59. package/dist/commands/tasks/result/submit.js +4 -2
  60. package/dist/commands/tasks/retry.js +25 -16
  61. package/dist/commands/triggers/audit.js +3 -1
  62. package/dist/commands/triggers/fire-detail.js +4 -1
  63. package/dist/commands/triggers/fire.js +1 -1
  64. package/dist/commands/usage.d.ts +1 -0
  65. package/dist/commands/usage.js +1 -0
  66. package/dist/generated/agent-guides.json +64 -712
  67. package/dist/help.d.ts +2 -7
  68. package/dist/help.js +13 -7
  69. package/dist/hooks/init.js +10 -0
  70. package/dist/lib/agent-evals.d.ts +1 -1
  71. package/dist/lib/agent-evals.js +13 -3
  72. package/dist/lib/agent-guides.d.ts +3 -5
  73. package/dist/lib/agent-guides.js +12 -13
  74. package/dist/lib/agent-runs.d.ts +69 -9
  75. package/dist/lib/agent-runs.js +208 -35
  76. package/dist/lib/agentic-stream.d.ts +12 -0
  77. package/dist/lib/agentic-stream.js +163 -79
  78. package/dist/lib/api-fetch.d.ts +2 -0
  79. package/dist/lib/api-fetch.js +6 -1
  80. package/dist/lib/command-manifest.d.ts +1 -6
  81. package/dist/lib/command-manifest.js +86 -13
  82. package/dist/lib/config.d.ts +2 -3
  83. package/dist/lib/config.js +2 -3
  84. package/dist/lib/duties.d.ts +5 -1
  85. package/dist/lib/duties.js +4 -0
  86. package/dist/lib/execution-history.d.ts +3 -0
  87. package/dist/lib/format.d.ts +1 -0
  88. package/dist/lib/format.js +18 -0
  89. package/dist/lib/guide-pointer.d.ts +5 -1
  90. package/dist/lib/guide-pointer.js +21 -2
  91. package/dist/lib/hosted-job-status.d.ts +4 -0
  92. package/dist/lib/hosted-job-status.js +19 -0
  93. package/dist/lib/inbound-messages.d.ts +1 -0
  94. package/dist/lib/inbound-messages.js +2 -0
  95. package/dist/lib/roles.d.ts +2 -2
  96. package/dist/lib/schedule.d.ts +4 -0
  97. package/dist/lib/schedule.js +4 -3
  98. package/dist/lib/task-execution.d.ts +1 -1
  99. package/dist/lib/task-execution.js +3 -19
  100. package/dist/lib/task-extras.d.ts +11 -1
  101. package/dist/lib/task-extras.js +15 -1
  102. package/dist/lib/task-transcript.js +3 -8
  103. package/dist/lib/triggers.d.ts +5 -36
  104. package/dist/lib/triggers.js +48 -33
  105. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +5 -1
  106. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessCommand.d.ts +37 -0
  107. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessCommand.js +59 -0
  108. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +5 -1
  109. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessCommand.d.ts +37 -0
  110. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessCommand.js +57 -0
  111. package/dist/node_modules/@skrr-ai/auth-core/package.json +10 -0
  112. package/dist/node_modules/@skrr-ai/data-provider/index.js +12261 -12172
  113. package/docs/v1/quickstart.md +18 -0
  114. package/oclif.manifest.json +2505 -629
  115. package/package.json +3 -2
  116. package/skills/skrr/SKILL.md +14 -0
  117. package/dist/commands/triggers/runs.d.ts +0 -22
  118. package/dist/commands/triggers/runs.js +0 -58
@@ -81,29 +81,38 @@ class TasksRetry extends base_command_1.BaseCommand {
81
81
  `${taskRef} --request-id ${requestId}; do not issue a new retry id by guesswork.`,
82
82
  });
83
83
  }
84
+ const refused = result.state === 'transition_committed' &&
85
+ result.statusTransition?.state === 'committed' &&
86
+ result.dispatch?.state === 'not_started' &&
87
+ result.dispatch.code === 'TASK_RETRY_HANDOFF_CHANGED' &&
88
+ result.dispatch.retryable === false;
84
89
  if (flags.json) {
85
90
  this.log(JSON.stringify({ ...result, taskId: taskRef, requestId }, null, 2));
86
- return;
87
91
  }
88
- if (!result.started) {
89
- this.log(`Retry request ${requestId} is ${result.state}; dispatch is not confirmed.`);
92
+ else if (!result.started) {
93
+ this.log(refused
94
+ ? `The status transition for retry request ${requestId} was saved. The Task changed before dispatch, so no Run was admitted.`
95
+ : `Retry request ${requestId} is ${result.state}; dispatch is not confirmed.`);
90
96
  if (result.dispatch?.code)
91
97
  this.log(`Dispatch code: ${result.dispatch.code}`);
92
98
  this.log(`Inspect only: ${this.config.bin} tasks retry-receipt ${taskRef} --request-id ${requestId}`);
93
- return;
94
99
  }
95
- this.log(`Retried task ${taskRef}`);
96
- this.log(`Retry receipt: ${requestId}`);
97
- if (result.runId)
98
- this.log(`Run: ${result.runId}`);
99
- if (result.autonomousRunId)
100
- this.log(`Autonomous Run: ${result.autonomousRunId}`);
101
- if (result.conversationId)
102
- this.log(`Conversation: ${result.conversationId}`);
103
- if (result.sessionId)
104
- this.log(`Session: ${result.sessionId}`);
105
- if (result.responseMessageId)
106
- this.log(`Response message: ${result.responseMessageId}`);
100
+ else {
101
+ this.log(`Retried task ${taskRef}`);
102
+ this.log(`Retry receipt: ${requestId}`);
103
+ if (result.runId)
104
+ this.log(`Run: ${result.runId}`);
105
+ if (result.autonomousRunId)
106
+ this.log(`Autonomous Run: ${result.autonomousRunId}`);
107
+ if (result.conversationId)
108
+ this.log(`Conversation: ${result.conversationId}`);
109
+ if (result.sessionId)
110
+ this.log(`Session: ${result.sessionId}`);
111
+ if (result.responseMessageId)
112
+ this.log(`Response message: ${result.responseMessageId}`);
113
+ }
114
+ if (refused)
115
+ this.exit(1);
107
116
  }
108
117
  }
109
118
  exports.default = TasksRetry;
@@ -4,9 +4,11 @@ const core_1 = require("@oclif/core");
4
4
  const base_command_1 = require("../../base-command");
5
5
  const triggers_1 = require("../../lib/triggers");
6
6
  class TriggersAudit extends base_command_1.BaseCommand {
7
- static description = 'List fire audit records for a trigger, or owner-wide fire history with filters';
7
+ static description = 'List fire audit records for a trigger, or owner-wide fire history with filters. ' +
8
+ 'Use --json to get the full occurrence ID for triggers fire-detail.';
8
9
  static examples = [
9
10
  '<%= config.bin %> triggers audit <trigger-id>',
11
+ '<%= config.bin %> triggers audit <trigger-id> --json',
10
12
  '<%= config.bin %> triggers audit --scope agent --outcome failed --json',
11
13
  '<%= config.bin %> triggers audit <trigger-id> --limit 50 --json',
12
14
  ];
@@ -100,7 +100,7 @@ function describeFireAuditDetail(detail, fireId, triggerId) {
100
100
  return lines;
101
101
  }
102
102
  class TriggersFireDetail extends base_command_1.BaseCommand {
103
- static description = 'Show the authorized restricted summary for one trigger fire';
103
+ static description = 'Show one trigger fire. When the server can verify its Agent Run, follow the runs show link.';
104
104
  static examples = [
105
105
  '<%= config.bin %> triggers fire-detail <trigger-id> <fire-id>',
106
106
  '<%= config.bin %> triggers fire-detail <trigger-id> <fire-id> --json',
@@ -132,6 +132,9 @@ class TriggersFireDetail extends base_command_1.BaseCommand {
132
132
  }
133
133
  for (const line of describeFireAuditDetail(detail, args.fireId, args.id))
134
134
  this.log(line);
135
+ const runCommand = (0, triggers_1.fireRunHistoryCommand)(detail.agentRun, this.config.bin);
136
+ if (runCommand)
137
+ this.log(`Run History: ${runCommand}`);
135
138
  }
136
139
  }
137
140
  exports.default = TriggersFireDetail;
@@ -79,7 +79,7 @@ class TriggersFire extends base_command_1.BaseCommand {
79
79
  return;
80
80
  }
81
81
  this.log(`Fire requested: outcome=${String(result.outcome ?? '-')} reason=${String(result.reason ?? '-')}`);
82
- for (const line of (0, triggers_1.describeFireDetail)(result))
82
+ for (const line of (0, triggers_1.describeFireDetail)(result, this.config.bin))
83
83
  this.log(line);
84
84
  const note = (0, triggers_1.describeScheduledFire)(result);
85
85
  if (note)
@@ -1,5 +1,6 @@
1
1
  import { BaseCommand } from '../base-command';
2
2
  export default class Usage extends BaseCommand {
3
+ static credentialMode: "local";
3
4
  static description: string;
4
5
  static examples: string[];
5
6
  static args: {
@@ -5,6 +5,7 @@ const base_command_1 = require("../base-command");
5
5
  const command_manifest_1 = require("../lib/command-manifest");
6
6
  const usage_discovery_1 = require("../lib/usage-discovery");
7
7
  class Usage extends base_command_1.BaseCommand {
8
+ static credentialMode = 'local';
8
9
  static description = 'Progressively discover skrr commands from the manifest, one token-budgeted domain at a time.';
9
10
  static examples = [
10
11
  '<%= config.bin %> usage',