@ordewell/core 0.4.8 → 0.4.10

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.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
- import { h as RunnerId, c as PlanStatus, L as LegacyPlanState, d as ResearchProgress, a as DiscoveredModel, T as Task, R as ResearchLogEntry, C as ConversationMessage, n as TaskSnapshot, Q as QueuedMessage, A as ActiveTaskSession, g as ResearchToolType, u as Verdict, e as ResearchStep, b as PlanState } from './Task-1NwmUImI.js';
1
+ import { h as RunnerId, c as PlanStatus, L as LegacyPlanState, a as DiscoveredModel, T as Task, d as ResearchProgress, R as ResearchLogEntry, C as ConversationMessage, n as TaskSnapshot, Q as QueuedMessage, A as ActiveTaskSession, g as ResearchToolType, u as Verdict, e as ResearchStep, b as PlanState } from './Task-1NwmUImI.js';
2
2
  export { D as DiscoveredMode, M as Message, P as PlanModificationWarnings, f as ResearchStepOutcome, S as StreamEvent, i as StreamStepEvent, j as StreamThinkingEvent, k as TaskMode, l as TaskModelAssignment, m as TaskOutputSummary, o as TaskStatus, p as TaskType, q as ThinkingBlock, U as UserPromptEntry, r as UserStep, V as ValidationCheck, s as ValidationContext, t as ValidationResult, v as VerificationCheck, w as addTaskToPlan, x as createEmptyPlan, y as createTask, z as emptyWarnings, B as flattenTasks, E as migrateLegacyPlan, F as migratePlanState, G as migrateTask, H as removeTaskFromPlan, I as renumberTasks, J as updateTaskInPlan, K as validateModifiedPlan, N as warningsText } from './Task-1NwmUImI.js';
3
3
  import { n as IFileSystem, I as IApproval, R as ReadFileOpts, T as ToolOutcome, k as GrepOptions, j as GlobOptions, i as FindSymbolOptions, f as ApprovalRequest, m as IConfig, A as AiProvider, z as ProviderModelLists, c as ApprovalMode, q as ITerminalSession, p as ITerminalRunner, K as RunnerRegistry, s as OrchestratorOption, b as ApprovalKind, g as ApprovalSource, H as RunnerInvocation, o as IPluginStore, J as RunnerPluginManifest, E as ResolveContext } from './ITerminalRunner-CbE6gKLI.js';
4
4
  export { a as AllProviderModels, d as ApprovalPolicy, e as ApprovalPolicyOptions, C as CatalogModel, D as DENY_ALL, h as DiscoveryCommand, F as FetchAllProviderModelsOptions, G as GREP_DEFAULT_HEAD_LIMIT, l as GrepOutputMode, M as ModelCatalog, r as ModelShortcut, O as ORCHESTRATOR_SHORTCUTS, P as PluginCloneFn, t as PluginEntry, u as PluginFeatures, v as PluginMode, w as PluginModelDiscovery, x as PluginRunnerDef, y as ProviderCredentialSource, B as ProviderModelsResult, S as SEARCH_EXCLUSIONS, L as collectProviderCredentials, N as enabledRunners, Q as fetchAllProviderModels, U as isReservedRunnerName, V as knownModelId, W as resolveModelShortcut, X as resolveProvider, Y as toOrchestratorOptions } from './ITerminalRunner-CbE6gKLI.js';
5
- import { R as RunnerModeInfo, b as PlanParseError } from './parsing-RjN9JbyG.js';
6
- export { M as ManifestLookup, P as PLAN_ENVELOPE_KEY, a as PartialPlanTask, T as TASK_OPS_ENVELOPE_KEY, c as buildModeGuide, 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 filteredBuildModes, n as looksLikePlanAttempt, p as parsePartialPlan, o as parsePlanJson, r as resolveDefaultMode, q as resolveTaskMode, s as runnerModesFrom, t as stripModelNoise, u as stripTrailingCommas, v as validatePlanModification } from './parsing-RjN9JbyG.js';
7
- import { T as TaskOp } from './plan-utils-Cgc0cCH1.js';
8
- export { A as ApplyTaskOpsResult, a as TaskRef, b as applyTaskOps, c as canMergeTasks, d as canSetDependencies, e as canSplitTask, f as classifyOutcome, g as dependencyCandidates, h as dependentsOf, p as parseTaskOpsJson, s as summarizeToolCall, t as textHasTaskOps } from './plan-utils-Cgc0cCH1.js';
5
+ import { R as RunnerModeInfo } from './ModeResolver-Dx5gzNPC.js';
6
+ export { M as ManifestLookup, b as buildModeGuide, f as filteredBuildModes, r as resolveDefaultMode, a as resolveTaskMode, c as runnerModesFrom } from './ModeResolver-Dx5gzNPC.js';
7
+ import { T as TaskOp } from './plan-utils-DtsfHnn_.js';
8
+ export { A as ApplyTaskOpsResult, a as TaskRef, b as applyTaskOps, c as canMergeTasks, d as canSetDependencies, e as canSplitTask, f as classifyOutcome, g as dependencyCandidates, h as dependentsOf, p as parseTaskOpsJson, s as summarizeToolCall, t as textHasTaskOps } from './plan-utils-DtsfHnn_.js';
9
9
  import { ChildProcess } from 'child_process';
10
10
  import { EventEmitter } from 'events';
11
+ import { b as PlanParseError } from './parsing-X0Gvuz-q.js';
12
+ 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-X0Gvuz-q.js';
11
13
 
12
14
  interface SessionMeta {
13
15
  id: string;
@@ -125,6 +127,11 @@ declare function researchShellWarning(shell: ResearchShell): string | null;
125
127
  * name at the front of it: wrappers are unwrapped first, recursively, so
126
128
  * `timeout 10 env nice rm -rf x` is an `rm`. See {@link WRAPPER_FAMILY}.
127
129
  *
130
+ * A permitted binary is permitted with the flags it is known to be read-only
131
+ * with, not with any flag at all: several of them will run a helper program or
132
+ * write a file when asked to, so `auto` is a per-binary flag allowlist and an
133
+ * unrecognised flag is refused. See {@link FLAG_POLICY}.
134
+ *
128
135
  * The lexer is dialect-aware, because the interpreter that will actually run
129
136
  * the command decides what the tokens are, and getting that wrong is not a
130
137
  * cosmetic error here — it is the difference between classifying what runs and
@@ -136,8 +143,24 @@ declare function researchShellWarning(shell: ResearchShell): string | null;
136
143
  * what it actually runs (see {@link WRAPPER_FAMILY}); given none it prints the
137
144
  * whole process environment — provider credentials included — into the research
138
145
  * log, which is a disclosure the developer should get to see coming.
146
+ *
147
+ * Membership here is necessary but not sufficient: every name in this list also
148
+ * declares the flags it is read-only with in {@link FLAG_POLICY}.
139
149
  */
140
150
  declare const AUTO_COMMANDS: string[];
151
+ /**
152
+ * `ls-remote` is deliberately absent, and it is the one entry here that is
153
+ * read-only against the repository. It reaches the network: it contacts
154
+ * whatever host the named remote or URL resolves to, which routes around the
155
+ * web fetcher's per-origin approval and its request-forgery guard. So it
156
+ * prompts rather than running silently.
157
+ *
158
+ * Prompting only became the right answer once {@link scopeFor} widened. Under
159
+ * the old scope it would have been remembered as `git ls-remote`, so one
160
+ * approval of the workspace's own remote would have authorised a listing
161
+ * against any host at all — which is the same hole with an approval dialog in
162
+ * front of it. The scope now carries the destination.
163
+ */
141
164
  declare const GIT_READONLY_SUBCOMMANDS: string[];
142
165
  /**
143
166
  * Never runs, with or without approval.
@@ -635,6 +658,65 @@ interface PlannerModes {
635
658
  researchSubagents: boolean;
636
659
  }
637
660
 
661
+ /**
662
+ * The planner's read channel: a `{"taskQuery":{...}}` reply asking Ordewell to
663
+ * show it what the per-turn plan block deliberately leaves out.
664
+ *
665
+ * The plan block carries only short fields, so a planner asked to "add a line
666
+ * to task 3's prompt" would be rewriting text it has never read. Inlining every
667
+ * body on every turn was rejected — a twenty-task plan re-sends thousands of
668
+ * tokens per message — so the planner asks instead, and pays for the detail
669
+ * only on the turns it uses it.
670
+ *
671
+ * This module owns the wire shape and the rendering of the answer; the loop,
672
+ * the budgets and the injection live in the Session, and the classification
673
+ * lives in PlanRepair alongside the plan and task-ops envelopes.
674
+ */
675
+ /** The long fields a query may ask for. Everything else is already in the plan block. */
676
+ declare const TASK_QUERY_FIELDS: readonly ["description", "prompt", "userSteps", "verdict", "outputSummary", "userStoriesCovered"];
677
+ type TaskQueryField = typeof TASK_QUERY_FIELDS[number];
678
+ interface TaskQuery {
679
+ /** Task references to read in full — an id, "#order", a bare order, or a title. */
680
+ tasks: string[];
681
+ /** Narrows what comes back. Omitted means every field in {@link TASK_QUERY_FIELDS}. */
682
+ fields?: TaskQueryField[];
683
+ /** Also return the full runner/model catalog with labels, variants and mode descriptions. */
684
+ catalog: boolean;
685
+ }
686
+ declare function textHasTaskQuery(text: string): boolean;
687
+ /** Parse a `{"taskQuery":...}` reply. Throws PlanParseError when the JSON is unusable. */
688
+ declare function parseTaskQueryJson(text: string): TaskQuery;
689
+ /** Stable identity of a query, so a turn can recognise the planner asking the same thing twice. */
690
+ declare function taskQuerySignature(query: TaskQuery): string;
691
+ /** What a full-catalog read is answered from. Models arrive already allowlist-filtered. */
692
+ interface TaskQueryCatalog {
693
+ runners: RunnerId[];
694
+ models: Partial<Record<RunnerId, DiscoveredModel[]>>;
695
+ modes: Record<RunnerId, RunnerModeInfo[]>;
696
+ autonomousDefault: boolean;
697
+ }
698
+ /**
699
+ * Appended when the planner has spent its read budget, or asked the identical
700
+ * question twice. The detail still comes back — refusing it would leave the
701
+ * planner editing text it has not read, which is the whole failure this
702
+ * channel exists to prevent — but the turn is told to land.
703
+ */
704
+ declare const TASK_QUERY_ANSWER_OR_OPS: string;
705
+ /**
706
+ * The protocol as the planner is taught it, owned here beside the parser so the
707
+ * two cannot drift. Both planner backends get these lines verbatim (ADR-0009):
708
+ * a harness planner has no tool loop to reach, so the envelope is the channel.
709
+ */
710
+ declare const TASK_QUERY_PROTOCOL: string[];
711
+ /** The one-line reminder the per-turn plan block carries, so the protocol has a single owner. */
712
+ declare const TASK_QUERY_REMINDER = "- To READ a task in full (prompt, user steps, verdict, output, user stories) or the whole model/mode catalog before editing, reply with ONLY {\"taskQuery\":{\"tasks\":[\"<id or #order>\"],\"catalog\":true}} \u2014 it changes nothing, and you then reply again with your ops.";
713
+ /**
714
+ * Render the injected answer to one read. Never persisted — it is context for
715
+ * the planner's next reply and nothing else — so it is built fresh from live
716
+ * state on every query rather than cached.
717
+ */
718
+ declare function renderTaskQueryAnswer(query: TaskQuery, tasks: Task[], catalog: TaskQueryCatalog): string;
719
+
638
720
  declare abstract class AbstractTerminalSession implements ITerminalSession {
639
721
  id: string;
640
722
  taskId: string;
@@ -907,6 +989,17 @@ type AgentEvent =
907
989
  name: string;
908
990
  detail: string;
909
991
  }
992
+ /**
993
+ * The agent delegated work to a subagent it left running in the background,
994
+ * and may end its turn before that work reports. Ordewell's conversation is
995
+ * request/response: a turn that ends hands control back to the user, and
996
+ * anything the agent says afterwards arrives with no turn open and is lost.
997
+ * Naming the launch is what lets the service ask for the results in time.
998
+ */
999
+ | {
1000
+ type: 'background_agent';
1001
+ id: string;
1002
+ }
910
1003
  /** The agent finished its turn and is waiting for the next user message. */
911
1004
  | {
912
1005
  type: 'turn_end';
@@ -1111,9 +1204,11 @@ interface ConversationRequest {
1111
1204
  }
1112
1205
  /**
1113
1206
  * One planner turn's outcome. The planner talks to the user (`message`),
1114
- * commits a full plan (`plan`, a `{tasks:[...]}` JSON object), or emits
1115
- * targeted task edits (`task_ops`, a `{taskOps:[...]}` JSON object). The
1116
- * Session validates and applies task ops atomically; the AI service only
1207
+ * commits a full plan (`plan`, a `{tasks:[...]}` JSON object), emits targeted
1208
+ * task edits (`task_ops`, a `{taskOps:[...]}` JSON object), or asks to read
1209
+ * task bodies and the full catalog before editing (`task_query`, a
1210
+ * `{taskQuery:{...}}` JSON object). The Session validates and applies task ops
1211
+ * atomically and answers queries out of its own state; the AI service only
1117
1212
  * parses them.
1118
1213
  */
1119
1214
  type ConversationTurn = {
@@ -1130,6 +1225,11 @@ type ConversationTurn = {
1130
1225
  ops: TaskOp[];
1131
1226
  text: string;
1132
1227
  researchLog: ResearchLogEntry[];
1228
+ } | {
1229
+ kind: 'task_query';
1230
+ query: TaskQuery;
1231
+ text: string;
1232
+ researchLog: ResearchLogEntry[];
1133
1233
  };
1134
1234
  interface IAiService {
1135
1235
  /**
@@ -1972,12 +2072,19 @@ declare abstract class StdioAgentAdapter implements AgentAdapter {
1972
2072
  /** Set for the duration of a turn. Outside one, events are buffered rather than dropped. */
1973
2073
  private turnEmit;
1974
2074
  /**
1975
- * Events the agent produced between turns — in practice the startup warnings
1976
- * that arrive during the handshake. Dropping them hid the one diagnostic
1977
- * that explains a planner which cannot read the workspace, so they are held
1978
- * until a turn exists to show them in.
2075
+ * Events the agent produced before its first turn — in practice the startup
2076
+ * warnings that arrive during the handshake. Dropping them hid the one
2077
+ * diagnostic that explains a planner which cannot read the workspace, so they
2078
+ * are held until a turn exists to show them in.
2079
+ *
2080
+ * Only before the *first* turn. Once one has run, anything arriving outside a
2081
+ * turn is that closed turn's straggling work — a backgrounded subagent
2082
+ * finishing, a late read — and replaying it into the next turn presents it as
2083
+ * research done for the user's new message.
1979
2084
  */
1980
2085
  private betweenTurns;
2086
+ /** Set once a turn has ended: after that, out-of-turn events are stale, not startup. */
2087
+ private hadTurn;
1981
2088
  private disposed;
1982
2089
  /** Resolves when the process ends, so a handshake can lose the race instead of waiting out its timeout. */
1983
2090
  protected processEnded: Promise<void>;
@@ -2020,6 +2127,8 @@ declare abstract class StdioAgentAdapter implements AgentAdapter {
2020
2127
  */
2021
2128
  declare class ClaudeCodeAdapter extends StdioAgentAdapter {
2022
2129
  readonly agentId = "claude-code";
2130
+ /** Whether this turn has already emitted reply text — see {@link handleLine}. */
2131
+ private turnHasText;
2023
2132
  protected spawnSpec(opts: AgentStartOptions): SpawnSpec;
2024
2133
  protected turnPayload(message: string): string;
2025
2134
  protected handleLine(line: string, emit: (event: AgentEvent) => void): void;
@@ -2106,6 +2215,8 @@ declare class OpenCodeAdapter implements AgentAdapter {
2106
2215
  private exited;
2107
2216
  private disposed;
2108
2217
  private opts;
2218
+ /** Whether this turn has already emitted reply text — see {@link emitPart}. */
2219
+ private turnHasText;
2109
2220
  constructor(deps: AgentProcessDeps);
2110
2221
  start(opts: AgentStartOptions): Promise<void>;
2111
2222
  send(message: string, onEvent: (event: AgentEvent) => void, signal?: AbortSignal): Promise<void>;
@@ -2454,6 +2565,15 @@ declare class Session {
2454
2565
  */
2455
2566
  reset(): void;
2456
2567
  private runnerModesFor;
2568
+ /**
2569
+ * The catalog a model/task-mode edit is checked against — the same
2570
+ * discovered models and manifest modes the per-turn catalog block shows the
2571
+ * planner, so a refusal here can never name something invalid that the
2572
+ * planner was never told about. `modelsCache` is read live, not filtered by
2573
+ * the allowlist here — {@link checkModelAndModeValidity} narrows by
2574
+ * allowlist itself, the same way `coerceAssignments` does.
2575
+ */
2576
+ private editCatalog;
2457
2577
  get planState(): LegacyPlanState | null;
2458
2578
  /**
2459
2579
  * The live plan in the shape a saved session is read back as. The disk
@@ -2496,6 +2616,26 @@ declare class Session {
2496
2616
  * answers, PRD accept/adjust, outline confirm. One branch, no phase ladder.
2497
2617
  */
2498
2618
  continueConversation(userMessage: string, options?: GeneratePlanOptions): Promise<LegacyPlanState>;
2619
+ /**
2620
+ * Answer every read the planner emits until it says something else.
2621
+ *
2622
+ * The channel is a text envelope rather than a registered tool because the
2623
+ * protocol has to be identical on both planner backends (ADR-0009): Ordewell
2624
+ * owns a tool loop only in the API case, and a harness planner running as a
2625
+ * coding-agent subprocess can only be reached this way.
2626
+ *
2627
+ * Draining here — outside {@link repairLoop} — is what keeps reads free of
2628
+ * the repair budget. A planner that looks a task up and *then* fumbles its
2629
+ * ops JSON still gets its two corrective retries; charging it for the read
2630
+ * would cost it the chance to fix the edit.
2631
+ */
2632
+ private drainTaskQueries;
2633
+ /**
2634
+ * Render one read out of live state. Never persisted to the transcript: the
2635
+ * detail is context for the planner's next reply, and re-sending it on every
2636
+ * later turn is exactly the cost this channel exists to avoid.
2637
+ */
2638
+ private taskQueryAnswer;
2499
2639
  /**
2500
2640
  * Drive a planner turn to a persisted, broadcast outcome. Task edits apply
2501
2641
  * atomically; validation failures are fed back to the model for up to 2
@@ -2504,6 +2644,24 @@ declare class Session {
2504
2644
  * path, not two.
2505
2645
  */
2506
2646
  private settleTurn;
2647
+ /**
2648
+ * The catalog the planner may actually draw from — model ids and task-mode
2649
+ * ids, per selected runner — emitted on EVERY turn, before any plan exists
2650
+ * or after. The system prompt shows this once at conversation start; a long
2651
+ * grill-me interview or PRD negotiation outlives that single showing and the
2652
+ * planner starts misquoting it, so this re-states it per turn instead.
2653
+ *
2654
+ * Built from the allowlist-filtered view (`filterModelsForPrompt`), the same
2655
+ * one the system prompt used — a restricted allowlist stays a hard bound on
2656
+ * every turn, not just the first. `this.modelsCache` itself is never
2657
+ * filtered: `coerceAssignments` needs the full discovered catalog alongside
2658
+ * the allowlist to resolve labels and clamp effort to real variants.
2659
+ *
2660
+ * Reads `this.plan.runners` live, so a runner admitted mid-session by a
2661
+ * retarget (`admitRunner`) is filtered and shown like every other — there is
2662
+ * no separate "originally selected" list to fall stale.
2663
+ */
2664
+ private catalogBlock;
2507
2665
  /**
2508
2666
  * The "you are here" block for post-plan chat: current tasks with stable
2509
2667
  * references, plus the task-ops protocol. Injected per turn (never
@@ -2573,10 +2731,14 @@ declare class Session {
2573
2731
  */
2574
2732
  private editPlan;
2575
2733
  /**
2576
- * Patch one task's fields. A hand-set dependency list is the one patch that
2577
- * can leave the plan unschedulable, so it goes through the same
2578
- * {@link canSetDependencies} guard the planner's pickers use rather than a
2579
- * second copy of the rule — and throws, so the surface can say why.
2734
+ * Patch one task's fields. A hand-set dependency list, or a type flip
2735
+ * between AI and MAN, are the patches that can leave a task incoherent
2736
+ * (unschedulable, or carrying fields that mean nothing for its new type),
2737
+ * so both go through the same {@link validateTaskEdit} guard the planner's
2738
+ * task-ops applier uses (as the 'direct' actor, which skips the lock rule)
2739
+ * rather than a second copy of the rules — and throws, so the surface can
2740
+ * say why. Gated on the task existing so an edit to an unknown id still
2741
+ * falls through to the no-op `store.update` below instead of throwing.
2580
2742
  */
2581
2743
  updateTask(taskId: string, changes: Partial<Task>): Promise<LegacyPlanState | null>;
2582
2744
  /**
@@ -2864,6 +3026,8 @@ declare function reEmitPlanPrompt(detail: string): string;
2864
3026
  declare function truncatedPlanReEmitPrompt(historyCompacted: boolean): string;
2865
3027
  /** A task-ops attempt was botched (unparseable JSON): re-emit the ops object. */
2866
3028
  declare function reEmitTaskOpsPrompt(detail: string): string;
3029
+ /** A read attempt was botched (unparseable or unknown selector): re-emit the query object. */
3030
+ declare function reEmitTaskQueryPrompt(detail: string): string;
2867
3031
  /** Task ops parsed but failed semantic validation (cycles, unknown refs, locked tasks). */
2868
3032
  declare function taskOpsRejectedPrompt(errors: string[]): string;
2869
3033
  /** A modified plan failed validation during execution: full re-prompt feedback block. */
@@ -2875,6 +3039,11 @@ type PlannerReplyClassification = {
2875
3039
  kind: 'task_ops';
2876
3040
  ops: TaskOp[];
2877
3041
  }
3042
+ /** A read: show me these tasks in full (and/or the whole catalog) before I edit anything. */
3043
+ | {
3044
+ kind: 'task_query';
3045
+ query: TaskQuery;
3046
+ }
2878
3047
  /** Clearly attempted a plan (tasks-keyed object, or JSON cut off mid-stream) and botched it — worth a corrective retry. */
2879
3048
  | {
2880
3049
  kind: 'broken_plan';
@@ -2884,6 +3053,11 @@ type PlannerReplyClassification = {
2884
3053
  | {
2885
3054
  kind: 'broken_task_ops';
2886
3055
  error: PlanParseError;
3056
+ }
3057
+ /** Clearly attempted a read and botched it — worth a corrective retry. */
3058
+ | {
3059
+ kind: 'broken_task_query';
3060
+ error: PlanParseError;
2887
3061
  } | {
2888
3062
  kind: 'prose';
2889
3063
  };
@@ -3370,6 +3544,17 @@ declare const OPENCODE_MANIFEST: RunnerPluginManifest;
3370
3544
  declare const STATE_DIR = ".ordewell";
3371
3545
  declare function ensureDir(dir: string): void;
3372
3546
  declare function getStateDir(baseDir?: string): string;
3547
+ /**
3548
+ * A match-everything ignore rule, written *inside* the state directory. A
3549
+ * `.gitignore` containing `*` inside a directory excludes that directory's
3550
+ * whole contents, itself included, so plans and sessions stop being
3551
+ * accidentally committable — without ever touching a file the developer wrote.
3552
+ * Editing their root `.gitignore` would be the intrusive version of this.
3553
+ *
3554
+ * Idempotent, and never overwrites an existing file: a developer who has
3555
+ * customised these rules (to commit their plans deliberately, say) keeps them.
3556
+ */
3557
+ declare function ensureStateDirIgnored(baseDir?: string): void;
3373
3558
 
3374
3559
  declare function saveState(plan: LegacyPlanState, baseDir?: string): void;
3375
3560
  declare function loadState(baseDir?: string, logger?: ILogger): LegacyPlanState | null;
@@ -3460,4 +3645,4 @@ declare class PlannerModelMemory {
3460
3645
  recall(provider: string, catalog: PlannerModelCandidate[]): PlannerModelRecall;
3461
3646
  }
3462
3647
 
3463
- export { ALLOWED_PLUGIN_HOSTS, ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalKind, ApprovalMode, ApprovalRequest, ApprovalSource, BaseAiService, BaseConfig, BaseFileSystem, 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, ConversationMessage, type ConversationRequest, type ConversationTurn, DAEMON_SUBPROTOCOL, DAEMON_TOKEN_SUBPROTOCOL_PREFIX, DiscoveredModel, EmbeddedNewlineError, type EnvAdmission, EnvConfig, type ExecFileFn, type ExecImpl, ExecutableNotFoundError, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, ORDEWELL_SETTABLE_ENV, 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, 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, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchStep, ResearchToolType, type ResearchTurn, ResolveContext, 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, type SerializedPlan, type SerializedTask, type SerializedTaskStatus, Session, type SessionBroadcaster, type SessionData, type SessionDeps, type SessionMessage, type SessionMeta, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SpawnSpec, StdioAgentAdapter, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, TaskOp, TaskOrchestrator, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type TokenCarriers, type ToolCall, ToolOutcome, type ToolResult, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, type WorkspaceCheckDeps, WorkspaceNotAProjectError, WorkspaceNotFoundError, type WorkspaceProjectCheckDeps, admitSettingsEnv, applyHeadLimit, assertInstallablePluginUrl, assertPlainPluginName, assertWorkspaceExists, assertWorkspaceIsProject, augmentPromptWithPriorOutputs, augmentedPath, bearerHeaderValue, 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, daemonTokenPath, defaultLogger, definitionPattern, deleteSession, discoverGeminiModels, effectiveAllowlist, ensureDir, executionLogBlock, executionSummary, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isExecutableResolved, isOpenAiProvider, isPlainPluginName, isValidManifest, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, mintDaemonToken, mintSessionId, modelContextBlock, modifyValidationFeedback, normalizeAgentArgs, normalizeGeminiModel, pendingEditRulesBlock, planDirectLaunch, planShellLaunch, posixShellQuote, prefixModelId, providerForRunner, reEmitPlanPrompt, reEmitTaskOpsPrompt, readDaemonToken, referencePattern, renderPlanMap, renderPriorOutputs, repairLoop, researchShellWarning, researchToolsPath, resolveArgs, resolvePluginInstallDir, resolveProviderFromPrefix, resolveResearchShell, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, serializePlan, serializeTask, serializeTaskStatus, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, tmuxSessionName, tmuxSocketName, tmuxWindowName, tokenSubprotocols, tokensMatch, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };
3648
+ export { ALLOWED_PLUGIN_HOSTS, ALL_PROVIDERS, AUTO_COMMANDS, AbstractRunner, AbstractTerminalSession, ActiveTaskSession, type AgentAdapter, type AgentAdapterFactory, type AgentEvent, type AgentProcessDeps, type AgentStartOptions, AiProvider, ApprovalKind, ApprovalMode, ApprovalRequest, ApprovalSource, BaseAiService, BaseConfig, BaseFileSystem, 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, ConversationMessage, type ConversationRequest, type ConversationTurn, DAEMON_SUBPROTOCOL, DAEMON_TOKEN_SUBPROTOCOL_PREFIX, DiscoveredModel, EmbeddedNewlineError, type EnvAdmission, EnvConfig, type ExecFileFn, type ExecImpl, ExecutableNotFoundError, FindSymbolOptions, FsPluginStore, GIT_READONLY_SUBCOMMANDS, GeminiService, GlobOptions, type GrepInvocation, GrepOptions, type HasBinFn, HeadlessRunner, type HeadlessRunnerDeps, HeadlessSession, type IAiService, IApproval, IConfig, IFileSystem, type ILogger, type INotification, IPluginStore, ITerminalRunner, ITerminalSession, JSON_REPAIR_INSTRUCTION, type KillTreeDeps, type LaunchDeps, type LaunchPlan, LegacyPlanState, LineBuffer, type MappedTool, ModelResolver, type ModelResolverDeps, type ModifyPlanRequest, type NotificationAction, OPENCODE_MANIFEST, ORDEWELL_SETTABLE_ENV, 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, 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, QueuedMessage, REFUSED_COMMANDS, ReadFileOpts, type RepairLoopOpts, type RepairVerdict, type ResearchChat, ResearchLogEntry, ResearchProgress, type ResearchShell, type ResearchShellDeps, ResearchStep, ResearchToolType, type ResearchTurn, ResolveContext, 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, type SerializedPlan, type SerializedTask, type SerializedTaskStatus, Session, type SessionBroadcaster, type SessionData, type SessionDeps, type SessionMessage, type SessionMeta, type SessionPlanner, type SessionRuntimeSettings, SettingsService, type ShellDialect, type SpawnSpec, StdioAgentAdapter, TASK_QUERY_ANSWER_OR_OPS, TASK_QUERY_FIELDS, TASK_QUERY_PROTOCOL, TASK_QUERY_REMINDER, TRUNCATED_PLAN_REPAIR_INSTRUCTION, Task, TaskOp, TaskOrchestrator, type TaskQuery, type TaskQueryCatalog, type TaskQueryField, TaskSnapshot, TmuxRunner, type TmuxRunnerDeps, type TokenCarriers, type ToolCall, ToolOutcome, type ToolResult, type UserSettings, Verdict, VerdictEngine, type VerdictListener, WINDOWS_MAX_COMMAND_LINE, type WorkspaceCheckDeps, WorkspaceNotAProjectError, WorkspaceNotFoundError, type WorkspaceProjectCheckDeps, admitSettingsEnv, applyHeadLimit, assertInstallablePluginUrl, assertPlainPluginName, assertWorkspaceExists, assertWorkspaceIsProject, augmentPromptWithPriorOutputs, augmentedPath, bearerHeaderValue, 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, daemonTokenPath, defaultLogger, definitionPattern, deleteSession, discoverGeminiModels, effectiveAllowlist, ensureDir, ensureStateDirIgnored, executionLogBlock, executionSummary, extractPrdBlock, extractPresentedToken, filterFallbackByAnchoredInclude, filterModelsForPrompt, formatSearchOutput, generatePlanWithRepair, getLatestSession, getProviderMeta, getSettingsPath, getStateDir, grantScopeFor, hasTmux, includeGlobFor, isCliProvider, isExecutableResolved, isOpenAiProvider, isPlainPluginName, isValidManifest, killTree, languageForId, listSessions, loadSession, loadSessionPlanState, loadState, mapAgentTool, 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, resolveWithin, retargetTaskRunner, runnerAssignment, runnerForProvider, sanitizeSlug, savePrdMarkdown, saveSession, saveState, serializePlan, serializeTask, serializeTaskStatus, sessionRuntimeSettings, stateExists, stripAnsi, stripModelPrefix, summarizeOutput, taskOpsRejectedPrompt, taskQuerySignature, textHasTaskQuery, tmuxSessionName, tmuxSocketName, tmuxWindowName, tokenSubprotocols, tokensMatch, truncatedPlanReEmitPrompt, wellKnownBinDirs, windowsCommandLine, withPath, wrapWithPty };