@ordewell/core 0.6.0 → 0.6.2

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 +181 -48
  16. package/dist/index.d.ts +181 -48
  17. package/dist/index.js +1207 -127
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +1153 -105
  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-_T5S7Mnk.d.ts → plan-utils-2K_N5ZJe.d.ts} +30 -4
  31. package/dist/{plan-utils-Ba-l8EZS.d.mts → plan-utils-D94CJ7CA.d.mts} +30 -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-D94CJ7CA.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-D94CJ7CA.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
 
@@ -189,6 +189,12 @@ declare const REFUSED_COMMANDS: string[];
189
189
  */
190
190
  interface CommandPolicyOptions {
191
191
  dialect?: ShellDialect;
192
+ /**
193
+ * `CDPATH` is set in the environment the command will run in. A relative
194
+ * `cd` may then land in a directory the command line never names, so `cd`
195
+ * stops being navigation the classifier can follow.
196
+ */
197
+ cdpathSet?: boolean;
192
198
  }
193
199
  type CommandTier = 'auto' | 'ask' | 'refuse';
194
200
  interface CommandClassification {
@@ -265,6 +271,7 @@ declare abstract class BaseFileSystem implements IFileSystem {
265
271
  * containing directory, one entry per distinct scope.
266
272
  */
267
273
  private outsidePaths;
274
+ private policyOptions;
268
275
  /**
269
276
  * Three tiers (see `commandPolicy.ts`): read-only inspection runs silently,
270
277
  * anything else asks once and is remembered, and writes are refused outright
@@ -312,7 +319,8 @@ interface ResolvedPath {
312
319
  abs: string;
313
320
  inside: boolean;
314
321
  }
315
- declare function resolveWithin(root: string, target: string): ResolvedPath;
322
+ /** `from` is where a relative `target` starts; containment is still judged against `root`. */
323
+ declare function resolveWithin(root: string, target: string, from?: string): ResolvedPath;
316
324
  /** The directory a grant covers for `target` — its parent for files, itself for directories. */
317
325
  declare function grantScopeFor(abs: string, kind: 'file' | 'directory'): string;
318
326
 
@@ -469,19 +477,27 @@ interface GrepInvocation {
469
477
  declare function buildGrepArgs(pattern: string, opts: GrepOptions, root: string): GrepInvocation;
470
478
  /** Build the ripgrep invocation that lists files matching a glob. */
471
479
  declare function buildGlobArgs(pattern: string, root: string): string[];
480
+ /**
481
+ * Which regex dialect the machine's `grep` can run: GNU grep has `-P` (PCRE);
482
+ * BSD grep (macOS) rejects it, but its `-E` is the enhanced regex library and
483
+ * reads the same non-capturing groups, `\b`, `\s` and `\d`.
484
+ */
485
+ type GrepRegex = 'pcre' | 'ere';
486
+ /** Run `grep` with these args: it exits 1 ("no match") when `-P` exists and 2 when it does not. */
487
+ declare const GREP_PCRE_PROBE_ARGS: string[];
488
+ declare function grepRegexFromProbe(exitCode: number | null): GrepRegex;
472
489
  /**
473
490
  * The POSIX-grep fallback for machines without ripgrep. Ordering and `--sort`
474
491
  * are unavailable.
475
492
  *
476
- * `-P` (PCRE) is required, not optional: patterns built in core — most
493
+ * A regex mode is required, not optional: patterns built in core — most
477
494
  * notably `find_symbol`'s `definitionPattern` — use non-capturing groups and
478
- * `\b`, which BRE has no syntax for and ERE (`-E`) still cannot express
479
- * ((?:...) is a PCRE construct). Without `-P`, GNU grep either errors
480
- * ("Unmatched \{") or, worse, silently treats `(`/`)`/`|` as literal
481
- * characters and reports a confident empty result. `-P` and `-F` are
482
- * mutually exclusive, so literal mode skips it.
495
+ * `\b`, which BRE has no syntax for. Without `-P` or an enhanced `-E`, grep
496
+ * either errors ("Unmatched \{") or, worse, silently treats `(`/`)`/`|` as
497
+ * literal characters and reports a confident empty result. The regex flags and
498
+ * `-F` are mutually exclusive, so literal mode skips them.
483
499
  */
484
- declare function buildFallbackGrepArgs(pattern: string, opts: GrepOptions, root: string): string[];
500
+ declare function buildFallbackGrepArgs(pattern: string, opts: GrepOptions, root: string, regex?: GrepRegex): string[];
485
501
  /**
486
502
  * GNU grep's own `--include` glob only ever matches a basename, so it silently
487
503
  * matches nothing against an anchored pattern like `subdir/*.txt` (there is no
@@ -1350,6 +1366,8 @@ declare class PlanStore {
1350
1366
  private _planTasks;
1351
1367
  private _allTasks;
1352
1368
  private _taskMap;
1369
+ /** Task id → the top-level task it hangs under, itself for a top-level task. */
1370
+ private _rootMap;
1353
1371
  private _planRunners;
1354
1372
  private _onMutate;
1355
1373
  private _executionLog;
@@ -1365,6 +1383,11 @@ declare class PlanStore {
1365
1383
  isCompleted(id: string): boolean;
1366
1384
  isFailed(id: string): boolean;
1367
1385
  get(taskId: string): Readonly<Task> | undefined;
1386
+ /**
1387
+ * Whether a task runs as an ops task (ADR-0020). Only a top-level AI task
1388
+ * can be one; a subtask runs with the top-level task it hangs under.
1389
+ */
1390
+ isOps(taskId: string): boolean;
1368
1391
  /** A copy of the task tree, detached from the store: later status changes do not reach it. */
1369
1392
  snapshot(): Task[];
1370
1393
  getExecutionLog(): ReadonlyArray<TaskSnapshot>;
@@ -1401,6 +1424,8 @@ declare class PlanStore {
1401
1424
  markAwaitingUser(id: string, reason?: AwaitingReason): void;
1402
1425
  markPending(id: string): void;
1403
1426
  retry(id: string): void;
1427
+ /** Kept on the task: it was force-started past its merge gate, before these dependencies' work was merged (ADR-0020). */
1428
+ setForcedPastGate(id: string, dependencies: string[]): void;
1404
1429
  /** A reason outlives nothing: any status but `awaiting_user` drops it. */
1405
1430
  private setStatus;
1406
1431
  blockDependents(id: string): void;
@@ -1440,6 +1465,7 @@ interface IsolationRunListener {
1440
1465
  /**
1441
1466
  * A run opened — the one moment shared by Execute, a manual task run and
1442
1467
  * a force start, so whatever a run pins for its whole length is read here.
1468
+ * Whether it isolates is decided later, at its first change task.
1443
1469
  */
1444
1470
  opened(): void;
1445
1471
  /** A run did not start: `repos` of the group have tracked changes. */
@@ -1462,12 +1488,13 @@ interface IsolationRunControllerDeps {
1462
1488
  listener: IsolationRunListener;
1463
1489
  }
1464
1490
  /**
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.
1491
+ * The lifecycle of a plan's isolation run (ADR-0013, ADR-0014, ADR-0020),
1492
+ * between the scheduler and the git layer: deciding, at a run's first change
1493
+ * task, whether it executes in worktrees, a blocked run and how it goes on,
1494
+ * each attempt's working directory, releasing worktrees, which landed work the
1495
+ * user has merged, the tree check of an ops task, the handoff when the run
1496
+ * closes, and what the user does with it afterwards. The record it keeps
1497
+ * outlives one run — a resumed plan continues it.
1471
1498
  */
1472
1499
  declare class IsolationRunController {
1473
1500
  private readonly isolation;
@@ -1479,9 +1506,9 @@ declare class IsolationRunController {
1479
1506
  /** Copied paths already reported for the current run: every task gets the same copies. */
1480
1507
  private reportedCopies;
1481
1508
  /**
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.
1509
+ * How the open run executes; null while no run is open, `undecided` until
1510
+ * its first change task asks. A run is one Execute-Plan or one manual task
1511
+ * run, from its start until it settles or is stopped.
1485
1512
  */
1486
1513
  private mode;
1487
1514
  /** Resolver task id → the conflicted task it resolves; see {@link linkResolver}. */
@@ -1495,6 +1522,8 @@ declare class IsolationRunController {
1495
1522
  /** The plan's run record, open or not; null when the plan has not isolated. */
1496
1523
  get current(): IsolationRun | null;
1497
1524
  get isOpen(): boolean;
1525
+ /** The open run has decided whether it isolates. */
1526
+ get decided(): boolean;
1498
1527
  /** The open run executes in worktrees. */
1499
1528
  get isolating(): boolean;
1500
1529
  /** A run is waiting on the user to stash or to go on without isolation. */
@@ -1518,12 +1547,15 @@ declare class IsolationRunController {
1518
1547
  * would otherwise write a new session file on every reload.
1519
1548
  */
1520
1549
  adopt(state: PlanIsolation | null): Promise<void>;
1550
+ /** Open a run if none is, leaving whether it isolates to its first change task. */
1551
+ open(): void;
1521
1552
  /**
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.
1553
+ * Decide once per run, as its first change task starts, whether it executes
1554
+ * in worktrees (ADR-0020): an ops task needs none, so a run of only ops
1555
+ * tasks never asks. `resume` is what a dirty tree parks until the user
1556
+ * chooses how to go on. Resolves false while the run waits on that choice.
1525
1557
  */
1526
- open(resume: () => Promise<void>): Promise<boolean>;
1558
+ decide(resume: () => Promise<void>): Promise<boolean>;
1527
1559
  /**
1528
1560
  * Whether the run in force, or else the next one, gives each task its own
1529
1561
  * worktrees, and of which repo group — what the planner is told, since it
@@ -1550,6 +1582,7 @@ declare class IsolationRunController {
1550
1582
  */
1551
1583
  attemptCwd(task: Task, opts: {
1552
1584
  repair: boolean;
1585
+ ops?: boolean;
1553
1586
  }): Promise<{
1554
1587
  cwd: string;
1555
1588
  worktree: boolean;
@@ -1571,8 +1604,33 @@ declare class IsolationRunController {
1571
1604
  release(taskId: string, opts: {
1572
1605
  keep: boolean;
1573
1606
  }, landing?: Promise<unknown> | null): Promise<void>;
1574
- /** Close the open run. An isolated one hands its integration branch over for review. */
1607
+ /**
1608
+ * Close the open run. An isolated one hands its integration branch over for
1609
+ * review — unless the user merged everything it landed at merge gates
1610
+ * already, which leaves nothing to hand over, so it is cleared up as a Merge
1611
+ * all would have.
1612
+ */
1575
1613
  close(): Promise<void>;
1614
+ /**
1615
+ * Whether a task's landed work still waits to be merged into the user's
1616
+ * branch — what holds an ops or user task at its merge gate (ADR-0020). A
1617
+ * task with no record never landed anything to wait for.
1618
+ */
1619
+ awaitsMerge(taskId: string): boolean;
1620
+ /**
1621
+ * Look again for landed work the user has merged — by Merge all, or by hand
1622
+ * with git. Resolves true when some was found.
1623
+ */
1624
+ refreshInHead(): Promise<boolean>;
1625
+ /**
1626
+ * The tracked state of the workspace as an ops task starts, for
1627
+ * {@link filesChangedSince} (ADR-0020). Null where the check does not run:
1628
+ * a run that shares the workspace root, where every task's edits land in
1629
+ * it, or a workspace git cannot isolate at all.
1630
+ */
1631
+ snapshotWorkspace(): Promise<TreeSnapshot | null>;
1632
+ /** Tracked files changed since `snapshot`; none when the run has since gone on in the workspace root. */
1633
+ filesChangedSince(snapshot: TreeSnapshot | null): Promise<string[]>;
1576
1634
  /**
1577
1635
  * A stop or a plan load: the open run ends without a handoff and a parked
1578
1636
  * start is dropped. `keepOpen` spares a run the scheduler is still driving.
@@ -1591,9 +1649,11 @@ declare class IsolationRunController {
1591
1649
  reviewDiff(): Promise<string>;
1592
1650
  /**
1593
1651
  * "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.
1652
+ * checked out, in every repo or none. During a run it merges what has
1653
+ * landed so far and the run goes on (ADR-0020): its branches stay for the
1654
+ * tasks still to land. Once a settled run merged everything, it has nothing
1655
+ * left to hand over, so it is cleared up and forgotten; a branch the user's
1656
+ * HEAD somehow does not contain stays for the next run's sweep.
1597
1657
  */
1598
1658
  merge(): Promise<IsolationMergeResult>;
1599
1659
  /** Worktrees and task branches go; the integration branch and the record stay for review and merge. */
@@ -1602,7 +1662,7 @@ declare class IsolationRunController {
1602
1662
  discard(): Promise<void>;
1603
1663
  private clearMerged;
1604
1664
  private forget;
1605
- private decide;
1665
+ private assess;
1606
1666
  private activate;
1607
1667
  private begin;
1608
1668
  /** What earlier runs left merged in the group goes; a failure here is worth a word, never a stopped run. */
@@ -1848,6 +1908,8 @@ interface TaskOrchestratorDeps {
1848
1908
  tddEnabled: () => boolean;
1849
1909
  /** Read once as a run opens, never per spawn (ADR-0018, S1). */
1850
1910
  runnerTransport: () => RunnerTransport;
1911
+ /** What the task's last saved attempt did, or null when it left no log (ADR-0020). */
1912
+ previousAttemptFromLog: (taskId: string) => string | null;
1851
1913
  }
1852
1914
  /**
1853
1915
  * What a caller supplies to {@link createTaskOrchestrator}; every optional one
@@ -1866,6 +1928,7 @@ interface TaskOrchestratorOptions {
1866
1928
  workspaceEnv?: (cwd: string) => Promise<WorkspaceEnv>;
1867
1929
  tddEnabled?: () => boolean;
1868
1930
  runnerTransport?: () => RunnerTransport;
1931
+ previousAttemptFromLog?: (taskId: string) => string | null;
1869
1932
  }
1870
1933
  /**
1871
1934
  * The pure scheduler. Owns execution state (`running`, `planStatus`,
@@ -1899,6 +1962,10 @@ declare class TaskOrchestrator {
1899
1962
  * pending and nothing ran until the user also re-ran the whole plan.
1900
1963
  */
1901
1964
  private haltedByFailure;
1965
+ /** A Merge all is under way: no ops task starts until it ends (ADR-0020). */
1966
+ private merging;
1967
+ /** The last "waiting for Merge all" notice, so a run paused at a gate says it once, not on every tick. */
1968
+ private gateNotice;
1902
1969
  /** The workspace's own variables for a task's cwd (ADR-0016); swapped out in tests. */
1903
1970
  private workspaceEnv;
1904
1971
  /** What the workspace env has already warned about, so a run says it once, not per task. */
@@ -1919,6 +1986,7 @@ declare class TaskOrchestrator {
1919
1986
  private observers;
1920
1987
  private tddEnabled;
1921
1988
  private readRunnerTransport;
1989
+ private previousAttemptFromLog;
1922
1990
  /**
1923
1991
  * The setting as the latest run copied it when it opened. Every spawn of
1924
1992
  * that run uses this, so flipping the setting mid-run changes the next run
@@ -1936,6 +2004,14 @@ declare class TaskOrchestrator {
1936
2004
  static compose(options: TaskOrchestratorOptions): TaskOrchestrator;
1937
2005
  /** Advisory silence timestamp for a task's live runner, or null if not idle. */
1938
2006
  getIdleSince(taskId: string): string | null;
2007
+ /**
2008
+ * What an ops retry is told about the attempt before. The saved log is read
2009
+ * whether or not the session was reloaded, so both behave alike; the terminal
2010
+ * buffer is the fallback for a runner that has no log. A reload clears the
2011
+ * attempt count along with the buffer, so a retry made since is what says
2012
+ * there was an attempt to report on.
2013
+ */
2014
+ private opsPreviousAttempt;
1939
2015
  /** Recent clean output of a task's latest attempt, running or ended; null if it never ran. */
1940
2016
  getLiveOutput(taskId: string, opts: LiveTailOptions): LiveTail | null;
1941
2017
  get storeInstance(): PlanStore;
@@ -2006,8 +2082,26 @@ declare class TaskOrchestrator {
2006
2082
  */
2007
2083
  adoptIsolation(state: PlanIsolation | null): Promise<void>;
2008
2084
  reviewRunDiff(): Promise<string>;
2009
- /** "Merge all"; a run that merged everything is cleared up and forgotten. */
2085
+ /**
2086
+ * "Merge all"; a settled run that merged everything is cleared up and
2087
+ * forgotten. During a run it merges what has landed and the run goes on:
2088
+ * the tasks waiting at a merge gate for that work then start (ADR-0020).
2089
+ * Never while an ops task runs, and no ops task starts until it ends — the
2090
+ * one overlap the plan cannot order, because the merge is the user's.
2091
+ */
2010
2092
  mergeRun(): Promise<IsolationMergeResult>;
2093
+ /**
2094
+ * The run as a surface offers Merge all mid-run (ADR-0020): what has landed
2095
+ * and is not merged, and whether the run is paused at its gates with nothing
2096
+ * else running. Null while no task waits at a gate.
2097
+ */
2098
+ mergeGateView(): MergeGateView | null;
2099
+ /**
2100
+ * The dependencies an ops or user task waits on at its merge gate: those
2101
+ * whose landed work is not in the user's branch yet (ADR-0020). Empty once
2102
+ * the task has started, and for every other task.
2103
+ */
2104
+ getMergeGate(taskId: string): string[];
2011
2105
  /** Worktrees and task branches go; the integration branch and the record stay for review and merge. */
2012
2106
  cleanupRun(): Promise<void>;
2013
2107
  /** The run and everything it made go, and the plan forgets it; the next run starts afresh. */
@@ -2077,6 +2171,14 @@ declare class TaskOrchestrator {
2077
2171
  linkConflictResolver(resolverId: string, conflictedId: string): void;
2078
2172
  private landResolved;
2079
2173
  getReadyTasks(): Task[];
2174
+ private readiness;
2175
+ /**
2176
+ * Open the run a task starts in, and for a change task decide whether it
2177
+ * isolates (ADR-0020): an ops task needs no worktree, so it never waits on
2178
+ * that choice. False while a dirty tree waits on the user; `resume` is what
2179
+ * their choice replays.
2180
+ */
2181
+ private openFor;
2080
2182
  /**
2081
2183
  * Cancel a running (or scheduled) task: kill its session and return it to
2082
2184
  * 'pending' — "not executed". The task is put on hold so the scheduler
@@ -2126,6 +2228,13 @@ declare class TaskOrchestrator {
2126
2228
  * No-op if the task is unknown, not an AI task, or already running.
2127
2229
  */
2128
2230
  forceStartTask(taskId: string): Promise<void>;
2231
+ private refuseOpsDuringMerge;
2232
+ /**
2233
+ * A force start passes a merge gate (ADR-0020), and the surface confirmed it
2234
+ * first; the choice is kept on the task and said, because the work it acts
2235
+ * on is not in the user's branch.
2236
+ */
2237
+ private notePastGate;
2129
2238
  /**
2130
2239
  * Run exactly one task outside full-plan scheduling. The active/starting
2131
2240
  * session still contributes to {@link hasLiveWork} so every surface exposes
@@ -2148,6 +2257,11 @@ declare class TaskOrchestrator {
2148
2257
  parallelGroups: number[][];
2149
2258
  };
2150
2259
  tick(): Promise<void>;
2260
+ /**
2261
+ * A run paused at merge gates says so, as plainly as a task that waits on
2262
+ * the user: which tasks wait, and that Merge all lets them go on (ADR-0020).
2263
+ */
2264
+ private sayGate;
2151
2265
  private startTask;
2152
2266
  /**
2153
2267
  * The fallible half of starting a task: resolving its cwd/worktree and
@@ -2929,6 +3043,8 @@ declare class OpenCodeAdapter implements TaskModeAgentAdapter {
2929
3043
  private interruptRequested;
2930
3044
  /** A task's requests waiting for an answer, by request id, with the session that asked. */
2931
3045
  private readonly openPermissions;
3046
+ /** Set once the server turns out to speak the 2.x API, which then owns the session. */
3047
+ private v2;
2932
3048
  constructor(deps: AgentProcessDeps);
2933
3049
  start(opts: AgentStartOptions): Promise<void>;
2934
3050
  send(message: string, onEvent: (event: AgentEvent) => void, signal?: AbortSignal, onActivity?: () => void): Promise<void>;
@@ -2969,6 +3085,12 @@ declare class OpenCodeAdapter implements TaskModeAgentAdapter {
2969
3085
  interrupt(timeoutMs: number): Promise<boolean>;
2970
3086
  onProcessExit(listener: (code: number) => void): void;
2971
3087
  answerPermission(id: string, decision: ApprovalDecision): boolean;
3088
+ /**
3089
+ * OpenCode 2.x replaced the 1.x HTTP surface rather than extending it, and
3090
+ * only 2.x answers `/api/info` with its version. A 1.x server — or one that
3091
+ * answers with anything else — keeps the 1.x protocol this class speaks.
3092
+ */
3093
+ private speaksV2;
2972
3094
  private role;
2973
3095
  /**
2974
3096
  * Turn one settled assistant message into events. The settled response is
@@ -3457,7 +3579,7 @@ interface SessionEventRelayDeps {
3457
3579
  /** Where isolation notices go, for a host whose notifications are not seen by the user. */
3458
3580
  onNotice?: (notice: SessionNotice) => void;
3459
3581
  store: Pick<PlanStore, 'allTasks' | 'snapshot'>;
3460
- orchestrator: Pick<TaskOrchestrator, 'getIdleSince' | 'getTaskIsolation' | 'getQueuedTaskMessages'>;
3582
+ orchestrator: Pick<TaskOrchestrator, 'getIdleSince' | 'getTaskIsolation' | 'getQueuedTaskMessages' | 'getMergeGate' | 'mergeGateView'>;
3461
3583
  /** Shared with the Session, which snapshots, restores and clears it. */
3462
3584
  usage: PlannerUsageLedger;
3463
3585
  /** How many of a task's runner requests wait for an answer (ADR-0018, A1). */
@@ -3571,13 +3693,6 @@ interface SessionRuntimeSettings {
3571
3693
  /** Read once as a run starts, never per spawn (ADR-0018, S1). Absent means terminal. */
3572
3694
  runnerTransport?: RunnerTransport;
3573
3695
  }
3574
- /**
3575
- * The whole of what a host reads off disk for a Session. Both hosts used to
3576
- * assemble this by hand, mapping each toggle's settings key to its runtime key
3577
- * in two blocks nothing kept in step — which is how one toggle came to be
3578
- * dropped. `MODE_TOGGLES` holds the mapping now; this adds the one field that
3579
- * is not a toggle.
3580
- */
3581
3696
  declare function sessionRuntimeSettings(settings: UserSettings): SessionRuntimeSettings;
3582
3697
  /**
3583
3698
  * Resolve `/skill-name` invocations to their skill's markdown content. Pure
@@ -3978,13 +4093,19 @@ declare class Session {
3978
4093
  * session asks here instead.
3979
4094
  */
3980
4095
  isolationView(): IsolationView | null;
4096
+ /** The dependencies a task waits on at its merge gate (ADR-0020); empty when it waits for no Merge all. */
4097
+ mergeGate(taskId: string): string[];
4098
+ /** What Merge all would merge mid-run, while any task waits at a merge gate; null otherwise. */
4099
+ mergeGateView(): MergeGateView | null;
3981
4100
  /** The run's integration branch against its base ref, as a unified diff. */
3982
4101
  reviewRunDiff(): Promise<string>;
3983
4102
  /**
3984
4103
  * "Merge all": each repo's integration branch into whatever the user has
3985
4104
  * checked out there — every repo, or none if any cannot take it. The one
3986
4105
  * irreversible step of isolated execution, so this explicit call is the
3987
- * only way it ever happens.
4106
+ * only way it ever happens. During a run it merges what has landed so far,
4107
+ * which is what opens a merge gate (ADR-0020); it waits for no ops task,
4108
+ * and refuses while one runs.
3988
4109
  */
3989
4110
  mergeRun(): Promise<IsolationMergeResult>;
3990
4111
  /** Remove the run's worktrees and task branches; keep its integration branch to review or merge. */
@@ -4169,6 +4290,12 @@ declare class VerdictEngine {
4169
4290
  private idleSince;
4170
4291
  /** Tasks waiting on the user, whose silence is expected rather than a sign of a stuck runner. */
4171
4292
  private idlePaused;
4293
+ /**
4294
+ * Open tool approvals per structured task. They arrive mid-turn and leave the
4295
+ * status alone (ADR-0018, W1), but a task waiting on one is waiting on the
4296
+ * user, so it is not idle either.
4297
+ */
4298
+ private openApprovals;
4172
4299
  onVerdict(listener: VerdictListener): void;
4173
4300
  onCheckpoint(listener: CheckpointListener): void;
4174
4301
  onIdleChange(listener: IdleListener): void;
@@ -4201,6 +4328,8 @@ declare class VerdictEngine {
4201
4328
  * when the marker was never observed.
4202
4329
  */
4203
4330
  watch(task: Task, session: ITerminalSession): void;
4331
+ private approvalOpened;
4332
+ private approvalClosed;
4204
4333
  /** Scan only the new text plus the unmatched carry, so a long run stays linear. */
4205
4334
  private scanCheckpoints;
4206
4335
  private bumpGeneration;
@@ -4566,6 +4695,8 @@ interface ComposeOptions {
4566
4695
  planMapEnabled?: boolean;
4567
4696
  planMapMaxEntries?: number;
4568
4697
  tddEnabled?: boolean;
4698
+ /** An ops task's last attempt, as its output ended (ADR-0020); absent on a first attempt. */
4699
+ previousAttempt?: string;
4569
4700
  }
4570
4701
  declare function composeAugmentedPrompt(task: Task, allTasks: readonly Task[], opts?: ComposeOptions): string;
4571
4702
  /**
@@ -4574,7 +4705,9 @@ declare function composeAugmentedPrompt(task: Task, allTasks: readonly Task[], o
4574
4705
  * original prompt, so it is not sent again — but it holds the old worktree
4575
4706
  * too, and this attempt's is fresh from the integration branch.
4576
4707
  */
4577
- declare function composeContinuationPrompt(task: Task, message: string): string;
4708
+ declare function composeContinuationPrompt(task: Task, message: string, opts?: {
4709
+ ops?: boolean;
4710
+ }): string;
4578
4711
 
4579
4712
  type ExecFileFn = (command: string, args: string[]) => Promise<{
4580
4713
  stdout: string;
@@ -5307,4 +5440,4 @@ declare const DEFAULT_MAX_PARALLEL = 3;
5307
5440
  */
5308
5441
  declare function parseMaxParallel(value: unknown): number | null;
5309
5442
 
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 };
5443
+ 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 };