@ordewell/core 0.12.2 → 0.12.3

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 (44) hide show
  1. package/dist/{ModeResolver-CA2fUU9h.d.mts → ModeResolver-CkZnbIqs.d.mts} +1 -1
  2. package/dist/{ModeResolver-B64aUZXJ.d.ts → ModeResolver-DS-aCVOP.d.ts} +1 -1
  3. package/dist/{Task-CxGgN6I0.d.mts → Task-D3O49EUo.d.mts} +43 -6
  4. package/dist/{Task-CxGgN6I0.d.ts → Task-D3O49EUo.d.ts} +43 -6
  5. package/dist/{chunk-RZ23BMVR.mjs → chunk-3S5IVTZM.mjs} +80 -22
  6. package/dist/chunk-3S5IVTZM.mjs.map +1 -0
  7. package/dist/{chunk-FX33UKAD.mjs → chunk-IOYBL3E5.mjs} +3 -3
  8. package/dist/{chunk-UDUATSCJ.mjs → chunk-MJKCU4U7.mjs} +1 -1
  9. package/dist/{chunk-UDUATSCJ.mjs.map → chunk-MJKCU4U7.mjs.map} +1 -1
  10. package/dist/{chunk-PKJTN2PD.mjs → chunk-POD3KZQW.mjs} +7 -1
  11. package/dist/chunk-POD3KZQW.mjs.map +1 -0
  12. package/dist/{chunk-2IFKPYPO.mjs → chunk-YZDWWXCB.mjs} +58 -17
  13. package/dist/chunk-YZDWWXCB.mjs.map +1 -0
  14. package/dist/{eventStore-CTCSKS9E.d.ts → eventStore-BcoMsZtU.d.mts} +23 -7
  15. package/dist/{eventStore-CcB8yELZ.d.mts → eventStore-CSFKy48Y.d.ts} +23 -7
  16. package/dist/index.d.mts +248 -112
  17. package/dist/index.d.ts +248 -112
  18. package/dist/index.js +2576 -1104
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +2240 -866
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/parsing.d.mts +2 -2
  23. package/dist/parsing.d.ts +2 -2
  24. package/dist/parsing.js +43 -15
  25. package/dist/parsing.js.map +1 -1
  26. package/dist/parsing.mjs +3 -3
  27. package/dist/plan-utils.d.mts +4 -4
  28. package/dist/plan-utils.d.ts +4 -4
  29. package/dist/plan-utils.js +65 -14
  30. package/dist/plan-utils.js.map +1 -1
  31. package/dist/plan-utils.mjs +15 -3
  32. package/dist/plan-utils.mjs.map +1 -1
  33. package/dist/{runSettingsText-DFVpe6aU.d.mts → runSettingsText-C6eto6Uv.d.ts} +550 -26
  34. package/dist/{runSettingsText-lKLDsyli.d.ts → runSettingsText-DnzSrB0c.d.mts} +550 -26
  35. package/dist/testing.d.mts +2 -2
  36. package/dist/testing.d.ts +2 -2
  37. package/dist/testing.js.map +1 -1
  38. package/dist/testing.mjs +2 -2
  39. package/docker/task.Dockerfile +7 -4
  40. package/package.json +1 -1
  41. package/dist/chunk-2IFKPYPO.mjs.map +0 -1
  42. package/dist/chunk-PKJTN2PD.mjs.map +0 -1
  43. package/dist/chunk-RZ23BMVR.mjs.map +0 -1
  44. /package/dist/{chunk-FX33UKAD.mjs.map → chunk-IOYBL3E5.mjs.map} +0 -0
@@ -1,6 +1,7 @@
1
- import { b3 as RunnerId, bp as Task, p as DiscoveredModel, bl as StoredHandoff, bA as TaskSnapshot, b as AwaitingReason, bG as UsageRecord, b4 as RunnerSessionCost, J as HandoffCommit, bI as Verdict, aj as LegacyPlanState, bx as TaskReportTo, bz as TaskSkillSnapshot, by as TaskSkillNotice, bm as SubagentOutcome, c as BelowPlan, C as CheckWord, am as Mandate, aq as MandateRequest, ap as MandateRefusal, ad as IsolationTaskRef, a$ as RevertCommand, aa as IsolationRevertTask, h as ConversationMessage, bh as SkillLoadNotice, aw as PendingPlanTurn, K as HandoffDigest, a as AttemptUsage, bv as TaskLoop, bt as TaskIsolation, o as DelegatedRow, b2 as RunSettings, X as IsolationHandoff, aA as PlanUsage, a2 as IsolationMergeResult, aR as ReplyRun, ba as SessionBilling, ar as ModelUsage, bH as UsageTotals, g as ContextFill, aC as PlannerCompaction, s as ExecutionRecord, aY as ResearchStep, ay as PlanState, ab as IsolationRun, T as IWorktreeIsolation, aQ as RepairWait, ag as IsolationView, a9 as IsolationRevertResult, bB as TaskStatus, q as ExecutionActor, w as GuardTrip, at as NodeAuthority, v as GuardTarget, b7 as ScriptBody, r as ExecutionCommandName, aX as ResearchProgress, aW as ResearchLogEntry, bf as SkillInfo, bg as SkillLoad, bk as SkillsService, aE as PlannerContextPause, a0 as IsolationMergeBlock, _ as IsolationLandedTask, a4 as IsolationPreview, a_ as ResearchToolType, bo as SupervisorLevel, ak as LoopSubject, aZ as ResearchStepOutcome, aD as PlannerCompactionOutcome, aG as PlannerUsage, t as FindingSeverity, bC as TaskType, bn as SubtreeReport, av as PatchView, bu as TaskIsolationState, bD as TaskUsageSummary } from './Task-CxGgN6I0.js';
2
- import { q as ApprovalRequest, r as ApprovalSource, U as IApproval, bO as ToolOutcome, _ as IRunnerSession, a1 as IsolationRunController, V as IConfig, bR as UsageLimitSignal, bA as TaskMessageFrom, b4 as RunnerModelRef, aX as RunnerCommand, b1 as RunnerMcpServer, bs as StructuredTurnEnd, k as ApprovalDecision, bg as ScriptRun, bh as ScriptStatus, br as StructuredEvent, aj as NodePath, u as BoardDraft, v as BoardEntry, w as BoardPost, t as BoardAuthor, af as McpToolReply, J as EventStore, j as ApprovalAnswer, aK as QueuedTaskMessage, l as ApprovalKind, Y as INotification, Z as IRunner, b6 as RunnerRegistry, bo as SkillLookup, bJ as TaskShellSite, bI as TaskShell, K as ExecutionBackend, aR as ReservedLease, d as AgentProcessDeps, a as AgentAdapter, ar as OrdewellMcpServer, ap as OpenLease, W as IFileSystem, ay as PlannerModes, a0 as IsolatedExecution, aE as PlannerToolHandler, bG as TaskRunnerConfig, b0 as RunnerManifest, f as AiProvider, ax as PlannerBackendId, aq as OrchestratorOption, bl as SessionMeta } from './eventStore-CTCSKS9E.js';
3
- import { R as RunnerModeInfo } from './ModeResolver-B64aUZXJ.js';
1
+ import { b4 as RunnerId, bq as Task, p as DiscoveredModel, bm as StoredHandoff, bB as TaskSnapshot, b as AwaitingReason, bH as UsageRecord, b5 as RunnerSessionCost, J as HandoffCommit, bJ as Verdict, aj as LegacyPlanState, by as TaskReportTo, bA as TaskSkillSnapshot, bz as TaskSkillNotice, bn as SubagentOutcome, c as BelowPlan, C as CheckWord, am as Mandate, aq as MandateRequest, ap as MandateRefusal, ad as IsolationTaskRef, b0 as RevertCommand, aa as IsolationRevertTask, h as ConversationMessage, bi as SkillLoadNotice, aw as PendingPlanTurn, K as HandoffDigest, a as AttemptUsage, bw as TaskLoop, bu as TaskIsolation, o as DelegatedRow, b3 as RunSettings, X as IsolationHandoff, aA as PlanUsage, a2 as IsolationMergeResult, aS as ReplyRun, bb as SessionBilling, ar as ModelUsage, bI as UsageTotals, g as ContextFill, aC as PlannerCompaction, s as ExecutionRecord, aZ as ResearchStep, ay as PlanState, ab as IsolationRun, T as IWorktreeIsolation, aR as RepairWait, ag as IsolationView, a9 as IsolationRevertResult, bC as TaskStatus, q as ExecutionActor, w as GuardTrip, at as NodeAuthority, v as GuardTarget, b8 as ScriptBody, r as ExecutionCommandName, aF as PlannerNativeSession, aY as ResearchProgress, aX as ResearchLogEntry, bg as SkillInfo, bh as SkillLoad, bl as SkillsService, aE as PlannerContextPause, a0 as IsolationMergeBlock, _ as IsolationLandedTask, a4 as IsolationPreview, a$ as ResearchToolType, bp as SupervisorLevel, ak as LoopSubject, a_ as ResearchStepOutcome, aD as PlannerCompactionOutcome, aH as PlannerUsage, t as FindingSeverity, bD as TaskType, bo as SubtreeReport, av as PatchView, bv as TaskIsolationState, bE as TaskUsageSummary } from './Task-D3O49EUo.mjs';
2
+ import { q as ApprovalRequest, r as ApprovalSource, U as IApproval, bP as ToolOutcome, _ as IRunnerSession, a1 as IsolationRunController, V as IConfig, bS as UsageLimitSignal, bB as TaskMessageFrom, b5 as RunnerModelRef, aX as RunnerCommand, b2 as RunnerMcpServer, bt as StructuredTurnEnd, k as ApprovalDecision, bh as ScriptRun, bi as ScriptStatus, bs as StructuredEvent, aj as NodePath, u as BoardDraft, v as BoardEntry, w as BoardPost, t as BoardAuthor, af as McpToolReply, J as EventStore, j as ApprovalAnswer, aK as QueuedTaskMessage, l as ApprovalKind, Y as INotification, Z as IRunner, b7 as RunnerRegistry, bp as SkillLookup, bK as TaskShellSite, bJ as TaskShell, K as ExecutionBackend, aR as ReservedLease, d as AgentProcessDeps, a as AgentAdapter, ar as OrdewellMcpServer, ap as OpenLease, W as IFileSystem, ay as PlannerModes, a0 as IsolatedExecution, aE as PlannerToolHandler, bH as TaskRunnerConfig, b1 as RunnerManifest, S as Guarantee, b0 as RunnerLaunch, T as GuaranteeReport, f as AiProvider, ax as PlannerBackendId, aq as OrchestratorOption, bm as SessionMeta } from './eventStore-BcoMsZtU.mjs';
3
+ import { R as RunnerModeInfo } from './ModeResolver-CkZnbIqs.mjs';
4
+ import { ChildProcess } from 'child_process';
4
5
 
5
6
  /** What a planned task may be given: the runners it may run on and their modes. */
6
7
  interface IntakeCatalog {
@@ -408,7 +409,7 @@ interface LiveTail {
408
409
  interface TaskOutputSource {
409
410
  /** Start capturing a session; replaces any earlier capture of the task. */
410
411
  attach(taskId: string, session: IRunnerSession): void;
411
- /** Stop capturing the task's session; what was captured stays readable. */
412
+ /** Stop capturing the task's session; its answer and the end of its output stay readable. */
412
413
  detach(taskId: string): void;
413
414
  /** Drop every capture (a new plan reuses task ids). */
414
415
  reset(): void;
@@ -450,6 +451,8 @@ declare class PlanStore {
450
451
  private _onMutate;
451
452
  private _onTree;
452
453
  private _executionLog;
454
+ private _revision;
455
+ private _statusMark;
453
456
  /** Hook called after every structural mutation (add/remove/update/resetForRun). */
454
457
  set onMutate(cb: (() => void) | null);
455
458
  /**
@@ -471,6 +474,13 @@ declare class PlanStore {
471
474
  isFinished(): boolean;
472
475
  isFailed(id: string): boolean;
473
476
  get(taskId: string): Readonly<Task> | undefined;
477
+ /**
478
+ * Moves with every write to the plan, so a reader that walks it can tell
479
+ * whether its last walk still stands. Writers reach a task through
480
+ * {@link edit}, so a write cannot leave this behind.
481
+ */
482
+ get revision(): number;
483
+ private edit;
474
484
  /**
475
485
  * Whether a task runs as an ops task (ADR-0020): a top-level AI task marked
476
486
  * so, or a script task, which is one by nature (ADR-0035). A subtask runs
@@ -1155,6 +1165,8 @@ interface NodePlan {
1155
1165
  interface SubtreeSource {
1156
1166
  /** The node reading: what is below it is what this reads. */
1157
1167
  here: NodePath;
1168
+ /** The plan of `here`: its delegated tasks name the children that stand. */
1169
+ tasks(): readonly Task[];
1158
1170
  /** Every node ever opened below `here`, closed ones too: a reference outlives the child it names (ADR-0057 R1). */
1159
1171
  nodes(): readonly SubtreeNode[];
1160
1172
  /** What a node's session file holds of its plan, which is read only when asked for (ADR-0055 D17). */
@@ -1174,8 +1186,20 @@ declare class Subtree {
1174
1186
  reachedBy(readable: ReadonlySet<string>): Subtree;
1175
1187
  private nodes;
1176
1188
  private planOf;
1177
- /** Every plan below that has been saved, nearest first, each once: a Continue opens a new node for the same child and its one plan (ADR-0055 D17). */
1189
+ /**
1190
+ * Whether a node is of the tree as it stands: its delegated task names its
1191
+ * session, as does each task above it, up to `session` or to here. A discard
1192
+ * clears that name and leaves the node, for the references that outlive it
1193
+ * (ADR-0055 D15). A plan that cannot be read says nothing against a child.
1194
+ */
1195
+ private stands;
1196
+ /** Each session's plan once, from its latest node: a Continue opens a new node for the same child and its one plan (ADR-0055 D17). */
1197
+ private plansOf;
1198
+ private indexed;
1199
+ /** Every plan the tree stands on that has been saved, nearest first. */
1178
1200
  plans(): NodePlan[];
1201
+ /** The plans a report from `node` stood on, whether or not that child still stands: a reference to the report means what it meant (ADR-0057 R1). */
1202
+ plansFrom(node: NodePath): NodePlan[];
1179
1203
  /** The plan a pinned reference names, whichever of a child's nodes it was pinned against. */
1180
1204
  planAt(path: NodePath): NodePlan | undefined;
1181
1205
  /**
@@ -1240,7 +1264,7 @@ declare class NodeBoard {
1240
1264
  /** Whether a pinned file has moved past what its entry was written on. */
1241
1265
  private stale;
1242
1266
  private marked;
1243
- /** `read` of `board`, or of one entry by its reference. */
1267
+ /** `read` of `board`, of a later page of its map, or of one entry by its reference. Entries are only ever added, so a page that moves repeats one and loses none. */
1244
1268
  read(written: string): Promise<McpToolReply>;
1245
1269
  /** The pins a new descendant of this node is told (R10). */
1246
1270
  pins(): string[];
@@ -1338,7 +1362,6 @@ interface TreeLedgerOptions {
1338
1362
  */
1339
1363
  declare class TreeLedger {
1340
1364
  private readonly store;
1341
- private readonly tree;
1342
1365
  private readonly reserve;
1343
1366
  private readonly failed;
1344
1367
  /** Sessions holding an allowance, by node. */
@@ -1349,15 +1372,24 @@ declare class TreeLedger {
1349
1372
  private readonly raiseListeners;
1350
1373
  /** Why each stopped node did, which a raise clears (M5). */
1351
1374
  private readonly stopped;
1375
+ /** Open children by parent, oldest first. The tree only grows, by thousands over a run's life, and a usage record asks this. */
1376
+ private readonly openUnder;
1377
+ /** Every opening of a session, oldest first: a Continue opens a new node for the same child (ADR-0055 D17). */
1378
+ private readonly openings;
1379
+ /** Every child a parent's session opened for a task, in any of its openings, oldest first, by {@link taskKey}. */
1380
+ private readonly forTask;
1352
1381
  private pending;
1353
1382
  private writing;
1354
1383
  private failureSaid;
1384
+ private readonly tree;
1355
1385
  private constructor();
1356
1386
  /** Rebuild from the log, and from nothing else (ADR-0058 S3). A log with no root gets one: this is the first carve of a tree. */
1357
1387
  static open(store: EventStore, root: {
1358
1388
  sessionId: string;
1359
1389
  limit: number;
1360
1390
  }, options?: TreeLedgerOptions): Promise<TreeLedger>;
1391
+ /** One fact on the tree and on what answers for walking it. */
1392
+ private apply;
1361
1393
  private write;
1362
1394
  /** What one step decides lands as one batch: the first await lets the step finish. */
1363
1395
  private flush;
@@ -1402,6 +1434,9 @@ declare class TreeLedger {
1402
1434
  spentOn(parent: NodePath, taskId: string): number;
1403
1435
  /** What raises gave every child `parent` opened for `taskId`: the tree granted it to the task, on top of its stated budget (ADR-0056 M5, M10). */
1404
1436
  raisedOn(parent: NodePath, taskId: string): number;
1437
+ /** What a task stating `stated` can still draw on `parent`: nothing while a child holds its limit in `committed`, else what the tree granted it less what it spent (ADR-0056 M5, M10). */
1438
+ stillAsks(parent: NodePath, taskId: string, stated: number): number;
1439
+ /** Under every opening of `parent`'s session: a Continue opens a new node for the same child, and what its tasks spent before stays spent (ADR-0055 D17, ADR-0056 M10). */
1405
1440
  private childrenFor;
1406
1441
  /** Close the children of `parent` that `gone` picks by their task: no session is live in them, so what they hold would stay committed for good. */
1407
1442
  closeChildren(parent: NodePath, gone: (taskId: string | undefined) => boolean): void;
@@ -2000,7 +2035,7 @@ type SurfaceTask<T extends Task = Task> = Omit<T, 'attemptSkills' | 'subtasks' |
2000
2035
  subtasks: SurfaceTask[];
2001
2036
  };
2002
2037
  /** A plan as the daemon and the VS Code webview are sent it: the session's own state, minus every skill body. */
2003
- type SurfacePlan = Omit<LegacyPlanState, 'tasks' | 'conversationHistory' | 'pendingTurns' | 'queuedMessages'> & {
2038
+ type SurfacePlan = Omit<LegacyPlanState, 'tasks' | 'conversationHistory' | 'pendingTurns' | 'queuedMessages' | 'plannerSession'> & {
2004
2039
  tasks: SurfaceTask[];
2005
2040
  conversationHistory?: SerializedConversationMessage[];
2006
2041
  pendingTurns?: SerializedPendingTurn[];
@@ -2218,7 +2253,12 @@ type SessionMessage =
2218
2253
  type: 'planner_detection';
2219
2254
  waiting: boolean;
2220
2255
  }
2221
- /** `escalations`: what waits on a person now (ADR-0053), whole; absent from an older daemon. */
2256
+ /**
2257
+ * `tasks` holds the tasks that moved, each whole, and a task left out is as
2258
+ * it was; `RunSnapshotFrame` gives a joining surface the rest. Now and then
2259
+ * it holds every task again. The run-wide fields are whole on every update.
2260
+ * `escalations`: what waits on a person now (ADR-0053); absent from an older daemon.
2261
+ */
2222
2262
  | {
2223
2263
  type: 'status_update';
2224
2264
  tasks: SerializedTaskStatus[];
@@ -2405,8 +2445,84 @@ type SessionBroadcaster = (msg: SessionMessage) => void;
2405
2445
  declare function serializeTask(t: SurfaceTask): SerializedTask;
2406
2446
  declare function serializeTaskStatus(t: Task, idleSince?: string | null, isolation?: TaskIsolation | null, queued?: readonly QueuedTaskMessage[], awaitingApproval?: number, mergeGate?: readonly string[], checkpoint?: string, waitsForApproval?: boolean, holdReason?: string | null, completionReceived?: Verdict['reported'] | null, attaching?: 1 | 2 | null, loopStranded?: boolean, delegation?: DelegatedRow | undefined): SerializedTaskStatus;
2407
2447
  /** The one place a plan's skill bodies come off before it leaves the session: every wire path that carries plan state goes through here. */
2408
- declare function surfacePlan({ queuedMessages: _carriedOverAtLoad, ...plan }: LegacyPlanState): SurfacePlan;
2448
+ declare function surfacePlan({ queuedMessages: _carriedOverAtLoad, plannerSession: _hint, ...plan }: LegacyPlanState): SurfacePlan;
2409
2449
  declare function surfacePlanState(state: PlanState): SurfacePlanState;
2450
+ /**
2451
+ * A plan below the root as a surface selects it (ADR-0055 D20). `sessionId`
2452
+ * holds still across a Continue, which opens a new `node` for the same child;
2453
+ * a fresh Retry is a new child with a new id.
2454
+ */
2455
+ interface ChildPlanEntry {
2456
+ sessionId: string;
2457
+ /** Its latest opening in the tree. */
2458
+ node: string;
2459
+ /** The plan above it: the root's id at depth 1. */
2460
+ parent: string;
2461
+ taskId?: string;
2462
+ title: string;
2463
+ depth: number;
2464
+ /** Its subplanner in a turn, parked between turns, or no longer there: an ended child only reads. */
2465
+ state: 'working' | 'parked' | 'ended';
2466
+ /** Why a message would be refused now, so a surface can say so before the person types one. */
2467
+ refused?: string;
2468
+ /** Its tasks waiting at a checkpoint now, so a surface can tell without opening it. */
2469
+ checkpoints?: string[];
2470
+ }
2471
+ /** A child plan as a surface opens it: a session's own load, as {@link ChildPlanEntry} places it. */
2472
+ interface ChildPlanView {
2473
+ child: ChildPlanEntry;
2474
+ goal?: string;
2475
+ /** Null while nothing of it has been saved yet. */
2476
+ plan: SurfacePlan | null;
2477
+ run: RunView;
2478
+ plannerTurnId?: string;
2479
+ plannerCompaction?: Extract<SessionMessage, {
2480
+ type: 'planner_compaction';
2481
+ }>;
2482
+ }
2483
+ /**
2484
+ * What became of a person's message to a subplanner: `woken` opened its turn
2485
+ * at once, and `queued` holds it for the turn in flight or for a slot. A
2486
+ * refusal is `view_only` once its attempt is over, or `refused` while what
2487
+ * stands over it (a Stop, its budget, a withdrawn grant) lets nothing start.
2488
+ */
2489
+ type ChildMessageOutcome = {
2490
+ ok: true;
2491
+ status: 'woken' | 'queued';
2492
+ } | {
2493
+ ok: false;
2494
+ code: 'view_only' | 'refused';
2495
+ message: string;
2496
+ };
2497
+ /**
2498
+ * What a person may ask of one task of a child plan (ADR-0055 D20). `question`
2499
+ * is the one they read, so an answer cannot land on a later one. There is no
2500
+ * raise and no force: those stay with the plan above and with the root's user.
2501
+ */
2502
+ type ChildTaskControl = {
2503
+ kind: 'message';
2504
+ text: string;
2505
+ } | {
2506
+ kind: 'checkpoint';
2507
+ answer: 'approve' | 'reject';
2508
+ question: string;
2509
+ reason?: string;
2510
+ };
2511
+ /**
2512
+ * What became of a {@link ChildTaskControl}: `id` is the message's, when it
2513
+ * reached a turn rather than resuming a paused task. A refusal adds to
2514
+ * {@link ChildMessageOutcome}'s `no_task` for a task this plan does not hold,
2515
+ * and `not_waiting` for a checkpoint that is not the one asked about.
2516
+ */
2517
+ type ChildControlOutcome = {
2518
+ ok: true;
2519
+ message: string;
2520
+ id?: string;
2521
+ } | {
2522
+ ok: false;
2523
+ code: 'view_only' | 'refused' | 'no_task' | 'not_waiting';
2524
+ message: string;
2525
+ };
2410
2526
  declare function serializePlan(plan: LegacyPlanState): SerializedPlan;
2411
2527
  /**
2412
2528
  * What a finished run did, task by task: `blocked` are those a failure kept
@@ -2739,6 +2855,8 @@ declare const STOPPED_BEFORE_START = "Not done: stopped before it could start. T
2739
2855
  interface OrchestratorObserver {
2740
2856
  /** Any task-shaped state changed (store mutation, checkpoint, retry, …). */
2741
2857
  onTaskChanged?(): void;
2858
+ /** A script attempt was claimed and its task is in progress, before anything of it has run (ADR-0035). */
2859
+ onScriptClaimed?(): void;
2742
2860
  /**
2743
2861
  * A run reached an outcome that stands until the user acts — completed,
2744
2862
  * failed, or awaiting the user — on its own, not as the answer to a call.
@@ -3077,6 +3195,14 @@ declare class TaskOrchestrator {
3077
3195
  private queuedStarts;
3078
3196
  /** Conflict repairs owed with every slot taken and no scheduler to claim them: a freed slot starts them. */
3079
3197
  private owedRepairs;
3198
+ /**
3199
+ * The delegated tasks a Continue from above owes their child (ADR-0055 D17):
3200
+ * Execute's fresh chance would discard each at its claim. Past a plan load,
3201
+ * which the run those claims belong to begins with; a Stop ends that run.
3202
+ */
3203
+ private owedReopens;
3204
+ /** The children a reopened run may not reach: each stays as it stands until someone decides (ADR-0055 D17). */
3205
+ private keptChildren;
3080
3206
  /**
3081
3207
  * The checks whose loop goes on with no scheduler: each failed a round in a
3082
3208
  * run the scheduler was not driving, so nothing else would start what it
@@ -3412,6 +3538,15 @@ declare class TaskOrchestrator {
3412
3538
  * `keepFailed`: failures nobody asked this run to try again (ADR-0030).
3413
3539
  */
3414
3540
  beginRun(origin: RunOrigin, keepFailed?: ReadonlySet<string>): Promise<void>;
3541
+ /**
3542
+ * A Continue from above reached this node (ADR-0055 D17): the run about to
3543
+ * begin is Execute's, but a Continue never discards a child, at any depth. So
3544
+ * each delegated task with a child to reopen is claimed as a continue when
3545
+ * the scheduler reaches it, its dependencies and approval as for any task,
3546
+ * and one whose child cannot be reopened is held rather than started fresh.
3547
+ * Answers what was held and why, for its subplanner to decide.
3548
+ */
3549
+ owesChildren(message: string): string[];
3415
3550
  /**
3416
3551
  * Take the plan into the run under way (#95), whose tasks were approved
3417
3552
  * first: a scheduled run starts them as their dependencies finish, and one
@@ -4713,9 +4848,9 @@ declare const OUTPUT_LINES_DEFAULT = 80;
4713
4848
  declare const OUTPUT_LINES_MAX = 400;
4714
4849
  /**
4715
4850
  * Character budget the rendered answer converges to. A running output tail is
4716
- * the only part with no natural bound — a runner may print for minutes — so
4717
- * the tail absorbs the clamp; everything else (task bodies, the catalog cap)
4718
- * is bounded upstream.
4851
+ * trimmed to what is left of it, and the tasks asked for stop where it runs out
4852
+ * ({@link readsInCap}); the catalog is bounded upstream. One task is the
4853
+ * exception: it is read whole, so a task with a long prompt can pass this.
4719
4854
  */
4720
4855
  declare const TASK_QUERY_ANSWER_MAX_CHARS = 20000;
4721
4856
  interface TaskQuery {
@@ -4822,6 +4957,14 @@ type CheckedChange = {
4822
4957
  type PassedChange = Extract<CheckedChange, {
4823
4958
  ok: true;
4824
4959
  }>;
4960
+ /** A node's budget as its ledger holds it (ADR-0056 M5): `limit` is where a raise, or a parent's turn taking room back, has moved it past the saved mandate. */
4961
+ interface NodeFunds {
4962
+ limit: number;
4963
+ /** What a carve can take now. */
4964
+ left: number;
4965
+ /** What a delegated task can still draw on this node: an open child's limit is already spoken for in `left`. */
4966
+ stillAsks(task: Pick<Task, 'id' | 'budget'>): number;
4967
+ }
4825
4968
  /** What a change is checked against, read as each check runs: a session's live state, or a one-shot planner's request. */
4826
4969
  interface PlanChangeScope {
4827
4970
  /** The plan's tasks as they stand. */
@@ -4836,11 +4979,13 @@ interface PlanChangeScope {
4836
4979
  * The node a change is made on, with what it holds now and how far below the
4837
4980
  * root it stands, read as each check runs (ADR-0056 M4). Absent or undefined,
4838
4981
  * nothing may delegate: a one-shot planner has no node, and a build that does
4839
- * not offer delegation reads no mandate for it.
4982
+ * not offer delegation reads no mandate for it. `budget` is absent while no
4983
+ * ledger is open: the mandate's limit is then all this node knows.
4840
4984
  */
4841
4985
  node?(): {
4842
4986
  mandate: Mandate;
4843
4987
  level: number;
4988
+ budget?: NodeFunds;
4844
4989
  } | undefined;
4845
4990
  /** Whether a script can run sealed here (ADR-0036 S6): a change that brings a read-only one waits on this, as an attached skill waits on its lookup. */
4846
4991
  canSeal?(): Promise<boolean>;
@@ -4893,11 +5038,13 @@ declare class PlanChangeCheck {
4893
5038
  private ungranted;
4894
5039
  /**
4895
5040
  * What a change leaves past this node's limits (ADR-0055 D2, D19): each
4896
- * delegated task it wrote narrowed as it is written (ADR-0056 M4), so a plan
4897
- * never holds what its carve would refuse, and a child held to what a child
4898
- * plan may be. Only what this change wrote: what stands in the plan is not
4899
- * this edit's to answer for. A root plan has no task limit, so a flat run
4900
- * does not change.
5041
+ * delegated task it wrote narrowed as it is written (ADR-0056 M4), the plan's
5042
+ * budgets together held to what a carve could give them (M5), and a child held
5043
+ * to what a child plan may be. Only what this change wrote or made bigger: what
5044
+ * stands in the plan is not this edit's to answer for, so a plan past its room
5045
+ * can still come down. Whatever passes here, the carve is what decides: spending
5046
+ * moves the room after a plan is accepted. A root plan has no task limit, so a
5047
+ * flat run does not change.
4901
5048
  */
4902
5049
  private pastMandate;
4903
5050
  private refused;
@@ -5054,6 +5201,8 @@ declare class CliAgentAiService implements IAiService {
5054
5201
  plannerToolsAttached(): boolean;
5055
5202
  /** The agent's own session id, a resumption hint only — Ordewell's transcript is authoritative (T4). */
5056
5203
  nativeSessionId(): string | null;
5204
+ /** What a later process needs to take this conversation's session up again, or null while it has none (ADR-0055 D17). */
5205
+ nativeSession(): PlannerNativeSession | null;
5057
5206
  /** The compactions the agents reported of their own context, never a subagent's or another thread's: their adapters drop those (ADR-0012 T10). */
5058
5207
  compactions(): number;
5059
5208
  promptCacheTtlMs(): number | undefined;
@@ -5061,6 +5210,13 @@ declare class CliAgentAiService implements IAiService {
5061
5210
  restart(): void;
5062
5211
  reset(): void;
5063
5212
  startConversation(req: ConversationRequest): Promise<ConversationTurn>;
5213
+ /**
5214
+ * Open a conversation in the session a process before this one left, and say
5215
+ * only what that session has not heard. Null when the runner would not take
5216
+ * it up, with `session` left to start afresh and replay the transcript: the
5217
+ * saved session is a hint, and Ordewell's transcript loses nothing (T4).
5218
+ */
5219
+ private takeUp;
5064
5220
  continueConversation(userMessage: string, onProgress: (progress: ResearchProgress) => void, signal?: AbortSignal): Promise<ConversationTurn>;
5065
5221
  private openingMessage;
5066
5222
  /**
@@ -5273,6 +5429,15 @@ interface ConversationRequest {
5273
5429
  * for them; the first call is the turn opened by `initialMessage`.
5274
5430
  */
5275
5431
  priorHistory?: ConversationMessage[];
5432
+ /**
5433
+ * A subplanner's saved native session, and what the transcript holds past it
5434
+ * (ADR-0055 D17). A backend that takes it up sends `since` where it would
5435
+ * replay `priorHistory`; any other, or one refused, replays `priorHistory`.
5436
+ */
5437
+ resume?: {
5438
+ session: PlannerNativeSession;
5439
+ since: ConversationMessage[];
5440
+ };
5276
5441
  /**
5277
5442
  * The user message that opens this turn. Defaults to `goal` — set it when
5278
5443
  * resuming so the system prompt keeps the original goal while the turn
@@ -5398,6 +5563,8 @@ interface IAiService {
5398
5563
  * unconditionally instead.
5399
5564
  */
5400
5565
  hasActiveConversation(): boolean;
5566
+ /** The native session of the latest conversation, its process gone or not; absent on a backend that has none (ADR-0055 D17). */
5567
+ nativeSession?(): PlannerNativeSession | null;
5401
5568
  /**
5402
5569
  * Optional: end the planner's live process but keep its own session id, so
5403
5570
  * the next turn starts a fresh one resumed from it (ADR-0009). What a
@@ -5779,7 +5946,11 @@ declare class ConversationBusyError extends ConversationEditError {
5779
5946
  * transcript.
5780
5947
  */
5781
5948
  declare class PlannerTurnDiscardedError extends Error {
5782
- constructor(options?: ErrorOptions);
5949
+ /** No turn had taken the input this answers, so the planner never read it. */
5950
+ readonly unread: boolean;
5951
+ constructor({ unread, ...options }?: ErrorOptions & {
5952
+ unread?: boolean;
5953
+ });
5783
5954
  }
5784
5955
  /**
5785
5956
  * A wake-up turn's backend ended without a reply — a dead agent, a usage
@@ -5842,6 +6013,8 @@ interface ReplyOptions {
5842
6013
  onCommit?: () => void;
5843
6014
  /** Wake-up digests delivered with this turn (ADR-0029), oldest first, ahead of the user's message if there is one. */
5844
6015
  wakeUps?: readonly string[];
6016
+ /** Which of `wakeUps` are asides read with the user's message, which the cap on run updates leaves alone. */
6017
+ asides?: readonly string[];
5845
6018
  /** Set when the turn is a wake-up's alone. */
5846
6019
  wakeUp?: WakeUpTurn;
5847
6020
  /** The user's message was force sent: the turn replaces the one it stopped (ADR-0023). */
@@ -6186,9 +6359,18 @@ declare class PlannerConversation {
6186
6359
  * Reopen the model context from the transcript — because the in-memory one
6187
6360
  * is gone (session reload, extension restart), or because it is stale
6188
6361
  * against the planner config now in effect. No LLM call happens for the
6189
- * replayed turns; the first call is the one the user's message opens.
6362
+ * replayed turns; the first call is the one the user's message opens. A
6363
+ * subplanner's saved native session goes with it, for the backend to take up
6364
+ * in place of the replay (ADR-0055 D17), unless the transcript has moved
6365
+ * behind what it holds.
6190
6366
  */
6191
6367
  private resume;
6368
+ /**
6369
+ * The process goes with the attempt and its session id with the process, so
6370
+ * what would take it up again is written as each turn ends, however it ended
6371
+ * (ADR-0055 D17). A root planner writes none: a new process replays (T4).
6372
+ */
6373
+ private keepNativeSession;
6192
6374
  /**
6193
6375
  * Answer every read the planner emits until it says something else.
6194
6376
  *
@@ -6619,6 +6801,12 @@ interface GlobalRunSettings {
6619
6801
  * delegation off. One value, so delegation is never on with no budget.
6620
6802
  */
6621
6803
  delegationTokens: number;
6804
+ /**
6805
+ * The last budget the user entered, kept while delegation is off so turning
6806
+ * it on again asks for nothing. 0 is none yet: the first enable takes a
6807
+ * number from the user, never a default. It never turns delegation on.
6808
+ */
6809
+ delegationBudget: number;
6622
6810
  }
6623
6811
  declare const RUN_SETTINGS_DEFAULTS: Readonly<GlobalRunSettings>;
6624
6812
  declare class RunSettingsError extends Error {
@@ -6645,6 +6833,7 @@ interface UserSettings {
6645
6833
  supervisorRetryLimit?: number;
6646
6834
  wakeUpReadBudget?: number;
6647
6835
  delegationTokens?: number;
6836
+ delegationBudget?: number;
6648
6837
  /**
6649
6838
  * Whether an API planner prunes its own context ahead of a call that would
6650
6839
  * pass 90% of its model's window. Absent means on. Set in the file only:
@@ -6660,8 +6849,8 @@ interface UserSettings {
6660
6849
  /**
6661
6850
  * Run tasks in containers (ADR-0059 L5), as `containerSettings` reads it:
6662
6851
  * absent means local worktrees. Kept as written, since one it cannot use must
6663
- * refuse a task, not fall back to the host. Set in the file only: no surface
6664
- * offers it.
6852
+ * refuse a task, not fall back to the host. Only a checkout's surfaces offer
6853
+ * it, through `changeContainers`.
6665
6854
  */
6666
6855
  containers?: unknown;
6667
6856
  }
@@ -6713,6 +6902,8 @@ declare class SettingsService {
6713
6902
  effort?: string;
6714
6903
  } | undefined): void;
6715
6904
  getEnabledRunners(): string[] | undefined;
6905
+ /** From what the file holds at this moment, as {@link updateEnabledRunners}; undefined takes it off the file. */
6906
+ updateContainers(change: (saved: unknown) => unknown): void;
6716
6907
  setEnabledRunners(ids: string[]): void;
6717
6908
  /**
6718
6909
  * Change the list from what the file holds at this moment: the change is
@@ -6745,7 +6936,7 @@ declare class SettingsService {
6745
6936
  setAutonomousMode(enabled: boolean): void;
6746
6937
  getRunSettings(): GlobalRunSettings;
6747
6938
  /** Checks every value before writing any, so a refused change saves nothing. */
6748
- updateRunSettings(changes: Partial<GlobalRunSettings>): GlobalRunSettings;
6939
+ updateRunSettings(given: Partial<GlobalRunSettings>): GlobalRunSettings;
6749
6940
  private load;
6750
6941
  /** Keep the bytes of a hand-edited file we cannot parse, and say so, instead of resetting it on the next save. */
6751
6942
  private moveAsideCorrupt;
@@ -6764,6 +6955,248 @@ declare class SettingsService {
6764
6955
  private persist;
6765
6956
  }
6766
6957
 
6958
+ /** One model API, as a gateway stands in front of it and a broker holds its key. */
6959
+ interface ModelApi {
6960
+ /** The variable that holds its key, and the one that names another address for it. */
6961
+ keyVariable: string;
6962
+ baseUrlVariable: string;
6963
+ upstream: string;
6964
+ /** Model traffic by method, and nothing else a key can do at this API. A route that reads what a key holds is out, however close its path sits to one that is in. */
6965
+ routes: Readonly<Record<'GET' | 'POST', RegExp>>;
6966
+ /** The header its key travels in; a runner's token comes the same way. */
6967
+ auth: 'x-api-key' | 'bearer';
6968
+ /** What a base URL of this API already ends in, so the path a runner asks under does not repeat it. */
6969
+ basePath: string;
6970
+ /** What a person is told it is. */
6971
+ name: string;
6972
+ /** Its runner reaches a model by this key and in no other way, so cloud credentials are no login for it. */
6973
+ keyOnly: boolean;
6974
+ /** What its runner uses over the key, by its documented precedence: beside one, a bearer the gateway drops or a cloud that never sees the gateway. */
6975
+ outranksKey: readonly string[];
6976
+ }
6977
+
6978
+ /**
6979
+ * Which login a container runs under, which a person chooses and nothing here
6980
+ * guesses: `broker`, API keys or cloud credentials from this host's environment,
6981
+ * or `own-sign-in`, the person's own sign-in to the unmodified binary, made
6982
+ * inside a container and kept in a volume Ordewell never reads (ADR-0059 L7).
6983
+ */
6984
+ type LeaseLogin = {
6985
+ kind: 'broker';
6986
+ variables: readonly string[];
6987
+ } | {
6988
+ kind: 'own-sign-in';
6989
+ };
6990
+ /** What a lease's login comes to. */
6991
+ interface IssuedLogin {
6992
+ /** The API key and where it goes, held on this host by the lease's gateway. */
6993
+ gated: {
6994
+ key: string;
6995
+ upstream: string;
6996
+ api: ModelApi;
6997
+ } | null;
6998
+ /** What no gateway can carry, for the runner by name, which it can read. */
6999
+ handed: Record<string, string>;
7000
+ }
7001
+ /**
7002
+ * Holds API keys and cloud-provider credentials for leases, and never a Claude
7003
+ * subscription's: Anthropic's terms forbid a product collecting, storing or
7004
+ * intermediating one (ADR-0059 L7). An API key stops at the gateway. What a cloud
7005
+ * provider's client signs with has to reach it, so a lease with one reports
7006
+ * `cred.unreadable` unproven. A login is one for a session's every runner, so a
7007
+ * key that serves another runner's API stays here: nothing gates it for this one,
7008
+ * and handing it over by name would put it in the clear.
7009
+ */
7010
+ declare class CredentialBroker {
7011
+ private readonly source;
7012
+ constructor(source: Record<string, string | undefined>);
7013
+ issue(variables: readonly string[], api?: ModelApi): IssuedLogin;
7014
+ /** That every variable is there and none undoes a key, for a surface that asks with no runner in mind: which of them serves which runner waits for {@link issue}. */
7015
+ check(variables: readonly string[]): void;
7016
+ private hold;
7017
+ }
7018
+
7019
+ /** Package caches a container keeps in the engine, by name, never by a host's path, and the variable that points a tool at one. */
7020
+ declare const CACHE_VARIABLES: {
7021
+ readonly npm: "npm_config_cache";
7022
+ readonly pip: "PIP_CACHE_DIR";
7023
+ readonly cargo: "CARGO_HOME";
7024
+ readonly go: "GOMODCACHE";
7025
+ };
7026
+ type CacheName = keyof typeof CACHE_VARIABLES;
7027
+ /** The `containers` setting, read. A checkout's surfaces set it (`changeContainers`); the settings file holds the rest. */
7028
+ interface ContainerSettings {
7029
+ /** The image the user built: Ordewell publishes none (ADR-0059 L5). */
7030
+ image: string;
7031
+ /** Docker's own words for the memory limit, which is also the limit on memory and swap together. */
7032
+ memory: string;
7033
+ memoryBytes: number;
7034
+ /** Which login it runs under, which a person chooses: it has no default. */
7035
+ login: LeaseLogin;
7036
+ caches: readonly CacheName[];
7037
+ /** The hosts a lease's sidecar opens: what `allow` names, or the registries of its caches. */
7038
+ allow: readonly string[];
7039
+ /** Guarantees an open fails without (L3). */
7040
+ required: readonly Guarantee[];
7041
+ }
7042
+
7043
+ /** How one `docker` command ended; `code` is -1 for a CLI that could not start. */
7044
+ interface DockerResult {
7045
+ code: number;
7046
+ stdout: string;
7047
+ stderr: string;
7048
+ /** Its stdout passed {@link DockerCall.stdoutTo}'s limit, and it was killed for it. */
7049
+ overflowed?: true;
7050
+ }
7051
+ interface DockerCall {
7052
+ input?: string | Buffer;
7053
+ /** Over this host's, for the CLI: what `-e NAME` hands over, so a secret never sits in an argument (ADR-0022 A5). */
7054
+ env?: Readonly<Record<string, string>>;
7055
+ timeoutMs?: number;
7056
+ /** Stdout to a file rather than to memory, for a bundle of any size up to `maxBytes`. */
7057
+ stdoutTo?: {
7058
+ file: string;
7059
+ maxBytes: number;
7060
+ };
7061
+ }
7062
+ /**
7063
+ * The Docker API through the docker CLI (ADR-0059 L5): one code path for any
7064
+ * local engine that speaks it. `inspectEngine` is what holds it to a local one.
7065
+ */
7066
+ interface DockerCli {
7067
+ call(args: readonly string[], opts?: DockerCall): Promise<DockerResult>;
7068
+ /** A command that runs for as long as a container does, with its stdio left open. */
7069
+ entry(args: readonly string[]): Promise<ChildProcess>;
7070
+ }
7071
+
7072
+ /** What a task's container holds for its runner to find. */
7073
+ interface PlacedRunner {
7074
+ /** The gateway's port on the container's loopback, under a key the gateway holds. */
7075
+ gatewayPort: number | null;
7076
+ signedIn: boolean;
7077
+ }
7078
+ /** A person's own sign-in for one runner, and how a task gets its copy of it: a runner never sees the volume (ADR-0059 L7). */
7079
+ interface ContainerSignIn {
7080
+ /** The kept volume, which a helper mounts read-only at `/login`. */
7081
+ volume: string;
7082
+ /** Where the runner talks to its service once it holds that sign-in. */
7083
+ hosts: readonly string[];
7084
+ /** The helper's command, which leaves the task's copy in its volume and exits 3 for a sign-in that is no use. */
7085
+ copy: readonly string[];
7086
+ /** A helper's command that says, with no network, whether the volume holds a sign-in: exit 0 for one, 1 for none. Absent, only {@link copy} says. */
7087
+ ask?: readonly string[];
7088
+ /** The copy, which the runner can read: a probe's proof that `cred.unreadable` does not hold. */
7089
+ path: string;
7090
+ env: Readonly<Record<string, string>>;
7091
+ }
7092
+ /** One runner a container has been proven with: all a lease knows of it. A protocol that needs this host's loopback or its own sandbox has not. */
7093
+ interface ContainerRunner {
7094
+ id: string;
7095
+ /** What the image has to hold. */
7096
+ binary: string;
7097
+ /** The model API its login is for: a key for any other stays on this host. */
7098
+ api: ModelApi;
7099
+ /** By provider id, the APIs it picks from a model's id and no gateway carries for it, so no broker login reaches them. */
7100
+ unbrokered?: Readonly<Record<string, ModelApi>>;
7101
+ signIn: ContainerSignIn;
7102
+ /** Its launch's arguments, for what it cannot be told by a variable. */
7103
+ args(launch: RunnerLaunch, placed: PlacedRunner): readonly string[];
7104
+ }
7105
+
7106
+ /** Why a container cannot be had yet, and what a person does about it. */
7107
+ interface ContainerProblem {
7108
+ code: string;
7109
+ message: string;
7110
+ remedy: string;
7111
+ }
7112
+ /** What the engine a lease would use said of itself. */
7113
+ interface EngineFacts {
7114
+ version: string;
7115
+ endpoint: string;
7116
+ /** What the engine has, which on a Mac is its VM's and not the Mac's. */
7117
+ memoryBytes: number;
7118
+ }
7119
+ interface PreflightDeps {
7120
+ cli: DockerCli;
7121
+ /** This host's, and a test's own. */
7122
+ platform?: NodeJS.Platform;
7123
+ }
7124
+ interface ReadinessDeps extends PreflightDeps {
7125
+ broker: CredentialBroker;
7126
+ /** False for a script, whose container holds no login at all. */
7127
+ agent?: boolean;
7128
+ /** Whose login is asked for. Absent, a surface's question, with no task in mind: a sign-in of any runner's, and every variable there. */
7129
+ runner?: ContainerRunner;
7130
+ setupCommand?: string;
7131
+ }
7132
+ /** Problems as one error for a person to read. */
7133
+ declare const describeProblems: (problems: readonly ContainerProblem[]) => string;
7134
+
7135
+ /** One change a surface can make: the rest of the setting stays in the file. */
7136
+ type ContainerChange = {
7137
+ on: boolean;
7138
+ } | {
7139
+ image: string;
7140
+ } | {
7141
+ login: unknown;
7142
+ };
7143
+ interface ContainerSettingStore {
7144
+ /** Handed what the file holds now; undefined, in or out, is off. */
7145
+ updateContainers(change: (saved: unknown) => unknown): void;
7146
+ }
7147
+ interface ChangeDeps extends Partial<PreflightDeps> {
7148
+ settings: ContainerSettingStore;
7149
+ }
7150
+ /** A setting a person can read off a surface, and what the last check made of it. */
7151
+ interface ContainerGuaranteeLine {
7152
+ guarantee: Guarantee;
7153
+ proven: boolean;
7154
+ by: string;
7155
+ required: boolean;
7156
+ }
7157
+ interface ContainerStatus {
7158
+ on: boolean;
7159
+ image?: string;
7160
+ /** Which login, by name: never a value. */
7161
+ login?: string;
7162
+ memory?: string;
7163
+ /** All a task can reach, past what its login needs. */
7164
+ allow?: readonly string[];
7165
+ /** No problem left that a check can see. A task still proves its own container at start (ADR-0059 L3). */
7166
+ ready: boolean;
7167
+ problems: ContainerProblem[];
7168
+ engine?: EngineFacts;
7169
+ /** Only from a check that ran: nothing is proven by a setting that reads well. */
7170
+ guarantees?: ContainerGuaranteeLine[];
7171
+ /** What is taken on trust, kept apart from what a probe measured. */
7172
+ assumptions: readonly string[];
7173
+ }
7174
+ interface StatusDeps extends Partial<ReadinessDeps> {
7175
+ /** Ask a container too, and not only the engine. Without it nothing is started. */
7176
+ prove?: boolean;
7177
+ /** How, for a test: the proof a lease makes unless told otherwise. */
7178
+ proof?: (settings: ContainerSettings) => Promise<GuaranteeReport>;
7179
+ }
7180
+ /**
7181
+ * The one way a surface changes the setting, and so the one place that holds it to
7182
+ * what a person is told (ADR-0059 L5): containers go on only over a Docker that
7183
+ * answers, and the image and login can wait, since `{}` is on and refuses every
7184
+ * task (never the host) until they are chosen. A choice needs no engine, as an
7185
+ * image may not be built yet, and it never turns containers on. What was chosen
7186
+ * goes with turning off, as the setting's presence is what is on. Empty means
7187
+ * done. A Session reads the setting once, so a change reaches new sessions.
7188
+ */
7189
+ declare function changeContainers(change: ContainerChange, { settings, cli, platform }: ChangeDeps): Promise<ContainerProblem[]>;
7190
+ /**
7191
+ * What a surface shows of the setting: its choices, what stands in a task's way,
7192
+ * and, kept apart, what was proven and what is only assumed. It starts nothing
7193
+ * unless asked to `prove`. A check holds no login, so it stops short of what a
7194
+ * lease proves, and a lease proves its own in any case.
7195
+ */
7196
+ declare function containerStatus(raw: unknown, { prove, proof, cli, broker, ...rest }?: StatusDeps): Promise<ContainerStatus>;
7197
+ /** A status as lines for a person, the same on every surface. */
7198
+ declare function describeContainers(status: ContainerStatus): string[];
7199
+
6767
7200
  /** What the preflight reads: the planner choice and whatever it needs to be reachable. */
6768
7201
  type PlannerReadinessConfig = Pick<IConfig, 'aiProvider' | 'planningModel' | 'openaiCompatibleBaseUrl' | 'getProviderApiKey'>;
6769
7202
  /**
@@ -6868,7 +7301,15 @@ type DaemonErrorCode = 'session_not_found' | 'task_not_found' | 'no_plan' | 'alr
6868
7301
  /** Merge all would merge work no check has passed; the message names the checks, and a surface asks before sending `pastChecks` (ADR-0055 D9). */
6869
7302
  | 'merge_past_check' | 'approval_not_outstanding'
6870
7303
  /** Another live Ordewell host runs this session (ADR-0049); `sessionHeld` names it. */
6871
- | 'session_held';
7304
+ | 'session_held'
7305
+ /** The tree does not hold that child plan: one id is refused like any other outside it (ADR-0055 D20). */
7306
+ | 'child_not_found'
7307
+ /** The child plan's attempt has ended: it reads, and Continue on its task is what speaks to it. */
7308
+ | 'child_view_only'
7309
+ /** That child plan holds no such task: a task's id, exactly. Nothing falls back to the root (ADR-0055 D20). */
7310
+ | 'child_task_not_found'
7311
+ /** The child plan is open, but its mandate, its grants, the tree's budget or the task's state refuses this now; the message says which. */
7312
+ | 'child_refused';
6872
7313
  /** The body of every non-2xx answer a route gives. */
6873
7314
  interface ErrorBody {
6874
7315
  error: string;
@@ -7069,6 +7510,39 @@ interface TaskLogResponse {
7069
7510
  attempt: number;
7070
7511
  events: TaskLogEvent[];
7071
7512
  }
7513
+ /** `GET /api/sessions/:id/children`: every plan below the root, parents before their children. */
7514
+ interface ChildListResponse {
7515
+ children: ChildPlanEntry[];
7516
+ }
7517
+ /**
7518
+ * `GET /api/sessions/:id/children/:childId`. Taken with `position`, which is
7519
+ * the last frame of the child's socket it accounts for. The numbering counts
7520
+ * only what a socket was watching, so a surface opens the socket first and
7521
+ * reads this and the child's logs after it.
7522
+ */
7523
+ type ChildPlanResponse = ChildPlanView & {
7524
+ position: StreamStamp;
7525
+ };
7526
+ /** `POST /api/sessions/:id/children/:childId/message`: `woken` opened a turn, `queued` goes with the next one the slots allow. */
7527
+ interface ChildMessageResponse {
7528
+ status: Extract<ChildMessageOutcome, {
7529
+ ok: true;
7530
+ }>['status'];
7531
+ }
7532
+ /**
7533
+ * `POST /api/sessions/:id/children/:childId/tasks/:taskId/message`, body
7534
+ * `{ message }`, and `.../checkpoint/approve|reject`, body `{ question, reason? }`:
7535
+ * what the child's runner was told. `question` is the words the person read
7536
+ * (`ChildPlanEntry.checkpoints` names the tasks, `tasks[].checkpoint` of the view
7537
+ * holds them), so an answer can never reach a later question. `id` is the message
7538
+ * delivered, which a watching surface sees again on the child's socket; absent
7539
+ * for an answer, and for a message that resumed a paused task rather than reach
7540
+ * a running one.
7541
+ */
7542
+ interface ChildTaskControlResponse {
7543
+ message: string;
7544
+ id?: string;
7545
+ }
7072
7546
  type SessionListResponse = SessionMeta[];
7073
7547
  interface SettingsResponse {
7074
7548
  orchestratorModel: string;
@@ -7084,6 +7558,11 @@ interface SettingsResponse {
7084
7558
  */
7085
7559
  run: GlobalRunSettings;
7086
7560
  }
7561
+ /** What `PATCH /api/settings/containers` answers: why the change was refused, if it was, and where the setting stands. */
7562
+ interface ContainerChangeResponse {
7563
+ refused: ContainerProblem[];
7564
+ status: ContainerStatus;
7565
+ }
7087
7566
  /** What `PATCH /api/settings` answers: the settings as they now stand, plus what the write itself decided. */
7088
7567
  interface SettingsUpdateResponse extends SettingsResponse {
7089
7568
  /**
@@ -7153,6 +7632,22 @@ interface RunSnapshotFrame extends Partial<StreamStamp> {
7153
7632
  /** Absent from a daemon older than the field: nothing is known, not "none waiting". */
7154
7633
  approvals?: ApprovalRequestMessage[];
7155
7634
  }
7635
+ /**
7636
+ * The tree below a root, on the root's socket, whole each time: unstamped, so
7637
+ * it replaces what a surface holds. Sent after the greeting and whenever a
7638
+ * child opens, ends or changes state; a session with no child plan sends none.
7639
+ *
7640
+ * A child's own socket is `/ws/session/:root/child/:childId`: `connected`, then
7641
+ * a `run_snapshot` under the child's id and frames numbered on its own count,
7642
+ * with no approvals (ADR-0056 M8) and no account limits. It closes with 4404
7643
+ * for what this root does not hold, or a root no longer loaded; 1012 when the
7644
+ * root is replaced, so reconnect; 1001 when the root is closed.
7645
+ */
7646
+ interface ChildTreeFrame {
7647
+ type: 'child_tree';
7648
+ sessionId: string;
7649
+ children: ChildPlanEntry[];
7650
+ }
7156
7651
  /** Independent of run snapshot stamps: quota reads have their own revision. */
7157
7652
  interface AccountLimitsFrame extends AccountLimitsMessage {
7158
7653
  sessionId: string;
@@ -8528,12 +9023,41 @@ declare const PLANNED_WITH_LABEL = "Planned-with line in commits Ordewell writes
8528
9023
  declare const trailerSummary: (run: GlobalRunSettings) => string;
8529
9024
  declare const autorunSummary: (run: GlobalRunSettings) => string;
8530
9025
  declare const delegationSummary: (run: GlobalRunSettings) => string;
9026
+ /** The budget turning delegation on again takes, or null where the user has entered none and must. */
9027
+ declare const keptDelegationBudget: (run: GlobalRunSettings) => number | null;
9028
+ /** What {@link delegationSwitchedOn} reads of the place it runs in, so a test can put it anywhere. */
9029
+ interface DelegationPlace {
9030
+ /** The variable's value, as this process has it. */
9031
+ env: string | undefined;
9032
+ /** Where this module runs from; null where nothing can say, as in a webview. */
9033
+ moduleDir: string | null;
9034
+ exists(path: string): boolean;
9035
+ }
8531
9036
  /** Whether any surface offers the delegation setting, and whether a planner may write a delegated task. */
8532
9037
  declare const DELEGATION_OFFERED: boolean;
9038
+ /**
9039
+ * Whether the `containers` setting is read at all. Containers are held out of
9040
+ * a published build like delegation (ADR-0055 D21), by the same test of a git
9041
+ * checkout and its own variable: the container review's findings are not all
9042
+ * closed, and a setting a user can type must not promise an isolation this
9043
+ * build does not yet prove. Read at call time, so a test can set the variable.
9044
+ */
9045
+ declare function containersOffered(place?: DelegationPlace): boolean;
8533
9046
  declare const ACT_RISK = "Tasks it adds run too, ops tasks included, which can act on real systems unattended.";
8534
9047
  declare const AUTORUN_RISK = "Plans start without review, ops tasks included, which can act on real systems unattended. In Full nobody is asked at all: the planner may start anything, script tasks included, from a plan no person read.";
8535
9048
  /** What turning delegation on accepts below the root, as Act and autorun accept it at the root (ADR-0056 M9). A container is not named as a remedy: only its own setting runs one, a child's tasks included (ADR-0059). */
8536
9049
  declare const DELEGATION_RISK = "A subplanner approves and runs its own plan, and no person reads it. Its change tasks keep the network they have in a flat run, so an instruction injected into something a subplanner read can become a plan nobody read, and run with that network. Delegation starts no container of its own: containers are opt-in, and only that setting runs a child's tasks in one.";
9050
+ /**
9051
+ * `changes` with the budget it turns delegation on at also kept as the user's
9052
+ * (see `GlobalRunSettings.delegationBudget`). Off keeps what was kept, and a
9053
+ * budget named in `changes` is never overridden. Every writer of a run
9054
+ * setting — the file, a session's copy — goes through this one rule.
9055
+ */
9056
+ declare function rememberDelegationBudget<T extends Partial<GlobalRunSettings>>(changes: T): T;
9057
+ /** What the Subplanners setting tells a user on every surface (ADR-0055, ADR-0056): where delegated work stops, how it is counted, and what runs unread. */
9058
+ declare const SUBPLANNER_SCOPE = "Lets a plan hand a separable part of its goal to a subplanner working on its own branch. A subplanner stays inside the mandate it is given and cannot widen it; this setting grants nothing else.";
9059
+ declare const SUBPLANNER_ACCOUNTING = "The budget is one allowance of tokens for the whole tree, counted approximately from what runners report: usage arrives after a call, so a tree can pass it a little.";
9060
+ declare const SUBPLANNER_CHILD = "A subplanner plans in Act with autorun: it approves and runs its own plan, and no person reads it. You confirm once, when you turn Subplanners on.";
8537
9061
  /** `on`/`off` as a switch's value; null for anything else. */
8538
9062
  declare function parseSwitch(arg: string): boolean | null;
8539
9063
  /** A delegation setting as typed: `off`, which is 0, or the tree's budget in tokens; null for anything else. */
@@ -8541,4 +9065,4 @@ declare function parseDelegation(arg: string): number | null;
8541
9065
  /** A whole number at least `min`, as typed; null for anything else. */
8542
9066
  declare function parseCount(arg: string | undefined, min: number): number | null;
8543
9067
 
8544
- export { DELEGATION_RISK as $, ACT_RISK as A, type BlockingSubject as B, CHAT_COMMANDS as C, CliAgentAiService as D, type CliAgentAiServiceDeps as E, type CommandBlock as F, type CommandDescriptor as G, type CommandOutcome as H, type CommandPayload as I, type CommandStatus as J, type CommandsResponse as K, type CompactionBlock as L, type CompactionStatus as M, type Consent as N, type ContextCondenseRequest as O, ConversationBusyError as P, type ConversationCompactResponse as Q, type ConversationCompaction as R, ConversationEditError as S, type ConversationForkResponse as T, type ConversationInput as U, type ConversationRequest as V, type ConversationRewindResponse as W, type ConversationTurn as X, type ConversationView as Y, DEFAULT_WEB_READ_BUDGET as Z, DELEGATION_OFFERED as _, AUTORUN_RISK as a, type NodeBudget as a$, type DaemonErrorCode as a0, type DecideOptions as a1, type DiffRow as a2, type DiffRowKind as a3, type DiffStat as a4, type DisplayBlock as a5, EMPTY_CONVERSATION as a6, EMPTY_HOLD as a7, EMPTY_RUN as a8, EMPTY_TASK_LOG as a9, type IsolationMergeResponse as aA, type IsolationPreviewNotice as aB, type IsolationPreviewResponse as aC, LEASE_HEARTBEAT_MS as aD, LEASE_STALE_MS as aE, LeaseHost as aF, type LeaseHostKind as aG, type LeaseHostOptions as aH, type LiveOutputLookup as aI, type LiveTail as aJ, type LiveTailOptions as aK, type LocalEntry as aL, type LoopCheckFacts as aM, type LoopCheckState as aN, type LoopGuard as aO, type MappedTool as aP, type MarkdownToken as aQ, type MergeGateEntry as aR, type MergeGateResponse as aS, type MergeWordingHandoff as aT, type MessageBlock as aU, type MessageRole as aV, type ModelsResponse as aW, NOT_STARTED as aX, NO_TURN as aY, type NewTaskFields as aZ, NodeBoard as a_, EMPTY_TASK_LOG_FOLLOW as aa, type ErrorBody as ab, type Escalation as ac, type EscalationInput as ad, type EscalationKind as ae, type EscalationOption as af, type EscalationOptionId as ag, type EscalationRun as ah, type EscalationsResponse as ai, type ExecuteCommandResponse as aj, type ExecuteResponse as ak, type ExecutionCommand as al, ExecutionCommands as am, type ExecutionHost as an, type ExecutionSummary as ao, type GatedConversation as ap, type GeneratePlanResponse as aq, type GlobalRunSettings as ar, HEADLESS_CLI_COMMANDS as as, type HandoffBlock as at, type HandoffForkRepo as au, type HandoffPeekSubject as av, type IAiService as aw, IDLE_ACTIVITY as ax, type IWebFetcher as ay, type IsolationDiffResponse as az, type AccountLimitBucket as b, type RunnerCatalog as b$, OUTPUT_LINES_DEFAULT as b0, OUTPUT_LINES_MAX as b1, type OkResponse as b2, type OpRef as b3, type OpRefusal as b4, type OrchestratorObserver as b5, type OutputPreview as b6, type OverrideDirection as b7, PLANNED_WITH_LABEL as b8, type PendingApproval as b9, type PrdResponse as bA, type PromptHold as bB, REPORT_PREVIEW_LINES as bC, RUN_SETTINGS_DEFAULTS as bD, type ReadRunnerAuthOptions as bE, type RefTask as bF, ResearchTasks as bG, type ResolveAll as bH, type ResolveConflictResponse as bI, type RevertPreviewTask as bJ, type RevertRefusal as bK, type RevertRefusalReason as bL, type RevertScope as bM, type RewindTarget as bN, type RewindTargetsResponse as bO, type RunActivity as bP, type RunInput as bQ, type RunMergeView as bR, RunSettingsError as bS, type RunSnapshotFrame as bT, type RunTask as bU, type RunTaskStatus as bV, type RunView as bW, type RunnerAuth as bX, type RunnerAuthExec as bY, type RunnerAuthExecOptions as bZ, type RunnerAuthExecResult as b_, PendingApprovals as ba, type PendingApprovalsOptions as bb, type PlanBlock as bc, type PlanBlocks as bd, type PlanIntake as be, type PlanMarkerStatus as bf, type PlanResponse as bg, type PlanSnapshot as bh, PlanStore as bi, type PlannerCommandSyntax as bj, type PlannerContextDeps as bk, type PlannerContextStatus as bl, PlannerConversation as bm, type PlannerConversationHost as bn, type PlannerModelCandidate as bo, type PlannerModelChoice as bp, PlannerModelMemory as bq, type PlannerModelRecall as br, type PlannerModelStore as bs, type PlannerNotReady as bt, PlannerNotReadyError as bu, type PlannerReadinessConfig as bv, type PlannerSubmission as bw, PlannerTurnDiscardedError as bx, PlannerTurnStoppedError as by, PlannerUsageLimitError as bz, type AccountLimitSnapshot as c, type TaskMessageResponse as c$, type RunnerLoadedBlock as c0, type RunnersResponse as c1, STALLED_LABEL as c2, STOPPED_BEFORE_START as c3, STOPPING_LABEL as c4, SUPERVISOR_LEVEL_LABEL as c5, type SerializedConversationMessage as c6, type SerializedPendingTurn as c7, type SerializedPlan as c8, type SerializedTask as c9, Subtree as cA, type SubtreeItemView as cB, type SubtreeView as cC, type SurfacePlan as cD, type SurfacePlanState as cE, type SurfaceTask as cF, TASK_QUERY_ANSWER_MAX_CHARS as cG, TASK_QUERY_ANSWER_OR_OPS as cH, TASK_QUERY_FIELDS as cI, TASK_QUERY_PROTOCOL as cJ, TASK_QUERY_REMINDER as cK, TERMINAL_UI_COMMANDS as cL, type TakenPrompt as cM, type TaskAction as cN, type TaskActivity as cO, type TaskAttemptSnapshot as cP, type TaskLogAttemptsResponse as cQ, type TaskLogBatch as cR, type TaskLogEvent as cS, type TaskLogFollow as cT, type TaskLogFollowInput as cU, type TaskLogHeaderKind as cV, type TaskLogHeaderTask as cW, type TaskLogHeaderUsage as cX, type TaskLogHeaderView as cY, type TaskLogResponse as cZ, type TaskLogView as c_, type SerializedTaskStatus as ca, type ServerInfoResponse as cb, type SessionBroadcaster as cc, type SessionFrame as cd, type SessionHeld as ce, SessionHeldError as cf, type SessionLease as cg, type SessionLeaseRecord as ch, type SessionListResponse as ci, type SessionMessage as cj, type SessionNotice as ck, type SessionResponse as cl, type SettingsResponse as cm, SettingsService as cn, type SettingsUpdateResponse as co, type SkillInvocation as cp, type SkillLoadBlock as cq, type SkillToken as cr, SlotPool as cs, type StartAdmission as ct, type StopResponse as cu, type StreamStamp as cv, type SubagentBlock as cw, type SubagentChild as cx, type SubagentStatus as cy, type SubplannerBrief as cz, type AccountLimitStatus as d, blockNotice as d$, type TaskOp as d0, TaskOrchestrator as d1, type TaskOrchestratorDeps as d2, type TaskOrchestratorOptions as d3, type TaskOutputSource as d4, type TaskPlacement as d5, type TaskQuery as d6, type TaskQueryCatalog as d7, type TaskQueryField as d8, type TaskRef as d9, WAITS_FOR_APPROVAL_LABEL as dA, type WakeUpItem as dB, type WebRead as dC, type WebReadDecision as dD, type WebReadOptions as dE, WebReadPolicy as dF, type Worded as dG, type WorkspacesResponse as dH, abbreviateHome as dI, accountLimitPercentText as dJ, accountLimitWindowLabel as dK, accountLimitsOf as dL, accountLimitsText as dM, accountLimitsTitle as dN, activityLabel as dO, aheadOfDraft as dP, applyTaskOps as dQ, approvalKindText as dR, approvalLabel as dS, approvalStatusText as dT, assignedRunnerOf as dU, assignmentIssue as dV, assignmentIssueText as dW, attachingLabel as dX, automergeSummary as dY, autorunSummary as dZ, awaitingLabel as d_, type TaskRevertPreview as da, type TaskRevertPreviewResponse as db, type TaskRowAction as dc, type TaskRowContext as dd, type TaskRowDelegated as de, type TaskRowHandoff as df, type TaskRowIsolation as dg, type TaskRowKind as dh, type TaskRowLoop as di, type TaskRowPlacement as dj, type TaskRowSubject as dk, type TaskRowUsage as dl, type TaskRowView as dm, type TaskRunFacts as dn, type TaskStatusKind as dp, type ThinkingDisplayBlock as dq, type ToolBlock as dr, type ToolHeadline as ds, type ToolStatus as dt, TreeLedger as du, type TreeTask as dv, TurnBudgets as dw, type TurnGate as dx, type UsageBlock as dy, type UserSettings as dz, type AccountLimitWindow as e, manualOverrideStopFirst as e$, blockNotices as e0, blockedByLabel as e1, blockingFailures as e2, canMergeTasks as e3, canSetDependencies as e4, canSplitTask as e5, capConflictFiles as e6, cardEditNeedsUnstarted as e7, cardEditable as e8, checkoutRule as e9, followTurn as eA, formatElapsed as eB, fromTranscript as eC, getSettingsPath as eD, handoffBaseLine as eE, handoffBranchName as eF, handoffFindingsText as eG, handoffPeekParts as eH, hasAccountLimits as eI, hasHiddenDetail as eJ, hasLongReport as eK, holdLabel as eL, holdPrompt as eM, isFileEditTool as eN, isRepoGroup as eO, isTaskRunning as eP, lastServedModel as eQ, loadedSkillTokens as eR, logContinues as eS, logResumes as eT, loopBodyLabel as eU, loopBodyRound as eV, loopCheckLabel as eW, loopCheckState as eX, loopLeaveNotice as eY, loopRowParts as eZ, manualOverrideConfirmation as e_, classifyOutcome as ea, closeTurn as eb, coalesceTaskLog as ec, compactionText as ed, confirmedOverride as ee, createAiService as ef, delegatedRowView as eg, delegationSummary as eh, dependencyCandidates as ei, dependentsNotice as ej, dependentsOf as ek, describeHeld as el, describeHolder as em, describeIsolationPreview as en, describeMergeResult as eo, describePlannerNotReady as ep, diffRows as eq, diffStat as er, diffSummary as es, digestTaskLog as et, drainNext as eu, editableWhileRunning as ev, elapsedSince as ew, escalations as ex, executionSummary as ey, followTaskLog as ez, type AccountLimitsFrame as f, serializeTask as f$, mapAgentTool as f0, markAction as f1, markdownHtml as f2, markdownTokens as f3, mergeOutcome as f4, mergePastChecksConfirmation as f5, mergeTarget as f6, namedRepos as f7, newTaskFields as f8, noExecutorRefusal as f9, reduceRun as fA, reduceTaskLog as fB, renderTaskQueryAnswer as fC, repairWaitLabel as fD, repairedLanded as fE, repairedNotice as fF, repeatingChecks as fG, replayTaskLog as fH, repoBaseLine as fI, repoResultLines as fJ, reposWithWork as fK, resetRunnerAuth as fL, resolveSkillInvocation as fM, resolveTaskRef as fN, resolveUserTaskRef as fO, resumeLabel as fP, resumeTime as fQ, revertEffect as fR, revertListLine as fS, revertTaskRef as fT, runHoldsEditors as fU, runSettingsOf as fV, runnerToolSubject as fW, scriptExitText as fX, scriptRunText as fY, secondsText as fZ, serializePlan as f_, normalizeAgentArgs as fa, opRefusalText as fb, opsEditable as fc, outputLines as fd, outputPreview as fe, overrideNeedsConfirmation as ff, parseCount as fg, parseDelegation as fh, parseSwitch as fi, parseTaskOpsJson as fj, parseTaskQueryJson as fk, pastGateConfirmation as fl, planBlocks as fm, planMarkerParts as fn, plannerMessage as fo, plannerNotReady as fp, plannerNotReadyFor as fq, plannerTranscript as fr, processLeaseHost as fs, ranSealed as ft, readRunnerAuth as fu, receiptLabel as fv, reconcileApprovals as fw, recordRunnerAuth as fx, recordedRunnerAuth as fy, reduceConversation as fz, type AccountLimitsMessage as g, serializeTaskStatus as g0, skillTokens as g1, skippedLabel as g2, stopTurn as g3, subtreeIds as g4, subtreeView as g5, summarizeToolCall as g6, supervisorSummary as g7, surfacePlan as g8, surfacePlanState as g9, unsendAll as gA, unsendLatest as gB, wakeUpItems as gC, walkPlan as gD, withoutSealedMark as gE, workspaceEnvOf as gF, takeAt as ga, taskActionCommand as gb, taskActivity as gc, taskChatAvailable as gd, taskLogCommands as ge, taskLogForSurface as gf, taskLogHeaderView as gg, taskOrderLabel as gh, taskPlacement as gi, taskQuerySignature as gj, taskRef as gk, taskRefOf as gl, taskRowActions as gm, taskRowView as gn, taskStartedNotice as go, taskStatusKind as gp, textHasTaskOps as gq, textHasTaskQuery as gr, titledRefs as gs, titledTaskRef as gt, titledTaskRefOf as gu, toTaskLogEvent as gv, toolHeadline as gw, trailerSummary as gx, trimToolOutput as gy, truncateCheckpointSummary as gz, type AdoptSessionResponse as h, type AnswerEscalationRequest as i, type ApplyTaskOpsResult as j, type ApprovalAnswerResponse as k, type ApprovalBlock as l, type ApprovalRequestMessage as m, type ApprovalStatus as n, type ApprovalsResponse as o, type ApproveReviewResponse as p, type AskOptions as q, type AssignmentCatalog as r, type AssignmentIssue as s, type AssignmentScope as t, type AssignmentWriter as u, type AutoMergeTrigger as v, CHECKPOINT_TRUNCATE_LENGTH as w, type CancelPlanningResponse as x, type CancelResumeResponse as y, type Carved as z };
9068
+ export { type ContainerProblem as $, ACT_RISK as A, type BlockingSubject as B, CHAT_COMMANDS as C, type ChildControlOutcome as D, type ChildListResponse as E, type ChildMessageOutcome as F, type ChildMessageResponse as G, type ChildPlanEntry as H, type ChildPlanResponse as I, type ChildPlanView as J, type ChildTaskControl as K, type ChildTaskControlResponse as L, type ChildTreeFrame as M, CliAgentAiService as N, type CliAgentAiServiceDeps as O, type CommandBlock as P, type CommandDescriptor as Q, type CommandOutcome as R, type CommandPayload as S, type CommandStatus as T, type CommandsResponse as U, type CompactionBlock as V, type CompactionStatus as W, type Consent as X, type ContainerChange as Y, type ContainerChangeResponse as Z, type ContainerGuaranteeLine as _, AUTORUN_RISK as a, type LocalEntry as a$, type ContainerStatus as a0, type ContextCondenseRequest as a1, ConversationBusyError as a2, type ConversationCompactResponse as a3, type ConversationCompaction as a4, ConversationEditError as a5, type ConversationForkResponse as a6, type ConversationInput as a7, type ConversationRequest as a8, type ConversationRewindResponse as a9, type ExecuteResponse as aA, type ExecutionCommand as aB, ExecutionCommands as aC, type ExecutionHost as aD, type ExecutionSummary as aE, type GatedConversation as aF, type GeneratePlanResponse as aG, type GlobalRunSettings as aH, HEADLESS_CLI_COMMANDS as aI, type HandoffBlock as aJ, type HandoffForkRepo as aK, type HandoffPeekSubject as aL, type IAiService as aM, IDLE_ACTIVITY as aN, type IWebFetcher as aO, type IsolationDiffResponse as aP, type IsolationMergeResponse as aQ, type IsolationPreviewNotice as aR, type IsolationPreviewResponse as aS, LEASE_HEARTBEAT_MS as aT, LEASE_STALE_MS as aU, LeaseHost as aV, type LeaseHostKind as aW, type LeaseHostOptions as aX, type LiveOutputLookup as aY, type LiveTail as aZ, type LiveTailOptions as a_, type ConversationTurn as aa, type ConversationView as ab, DEFAULT_WEB_READ_BUDGET as ac, DELEGATION_OFFERED as ad, DELEGATION_RISK as ae, type DaemonErrorCode as af, type DecideOptions as ag, type DiffRow as ah, type DiffRowKind as ai, type DiffStat as aj, type DisplayBlock as ak, type DockerCli as al, EMPTY_CONVERSATION as am, EMPTY_HOLD as an, EMPTY_RUN as ao, EMPTY_TASK_LOG as ap, EMPTY_TASK_LOG_FOLLOW as aq, type ErrorBody as ar, type Escalation as as, type EscalationInput as at, type EscalationKind as au, type EscalationOption as av, type EscalationOptionId as aw, type EscalationRun as ax, type EscalationsResponse as ay, type ExecuteCommandResponse as az, type AccountLimitBucket as b, type RevertRefusalReason as b$, type LoopCheckFacts as b0, type LoopCheckState as b1, type LoopGuard as b2, type MappedTool as b3, type MarkdownToken as b4, type MergeGateEntry as b5, type MergeGateResponse as b6, type MergeWordingHandoff as b7, type MessageBlock as b8, type MessageRole as b9, type PlannerContextDeps as bA, type PlannerContextStatus as bB, PlannerConversation as bC, type PlannerConversationHost as bD, type PlannerModelCandidate as bE, type PlannerModelChoice as bF, PlannerModelMemory as bG, type PlannerModelRecall as bH, type PlannerModelStore as bI, type PlannerNotReady as bJ, PlannerNotReadyError as bK, type PlannerReadinessConfig as bL, type PlannerSubmission as bM, PlannerTurnDiscardedError as bN, PlannerTurnStoppedError as bO, PlannerUsageLimitError as bP, type PrdResponse as bQ, type PromptHold as bR, REPORT_PREVIEW_LINES as bS, RUN_SETTINGS_DEFAULTS as bT, type ReadRunnerAuthOptions as bU, type RefTask as bV, ResearchTasks as bW, type ResolveAll as bX, type ResolveConflictResponse as bY, type RevertPreviewTask as bZ, type RevertRefusal as b_, type ModelsResponse as ba, NOT_STARTED as bb, NO_TURN as bc, type NewTaskFields as bd, NodeBoard as be, type NodeBudget as bf, OUTPUT_LINES_DEFAULT as bg, OUTPUT_LINES_MAX as bh, type OkResponse as bi, type OpRef as bj, type OpRefusal as bk, type OrchestratorObserver as bl, type OutputPreview as bm, type OverrideDirection as bn, PLANNED_WITH_LABEL as bo, type PendingApproval as bp, PendingApprovals as bq, type PendingApprovalsOptions as br, type PlanBlock as bs, type PlanBlocks as bt, type PlanIntake as bu, type PlanMarkerStatus as bv, type PlanResponse as bw, type PlanSnapshot as bx, PlanStore as by, type PlannerCommandSyntax as bz, type AccountLimitSnapshot as c, TASK_QUERY_FIELDS as c$, type RevertScope as c0, type RewindTarget as c1, type RewindTargetsResponse as c2, type RunActivity as c3, type RunInput as c4, type RunMergeView as c5, RunSettingsError as c6, type RunSnapshotFrame as c7, type RunTask as c8, type RunTaskStatus as c9, type SessionLeaseRecord as cA, type SessionListResponse as cB, type SessionMessage as cC, type SessionNotice as cD, type SessionResponse as cE, type SettingsResponse as cF, SettingsService as cG, type SettingsUpdateResponse as cH, type SkillInvocation as cI, type SkillLoadBlock as cJ, type SkillToken as cK, SlotPool as cL, type StartAdmission as cM, type StopResponse as cN, type StreamStamp as cO, type SubagentBlock as cP, type SubagentChild as cQ, type SubagentStatus as cR, type SubplannerBrief as cS, Subtree as cT, type SubtreeItemView as cU, type SubtreeView as cV, type SurfacePlan as cW, type SurfacePlanState as cX, type SurfaceTask as cY, TASK_QUERY_ANSWER_MAX_CHARS as cZ, TASK_QUERY_ANSWER_OR_OPS as c_, type RunView as ca, type RunnerAuth as cb, type RunnerAuthExec as cc, type RunnerAuthExecOptions as cd, type RunnerAuthExecResult as ce, type RunnerCatalog as cf, type RunnerLoadedBlock as cg, type RunnersResponse as ch, STALLED_LABEL as ci, STOPPED_BEFORE_START as cj, STOPPING_LABEL as ck, SUBPLANNER_ACCOUNTING as cl, SUBPLANNER_CHILD as cm, SUBPLANNER_SCOPE as cn, SUPERVISOR_LEVEL_LABEL as co, type SerializedConversationMessage as cp, type SerializedPendingTurn as cq, type SerializedPlan as cr, type SerializedTask as cs, type SerializedTaskStatus as ct, type ServerInfoResponse as cu, type SessionBroadcaster as cv, type SessionFrame as cw, type SessionHeld as cx, SessionHeldError as cy, type SessionLease as cz, type AccountLimitStatus as d, abbreviateHome as d$, TASK_QUERY_PROTOCOL as d0, TASK_QUERY_REMINDER as d1, TERMINAL_UI_COMMANDS as d2, type TakenPrompt as d3, type TaskAction as d4, type TaskActivity as d5, type TaskAttemptSnapshot as d6, type TaskLogAttemptsResponse as d7, type TaskLogBatch as d8, type TaskLogEvent as d9, type TaskRowIsolation as dA, type TaskRowKind as dB, type TaskRowLoop as dC, type TaskRowPlacement as dD, type TaskRowSubject as dE, type TaskRowUsage as dF, type TaskRowView as dG, type TaskRunFacts as dH, type TaskStatusKind as dI, type ThinkingDisplayBlock as dJ, type ToolBlock as dK, type ToolHeadline as dL, type ToolStatus as dM, TreeLedger as dN, type TreeTask as dO, TurnBudgets as dP, type TurnGate as dQ, type UsageBlock as dR, type UserSettings as dS, WAITS_FOR_APPROVAL_LABEL as dT, type WakeUpItem as dU, type WebRead as dV, type WebReadDecision as dW, type WebReadOptions as dX, WebReadPolicy as dY, type Worded as dZ, type WorkspacesResponse as d_, type TaskLogFollow as da, type TaskLogFollowInput as db, type TaskLogHeaderKind as dc, type TaskLogHeaderTask as dd, type TaskLogHeaderUsage as de, type TaskLogHeaderView as df, type TaskLogResponse as dg, type TaskLogView as dh, type TaskMessageResponse as di, type TaskOp as dj, TaskOrchestrator as dk, type TaskOrchestratorDeps as dl, type TaskOrchestratorOptions as dm, type TaskOutputSource as dn, type TaskPlacement as dp, type TaskQuery as dq, type TaskQueryCatalog as dr, type TaskQueryField as ds, type TaskRef as dt, type TaskRevertPreview as du, type TaskRevertPreviewResponse as dv, type TaskRowAction as dw, type TaskRowContext as dx, type TaskRowDelegated as dy, type TaskRowHandoff as dz, type AccountLimitWindow as e, getSettingsPath as e$, accountLimitPercentText as e0, accountLimitWindowLabel as e1, accountLimitsOf as e2, accountLimitsText as e3, accountLimitsTitle as e4, activityLabel as e5, aheadOfDraft as e6, applyTaskOps as e7, approvalKindText as e8, approvalLabel as e9, containersOffered as eA, createAiService as eB, delegatedRowView as eC, delegationSummary as eD, dependencyCandidates as eE, dependentsNotice as eF, dependentsOf as eG, describeContainers as eH, describeHeld as eI, describeHolder as eJ, describeIsolationPreview as eK, describeMergeResult as eL, describePlannerNotReady as eM, describeProblems as eN, diffRows as eO, diffStat as eP, diffSummary as eQ, digestTaskLog as eR, drainNext as eS, editableWhileRunning as eT, elapsedSince as eU, escalations as eV, executionSummary as eW, followTaskLog as eX, followTurn as eY, formatElapsed as eZ, fromTranscript as e_, approvalStatusText as ea, assignedRunnerOf as eb, assignmentIssue as ec, assignmentIssueText as ed, attachingLabel as ee, automergeSummary as ef, autorunSummary as eg, awaitingLabel as eh, blockNotice as ei, blockNotices as ej, blockedByLabel as ek, blockingFailures as el, canMergeTasks as em, canSetDependencies as en, canSplitTask as eo, capConflictFiles as ep, cardEditNeedsUnstarted as eq, cardEditable as er, changeContainers as es, checkoutRule as et, classifyOutcome as eu, closeTurn as ev, coalesceTaskLog as ew, compactionText as ex, confirmedOverride as ey, containerStatus as ez, type AccountLimitsFrame as f, rememberDelegationBudget as f$, handoffBaseLine as f0, handoffBranchName as f1, handoffFindingsText as f2, handoffPeekParts as f3, hasAccountLimits as f4, hasHiddenDetail as f5, hasLongReport as f6, holdLabel as f7, holdPrompt as f8, isFileEditTool as f9, opRefusalText as fA, opsEditable as fB, outputLines as fC, outputPreview as fD, overrideNeedsConfirmation as fE, parseCount as fF, parseDelegation as fG, parseSwitch as fH, parseTaskOpsJson as fI, parseTaskQueryJson as fJ, pastGateConfirmation as fK, planBlocks as fL, planMarkerParts as fM, plannerMessage as fN, plannerNotReady as fO, plannerNotReadyFor as fP, plannerTranscript as fQ, processLeaseHost as fR, ranSealed as fS, readRunnerAuth as fT, receiptLabel as fU, reconcileApprovals as fV, recordRunnerAuth as fW, recordedRunnerAuth as fX, reduceConversation as fY, reduceRun as fZ, reduceTaskLog as f_, isRepoGroup as fa, isTaskRunning as fb, keptDelegationBudget as fc, lastServedModel as fd, loadedSkillTokens as fe, logContinues as ff, logResumes as fg, loopBodyLabel as fh, loopBodyRound as fi, loopCheckLabel as fj, loopCheckState as fk, loopLeaveNotice as fl, loopRowParts as fm, manualOverrideConfirmation as fn, manualOverrideStopFirst as fo, mapAgentTool as fp, markAction as fq, markdownHtml as fr, markdownTokens as fs, mergeOutcome as ft, mergePastChecksConfirmation as fu, mergeTarget as fv, namedRepos as fw, newTaskFields as fx, noExecutorRefusal as fy, normalizeAgentArgs as fz, type AccountLimitsMessage as g, unsendLatest as g$, renderTaskQueryAnswer as g0, repairWaitLabel as g1, repairedLanded as g2, repairedNotice as g3, repeatingChecks as g4, replayTaskLog as g5, repoBaseLine as g6, repoResultLines as g7, reposWithWork as g8, resetRunnerAuth as g9, takeAt as gA, taskActionCommand as gB, taskActivity as gC, taskChatAvailable as gD, taskLogCommands as gE, taskLogForSurface as gF, taskLogHeaderView as gG, taskOrderLabel as gH, taskPlacement as gI, taskQuerySignature as gJ, taskRef as gK, taskRefOf as gL, taskRowActions as gM, taskRowView as gN, taskStartedNotice as gO, taskStatusKind as gP, textHasTaskOps as gQ, textHasTaskQuery as gR, titledRefs as gS, titledTaskRef as gT, titledTaskRefOf as gU, toTaskLogEvent as gV, toolHeadline as gW, trailerSummary as gX, trimToolOutput as gY, truncateCheckpointSummary as gZ, unsendAll as g_, resolveSkillInvocation as ga, resolveTaskRef as gb, resolveUserTaskRef as gc, resumeLabel as gd, resumeTime as ge, revertEffect as gf, revertListLine as gg, revertTaskRef as gh, runHoldsEditors as gi, runSettingsOf as gj, runnerToolSubject as gk, scriptExitText as gl, scriptRunText as gm, secondsText as gn, serializePlan as go, serializeTask as gp, serializeTaskStatus as gq, skillTokens as gr, skippedLabel as gs, stopTurn as gt, subtreeIds as gu, subtreeView as gv, summarizeToolCall as gw, supervisorSummary as gx, surfacePlan as gy, surfacePlanState as gz, type AdoptSessionResponse as h, wakeUpItems as h0, walkPlan as h1, withoutSealedMark as h2, workspaceEnvOf as h3, type AnswerEscalationRequest as i, type ApplyTaskOpsResult as j, type ApprovalAnswerResponse as k, type ApprovalBlock as l, type ApprovalRequestMessage as m, type ApprovalStatus as n, type ApprovalsResponse as o, type ApproveReviewResponse as p, type AskOptions as q, type AssignmentCatalog as r, type AssignmentIssue as s, type AssignmentScope as t, type AssignmentWriter as u, type AutoMergeTrigger as v, CHECKPOINT_TRUNCATE_LENGTH as w, type CancelPlanningResponse as x, type CancelResumeResponse as y, type Carved as z };