@ordewell/core 0.7.0 → 0.7.1

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 (53) hide show
  1. package/dist/{IFileSystem-DgpX0BU7.d.mts → IFileSystem-BnLh-_SK.d.mts} +1 -1
  2. package/dist/{IFileSystem-D4ADfTrX.d.ts → IFileSystem-DofiRcCo.d.ts} +1 -1
  3. package/dist/{ModeResolver-Cv01ZDd9.d.mts → ModeResolver-DZzJSdIU.d.mts} +1 -1
  4. package/dist/{ModeResolver-BEcRAz1c.d.ts → ModeResolver-DkMYf4uS.d.ts} +1 -1
  5. package/dist/{Task-CoKhvBa1.d.mts → Task-BnLxkVQF.d.mts} +140 -21
  6. package/dist/{Task-CoKhvBa1.d.ts → Task-BnLxkVQF.d.ts} +140 -21
  7. package/dist/{chunk-YU4UKKKI.mjs → chunk-LGQNXPBX.mjs} +10 -2
  8. package/dist/chunk-LGQNXPBX.mjs.map +1 -0
  9. package/dist/{chunk-N66ZHFGN.mjs → chunk-OYUSADFM.mjs} +11 -1
  10. package/dist/chunk-OYUSADFM.mjs.map +1 -0
  11. package/dist/{chunk-HPNUFBIT.mjs → chunk-V3JHS7AX.mjs} +9 -1
  12. package/dist/chunk-V3JHS7AX.mjs.map +1 -0
  13. package/dist/{chunk-LSGY7AIZ.mjs → chunk-Y36NIASW.mjs} +183 -11
  14. package/dist/chunk-Y36NIASW.mjs.map +1 -0
  15. package/dist/{chunk-J3YSTPCE.mjs → chunk-ZV5LDNCO.mjs} +5 -4
  16. package/dist/chunk-ZV5LDNCO.mjs.map +1 -0
  17. package/dist/index.d.mts +287 -223
  18. package/dist/index.d.ts +287 -223
  19. package/dist/index.js +2111 -1086
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +1973 -1117
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/order-labels.d.mts +15 -2
  24. package/dist/order-labels.d.ts +15 -2
  25. package/dist/order-labels.js +12 -2
  26. package/dist/order-labels.js.map +1 -1
  27. package/dist/order-labels.mjs +7 -3
  28. package/dist/{parsing-B4OCHH1_.d.mts → parsing-B6ctfF80.d.mts} +2 -2
  29. package/dist/{parsing-DMdOq-BV.d.ts → parsing-ddZXZFP4.d.ts} +2 -2
  30. package/dist/parsing.d.mts +3 -3
  31. package/dist/parsing.d.ts +3 -3
  32. package/dist/parsing.js +6 -3
  33. package/dist/parsing.js.map +1 -1
  34. package/dist/parsing.mjs +3 -3
  35. package/dist/{plan-utils-BdYPRBno.d.ts → plan-utils--kQRzSE-.d.ts} +226 -7
  36. package/dist/{plan-utils-CD1Xu65s.d.mts → plan-utils-CKgNtDwQ.d.mts} +226 -7
  37. package/dist/plan-utils.d.mts +4 -3
  38. package/dist/plan-utils.d.ts +4 -3
  39. package/dist/plan-utils.js +202 -3
  40. package/dist/plan-utils.js.map +1 -1
  41. package/dist/plan-utils.mjs +40 -3
  42. package/dist/testing.d.mts +17 -5
  43. package/dist/testing.d.ts +17 -5
  44. package/dist/testing.js +45 -2
  45. package/dist/testing.js.map +1 -1
  46. package/dist/testing.mjs +45 -4
  47. package/dist/testing.mjs.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/chunk-HPNUFBIT.mjs.map +0 -1
  50. package/dist/chunk-J3YSTPCE.mjs.map +0 -1
  51. package/dist/chunk-LSGY7AIZ.mjs.map +0 -1
  52. package/dist/chunk-N66ZHFGN.mjs.map +0 -1
  53. package/dist/chunk-YU4UKKKI.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { L as IApproval } from './Task-CoKhvBa1.mjs';
1
+ import { L as IApproval } from './Task-BnLxkVQF.mjs';
2
2
 
3
3
  interface ToolOutcome {
4
4
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { L as IApproval } from './Task-CoKhvBa1.js';
1
+ import { L as IApproval } from './Task-BnLxkVQF.js';
2
2
 
3
3
  interface ToolOutcome {
4
4
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { aX as RunnerId } from './Task-CoKhvBa1.mjs';
1
+ import { a$ as RunnerId } from './Task-BnLxkVQF.mjs';
2
2
 
3
3
  interface RunnerModeInfo {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { aX as RunnerId } from './Task-CoKhvBa1.js';
1
+ import { a$ as RunnerId } from './Task-BnLxkVQF.js';
2
2
 
3
3
  interface RunnerModeInfo {
4
4
  id: string;
@@ -301,18 +301,49 @@ interface PreparedTask {
301
301
  * stay in the task, so the user is told.
302
302
  */
303
303
  copied: string[];
304
+ /** What the attempt this one replaces left unlanded, kept on a branch before its worktree went; absent when nothing was. */
305
+ preserved?: PreservedWork[];
306
+ }
307
+ /** A task as a removal names it. */
308
+ type IsolationTaskRef = Pick<IsolationTaskRecord, 'taskId' | 'order' | 'title'>;
309
+ /**
310
+ * Work a removal found that had not landed — edits never committed, or
311
+ * commits only the task's branch carried — committed and kept on `branch`,
312
+ * a branch of its own under `ordewell-preserved/`, before the worktree went.
313
+ */
314
+ interface PreservedWork {
315
+ /** Absent for a leftover directory no task record owned. */
316
+ task?: IsolationTaskRef;
317
+ repo: string;
318
+ branch: string;
319
+ /** The commit `branch` points at. */
320
+ commit: string;
321
+ }
322
+ /** A worktree a removal left in place, because the work in it could not be kept any other way. */
323
+ interface RefusedRemoval {
324
+ /** Absent for a leftover directory no task record owned. */
325
+ task?: IsolationTaskRef;
326
+ worktree: string;
327
+ /** What stopped git keeping it, in words a surface can repeat. */
328
+ reason: string;
329
+ }
330
+ /**
331
+ * What removing task worktrees did in place of deleting work. A removal never
332
+ * deletes work that has not landed: it keeps it on a branch first
333
+ * (`preserved`), and where it cannot, it leaves that worktree alone
334
+ * (`refused`) — so the record of a refused task stays too.
335
+ */
336
+ interface IsolationRemoval {
337
+ preserved: PreservedWork[];
338
+ refused: RefusedRemoval[];
304
339
  }
305
340
  /**
306
341
  * What a crash-recovery prune found and left alone: task records that were
307
342
  * `active` yet still held unlanded work, so the prune kept them as `kept`
308
343
  * rather than deleting work no one else has.
309
344
  */
310
- interface IsolationPruneResult {
311
- kept: Array<{
312
- taskId: string;
313
- order: number;
314
- title: string;
315
- }>;
345
+ interface IsolationPruneResult extends IsolationRemoval {
346
+ kept: IsolationTaskRef[];
316
347
  }
317
348
  /**
318
349
  * The tracked changes of a workspace's repos at one moment, against each
@@ -379,7 +410,9 @@ interface IWorktreeIsolation {
379
410
  integrate(task: Task, run: IsolationRun, persist?: () => void): Promise<IsolationOutcome>;
380
411
  /**
381
412
  * `keep: false` removes the task's worktree, branch and record (retry, task
382
- * removal). `keep: true` leaves the worktree and branch exactly as they are
413
+ * removal), keeping whatever had not landed on a branch first; a record
414
+ * whose work cannot be kept stays, off `active`. `keep: true` leaves the
415
+ * worktree and branch exactly as they are
383
416
  * for inspection — a failed verdict, a stop, a cancel — and only moves the task off `active`,
384
417
  * so a crash-recovery prune does not sweep it away; a repair it ends leaves
385
418
  * the task `conflict`, as it was before the repair. Takes the run rather than
@@ -388,7 +421,7 @@ interface IWorktreeIsolation {
388
421
  */
389
422
  release(run: IsolationRun, taskId: string, opts: {
390
423
  keep: boolean;
391
- }): Promise<void>;
424
+ }): Promise<IsolationRemoval>;
392
425
  /** End of run: park the integration branch for review and report what landed. */
393
426
  handoff(run: IsolationRun): Promise<IsolationHandoff>;
394
427
  /**
@@ -398,7 +431,8 @@ interface IWorktreeIsolation {
398
431
  * that still holds unlanded work — commits its branch alone carries, or
399
432
  * edits in its worktree — is not a crash orphan: it may belong to a runner
400
433
  * another host is still driving, so it is kept as `kept` and named in the
401
- * result.
434
+ * result. A leftover directory holding work is kept on a branch before it
435
+ * goes, as {@link release} does.
402
436
  */
403
437
  pruneOrphans(run: IsolationRun): Promise<IsolationPruneResult>;
404
438
  /** Unified diff of each repo's integration branch against its base ref. */
@@ -436,11 +470,12 @@ interface IWorktreeIsolation {
436
470
  /**
437
471
  * Remove every worktree and task branch of the run, and settle each repo's
438
472
  * integration branch as `integration` says. Anything but `keep` also clears
439
- * the run's task records.
473
+ * the run's task records, except those of worktrees it refused to remove.
474
+ * Work that had not landed is kept on a branch first, as {@link release} does.
440
475
  */
441
476
  discard(run: IsolationRun, opts: {
442
477
  integration: IntegrationDisposal;
443
- }): Promise<void>;
478
+ }): Promise<IsolationRemoval>;
444
479
  /**
445
480
  * Clear what other runs left in each repo of `run`'s group: every
446
481
  * `ordewell/<run-id>/…` branch the repo's checked-out HEAD already contains.
@@ -1081,6 +1116,8 @@ interface McpTool<H> {
1081
1116
  /** Validate `args` and hand them to the handler's method for this tool. */
1082
1117
  call(handler: H, args: unknown, context: McpToolContext): Promise<McpToolReply>;
1083
1118
  }
1119
+ /** The task tool whose call settles the attempt (ADR-0022, V1). */
1120
+ declare const TASK_COMPLETE_TOOL = "task_complete";
1084
1121
  declare const TASK_TOOLS: readonly McpTool<TaskToolHandler>[];
1085
1122
  declare const PLANNER_TOOLS: readonly McpTool<PlannerToolHandler>[];
1086
1123
 
@@ -1284,6 +1321,24 @@ type AgentEvent =
1284
1321
  type: 'turn_end';
1285
1322
  interrupted?: boolean;
1286
1323
  }
1324
+ /**
1325
+ * The model has a message handed over by {@link TaskModeAgentAdapter.steer},
1326
+ * by the runner's own account rather than because the write succeeded
1327
+ * (ADR-0023, D3). With no turn open, the runner opened one for it.
1328
+ */
1329
+ | {
1330
+ type: 'message_delivered';
1331
+ id: string;
1332
+ }
1333
+ /**
1334
+ * The runner let go of a message it accepted from `steer` without showing it
1335
+ * to the model — Codex does, for one its turn ended before consuming. It is
1336
+ * Ordewell's to send again (ADR-0023, D4).
1337
+ */
1338
+ | {
1339
+ type: 'message_dropped';
1340
+ id: string;
1341
+ }
1287
1342
  /** The turn failed. Carries the agent's own words — never a Ordewell paraphrase. */
1288
1343
  | {
1289
1344
  type: 'error';
@@ -1396,6 +1451,16 @@ interface TaskModeAgentAdapter extends AgentAdapter {
1396
1451
  onOutOfTurn?(listener: (event: AgentEvent) => void): void;
1397
1452
  /** Registers a listener for the process ending, for any reason. Fires at most once. */
1398
1453
  onProcessExit(listener: (code: number) => void): void;
1454
+ /**
1455
+ * Hand a message to the running turn, for the runner to show the model at
1456
+ * its next step boundary (ADR-0023, D1–D2). Resolves true once the runner
1457
+ * accepted it: handed over, not yet delivered — the turn's events later
1458
+ * carry `message_delivered` or `message_dropped` for `id`. False when the
1459
+ * runner refused it or no turn is running; the caller keeps it for the
1460
+ * turn's end. Absent on an adapter whose runner cannot take a message
1461
+ * mid-turn.
1462
+ */
1463
+ steer?(id: string, text: string): Promise<boolean>;
1399
1464
  /**
1400
1465
  * Answer an open `permission_request`. False when the id is not open — it
1401
1466
  * was answered, cancelled, or never asked.
@@ -1976,25 +2041,49 @@ type StructuredTurnEnd = 'completed' | 'interrupted' | 'failed';
1976
2041
  * full-fidelity task log, never for verdicts.
1977
2042
  */
1978
2043
  type StructuredEvent = Exclude<AgentEvent, {
1979
- type: 'turn_end';
1980
- } | {
1981
- type: 'permission_cancelled';
2044
+ type: 'turn_end' | 'permission_cancelled' | 'message_delivered' | 'message_dropped';
1982
2045
  }>
1983
- /** `text` is the user message the turn answers; `messageId` is set when it had waited in the queue. */
2046
+ /**
2047
+ * `text` is the user message the turn answers; `messageId` is set when it had
2048
+ * waited in the queue, `forced` when it was force sent (ADR-0023, Q2).
2049
+ */
1984
2050
  | {
1985
2051
  type: 'turn_start';
1986
2052
  text: string;
1987
2053
  messageId?: string;
2054
+ forced?: boolean;
1988
2055
  } | {
1989
2056
  type: 'turn_end';
1990
2057
  reason: StructuredTurnEnd;
1991
- } | {
2058
+ }
2059
+ /**
2060
+ * Waiting in Ordewell's queue — again, for a message the runner was handed
2061
+ * and let go of (ADR-0023, D4). `forced` puts it ahead of the rest, behind
2062
+ * earlier forced ones (F2); a message already listed moves there.
2063
+ */
2064
+ | {
1992
2065
  type: 'message_queued';
1993
2066
  messageId: string;
1994
2067
  text: string;
2068
+ forced?: boolean;
1995
2069
  } | {
1996
2070
  type: 'message_removed';
1997
2071
  messageId: string;
2072
+ } | {
2073
+ type: 'message_undelivered';
2074
+ messageId: string;
2075
+ text: string;
2076
+ }
2077
+ /** The runner accepted the message into its running turn; it can no longer be taken back (ADR-0023, D3). */
2078
+ | {
2079
+ type: 'message_handed_over';
2080
+ messageId: string;
2081
+ }
2082
+ /** The model read the message inside the running turn, at this point of it (ADR-0023, Q2). */
2083
+ | {
2084
+ type: 'message_delivered';
2085
+ messageId: string;
2086
+ text: string;
1998
2087
  }
1999
2088
  /** An open `permission_request` was answered, by whoever answered it (ADR-0018, A1). */
2000
2089
  | {
@@ -2010,6 +2099,10 @@ type StructuredEvent = Exclude<AgentEvent, {
2010
2099
  interface QueuedTaskMessage {
2011
2100
  id: string;
2012
2101
  text: string;
2102
+ /** The runner has it and owes a delivery, so it cannot be taken back (ADR-0023, Q1). */
2103
+ handedOver?: boolean;
2104
+ /** Force sent: it goes out as soon as the running turn is interrupted (ADR-0023, F1). */
2105
+ forced?: boolean;
2013
2106
  }
2014
2107
  /**
2015
2108
  * What a session driven over its runner's protocol can do that a terminal
@@ -2023,13 +2116,23 @@ interface StructuredSessionCapability {
2023
2116
  onTurnEnd(listener: (reason: StructuredTurnEnd) => void): void;
2024
2117
  onEvent(listener: (event: StructuredEvent) => void): void;
2025
2118
  /**
2026
- * Queue a user message, delivered when the current turn ends — or at once
2027
- * when idle. Returns its id, for {@link removeQueued}.
2119
+ * Send a user message: at once when idle; while a turn runs, handed to the
2120
+ * runner for its next step where it can take one, otherwise queued until
2121
+ * the turn ends (ADR-0023). Returns its id, for {@link removeQueued}.
2028
2122
  */
2029
2123
  sendMessage(text: string): string;
2030
- /** Take a message back before it is delivered. False when it already was. */
2124
+ /**
2125
+ * Force send (ADR-0023, F1–F3): interrupt the running turn, as
2126
+ * {@link interrupt} does, and deliver this message as the turn that
2127
+ * replaces it, ahead of anything still queued. The task does not wait for
2128
+ * input in between. With no turn running it is {@link sendMessage}.
2129
+ */
2130
+ forceSend(text: string): string;
2131
+ /** Force send a message still queued, by id. False once it was handed over or delivered. */
2132
+ forceSendQueued(id: string): boolean;
2133
+ /** Take a message back before the runner has it. False once it was handed over or delivered. */
2031
2134
  removeQueued(id: string): boolean;
2032
- /** Messages waiting for the current turn to end, oldest first. */
2135
+ /** Messages not yet delivered, oldest first: queued ones, and ones handed over that the runner owes. */
2033
2136
  queued(): QueuedTaskMessage[];
2034
2137
  /**
2035
2138
  * Stop the running turn, keeping the session: a soft interrupt first, then —
@@ -2432,6 +2535,22 @@ declare function migratePlanState(raw: unknown): PlanState;
2432
2535
  declare function migrateLegacyPlan(legacy: LegacyPlanState): PlanState;
2433
2536
 
2434
2537
  declare function createTask(overrides?: Partial<Task>): Task;
2538
+ /**
2539
+ * The `ops` flag as a task stores it (ADR-0020), however it arrived. Only a
2540
+ * literal `true` on an AI task marks an ops task: the planner's JSON is
2541
+ * untyped, and a quoted "true" read as ops would move a task out of its
2542
+ * worktree. Anything else is a change task, stored absent so saved plans need
2543
+ * no migration. Whether the task may be ops at all — a subtask may not — is
2544
+ * for whoever knows where it sits: parsing drops the flag, an edit refuses it.
2545
+ */
2546
+ declare function opsFlag(value: unknown, type?: Task['type']): true | undefined;
2547
+ /**
2548
+ * The flag of a task a merge or a split makes from others: what the edit
2549
+ * chose, else ops only when every task it came from was. A merge that takes
2550
+ * in a change edits files, so it is a change; a split part runs where its
2551
+ * task did.
2552
+ */
2553
+ declare function inheritedOps(from: readonly Pick<Task, 'ops'>[], chosen?: boolean): boolean;
2435
2554
  declare function createEmptyPlan(): LegacyPlanState;
2436
2555
  declare function flattenTasks(tasks: readonly Task[]): Task[];
2437
2556
  /** A flattened task with the parent it hangs under, null for a top-level task. */
@@ -2472,4 +2591,4 @@ interface ValidationContext {
2472
2591
  type ValidationCheck = (ctx: ValidationContext) => ValidationResult;
2473
2592
  declare function warningsText(w: PlanModificationWarnings): string | null;
2474
2593
 
2475
- export { type IsolationOutcome as $, AbstractRunner as A, type BlockingPrompt as B, CMD_EXE_MAX_COMMAND_LINE as C, DENY_ALL as D, type EditPlanArgs as E, EmbeddedNewlineError as F, ExecutableNotFoundError as G, type FetchAllProviderModelsOptions as H, HeadlessRunner as I, type HeadlessRunnerDeps as J, HeadlessSession as K, type IApproval as L, type IConfig as M, type IPluginStore as N, type ITerminalRunner as O, type ITerminalSession as P, type IWorktreeIsolation as Q, type IntegrationDisposal as R, type IsolationAvailability as S, type IsolationHandoff as T, type IsolationHandoffRepo as U, type IsolationInactiveReason as V, type IsolationLandedTask as W, type IsolationLanding as X, type IsolationMergeBlock as Y, type IsolationMergeBlockReason as Z, type IsolationMergeResult as _, AbstractTerminalSession as a, type RunnerSpawnOptions as a$, type IsolationPruneResult as a0, type IsolationRepo as a1, type IsolationRun as a2, type IsolationTaskRecord as a3, type IsolationTaskRepo as a4, type IsolationTaskStatus as a5, type IsolationView as a6, type LaunchDeps as a7, type LaunchPlan as a8, type LegacyPlanState as a9, type PluginCloneFn as aA, type PluginEntry as aB, type PluginFeatures as aC, type PluginMode as aD, type PluginModelDiscovery as aE, type PluginRunnerDef as aF, type PreparedLaunch as aG, type PreparedTask as aH, type ProviderCredentialSource as aI, type ProviderModelLists as aJ, type ProviderModelsResult as aK, type PtySize as aL, type PtyWrapOptions as aM, type QueuedMessage as aN, type QueuedTaskMessage as aO, type RepairEvidence as aP, type RepoGroupLayout as aQ, type ResearchLogEntry as aR, type ResearchProgress as aS, type ResearchStep as aT, type ResearchStepOutcome as aU, type ResearchToolType as aV, type ResolveContext as aW, type RunnerId as aX, type RunnerInvocation as aY, type RunnerPluginManifest as aZ, RunnerRegistry as a_, LineBuffer as aa, type ListModelsArgs as ab, type ListRunnersArgs as ac, type McpClientConfig as ad, type McpCredential as ae, type McpTool as af, type McpToolContext as ag, type McpToolReply as ah, type Message as ai, ModelCatalog as aj, type ModelShortcut as ak, ORCHESTRATOR_SHORTCUTS as al, ORDEWELL_MCP_PATH as am, ORDEWELL_MCP_SERVER_NAME as an, type OrchestratorOption as ao, OrdewellMcpServer as ap, type OwnerOnlyFile as aq, PLANNER_TOOLS as ar, type PlanIsolation as as, type PlanModificationWarnings as at, type PlanState as au, type PlanStatus as av, type PlannerStartOptions as aw, type PlannerTokenScope as ax, type PlannerToolHandler as ay, type PlannerUsage as az, type ActiveTaskSession as b, isRunnerApproval as b$, type RunnerTransport as b0, type RunnerVersionProbe as b1, type StreamEvent as b2, type StreamStepEvent as b3, type StreamThinkingEvent as b4, type StructuredEvent as b5, type StructuredSessionCapability as b6, type StructuredTurnEnd as b7, type SubagentLogEntry as b8, type SubagentOutcome as b9, type UsageTotals as bA, type UserPromptEntry as bB, type UserStep as bC, type ValidationCheck as bD, type ValidationContext as bE, type ValidationResult as bF, type Verdict as bG, type VerificationCheck as bH, WINDOWS_MAX_COMMAND_LINE as bI, addPlannerUsage as bJ, addTaskToPlan as bK, addUsage as bL, approvalScopes as bM, buildShellInvocation as bN, collectProviderCredentials as bO, createEmptyPlan as bP, createTask as bQ, emptyWarnings as bR, enabledRunners as bS, fetchAllProviderModels as bT, flattenTasks as bU, flattenTasksWithParents as bV, isAwaitingReason as bW, isExecutableResolved as bX, isGranted as bY, isMeasured as bZ, isReservedRunnerName as b_, type SubmitPlanArgs as ba, TASK_TOOLS as bb, type Task as bc, type TaskCompleteArgs as bd, type TaskIsolation as be, type TaskIsolationState as bf, type TaskMode as bg, type TaskModeAgentAdapter as bh, TaskModeUnsupportedError as bi, type TaskModelAssignment as bj, type TaskOutputArgs as bk, type TaskOutputSummary as bl, type TaskQueryArgs as bm, type TaskRunnerFlags as bn, type TaskSnapshot as bo, type TaskStartOptions as bp, type TaskStatus as bq, type TaskTokenScope as br, type TaskToolHandler as bs, type TaskTransport as bt, type TaskType as bu, type TaskWithParent as bv, type ThinkingBlock as bw, type TreeSnapshot as bx, type UsageLine as by, type UsageRecord as bz, type AgentAdapter as c, isRunnerTransport as c0, isStructuredSession as c1, keepExecutionState as c2, knownModelId as c3, mcpClientConfig as c4, migrateLegacyPlan as c5, migratePlanState as c6, migrateTask as c7, ownerOnlyConfigFile as c8, partedPromptUsage as c9, planDirectLaunch as ca, planShellLaunch as cb, plannerContextFill as cc, posixShellQuote as cd, removeTaskFromPlan as ce, renumberTasks as cf, resolveModelShortcut as cg, resolveProvider as ch, sharedMcpServer as ci, stripAnsi as cj, toApprovalDecision as ck, toOrchestratorOptions as cl, updateTaskInPlan as cm, usageLine as cn, validateModifiedPlan as co, warningsText as cp, windowsCommandLine as cq, wrapWithPty as cr, type AgentAdapterFactory as d, type AgentEvent as e, type AgentProcessDeps as f, type AgentStartOptions as g, type AiProvider as h, type AllProviderModels as i, type ApprovalAnswer as j, type ApprovalDecision as k, type ApprovalKind as l, type ApprovalMode as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type AwaitingReason as r, type CatalogModel as s, type CheckpointAnswer as t, type CheckpointArgs as u, CommandLineTooLongError as v, type ConversationMessage as w, type DiscoveredMode as x, type DiscoveredModel as y, type DiscoveryCommand as z };
2594
+ export { type IsolationOutcome as $, AbstractRunner as A, type BlockingPrompt as B, CMD_EXE_MAX_COMMAND_LINE as C, DENY_ALL as D, type EditPlanArgs as E, EmbeddedNewlineError as F, ExecutableNotFoundError as G, type FetchAllProviderModelsOptions as H, HeadlessRunner as I, type HeadlessRunnerDeps as J, HeadlessSession as K, type IApproval as L, type IConfig as M, type IPluginStore as N, type ITerminalRunner as O, type ITerminalSession as P, type IWorktreeIsolation as Q, type IntegrationDisposal as R, type IsolationAvailability as S, type IsolationHandoff as T, type IsolationHandoffRepo as U, type IsolationInactiveReason as V, type IsolationLandedTask as W, type IsolationLanding as X, type IsolationMergeBlock as Y, type IsolationMergeBlockReason as Z, type IsolationMergeResult as _, AbstractTerminalSession as a, type RunnerId as a$, type IsolationPruneResult as a0, type IsolationRemoval as a1, type IsolationRepo as a2, type IsolationRun as a3, type IsolationTaskRecord as a4, type IsolationTaskRef as a5, type IsolationTaskRepo as a6, type IsolationTaskStatus as a7, type IsolationView as a8, type LaunchDeps as a9, type PlannerToolHandler as aA, type PlannerUsage as aB, type PluginCloneFn as aC, type PluginEntry as aD, type PluginFeatures as aE, type PluginMode as aF, type PluginModelDiscovery as aG, type PluginRunnerDef as aH, type PreparedLaunch as aI, type PreparedTask as aJ, type PreservedWork as aK, type ProviderCredentialSource as aL, type ProviderModelLists as aM, type ProviderModelsResult as aN, type PtySize as aO, type PtyWrapOptions as aP, type QueuedMessage as aQ, type QueuedTaskMessage as aR, type RefusedRemoval as aS, type RepairEvidence as aT, type RepoGroupLayout as aU, type ResearchLogEntry as aV, type ResearchProgress as aW, type ResearchStep as aX, type ResearchStepOutcome as aY, type ResearchToolType as aZ, type ResolveContext as a_, type LaunchPlan as aa, type LegacyPlanState as ab, LineBuffer as ac, type ListModelsArgs as ad, type ListRunnersArgs as ae, type McpClientConfig as af, type McpCredential as ag, type McpTool as ah, type McpToolContext as ai, type McpToolReply as aj, type Message as ak, ModelCatalog as al, type ModelShortcut as am, ORCHESTRATOR_SHORTCUTS as an, ORDEWELL_MCP_PATH as ao, ORDEWELL_MCP_SERVER_NAME as ap, type OrchestratorOption as aq, OrdewellMcpServer as ar, type OwnerOnlyFile as as, PLANNER_TOOLS as at, type PlanIsolation as au, type PlanModificationWarnings as av, type PlanState as aw, type PlanStatus as ax, type PlannerStartOptions as ay, type PlannerTokenScope as az, type ActiveTaskSession as b, inheritedOps as b$, type RunnerInvocation as b0, type RunnerPluginManifest as b1, RunnerRegistry as b2, type RunnerSpawnOptions as b3, type RunnerTransport as b4, type RunnerVersionProbe as b5, type StreamEvent as b6, type StreamStepEvent as b7, type StreamThinkingEvent as b8, type StructuredEvent as b9, type TaskWithParent as bA, type ThinkingBlock as bB, type TreeSnapshot as bC, type UsageLine as bD, type UsageRecord as bE, type UsageTotals as bF, type UserPromptEntry as bG, type UserStep as bH, type ValidationCheck as bI, type ValidationContext as bJ, type ValidationResult as bK, type Verdict as bL, type VerificationCheck as bM, WINDOWS_MAX_COMMAND_LINE as bN, addPlannerUsage as bO, addTaskToPlan as bP, addUsage as bQ, approvalScopes as bR, buildShellInvocation as bS, collectProviderCredentials as bT, createEmptyPlan as bU, createTask as bV, emptyWarnings as bW, enabledRunners as bX, fetchAllProviderModels as bY, flattenTasks as bZ, flattenTasksWithParents as b_, type StructuredSessionCapability as ba, type StructuredTurnEnd as bb, type SubagentLogEntry as bc, type SubagentOutcome as bd, type SubmitPlanArgs as be, TASK_COMPLETE_TOOL as bf, TASK_TOOLS as bg, type Task as bh, type TaskCompleteArgs as bi, type TaskIsolation as bj, type TaskIsolationState as bk, type TaskMode as bl, type TaskModeAgentAdapter as bm, TaskModeUnsupportedError as bn, type TaskModelAssignment as bo, type TaskOutputArgs as bp, type TaskOutputSummary as bq, type TaskQueryArgs as br, type TaskRunnerFlags as bs, type TaskSnapshot as bt, type TaskStartOptions as bu, type TaskStatus as bv, type TaskTokenScope as bw, type TaskToolHandler as bx, type TaskTransport as by, type TaskType as bz, type AgentAdapter as c, isAwaitingReason as c0, isExecutableResolved as c1, isGranted as c2, isMeasured as c3, isReservedRunnerName as c4, isRunnerApproval as c5, isRunnerTransport as c6, isStructuredSession as c7, keepExecutionState as c8, knownModelId as c9, mcpClientConfig as ca, migrateLegacyPlan as cb, migratePlanState as cc, migrateTask as cd, opsFlag as ce, ownerOnlyConfigFile as cf, partedPromptUsage as cg, planDirectLaunch as ch, planShellLaunch as ci, plannerContextFill as cj, posixShellQuote as ck, removeTaskFromPlan as cl, renumberTasks as cm, resolveModelShortcut as cn, resolveProvider as co, sharedMcpServer as cp, stripAnsi as cq, toApprovalDecision as cr, toOrchestratorOptions as cs, updateTaskInPlan as ct, usageLine as cu, validateModifiedPlan as cv, warningsText as cw, windowsCommandLine as cx, wrapWithPty as cy, type AgentAdapterFactory as d, type AgentEvent as e, type AgentProcessDeps as f, type AgentStartOptions as g, type AiProvider as h, type AllProviderModels as i, type ApprovalAnswer as j, type ApprovalDecision as k, type ApprovalKind as l, type ApprovalMode as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type AwaitingReason as r, type CatalogModel as s, type CheckpointAnswer as t, type CheckpointArgs as u, CommandLineTooLongError as v, type ConversationMessage as w, type DiscoveredMode as x, type DiscoveredModel as y, type DiscoveryCommand as z };
@@ -301,18 +301,49 @@ interface PreparedTask {
301
301
  * stay in the task, so the user is told.
302
302
  */
303
303
  copied: string[];
304
+ /** What the attempt this one replaces left unlanded, kept on a branch before its worktree went; absent when nothing was. */
305
+ preserved?: PreservedWork[];
306
+ }
307
+ /** A task as a removal names it. */
308
+ type IsolationTaskRef = Pick<IsolationTaskRecord, 'taskId' | 'order' | 'title'>;
309
+ /**
310
+ * Work a removal found that had not landed — edits never committed, or
311
+ * commits only the task's branch carried — committed and kept on `branch`,
312
+ * a branch of its own under `ordewell-preserved/`, before the worktree went.
313
+ */
314
+ interface PreservedWork {
315
+ /** Absent for a leftover directory no task record owned. */
316
+ task?: IsolationTaskRef;
317
+ repo: string;
318
+ branch: string;
319
+ /** The commit `branch` points at. */
320
+ commit: string;
321
+ }
322
+ /** A worktree a removal left in place, because the work in it could not be kept any other way. */
323
+ interface RefusedRemoval {
324
+ /** Absent for a leftover directory no task record owned. */
325
+ task?: IsolationTaskRef;
326
+ worktree: string;
327
+ /** What stopped git keeping it, in words a surface can repeat. */
328
+ reason: string;
329
+ }
330
+ /**
331
+ * What removing task worktrees did in place of deleting work. A removal never
332
+ * deletes work that has not landed: it keeps it on a branch first
333
+ * (`preserved`), and where it cannot, it leaves that worktree alone
334
+ * (`refused`) — so the record of a refused task stays too.
335
+ */
336
+ interface IsolationRemoval {
337
+ preserved: PreservedWork[];
338
+ refused: RefusedRemoval[];
304
339
  }
305
340
  /**
306
341
  * What a crash-recovery prune found and left alone: task records that were
307
342
  * `active` yet still held unlanded work, so the prune kept them as `kept`
308
343
  * rather than deleting work no one else has.
309
344
  */
310
- interface IsolationPruneResult {
311
- kept: Array<{
312
- taskId: string;
313
- order: number;
314
- title: string;
315
- }>;
345
+ interface IsolationPruneResult extends IsolationRemoval {
346
+ kept: IsolationTaskRef[];
316
347
  }
317
348
  /**
318
349
  * The tracked changes of a workspace's repos at one moment, against each
@@ -379,7 +410,9 @@ interface IWorktreeIsolation {
379
410
  integrate(task: Task, run: IsolationRun, persist?: () => void): Promise<IsolationOutcome>;
380
411
  /**
381
412
  * `keep: false` removes the task's worktree, branch and record (retry, task
382
- * removal). `keep: true` leaves the worktree and branch exactly as they are
413
+ * removal), keeping whatever had not landed on a branch first; a record
414
+ * whose work cannot be kept stays, off `active`. `keep: true` leaves the
415
+ * worktree and branch exactly as they are
383
416
  * for inspection — a failed verdict, a stop, a cancel — and only moves the task off `active`,
384
417
  * so a crash-recovery prune does not sweep it away; a repair it ends leaves
385
418
  * the task `conflict`, as it was before the repair. Takes the run rather than
@@ -388,7 +421,7 @@ interface IWorktreeIsolation {
388
421
  */
389
422
  release(run: IsolationRun, taskId: string, opts: {
390
423
  keep: boolean;
391
- }): Promise<void>;
424
+ }): Promise<IsolationRemoval>;
392
425
  /** End of run: park the integration branch for review and report what landed. */
393
426
  handoff(run: IsolationRun): Promise<IsolationHandoff>;
394
427
  /**
@@ -398,7 +431,8 @@ interface IWorktreeIsolation {
398
431
  * that still holds unlanded work — commits its branch alone carries, or
399
432
  * edits in its worktree — is not a crash orphan: it may belong to a runner
400
433
  * another host is still driving, so it is kept as `kept` and named in the
401
- * result.
434
+ * result. A leftover directory holding work is kept on a branch before it
435
+ * goes, as {@link release} does.
402
436
  */
403
437
  pruneOrphans(run: IsolationRun): Promise<IsolationPruneResult>;
404
438
  /** Unified diff of each repo's integration branch against its base ref. */
@@ -436,11 +470,12 @@ interface IWorktreeIsolation {
436
470
  /**
437
471
  * Remove every worktree and task branch of the run, and settle each repo's
438
472
  * integration branch as `integration` says. Anything but `keep` also clears
439
- * the run's task records.
473
+ * the run's task records, except those of worktrees it refused to remove.
474
+ * Work that had not landed is kept on a branch first, as {@link release} does.
440
475
  */
441
476
  discard(run: IsolationRun, opts: {
442
477
  integration: IntegrationDisposal;
443
- }): Promise<void>;
478
+ }): Promise<IsolationRemoval>;
444
479
  /**
445
480
  * Clear what other runs left in each repo of `run`'s group: every
446
481
  * `ordewell/<run-id>/…` branch the repo's checked-out HEAD already contains.
@@ -1081,6 +1116,8 @@ interface McpTool<H> {
1081
1116
  /** Validate `args` and hand them to the handler's method for this tool. */
1082
1117
  call(handler: H, args: unknown, context: McpToolContext): Promise<McpToolReply>;
1083
1118
  }
1119
+ /** The task tool whose call settles the attempt (ADR-0022, V1). */
1120
+ declare const TASK_COMPLETE_TOOL = "task_complete";
1084
1121
  declare const TASK_TOOLS: readonly McpTool<TaskToolHandler>[];
1085
1122
  declare const PLANNER_TOOLS: readonly McpTool<PlannerToolHandler>[];
1086
1123
 
@@ -1284,6 +1321,24 @@ type AgentEvent =
1284
1321
  type: 'turn_end';
1285
1322
  interrupted?: boolean;
1286
1323
  }
1324
+ /**
1325
+ * The model has a message handed over by {@link TaskModeAgentAdapter.steer},
1326
+ * by the runner's own account rather than because the write succeeded
1327
+ * (ADR-0023, D3). With no turn open, the runner opened one for it.
1328
+ */
1329
+ | {
1330
+ type: 'message_delivered';
1331
+ id: string;
1332
+ }
1333
+ /**
1334
+ * The runner let go of a message it accepted from `steer` without showing it
1335
+ * to the model — Codex does, for one its turn ended before consuming. It is
1336
+ * Ordewell's to send again (ADR-0023, D4).
1337
+ */
1338
+ | {
1339
+ type: 'message_dropped';
1340
+ id: string;
1341
+ }
1287
1342
  /** The turn failed. Carries the agent's own words — never a Ordewell paraphrase. */
1288
1343
  | {
1289
1344
  type: 'error';
@@ -1396,6 +1451,16 @@ interface TaskModeAgentAdapter extends AgentAdapter {
1396
1451
  onOutOfTurn?(listener: (event: AgentEvent) => void): void;
1397
1452
  /** Registers a listener for the process ending, for any reason. Fires at most once. */
1398
1453
  onProcessExit(listener: (code: number) => void): void;
1454
+ /**
1455
+ * Hand a message to the running turn, for the runner to show the model at
1456
+ * its next step boundary (ADR-0023, D1–D2). Resolves true once the runner
1457
+ * accepted it: handed over, not yet delivered — the turn's events later
1458
+ * carry `message_delivered` or `message_dropped` for `id`. False when the
1459
+ * runner refused it or no turn is running; the caller keeps it for the
1460
+ * turn's end. Absent on an adapter whose runner cannot take a message
1461
+ * mid-turn.
1462
+ */
1463
+ steer?(id: string, text: string): Promise<boolean>;
1399
1464
  /**
1400
1465
  * Answer an open `permission_request`. False when the id is not open — it
1401
1466
  * was answered, cancelled, or never asked.
@@ -1976,25 +2041,49 @@ type StructuredTurnEnd = 'completed' | 'interrupted' | 'failed';
1976
2041
  * full-fidelity task log, never for verdicts.
1977
2042
  */
1978
2043
  type StructuredEvent = Exclude<AgentEvent, {
1979
- type: 'turn_end';
1980
- } | {
1981
- type: 'permission_cancelled';
2044
+ type: 'turn_end' | 'permission_cancelled' | 'message_delivered' | 'message_dropped';
1982
2045
  }>
1983
- /** `text` is the user message the turn answers; `messageId` is set when it had waited in the queue. */
2046
+ /**
2047
+ * `text` is the user message the turn answers; `messageId` is set when it had
2048
+ * waited in the queue, `forced` when it was force sent (ADR-0023, Q2).
2049
+ */
1984
2050
  | {
1985
2051
  type: 'turn_start';
1986
2052
  text: string;
1987
2053
  messageId?: string;
2054
+ forced?: boolean;
1988
2055
  } | {
1989
2056
  type: 'turn_end';
1990
2057
  reason: StructuredTurnEnd;
1991
- } | {
2058
+ }
2059
+ /**
2060
+ * Waiting in Ordewell's queue — again, for a message the runner was handed
2061
+ * and let go of (ADR-0023, D4). `forced` puts it ahead of the rest, behind
2062
+ * earlier forced ones (F2); a message already listed moves there.
2063
+ */
2064
+ | {
1992
2065
  type: 'message_queued';
1993
2066
  messageId: string;
1994
2067
  text: string;
2068
+ forced?: boolean;
1995
2069
  } | {
1996
2070
  type: 'message_removed';
1997
2071
  messageId: string;
2072
+ } | {
2073
+ type: 'message_undelivered';
2074
+ messageId: string;
2075
+ text: string;
2076
+ }
2077
+ /** The runner accepted the message into its running turn; it can no longer be taken back (ADR-0023, D3). */
2078
+ | {
2079
+ type: 'message_handed_over';
2080
+ messageId: string;
2081
+ }
2082
+ /** The model read the message inside the running turn, at this point of it (ADR-0023, Q2). */
2083
+ | {
2084
+ type: 'message_delivered';
2085
+ messageId: string;
2086
+ text: string;
1998
2087
  }
1999
2088
  /** An open `permission_request` was answered, by whoever answered it (ADR-0018, A1). */
2000
2089
  | {
@@ -2010,6 +2099,10 @@ type StructuredEvent = Exclude<AgentEvent, {
2010
2099
  interface QueuedTaskMessage {
2011
2100
  id: string;
2012
2101
  text: string;
2102
+ /** The runner has it and owes a delivery, so it cannot be taken back (ADR-0023, Q1). */
2103
+ handedOver?: boolean;
2104
+ /** Force sent: it goes out as soon as the running turn is interrupted (ADR-0023, F1). */
2105
+ forced?: boolean;
2013
2106
  }
2014
2107
  /**
2015
2108
  * What a session driven over its runner's protocol can do that a terminal
@@ -2023,13 +2116,23 @@ interface StructuredSessionCapability {
2023
2116
  onTurnEnd(listener: (reason: StructuredTurnEnd) => void): void;
2024
2117
  onEvent(listener: (event: StructuredEvent) => void): void;
2025
2118
  /**
2026
- * Queue a user message, delivered when the current turn ends — or at once
2027
- * when idle. Returns its id, for {@link removeQueued}.
2119
+ * Send a user message: at once when idle; while a turn runs, handed to the
2120
+ * runner for its next step where it can take one, otherwise queued until
2121
+ * the turn ends (ADR-0023). Returns its id, for {@link removeQueued}.
2028
2122
  */
2029
2123
  sendMessage(text: string): string;
2030
- /** Take a message back before it is delivered. False when it already was. */
2124
+ /**
2125
+ * Force send (ADR-0023, F1–F3): interrupt the running turn, as
2126
+ * {@link interrupt} does, and deliver this message as the turn that
2127
+ * replaces it, ahead of anything still queued. The task does not wait for
2128
+ * input in between. With no turn running it is {@link sendMessage}.
2129
+ */
2130
+ forceSend(text: string): string;
2131
+ /** Force send a message still queued, by id. False once it was handed over or delivered. */
2132
+ forceSendQueued(id: string): boolean;
2133
+ /** Take a message back before the runner has it. False once it was handed over or delivered. */
2031
2134
  removeQueued(id: string): boolean;
2032
- /** Messages waiting for the current turn to end, oldest first. */
2135
+ /** Messages not yet delivered, oldest first: queued ones, and ones handed over that the runner owes. */
2033
2136
  queued(): QueuedTaskMessage[];
2034
2137
  /**
2035
2138
  * Stop the running turn, keeping the session: a soft interrupt first, then —
@@ -2432,6 +2535,22 @@ declare function migratePlanState(raw: unknown): PlanState;
2432
2535
  declare function migrateLegacyPlan(legacy: LegacyPlanState): PlanState;
2433
2536
 
2434
2537
  declare function createTask(overrides?: Partial<Task>): Task;
2538
+ /**
2539
+ * The `ops` flag as a task stores it (ADR-0020), however it arrived. Only a
2540
+ * literal `true` on an AI task marks an ops task: the planner's JSON is
2541
+ * untyped, and a quoted "true" read as ops would move a task out of its
2542
+ * worktree. Anything else is a change task, stored absent so saved plans need
2543
+ * no migration. Whether the task may be ops at all — a subtask may not — is
2544
+ * for whoever knows where it sits: parsing drops the flag, an edit refuses it.
2545
+ */
2546
+ declare function opsFlag(value: unknown, type?: Task['type']): true | undefined;
2547
+ /**
2548
+ * The flag of a task a merge or a split makes from others: what the edit
2549
+ * chose, else ops only when every task it came from was. A merge that takes
2550
+ * in a change edits files, so it is a change; a split part runs where its
2551
+ * task did.
2552
+ */
2553
+ declare function inheritedOps(from: readonly Pick<Task, 'ops'>[], chosen?: boolean): boolean;
2435
2554
  declare function createEmptyPlan(): LegacyPlanState;
2436
2555
  declare function flattenTasks(tasks: readonly Task[]): Task[];
2437
2556
  /** A flattened task with the parent it hangs under, null for a top-level task. */
@@ -2472,4 +2591,4 @@ interface ValidationContext {
2472
2591
  type ValidationCheck = (ctx: ValidationContext) => ValidationResult;
2473
2592
  declare function warningsText(w: PlanModificationWarnings): string | null;
2474
2593
 
2475
- export { type IsolationOutcome as $, AbstractRunner as A, type BlockingPrompt as B, CMD_EXE_MAX_COMMAND_LINE as C, DENY_ALL as D, type EditPlanArgs as E, EmbeddedNewlineError as F, ExecutableNotFoundError as G, type FetchAllProviderModelsOptions as H, HeadlessRunner as I, type HeadlessRunnerDeps as J, HeadlessSession as K, type IApproval as L, type IConfig as M, type IPluginStore as N, type ITerminalRunner as O, type ITerminalSession as P, type IWorktreeIsolation as Q, type IntegrationDisposal as R, type IsolationAvailability as S, type IsolationHandoff as T, type IsolationHandoffRepo as U, type IsolationInactiveReason as V, type IsolationLandedTask as W, type IsolationLanding as X, type IsolationMergeBlock as Y, type IsolationMergeBlockReason as Z, type IsolationMergeResult as _, AbstractTerminalSession as a, type RunnerSpawnOptions as a$, type IsolationPruneResult as a0, type IsolationRepo as a1, type IsolationRun as a2, type IsolationTaskRecord as a3, type IsolationTaskRepo as a4, type IsolationTaskStatus as a5, type IsolationView as a6, type LaunchDeps as a7, type LaunchPlan as a8, type LegacyPlanState as a9, type PluginCloneFn as aA, type PluginEntry as aB, type PluginFeatures as aC, type PluginMode as aD, type PluginModelDiscovery as aE, type PluginRunnerDef as aF, type PreparedLaunch as aG, type PreparedTask as aH, type ProviderCredentialSource as aI, type ProviderModelLists as aJ, type ProviderModelsResult as aK, type PtySize as aL, type PtyWrapOptions as aM, type QueuedMessage as aN, type QueuedTaskMessage as aO, type RepairEvidence as aP, type RepoGroupLayout as aQ, type ResearchLogEntry as aR, type ResearchProgress as aS, type ResearchStep as aT, type ResearchStepOutcome as aU, type ResearchToolType as aV, type ResolveContext as aW, type RunnerId as aX, type RunnerInvocation as aY, type RunnerPluginManifest as aZ, RunnerRegistry as a_, LineBuffer as aa, type ListModelsArgs as ab, type ListRunnersArgs as ac, type McpClientConfig as ad, type McpCredential as ae, type McpTool as af, type McpToolContext as ag, type McpToolReply as ah, type Message as ai, ModelCatalog as aj, type ModelShortcut as ak, ORCHESTRATOR_SHORTCUTS as al, ORDEWELL_MCP_PATH as am, ORDEWELL_MCP_SERVER_NAME as an, type OrchestratorOption as ao, OrdewellMcpServer as ap, type OwnerOnlyFile as aq, PLANNER_TOOLS as ar, type PlanIsolation as as, type PlanModificationWarnings as at, type PlanState as au, type PlanStatus as av, type PlannerStartOptions as aw, type PlannerTokenScope as ax, type PlannerToolHandler as ay, type PlannerUsage as az, type ActiveTaskSession as b, isRunnerApproval as b$, type RunnerTransport as b0, type RunnerVersionProbe as b1, type StreamEvent as b2, type StreamStepEvent as b3, type StreamThinkingEvent as b4, type StructuredEvent as b5, type StructuredSessionCapability as b6, type StructuredTurnEnd as b7, type SubagentLogEntry as b8, type SubagentOutcome as b9, type UsageTotals as bA, type UserPromptEntry as bB, type UserStep as bC, type ValidationCheck as bD, type ValidationContext as bE, type ValidationResult as bF, type Verdict as bG, type VerificationCheck as bH, WINDOWS_MAX_COMMAND_LINE as bI, addPlannerUsage as bJ, addTaskToPlan as bK, addUsage as bL, approvalScopes as bM, buildShellInvocation as bN, collectProviderCredentials as bO, createEmptyPlan as bP, createTask as bQ, emptyWarnings as bR, enabledRunners as bS, fetchAllProviderModels as bT, flattenTasks as bU, flattenTasksWithParents as bV, isAwaitingReason as bW, isExecutableResolved as bX, isGranted as bY, isMeasured as bZ, isReservedRunnerName as b_, type SubmitPlanArgs as ba, TASK_TOOLS as bb, type Task as bc, type TaskCompleteArgs as bd, type TaskIsolation as be, type TaskIsolationState as bf, type TaskMode as bg, type TaskModeAgentAdapter as bh, TaskModeUnsupportedError as bi, type TaskModelAssignment as bj, type TaskOutputArgs as bk, type TaskOutputSummary as bl, type TaskQueryArgs as bm, type TaskRunnerFlags as bn, type TaskSnapshot as bo, type TaskStartOptions as bp, type TaskStatus as bq, type TaskTokenScope as br, type TaskToolHandler as bs, type TaskTransport as bt, type TaskType as bu, type TaskWithParent as bv, type ThinkingBlock as bw, type TreeSnapshot as bx, type UsageLine as by, type UsageRecord as bz, type AgentAdapter as c, isRunnerTransport as c0, isStructuredSession as c1, keepExecutionState as c2, knownModelId as c3, mcpClientConfig as c4, migrateLegacyPlan as c5, migratePlanState as c6, migrateTask as c7, ownerOnlyConfigFile as c8, partedPromptUsage as c9, planDirectLaunch as ca, planShellLaunch as cb, plannerContextFill as cc, posixShellQuote as cd, removeTaskFromPlan as ce, renumberTasks as cf, resolveModelShortcut as cg, resolveProvider as ch, sharedMcpServer as ci, stripAnsi as cj, toApprovalDecision as ck, toOrchestratorOptions as cl, updateTaskInPlan as cm, usageLine as cn, validateModifiedPlan as co, warningsText as cp, windowsCommandLine as cq, wrapWithPty as cr, type AgentAdapterFactory as d, type AgentEvent as e, type AgentProcessDeps as f, type AgentStartOptions as g, type AiProvider as h, type AllProviderModels as i, type ApprovalAnswer as j, type ApprovalDecision as k, type ApprovalKind as l, type ApprovalMode as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type AwaitingReason as r, type CatalogModel as s, type CheckpointAnswer as t, type CheckpointArgs as u, CommandLineTooLongError as v, type ConversationMessage as w, type DiscoveredMode as x, type DiscoveredModel as y, type DiscoveryCommand as z };
2594
+ export { type IsolationOutcome as $, AbstractRunner as A, type BlockingPrompt as B, CMD_EXE_MAX_COMMAND_LINE as C, DENY_ALL as D, type EditPlanArgs as E, EmbeddedNewlineError as F, ExecutableNotFoundError as G, type FetchAllProviderModelsOptions as H, HeadlessRunner as I, type HeadlessRunnerDeps as J, HeadlessSession as K, type IApproval as L, type IConfig as M, type IPluginStore as N, type ITerminalRunner as O, type ITerminalSession as P, type IWorktreeIsolation as Q, type IntegrationDisposal as R, type IsolationAvailability as S, type IsolationHandoff as T, type IsolationHandoffRepo as U, type IsolationInactiveReason as V, type IsolationLandedTask as W, type IsolationLanding as X, type IsolationMergeBlock as Y, type IsolationMergeBlockReason as Z, type IsolationMergeResult as _, AbstractTerminalSession as a, type RunnerId as a$, type IsolationPruneResult as a0, type IsolationRemoval as a1, type IsolationRepo as a2, type IsolationRun as a3, type IsolationTaskRecord as a4, type IsolationTaskRef as a5, type IsolationTaskRepo as a6, type IsolationTaskStatus as a7, type IsolationView as a8, type LaunchDeps as a9, type PlannerToolHandler as aA, type PlannerUsage as aB, type PluginCloneFn as aC, type PluginEntry as aD, type PluginFeatures as aE, type PluginMode as aF, type PluginModelDiscovery as aG, type PluginRunnerDef as aH, type PreparedLaunch as aI, type PreparedTask as aJ, type PreservedWork as aK, type ProviderCredentialSource as aL, type ProviderModelLists as aM, type ProviderModelsResult as aN, type PtySize as aO, type PtyWrapOptions as aP, type QueuedMessage as aQ, type QueuedTaskMessage as aR, type RefusedRemoval as aS, type RepairEvidence as aT, type RepoGroupLayout as aU, type ResearchLogEntry as aV, type ResearchProgress as aW, type ResearchStep as aX, type ResearchStepOutcome as aY, type ResearchToolType as aZ, type ResolveContext as a_, type LaunchPlan as aa, type LegacyPlanState as ab, LineBuffer as ac, type ListModelsArgs as ad, type ListRunnersArgs as ae, type McpClientConfig as af, type McpCredential as ag, type McpTool as ah, type McpToolContext as ai, type McpToolReply as aj, type Message as ak, ModelCatalog as al, type ModelShortcut as am, ORCHESTRATOR_SHORTCUTS as an, ORDEWELL_MCP_PATH as ao, ORDEWELL_MCP_SERVER_NAME as ap, type OrchestratorOption as aq, OrdewellMcpServer as ar, type OwnerOnlyFile as as, PLANNER_TOOLS as at, type PlanIsolation as au, type PlanModificationWarnings as av, type PlanState as aw, type PlanStatus as ax, type PlannerStartOptions as ay, type PlannerTokenScope as az, type ActiveTaskSession as b, inheritedOps as b$, type RunnerInvocation as b0, type RunnerPluginManifest as b1, RunnerRegistry as b2, type RunnerSpawnOptions as b3, type RunnerTransport as b4, type RunnerVersionProbe as b5, type StreamEvent as b6, type StreamStepEvent as b7, type StreamThinkingEvent as b8, type StructuredEvent as b9, type TaskWithParent as bA, type ThinkingBlock as bB, type TreeSnapshot as bC, type UsageLine as bD, type UsageRecord as bE, type UsageTotals as bF, type UserPromptEntry as bG, type UserStep as bH, type ValidationCheck as bI, type ValidationContext as bJ, type ValidationResult as bK, type Verdict as bL, type VerificationCheck as bM, WINDOWS_MAX_COMMAND_LINE as bN, addPlannerUsage as bO, addTaskToPlan as bP, addUsage as bQ, approvalScopes as bR, buildShellInvocation as bS, collectProviderCredentials as bT, createEmptyPlan as bU, createTask as bV, emptyWarnings as bW, enabledRunners as bX, fetchAllProviderModels as bY, flattenTasks as bZ, flattenTasksWithParents as b_, type StructuredSessionCapability as ba, type StructuredTurnEnd as bb, type SubagentLogEntry as bc, type SubagentOutcome as bd, type SubmitPlanArgs as be, TASK_COMPLETE_TOOL as bf, TASK_TOOLS as bg, type Task as bh, type TaskCompleteArgs as bi, type TaskIsolation as bj, type TaskIsolationState as bk, type TaskMode as bl, type TaskModeAgentAdapter as bm, TaskModeUnsupportedError as bn, type TaskModelAssignment as bo, type TaskOutputArgs as bp, type TaskOutputSummary as bq, type TaskQueryArgs as br, type TaskRunnerFlags as bs, type TaskSnapshot as bt, type TaskStartOptions as bu, type TaskStatus as bv, type TaskTokenScope as bw, type TaskToolHandler as bx, type TaskTransport as by, type TaskType as bz, type AgentAdapter as c, isAwaitingReason as c0, isExecutableResolved as c1, isGranted as c2, isMeasured as c3, isReservedRunnerName as c4, isRunnerApproval as c5, isRunnerTransport as c6, isStructuredSession as c7, keepExecutionState as c8, knownModelId as c9, mcpClientConfig as ca, migrateLegacyPlan as cb, migratePlanState as cc, migrateTask as cd, opsFlag as ce, ownerOnlyConfigFile as cf, partedPromptUsage as cg, planDirectLaunch as ch, planShellLaunch as ci, plannerContextFill as cj, posixShellQuote as ck, removeTaskFromPlan as cl, renumberTasks as cm, resolveModelShortcut as cn, resolveProvider as co, sharedMcpServer as cp, stripAnsi as cq, toApprovalDecision as cr, toOrchestratorOptions as cs, updateTaskInPlan as ct, usageLine as cu, validateModifiedPlan as cv, warningsText as cw, windowsCommandLine as cx, wrapWithPty as cy, type AgentAdapterFactory as d, type AgentEvent as e, type AgentProcessDeps as f, type AgentStartOptions as g, type AiProvider as h, type AllProviderModels as i, type ApprovalAnswer as j, type ApprovalDecision as k, type ApprovalKind as l, type ApprovalMode as m, ApprovalPolicy as n, type ApprovalPolicyOptions as o, type ApprovalRequest as p, type ApprovalSource as q, type AwaitingReason as r, type CatalogModel as s, type CheckpointAnswer as t, type CheckpointArgs as u, CommandLineTooLongError as v, type ConversationMessage as w, type DiscoveredMode as x, type DiscoveredModel as y, type DiscoveryCommand as z };