@ordewell/core 0.6.0 → 0.6.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 (46) hide show
  1. package/dist/{IFileSystem-D4dAl2r8.d.ts → IFileSystem-DuEiG_kA.d.ts} +1 -1
  2. package/dist/{IFileSystem-CFYf4yR2.d.mts → IFileSystem-d_SV7jAH.d.mts} +1 -1
  3. package/dist/{ModeResolver-a4xJFlEp.d.mts → ModeResolver-DIReYAOq.d.mts} +1 -1
  4. package/dist/{ModeResolver-DVYVRbJp.d.ts → ModeResolver-DXxV4n_V.d.ts} +1 -1
  5. package/dist/{Task-CZJr6rmz.d.mts → Task-ib_U0YP7.d.mts} +56 -5
  6. package/dist/{Task-CZJr6rmz.d.ts → Task-ib_U0YP7.d.ts} +56 -5
  7. package/dist/{chunk-2SOVKO7P.mjs → chunk-I6U3PVHL.mjs} +39 -16
  8. package/dist/chunk-I6U3PVHL.mjs.map +1 -0
  9. package/dist/{chunk-EDGUFCIR.mjs → chunk-JRZPSNRO.mjs} +7 -3
  10. package/dist/chunk-JRZPSNRO.mjs.map +1 -0
  11. package/dist/{chunk-OM4D274O.mjs → chunk-M4KXBEFJ.mjs} +5 -3
  12. package/dist/chunk-M4KXBEFJ.mjs.map +1 -0
  13. package/dist/{chunk-C44UWIAD.mjs → chunk-N66ZHFGN.mjs} +2 -2
  14. package/dist/chunk-N66ZHFGN.mjs.map +1 -0
  15. package/dist/index.d.mts +129 -33
  16. package/dist/index.d.ts +129 -33
  17. package/dist/index.js +445 -74
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +402 -60
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/order-labels.d.mts +1 -1
  22. package/dist/order-labels.d.ts +1 -1
  23. package/dist/{parsing-Bd6-b644.d.ts → parsing-C8Z22twN.d.ts} +2 -2
  24. package/dist/{parsing-DIaGZmiQ.d.mts → parsing-DjRJJX-y.d.mts} +2 -2
  25. package/dist/parsing.d.mts +3 -3
  26. package/dist/parsing.d.ts +3 -3
  27. package/dist/parsing.js +5 -2
  28. package/dist/parsing.js.map +1 -1
  29. package/dist/parsing.mjs +2 -2
  30. package/dist/{plan-utils-Ba-l8EZS.d.mts → plan-utils-D4ioaM8q.d.mts} +25 -4
  31. package/dist/{plan-utils-_T5S7Mnk.d.ts → plan-utils-DvHPzAfV.d.ts} +25 -4
  32. package/dist/plan-utils.d.mts +3 -3
  33. package/dist/plan-utils.d.ts +3 -3
  34. package/dist/plan-utils.js.map +1 -1
  35. package/dist/plan-utils.mjs +2 -2
  36. package/dist/testing.d.mts +14 -5
  37. package/dist/testing.d.ts +14 -5
  38. package/dist/testing.js +30 -3
  39. package/dist/testing.js.map +1 -1
  40. package/dist/testing.mjs +30 -3
  41. package/dist/testing.mjs.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunk-2SOVKO7P.mjs.map +0 -1
  44. package/dist/chunk-C44UWIAD.mjs.map +0 -1
  45. package/dist/chunk-EDGUFCIR.mjs.map +0 -1
  46. package/dist/chunk-OM4D274O.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,14 +1,14 @@
1
- import { aG as RunnerId, ag as PlanStatus, a6 as LegacyPlanState, I as IApproval, k as ApprovalDecision, p as ApprovalRequest, j as ApprovalAnswer, L as ITerminalRunner, J as IConfig, h as AiProvider, as as ProviderModelLists, m as ApprovalMode, X as IsolationMergeResult, T as IsolationLandedTask, N as IWorktreeIsolation, a2 as IsolationTaskStatus, ad as PlanIsolation, aL as RunnerTransport, az as RepoGroupLayout, M as ITerminalSession, w as DiscoveredModel, aU as Task, f as AgentProcessDeps, c as AgentAdapter, aB as ResearchProgress, aA as ResearchLogEntry, u as ConversationMessage, b9 as UsageRecord, b1 as TaskSnapshot, r as AwaitingReason, Q as IsolationHandoff, $ as IsolationRun, a0 as IsolationTaskRecord, aV as TaskIsolation, a3 as IsolationView, Y as IsolationOutcome, ay as RepairEvidence, bg as Verdict, aJ as RunnerRegistry, ax as QueuedTaskMessage, aw as QueuedMessage, b as ActiveTaskSession, ac as OrchestratorOption, aY as TaskModeAgentAdapter, g as AgentStartOptions, e as AgentEvent, aE as ResearchToolType, ai as PlannerUsage, n as ApprovalPolicy, af as PlanState, aH as RunnerInvocation, A as AbstractRunner, a as AbstractTerminalSession, aQ as StructuredSessionCapability, b2 as TaskStartOptions, aR as StructuredTurnEnd, aP as StructuredEvent, aK as RunnerSpawnOptions, K as IPluginStore, aI as RunnerPluginManifest, aF as ResolveContext, b0 as TaskRunnerFlags } from './Task-CZJr6rmz.mjs';
2
- export { d as AgentAdapterFactory, i as AllProviderModels, l as ApprovalKind, o as ApprovalPolicyOptions, q as ApprovalSource, B as BlockingPrompt, C as CMD_EXE_MAX_COMMAND_LINE, s as CatalogModel, t as CommandLineTooLongError, D as DENY_ALL, v as DiscoveredMode, x as DiscoveryCommand, E as EmbeddedNewlineError, y as ExecutableNotFoundError, F as FetchAllProviderModelsOptions, H as HeadlessRunner, z as HeadlessRunnerDeps, G as HeadlessSession, O as IntegrationDisposal, P as IsolationAvailability, R as IsolationHandoffRepo, S as IsolationInactiveReason, U as IsolationLanding, V as IsolationMergeBlock, W as IsolationMergeBlockReason, Z as IsolationPruneResult, _ as IsolationRepo, a1 as IsolationTaskRepo, a4 as LaunchDeps, a5 as LaunchPlan, a7 as LineBuffer, a8 as Message, a9 as ModelCatalog, aa as ModelShortcut, ab as ORCHESTRATOR_SHORTCUTS, ae as PlanModificationWarnings, ah as PlannerStartOptions, aj as PluginCloneFn, ak as PluginEntry, al as PluginFeatures, am as PluginMode, an as PluginModelDiscovery, ao as PluginRunnerDef, ap as PreparedLaunch, aq as PreparedTask, ar as ProviderCredentialSource, at as ProviderModelsResult, au as PtySize, av as PtyWrapOptions, aC as ResearchStep, aD as ResearchStepOutcome, aM as StreamEvent, aN as StreamStepEvent, aO as StreamThinkingEvent, aS as SubagentLogEntry, aT as SubagentOutcome, aW as TaskIsolationState, aX as TaskMode, aZ as TaskModeUnsupportedError, a_ as TaskModelAssignment, a$ as TaskOutputSummary, b3 as TaskStatus, b4 as TaskTransport, b5 as TaskType, b6 as TaskWithParent, b7 as ThinkingBlock, b8 as UsageLine, ba as UsageTotals, bb as UserPromptEntry, bc as UserStep, bd as ValidationCheck, be as ValidationContext, bf as ValidationResult, bh as VerificationCheck, bi as WINDOWS_MAX_COMMAND_LINE, bj as addPlannerUsage, bk as addTaskToPlan, bl as addUsage, bm as approvalScopes, bn as buildShellInvocation, bo as collectProviderCredentials, bp as createEmptyPlan, bq as createTask, br as emptyWarnings, bs as enabledRunners, bt as fetchAllProviderModels, bu as flattenTasks, bv as flattenTasksWithParents, bw as isAwaitingReason, bx as isExecutableResolved, by as isGranted, bz as isMeasured, bA as isReservedRunnerName, bB as isRunnerApproval, bC as isRunnerTransport, bD as isStructuredSession, bE as keepExecutionState, bF as knownModelId, bG as migrateLegacyPlan, bH as migratePlanState, bI as migrateTask, bJ as partedPromptUsage, bK as planDirectLaunch, bL as planShellLaunch, bM as plannerContextFill, bN as posixShellQuote, bO as removeTaskFromPlan, bP as renumberTasks, bQ as resolveModelShortcut, bR as resolveProvider, bS as stripAnsi, bT as toApprovalDecision, bU as toOrchestratorOptions, bV as updateTaskInPlan, bW as usageLine, bX as validateModifiedPlan, bY as warningsText, bZ as windowsCommandLine, b_ as wrapWithPty } from './Task-CZJr6rmz.mjs';
3
- import { t as TaskOp, l as SessionBroadcaster, A as ApplyTaskOpsResult, m as SessionMessage, n as SessionNotice, r as TaskLogEvent } from './plan-utils-Ba-l8EZS.mjs';
4
- export { a as ApprovalBlock, b as ApprovalStatus, C as CHECKPOINT_TRUNCATE_LENGTH, c as ConversationInput, d as ConversationView, D as DisplayBlock, E as EMPTY_CONVERSATION, e as EMPTY_HOLD, f as EMPTY_TASK_LOG, G as GatedConversation, L as LocalEntry, M as MessageBlock, g as MessageRole, N as NO_TURN, O as OutputPreview, P as PlanBlock, h as PlanMarkerStatus, i as PromptHold, S as SerializedPlan, j as SerializedTask, k as SerializedTaskStatus, o as SubagentBlock, p as SubagentChild, q as SubagentStatus, T as TakenPrompt, s as TaskLogView, u as TaskRef, v as ThinkingDisplayBlock, w as ToolBlock, x as ToolHeadline, y as ToolStatus, z as TurnGate, U as UsageBlock, B as aheadOfDraft, F as applyTaskOps, H as canMergeTasks, I as canSetDependencies, J as canSplitTask, K as capConflictFiles, Q as classifyOutcome, R as coalesceTaskLog, V as dependencyCandidates, W as dependentsOf, X as drainNext, Y as executionSummary, Z as followTurn, _ as fromTranscript, $ as hasHiddenDetail, a0 as holdPrompt, a1 as outputLines, a2 as outputPreview, a3 as parseTaskOpsJson, a4 as reduceConversation, a5 as reduceTaskLog, a6 as replayTaskLog, a7 as runnerToolSubject, a8 as serializePlan, a9 as serializeTask, aa as serializeTaskStatus, ab as stopTurn, ac as summarizeToolCall, ad as taskStartedNotice, ae as textHasTaskOps, af as toTaskLogEvent, ag as toolHeadline, ah as trimToolOutput, ai as truncateCheckpointSummary, aj as unsendAll, ak as unsendLatest } from './plan-utils-Ba-l8EZS.mjs';
5
- import { I as IFileSystem, R as ReadFileOpts, T as ToolOutcome, b as GrepOptions, a as GlobOptions, F as FindSymbolOptions } from './IFileSystem-CFYf4yR2.mjs';
6
- export { G as GREP_DEFAULT_HEAD_LIMIT, c as GrepOutputMode, S as SEARCH_EXCLUSIONS } from './IFileSystem-CFYf4yR2.mjs';
7
- import { R as RunnerModeInfo } from './ModeResolver-a4xJFlEp.mjs';
8
- export { M as ManifestLookup, a as autonomyLevelLabel, b as buildModeGuide, f as filteredBuildModes, p as parseAutonomyLevel, r as resolveDefaultMode, c as resolveTaskMode, d as runnerModesFrom } from './ModeResolver-a4xJFlEp.mjs';
1
+ import { aG as RunnerId, ag as PlanStatus, a6 as LegacyPlanState, I as IApproval, k as ApprovalDecision, p as ApprovalRequest, j as ApprovalAnswer, L as ITerminalRunner, J as IConfig, h as AiProvider, as as ProviderModelLists, m as ApprovalMode, X as IsolationMergeResult, T as IsolationLandedTask, N as IWorktreeIsolation, a2 as IsolationTaskStatus, ad as PlanIsolation, aL as RunnerTransport, az as RepoGroupLayout, M as ITerminalSession, w as DiscoveredModel, aU as Task, f as AgentProcessDeps, c as AgentAdapter, aB as ResearchProgress, aA as ResearchLogEntry, u as ConversationMessage, ba as UsageRecord, b1 as TaskSnapshot, r as AwaitingReason, Q as IsolationHandoff, $ as IsolationRun, a0 as IsolationTaskRecord, aV as TaskIsolation, a3 as IsolationView, Y as IsolationOutcome, ay as RepairEvidence, b8 as TreeSnapshot, bh as Verdict, aJ as RunnerRegistry, ax as QueuedTaskMessage, aw as QueuedMessage, b as ActiveTaskSession, ac as OrchestratorOption, aY as TaskModeAgentAdapter, g as AgentStartOptions, e as AgentEvent, aE as ResearchToolType, ai as PlannerUsage, n as ApprovalPolicy, af as PlanState, aH as RunnerInvocation, A as AbstractRunner, a as AbstractTerminalSession, aQ as StructuredSessionCapability, b2 as TaskStartOptions, aR as StructuredTurnEnd, aP as StructuredEvent, aK as RunnerSpawnOptions, K as IPluginStore, aI as RunnerPluginManifest, aF as ResolveContext, b0 as TaskRunnerFlags } from './Task-ib_U0YP7.mjs';
2
+ export { d as AgentAdapterFactory, i as AllProviderModels, l as ApprovalKind, o as ApprovalPolicyOptions, q as ApprovalSource, B as BlockingPrompt, C as CMD_EXE_MAX_COMMAND_LINE, s as CatalogModel, t as CommandLineTooLongError, D as DENY_ALL, v as DiscoveredMode, x as DiscoveryCommand, E as EmbeddedNewlineError, y as ExecutableNotFoundError, F as FetchAllProviderModelsOptions, H as HeadlessRunner, z as HeadlessRunnerDeps, G as HeadlessSession, O as IntegrationDisposal, P as IsolationAvailability, R as IsolationHandoffRepo, S as IsolationInactiveReason, U as IsolationLanding, V as IsolationMergeBlock, W as IsolationMergeBlockReason, Z as IsolationPruneResult, _ as IsolationRepo, a1 as IsolationTaskRepo, a4 as LaunchDeps, a5 as LaunchPlan, a7 as LineBuffer, a8 as Message, a9 as ModelCatalog, aa as ModelShortcut, ab as ORCHESTRATOR_SHORTCUTS, ae as PlanModificationWarnings, ah as PlannerStartOptions, aj as PluginCloneFn, ak as PluginEntry, al as PluginFeatures, am as PluginMode, an as PluginModelDiscovery, ao as PluginRunnerDef, ap as PreparedLaunch, aq as PreparedTask, ar as ProviderCredentialSource, at as ProviderModelsResult, au as PtySize, av as PtyWrapOptions, aC as ResearchStep, aD as ResearchStepOutcome, aM as StreamEvent, aN as StreamStepEvent, aO as StreamThinkingEvent, aS as SubagentLogEntry, aT as SubagentOutcome, aW as TaskIsolationState, aX as TaskMode, aZ as TaskModeUnsupportedError, a_ as TaskModelAssignment, a$ as TaskOutputSummary, b3 as TaskStatus, b4 as TaskTransport, b5 as TaskType, b6 as TaskWithParent, b7 as ThinkingBlock, b9 as UsageLine, bb as UsageTotals, bc as UserPromptEntry, bd as UserStep, be as ValidationCheck, bf as ValidationContext, bg as ValidationResult, bi as VerificationCheck, bj as WINDOWS_MAX_COMMAND_LINE, bk as addPlannerUsage, bl as addTaskToPlan, bm as addUsage, bn as approvalScopes, bo as buildShellInvocation, bp as collectProviderCredentials, bq as createEmptyPlan, br as createTask, bs as emptyWarnings, bt as enabledRunners, bu as fetchAllProviderModels, bv as flattenTasks, bw as flattenTasksWithParents, bx as isAwaitingReason, by as isExecutableResolved, bz as isGranted, bA as isMeasured, bB as isReservedRunnerName, bC as isRunnerApproval, bD as isRunnerTransport, bE as isStructuredSession, bF as keepExecutionState, bG as knownModelId, bH as migrateLegacyPlan, bI as migratePlanState, bJ as migrateTask, bK as partedPromptUsage, bL as planDirectLaunch, bM as planShellLaunch, bN as plannerContextFill, bO as posixShellQuote, bP as removeTaskFromPlan, bQ as renumberTasks, bR as resolveModelShortcut, bS as resolveProvider, bT as stripAnsi, bU as toApprovalDecision, bV as toOrchestratorOptions, bW as updateTaskInPlan, bX as usageLine, bY as validateModifiedPlan, bZ as warningsText, b_ as windowsCommandLine, b$ as wrapWithPty } from './Task-ib_U0YP7.mjs';
3
+ import { u as TaskOp, M as MergeGateView, m as SessionBroadcaster, A as ApplyTaskOpsResult, n as SessionMessage, o as SessionNotice, s as TaskLogEvent } from './plan-utils-D4ioaM8q.mjs';
4
+ export { a as ApprovalBlock, b as ApprovalStatus, C as CHECKPOINT_TRUNCATE_LENGTH, c as ConversationInput, d as ConversationView, D as DisplayBlock, E as EMPTY_CONVERSATION, e as EMPTY_HOLD, f as EMPTY_TASK_LOG, G as GatedConversation, L as LocalEntry, g as MessageBlock, h as MessageRole, N as NO_TURN, O as OutputPreview, P as PlanBlock, i as PlanMarkerStatus, j as PromptHold, S as SerializedPlan, k as SerializedTask, l as SerializedTaskStatus, p as SubagentBlock, q as SubagentChild, r as SubagentStatus, T as TakenPrompt, t as TaskLogView, v as TaskRef, w as ThinkingDisplayBlock, x as ToolBlock, y as ToolHeadline, z as ToolStatus, B as TurnGate, U as UsageBlock, F as aheadOfDraft, H as applyTaskOps, I as canMergeTasks, J as canSetDependencies, K as canSplitTask, Q as capConflictFiles, R as classifyOutcome, V as coalesceTaskLog, W as dependencyCandidates, X as dependentsOf, Y as drainNext, Z as executionSummary, _ as followTurn, $ as fromTranscript, a0 as hasHiddenDetail, a1 as holdPrompt, a2 as outputLines, a3 as outputPreview, a4 as parseTaskOpsJson, a5 as reduceConversation, a6 as reduceTaskLog, a7 as replayTaskLog, a8 as runnerToolSubject, a9 as serializePlan, aa as serializeTask, ab as serializeTaskStatus, ac as stopTurn, ad as summarizeToolCall, ae as taskStartedNotice, af as textHasTaskOps, ag as toTaskLogEvent, ah as toolHeadline, ai as trimToolOutput, aj as truncateCheckpointSummary, ak as unsendAll, al as unsendLatest } from './plan-utils-D4ioaM8q.mjs';
5
+ import { I as IFileSystem, R as ReadFileOpts, T as ToolOutcome, b as GrepOptions, a as GlobOptions, F as FindSymbolOptions } from './IFileSystem-d_SV7jAH.mjs';
6
+ export { G as GREP_DEFAULT_HEAD_LIMIT, c as GrepOutputMode, S as SEARCH_EXCLUSIONS } from './IFileSystem-d_SV7jAH.mjs';
7
+ import { R as RunnerModeInfo } from './ModeResolver-DIReYAOq.mjs';
8
+ export { M as ManifestLookup, a as autonomyLevelLabel, b as buildModeGuide, f as filteredBuildModes, p as parseAutonomyLevel, r as resolveDefaultMode, c as resolveTaskMode, d as runnerModesFrom } from './ModeResolver-DIReYAOq.mjs';
9
9
  import { ChildProcess } from 'child_process';
10
- import { b as PlanParseError } from './parsing-DIaGZmiQ.mjs';
11
- export { P as PLAN_ENVELOPE_KEY, a as PartialPlanTask, T as TASK_OPS_ENVELOPE_KEY, c as TASK_QUERY_ENVELOPE_KEY, d as checkDepsResolve, e as checkImmutableLog, f as checkInProgress, g as checkNoCycles, h as checkUniqueIds, i as escapeControlCharsInStrings, j as extractJsonObject, k as extractObjectWithBalance, l as extractObjectsWithKey, m as looksLikePlanAttempt, o as opensWithJsonObject, p as parsePartialPlan, n as parsePlanJson, s as stripModelNoise, q as stripTrailingCommas, v as validatePlanModification } from './parsing-DIaGZmiQ.mjs';
10
+ import { b as PlanParseError } from './parsing-DjRJJX-y.mjs';
11
+ export { P as PLAN_ENVELOPE_KEY, a as PartialPlanTask, T as TASK_OPS_ENVELOPE_KEY, c as TASK_QUERY_ENVELOPE_KEY, d as checkDepsResolve, e as checkImmutableLog, f as checkInProgress, g as checkNoCycles, h as checkUniqueIds, i as escapeControlCharsInStrings, j as extractJsonObject, k as extractObjectWithBalance, l as extractObjectsWithKey, m as looksLikePlanAttempt, o as opensWithJsonObject, p as parsePartialPlan, n as parsePlanJson, s as stripModelNoise, q as stripTrailingCommas, v as validatePlanModification } from './parsing-DjRJJX-y.mjs';
12
12
  export { resolveOrderLabel, taskOrderLabel } from './order-labels.mjs';
13
13
  import 'events';
14
14
 
@@ -1350,6 +1350,8 @@ declare class PlanStore {
1350
1350
  private _planTasks;
1351
1351
  private _allTasks;
1352
1352
  private _taskMap;
1353
+ /** Task id → the top-level task it hangs under, itself for a top-level task. */
1354
+ private _rootMap;
1353
1355
  private _planRunners;
1354
1356
  private _onMutate;
1355
1357
  private _executionLog;
@@ -1365,6 +1367,11 @@ declare class PlanStore {
1365
1367
  isCompleted(id: string): boolean;
1366
1368
  isFailed(id: string): boolean;
1367
1369
  get(taskId: string): Readonly<Task> | undefined;
1370
+ /**
1371
+ * Whether a task runs as an ops task (ADR-0020). Only a top-level AI task
1372
+ * can be one; a subtask runs with the top-level task it hangs under.
1373
+ */
1374
+ isOps(taskId: string): boolean;
1368
1375
  /** A copy of the task tree, detached from the store: later status changes do not reach it. */
1369
1376
  snapshot(): Task[];
1370
1377
  getExecutionLog(): ReadonlyArray<TaskSnapshot>;
@@ -1401,6 +1408,8 @@ declare class PlanStore {
1401
1408
  markAwaitingUser(id: string, reason?: AwaitingReason): void;
1402
1409
  markPending(id: string): void;
1403
1410
  retry(id: string): void;
1411
+ /** Kept on the task: it was force-started past its merge gate, before these dependencies' work was merged (ADR-0020). */
1412
+ setForcedPastGate(id: string, dependencies: string[]): void;
1404
1413
  /** A reason outlives nothing: any status but `awaiting_user` drops it. */
1405
1414
  private setStatus;
1406
1415
  blockDependents(id: string): void;
@@ -1440,6 +1449,7 @@ interface IsolationRunListener {
1440
1449
  /**
1441
1450
  * A run opened — the one moment shared by Execute, a manual task run and
1442
1451
  * a force start, so whatever a run pins for its whole length is read here.
1452
+ * Whether it isolates is decided later, at its first change task.
1443
1453
  */
1444
1454
  opened(): void;
1445
1455
  /** A run did not start: `repos` of the group have tracked changes. */
@@ -1462,12 +1472,13 @@ interface IsolationRunControllerDeps {
1462
1472
  listener: IsolationRunListener;
1463
1473
  }
1464
1474
  /**
1465
- * The lifecycle of a plan's isolation run (ADR-0013, ADR-0014), between the
1466
- * scheduler and the git layer: deciding at a run's start whether it executes
1467
- * in worktrees, a blocked run and how it goes on, each attempt's working
1468
- * directory, releasing worktrees, the handoff when the run closes, and what the
1469
- * user does with it afterwards. The record it keeps outlives one run — a
1470
- * resumed plan continues it.
1475
+ * The lifecycle of a plan's isolation run (ADR-0013, ADR-0014, ADR-0020),
1476
+ * between the scheduler and the git layer: deciding, at a run's first change
1477
+ * task, whether it executes in worktrees, a blocked run and how it goes on,
1478
+ * each attempt's working directory, releasing worktrees, which landed work the
1479
+ * user has merged, the tree check of an ops task, the handoff when the run
1480
+ * closes, and what the user does with it afterwards. The record it keeps
1481
+ * outlives one run — a resumed plan continues it.
1471
1482
  */
1472
1483
  declare class IsolationRunController {
1473
1484
  private readonly isolation;
@@ -1479,9 +1490,9 @@ declare class IsolationRunController {
1479
1490
  /** Copied paths already reported for the current run: every task gets the same copies. */
1480
1491
  private reportedCopies;
1481
1492
  /**
1482
- * How the open run executes; null while no run is open. A run is one
1483
- * Execute-Plan or one manual task run, from its start until it settles or
1484
- * is stopped.
1493
+ * How the open run executes; null while no run is open, `undecided` until
1494
+ * its first change task asks. A run is one Execute-Plan or one manual task
1495
+ * run, from its start until it settles or is stopped.
1485
1496
  */
1486
1497
  private mode;
1487
1498
  /** Resolver task id → the conflicted task it resolves; see {@link linkResolver}. */
@@ -1495,6 +1506,8 @@ declare class IsolationRunController {
1495
1506
  /** The plan's run record, open or not; null when the plan has not isolated. */
1496
1507
  get current(): IsolationRun | null;
1497
1508
  get isOpen(): boolean;
1509
+ /** The open run has decided whether it isolates. */
1510
+ get decided(): boolean;
1498
1511
  /** The open run executes in worktrees. */
1499
1512
  get isolating(): boolean;
1500
1513
  /** A run is waiting on the user to stash or to go on without isolation. */
@@ -1518,12 +1531,15 @@ declare class IsolationRunController {
1518
1531
  * would otherwise write a new session file on every reload.
1519
1532
  */
1520
1533
  adopt(state: PlanIsolation | null): Promise<void>;
1534
+ /** Open a run if none is, leaving whether it isolates to its first change task. */
1535
+ open(): void;
1521
1536
  /**
1522
- * Open a run if none is: decide once, at its start, whether it executes in
1523
- * worktrees. `resume` is what a dirty tree parks until the user chooses how
1524
- * to go on. Resolves false when the run did not start.
1537
+ * Decide once per run, as its first change task starts, whether it executes
1538
+ * in worktrees (ADR-0020): an ops task needs none, so a run of only ops
1539
+ * tasks never asks. `resume` is what a dirty tree parks until the user
1540
+ * chooses how to go on. Resolves false while the run waits on that choice.
1525
1541
  */
1526
- open(resume: () => Promise<void>): Promise<boolean>;
1542
+ decide(resume: () => Promise<void>): Promise<boolean>;
1527
1543
  /**
1528
1544
  * Whether the run in force, or else the next one, gives each task its own
1529
1545
  * worktrees, and of which repo group — what the planner is told, since it
@@ -1550,6 +1566,7 @@ declare class IsolationRunController {
1550
1566
  */
1551
1567
  attemptCwd(task: Task, opts: {
1552
1568
  repair: boolean;
1569
+ ops?: boolean;
1553
1570
  }): Promise<{
1554
1571
  cwd: string;
1555
1572
  worktree: boolean;
@@ -1571,8 +1588,33 @@ declare class IsolationRunController {
1571
1588
  release(taskId: string, opts: {
1572
1589
  keep: boolean;
1573
1590
  }, landing?: Promise<unknown> | null): Promise<void>;
1574
- /** Close the open run. An isolated one hands its integration branch over for review. */
1591
+ /**
1592
+ * Close the open run. An isolated one hands its integration branch over for
1593
+ * review — unless the user merged everything it landed at merge gates
1594
+ * already, which leaves nothing to hand over, so it is cleared up as a Merge
1595
+ * all would have.
1596
+ */
1575
1597
  close(): Promise<void>;
1598
+ /**
1599
+ * Whether a task's landed work still waits to be merged into the user's
1600
+ * branch — what holds an ops or user task at its merge gate (ADR-0020). A
1601
+ * task with no record never landed anything to wait for.
1602
+ */
1603
+ awaitsMerge(taskId: string): boolean;
1604
+ /**
1605
+ * Look again for landed work the user has merged — by Merge all, or by hand
1606
+ * with git. Resolves true when some was found.
1607
+ */
1608
+ refreshInHead(): Promise<boolean>;
1609
+ /**
1610
+ * The tracked state of the workspace as an ops task starts, for
1611
+ * {@link filesChangedSince} (ADR-0020). Null where the check does not run:
1612
+ * a run that shares the workspace root, where every task's edits land in
1613
+ * it, or a workspace git cannot isolate at all.
1614
+ */
1615
+ snapshotWorkspace(): Promise<TreeSnapshot | null>;
1616
+ /** Tracked files changed since `snapshot`; none when the run has since gone on in the workspace root. */
1617
+ filesChangedSince(snapshot: TreeSnapshot | null): Promise<string[]>;
1576
1618
  /**
1577
1619
  * A stop or a plan load: the open run ends without a handoff and a parked
1578
1620
  * start is dropped. `keepOpen` spares a run the scheduler is still driving.
@@ -1591,9 +1633,11 @@ declare class IsolationRunController {
1591
1633
  reviewDiff(): Promise<string>;
1592
1634
  /**
1593
1635
  * "Merge all": the run's integration branches into whatever the user has
1594
- * checked out, in every repo or none. Once everything merged, the run has
1595
- * nothing left to hand over, so it is cleared up and forgotten; a branch
1596
- * the user's HEAD somehow does not contain stays for the next run's sweep.
1636
+ * checked out, in every repo or none. During a run it merges what has
1637
+ * landed so far and the run goes on (ADR-0020): its branches stay for the
1638
+ * tasks still to land. Once a settled run merged everything, it has nothing
1639
+ * left to hand over, so it is cleared up and forgotten; a branch the user's
1640
+ * HEAD somehow does not contain stays for the next run's sweep.
1597
1641
  */
1598
1642
  merge(): Promise<IsolationMergeResult>;
1599
1643
  /** Worktrees and task branches go; the integration branch and the record stay for review and merge. */
@@ -1602,7 +1646,7 @@ declare class IsolationRunController {
1602
1646
  discard(): Promise<void>;
1603
1647
  private clearMerged;
1604
1648
  private forget;
1605
- private decide;
1649
+ private assess;
1606
1650
  private activate;
1607
1651
  private begin;
1608
1652
  /** What earlier runs left merged in the group goes; a failure here is worth a word, never a stopped run. */
@@ -1899,6 +1943,10 @@ declare class TaskOrchestrator {
1899
1943
  * pending and nothing ran until the user also re-ran the whole plan.
1900
1944
  */
1901
1945
  private haltedByFailure;
1946
+ /** A Merge all is under way: no ops task starts until it ends (ADR-0020). */
1947
+ private merging;
1948
+ /** The last "waiting for Merge all" notice, so a run paused at a gate says it once, not on every tick. */
1949
+ private gateNotice;
1902
1950
  /** The workspace's own variables for a task's cwd (ADR-0016); swapped out in tests. */
1903
1951
  private workspaceEnv;
1904
1952
  /** What the workspace env has already warned about, so a run says it once, not per task. */
@@ -2006,8 +2054,26 @@ declare class TaskOrchestrator {
2006
2054
  */
2007
2055
  adoptIsolation(state: PlanIsolation | null): Promise<void>;
2008
2056
  reviewRunDiff(): Promise<string>;
2009
- /** "Merge all"; a run that merged everything is cleared up and forgotten. */
2057
+ /**
2058
+ * "Merge all"; a settled run that merged everything is cleared up and
2059
+ * forgotten. During a run it merges what has landed and the run goes on:
2060
+ * the tasks waiting at a merge gate for that work then start (ADR-0020).
2061
+ * Never while an ops task runs, and no ops task starts until it ends — the
2062
+ * one overlap the plan cannot order, because the merge is the user's.
2063
+ */
2010
2064
  mergeRun(): Promise<IsolationMergeResult>;
2065
+ /**
2066
+ * The run as a surface offers Merge all mid-run (ADR-0020): what has landed
2067
+ * and is not merged, and whether the run is paused at its gates with nothing
2068
+ * else running. Null while no task waits at a gate.
2069
+ */
2070
+ mergeGateView(): MergeGateView | null;
2071
+ /**
2072
+ * The dependencies an ops or user task waits on at its merge gate: those
2073
+ * whose landed work is not in the user's branch yet (ADR-0020). Empty once
2074
+ * the task has started, and for every other task.
2075
+ */
2076
+ getMergeGate(taskId: string): string[];
2011
2077
  /** Worktrees and task branches go; the integration branch and the record stay for review and merge. */
2012
2078
  cleanupRun(): Promise<void>;
2013
2079
  /** The run and everything it made go, and the plan forgets it; the next run starts afresh. */
@@ -2077,6 +2143,14 @@ declare class TaskOrchestrator {
2077
2143
  linkConflictResolver(resolverId: string, conflictedId: string): void;
2078
2144
  private landResolved;
2079
2145
  getReadyTasks(): Task[];
2146
+ private readiness;
2147
+ /**
2148
+ * Open the run a task starts in, and for a change task decide whether it
2149
+ * isolates (ADR-0020): an ops task needs no worktree, so it never waits on
2150
+ * that choice. False while a dirty tree waits on the user; `resume` is what
2151
+ * their choice replays.
2152
+ */
2153
+ private openFor;
2080
2154
  /**
2081
2155
  * Cancel a running (or scheduled) task: kill its session and return it to
2082
2156
  * 'pending' — "not executed". The task is put on hold so the scheduler
@@ -2126,6 +2200,13 @@ declare class TaskOrchestrator {
2126
2200
  * No-op if the task is unknown, not an AI task, or already running.
2127
2201
  */
2128
2202
  forceStartTask(taskId: string): Promise<void>;
2203
+ private refuseOpsDuringMerge;
2204
+ /**
2205
+ * A force start passes a merge gate (ADR-0020), and the surface confirmed it
2206
+ * first; the choice is kept on the task and said, because the work it acts
2207
+ * on is not in the user's branch.
2208
+ */
2209
+ private notePastGate;
2129
2210
  /**
2130
2211
  * Run exactly one task outside full-plan scheduling. The active/starting
2131
2212
  * session still contributes to {@link hasLiveWork} so every surface exposes
@@ -2148,6 +2229,11 @@ declare class TaskOrchestrator {
2148
2229
  parallelGroups: number[][];
2149
2230
  };
2150
2231
  tick(): Promise<void>;
2232
+ /**
2233
+ * A run paused at merge gates says so, as plainly as a task that waits on
2234
+ * the user: which tasks wait, and that Merge all lets them go on (ADR-0020).
2235
+ */
2236
+ private sayGate;
2151
2237
  private startTask;
2152
2238
  /**
2153
2239
  * The fallible half of starting a task: resolving its cwd/worktree and
@@ -3457,7 +3543,7 @@ interface SessionEventRelayDeps {
3457
3543
  /** Where isolation notices go, for a host whose notifications are not seen by the user. */
3458
3544
  onNotice?: (notice: SessionNotice) => void;
3459
3545
  store: Pick<PlanStore, 'allTasks' | 'snapshot'>;
3460
- orchestrator: Pick<TaskOrchestrator, 'getIdleSince' | 'getTaskIsolation' | 'getQueuedTaskMessages'>;
3546
+ orchestrator: Pick<TaskOrchestrator, 'getIdleSince' | 'getTaskIsolation' | 'getQueuedTaskMessages' | 'getMergeGate' | 'mergeGateView'>;
3461
3547
  /** Shared with the Session, which snapshots, restores and clears it. */
3462
3548
  usage: PlannerUsageLedger;
3463
3549
  /** How many of a task's runner requests wait for an answer (ADR-0018, A1). */
@@ -3978,13 +4064,19 @@ declare class Session {
3978
4064
  * session asks here instead.
3979
4065
  */
3980
4066
  isolationView(): IsolationView | null;
4067
+ /** The dependencies a task waits on at its merge gate (ADR-0020); empty when it waits for no Merge all. */
4068
+ mergeGate(taskId: string): string[];
4069
+ /** What Merge all would merge mid-run, while any task waits at a merge gate; null otherwise. */
4070
+ mergeGateView(): MergeGateView | null;
3981
4071
  /** The run's integration branch against its base ref, as a unified diff. */
3982
4072
  reviewRunDiff(): Promise<string>;
3983
4073
  /**
3984
4074
  * "Merge all": each repo's integration branch into whatever the user has
3985
4075
  * checked out there — every repo, or none if any cannot take it. The one
3986
4076
  * irreversible step of isolated execution, so this explicit call is the
3987
- * only way it ever happens.
4077
+ * only way it ever happens. During a run it merges what has landed so far,
4078
+ * which is what opens a merge gate (ADR-0020); it waits for no ops task,
4079
+ * and refuses while one runs.
3988
4080
  */
3989
4081
  mergeRun(): Promise<IsolationMergeResult>;
3990
4082
  /** Remove the run's worktrees and task branches; keep its integration branch to review or merge. */
@@ -4566,6 +4658,8 @@ interface ComposeOptions {
4566
4658
  planMapEnabled?: boolean;
4567
4659
  planMapMaxEntries?: number;
4568
4660
  tddEnabled?: boolean;
4661
+ /** An ops task's last attempt, as its output ended (ADR-0020); absent on a first attempt. */
4662
+ previousAttempt?: string;
4569
4663
  }
4570
4664
  declare function composeAugmentedPrompt(task: Task, allTasks: readonly Task[], opts?: ComposeOptions): string;
4571
4665
  /**
@@ -4574,7 +4668,9 @@ declare function composeAugmentedPrompt(task: Task, allTasks: readonly Task[], o
4574
4668
  * original prompt, so it is not sent again — but it holds the old worktree
4575
4669
  * too, and this attempt's is fresh from the integration branch.
4576
4670
  */
4577
- declare function composeContinuationPrompt(task: Task, message: string): string;
4671
+ declare function composeContinuationPrompt(task: Task, message: string, opts?: {
4672
+ ops?: boolean;
4673
+ }): string;
4578
4674
 
4579
4675
  type ExecFileFn = (command: string, args: string[]) => Promise<{
4580
4676
  stdout: string;
@@ -5307,4 +5403,4 @@ declare const DEFAULT_MAX_PARALLEL = 3;
5307
5403
  */
5308
5404
  declare function parseMaxParallel(value: unknown): number | null;
5309
5405
 
5310
- export { ALLOWED_PLUGIN_HOSTS, ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type Adr0013IsolationRun, type Adr0013PlanIsolation, type Adr0013TaskRecord, AgentAdapter, AgentEvent, AgentProcessDeps, AgentStartOptions, AiProvider, ApplyTaskOpsResult, ApprovalAnswer, ApprovalDecision, ApprovalMode, ApprovalPolicy, ApprovalRequest, type AskOptions, AwaitingReason, BUILTIN_SKILL_NAMES, BaseAiService, BaseConfig, BaseFileSystem, BufferedTaskOutputSource, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, type Continuability, ConversationBusyError, type ConversationCompaction, ConversationEditError, type ConversationFork, ConversationMessage, type ConversationRequest, type ConversationRewind, type ConversationTurn, type ConversationVariant, DAEMON_SUBPROTOCOL, DAEMON_TOKEN_SUBPROTOCOL_PREFIX, DEFAULT_MAX_PARALLEL, DiscoveredModel, type EnvAdmission, EnvConfig, type ExecFileFn, type ExecImpl, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, type GitExecFn, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HomeTranscriptReader, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, IWorktreeIsolation, IsolationHandoff, IsolationLandedTask, IsolationMergeResult, IsolationOutcome, IsolationRun, IsolationTaskRecord, IsolationTaskStatus, IsolationView, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, LegacyPlanState, type LiveOutputLookup, type LiveTail, type LiveTailOptions, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, ORDEWELL_SETTABLE_ENV, OUTPUT_LINES_DEFAULT, OUTPUT_LINES_MAX, OpenAiService, OpenCodeAdapter, type OrchestratorObserver, OrchestratorOption, PLUGIN_NAME_PATTERN, PROVIDER_CREDENTIAL_ENV, PROVIDER_DETECT_PRIORITY, PROVIDER_LABEL, PROVIDER_PRIORITY, PROVIDER_SHORT_LABEL, type PendingApproval, PendingApprovals, type PendingApprovalsOptions, PlanEditError, PlanIsolation, PlanParseError, type PlanRequest, PlanState, PlanStatus, PlanStore, Planner, type PlannerModelCandidate, type PlannerModelChoice, PlannerModelMemory, type PlannerModelRecall, type PlannerModelStore, type PlannerReplyClassification, type PlannerRuntimeToggles, PlannerUsage, type PluginSource, type PrdBlock, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, QueuedMessage, QueuedTaskMessage, REFUSED_COMMANDS, ReadFileOpts, RepairEvidence, type RepairLoopOpts, type RepairVerdict, RepoGroupLayout, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchToolType, type ResearchTurn, ResolveContext, type RewindTarget, RunnerApprovals, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, RunnerSpawnOptions, RunnerTransport, SETTINGS_ENV_ALLOWLIST, SETTINGS_ENV_REFUSED, STATE_DIR, STOPPED_TOOL_RESULT, SYMBOL_LANGUAGES, type SaveSession, Session, SessionBroadcaster, type SessionData, type SessionDeps, SessionMessage, type SessionMeta, SessionNotice, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SkillInfo, type SkillMetadata, SkillsService, type SpawnSpec, StdioAgentAdapter, StructuredEvent, StructuredRunner, type StructuredRunnerDeps, StructuredSession, StructuredSessionCapability, StructuredTurnEnd, TASK_QUERY_ANSWER_MAX_CHARS, TASK_QUERY_ANSWER_OR_OPS, TASK_QUERY_FIELDS, TASK_QUERY_PROTOCOL, TASK_QUERY_REMINDER, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, type TaskAttemptSnapshot, TaskControlError, TaskIsolation, TaskLogEvent, type TaskLogFile, type TaskLogLocation, TaskLogRecorder, type TaskLogRecorderDeps, TaskModeAgentAdapter, TaskOp, TaskOrchestrator, type TaskOrchestratorDeps, type TaskOrchestratorOptions, type TaskOutputAttempt, type TaskOutputSource, type TaskQuery, type TaskQueryCatalog, type TaskQueryField, TaskRunnerFlags, TaskSnapshot, TaskStartOptions, TmuxRunner, type TmuxRunnerDeps, type TokenCarriers, type ToolCall, ToolOutcome, type ToolResult, type TranscriptQuery, type TranscriptReader, type TransportRoute, TransportRouter, UsageRecord, type UserSettings, Verdict, VerdictEngine, type VerdictListener, type WorkspaceCheckDeps, WorkspaceNotAProjectError, WorkspaceNotFoundError, type WorkspaceProjectCheckDeps, type WorktreeIsolationDeps, admitSettingsEnv, applyHeadLimit, assertInstallablePluginUrl, assertPlainPluginName, assertWorkspaceExists, assertWorkspaceIsProject, augmentPromptWithPriorOutputs, augmentedPath, bearerHeaderValue, buildConflictRepairPrompt, buildConflictResolutionPrompt, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildSplitPrompt, buildSubagentSystemPrompt, canContinue, clampThinkingEffort, classifyCommand, classifyPlannerReply, classifyPluginSource, clearAugmentedPathCache, clearDaemonToken, clearResearchShellCache, clearState, clipboardCopyCommand, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, composeContinuationPrompt, configuredProviders, continuability, createAiService, createSession, createSkillsService, createTaskAdapter, createTaskOrchestrator, createWorktreeIsolation, daemonTokenPath, defaultLogger, definitionPattern, deleteSession, describeMergeResult, discoverGeminiModels, effectiveAllowlist, ensureDir, ensurePrivateDir, ensureStateDirIgnored, executionLogBlock, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, globalDataDir, grantScopeFor, hasTmux, idSegment, includeGlobFor, isCliProvider, isOpenAiProvider, isPlainPluginName, isValidManifest, killTree, languageForId, listSessions, listTaskLogAttempts, loadSession, loadSessionPlanState, loadState, mapAgentTool, migrateOldConfigDir, migratePlanIsolation, mintDaemonToken, mintSessionId, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, openTaskLog, parseMaxParallel, parseTaskQueryJson, pendingEditRulesBlock, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, reEmitTaskQueryPrompt, readDaemonToken, readTaskLog, referencePattern, renderPlanMap, renderPriorOutputs, renderTaskQueryAnswer, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolvePluginInstallDir, resolveProviderFromPrefix, resolveResearchShell, resolveSkillInvocation, resolveTaskRunnerFlags, resolveWithin, retargetTaskRunner, routeTransport, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, sessionDataDir, sessionRuntimeSettings, stateExists, stripModelPrefix, summarizeOutput, supportsTaskMode, taskOpsRejectedPrompt, taskQuerySignature, textHasTaskQuery, tmuxSessionName, tmuxSocketName, tmuxWindowName, tokenSubprotocols, tokensMatch, truncatedPlanReEmitPrompt, wellKnownBinDirs, withPath, writePrivateFile };
5406
+ export { ALLOWED_PLUGIN_HOSTS, ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type Adr0013IsolationRun, type Adr0013PlanIsolation, type Adr0013TaskRecord, AgentAdapter, AgentEvent, AgentProcessDeps, AgentStartOptions, AiProvider, ApplyTaskOpsResult, ApprovalAnswer, ApprovalDecision, ApprovalMode, ApprovalPolicy, ApprovalRequest, type AskOptions, AwaitingReason, BUILTIN_SKILL_NAMES, BaseAiService, BaseConfig, BaseFileSystem, BufferedTaskOutputSource, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, type Continuability, ConversationBusyError, type ConversationCompaction, ConversationEditError, type ConversationFork, ConversationMessage, type ConversationRequest, type ConversationRewind, type ConversationTurn, type ConversationVariant, DAEMON_SUBPROTOCOL, DAEMON_TOKEN_SUBPROTOCOL_PREFIX, DEFAULT_MAX_PARALLEL, DiscoveredModel, type EnvAdmission, EnvConfig, type ExecFileFn, type ExecImpl, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, type GitExecFn, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HomeTranscriptReader, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, IWorktreeIsolation, IsolationHandoff, IsolationLandedTask, IsolationMergeResult, IsolationOutcome, IsolationRun, IsolationTaskRecord, IsolationTaskStatus, IsolationView, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, LegacyPlanState, type LiveOutputLookup, type LiveTail, type LiveTailOptions, type MappedTool, MergeGateView, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, ORDEWELL_SETTABLE_ENV, OUTPUT_LINES_DEFAULT, OUTPUT_LINES_MAX, OpenAiService, OpenCodeAdapter, type OrchestratorObserver, OrchestratorOption, PLUGIN_NAME_PATTERN, PROVIDER_CREDENTIAL_ENV, PROVIDER_DETECT_PRIORITY, PROVIDER_LABEL, PROVIDER_PRIORITY, PROVIDER_SHORT_LABEL, type PendingApproval, PendingApprovals, type PendingApprovalsOptions, PlanEditError, PlanIsolation, PlanParseError, type PlanRequest, PlanState, PlanStatus, PlanStore, Planner, type PlannerModelCandidate, type PlannerModelChoice, PlannerModelMemory, type PlannerModelRecall, type PlannerModelStore, type PlannerReplyClassification, type PlannerRuntimeToggles, PlannerUsage, type PluginSource, type PrdBlock, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, QueuedMessage, QueuedTaskMessage, REFUSED_COMMANDS, ReadFileOpts, RepairEvidence, type RepairLoopOpts, type RepairVerdict, RepoGroupLayout, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchToolType, type ResearchTurn, ResolveContext, type RewindTarget, RunnerApprovals, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, RunnerSpawnOptions, RunnerTransport, SETTINGS_ENV_ALLOWLIST, SETTINGS_ENV_REFUSED, STATE_DIR, STOPPED_TOOL_RESULT, SYMBOL_LANGUAGES, type SaveSession, Session, SessionBroadcaster, type SessionData, type SessionDeps, SessionMessage, type SessionMeta, SessionNotice, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SkillInfo, type SkillMetadata, SkillsService, type SpawnSpec, StdioAgentAdapter, StructuredEvent, StructuredRunner, type StructuredRunnerDeps, StructuredSession, StructuredSessionCapability, StructuredTurnEnd, TASK_QUERY_ANSWER_MAX_CHARS, TASK_QUERY_ANSWER_OR_OPS, TASK_QUERY_FIELDS, TASK_QUERY_PROTOCOL, TASK_QUERY_REMINDER, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, type TaskAttemptSnapshot, TaskControlError, TaskIsolation, TaskLogEvent, type TaskLogFile, type TaskLogLocation, TaskLogRecorder, type TaskLogRecorderDeps, TaskModeAgentAdapter, TaskOp, TaskOrchestrator, type TaskOrchestratorDeps, type TaskOrchestratorOptions, type TaskOutputAttempt, type TaskOutputSource, type TaskQuery, type TaskQueryCatalog, type TaskQueryField, TaskRunnerFlags, TaskSnapshot, TaskStartOptions, TmuxRunner, type TmuxRunnerDeps, type TokenCarriers, type ToolCall, ToolOutcome, type ToolResult, type TranscriptQuery, type TranscriptReader, type TransportRoute, TransportRouter, TreeSnapshot, UsageRecord, type UserSettings, Verdict, VerdictEngine, type VerdictListener, type WorkspaceCheckDeps, WorkspaceNotAProjectError, WorkspaceNotFoundError, type WorkspaceProjectCheckDeps, type WorktreeIsolationDeps, admitSettingsEnv, applyHeadLimit, assertInstallablePluginUrl, assertPlainPluginName, assertWorkspaceExists, assertWorkspaceIsProject, augmentPromptWithPriorOutputs, augmentedPath, bearerHeaderValue, buildConflictRepairPrompt, buildConflictResolutionPrompt, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildSplitPrompt, buildSubagentSystemPrompt, canContinue, clampThinkingEffort, classifyCommand, classifyPlannerReply, classifyPluginSource, clearAugmentedPathCache, clearDaemonToken, clearResearchShellCache, clearState, clipboardCopyCommand, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, composeContinuationPrompt, configuredProviders, continuability, createAiService, createSession, createSkillsService, createTaskAdapter, createTaskOrchestrator, createWorktreeIsolation, daemonTokenPath, defaultLogger, definitionPattern, deleteSession, describeMergeResult, discoverGeminiModels, effectiveAllowlist, ensureDir, ensurePrivateDir, ensureStateDirIgnored, executionLogBlock, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, globalDataDir, grantScopeFor, hasTmux, idSegment, includeGlobFor, isCliProvider, isOpenAiProvider, isPlainPluginName, isValidManifest, killTree, languageForId, listSessions, listTaskLogAttempts, loadSession, loadSessionPlanState, loadState, mapAgentTool, migrateOldConfigDir, migratePlanIsolation, mintDaemonToken, mintSessionId, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, openTaskLog, parseMaxParallel, parseTaskQueryJson, pendingEditRulesBlock, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, reEmitTaskQueryPrompt, readDaemonToken, readTaskLog, referencePattern, renderPlanMap, renderPriorOutputs, renderTaskQueryAnswer, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolvePluginInstallDir, resolveProviderFromPrefix, resolveResearchShell, resolveSkillInvocation, resolveTaskRunnerFlags, resolveWithin, retargetTaskRunner, routeTransport, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, sessionDataDir, sessionRuntimeSettings, stateExists, stripModelPrefix, summarizeOutput, supportsTaskMode, taskOpsRejectedPrompt, taskQuerySignature, textHasTaskQuery, tmuxSessionName, tmuxSocketName, tmuxWindowName, tokenSubprotocols, tokensMatch, truncatedPlanReEmitPrompt, wellKnownBinDirs, withPath, writePrivateFile };