@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
package/dist/help.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Help } from '@oclif/core';
1
+ import { Help, type Command } from '@oclif/core';
2
2
  /**
3
3
  * Make `--help` on a command that does not exist say the same thing running it
4
4
  * says.
@@ -35,12 +35,7 @@ import { Help } from '@oclif/core';
35
35
  * for people who already knew.
36
36
  */
37
37
  export default class SkrrHelp extends Help {
38
- /**
39
- * The two commands, before the topic list rather than after it.
40
- *
41
- * Deliberately not a tutorial: two lines, both runnable, in the order a new
42
- * machine needs them.
43
- */
44
38
  protected showRootHelp(): Promise<void>;
39
+ showCommandHelp(command: Command.Loadable): Promise<void>;
45
40
  showHelp(argv: string[]): Promise<void>;
46
41
  }
package/dist/help.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const command_miss_1 = require("./lib/command-miss");
5
+ const guide_pointer_1 = require("./lib/guide-pointer");
5
6
  /**
6
7
  * Make `--help` on a command that does not exist say the same thing running it
7
8
  * says.
@@ -38,20 +39,25 @@ const command_miss_1 = require("./lib/command-miss");
38
39
  * for people who already knew.
39
40
  */
40
41
  class SkrrHelp extends core_1.Help {
41
- /**
42
- * The two commands, before the topic list rather than after it.
43
- *
44
- * Deliberately not a tutorial: two lines, both runnable, in the order a new
45
- * machine needs them.
46
- */
47
42
  async showRootHelp() {
48
43
  this.log('GETTING STARTED');
49
- this.log(' skrr login Sign in. Offers to install the background service if this computer has none.');
44
+ this.log(' skrr context --json Before writing, check sign-in, bound Agent or Task, and who Task writes are attributed to.');
45
+ this.log(' skrr login Sign in from your own terminal. Offers to install the background service.');
50
46
  this.log(' skrr daemon install Install the background service by hand (fetches the signed release).');
51
47
  this.log(" skrr guide Read a Skrr domain's guide before you write in it.");
48
+ this.log(' skrr instructions discovery --provider codex Let a new coding agent discover Skrr in this project.');
52
49
  this.log('');
53
50
  return super.showRootHelp();
54
51
  }
52
+ async showCommandHelp(command) {
53
+ const guide = (0, guide_pointer_1.agentGuidePointerForCommand)(command.id);
54
+ if (guide) {
55
+ this.log((0, guide_pointer_1.agentGuidePointerLine)(guide));
56
+ this.log(`Read this when ${guide.readWhen}.`);
57
+ this.log('');
58
+ }
59
+ return super.showCommandHelp(command);
60
+ }
55
61
  async showHelp(argv) {
56
62
  // Resolve the id exactly as running the same words would — a word after a
57
63
  // command that takes arguments is an argument, not part of the name
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const config_1 = require("../lib/config");
4
+ const keychain_1 = require("../lib/keychain");
4
5
  const update_check_1 = require("../lib/update-check");
5
6
  const turn_context_1 = require("../lib/turn-context");
6
7
  /** All commands pass through this hook, including the local code/daemon
@@ -18,6 +19,15 @@ const hook = async function (options) {
18
19
  ...(options.id ?? '').split(':').filter(Boolean),
19
20
  ...(options.argv ?? process.argv.slice(2)),
20
21
  ];
22
+ try {
23
+ (0, keychain_1.selectActiveProfile)((0, keychain_1.resolveProfileFromArgv)(argv));
24
+ }
25
+ catch (error) {
26
+ // Local commands can write configuration without passing through BaseCommand.
27
+ this.error(error.message, { exit: 64 });
28
+ }
29
+ if (process.env.OVERSKY_AUTONOMOUS_SESSION !== '1')
30
+ (0, config_1.seedWorkspaceEnv)();
21
31
  if (!(0, update_check_1.shouldCheckCliUpdateAtStartup)(argv, !!process.stderr.isTTY && !!process.stdin.isTTY))
22
32
  return;
23
33
  try {
@@ -21,7 +21,7 @@ export declare function readEvalCases(casesPath: string): ReleaseEvalCase[];
21
21
  * newest release. Releases arrive newest first.
22
22
  */
23
23
  export declare function pickRelease(releases: AgentRelease[], wanted?: string): AgentRelease | undefined;
24
- /** The planned trials that have no graded result yet, in run order. */
24
+ /** The planned trials that can still run, in run order. */
25
25
  export declare function pendingTrials(evaluation: AgentReleaseEval): ReleaseEvalTrialPlanEntry[];
26
26
  export declare function describeTrialLine(evaluation: AgentReleaseEval, trial: ReleaseEvalTrial, position: number, total: number, replayed?: boolean): string;
27
27
  export declare function describeEvalHeader(evaluation: AgentReleaseEval): string[];
@@ -138,9 +138,9 @@ function pickRelease(releases, wanted) {
138
138
  const label = wanted.replace(PICK_RELEASE_RE, '');
139
139
  return releases.find((release) => release.id === wanted || release.versionLabel === label);
140
140
  }
141
- /** The planned trials that have no graded result yet, in run order. */
141
+ /** The planned trials that can still run, in run order. */
142
142
  function pendingTrials(evaluation) {
143
- const done = new Set((evaluation.trials ?? []).filter((t) => t.state === 'completed').map((t) => t.key));
143
+ const done = new Set((evaluation.trials ?? []).filter((t) => t.state === 'completed' || t.state === 'cancelled').map((t) => t.key));
144
144
  return (0, data_provider_1.releaseEvalTrialPlan)({
145
145
  cases: evaluation.cases,
146
146
  trialsPerCase: evaluation.trialsPerCase,
@@ -198,12 +198,13 @@ function describeEvalHeader(evaluation) {
198
198
  /** The comparison, the per-case table, and the provenance lines. */
199
199
  function describeEvalReport(evaluation) {
200
200
  const { summary } = evaluation;
201
+ const stopped = evaluation.trials?.filter(({ state }) => state === 'cancelled').length ?? 0;
201
202
  const provenance = (0, data_provider_1.describeReleaseEvalProvenance)(evaluation);
202
203
  const lines = [
203
204
  ...describeEvalHeader(evaluation),
204
205
  ` Status: ${evaluation.status}${evaluation.status === 'running'
205
206
  ? ` — ${summary.recordedTrials} of ${summary.expectedTrials} trials graded`
206
- : ''}`,
207
+ : ''}${stopped ? ` · ${stopped} stopped` : ''}`,
207
208
  '',
208
209
  ` ${''.padEnd(18)} ${'pass rate'.padEnd(16)} ${'cost/run'.padStart(10)} ${'total cost'.padStart(12)}`,
209
210
  armRow(armLabel(evaluation, 'candidate'), summary.candidate),
@@ -273,6 +274,11 @@ async function runEvalTrial(client, entry) {
273
274
  const sleep = client.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
274
275
  const now = client.now ?? (() => Date.now());
275
276
  const deadline = now() + exports.EVAL_TRIAL_OBSERVE_LIMIT_MS;
277
+ const rejectCancellation = (trial) => {
278
+ if (trial?.state === 'cancelled') {
279
+ throw new EvalTrialFailedError(entry.key, `Trial ${entry.key} was stopped`);
280
+ }
281
+ };
276
282
  let started;
277
283
  try {
278
284
  started = await client.start(entry);
@@ -281,6 +287,7 @@ async function runEvalTrial(client, entry) {
281
287
  if (!isTrialStillRunningError(error))
282
288
  throw error;
283
289
  }
290
+ rejectCancellation(started?.trial);
284
291
  if (started?.trial.state === 'completed') {
285
292
  return { trial: started.trial, evaluation: started.evaluation, replayed: started.replayed };
286
293
  }
@@ -304,6 +311,7 @@ async function runEvalTrial(client, entry) {
304
311
  continue;
305
312
  }
306
313
  const trial = (evaluation.trials ?? []).find((t) => t.key === entry.key);
314
+ rejectCancellation(trial);
307
315
  if (trial?.state === 'completed') {
308
316
  return { trial, evaluation, replayed: false };
309
317
  }
@@ -315,6 +323,7 @@ async function runEvalTrial(client, entry) {
315
323
  restartedLostStart = true;
316
324
  try {
317
325
  const restarted = await client.start(entry);
326
+ rejectCancellation(restarted.trial);
318
327
  if (restarted.trial.state === 'completed') {
319
328
  return {
320
329
  trial: restarted.trial,
@@ -341,6 +350,7 @@ async function runEvalTrial(client, entry) {
341
350
  // The run behind the claim is gone; starting again retakes it.
342
351
  try {
343
352
  const retaken = await client.start(entry);
353
+ rejectCancellation(retaken.trial);
344
354
  if (retaken.trial.state === 'completed') {
345
355
  return {
346
356
  trial: retaken.trial,
@@ -4,7 +4,7 @@ export type AgentGuideRequest = {
4
4
  id?: string;
5
5
  section?: string;
6
6
  };
7
- export type AgentGuideFallbackReason = 'no-session' | 'server-unavailable' | 'server-hash-mismatch' | 'offline-requested';
7
+ export type AgentGuideFallbackReason = 'no-session' | 'server-unavailable' | 'server-guide-not-found' | 'server-hash-mismatch' | 'offline-requested';
8
8
  export type AgentGuideRead = {
9
9
  found: true;
10
10
  response: AgentGuideResponse;
@@ -47,10 +47,8 @@ export declare function agentGuideJson(read: Extract<AgentGuideRead, {
47
47
  found: true;
48
48
  }>): string;
49
49
  /**
50
- * The one fallback a text-mode reader is told about. No session, `--offline`
51
- * and an unreachable server are ordinary reasons to read the bundled copy. A
52
- * server whose body does not match its own hash is an integrity failure, so it
53
- * is said on stderr and stdout stays the guide (OSK-17944).
50
+ * Explain when a server miss or hash mismatch changes the source to the bundle.
51
+ * Keep stdout available for the guide text.
54
52
  */
55
53
  export declare function agentGuideFallbackNotice(read: Extract<AgentGuideRead, {
56
54
  found: true;
@@ -56,7 +56,7 @@ function guideMissFrom(error) {
56
56
  }
57
57
  function readBundledGuide(request) {
58
58
  if (!request.id)
59
- return { found: true, response: bundle.routedIndex };
59
+ return { found: true, response: bundle.index };
60
60
  const resolved = (0, data_provider_1.resolveAgentGuideRequest)(bundle.index.guides, { id: request.id, ...(request.section ? { section: request.section } : {}) }, { surface: 'cli' });
61
61
  if (!resolved.found)
62
62
  return resolved;
@@ -134,17 +134,14 @@ async function readAgentGuide(request, flags) {
134
134
  }
135
135
  catch (error) {
136
136
  miss = guideMissFrom(error) ?? undefined;
137
- if (!miss)
138
- reason = 'server-unavailable';
137
+ reason = miss ? 'server-guide-not-found' : 'server-unavailable';
139
138
  }
140
139
  }
141
140
  }
142
- if (miss)
143
- return { found: false, miss };
144
141
  if (!response) {
145
142
  const bundled = readBundledGuide(request);
146
143
  if (!bundled.found)
147
- return bundled;
144
+ return miss ? { found: false, miss } : bundled;
148
145
  response = bundled.response;
149
146
  }
150
147
  return {
@@ -170,15 +167,17 @@ function agentGuideJson(read) {
170
167
  }, null, 2)}\n`;
171
168
  }
172
169
  /**
173
- * The one fallback a text-mode reader is told about. No session, `--offline`
174
- * and an unreachable server are ordinary reasons to read the bundled copy. A
175
- * server whose body does not match its own hash is an integrity failure, so it
176
- * is said on stderr and stdout stays the guide (OSK-17944).
170
+ * Explain when a server miss or hash mismatch changes the source to the bundle.
171
+ * Keep stdout available for the guide text.
177
172
  */
178
173
  function agentGuideFallbackNotice(read) {
179
- return read.reason === 'server-hash-mismatch'
180
- ? 'The server guide’s body does not match its hash; using the guide bundled with this CLI.'
181
- : null;
174
+ if (read.reason === 'server-guide-not-found') {
175
+ return 'This guide is unavailable on the server. Reading the copy bundled with this CLI.';
176
+ }
177
+ if (read.reason === 'server-hash-mismatch') {
178
+ return 'The server guide’s body does not match its hash; using the guide bundled with this CLI.';
179
+ }
180
+ return null;
182
181
  }
183
182
  /** A miss is steering, not a crash: print it with its nearest addresses and exit 1. */
184
183
  function writeAgentGuideMiss(command, miss, json) {
@@ -1,30 +1,82 @@
1
- import type { AgentRunEventPage, AgentRunHistoryPage, AgentRunStopReceipt, AgentRunSummary, AgentRunTranscriptPage } from '@skrr-ai/data-provider';
1
+ import type { AgentRunBusinessResult, AgentRunEventPage, AgentRunHistoryPage, AgentRunHumanInput, AgentRunStopReceipt, AgentRunSummary, AgentRunTranscriptPage, PrivateReleaseEvalHistoryPage } from '@skrr-ai/data-provider';
2
2
  export declare function canonicalRunId(value: unknown): string | undefined;
3
3
  export declare const runIdArgument: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
4
4
  export declare function exactAttemptId(input: string): string;
5
5
  export declare const attemptIdFlag: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
6
- export declare function listAgentRuns({ agentId, conversationId, source, from, to, status, cursor, limit, }: {
6
+ export declare function runReadScopeArgs(workspaceId?: string): string[];
7
+ export declare class RunListCursorInvalidError extends Error {
8
+ readonly workspaceId: string | undefined;
9
+ constructor(workspaceId: string | undefined, cause: unknown);
10
+ }
11
+ export declare function listAgentRuns({ agentId, conversationId, goalId, source, evaluationId, from, to, status, cursor, limit, personal, }: {
7
12
  agentId?: string;
8
13
  conversationId?: string;
14
+ goalId?: string;
9
15
  source?: string;
16
+ evaluationId?: string;
10
17
  from?: string;
11
18
  to?: string;
12
19
  status?: string;
13
20
  cursor?: string;
14
21
  limit?: number;
15
- }): Promise<AgentRunHistoryPage>;
16
- export declare function readAgentRun(runId: string): Promise<AgentRunSummary & {
22
+ personal?: boolean;
23
+ }): Promise<{
24
+ page: AgentRunHistoryPage;
25
+ workspaceId?: string;
26
+ }>;
27
+ export declare function listPrivateReleaseEvalHistory({ agentId, releaseId, limit, cursor, }: {
28
+ agentId: string;
29
+ releaseId?: string;
30
+ limit?: number;
31
+ cursor?: string;
32
+ }): Promise<PrivateReleaseEvalHistoryPage>;
33
+ type ChatCopyOrigin = {
34
+ kind: 'fork' | 'handover';
35
+ runId: string;
36
+ attemptId: string;
37
+ workspaceId?: string;
38
+ };
39
+ export type AgentRunDetail = AgentRunSummary & {
40
+ status?: string;
41
+ delivery?: 'silent' | 'accepted' | 'delivered' | 'failed' | 'pending' | 'unconfirmed';
42
+ businessResult?: AgentRunBusinessResult;
43
+ humanInput?: AgentRunHumanInput;
44
+ derivedFrom?: ChatCopyOrigin;
45
+ };
46
+ export declare function chatCopyOrigin(run: AgentRunDetail): ChatCopyOrigin | undefined;
47
+ export declare function readAgentRun(runId: string, { personal }?: {
48
+ personal?: boolean | undefined;
49
+ }): Promise<AgentRunDetail & {
17
50
  snapshot?: AgentRunEventPage['snapshot'];
51
+ snapshotAvailability?: 'unavailable';
18
52
  }>;
53
+ export declare class RunEventCursorStaleError extends Error {
54
+ readonly workspaceId: string | undefined;
55
+ constructor(workspaceId: string | undefined, cause: unknown);
56
+ }
19
57
  export declare function readAgentRunEvents(runId: string, options?: {
58
+ attempt?: string;
20
59
  cursor?: string;
21
60
  limit?: number;
22
- }): Promise<AgentRunEventPage>;
23
- export declare function readAgentRunTranscript(runId: string, { attempt, offset, limit }: {
61
+ personal?: boolean;
62
+ }): Promise<{
63
+ page: AgentRunEventPage;
64
+ workspaceId?: string;
65
+ }>;
66
+ export declare class RunTranscriptCursorInvalidError extends Error {
67
+ readonly workspaceId: string | undefined;
68
+ constructor(workspaceId: string | undefined, cause: unknown);
69
+ }
70
+ export declare function readAgentRunTranscript(runId: string, { attempt, offset, after, limit, personal }: {
24
71
  attempt: string;
25
72
  offset?: number;
73
+ after?: string;
26
74
  limit?: number;
27
- }): Promise<AgentRunTranscriptPage>;
75
+ personal?: boolean;
76
+ }): Promise<{
77
+ page: AgentRunTranscriptPage;
78
+ workspaceId?: string;
79
+ }>;
28
80
  type StopRunResult = {
29
81
  kind: 'receipt';
30
82
  receipt: AgentRunStopReceipt;
@@ -35,7 +87,15 @@ type StopRunResult = {
35
87
  };
36
88
  export declare class RunStopUnconfirmedError extends Error {
37
89
  readonly expectedAttemptId: string | null;
38
- constructor(expectedAttemptId: string | null, cause?: unknown);
90
+ readonly workspaceId: string | undefined;
91
+ constructor(expectedAttemptId: string | null, workspaceId: string | undefined, cause?: unknown);
92
+ }
93
+ export declare class RunStopConflictError extends Error {
94
+ readonly expectedAttemptId: string | null;
95
+ readonly workspaceId: string | undefined;
96
+ constructor(expectedAttemptId: string | null, workspaceId: string | undefined, cause: unknown);
39
97
  }
40
- export declare function stopAgentRun(runId: string, expectedAttemptId?: string | null): Promise<StopRunResult>;
98
+ export declare function stopAgentRun(runId: string, expectedAttemptId?: string | null, { personal }?: {
99
+ personal?: boolean | undefined;
100
+ }): Promise<StopRunResult>;
41
101
  export {};