@ordewell/core 0.10.9 → 0.10.10

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 (40) hide show
  1. package/dist/{IFileSystem-C9W5mRYA.d.mts → IFileSystem-1PqRCjhu.d.mts} +21 -3
  2. package/dist/{IFileSystem-B8qRNC_6.d.ts → IFileSystem-lTRL_G9Z.d.ts} +21 -3
  3. package/dist/{ModeResolver-C1PN5FYG.d.mts → ModeResolver-6TQXVsde.d.mts} +1 -1
  4. package/dist/{ModeResolver-CaPnoU8N.d.ts → ModeResolver-CoJAJD-f.d.ts} +1 -1
  5. package/dist/{Task-hFfRS9rN.d.mts → Task-CfBM0wkV.d.mts} +94 -21
  6. package/dist/{Task-hFfRS9rN.d.ts → Task-CfBM0wkV.d.ts} +94 -21
  7. package/dist/{chunk-H7QX32BH.mjs → chunk-24EL4Z2W.mjs} +2 -2
  8. package/dist/{chunk-O6LQU3W6.mjs → chunk-ESKK5I4F.mjs} +138 -21
  9. package/dist/chunk-ESKK5I4F.mjs.map +1 -0
  10. package/dist/{chunk-LTHKFBKM.mjs → chunk-KWS3VEER.mjs} +3 -3
  11. package/dist/{chunk-EEE2GBLG.mjs → chunk-PFH7WFIB.mjs} +1 -1
  12. package/dist/chunk-PFH7WFIB.mjs.map +1 -0
  13. package/dist/index.d.mts +119 -17
  14. package/dist/index.d.ts +119 -17
  15. package/dist/index.js +521 -88
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +397 -72
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/parsing.d.mts +2 -2
  20. package/dist/parsing.d.ts +2 -2
  21. package/dist/parsing.js.map +1 -1
  22. package/dist/parsing.mjs +3 -3
  23. package/dist/plan-utils.d.mts +4 -4
  24. package/dist/plan-utils.d.ts +4 -4
  25. package/dist/plan-utils.js +144 -18
  26. package/dist/plan-utils.js.map +1 -1
  27. package/dist/plan-utils.mjs +22 -4
  28. package/dist/{runSettingsText-rLoYQlUH.d.mts → runSettingsText-C1i9wBG1.d.mts} +26 -15
  29. package/dist/{runSettingsText-CGKX3aeV.d.ts → runSettingsText-CWNrmF5U.d.ts} +26 -15
  30. package/dist/testing.d.mts +7 -2
  31. package/dist/testing.d.ts +7 -2
  32. package/dist/testing.js +11 -0
  33. package/dist/testing.js.map +1 -1
  34. package/dist/testing.mjs +12 -1
  35. package/dist/testing.mjs.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-EEE2GBLG.mjs.map +0 -1
  38. package/dist/chunk-O6LQU3W6.mjs.map +0 -1
  39. /package/dist/{chunk-H7QX32BH.mjs.map → chunk-24EL4Z2W.mjs.map} +0 -0
  40. /package/dist/{chunk-LTHKFBKM.mjs.map → chunk-KWS3VEER.mjs.map} +0 -0
@@ -24,6 +24,9 @@ import {
24
24
  canMergeTasks,
25
25
  canSplitTask,
26
26
  capConflictFiles,
27
+ contextMeterText,
28
+ contextMeterTitle,
29
+ costText,
27
30
  countedSessionCost,
28
31
  dependentsNotice,
29
32
  diffRows,
@@ -33,6 +36,8 @@ import {
33
36
  endAttemptUsage,
34
37
  followTaskLog,
35
38
  followTurn,
39
+ formatCost,
40
+ formatTokenCount,
36
41
  fromTranscript,
37
42
  hasHiddenDetail,
38
43
  holdPrompt,
@@ -42,6 +47,7 @@ import {
42
47
  markRequestFor,
43
48
  markdownHtml,
44
49
  markdownTokens,
50
+ modelCostTitle,
45
51
  namedRepos,
46
52
  newTaskFields,
47
53
  opsEditable,
@@ -63,6 +69,7 @@ import {
63
69
  skippedLabel,
64
70
  startAttemptUsage,
65
71
  stopTurn,
72
+ subagentCostTitle,
66
73
  summarizeToolCall,
67
74
  takeAt,
68
75
  taskRowActions,
@@ -70,16 +77,18 @@ import {
70
77
  taskStartedNotice,
71
78
  taskStatusKind,
72
79
  taskUsageSummary,
80
+ tasksTotalText,
73
81
  titledRefs,
74
82
  toolHeadline,
75
83
  truncateCheckpointSummary,
76
84
  unsendAll,
77
85
  unsendLatest,
78
- usageLine
79
- } from "./chunk-O6LQU3W6.mjs";
86
+ usageLine,
87
+ usageText
88
+ } from "./chunk-ESKK5I4F.mjs";
80
89
  import {
81
90
  clampThinkingEffort
82
- } from "./chunk-H7QX32BH.mjs";
91
+ } from "./chunk-24EL4Z2W.mjs";
83
92
  import {
84
93
  DEFAULT_RUNNERS,
85
94
  canSetDependencies,
@@ -98,7 +107,7 @@ import {
98
107
  titledTaskRef,
99
108
  titledTaskRefOf,
100
109
  walkPlan
101
- } from "./chunk-EEE2GBLG.mjs";
110
+ } from "./chunk-PFH7WFIB.mjs";
102
111
  export {
103
112
  CHECKPOINT_TRUNCATE_LENGTH,
104
113
  DEFAULT_RUNNERS,
@@ -128,6 +137,9 @@ export {
128
137
  canSplitTask,
129
138
  capConflictFiles,
130
139
  clampThinkingEffort,
140
+ contextMeterText,
141
+ contextMeterTitle,
142
+ costText,
131
143
  countedSessionCost,
132
144
  dependencyCandidates,
133
145
  dependentsNotice,
@@ -139,6 +151,8 @@ export {
139
151
  endAttemptUsage,
140
152
  followTaskLog,
141
153
  followTurn,
154
+ formatCost,
155
+ formatTokenCount,
142
156
  fromTranscript,
143
157
  hasHiddenDetail,
144
158
  holdPrompt,
@@ -149,6 +163,7 @@ export {
149
163
  markRequestFor,
150
164
  markdownHtml,
151
165
  markdownTokens,
166
+ modelCostTitle,
152
167
  namedRepos,
153
168
  newTaskFields,
154
169
  opsEditable,
@@ -174,6 +189,7 @@ export {
174
189
  skippedLabel,
175
190
  startAttemptUsage,
176
191
  stopTurn,
192
+ subagentCostTitle,
177
193
  subtreeIds,
178
194
  summarizeToolCall,
179
195
  takeAt,
@@ -186,6 +202,7 @@ export {
186
202
  taskStartedNotice,
187
203
  taskStatusKind,
188
204
  taskUsageSummary,
205
+ tasksTotalText,
189
206
  titledRefs,
190
207
  titledTaskRef,
191
208
  titledTaskRefOf,
@@ -194,6 +211,7 @@ export {
194
211
  unsendAll,
195
212
  unsendLatest,
196
213
  usageLine,
214
+ usageText,
197
215
  walkPlan
198
216
  };
199
217
  //# sourceMappingURL=plan-utils.mjs.map
@@ -1,6 +1,6 @@
1
- import { ai as Task, a4 as RunnerId, aq as TaskSnapshot, b as AwaitingReason, av as UsageRecord, a5 as RunnerSessionCost, d as DiscoveredModel, af as SkillsService, aa as SkillInfo, Z as RepoGroupLayout, I as IWorktreeIsolation, w as IsolationRun, k as IsolationHandoff, J as PlanIsolation, x as IsolationTaskRecord, al as TaskIsolation, H as IsolationView, S as PrepareIntent, V as PreviousWork, s as IsolationOutcome, X as RepairEvidence, at as TreeSnapshot, aj as TaskDiffRead, ak as TaskDiffResult, r as IsolationMergeResult, ax as Verdict, ap as TaskSkillSnapshot, ao as TaskSkillNotice, ag as SubagentOutcome, L as LegacyPlanState, C as ConversationMessage, ac as SkillLoadNotice, P as PendingPlanTurn, a as AttemptUsage, a3 as RunSettings, O as PlanUsage, Y as ReplyRun, M as ModelUsage, aw as UsageTotals, f as ExecutionRecord, a0 as ResearchStep, K as PlanState, $ as ResearchProgress, _ as ResearchLogEntry, ab as SkillLoad, N as PlanStatus, ah as SupervisorLevel, a1 as ResearchStepOutcome, R as PlannerUsage, am as TaskIsolationState, as as TaskUsageSummary } from './Task-hFfRS9rN.mjs';
2
- import { N as IRunnerSession, K as IConfig, aL as TaskMessageFrom, ax as RunnerModelRef, ap as RunnerCommand, au as RunnerMcpServer, aE as StructuredTurnEnd, j as ApprovalDecision, aD as StructuredEvent, ah as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource, M as IRunner, ay as RunnerRegistry, J as IApproval, aU as ToolOutcome, d as AgentProcessDeps, a as AgentAdapter, a4 as OrdewellMcpServer, L as IFileSystem, aV as UsageLimitSignal, ac as PlannerToolHandler, p as ApprovalRequest, i as ApprovalAnswer, f as AiProvider, a3 as OrchestratorOption, a9 as PlannerBackendId } from './IFileSystem-C9W5mRYA.mjs';
3
- import { R as RunnerModeInfo } from './ModeResolver-C1PN5FYG.mjs';
1
+ import { am as Task, a7 as RunnerId, au as TaskSnapshot, b as AwaitingReason, az as UsageRecord, a8 as RunnerSessionCost, f as DiscoveredModel, aj as SkillsService, ae as SkillInfo, $ as RepoGroupLayout, I as IWorktreeIsolation, y as IsolationRun, m as IsolationHandoff, N as PlanIsolation, z as IsolationTaskRecord, ap as TaskIsolation, K as IsolationView, U as PrepareIntent, X as PreviousWork, u as IsolationOutcome, Z as RepairEvidence, ax as TreeSnapshot, an as TaskDiffRead, ao as TaskDiffResult, t as IsolationMergeResult, aB as Verdict, at as TaskSkillSnapshot, as as TaskSkillNotice, ak as SubagentOutcome, L as LegacyPlanState, c as ConversationMessage, ag as SkillLoadNotice, P as PendingPlanTurn, a as AttemptUsage, a6 as RunSettings, R as PlanUsage, _ as ReplyRun, a9 as SessionBilling, M as ModelUsage, aA as UsageTotals, C as ContextFill, h as ExecutionRecord, a3 as ResearchStep, O as PlanState, a2 as ResearchProgress, a1 as ResearchLogEntry, af as SkillLoad, Q as PlanStatus, al as SupervisorLevel, a4 as ResearchStepOutcome, T as PlannerUsage, aq as TaskIsolationState, aw as TaskUsageSummary } from './Task-CfBM0wkV.mjs';
2
+ import { N as IRunnerSession, K as IConfig, aL as TaskMessageFrom, ax as RunnerModelRef, ap as RunnerCommand, au as RunnerMcpServer, aE as StructuredTurnEnd, j as ApprovalDecision, aD as StructuredEvent, ah as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource, M as IRunner, ay as RunnerRegistry, J as IApproval, aU as ToolOutcome, d as AgentProcessDeps, a as AgentAdapter, a4 as OrdewellMcpServer, L as IFileSystem, aV as UsageLimitSignal, ac as PlannerToolHandler, p as ApprovalRequest, i as ApprovalAnswer, f as AiProvider, a3 as OrchestratorOption, a9 as PlannerBackendId } from './IFileSystem-1PqRCjhu.mjs';
3
+ import { R as RunnerModeInfo } from './ModeResolver-6TQXVsde.mjs';
4
4
 
5
5
  type NotificationAction = {
6
6
  label: string;
@@ -1426,21 +1426,19 @@ type SessionMessage =
1426
1426
  /**
1427
1427
  * The planner's running usage for the session, subagents included, emitted
1428
1428
  * after a model call reports usage. `totals` already contains every
1429
- * `bySubagent` entry. `contextFill` is the last planner prompt against the
1430
- * model's window, omitted when the window is unknown. Cost appears only as
1431
- * reported by a provider or runner (see `UsageRecord`).
1429
+ * `bySubagent` entry. `contextFill` is the context the main model's last
1430
+ * call left, with its window when known; omitted before a call was measured.
1431
+ * Cost appears only as reported by a provider or runner (see `UsageRecord`).
1432
1432
  */
1433
1433
  | {
1434
1434
  type: 'planner_usage';
1435
+ sessionBilling?: SessionBilling;
1435
1436
  byModel?: ModelUsage[];
1436
1437
  model?: string;
1437
1438
  turnId?: string;
1438
1439
  totals: UsageTotals;
1439
1440
  bySubagent?: Record<string, UsageTotals>;
1440
- contextFill?: {
1441
- usedTokens: number;
1442
- windowTokens: number;
1443
- };
1441
+ contextFill?: ContextFill;
1444
1442
  }
1445
1443
  /**
1446
1444
  * A subagent began work on `brief`. Emitted by the planner backend that
@@ -1870,6 +1868,10 @@ declare class TaskOrchestrator {
1870
1868
  private store;
1871
1869
  private output;
1872
1870
  private attempts;
1871
+ /** Bumped by every plan load: an ended attempt's wind-down belongs to the scope before it. */
1872
+ private planScope;
1873
+ /** Each task's runners still winding down once stopped: a continue waits for them (ADR-0018, L1). */
1874
+ private windDowns;
1873
1875
  private verifier;
1874
1876
  /** Changed only by start, stop, a plan load, a usage-limit pause, a move off the limit, and {@link settleRun}. */
1875
1877
  private runState;
@@ -2507,6 +2509,18 @@ declare class TaskOrchestrator {
2507
2509
  * load reset the whole verifier themselves.
2508
2510
  */
2509
2511
  private endAttempt;
2512
+ /**
2513
+ * Let the attempt's runner go the way it ends a turn (ADR-0018, L1): it
2514
+ * winds down on its own time, bounded by its interrupt grace, and nothing
2515
+ * here waits on it but a continue of the same task.
2516
+ */
2517
+ private stopRunner;
2518
+ /**
2519
+ * An ended attempt's runner is gone: the count its session ended on is the
2520
+ * one a continue of that session counts from. One still current is ended
2521
+ * with that count instead.
2522
+ */
2523
+ private woundDown;
2510
2524
  /** Kept on the task once the attempt ends, so a continue can resume it after a reload (ADR-0018, K1). */
2511
2525
  private saveNativeSession;
2512
2526
  private endAllAttempts;
@@ -4544,17 +4558,14 @@ interface RunnerLoadedBlock {
4544
4558
  commands: readonly RunnerCommand[];
4545
4559
  mcpServers: readonly RunnerMcpServer[];
4546
4560
  }
4547
- /** The token line. There is at most one, and it is always the last block. */
4561
+ /** The usage line (context and cost). Token counts ride in `totals` but are not drawn. There is at most one, and it is always the last block. */
4548
4562
  interface UsageBlock {
4549
4563
  byModel?: ModelUsage[];
4550
4564
  model?: string;
4551
4565
  type: 'usage';
4552
4566
  id: string;
4553
4567
  totals: UsageTotals;
4554
- contextFill?: {
4555
- usedTokens: number;
4556
- windowTokens: number;
4557
- };
4568
+ contextFill?: ContextFill;
4558
4569
  bySubagent?: Record<string, UsageTotals>;
4559
4570
  }
4560
4571
 
@@ -1,6 +1,6 @@
1
- import { ai as Task, a4 as RunnerId, aq as TaskSnapshot, b as AwaitingReason, av as UsageRecord, a5 as RunnerSessionCost, d as DiscoveredModel, af as SkillsService, aa as SkillInfo, Z as RepoGroupLayout, I as IWorktreeIsolation, w as IsolationRun, k as IsolationHandoff, J as PlanIsolation, x as IsolationTaskRecord, al as TaskIsolation, H as IsolationView, S as PrepareIntent, V as PreviousWork, s as IsolationOutcome, X as RepairEvidence, at as TreeSnapshot, aj as TaskDiffRead, ak as TaskDiffResult, r as IsolationMergeResult, ax as Verdict, ap as TaskSkillSnapshot, ao as TaskSkillNotice, ag as SubagentOutcome, L as LegacyPlanState, C as ConversationMessage, ac as SkillLoadNotice, P as PendingPlanTurn, a as AttemptUsage, a3 as RunSettings, O as PlanUsage, Y as ReplyRun, M as ModelUsage, aw as UsageTotals, f as ExecutionRecord, a0 as ResearchStep, K as PlanState, $ as ResearchProgress, _ as ResearchLogEntry, ab as SkillLoad, N as PlanStatus, ah as SupervisorLevel, a1 as ResearchStepOutcome, R as PlannerUsage, am as TaskIsolationState, as as TaskUsageSummary } from './Task-hFfRS9rN.js';
2
- import { N as IRunnerSession, K as IConfig, aL as TaskMessageFrom, ax as RunnerModelRef, ap as RunnerCommand, au as RunnerMcpServer, aE as StructuredTurnEnd, j as ApprovalDecision, aD as StructuredEvent, ah as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource, M as IRunner, ay as RunnerRegistry, J as IApproval, aU as ToolOutcome, d as AgentProcessDeps, a as AgentAdapter, a4 as OrdewellMcpServer, L as IFileSystem, aV as UsageLimitSignal, ac as PlannerToolHandler, p as ApprovalRequest, i as ApprovalAnswer, f as AiProvider, a3 as OrchestratorOption, a9 as PlannerBackendId } from './IFileSystem-B8qRNC_6.js';
3
- import { R as RunnerModeInfo } from './ModeResolver-CaPnoU8N.js';
1
+ import { am as Task, a7 as RunnerId, au as TaskSnapshot, b as AwaitingReason, az as UsageRecord, a8 as RunnerSessionCost, f as DiscoveredModel, aj as SkillsService, ae as SkillInfo, $ as RepoGroupLayout, I as IWorktreeIsolation, y as IsolationRun, m as IsolationHandoff, N as PlanIsolation, z as IsolationTaskRecord, ap as TaskIsolation, K as IsolationView, U as PrepareIntent, X as PreviousWork, u as IsolationOutcome, Z as RepairEvidence, ax as TreeSnapshot, an as TaskDiffRead, ao as TaskDiffResult, t as IsolationMergeResult, aB as Verdict, at as TaskSkillSnapshot, as as TaskSkillNotice, ak as SubagentOutcome, L as LegacyPlanState, c as ConversationMessage, ag as SkillLoadNotice, P as PendingPlanTurn, a as AttemptUsage, a6 as RunSettings, R as PlanUsage, _ as ReplyRun, a9 as SessionBilling, M as ModelUsage, aA as UsageTotals, C as ContextFill, h as ExecutionRecord, a3 as ResearchStep, O as PlanState, a2 as ResearchProgress, a1 as ResearchLogEntry, af as SkillLoad, Q as PlanStatus, al as SupervisorLevel, a4 as ResearchStepOutcome, T as PlannerUsage, aq as TaskIsolationState, aw as TaskUsageSummary } from './Task-CfBM0wkV.js';
2
+ import { N as IRunnerSession, K as IConfig, aL as TaskMessageFrom, ax as RunnerModelRef, ap as RunnerCommand, au as RunnerMcpServer, aE as StructuredTurnEnd, j as ApprovalDecision, aD as StructuredEvent, ah as QueuedTaskMessage, k as ApprovalKind, q as ApprovalSource, M as IRunner, ay as RunnerRegistry, J as IApproval, aU as ToolOutcome, d as AgentProcessDeps, a as AgentAdapter, a4 as OrdewellMcpServer, L as IFileSystem, aV as UsageLimitSignal, ac as PlannerToolHandler, p as ApprovalRequest, i as ApprovalAnswer, f as AiProvider, a3 as OrchestratorOption, a9 as PlannerBackendId } from './IFileSystem-lTRL_G9Z.js';
3
+ import { R as RunnerModeInfo } from './ModeResolver-CoJAJD-f.js';
4
4
 
5
5
  type NotificationAction = {
6
6
  label: string;
@@ -1426,21 +1426,19 @@ type SessionMessage =
1426
1426
  /**
1427
1427
  * The planner's running usage for the session, subagents included, emitted
1428
1428
  * after a model call reports usage. `totals` already contains every
1429
- * `bySubagent` entry. `contextFill` is the last planner prompt against the
1430
- * model's window, omitted when the window is unknown. Cost appears only as
1431
- * reported by a provider or runner (see `UsageRecord`).
1429
+ * `bySubagent` entry. `contextFill` is the context the main model's last
1430
+ * call left, with its window when known; omitted before a call was measured.
1431
+ * Cost appears only as reported by a provider or runner (see `UsageRecord`).
1432
1432
  */
1433
1433
  | {
1434
1434
  type: 'planner_usage';
1435
+ sessionBilling?: SessionBilling;
1435
1436
  byModel?: ModelUsage[];
1436
1437
  model?: string;
1437
1438
  turnId?: string;
1438
1439
  totals: UsageTotals;
1439
1440
  bySubagent?: Record<string, UsageTotals>;
1440
- contextFill?: {
1441
- usedTokens: number;
1442
- windowTokens: number;
1443
- };
1441
+ contextFill?: ContextFill;
1444
1442
  }
1445
1443
  /**
1446
1444
  * A subagent began work on `brief`. Emitted by the planner backend that
@@ -1870,6 +1868,10 @@ declare class TaskOrchestrator {
1870
1868
  private store;
1871
1869
  private output;
1872
1870
  private attempts;
1871
+ /** Bumped by every plan load: an ended attempt's wind-down belongs to the scope before it. */
1872
+ private planScope;
1873
+ /** Each task's runners still winding down once stopped: a continue waits for them (ADR-0018, L1). */
1874
+ private windDowns;
1873
1875
  private verifier;
1874
1876
  /** Changed only by start, stop, a plan load, a usage-limit pause, a move off the limit, and {@link settleRun}. */
1875
1877
  private runState;
@@ -2507,6 +2509,18 @@ declare class TaskOrchestrator {
2507
2509
  * load reset the whole verifier themselves.
2508
2510
  */
2509
2511
  private endAttempt;
2512
+ /**
2513
+ * Let the attempt's runner go the way it ends a turn (ADR-0018, L1): it
2514
+ * winds down on its own time, bounded by its interrupt grace, and nothing
2515
+ * here waits on it but a continue of the same task.
2516
+ */
2517
+ private stopRunner;
2518
+ /**
2519
+ * An ended attempt's runner is gone: the count its session ended on is the
2520
+ * one a continue of that session counts from. One still current is ended
2521
+ * with that count instead.
2522
+ */
2523
+ private woundDown;
2510
2524
  /** Kept on the task once the attempt ends, so a continue can resume it after a reload (ADR-0018, K1). */
2511
2525
  private saveNativeSession;
2512
2526
  private endAllAttempts;
@@ -4544,17 +4558,14 @@ interface RunnerLoadedBlock {
4544
4558
  commands: readonly RunnerCommand[];
4545
4559
  mcpServers: readonly RunnerMcpServer[];
4546
4560
  }
4547
- /** The token line. There is at most one, and it is always the last block. */
4561
+ /** The usage line (context and cost). Token counts ride in `totals` but are not drawn. There is at most one, and it is always the last block. */
4548
4562
  interface UsageBlock {
4549
4563
  byModel?: ModelUsage[];
4550
4564
  model?: string;
4551
4565
  type: 'usage';
4552
4566
  id: string;
4553
4567
  totals: UsageTotals;
4554
- contextFill?: {
4555
- usedTokens: number;
4556
- windowTokens: number;
4557
- };
4568
+ contextFill?: ContextFill;
4558
4569
  bySubagent?: Record<string, UsageTotals>;
4559
4570
  }
4560
4571
 
@@ -1,5 +1,5 @@
1
- import { N as IRunnerSession, ah as QueuedTaskMessage, aE as StructuredTurnEnd, aD as StructuredEvent, aJ as TaskCompleteArgs, r as CheckpointAnswer, aL as TaskMessageFrom, ap as RunnerCommand, O as InvokedCommand, j as ApprovalDecision, K as IConfig, L as IFileSystem } from './IFileSystem-C9W5mRYA.mjs';
2
- import { h as IntegrationDisposal, a5 as RunnerSessionCost, I as IWorktreeIsolation, j as IsolationAvailability, r as IsolationMergeResult, at as TreeSnapshot, a6 as SetupFailure, t as IsolationPruneResult, u as IsolationRemoval, s as IsolationOutcome, X as RepairEvidence, w as IsolationRun, ai as Task, T as PreparedTask, k as IsolationHandoff } from './Task-hFfRS9rN.mjs';
1
+ import { N as IRunnerSession, ah as QueuedTaskMessage, aE as StructuredTurnEnd, aD as StructuredEvent, aJ as TaskCompleteArgs, r as CheckpointAnswer, aL as TaskMessageFrom, ap as RunnerCommand, O as InvokedCommand, j as ApprovalDecision, K as IConfig, L as IFileSystem } from './IFileSystem-1PqRCjhu.mjs';
2
+ import { j as IntegrationDisposal, a8 as RunnerSessionCost, I as IWorktreeIsolation, l as IsolationAvailability, t as IsolationMergeResult, ax as TreeSnapshot, aa as SetupFailure, v as IsolationPruneResult, w as IsolationRemoval, u as IsolationOutcome, Z as RepairEvidence, y as IsolationRun, am as Task, V as PreparedTask, m as IsolationHandoff } from './Task-CfBM0wkV.mjs';
3
3
  import 'child_process';
4
4
  import 'zod/v4';
5
5
 
@@ -37,9 +37,14 @@ declare class FakeRunnerSession implements IRunnerSession {
37
37
  private completeCbs;
38
38
  private checkpointHandler;
39
39
  constructor(id?: string, taskId?: string, sessionId?: string | null);
40
+ /** `stop()` was asked for: the runner winds its turn down, still reporting, until {@link emitExit}. */
41
+ stopped: boolean;
42
+ private markGone;
43
+ private readonly gone;
40
44
  onOutput(cb: (text: string) => void): void;
41
45
  onExit(cb: (code: number) => void): void;
42
46
  kill(): void;
47
+ stop(): Promise<void>;
43
48
  getOutput(): string;
44
49
  emitOutput(text: string): void;
45
50
  emitExit(code: number): void;
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { N as IRunnerSession, ah as QueuedTaskMessage, aE as StructuredTurnEnd, aD as StructuredEvent, aJ as TaskCompleteArgs, r as CheckpointAnswer, aL as TaskMessageFrom, ap as RunnerCommand, O as InvokedCommand, j as ApprovalDecision, K as IConfig, L as IFileSystem } from './IFileSystem-B8qRNC_6.js';
2
- import { h as IntegrationDisposal, a5 as RunnerSessionCost, I as IWorktreeIsolation, j as IsolationAvailability, r as IsolationMergeResult, at as TreeSnapshot, a6 as SetupFailure, t as IsolationPruneResult, u as IsolationRemoval, s as IsolationOutcome, X as RepairEvidence, w as IsolationRun, ai as Task, T as PreparedTask, k as IsolationHandoff } from './Task-hFfRS9rN.js';
1
+ import { N as IRunnerSession, ah as QueuedTaskMessage, aE as StructuredTurnEnd, aD as StructuredEvent, aJ as TaskCompleteArgs, r as CheckpointAnswer, aL as TaskMessageFrom, ap as RunnerCommand, O as InvokedCommand, j as ApprovalDecision, K as IConfig, L as IFileSystem } from './IFileSystem-lTRL_G9Z.js';
2
+ import { j as IntegrationDisposal, a8 as RunnerSessionCost, I as IWorktreeIsolation, l as IsolationAvailability, t as IsolationMergeResult, ax as TreeSnapshot, aa as SetupFailure, v as IsolationPruneResult, w as IsolationRemoval, u as IsolationOutcome, Z as RepairEvidence, y as IsolationRun, am as Task, V as PreparedTask, m as IsolationHandoff } from './Task-CfBM0wkV.js';
3
3
  import 'child_process';
4
4
  import 'zod/v4';
5
5
 
@@ -37,9 +37,14 @@ declare class FakeRunnerSession implements IRunnerSession {
37
37
  private completeCbs;
38
38
  private checkpointHandler;
39
39
  constructor(id?: string, taskId?: string, sessionId?: string | null);
40
+ /** `stop()` was asked for: the runner winds its turn down, still reporting, until {@link emitExit}. */
41
+ stopped: boolean;
42
+ private markGone;
43
+ private readonly gone;
40
44
  onOutput(cb: (text: string) => void): void;
41
45
  onExit(cb: (code: number) => void): void;
42
46
  kill(): void;
47
+ stop(): Promise<void>;
43
48
  getOutput(): string;
44
49
  emitOutput(text: string): void;
45
50
  emitExit(code: number): void;
package/dist/testing.js CHANGED
@@ -154,6 +154,12 @@ var FakeRunnerSession = class {
154
154
  eventCbs = [];
155
155
  completeCbs = [];
156
156
  checkpointHandler = null;
157
+ /** `stop()` was asked for: the runner winds its turn down, still reporting, until {@link emitExit}. */
158
+ stopped = false;
159
+ markGone;
160
+ gone = new Promise((resolve) => {
161
+ this.markGone = resolve;
162
+ });
157
163
  onOutput(cb) {
158
164
  this.outputCbs.push(cb);
159
165
  }
@@ -163,6 +169,10 @@ var FakeRunnerSession = class {
163
169
  kill() {
164
170
  this.killed = true;
165
171
  }
172
+ stop() {
173
+ this.stopped = true;
174
+ return this.gone;
175
+ }
166
176
  getOutput() {
167
177
  return this.output;
168
178
  }
@@ -172,6 +182,7 @@ var FakeRunnerSession = class {
172
182
  }
173
183
  emitExit(code) {
174
184
  for (const cb of this.exitCbs) cb(code);
185
+ this.markGone();
175
186
  }
176
187
  write(text) {
177
188
  this.written.push(text);