@ordewell/core 0.5.0 → 0.5.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 (35) hide show
  1. package/dist/{ITerminalRunner-nupxhtPb.d.ts → ITerminalRunner-Bd-vAJnw.d.ts} +24 -2
  2. package/dist/{ITerminalRunner-DXlJop_f.d.mts → ITerminalRunner-ByeoLF57.d.mts} +24 -2
  3. package/dist/{ModeResolver-D1-2xJsE.d.mts → ModeResolver-DVJ7HV3k.d.mts} +1 -1
  4. package/dist/{ModeResolver-BBVktyiP.d.ts → ModeResolver-Dkig8ghQ.d.ts} +1 -1
  5. package/dist/{Task-CfTjRQeS.d.mts → Task-BxQkPlXO.d.mts} +88 -10
  6. package/dist/{Task-CfTjRQeS.d.ts → Task-BxQkPlXO.d.ts} +88 -10
  7. package/dist/{chunk-HQICT7HQ.mjs → chunk-T2S5O36I.mjs} +17 -4
  8. package/dist/chunk-T2S5O36I.mjs.map +1 -0
  9. package/dist/index.d.mts +151 -57
  10. package/dist/index.d.ts +151 -57
  11. package/dist/index.js +1179 -500
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +1162 -498
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/order-labels.d.mts +1 -1
  16. package/dist/order-labels.d.ts +1 -1
  17. package/dist/{parsing-Bv3g2Tu_.d.ts → parsing-CF_grC29.d.ts} +2 -2
  18. package/dist/{parsing-BJECTMOD.d.mts → parsing-DRp4dPC0.d.mts} +2 -2
  19. package/dist/parsing.d.mts +3 -3
  20. package/dist/parsing.d.ts +3 -3
  21. package/dist/{plan-utils-Cy-RsBSV.d.ts → plan-utils-CkNbqAmS.d.ts} +36 -3
  22. package/dist/{plan-utils-B5oIZkuI.d.mts → plan-utils-CtB3_Ovf.d.mts} +36 -3
  23. package/dist/plan-utils.d.mts +3 -3
  24. package/dist/plan-utils.d.ts +3 -3
  25. package/dist/plan-utils.js +7 -0
  26. package/dist/plan-utils.js.map +1 -1
  27. package/dist/plan-utils.mjs +4 -0
  28. package/dist/testing.d.mts +20 -8
  29. package/dist/testing.d.ts +20 -8
  30. package/dist/testing.js +52 -4
  31. package/dist/testing.js.map +1 -1
  32. package/dist/testing.mjs +47 -4
  33. package/dist/testing.mjs.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunk-HQICT7HQ.mjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { B as RunnerId, t as PlanStatus, L as LegacyPlanState, j as IsolationMergeResult, I as IWorktreeIsolation, p as IsolationTaskStatus, P as PlanIsolation, R as RepoGroupLayout, a as DiscoveredModel, T as Task, w as ResearchProgress, v as ResearchLogEntry, C as ConversationMessage, O as TaskSnapshot, c as IsolationHandoff, G as TaskIsolation, q as IsolationView, Q as QueuedMessage, A as ActiveTaskSession, z as ResearchToolType, s as PlanState, a1 as Verdict } from './Task-CfTjRQeS.js';
2
- export { D as DiscoveredMode, b as IsolationAvailability, d as IsolationHandoffRepo, e as IsolationInactiveReason, f as IsolationLandedTask, g as IsolationLanding, h as IsolationMergeBlock, i as IsolationMergeBlockReason, k as IsolationOutcome, l as IsolationRepo, m as IsolationRun, n as IsolationTaskRecord, o as IsolationTaskRepo, M as Message, r as PlanModificationWarnings, u as PreparedTask, x as ResearchStep, y as ResearchStepOutcome, S as StreamEvent, E as StreamStepEvent, F as StreamThinkingEvent, H as TaskIsolationState, J as TaskMode, K as TaskModelAssignment, N as TaskOutputSummary, U as TaskStatus, V as TaskType, W as TaskWithParent, X as ThinkingBlock, Y as UserPromptEntry, Z as UserStep, _ as ValidationCheck, $ as ValidationContext, a0 as ValidationResult, a2 as VerificationCheck, a3 as addTaskToPlan, a4 as createEmptyPlan, a5 as createTask, a6 as emptyWarnings, a7 as flattenTasks, a8 as flattenTasksWithParents, a9 as migrateLegacyPlan, aa as migratePlanState, ab as migrateTask, ac as removeTaskFromPlan, ad as renumberTasks, ae as updateTaskInPlan, af as validateModifiedPlan, ag as warningsText } from './Task-CfTjRQeS.js';
3
- import { f as IFileSystem, R as ReadFileOpts, T as ToolOutcome, d as GrepOptions, c as GlobOptions, b as FindSymbolOptions, I as IConfig, A as AiProvider, r as ProviderModelLists, i as ITerminalSession, h as ITerminalRunner, w as RunnerRegistry, k as OrchestratorOption, u as RunnerInvocation, g as IPluginStore, v as RunnerPluginManifest, t as ResolveContext } from './ITerminalRunner-nupxhtPb.js';
4
- export { a as AllProviderModels, C as CatalogModel, D as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, e as GrepOutputMode, M as ModelCatalog, j as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, l as PluginEntry, m as PluginFeatures, n as PluginMode, o as PluginModelDiscovery, p as PluginRunnerDef, q as ProviderCredentialSource, s as ProviderModelsResult, S as SEARCH_EXCLUSIONS, x as collectProviderCredentials, y as enabledRunners, z as fetchAllProviderModels, B as isReservedRunnerName, E as knownModelId, H as resolveModelShortcut, J as resolveProvider, K as toOrchestratorOptions } from './ITerminalRunner-nupxhtPb.js';
1
+ import { F as RunnerId, u as PlanStatus, L as LegacyPlanState, k as IsolationMergeResult, g as IsolationLandedTask, I as IWorktreeIsolation, w as RepoGroupLayout, a as DiscoveredModel, T as Task, y as ResearchProgress, x as ResearchLogEntry, C as ConversationMessage, V as TaskSnapshot, d as IsolationHandoff, J as TaskIsolation, r as IsolationView, P as PlanIsolation, Q as QueuedMessage, A as ActiveTaskSession, E as ResearchToolType, t as PlanState, a3 as Verdict } from './Task-BxQkPlXO.js';
2
+ export { D as DiscoveredMode, b as IntegrationDisposal, c as IsolationAvailability, e as IsolationHandoffRepo, f as IsolationInactiveReason, h as IsolationLanding, i as IsolationMergeBlock, j as IsolationMergeBlockReason, l as IsolationOutcome, m as IsolationRepo, n as IsolationRun, o as IsolationTaskRecord, p as IsolationTaskRepo, q as IsolationTaskStatus, M as Message, s as PlanModificationWarnings, v as PreparedTask, R as RepairEvidence, z as ResearchStep, B as ResearchStepOutcome, S as StreamEvent, G as StreamStepEvent, H as StreamThinkingEvent, K as TaskIsolationState, N as TaskMode, O as TaskModelAssignment, U as TaskOutputSummary, W as TaskStatus, X as TaskType, Y as TaskWithParent, Z as ThinkingBlock, _ as UserPromptEntry, $ as UserStep, a0 as ValidationCheck, a1 as ValidationContext, a2 as ValidationResult, a4 as VerificationCheck, a5 as addTaskToPlan, a6 as createEmptyPlan, a7 as createTask, a8 as emptyWarnings, a9 as flattenTasks, aa as flattenTasksWithParents, ab as migrateLegacyPlan, ac as migratePlanState, ad as migrateTask, ae as removeTaskFromPlan, af as renumberTasks, ag as updateTaskInPlan, ah as validateModifiedPlan, ai as warningsText } from './Task-BxQkPlXO.js';
3
+ import { f as IFileSystem, R as ReadFileOpts, T as ToolOutcome, d as GrepOptions, c as GlobOptions, b as FindSymbolOptions, I as IConfig, A as AiProvider, r as ProviderModelLists, i as ITerminalSession, h as ITerminalRunner, w as RunnerRegistry, k as OrchestratorOption, u as RunnerInvocation, g as IPluginStore, v as RunnerPluginManifest, t as ResolveContext } from './ITerminalRunner-Bd-vAJnw.js';
4
+ export { a as AllProviderModels, B as BlockingPrompt, C as CatalogModel, D as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, e as GrepOutputMode, M as ModelCatalog, j as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, l as PluginEntry, m as PluginFeatures, n as PluginMode, o as PluginModelDiscovery, p as PluginRunnerDef, q as ProviderCredentialSource, s as ProviderModelsResult, S as SEARCH_EXCLUSIONS, x as collectProviderCredentials, y as enabledRunners, z as fetchAllProviderModels, E as isReservedRunnerName, H as knownModelId, J as resolveModelShortcut, K as resolveProvider, L as toOrchestratorOptions } from './ITerminalRunner-Bd-vAJnw.js';
5
5
  import { I as IApproval, d as ApprovalRequest, a as ApprovalMode } from './ApprovalPolicy-BVhGdECT.js';
6
6
  export { A as ApprovalKind, b as ApprovalPolicy, c as ApprovalPolicyOptions, e as ApprovalSource, D as DENY_ALL } from './ApprovalPolicy-BVhGdECT.js';
7
- import { R as RunnerModeInfo } from './ModeResolver-BBVktyiP.js';
8
- export { M as ManifestLookup, b as buildModeGuide, f as filteredBuildModes, r as resolveDefaultMode, a as resolveTaskMode, c as runnerModesFrom } from './ModeResolver-BBVktyiP.js';
9
- import { T as TaskOp, c as SessionBroadcaster, e as SessionNotice } from './plan-utils-Cy-RsBSV.js';
10
- export { A as ApplyTaskOpsResult, C as CHECKPOINT_TRUNCATE_LENGTH, S as SerializedPlan, a as SerializedTask, b as SerializedTaskStatus, d as SessionMessage, f as TaskRef, g as applyTaskOps, h as canMergeTasks, i as canSetDependencies, j as canSplitTask, k as classifyOutcome, l as dependencyCandidates, m as dependentsOf, n as executionSummary, p as parseTaskOpsJson, s as serializePlan, o as serializeTask, q as serializeTaskStatus, r as summarizeToolCall, t as textHasTaskOps, u as truncateCheckpointSummary } from './plan-utils-Cy-RsBSV.js';
7
+ import { T as TaskOp, f as SessionBroadcaster, h as SessionNotice } from './plan-utils-CkNbqAmS.js';
8
+ export { A as Adr0013IsolationRun, a as Adr0013PlanIsolation, b as Adr0013TaskRecord, c as ApplyTaskOpsResult, C as CHECKPOINT_TRUNCATE_LENGTH, S as SerializedPlan, d as SerializedTask, e as SerializedTaskStatus, g as SessionMessage, i as TaskRef, j as applyTaskOps, k as canMergeTasks, l as canSetDependencies, m as canSplitTask, n as capConflictFiles, o as classifyOutcome, p as dependencyCandidates, q as dependentsOf, r as executionSummary, s as migratePlanIsolation, t as parseTaskOpsJson, u as serializePlan, v as serializeTask, w as serializeTaskStatus, x as summarizeToolCall, y as textHasTaskOps, z as truncateCheckpointSummary } from './plan-utils-CkNbqAmS.js';
9
+ import { R as RunnerModeInfo } from './ModeResolver-Dkig8ghQ.js';
10
+ export { M as ManifestLookup, b as buildModeGuide, f as filteredBuildModes, r as resolveDefaultMode, a as resolveTaskMode, c as runnerModesFrom } from './ModeResolver-Dkig8ghQ.js';
11
11
  import { ChildProcess } from 'child_process';
12
12
  import { EventEmitter } from 'events';
13
- import { b as PlanParseError } from './parsing-Bv3g2Tu_.js';
14
- 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, p as parsePartialPlan, n as parsePlanJson, s as stripModelNoise, o as stripTrailingCommas, v as validatePlanModification } from './parsing-Bv3g2Tu_.js';
13
+ import { b as PlanParseError } from './parsing-CF_grC29.js';
14
+ 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, p as parsePartialPlan, n as parsePlanJson, s as stripModelNoise, o as stripTrailingCommas, v as validatePlanModification } from './parsing-CF_grC29.js';
15
15
  export { resolveOrderLabel, taskOrderLabel } from './order-labels.js';
16
16
 
17
17
  interface SessionMeta {
@@ -527,6 +527,7 @@ declare abstract class BaseConfig implements IConfig {
527
527
  get worktreeSetupCommand(): string | undefined;
528
528
  get workspaceRepos(): string[];
529
529
  get worktreeLinks(): string[];
530
+ get conflictRepairAttempts(): number;
530
531
  get approvalMode(): ApprovalMode;
531
532
  get approvalPreApproved(): string[];
532
533
  protected static detectProvider(fallback: AiProvider): AiProvider;
@@ -560,9 +561,11 @@ interface INotification {
560
561
  /**
561
562
  * How "Merge all" went, in words every surface shares. `group` is whether the
562
563
  * run spans more than a lone repo at `.`; only a merge into every repository
563
- * has something to say about that.
564
+ * has something to say about that. `repaired` names the landed tasks that only
565
+ * landed after a conflict repair (ADR-0015), so a clean-looking merge still
566
+ * points review at what changed to get there.
564
567
  */
565
- declare function describeMergeResult(result: IsolationMergeResult, branch: string, group: boolean): {
568
+ declare function describeMergeResult(result: IsolationMergeResult, branch: string, group: boolean, repaired?: IsolationLandedTask[]): {
566
569
  level: 'info' | 'warn' | 'error';
567
570
  message: string;
568
571
  };
@@ -584,37 +587,6 @@ interface WorktreeIsolationDeps {
584
587
  }
585
588
  declare function createWorktreeIsolation(deps: WorktreeIsolationDeps): IWorktreeIsolation;
586
589
 
587
- /** A task record as ADR-0013 persisted it, for one repository. */
588
- interface Adr0013TaskRecord {
589
- taskId: string;
590
- order: number;
591
- title: string;
592
- branch: string;
593
- worktree: string;
594
- status: IsolationTaskStatus;
595
- linked: string[];
596
- }
597
- /** A run as ADR-0013 persisted it (0.4.23): one repository, its refs on the run itself. */
598
- interface Adr0013IsolationRun {
599
- id: string;
600
- workspaceRoot: string;
601
- baseRef: string;
602
- baseBranch?: string;
603
- integrationBranch: string;
604
- tasks: Record<string, Adr0013TaskRecord>;
605
- }
606
- interface Adr0013PlanIsolation {
607
- run: Adr0013IsolationRun;
608
- resolvers: Record<string, string>;
609
- }
610
- /**
611
- * A persisted plan isolation in today's shape. A run saved in the ADR-0013
612
- * format — recognised by its own `integrationBranch` — becomes a group of one
613
- * at `.`, keeping its branches, so a session saved by 0.4.23 resumes and hands
614
- * off exactly as it would have.
615
- */
616
- declare function migratePlanIsolation(state: PlanIsolation | Adr0013PlanIsolation): PlanIsolation;
617
-
618
590
  interface ILogger {
619
591
  warn(scope: string, message: string, err?: unknown): void;
620
592
  }
@@ -1267,6 +1239,8 @@ interface AgentProcessDeps {
1267
1239
  isDirectory?: (workspace: string) => boolean;
1268
1240
  /** True when `candidate` names an existing, spawnable file. Defaults to a real filesystem check. */
1269
1241
  exists?: (candidate: string) => boolean;
1242
+ /** The workspace's own variables for a cwd (ADR-0016). Defaults to {@link resolveWorkspaceEnv}. */
1243
+ workspaceEnv?: (cwd: string) => Promise<Record<string, string>>;
1270
1244
  }
1271
1245
  /** Builds the adapter for one runner id, or null when that runner cannot plan. */
1272
1246
  type AgentAdapterFactory = (runner: string, deps: AgentProcessDeps) => AgentAdapter | null;
@@ -1770,6 +1744,28 @@ declare class PlanStore {
1770
1744
  private validateAssignedRunners;
1771
1745
  }
1772
1746
 
1747
+ /**
1748
+ * The variables one workspace's planner and agents run with, on top of the
1749
+ * daemon's own environment (ADR-0016).
1750
+ *
1751
+ * The daemon and the VS Code host inherit whatever environment they were
1752
+ * started from, once. Started anywhere but the project's shell — a desktop
1753
+ * launcher, another directory, a daemon already up for another project — they
1754
+ * miss what the project sets for itself, like a `CLAUDE_CONFIG_DIR` choosing
1755
+ * the account the agents run under. So each spawn asks for it by its own cwd:
1756
+ * a task worktree lives under the workspace, so walking up finds the same
1757
+ * `.envrc` and `.ordewell/env` the workspace root does.
1758
+ */
1759
+ interface WorkspaceEnv {
1760
+ env: Record<string, string>;
1761
+ /** An `.envrc` direnv refuses to load until the user allows it. */
1762
+ blockedEnvrc: string | null;
1763
+ /** Keys dropped because they would change how processes load or where Ordewell's own settings live. */
1764
+ refused: string[];
1765
+ /** An `.ordewell/env` ignored because git tracks it — a cloned repository must not choose these. */
1766
+ trackedEnvFile: string | null;
1767
+ }
1768
+
1773
1769
  /**
1774
1770
  * The one notification channel out of the orchestrator. Everything that used
1775
1771
  * to travel over separate callbacks (onRefresh, onQueueReady) is an observer
@@ -1848,6 +1844,25 @@ declare class TaskOrchestrator {
1848
1844
  private reviewApproved;
1849
1845
  private retryCounts;
1850
1846
  private spawnCounts;
1847
+ /**
1848
+ * The terminal a verdict left open, by task. It stays so the user can read
1849
+ * the agent's output or keep talking to it — but only while its worktree
1850
+ * does: once that is removed the agent sits in a deleted directory, and a
1851
+ * newer attempt in the same worktree would share it with a second agent.
1852
+ * Without this, every task of every run left one agent process running
1853
+ * until the daemon stopped.
1854
+ */
1855
+ private lingering;
1856
+ /**
1857
+ * A full-plan run a failure paused. Retrying the failed task is the explicit
1858
+ * resume the pause waits for — without this a retry only reset the task to
1859
+ * pending and nothing ran until the user also re-ran the whole plan.
1860
+ */
1861
+ private haltedByFailure;
1862
+ /** The workspace's own variables for a task's cwd (ADR-0016); swapped out in tests. */
1863
+ private workspaceEnv;
1864
+ /** What the workspace env has already warned about, so a run says it once, not per task. */
1865
+ private envWarnings;
1851
1866
  /**
1852
1867
  * Tasks pulled out of auto-scheduling (user-cancelled or failed to spawn).
1853
1868
  * They stay 'pending' — "not executed" — but the scheduler skips them until
@@ -1884,6 +1899,13 @@ declare class TaskOrchestrator {
1884
1899
  getLiveOutput(taskId: string, opts: LiveTailOptions): LiveTail | null;
1885
1900
  get storeInstance(): PlanStore;
1886
1901
  setWorkspaceRoot(fn: () => string): void;
1902
+ setWorkspaceEnvResolver(resolve: (cwd: string) => Promise<WorkspaceEnv>): void;
1903
+ /**
1904
+ * The variables a task's agent gets from its workspace. What cannot be
1905
+ * applied is said once — silently starting without them is how agents ran
1906
+ * under the wrong account when an edited `.envrc` was left unallowed.
1907
+ */
1908
+ private envForTask;
1887
1909
  setRegistry(registry: RunnerRegistry): void;
1888
1910
  /**
1889
1911
  * A getter rather than a value where the caller has one: every task gets its
@@ -1933,12 +1955,22 @@ declare class TaskOrchestrator {
1933
1955
  */
1934
1956
  adoptIsolation(state: PlanIsolation | null): Promise<void>;
1935
1957
  reviewRunDiff(): Promise<string>;
1936
- /** "Merge all": the run's integration branches into whatever the user has checked out, in every repo or none. */
1958
+ /**
1959
+ * "Merge all": the run's integration branches into whatever the user has
1960
+ * checked out, in every repo or none. Once everything merged, the run has
1961
+ * nothing left to hand over, so it is cleared up and forgotten; a branch
1962
+ * the user's HEAD somehow does not contain stays for the next run's sweep.
1963
+ */
1937
1964
  mergeRun(): Promise<IsolationMergeResult>;
1965
+ private clearMergedRun;
1938
1966
  /** Worktrees and task branches go; the integration branch and the record stay for review and merge. */
1939
1967
  cleanupRun(): Promise<void>;
1940
1968
  /** The run and everything it made go, and the plan forgets it; the next run starts afresh. */
1941
1969
  discardRun(): Promise<void>;
1970
+ private watchBlockingPrompts;
1971
+ private closeLingering;
1972
+ private closeLingeringOf;
1973
+ private forgetRun;
1942
1974
  private requireRun;
1943
1975
  /** What the plan persists of isolated execution; null when no run ever isolated. */
1944
1976
  get isolationRecord(): PlanIsolation | null;
@@ -1961,9 +1993,28 @@ declare class TaskOrchestrator {
1961
1993
  */
1962
1994
  reconcilePlan(newTasks: Task[], planRunners?: RunnerId[]): void;
1963
1995
  start(): Promise<void>;
1996
+ private haltOnFailure;
1964
1997
  stop(): void;
1965
1998
  onUserTaskComplete(taskId: string): Promise<void>;
1966
1999
  private onVerdict;
2000
+ private afterVerdict;
2001
+ /**
2002
+ * A repair's verdict decides only whether its work may try to land. It never
2003
+ * replaces the verdict the task's own work earned, and a repair that does not
2004
+ * land leaves the task waiting on the user — never a failed task, so never a
2005
+ * halted run.
2006
+ */
2007
+ private settleRepair;
2008
+ /**
2009
+ * Evidence before the queue: the repair's work is committed and checked, and
2010
+ * only then merged, through the same serialized landing as any other task —
2011
+ * so a repair the tip has moved past again is a fresh conflict, not a pass.
2012
+ */
2013
+ private landRepair;
2014
+ private landedRepair;
2015
+ /** A repair that did not land leaves the task as its conflict did: waiting on the user, worktree and refs kept. */
2016
+ private unrepaired;
2017
+ private describeEvidence;
1967
2018
  /**
1968
2019
  * Merge a passed attempt's worktree. The attempt stays live while it waits on
1969
2020
  * the module's merge queue, so a cancel, retry or stop in that window still
@@ -1977,6 +2028,9 @@ declare class TaskOrchestrator {
1977
2028
  /** Settle a task whose work passed, by what its integration reported. */
1978
2029
  private landPassed;
1979
2030
  private landUnmerged;
2031
+ /** The repair a conflicted task is owed next; null when repair is off, used up, or there is no isolated run to repair it in. */
2032
+ private nextRepair;
2033
+ private noRepairReason;
1980
2034
  /**
1981
2035
  * Mark which added task resolves which conflict. The resolver merges the
1982
2036
  * conflicted task's branch by hand in its own worktree; once that lands, the
@@ -2064,6 +2118,7 @@ declare class TaskOrchestrator {
2064
2118
  * attempt may have decided the task since (mark complete, cancel, retry).
2065
2119
  */
2066
2120
  private abandonSpawn;
2121
+ private repairPrompt;
2067
2122
  /**
2068
2123
  * The one place an attempt's working directory is decided. Async so a
2069
2124
  * per-attempt workspace (worktree isolation, #12) can be prepared here.
@@ -2088,6 +2143,8 @@ declare class TaskOrchestrator {
2088
2143
  plannerIsolation(): Promise<IsolatedExecution>;
2089
2144
  private decideRun;
2090
2145
  private activate;
2146
+ /** What earlier runs left merged in the group goes; a failure here is worth a word, never a stopped run. */
2147
+ private sweep;
2091
2148
  /**
2092
2149
  * The plan's run carries on while anything has landed on its integration
2093
2150
  * branch: a resumed plan's dependents must start from a tip that holds their
@@ -2097,8 +2154,8 @@ declare class TaskOrchestrator {
2097
2154
  /**
2098
2155
  * A run with nothing landed holds only superseded attempts, so it goes whole.
2099
2156
  * One that cannot be continued for another reason — it ran from a different
2100
- * workspace path — keeps its integration branch: only the user gives landed
2101
- * work up.
2157
+ * workspace path — keeps its integration branch in each repo that has not
2158
+ * merged it: only the user gives landed work up.
2102
2159
  */
2103
2160
  private mintRun;
2104
2161
  /** Close the open run. An isolated one hands its integration branch over for review. */
@@ -2697,11 +2754,13 @@ declare class ConversationEditError extends Error {
2697
2754
  declare class ConversationBusyError extends ConversationEditError {
2698
2755
  constructor(operation: string);
2699
2756
  }
2700
- /** A user message the conversation can be rewound to just before. */
2757
+ /** A user message a rewind can fork the conversation from just before. */
2701
2758
  interface RewindTarget {
2702
- /** Position in the transcript — what {@link PlannerConversation.rewind} takes. */
2759
+ /** Position in the transcript — what {@link PlannerConversation.cloneBefore} takes. */
2703
2760
  index: number;
2704
2761
  preview: string;
2762
+ /** The whole message — the preview cuts it to one line, and a surface confirming the rewind quotes it. */
2763
+ content: string;
2705
2764
  timestamp: string;
2706
2765
  }
2707
2766
  /** What a compaction left behind. */
@@ -2807,6 +2866,10 @@ interface ConversationFork {
2807
2866
  goal: string;
2808
2867
  workspace: string;
2809
2868
  }
2869
+ /** A fork made by a rewind, and the full text of the message it was made just before. */
2870
+ interface ConversationRewind extends ConversationFork {
2871
+ rewoundMessage: string;
2872
+ }
2810
2873
  interface SessionDeps {
2811
2874
  config: IConfig;
2812
2875
  notifications: INotification;
@@ -3029,16 +3092,18 @@ declare class Session {
3029
3092
  */
3030
3093
  forkConversation(): ConversationFork;
3031
3094
  /**
3032
- * Cut the conversation back to just before a user message (a transcript
3033
- * position from {@link rewindTargets}). Conversation only: the task list,
3034
- * and any run executing it, carry on as they are. The planner's live context
3035
- * is dropped, so the next message replays from the shortened transcript.
3095
+ * Fork the conversation from just before a user message (a transcript
3096
+ * position from {@link rewindTargets}): the fork holds everything said
3097
+ * before it and the current task list, like {@link forkConversation}, and
3098
+ * this session keeps its whole history. The message's full text comes back
3099
+ * so a surface can offer it for resending.
3036
3100
  */
3037
- rewindConversation(userMessageIndex: number): LegacyPlanState;
3101
+ rewindConversation(userMessageIndex: number): ConversationRewind;
3102
+ private saveFork;
3038
3103
  /**
3039
3104
  * Condense the conversation on the user's say-so: a hidden planner turn
3040
3105
  * summarises it, and the summary replaces everything but the last two
3041
- * exchanges. Conversation only, like a rewind — the tasks, and any run
3106
+ * exchanges. Conversation only — the tasks, and any run
3042
3107
  * executing them, are untouched. Atomic: a failed or stopped turn changes
3043
3108
  * nothing.
3044
3109
  */
@@ -3080,6 +3145,8 @@ declare class Session {
3080
3145
  approveReview(): Promise<LegacyPlanState>;
3081
3146
  forceStartTask(taskId: string): Promise<void>;
3082
3147
  runTask(taskId: string): Promise<void>;
3148
+ /** Start whatever the scheduler can now fit — after the parallel limit was raised mid-run, say. */
3149
+ reschedule(): Promise<void>;
3083
3150
  retryTask(taskId: string): Promise<void>;
3084
3151
  cancelTask(taskId: string): Promise<void>;
3085
3152
  markAiTaskComplete(taskId: string): Promise<void>;
@@ -3128,8 +3195,9 @@ declare class Session {
3128
3195
  * The opt-in way through a merge conflict: add an AI task, on the conflicted
3129
3196
  * task's own runner and model, that merges its branch by hand in a worktree
3130
3197
  * of its own. When that task lands, the conflicted one lands through it (see
3131
- * {@link TaskOrchestrator.linkConflictResolver}). Never automatic — nothing
3132
- * but this call adds it.
3198
+ * {@link TaskOrchestrator.linkConflictResolver}). The automatic answer to a
3199
+ * conflict is a repair, a new attempt of the same task (ADR-0015); a task is
3200
+ * only ever added to the plan by this call.
3133
3201
  */
3134
3202
  resolveConflictAsTask(taskId: string): Promise<LegacyPlanState | null>;
3135
3203
  stopExecution(): void;
@@ -3371,8 +3439,10 @@ declare class BufferedTaskOutputSource implements TaskOutputSource {
3371
3439
  */
3372
3440
  declare class HomeTranscriptReader implements TranscriptReader {
3373
3441
  private readonly home;
3442
+ private readonly claudeConfigDirs;
3374
3443
  constructor(opts?: {
3375
3444
  homeDir?: string;
3445
+ workspaceEnv?: (cwd: string) => Promise<Record<string, string>>;
3376
3446
  });
3377
3447
  finalAssistantText(query: TranscriptQuery, maxChars?: number): Promise<string | null>;
3378
3448
  }
@@ -3508,6 +3578,19 @@ declare function buildConflictResolutionPrompt(task: Task, conflict: {
3508
3578
  repos: string[];
3509
3579
  conflictRepo?: string;
3510
3580
  }, integrationBranch: string): string;
3581
+ /**
3582
+ * Runner prompt for a conflict repair (ADR-0015): a new attempt of the
3583
+ * conflicted task itself, in its kept worktree, so the merge runs the other
3584
+ * way round from {@link buildConflictResolutionPrompt} — the integration tip
3585
+ * into the task's branch. Whether it worked is decided by the evidence checks
3586
+ * and the landing that follow, never by the agent's word.
3587
+ */
3588
+ declare function buildConflictRepairPrompt(task: Task, conflict: {
3589
+ branch: string;
3590
+ repos: string[];
3591
+ conflictRepo?: string;
3592
+ conflictFiles?: string[];
3593
+ }, integrationBranch: string): string;
3511
3594
 
3512
3595
  /**
3513
3596
  * The one owner of "the model emitted something unusable — correct it and
@@ -3782,6 +3865,7 @@ declare class TmuxRunner extends AbstractRunner<TmuxSession> {
3782
3865
  cwd: string;
3783
3866
  registry?: RunnerRegistry;
3784
3867
  planSessionId?: string;
3868
+ env?: Record<string, string>;
3785
3869
  }): Promise<ITerminalSession>;
3786
3870
  }
3787
3871
 
@@ -4162,4 +4246,14 @@ declare class PlannerModelMemory {
4162
4246
  recall(provider: string, catalog: PlannerModelCandidate[]): PlannerModelRecall;
4163
4247
  }
4164
4248
 
4165
- export { ALLOWED_PLUGIN_HOSTS, ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type Adr0013IsolationRun, type Adr0013PlanIsolation, type Adr0013TaskRecord, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalMode, ApprovalRequest, BUILTIN_SKILL_NAMES, BaseAiService, BaseConfig, BaseFileSystem, BufferedTaskOutputSource, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CMD_EXE_MAX_COMMAND_LINE, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, CommandLineTooLongError, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, ConversationBusyError, type ConversationCompaction, ConversationEditError, type ConversationFork, ConversationMessage, type ConversationRequest, type ConversationTurn, type ConversationVariant, DAEMON_SUBPROTOCOL, DAEMON_TOKEN_SUBPROTOCOL_PREFIX, DiscoveredModel, EmbeddedNewlineError, type EnvAdmission, EnvConfig, type ExecFileFn, type ExecImpl, ExecutableNotFoundError, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, type GitExecFn, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, HomeTranscriptReader, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, IWorktreeIsolation, IsolationHandoff, IsolationMergeResult, IsolationTaskStatus, IsolationView, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, 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, type PluginSource, type PrdBlock, type PreparedLaunch, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, type PtySize, type PtyWrapOptions, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, RepoGroupLayout, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchToolType, type ResearchTurn, ResolveContext, type RewindTarget, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, type RunnerSpawnOptions, SETTINGS_ENV_ALLOWLIST, SETTINGS_ENV_REFUSED, STATE_DIR, STOPPED_TOOL_RESULT, SYMBOL_LANGUAGES, Session, SessionBroadcaster, type SessionData, type SessionDeps, type SessionMeta, SessionNotice, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SkillInfo, type SkillMetadata, SkillsService, type SpawnSpec, StdioAgentAdapter, 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, TaskIsolation, TaskOp, TaskOrchestrator, type TaskOutputAttempt, type TaskOutputSource, type TaskQuery, type TaskQueryCatalog, type TaskQueryField, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type TokenCarriers, type ToolCall, ToolOutcome, type ToolResult, type TranscriptQuery, type TranscriptReader, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, type WorkspaceCheckDeps, WorkspaceNotAProjectError, WorkspaceNotFoundError, type WorkspaceProjectCheckDeps, type WorktreeIsolationDeps, admitSettingsEnv, applyHeadLimit, assertInstallablePluginUrl, assertPlainPluginName, assertWorkspaceExists, assertWorkspaceIsProject, augmentPromptWithPriorOutputs, augmentedPath, bearerHeaderValue, buildConflictResolutionPrompt, buildConversationSystemPrompt, buildFallbackGrepArgs, buildGlobArgs, buildGrepArgs, buildMergePrompt, buildModifyDuringExecutionPrompt, buildModifyPlanPrompt, buildPlanWithResults, buildResearchPrompt, buildResearchToolsPrompt, buildRunnerInvocation, buildShellInvocation, buildSplitPrompt, buildSubagentSystemPrompt, clampThinkingEffort, classifyCommand, classifyPlannerReply, classifyPluginSource, clearAugmentedPathCache, clearDaemonToken, clearResearchShellCache, clearState, clipboardCopyCommand, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, configuredProviders, createAiService, createSkillsService, createWorktreeIsolation, daemonTokenPath, defaultLogger, definitionPattern, deleteSession, describeMergeResult, discoverGeminiModels, effectiveAllowlist, ensureDir, ensureStateDirIgnored, executionLogBlock, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, globalDataDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isExecutableResolved, isOpenAiProvider, isPlainPluginName, isValidManifest, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, migrateOldConfigDir, migratePlanIsolation, mintDaemonToken, mintSessionId, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, parseTaskQueryJson, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, reEmitTaskQueryPrompt, readDaemonToken, referencePattern, renderPlanMap, renderPriorOutputs, renderTaskQueryAnswer, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolvePluginInstallDir, resolveProviderFromPrefix, resolveResearchShell, resolveSkillInvocation, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, taskQuerySignature, textHasTaskQuery, tmuxSessionName, tmuxSocketName, tmuxWindowName, tokenSubprotocols, tokensMatch, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };
4249
+ /** How many AI tasks may run at once: `ORDEWELL_MAX_PARALLEL`, `/parallel`, `ordewell.maxParallelSessions`. */
4250
+ declare const DEFAULT_MAX_PARALLEL = 3;
4251
+ /**
4252
+ * A usable limit from what a user typed or a setting holds: any whole number
4253
+ * of at least 1 — there is no ceiling, the machine and the runners' own rate
4254
+ * limits are the user's to judge. Anything else is null, so each surface can
4255
+ * refuse it in its own words.
4256
+ */
4257
+ declare function parseMaxParallel(value: unknown): number | null;
4258
+
4259
+ export { ALLOWED_PLUGIN_HOSTS, ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalMode, ApprovalRequest, BUILTIN_SKILL_NAMES, BaseAiService, BaseConfig, BaseFileSystem, BufferedTaskOutputSource, CLAUDE_CODE_MANIFEST, CLI_PROVIDERS, CMD_EXE_MAX_COMMAND_LINE, CORE_PLANNER_PROMPT, type CappedRows, type CheckpointListener, ClaudeCodeAdapter, CliAgentAiService, type CliAgentAiServiceDeps, CodexAdapter, type CommandClassification, CommandLineTooLongError, type CommandTier, type ComposeOptions, ConsoleLogger, ContextCollector, 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, EmbeddedNewlineError, type EnvAdmission, EnvConfig, type ExecFileFn, type ExecImpl, ExecutableNotFoundError, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, type GitExecFn, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, HomeTranscriptReader, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, IWorktreeIsolation, IsolationHandoff, IsolationLandedTask, IsolationMergeResult, IsolationView, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, 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, type PluginSource, type PrdBlock, type PreparedLaunch, type PriorOutput, type ProbeFn, ProviderModelLists, type ProviderRegistration, type PtySize, type PtyWrapOptions, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, RepoGroupLayout, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchToolType, type ResearchTurn, ResolveContext, type RewindTarget, type RunnerCatalog, RunnerId, RunnerInstallation, RunnerInvocation, type RunnerMode, RunnerModeInfo, RunnerPluginManifest, RunnerRegistry, type RunnerSpawnOptions, SETTINGS_ENV_ALLOWLIST, SETTINGS_ENV_REFUSED, STATE_DIR, STOPPED_TOOL_RESULT, SYMBOL_LANGUAGES, Session, SessionBroadcaster, type SessionData, type SessionDeps, type SessionMeta, SessionNotice, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SkillInfo, type SkillMetadata, SkillsService, type SpawnSpec, StdioAgentAdapter, 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, TaskIsolation, TaskOp, TaskOrchestrator, type TaskOutputAttempt, type TaskOutputSource, type TaskQuery, type TaskQueryCatalog, type TaskQueryField, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type TokenCarriers, type ToolCall, ToolOutcome, type ToolResult, type TranscriptQuery, type TranscriptReader, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, 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, buildShellInvocation, buildSplitPrompt, buildSubagentSystemPrompt, clampThinkingEffort, classifyCommand, classifyPlannerReply, classifyPluginSource, clearAugmentedPathCache, clearDaemonToken, clearResearchShellCache, clearState, clipboardCopyCommand, coerceAssignments, collectDirectDependencyOutputs, composeAugmentedPrompt, configuredProviders, createAiService, createSkillsService, createWorktreeIsolation, daemonTokenPath, defaultLogger, definitionPattern, deleteSession, describeMergeResult, discoverGeminiModels, effectiveAllowlist, ensureDir, ensureStateDirIgnored, executionLogBlock, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, globalDataDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isExecutableResolved, isOpenAiProvider, isPlainPluginName, isValidManifest, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, migrateOldConfigDir, mintDaemonToken, mintSessionId, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, parseMaxParallel, parseTaskQueryJson, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, reEmitTaskQueryPrompt, readDaemonToken, referencePattern, renderPlanMap, renderPriorOutputs, renderTaskQueryAnswer, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolvePluginInstallDir, resolveProviderFromPrefix, resolveResearchShell, resolveSkillInvocation, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, taskQuerySignature, textHasTaskQuery, tmuxSessionName, tmuxSocketName, tmuxWindowName, tokenSubprotocols, tokensMatch, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };