@ordewell/core 0.10.9 → 0.10.11
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.
- package/dist/{IFileSystem-C9W5mRYA.d.mts → IFileSystem-1PqRCjhu.d.mts} +21 -3
- package/dist/{IFileSystem-B8qRNC_6.d.ts → IFileSystem-lTRL_G9Z.d.ts} +21 -3
- package/dist/{ModeResolver-C1PN5FYG.d.mts → ModeResolver-6TQXVsde.d.mts} +1 -1
- package/dist/{ModeResolver-CaPnoU8N.d.ts → ModeResolver-CoJAJD-f.d.ts} +1 -1
- package/dist/{Task-hFfRS9rN.d.mts → Task-CfBM0wkV.d.mts} +94 -21
- package/dist/{Task-hFfRS9rN.d.ts → Task-CfBM0wkV.d.ts} +94 -21
- package/dist/{chunk-H7QX32BH.mjs → chunk-24EL4Z2W.mjs} +2 -2
- package/dist/{chunk-O6LQU3W6.mjs → chunk-ESKK5I4F.mjs} +138 -21
- package/dist/chunk-ESKK5I4F.mjs.map +1 -0
- package/dist/{chunk-LTHKFBKM.mjs → chunk-KWS3VEER.mjs} +3 -3
- package/dist/{chunk-EEE2GBLG.mjs → chunk-PFH7WFIB.mjs} +1 -1
- package/dist/chunk-PFH7WFIB.mjs.map +1 -0
- package/dist/index.d.mts +129 -20
- package/dist/index.d.ts +129 -20
- package/dist/index.js +556 -92
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +432 -76
- package/dist/index.mjs.map +1 -1
- package/dist/parsing.d.mts +2 -2
- package/dist/parsing.d.ts +2 -2
- package/dist/parsing.js.map +1 -1
- package/dist/parsing.mjs +3 -3
- package/dist/plan-utils.d.mts +4 -4
- package/dist/plan-utils.d.ts +4 -4
- package/dist/plan-utils.js +144 -18
- package/dist/plan-utils.js.map +1 -1
- package/dist/plan-utils.mjs +22 -4
- package/dist/{runSettingsText-CGKX3aeV.d.ts → runSettingsText-C5uv2axI.d.ts} +29 -18
- package/dist/{runSettingsText-rLoYQlUH.d.mts → runSettingsText-Jb_efnI4.d.mts} +29 -18
- package/dist/testing.d.mts +12 -3
- package/dist/testing.d.ts +12 -3
- package/dist/testing.js +16 -1
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +17 -2
- package/dist/testing.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-EEE2GBLG.mjs.map +0 -1
- package/dist/chunk-O6LQU3W6.mjs.map +0 -1
- /package/dist/{chunk-H7QX32BH.mjs.map → chunk-24EL4Z2W.mjs.map} +0 -0
- /package/dist/{chunk-LTHKFBKM.mjs.map → chunk-KWS3VEER.mjs.map} +0 -0
package/dist/plan-utils.mjs
CHANGED
|
@@ -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
|
-
|
|
86
|
+
usageLine,
|
|
87
|
+
usageText
|
|
88
|
+
} from "./chunk-ESKK5I4F.mjs";
|
|
80
89
|
import {
|
|
81
90
|
clampThinkingEffort
|
|
82
|
-
} from "./chunk-
|
|
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-
|
|
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 {
|
|
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-
|
|
3
|
-
import { R as RunnerModeInfo } from './ModeResolver-
|
|
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;
|
|
@@ -1111,8 +1111,8 @@ type TaskLogEvent =
|
|
|
1111
1111
|
}
|
|
1112
1112
|
/**
|
|
1113
1113
|
* The runner's process ended. A call it had not reported back on is not
|
|
1114
|
-
* running any more: a
|
|
1115
|
-
*
|
|
1114
|
+
* running any more: a stopped runner can end with a call still open, a
|
|
1115
|
+
* killed turn or a process that exits before its last result.
|
|
1116
1116
|
*/
|
|
1117
1117
|
| {
|
|
1118
1118
|
type: 'runner_ended';
|
|
@@ -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
|
|
1430
|
-
*
|
|
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;
|
|
@@ -4020,7 +4034,7 @@ interface PlannerCommandSyntax {
|
|
|
4020
4034
|
setModel: string;
|
|
4021
4035
|
}
|
|
4022
4036
|
declare const TERMINAL_UI_COMMANDS: PlannerCommandSyntax;
|
|
4023
|
-
/** The VS Code chat shares the terminal's slash commands
|
|
4037
|
+
/** The VS Code chat shares the terminal's slash commands: its Planner panel and `/planner` own the model. */
|
|
4024
4038
|
declare const CHAT_COMMANDS: PlannerCommandSyntax;
|
|
4025
4039
|
declare const HEADLESS_CLI_COMMANDS: PlannerCommandSyntax;
|
|
4026
4040
|
declare function describePlannerNotReady(reason: PlannerNotReady, commands: PlannerCommandSyntax): string;
|
|
@@ -4544,17 +4558,14 @@ interface RunnerLoadedBlock {
|
|
|
4544
4558
|
commands: readonly RunnerCommand[];
|
|
4545
4559
|
mcpServers: readonly RunnerMcpServer[];
|
|
4546
4560
|
}
|
|
4547
|
-
/** The
|
|
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 {
|
|
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-
|
|
3
|
-
import { R as RunnerModeInfo } from './ModeResolver-
|
|
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;
|
|
@@ -1111,8 +1111,8 @@ type TaskLogEvent =
|
|
|
1111
1111
|
}
|
|
1112
1112
|
/**
|
|
1113
1113
|
* The runner's process ended. A call it had not reported back on is not
|
|
1114
|
-
* running any more: a
|
|
1115
|
-
*
|
|
1114
|
+
* running any more: a stopped runner can end with a call still open, a
|
|
1115
|
+
* killed turn or a process that exits before its last result.
|
|
1116
1116
|
*/
|
|
1117
1117
|
| {
|
|
1118
1118
|
type: 'runner_ended';
|
|
@@ -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
|
|
1430
|
-
*
|
|
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;
|
|
@@ -4020,7 +4034,7 @@ interface PlannerCommandSyntax {
|
|
|
4020
4034
|
setModel: string;
|
|
4021
4035
|
}
|
|
4022
4036
|
declare const TERMINAL_UI_COMMANDS: PlannerCommandSyntax;
|
|
4023
|
-
/** The VS Code chat shares the terminal's slash commands
|
|
4037
|
+
/** The VS Code chat shares the terminal's slash commands: its Planner panel and `/planner` own the model. */
|
|
4024
4038
|
declare const CHAT_COMMANDS: PlannerCommandSyntax;
|
|
4025
4039
|
declare const HEADLESS_CLI_COMMANDS: PlannerCommandSyntax;
|
|
4026
4040
|
declare function describePlannerNotReady(reason: PlannerNotReady, commands: PlannerCommandSyntax): string;
|
|
@@ -4544,17 +4558,14 @@ interface RunnerLoadedBlock {
|
|
|
4544
4558
|
commands: readonly RunnerCommand[];
|
|
4545
4559
|
mcpServers: readonly RunnerMcpServer[];
|
|
4546
4560
|
}
|
|
4547
|
-
/** The
|
|
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
|
|
package/dist/testing.d.mts
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-
|
|
2
|
-
import {
|
|
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;
|
|
@@ -48,7 +53,11 @@ declare class FakeRunnerSession implements IRunnerSession {
|
|
|
48
53
|
onTurnEnd(cb: (reason: StructuredTurnEnd) => void): void;
|
|
49
54
|
onEvent(cb: (event: StructuredEvent) => void): void;
|
|
50
55
|
onTaskComplete(cb: (report: TaskCompleteArgs) => void): void;
|
|
51
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The runner calls `task_complete`, as `StructuredSession` relays it. Here it
|
|
58
|
+
* is published at once; a test that needs the real session's turn-end
|
|
59
|
+
* ordering drives `StructuredSession` itself.
|
|
60
|
+
*/
|
|
52
61
|
reportComplete(report: TaskCompleteArgs): void;
|
|
53
62
|
onToolCheckpoint(handler: (question: string, signal: AbortSignal) => Promise<CheckpointAnswer>): void;
|
|
54
63
|
/** The runner calls `checkpoint`, as `StructuredSession` relays it; settles with the answer. */
|
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-
|
|
2
|
-
import {
|
|
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;
|
|
@@ -48,7 +53,11 @@ declare class FakeRunnerSession implements IRunnerSession {
|
|
|
48
53
|
onTurnEnd(cb: (reason: StructuredTurnEnd) => void): void;
|
|
49
54
|
onEvent(cb: (event: StructuredEvent) => void): void;
|
|
50
55
|
onTaskComplete(cb: (report: TaskCompleteArgs) => void): void;
|
|
51
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The runner calls `task_complete`, as `StructuredSession` relays it. Here it
|
|
58
|
+
* is published at once; a test that needs the real session's turn-end
|
|
59
|
+
* ordering drives `StructuredSession` itself.
|
|
60
|
+
*/
|
|
52
61
|
reportComplete(report: TaskCompleteArgs): void;
|
|
53
62
|
onToolCheckpoint(handler: (question: string, signal: AbortSignal) => Promise<CheckpointAnswer>): void;
|
|
54
63
|
/** The runner calls `checkpoint`, as `StructuredSession` relays it; settles with the answer. */
|
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);
|
|
@@ -190,7 +201,11 @@ var FakeRunnerSession = class {
|
|
|
190
201
|
onTaskComplete(cb) {
|
|
191
202
|
this.completeCbs.push(cb);
|
|
192
203
|
}
|
|
193
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* The runner calls `task_complete`, as `StructuredSession` relays it. Here it
|
|
206
|
+
* is published at once; a test that needs the real session's turn-end
|
|
207
|
+
* ordering drives `StructuredSession` itself.
|
|
208
|
+
*/
|
|
194
209
|
reportComplete(report) {
|
|
195
210
|
for (const cb of this.completeCbs) cb(report);
|
|
196
211
|
}
|