@ordewell/core 0.6.4 → 0.7.0

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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/{IFileSystem-DQEKyC6H.d.ts → IFileSystem-D4ADfTrX.d.ts} +1 -1
  3. package/dist/{IFileSystem-Qj2MWHn_.d.mts → IFileSystem-DgpX0BU7.d.mts} +1 -1
  4. package/dist/{ModeResolver-ByNpC0EP.d.ts → ModeResolver-BEcRAz1c.d.ts} +3 -3
  5. package/dist/{ModeResolver-rqaY_4Ex.d.mts → ModeResolver-Cv01ZDd9.d.mts} +3 -3
  6. package/dist/{Task-xqdxugt2.d.mts → Task-CoKhvBa1.d.mts} +275 -2
  7. package/dist/{Task-xqdxugt2.d.ts → Task-CoKhvBa1.d.ts} +275 -2
  8. package/dist/{chunk-M4KXBEFJ.mjs → chunk-J3YSTPCE.mjs} +41 -41
  9. package/dist/chunk-J3YSTPCE.mjs.map +1 -0
  10. package/dist/{chunk-I6U3PVHL.mjs → chunk-LSGY7AIZ.mjs} +74 -23
  11. package/dist/chunk-LSGY7AIZ.mjs.map +1 -0
  12. package/dist/{chunk-JRZPSNRO.mjs → chunk-YU4UKKKI.mjs} +1 -1
  13. package/dist/chunk-YU4UKKKI.mjs.map +1 -0
  14. package/dist/index.d.mts +250 -34
  15. package/dist/index.d.ts +250 -34
  16. package/dist/index.js +2002 -670
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +1642 -366
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/order-labels.d.mts +2 -1
  21. package/dist/order-labels.d.ts +2 -1
  22. package/dist/{parsing-DDZ1rUYa.d.mts → parsing-B4OCHH1_.d.mts} +24 -3
  23. package/dist/{parsing-COPG8-Ep.d.ts → parsing-DMdOq-BV.d.ts} +24 -3
  24. package/dist/parsing.d.mts +4 -3
  25. package/dist/parsing.d.ts +4 -3
  26. package/dist/parsing.js +36 -38
  27. package/dist/parsing.js.map +1 -1
  28. package/dist/parsing.mjs +2 -2
  29. package/dist/{plan-utils-Br8UAoiu.d.ts → plan-utils-BdYPRBno.d.ts} +28 -3
  30. package/dist/{plan-utils-DMgajMvd.d.mts → plan-utils-CD1Xu65s.d.mts} +28 -3
  31. package/dist/plan-utils.d.mts +4 -3
  32. package/dist/plan-utils.d.ts +4 -3
  33. package/dist/plan-utils.js +111 -58
  34. package/dist/plan-utils.js.map +1 -1
  35. package/dist/plan-utils.mjs +8 -2
  36. package/dist/testing.d.mts +11 -2
  37. package/dist/testing.d.ts +11 -2
  38. package/dist/testing.js +17 -0
  39. package/dist/testing.js.map +1 -1
  40. package/dist/testing.mjs +17 -0
  41. package/dist/testing.mjs.map +1 -1
  42. package/package.json +4 -2
  43. package/dist/chunk-I6U3PVHL.mjs.map +0 -1
  44. package/dist/chunk-JRZPSNRO.mjs.map +0 -1
  45. package/dist/chunk-M4KXBEFJ.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,16 +1,17 @@
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, aV as Task, f as AgentProcessDeps, c as AgentAdapter, aB as ResearchProgress, aA as ResearchLogEntry, u as ConversationMessage, bb as UsageRecord, b2 as TaskSnapshot, r as AwaitingReason, Q as IsolationHandoff, $ as IsolationRun, a0 as IsolationTaskRecord, aW as TaskIsolation, a3 as IsolationView, Y as IsolationOutcome, ay as RepairEvidence, b9 as TreeSnapshot, bi as Verdict, aJ as RunnerRegistry, ax as QueuedTaskMessage, aw as QueuedMessage, b as ActiveTaskSession, ac as OrchestratorOption, aZ 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, aM as RunnerVersionProbe, aR as StructuredSessionCapability, b3 as TaskStartOptions, aS as StructuredTurnEnd, aQ as StructuredEvent, aK as RunnerSpawnOptions, K as IPluginStore, aI as RunnerPluginManifest, aF as ResolveContext, b1 as TaskRunnerFlags } from './Task-xqdxugt2.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, aN as StreamEvent, aO as StreamStepEvent, aP as StreamThinkingEvent, aT as SubagentLogEntry, aU as SubagentOutcome, aX as TaskIsolationState, aY as TaskMode, a_ as TaskModeUnsupportedError, a$ as TaskModelAssignment, b0 as TaskOutputSummary, b4 as TaskStatus, b5 as TaskTransport, b6 as TaskType, b7 as TaskWithParent, b8 as ThinkingBlock, ba as UsageLine, bc as UsageTotals, bd as UserPromptEntry, be as UserStep, bf as ValidationCheck, bg as ValidationContext, bh as ValidationResult, bj as VerificationCheck, bk as WINDOWS_MAX_COMMAND_LINE, bl as addPlannerUsage, bm as addTaskToPlan, bn as addUsage, bo as approvalScopes, bp as buildShellInvocation, bq as collectProviderCredentials, br as createEmptyPlan, bs as createTask, bt as emptyWarnings, bu as enabledRunners, bv as fetchAllProviderModels, bw as flattenTasks, bx as flattenTasksWithParents, by as isAwaitingReason, bz as isExecutableResolved, bA as isGranted, bB as isMeasured, bC as isReservedRunnerName, bD as isRunnerApproval, bE as isRunnerTransport, bF as isStructuredSession, bG as keepExecutionState, bH as knownModelId, bI as migrateLegacyPlan, bJ as migratePlanState, bK as migrateTask, bL as partedPromptUsage, bM as planDirectLaunch, bN as planShellLaunch, bO as plannerContextFill, bP as posixShellQuote, bQ as removeTaskFromPlan, bR as renumberTasks, bS as resolveModelShortcut, bT as resolveProvider, bU as stripAnsi, bV as toApprovalDecision, bW as toOrchestratorOptions, bX as updateTaskInPlan, bY as usageLine, bZ as validateModifiedPlan, b_ as warningsText, b$ as windowsCommandLine, c0 as wrapWithPty } from './Task-xqdxugt2.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-DMgajMvd.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 digestTaskLog, Z as drainNext, _ as executionSummary, $ as followTurn, a0 as fromTranscript, a1 as hasHiddenDetail, a2 as holdPrompt, a3 as outputLines, a4 as outputPreview, a5 as parseTaskOpsJson, a6 as reduceConversation, a7 as reduceTaskLog, a8 as replayTaskLog, a9 as runnerToolSubject, aa as serializePlan, ab as serializeTask, ac as serializeTaskStatus, ad as stopTurn, ae as summarizeToolCall, af as taskStartedNotice, ag as textHasTaskOps, ah as toTaskLogEvent, ai as toolHeadline, aj as trimToolOutput, ak as truncateCheckpointSummary, al as unsendAll, am as unsendLatest } from './plan-utils-DMgajMvd.mjs';
5
- import { I as IFileSystem, R as ReadFileOpts, T as ToolOutcome, b as GrepOptions, a as GlobOptions, F as FindSymbolOptions } from './IFileSystem-Qj2MWHn_.mjs';
6
- export { G as GREP_DEFAULT_HEAD_LIMIT, c as GrepOutputMode, S as SEARCH_EXCLUSIONS } from './IFileSystem-Qj2MWHn_.mjs';
7
- import { R as RunnerModeInfo } from './ModeResolver-rqaY_4Ex.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-rqaY_4Ex.mjs';
1
+ import { aX as RunnerId, av as PlanStatus, a9 as LegacyPlanState, L as IApproval, k as ApprovalDecision, p as ApprovalRequest, j as ApprovalAnswer, O as ITerminalRunner, M as IConfig, h as AiProvider, aJ as ProviderModelLists, m as ApprovalMode, _ as IsolationMergeResult, W as IsolationLandedTask, Q as IWorktreeIsolation, a5 as IsolationTaskStatus, as as PlanIsolation, b0 as RunnerTransport, aQ as RepoGroupLayout, P as ITerminalSession, y as DiscoveredModel, bc as Task, f as AgentProcessDeps, c as AgentAdapter, ap as OrdewellMcpServer, aS as ResearchProgress, aR as ResearchLogEntry, w as ConversationMessage, ay as PlannerToolHandler, bz as UsageRecord, bo as TaskSnapshot, r as AwaitingReason, T as IsolationHandoff, a2 as IsolationRun, a3 as IsolationTaskRecord, be as TaskIsolation, a6 as IsolationView, $ as IsolationOutcome, aP as RepairEvidence, bx as TreeSnapshot, bG as Verdict, a_ as RunnerRegistry, aO as QueuedTaskMessage, aN as QueuedMessage, b as ActiveTaskSession, ao as OrchestratorOption, bh as TaskModeAgentAdapter, g as AgentStartOptions, e as AgentEvent, aV as ResearchToolType, az as PlannerUsage, n as ApprovalPolicy, au as PlanState, bd as TaskCompleteArgs, t as CheckpointAnswer, aY as RunnerInvocation, A as AbstractRunner, a as AbstractTerminalSession, b1 as RunnerVersionProbe, b6 as StructuredSessionCapability, bp as TaskStartOptions, br as TaskTokenScope, b7 as StructuredTurnEnd, b5 as StructuredEvent, a$ as RunnerSpawnOptions, N as IPluginStore, aZ as RunnerPluginManifest, aW as ResolveContext, bn as TaskRunnerFlags } from './Task-CoKhvBa1.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, u as CheckpointArgs, v as CommandLineTooLongError, D as DENY_ALL, x as DiscoveredMode, z as DiscoveryCommand, E as EditPlanArgs, F as EmbeddedNewlineError, G as ExecutableNotFoundError, H as FetchAllProviderModelsOptions, I as HeadlessRunner, J as HeadlessRunnerDeps, K as HeadlessSession, R as IntegrationDisposal, S as IsolationAvailability, U as IsolationHandoffRepo, V as IsolationInactiveReason, X as IsolationLanding, Y as IsolationMergeBlock, Z as IsolationMergeBlockReason, a0 as IsolationPruneResult, a1 as IsolationRepo, a4 as IsolationTaskRepo, a7 as LaunchDeps, a8 as LaunchPlan, aa as LineBuffer, ab as ListModelsArgs, ac as ListRunnersArgs, ad as McpClientConfig, ae as McpCredential, af as McpTool, ag as McpToolContext, ah as McpToolReply, ai as Message, aj as ModelCatalog, ak as ModelShortcut, al as ORCHESTRATOR_SHORTCUTS, am as ORDEWELL_MCP_PATH, an as ORDEWELL_MCP_SERVER_NAME, aq as OwnerOnlyFile, ar as PLANNER_TOOLS, at as PlanModificationWarnings, aw as PlannerStartOptions, ax as PlannerTokenScope, aA as PluginCloneFn, aB as PluginEntry, aC as PluginFeatures, aD as PluginMode, aE as PluginModelDiscovery, aF as PluginRunnerDef, aG as PreparedLaunch, aH as PreparedTask, aI as ProviderCredentialSource, aK as ProviderModelsResult, aL as PtySize, aM as PtyWrapOptions, aT as ResearchStep, aU as ResearchStepOutcome, b2 as StreamEvent, b3 as StreamStepEvent, b4 as StreamThinkingEvent, b8 as SubagentLogEntry, b9 as SubagentOutcome, ba as SubmitPlanArgs, bb as TASK_TOOLS, bf as TaskIsolationState, bg as TaskMode, bi as TaskModeUnsupportedError, bj as TaskModelAssignment, bk as TaskOutputArgs, bl as TaskOutputSummary, bm as TaskQueryArgs, bq as TaskStatus, bs as TaskToolHandler, bt as TaskTransport, bu as TaskType, bv as TaskWithParent, bw as ThinkingBlock, by 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, b_ as isReservedRunnerName, b$ as isRunnerApproval, c0 as isRunnerTransport, c1 as isStructuredSession, c2 as keepExecutionState, c3 as knownModelId, c4 as mcpClientConfig, c5 as migrateLegacyPlan, c6 as migratePlanState, c7 as migrateTask, c8 as ownerOnlyConfigFile, c9 as partedPromptUsage, ca as planDirectLaunch, cb as planShellLaunch, cc as plannerContextFill, cd as posixShellQuote, ce as removeTaskFromPlan, cf as renumberTasks, cg as resolveModelShortcut, ch as resolveProvider, ci as sharedMcpServer, cj as stripAnsi, ck as toApprovalDecision, cl as toOrchestratorOptions, cm as updateTaskInPlan, cn as usageLine, co as validateModifiedPlan, cp as warningsText, cq as windowsCommandLine, cr as wrapWithPty } from './Task-CoKhvBa1.mjs';
3
+ import { x as TaskOp, M as MergeGateView, p as SessionBroadcaster, A as ApplyTaskOpsResult, q as SessionMessage, r as SessionNotice, v as TaskLogEvent } from './plan-utils-CD1Xu65s.mjs';
4
+ export { a as ApprovalBlock, b as ApprovalStatus, C as CHECKPOINT_TRUNCATE_LENGTH, c as ConversationInput, d as ConversationView, D as DiffRow, e as DiffRowKind, f as DiffStat, g as DisplayBlock, E as EMPTY_CONVERSATION, h as EMPTY_HOLD, i as EMPTY_TASK_LOG, G as GatedConversation, L as LocalEntry, j as MessageBlock, k as MessageRole, N as NO_TURN, O as OutputPreview, P as PlanBlock, l as PlanMarkerStatus, m as PromptHold, S as SerializedPlan, n as SerializedTask, o as SerializedTaskStatus, s as SubagentBlock, t as SubagentChild, u as SubagentStatus, T as TakenPrompt, w as TaskLogView, y as TaskRef, z as ThinkingDisplayBlock, B as ToolBlock, F as ToolHeadline, H as ToolStatus, I as TurnGate, U as UsageBlock, J as aheadOfDraft, K as applyTaskOps, Q as canMergeTasks, R as canSetDependencies, V as canSplitTask, W as capConflictFiles, X as classifyOutcome, Y as coalesceTaskLog, Z as dependencyCandidates, _ as dependentsOf, $ as diffRows, a0 as diffStat, a1 as diffSummary, a2 as digestTaskLog, a3 as drainNext, a4 as executionSummary, a5 as followTurn, a6 as fromTranscript, a7 as hasHiddenDetail, a8 as holdPrompt, a9 as outputLines, aa as outputPreview, ab as parseTaskOpsJson, ac as reduceConversation, ad as reduceTaskLog, ae as replayTaskLog, af as runnerToolSubject, ag as serializePlan, ah as serializeTask, ai as serializeTaskStatus, aj as stopTurn, ak as summarizeToolCall, al as taskStartedNotice, am as textHasTaskOps, an as toTaskLogEvent, ao as toolHeadline, ap as trimToolOutput, aq as truncateCheckpointSummary, ar as unsendAll, as as unsendLatest } from './plan-utils-CD1Xu65s.mjs';
5
+ import { I as IFileSystem, R as ReadFileOpts, T as ToolOutcome, b as GrepOptions, a as GlobOptions, F as FindSymbolOptions } from './IFileSystem-DgpX0BU7.mjs';
6
+ export { G as GREP_DEFAULT_HEAD_LIMIT, c as GrepOutputMode, S as SEARCH_EXCLUSIONS } from './IFileSystem-DgpX0BU7.mjs';
7
+ import { R as RunnerModeInfo } from './ModeResolver-Cv01ZDd9.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-Cv01ZDd9.mjs';
9
9
  import { ChildProcess } from 'child_process';
10
- import { b as PlanParseError } from './parsing-DDZ1rUYa.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-DDZ1rUYa.mjs';
10
+ import { b as PlanParseError } from './parsing-B4OCHH1_.mjs';
11
+ export { P as PLAN_ENVELOPE_KEY, a as PartialPlanTask, c as PlanTaskError, d as PlanTasksResult, T as TASK_OPS_ENVELOPE_KEY, e as TASK_QUERY_ENVELOPE_KEY, f as checkDepsResolve, g as checkImmutableLog, h as checkInProgress, i as checkNoCycles, j as checkUniqueIds, k as escapeControlCharsInStrings, l as extractJsonObject, m as extractObjectWithBalance, n as extractObjectsWithKey, o as looksLikePlanAttempt, p as opensWithJsonObject, q as parsePartialPlan, r as parsePlanJson, s as stripModelNoise, t as stripTrailingCommas, v as validatePlanModification, u as validatePlanTasks } from './parsing-B4OCHH1_.mjs';
12
12
  export { resolveOrderLabel, taskOrderLabel } from './order-labels.mjs';
13
13
  import 'events';
14
+ import 'zod/v4';
14
15
 
15
16
  interface SessionMeta {
16
17
  id: string;
@@ -935,6 +936,8 @@ interface CliAgentAiServiceDeps extends Partial<AgentProcessDeps> {
935
936
  createAdapter?: (runner: string, deps: AgentProcessDeps) => AgentAdapter | null;
936
937
  /** Workspace root the agent explores. Defaults to the host process's cwd. */
937
938
  workspaceRoot?: () => string;
939
+ /** Where a conversation's planner tools are served (ADR-0022). Absent: every planner gets the envelopes. */
940
+ mcpServer?: OrdewellMcpServer;
938
941
  }
939
942
  /**
940
943
  * A coding agent driven as Ordewell's planner (ADR-0009).
@@ -963,6 +966,11 @@ declare class CliAgentAiService implements IAiService {
963
966
  */
964
967
  private lastNativeSessionId;
965
968
  private conversation;
969
+ private readonly mcpServer;
970
+ /** The planner token the running process was spawned with; revoked with the process (ADR-0022, A3). */
971
+ private plannerToken;
972
+ /** Whether the running planner was spawned with its tools and the CLI reported them connected. */
973
+ private toolsAttached;
966
974
  private activeAbort;
967
975
  /**
968
976
  * Every subagent this conversation has reported starting, and finishing.
@@ -981,6 +989,8 @@ declare class CliAgentAiService implements IAiService {
981
989
  * on the old model. No conversation yet is vacuously "current".
982
990
  */
983
991
  conversationMatchesConfig(): boolean;
992
+ /** Whether this conversation's planner submits through the Ordewell MCP server rather than the envelopes. */
993
+ plannerToolsAttached(): boolean;
984
994
  /** The agent's own session id, a resumption hint only — Ordewell's transcript is authoritative (T4). */
985
995
  nativeSessionId(): string | null;
986
996
  reset(): void;
@@ -1008,6 +1018,10 @@ declare class CliAgentAiService implements IAiService {
1008
1018
  * mode from here without changing this signature.
1009
1019
  */
1010
1020
  private startAdapter;
1021
+ /** Spawn with the Ordewell server injected. False, with nothing left running, when it did not connect. */
1022
+ private startWithTools;
1023
+ /** Kill the planner process, and with it the token it was spawned with. */
1024
+ private disposeAdapter;
1011
1025
  /**
1012
1026
  * The live agent process, restarted from its own session id if it died
1013
1027
  * between turns. Resume is a hint: when it fails, the caller's next
@@ -1036,6 +1050,15 @@ declare class CliAgentAiService implements IAiService {
1036
1050
  sendPlanningPrompt(prompt: string, runners: RunnerId[], runnerModes?: Record<RunnerId, RunnerModeInfo[]>, autonomousDefault?: boolean): Promise<Task[]>;
1037
1051
  }
1038
1052
 
1053
+ /**
1054
+ * The planner tools a session offers its conversation (ADR-0022). A backend
1055
+ * that can inject the Ordewell MCP server into its planner issues a planner
1056
+ * token bound to `sessionId` and these handlers; any other ignores the offer.
1057
+ */
1058
+ interface PlannerToolsOffer {
1059
+ sessionId: string;
1060
+ handler: PlannerToolHandler;
1061
+ }
1039
1062
  /**
1040
1063
  * Everything the conversation loop needs to start planning (ADR-0002).
1041
1064
  * The AI service keeps the tool-use message history internally across turns;
@@ -1072,6 +1095,7 @@ interface ConversationRequest {
1072
1095
  * carries the user's new message.
1073
1096
  */
1074
1097
  initialMessage?: string;
1098
+ plannerTools?: PlannerToolsOffer;
1075
1099
  }
1076
1100
  /**
1077
1101
  * One planner turn's outcome. The planner talks to the user (`message`),
@@ -1134,6 +1158,13 @@ interface IAiService {
1134
1158
  * `continueConversation`, restart instead so the new model takes effect.
1135
1159
  */
1136
1160
  conversationMatchesConfig?(): boolean;
1161
+ /**
1162
+ * Whether the planner reads the catalog and submits plans through Ordewell's
1163
+ * MCP tools (ADR-0022). Optional, and false when absent: only a harness
1164
+ * planner the server attached to has them, and every other planner keeps
1165
+ * the per-turn catalog and the envelopes.
1166
+ */
1167
+ plannerToolsAttached?(): boolean;
1137
1168
  /**
1138
1169
  * Optional: prune bulky raw tool output out of the live conversation, in
1139
1170
  * place, keeping subagent digests. Returns the characters removed. Absent
@@ -2727,20 +2758,10 @@ declare abstract class StdioAgentAdapter implements AgentAdapter {
2727
2758
  protected static parse<T>(line: string): T | null;
2728
2759
  }
2729
2760
 
2730
- /**
2731
- * Claude Code as a planner, over its bidirectional streaming-JSON transport
2732
- * (ADR-0009).
2733
- *
2734
- * `-p --input-format stream-json --output-format stream-json` keeps one process
2735
- * alive across turns: user messages go in as JSON lines, and the session's
2736
- * assistant blocks, tool uses, tool results and turn boundaries come back the
2737
- * same way. It is the richest of the three streams — partial messages and
2738
- * separate thinking blocks — which is why this agent went first.
2739
- */
2740
2761
  declare class ClaudeCodeAdapter extends StdioAgentAdapter implements TaskModeAgentAdapter {
2741
2762
  readonly agentId = "claude-code";
2742
- private interruptCount;
2743
- /** Interrupts sent and not yet acknowledged, by request id. */
2763
+ private controlCount;
2764
+ /** Control requests sent and not yet answered, by request id. */
2744
2765
  private readonly pendingControl;
2745
2766
  /** An interrupt was sent during the current turn, so an aborted result is that interrupt, not a failure. */
2746
2767
  private interruptRequested;
@@ -2779,6 +2800,10 @@ declare class ClaudeCodeAdapter extends StdioAgentAdapter implements TaskModeAge
2779
2800
  private requestedMode;
2780
2801
  /** The session `--resume` asked for, until the CLI's `init` shows it was taken up. */
2781
2802
  private pendingResume;
2803
+ /** The `--mcp-config` file of the running process, which holds its token; removed with the process. */
2804
+ private mcpConfig;
2805
+ /** `mcp__ordewell__`, once this process was given the server. */
2806
+ private ordewellToolPrefix;
2782
2807
  protected spawnSpec(opts: AgentStartOptions): SpawnSpec;
2783
2808
  /**
2784
2809
  * A task's run: the manifest decides what its mode and effort mean
@@ -2789,6 +2814,18 @@ declare class ClaudeCodeAdapter extends StdioAgentAdapter implements TaskModeAge
2789
2814
  * without it `-p` refuses them silently and nothing can ever surface one.
2790
2815
  */
2791
2816
  private taskSpawnSpec;
2817
+ /**
2818
+ * `--mcp-config` takes a path as well as inline JSON; the path keeps the
2819
+ * token out of the argv every local user can list (ADR-0022, A5). The file
2820
+ * lives exactly as long as the process that reads it. `alwaysLoad` because
2821
+ * the CLI otherwise defers MCP tools behind its tool search, and a model
2822
+ * that has to look an Ordewell tool up first tends to go on without it.
2823
+ */
2824
+ private ordewellServerArgs;
2825
+ private removeMcpConfig;
2826
+ start(opts: AgentStartOptions): Promise<void>;
2827
+ /** Asks the CLI itself, which reports `pending` until its connection attempt settles. */
2828
+ mcpAttached(): Promise<boolean>;
2792
2829
  /**
2793
2830
  * Claude Code's soft interrupt: the turn stops, the process and its session
2794
2831
  * stay. The CLI acknowledges on the control channel, then closes the turn
@@ -2796,6 +2833,8 @@ declare class ClaudeCodeAdapter extends StdioAgentAdapter implements TaskModeAge
2796
2833
  * as an interrupted `turn_end`.
2797
2834
  */
2798
2835
  interrupt(timeoutMs: number): Promise<boolean>;
2836
+ /** Send a control request and wait for its answer; null when none came in time or the process ended. */
2837
+ private control;
2799
2838
  /**
2800
2839
  * A `--resume` the CLI cannot find is answered at once with an error result
2801
2840
  * and no `init`, after which it waits on stdin for input it never reads — a
@@ -2900,11 +2939,16 @@ declare class CodexAdapter extends StdioAgentAdapter implements TaskModeAgentAda
2900
2939
  * names only the item, and a person deciding needs to see the files.
2901
2940
  */
2902
2941
  private readonly fileChangePaths;
2942
+ /** The row each announced file of an in-flight `fileChange` item is shown under, by the file's shown path. */
2943
+ private readonly fileChangeRows;
2903
2944
  /** Requests this adapter sent and awaits an answer to, by JSON-RPC id. */
2904
2945
  private readonly pendingRequests;
2905
2946
  private resumeAttempted;
2906
2947
  private resumeFallbackSent;
2907
2948
  private sandbox;
2949
+ /** The Ordewell server's startup state, as Codex last reported it for this thread. */
2950
+ private mcpStartup;
2951
+ private mcpStartupSettled;
2908
2952
  /**
2909
2953
  * Subagent threads this session has spawned, keyed by the child thread id.
2910
2954
  * Codex runs a subagent in its own thread and replays both threads' events on
@@ -2931,6 +2975,12 @@ declare class CodexAdapter extends StdioAgentAdapter implements TaskModeAgentAda
2931
2975
  */
2932
2976
  private startThread;
2933
2977
  private threadParams;
2978
+ /**
2979
+ * Codex's own startup report for the server, which it sends once the thread
2980
+ * has tried to connect (ADR-0022, S4). A report that came before this was
2981
+ * asked is kept, so asking late still gets the answer.
2982
+ */
2983
+ mcpAttached(): Promise<boolean>;
2934
2984
  private effort;
2935
2985
  /**
2936
2986
  * `turn/interrupt` names the turn as well as the thread, so an interrupt
@@ -2987,6 +3037,16 @@ declare class CodexAdapter extends StdioAgentAdapter implements TaskModeAgentAda
2987
3037
  /** A tool item entering `inProgress` — announce the call so the timeline moves. */
2988
3038
  private emitItemStart;
2989
3039
  private emitItemDone;
3040
+ /**
3041
+ * One row per changed file: a patch is several files, and one row naming
3042
+ * them all reads as a single cut-off path. The first file keeps the item's
3043
+ * id, which an approval for the patch points at. Announcing a file twice
3044
+ * returns the row it already has, so a change first seen completed still
3045
+ * gets its call.
3046
+ */
3047
+ private announceFileChange;
3048
+ /** Relative to the task's worktree, where every path but a stray one lies; a move names both ends. */
3049
+ private shownChangePath;
2990
3050
  /**
2991
3051
  * A `collabAgentToolCall` — the planner spawning, waiting on or messaging a
2992
3052
  * subagent. The call itself is planner-level tool activity; the lifecycle it
@@ -3045,6 +3105,8 @@ declare class OpenCodeAdapter implements TaskModeAgentAdapter {
3045
3105
  private readonly openPermissions;
3046
3106
  /** Set once the server turns out to speak the 2.x API, which then owns the session. */
3047
3107
  private v2;
3108
+ /** The Ordewell server this process was configured with; null when none was given or its config could not be merged. */
3109
+ private ordewell;
3048
3110
  constructor(deps: AgentProcessDeps);
3049
3111
  start(opts: AgentStartOptions): Promise<void>;
3050
3112
  send(message: string, onEvent: (event: AgentEvent) => void, signal?: AbortSignal, onActivity?: () => void): Promise<void>;
@@ -3191,6 +3253,8 @@ declare class OpenCodeAdapter implements TaskModeAgentAdapter {
3191
3253
  private request;
3192
3254
  private headers;
3193
3255
  nativeSessionId(): string | null;
3256
+ /** Asks the server, which lists every MCP server it has with the state of its connection. */
3257
+ mcpAttached(): Promise<boolean>;
3194
3258
  dispose(): void;
3195
3259
  private exitMessage;
3196
3260
  }
@@ -3219,6 +3283,22 @@ interface ForkedDialogue {
3219
3283
  researchLog: ResearchLogEntry[];
3220
3284
  }
3221
3285
 
3286
+ /** A read made through a planner tool: refused once the turn's budget is gone, else answered, told to land when the budget asks it to. */
3287
+ type ToolRead<T> = {
3288
+ status: 'refused';
3289
+ } | {
3290
+ status: 'answered';
3291
+ value: T;
3292
+ landNow: boolean;
3293
+ };
3294
+ /** A plan or task edit handed to the open turn over a channel other than its reply (ADR-0022). */
3295
+ type PlannerSubmission = {
3296
+ kind: 'plan';
3297
+ tasks: Task[];
3298
+ } | {
3299
+ kind: 'task_ops';
3300
+ ops: TaskOp[];
3301
+ };
3222
3302
  /** Everything (re)opening a conversation needs besides the dialogue itself. */
3223
3303
  type ConversationOpening = Omit<ConversationRequest, 'goal' | 'onProgress' | 'signal' | 'priorHistory' | 'initialMessage'>;
3224
3304
  /**
@@ -3333,13 +3413,36 @@ declare class PlannerConversation {
3333
3413
  private savedInBackground;
3334
3414
  private turnsInFlight;
3335
3415
  private compacting;
3336
- private openTurnId;
3416
+ private openTurn;
3337
3417
  constructor(host: PlannerConversationHost);
3338
3418
  get transcript(): readonly ConversationMessage[];
3339
3419
  /** Whether a user turn is between its transcript append and its settled outcome. */
3340
3420
  get isTurnInFlight(): boolean;
3341
3421
  /** The user turn being answered, for what the host raises during it — an approval the turn's research asks for. */
3342
3422
  get currentTurnId(): string | undefined;
3423
+ /**
3424
+ * Hand the open turn a plan (already validated) or a task edit. The turn
3425
+ * settles with it exactly as with the same plan or ops parsed out of its
3426
+ * reply, and it wins over any envelope that reply carries. A later
3427
+ * submission replaces an earlier one. False when no user turn is open.
3428
+ */
3429
+ submit(submission: PlannerSubmission): boolean;
3430
+ /**
3431
+ * The edit the open turn already holds, for a further edit in the same reply
3432
+ * to join rather than replace. Empty when it holds nothing; null when it holds
3433
+ * a whole plan, which an edit cannot be layered on.
3434
+ */
3435
+ pendingOps(): TaskOp[] | null;
3436
+ /** Whether the turn would park this edit until a batch boundary instead of applying it as it settles. */
3437
+ editWouldQueue(ops: TaskOp[]): boolean;
3438
+ /**
3439
+ * A read the planner makes through a tool. It spends the same per-turn budget
3440
+ * as an envelope read, so a planner cannot read more by switching channels:
3441
+ * past the soft limit, or on a repeated question, the answer still comes but
3442
+ * is told to land the turn; at the hard limit it is refused. `signature`
3443
+ * names the question, for the repeat check.
3444
+ */
3445
+ read<T>(signature: string, answer: () => Promise<T>): Promise<ToolRead<T>>;
3343
3446
  /** Whether the model still holds this conversation in memory. */
3344
3447
  get isActive(): boolean;
3345
3448
  append(role: ConversationMessage['role'], content: string, opts?: {
@@ -3472,6 +3575,13 @@ declare class PlannerConversation {
3472
3575
  * would cost it the chance to fix the edit.
3473
3576
  */
3474
3577
  private drainTaskQueries;
3578
+ /**
3579
+ * The backend's answer, with what was handed in while it ran standing in
3580
+ * for whatever its reply carried. Taken once: a corrective re-send after a
3581
+ * rejected edit must not settle on the same submission again. A stopped
3582
+ * turn commits nothing, the same as a stopped reply with a plan in it.
3583
+ */
3584
+ private claimSubmission;
3475
3585
  /**
3476
3586
  * Render one read out of live state. Never persisted to the transcript: the
3477
3587
  * detail is context for the planner's next reply, and re-sending it on every
@@ -3498,7 +3608,8 @@ declare class PlannerConversation {
3498
3608
  *
3499
3609
  * The host's catalog is allowlist-filtered, so a restricted allowlist stays a
3500
3610
  * hard bound on every turn, and reads the plan's runners live, so a runner
3501
- * admitted mid-session by a retarget is shown like every other.
3611
+ * admitted mid-session by a retarget is shown like every other. A planner
3612
+ * with Ordewell's tools gets a reminder to read the catalog instead.
3502
3613
  */
3503
3614
  private catalogBlock;
3504
3615
  /**
@@ -3534,6 +3645,10 @@ declare class SkillsService {
3534
3645
  constructor(workspaceRoot?: string | undefined);
3535
3646
  private localDir;
3536
3647
  private globalDir;
3648
+ private readSeedManifest;
3649
+ private recordSeed;
3650
+ /** A seed the user never edited: safe to replace with a newer built-in. */
3651
+ private isUntouchedSeed;
3537
3652
  private seed;
3538
3653
  seedBuiltinSkill(name: string): boolean;
3539
3654
  /** Removes a retired built-in's seed from the global dir, but only if it's untouched by the user. */
@@ -3692,6 +3807,8 @@ interface SessionRuntimeSettings {
3692
3807
  modelAllowlist?: Record<string, string[]>;
3693
3808
  /** Read once as a run starts, never per spawn (ADR-0018, S1). Absent means terminal. */
3694
3809
  runnerTransport?: RunnerTransport;
3810
+ /** Absent means the user never chose, and `config.enabledRunners` (the host's defaults) decides. */
3811
+ enabledRunners?: RunnerId[];
3695
3812
  }
3696
3813
  declare function sessionRuntimeSettings(settings: UserSettings): SessionRuntimeSettings;
3697
3814
  /**
@@ -3724,10 +3841,10 @@ interface ConversationRewind extends ConversationFork {
3724
3841
  type SaveSession = (plan: LegacyPlanState, goal: string, workspace: string, sessionId: string) => void;
3725
3842
  /**
3726
3843
  * Everything a delivery surface constructs to host a session. Structural config
3727
- * (enabledRunners, orchestratorModel, providerModelLists) is snapshotted inside
3728
- * `config` at construction and never re-read from the environment. Runtime
3729
- * settings (tdd, verification) are read live via the `settings` callback so a toggle
3730
- * between generate and execute takes effect.
3844
+ * (orchestratorModel, providerModelLists) is snapshotted inside `config` at
3845
+ * construction and never re-read from the environment. Runtime settings (tdd,
3846
+ * verification, enabled runners) are read live via the `settings` callback so a
3847
+ * toggle between operations takes effect.
3731
3848
  */
3732
3849
  interface SessionDeps {
3733
3850
  config: IConfig;
@@ -3744,7 +3861,7 @@ interface SessionDeps {
3744
3861
  onNotice?: (notice: SessionNotice) => void;
3745
3862
  /** Shared across sessions — sole producer of model catalogs and routing lists. */
3746
3863
  modelResolver: ModelResolver;
3747
- /** Live runtime settings (tdd, verification). Read at each operation that needs them. */
3864
+ /** Live runtime settings (tdd, verification, enabled runners). Read at each operation that needs them. */
3748
3865
  settings: () => SessionRuntimeSettings;
3749
3866
  /**
3750
3867
  * Host-assigned session id. When set, every persist writes under this id so
@@ -3780,6 +3897,8 @@ interface SessionDeps {
3780
3897
  saveSession?: SaveSession;
3781
3898
  /** Where a structured task's log is saved (ADR-0018, P1). Defaults to a file per attempt beside the session's. */
3782
3899
  openTaskLog?: (location: TaskLogLocation, taskId: string) => TaskLogFile;
3900
+ /** The Ordewell MCP server a harness planner's tools are served from (ADR-0022). Defaults to the process's one. */
3901
+ mcpServer?: OrdewellMcpServer;
3783
3902
  }
3784
3903
  /**
3785
3904
  * The composition root: builds every collaborator a Session drives and wires
@@ -3852,6 +3971,7 @@ declare class Session {
3852
3971
  private currentSessionId;
3853
3972
  private readonly skillsService;
3854
3973
  private readonly conversation;
3974
+ private readonly plannerTools;
3855
3975
  constructor(parts: SessionParts);
3856
3976
  /**
3857
3977
  * Answer an outstanding approval. Every surface funnels here — the web
@@ -3912,6 +4032,14 @@ declare class Session {
3912
4032
  * session.
3913
4033
  */
3914
4034
  reset(): void;
4035
+ /**
4036
+ * What a planner may assign right now: every enabled runner, its modes, and
4037
+ * its allowlisted models — read as of this call, so a runner enabled or an
4038
+ * allowlist edited since planning started is in it (#69). Discovers a
4039
+ * runner's models the first time it is asked for.
4040
+ */
4041
+ liveCatalog(): Promise<TaskQueryCatalog>;
4042
+ private catalogOf;
3915
4043
  private runnerModesFor;
3916
4044
  /**
3917
4045
  * The catalog a model/task-mode edit is checked against — the same
@@ -3922,6 +4050,8 @@ declare class Session {
3922
4050
  * allowlist itself, the same way `coerceAssignments` does.
3923
4051
  */
3924
4052
  private editCatalog;
4053
+ /** The runners enabled right now — a toggle made since the session was built counts (#69). */
4054
+ private enabledRunners;
3925
4055
  /**
3926
4056
  * The allowlist in force right now. Unset means no restriction — falling
3927
4057
  * back to the one planning started under would keep a restriction the user
@@ -4008,6 +4138,26 @@ declare class Session {
4008
4138
  */
4009
4139
  compactConversation(signal?: AbortSignal): Promise<ConversationCompaction>;
4010
4140
  rewindTargets(): RewindTarget[];
4141
+ /**
4142
+ * Hand the planner turn in flight a validated plan or a task edit; the turn
4143
+ * commits it as it would the same JSON in the planner's reply. False when
4144
+ * no turn is open.
4145
+ */
4146
+ submitToTurn(submission: PlannerSubmission): boolean;
4147
+ /**
4148
+ * A plan the planner submitted through its tool, already checked against the
4149
+ * live catalog. Its runners join `plan.runners` here, so a runner enabled
4150
+ * since planning started is not snapped back by the commit (#69).
4151
+ */
4152
+ private submitPlanFromTool;
4153
+ /**
4154
+ * A task edit the planner made through its tool. Checked against the live
4155
+ * catalog, then handed to the open turn, which commits it as it would the
4156
+ * same ops in a taskOps reply — including parking it behind a running batch,
4157
+ * which the envelope does before any check, so a queued edit is not checked
4158
+ * here either. Edits made in one reply join one batch.
4159
+ */
4160
+ private editPlanFromTool;
4011
4161
  /** Whether the planner conversation is live (started and not yet committed to a plan). */
4012
4162
  get isConversationActive(): boolean;
4013
4163
  /**
@@ -4263,6 +4413,8 @@ declare function writePrivateFile(filePath: string, content: string): void;
4263
4413
 
4264
4414
  type VerdictListener = (taskId: string, verdict: Verdict) => void;
4265
4415
  type CheckpointListener = (taskId: string, summary: string) => void;
4416
+ /** A tool-raised checkpoint whose call went away while its attempt lives on, so nothing is left to answer it. */
4417
+ type CheckpointWithdrawnListener = (taskId: string) => void;
4266
4418
  /** Fires on every idleSince transition (null→timestamp on silence, timestamp→null on resume/teardown). */
4267
4419
  type IdleListener = (taskId: string, idleSince: string | null) => void;
4268
4420
  declare class VerdictEngine {
@@ -4272,6 +4424,13 @@ declare class VerdictEngine {
4272
4424
  private pausedSessions;
4273
4425
  private listeners;
4274
4426
  private checkpointListeners;
4427
+ private withdrawnListeners;
4428
+ /**
4429
+ * The open `checkpoint` tool call per task (ADR-0022, V5): settling it is how
4430
+ * an answer reaches a runner that asked through the tool, where the marker's
4431
+ * answer is typed into the session instead.
4432
+ */
4433
+ private toolCheckpoints;
4275
4434
  private idleListeners;
4276
4435
  /**
4277
4436
  * Per-task generation. Replaced on every watch(), clear() and verdict.
@@ -4298,6 +4457,7 @@ declare class VerdictEngine {
4298
4457
  private openApprovals;
4299
4458
  onVerdict(listener: VerdictListener): void;
4300
4459
  onCheckpoint(listener: CheckpointListener): void;
4460
+ onCheckpointWithdrawn(listener: CheckpointWithdrawnListener): void;
4301
4461
  onIdleChange(listener: IdleListener): void;
4302
4462
  /** Advisory silence timestamp for a task, or null if it isn't idle. */
4303
4463
  getIdleSince(taskId: string): string | null;
@@ -4325,9 +4485,26 @@ declare class VerdictEngine {
4325
4485
  * Attach to a spawned session: scan the output tail for the task's completion
4326
4486
  * marker (delivering a verdict immediately while leaving interactive sessions
4327
4487
  * open), scan for checkpoint markers, and on exit produce a failed verdict
4328
- * when the marker was never observed.
4488
+ * when the marker was never observed. A structured session's `task_complete`
4489
+ * call is evidence too (ADR-0022, V2): whichever signal comes first decides.
4490
+ *
4491
+ * Returns the attempt's generation, what {@link signalComplete} is checked against.
4492
+ */
4493
+ watch(task: Task, session: ITerminalSession): number;
4494
+ /**
4495
+ * The runner's own `task_complete` call (ADR-0022, V1/V3): settles the
4496
+ * attempt exactly as the marker does, unless that attempt is no longer the
4497
+ * task's current one or another signal already settled it.
4498
+ */
4499
+ signalComplete(taskId: string, generation: number, report: TaskCompleteArgs): void;
4500
+ /**
4501
+ * The runner's `checkpoint` call (ADR-0022, V5): raised through the same
4502
+ * listeners as the marker, so the task waits on the user the same way, and
4503
+ * settled by {@link approveCheckpoint} or {@link rejectCheckpoint}. It is
4504
+ * withdrawn, never left hanging, once the attempt is over or the call goes.
4329
4505
  */
4330
- watch(task: Task, session: ITerminalSession): void;
4506
+ raiseCheckpoint(taskId: string, generation: number, question: string, signal: AbortSignal): Promise<CheckpointAnswer>;
4507
+ private withdrawToolCheckpoint;
4331
4508
  private approvalOpened;
4332
4509
  private approvalClosed;
4333
4510
  /** Scan only the new text plus the unmatched carry, so a long run stays linear. */
@@ -4478,6 +4655,8 @@ declare function buildSubagentSystemPrompt(): string;
4478
4655
  interface ConversationVariant {
4479
4656
  /** Harness planner (ADR-0009): the agent owns its own tools and research budget. */
4480
4657
  harness?: boolean;
4658
+ /** The planner reads the catalog and submits the plan through Ordewell's MCP tools (ADR-0022), not the JSON envelope. */
4659
+ plannerTools?: boolean;
4481
4660
  /** Every AI task gets its own worktree (ADR-0013), so file overlap no longer forces an order; of every repo of a group (ADR-0014). */
4482
4661
  isolatedExecution?: IsolatedExecution;
4483
4662
  }
@@ -4497,13 +4676,13 @@ declare function buildModifyDuringExecutionPrompt(executionLog: TaskSnapshot[],
4497
4676
  * task-ops protocol (with the "merge" op) is injected alongside it by
4498
4677
  * `planContextBlock`. The model emits a single taskOps merge op.
4499
4678
  */
4500
- declare function buildMergePrompt(taskIds: string[], tasks: readonly Task[]): string;
4679
+ declare function buildMergePrompt(taskIds: string[], tasks: readonly Task[], tools?: boolean): string;
4501
4680
  /**
4502
4681
  * User-message prompt for a planner-driven split: asks the model to decompose
4503
4682
  * one task into a sequence of smaller tasks. The model decides the breakdown —
4504
4683
  * the user does not hand-type the parts.
4505
4684
  */
4506
- declare function buildSplitPrompt(taskId: string, tasks: readonly Task[]): string;
4685
+ declare function buildSplitPrompt(taskId: string, tasks: readonly Task[], tools?: boolean): string;
4507
4686
  /**
4508
4687
  * Runner prompt for the opt-in task that resolves an integration conflict
4509
4688
  * (ADR-0013). The resolver's own worktree starts at the integration tip, so the
@@ -4682,6 +4861,18 @@ declare function summarizeOutput(reviewReason: string | undefined, output: strin
4682
4861
  capturedAt: string;
4683
4862
  };
4684
4863
  declare function collectDirectDependencyOutputs(task: Task, allTasks: readonly Task[]): PriorOutput[];
4864
+ /**
4865
+ * Break marker tokens carried in a predecessor's captured output. Interactive
4866
+ * runners echo the prompt they are given, and the watcher scans that terminal
4867
+ * output — a quoted marker would settle this task on the previous one's
4868
+ * evidence. Hyphenated rather than spaced: the scanner also reads a
4869
+ * whitespace-flattened view of the terminal, which would rejoin a space.
4870
+ *
4871
+ * A completion marker also loses its id: transcripts are bound to a task by
4872
+ * that id, and a dependent's transcript quoting it would answer for the
4873
+ * predecessor the next time the predecessor runs.
4874
+ */
4875
+ declare function defuseMarkers(text: string): string;
4685
4876
  declare function renderPriorOutputs(outputs: PriorOutput[]): string;
4686
4877
  declare function augmentPromptWithPriorOutputs(task: Task, allTasks: readonly Task[]): string;
4687
4878
  /**
@@ -4699,6 +4890,8 @@ interface ComposeOptions {
4699
4890
  tddEnabled?: boolean;
4700
4891
  /** An ops task's last attempt, as its output ended (ADR-0020); absent on a first attempt. */
4701
4892
  previousAttempt?: string;
4893
+ /** The runner is given the `task_complete` and `checkpoint` tools (ADR-0022); the markers stay as their fallback. */
4894
+ completionTool?: boolean;
4702
4895
  }
4703
4896
  declare function composeAugmentedPrompt(task: Task, allTasks: readonly Task[], opts?: ComposeOptions): string;
4704
4897
  /**
@@ -4709,6 +4902,7 @@ declare function composeAugmentedPrompt(task: Task, allTasks: readonly Task[], o
4709
4902
  */
4710
4903
  declare function composeContinuationPrompt(task: Task, message: string, opts?: {
4711
4904
  ops?: boolean;
4905
+ completionTool?: boolean;
4712
4906
  }): string;
4713
4907
 
4714
4908
  type ExecFileFn = (command: string, args: string[]) => Promise<{
@@ -4853,6 +5047,8 @@ interface StructuredRunnerDeps {
4853
5047
  /** Overrides adapter construction; production picks by runner id and refuses runners without a connector. */
4854
5048
  createAdapter?: (runner: string, deps: AgentProcessDeps) => TaskModeAgentAdapter;
4855
5049
  interruptGraceMs?: number;
5050
+ /** Serves the task tools of the runners that take them (ADR-0022). Defaults to the process's one server. */
5051
+ mcp?: OrdewellMcpServer;
4856
5052
  }
4857
5053
  interface SessionLaunch {
4858
5054
  runner: string;
@@ -4860,6 +5056,11 @@ interface SessionLaunch {
4860
5056
  createAdapter: (runner: string, deps: AgentProcessDeps) => TaskModeAgentAdapter;
4861
5057
  startOptions: TaskStartOptions;
4862
5058
  interruptGraceMs: number;
5059
+ /** Where this attempt's task tools are served, when its runner takes them (ADR-0022). */
5060
+ tools?: {
5061
+ server: OrdewellMcpServer;
5062
+ scope: TaskTokenScope;
5063
+ };
4863
5064
  }
4864
5065
  /**
4865
5066
  * One task driven over its runner's programmatic protocol (ADR-0018). It *is*
@@ -4893,10 +5094,24 @@ declare class StructuredSession extends AbstractTerminalSession implements Struc
4893
5094
  * requests — while an approval must be answerable by id across the session.
4894
5095
  */
4895
5096
  private readonly permissions;
5097
+ /** The launch's start options, with this attempt's server once its token is issued. */
5098
+ private startOptions;
5099
+ /** This attempt's MCP token, until the session ends (ADR-0022, A2). */
5100
+ private toolToken;
5101
+ private checkpointHandler;
4896
5102
  constructor(id: string, taskId: string, launch: SessionLaunch);
4897
5103
  /** Start the runner and send the task's prompt as its first turn. */
4898
5104
  start(prompt: string): Promise<void>;
4899
5105
  getOutput(): string;
5106
+ onTaskComplete(listener: (report: TaskCompleteArgs) => void): void;
5107
+ onToolCheckpoint(handler: (question: string, signal: AbortSignal) => Promise<CheckpointAnswer>): void;
5108
+ /**
5109
+ * A server that cannot start costs the task its tools, not its run: the
5110
+ * prompt still teaches the marker (ADR-0022, S2).
5111
+ */
5112
+ private issueTools;
5113
+ private revokeTools;
5114
+ protected baseHandleExit(code: number): void;
4900
5115
  /** A reply typed at the task — a checkpoint answer, most often — is a user message. */
4901
5116
  write(text: string): void;
4902
5117
  kill(): void;
@@ -4951,6 +5166,7 @@ declare class StructuredRunner extends AbstractRunner<StructuredSession> {
4951
5166
  private readonly processDeps;
4952
5167
  private readonly createAdapter;
4953
5168
  private readonly interruptGraceMs;
5169
+ private readonly mcp;
4954
5170
  constructor(deps?: StructuredRunnerDeps);
4955
5171
  spawn(opts: RunnerSpawnOptions): Promise<ITerminalSession>;
4956
5172
  }
@@ -5445,4 +5661,4 @@ declare const DEFAULT_MAX_PARALLEL = 3;
5445
5661
  */
5446
5662
  declare function parseMaxParallel(value: unknown): number | null;
5447
5663
 
5448
- 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, GREP_PCRE_PROBE_ARGS, GeminiService, type GitExecFn, GlobOptions, type GrepInvocation, GrepOptions, type GrepRegex, 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, grepRegexFromProbe, 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 };
5664
+ 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, CheckpointAnswer, 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, GREP_PCRE_PROBE_ARGS, GeminiService, type GitExecFn, GlobOptions, type GrepInvocation, GrepOptions, type GrepRegex, 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, OrdewellMcpServer, 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, type PlannerSubmission, PlannerToolHandler, 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, TaskCompleteArgs, 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, TaskTokenScope, 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, defuseMarkers, deleteSession, describeMergeResult, discoverGeminiModels, effectiveAllowlist, ensureDir, ensurePrivateDir, ensureStateDirIgnored, executionLogBlock, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, globalDataDir, grantScopeFor, grepRegexFromProbe, 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 };