@buildaharness/aielia 0.3.2 → 0.3.4

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-loop.d.ts +9 -1
  3. package/dist/assistant-session.d.ts +4 -4
  4. package/dist/assistant-types.d.ts +8 -0
  5. package/dist/assistant.d.ts +39 -0
  6. package/dist/{bin-CqkqT6KK.js → bin-CdVTAe7j.js} +136 -34
  7. package/dist/bin-CdVTAe7j.js.map +1 -0
  8. package/dist/cli-session.d.ts +12 -0
  9. package/dist/cli.d.ts +3 -0
  10. package/dist/cli.js +1 -1
  11. package/dist/config.d.ts +22 -0
  12. package/dist/first-run.d.ts +3 -0
  13. package/dist/goal-graph-flag.d.ts +44 -0
  14. package/dist/goal-graph-reconcile.d.ts +55 -0
  15. package/dist/goal-graph-service.d.ts +48 -0
  16. package/dist/goal-graph-store.d.ts +485 -0
  17. package/dist/goal-graph-suggest-flag.d.ts +34 -0
  18. package/dist/goal-identity-matcher.d.ts +21 -0
  19. package/dist/goal-thread-identity.d.ts +32 -0
  20. package/dist/goal-thread-scheduler.d.ts +78 -0
  21. package/dist/harness-bridge.d.ts +17 -0
  22. package/dist/index.d.ts +11 -1
  23. package/dist/index.js +86 -71
  24. package/dist/live-steering-channel.d.ts +31 -0
  25. package/dist/memory-service.d.ts +10 -0
  26. package/dist/next-step-proposer.d.ts +52 -0
  27. package/dist/plan-approval-service.d.ts +1 -1
  28. package/dist/plan-drafting-service.d.ts +1 -1
  29. package/dist/{cli-session-BiX2DOni.js → provider-setup-CPbB5y_V.js} +4820 -304
  30. package/dist/provider-setup-CPbB5y_V.js.map +1 -0
  31. package/dist/provider-setup.d.ts +51 -0
  32. package/dist/response-service.d.ts +18 -2
  33. package/dist/review-checker.d.ts +10 -0
  34. package/dist/scope-urgency-classifier.d.ts +29 -0
  35. package/dist/semantic-criterion-coverage.d.ts +10 -0
  36. package/dist/supervisor-flag.d.ts +20 -0
  37. package/dist/{tui-app-4_TrzESz.js → tui-app-DeyZ4Pr9.js} +3 -3
  38. package/dist/{tui-app-4_TrzESz.js.map → tui-app-DeyZ4Pr9.js.map} +1 -1
  39. package/dist/turn-interpreter.d.ts +12 -0
  40. package/dist/version.d.ts +1 -1
  41. package/package.json +2 -2
  42. package/dist/bin-CqkqT6KK.js.map +0 -1
  43. package/dist/cli-session-BiX2DOni.js.map +0 -1
@@ -9,6 +9,23 @@ import { TurnIntentClassification } from './turn-intent-classifier.js';
9
9
  import { AssistantSource } from './assistant-source.js';
10
10
  import { AssistantProgress } from './assistant-types.js';
11
11
  import { TraceEvent } from './trace-events.js';
12
+ /**
13
+ * `AUDIT_VERIFICATION` gate — feature-value audit (Phase C5 of the internal plan). EVAL-ONLY:
14
+ * default **ON** (an unset / empty / truthy value keeps today's always-on verification). Only the
15
+ * benchmark's `verificationOff` arm sets a falsy value (`0` / `false` / `off` / `no` / `disabled`),
16
+ * which makes `HarnessBridge.run` pass `skipVerification: true` to HarnessRuntime. Read at exactly
17
+ * one call site (below); no product path sets it. Same shape as `semanticContradictionEnabled()`.
18
+ */
19
+ export declare function verificationEnabled(env?: Record<string, string | undefined>): boolean;
20
+ /**
21
+ * `AUDIT_REVIEWER_PASS` gate — feature-value audit (Phase C6 of the internal plan). EVAL-ONLY:
22
+ * default **ON** (an unset / empty / truthy value keeps today's always-on 3-lens reviewer pass).
23
+ * Only the benchmark's `reviewerPassOff` arm sets a falsy value (`0` / `false` / `off` / `no` /
24
+ * `disabled`), which makes `HarnessBridge.run` pass `skipReviewerPass: true` to HarnessRuntime.
25
+ * Read at exactly one call site (below); no product path sets it. Same shape as
26
+ * `verificationEnabled()`.
27
+ */
28
+ export declare function reviewerPassEnabled(env?: Record<string, string | undefined>): boolean;
12
29
  export type HarnessOutcome = {
13
30
  status: 'paused';
14
31
  checkpoint: HarnessCheckpoint;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { PersonalAssistant } from './assistant.js';
2
2
  export type { AssistantTurnResult, ProposerKind, PersonalAssistantOptions, AssistantProgress, AssistantTrace, AssistantSource, MemorySummary, TranscriptSearchHit, DebugLogEntry } from './assistant.js';
3
+ export type { GoalGraphState, GoalThreadView, GoalThreadVisibility, GoalTaskSummary } from './goal-graph-service.js';
3
4
  export type { AnswerClaim, AnswerClaimSourceType, AnswerClaimVerificationStatus } from './answer-claim.js';
4
5
  export { classifyRisk } from './risk-classifier.js';
5
6
  export type { RiskClassification } from './risk-classifier.js';
@@ -47,12 +48,21 @@ export { resolveAskMode, normalizeAskMode, DEFAULT_ASK_MODE } from './ask-mode-f
47
48
  export type { AskMode } from './ask-mode-flag.js';
48
49
  export { resolvePlanMode, normalizePlanMode, DEFAULT_PLAN_MODE } from './plan-mode-flag.js';
49
50
  export type { PlanRolloutMode } from './plan-mode-flag.js';
51
+ export { resolveGoalGraphMode, normalizeGoalGraphMode, isGoalGraphEnabled, DEFAULT_GOAL_GRAPH_MODE } from './goal-graph-flag.js';
52
+ export type { GoalGraphMode } from './goal-graph-flag.js';
53
+ export type { NextStepSuggestion } from './next-step-proposer.js';
54
+ export { resolveGoalGraphSuggestMode, normalizeGoalGraphSuggestMode, isGoalGraphSuggestEnabled, DEFAULT_GOAL_GRAPH_SUGGEST_MODE } from './goal-graph-suggest-flag.js';
55
+ export type { GoalGraphSuggestMode } from './goal-graph-suggest-flag.js';
56
+ export { LiveSteeringChannel } from './live-steering-channel.js';
57
+ export type { SteeringEvent } from './live-steering-channel.js';
50
58
  export { AskClarificationService } from './ask-clarification-service.js';
51
59
  export type { AskClarificationPendingState } from './ask-clarification-service.js';
52
60
  export { validateAskResponse, MAX_QUESTIONS_PER_BATCH, MIN_OPTIONS_PER_QUESTION, MAX_OPTIONS_PER_QUESTION } from '@buildaharness/harness';
53
61
  export type { AskQuestion, AskQuestionOption, AskAnswer, AskResponse } from '@buildaharness/harness';
54
62
  export { createScriptedLLMClient } from './scripted-llm-client.js';
55
63
  export type { ScriptedLLMClientScript } from './scripted-llm-client.js';
56
- export { formatMemorySummary, formatSearchResults, formatCostSummary, formatDoctorReport, formatTranscriptMarkdown, defaultExportFilename } from './cli-session.js';
64
+ export { formatMemorySummary, formatSearchResults, formatGoalGraphState, formatCostSummary, formatDoctorReport, formatTranscriptMarkdown, defaultExportFilename } from './cli-session.js';
57
65
  export type { CostSummaryInfo, DoctorCheck } from './cli-session.js';
58
66
  export { estimateCostUsd } from './model-pricing.js';
67
+ export { PROVIDER_SETUP, getProviderSetup, cleanApiKey, checkApiKeyFormat, testApiKey } from './provider-setup.js';
68
+ export type { KeyedBackend, ProviderSetupInfo, KeyTestResult } from './provider-setup.js';
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { B as classifyRisk } from "./cli-session-BiX2DOni.js";
5
- import { A, a, b, C, c, D, e, f, g, i, F, j, I, L, k, l, m, P, n, o, R, p, S, q, W, r, s, t, u, v, w, x, y, z, G, H, J, K, M, N, O, T, U, X, Y, Z, _, $, a1, a2, a3, a7, a8, a9, ac, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, at, au, av, aw, ax, ay, az, aA, aC, aD, aF, aG, aH, aI } from "./cli-session-BiX2DOni.js";
4
+ import { M as classifyRisk } from "./provider-setup-CPbB5y_V.js";
5
+ import { A, a, b, C, c, D, e, f, g, h, i, k, F, l, I, L, m, n, o, p, P, q, r, s, R, t, S, u, W, v, w, x, y, z, B, G, H, J, K, N, O, Q, T, U, V, X, Y, _, $, a1, a2, a3, a4, a5, a7, a8, a9, aa, ae, ag, ah, ak, am, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aR, aS, aU, aV, aW, aX, aY } from "./provider-setup-CPbB5y_V.js";
6
6
  import { MAX_OPTIONS_PER_QUESTION, MAX_QUESTIONS_PER_BATCH, MIN_OPTIONS_PER_QUESTION, validateAskResponse } from "@buildaharness/harness";
7
7
  const PLAN_SCHEMA = {
8
8
  type: "object",
@@ -126,87 +126,102 @@ export {
126
126
  c as ConfigValidationError,
127
127
  D as DEFAULT_ASK_MODE,
128
128
  e as DEFAULT_CONFIG,
129
- f as DEFAULT_ONE_LOOP_MODE,
130
- g as DEFAULT_PLAN_MODE,
131
- i as EmailDeliveryError,
129
+ f as DEFAULT_GOAL_GRAPH_MODE,
130
+ g as DEFAULT_GOAL_GRAPH_SUGGEST_MODE,
131
+ h as DEFAULT_ONE_LOOP_MODE,
132
+ i as DEFAULT_PLAN_MODE,
133
+ k as EmailDeliveryError,
132
134
  F as FETCH_URL_TOOL,
133
- j as FILE_TOOLS,
135
+ l as FILE_TOOLS,
134
136
  I as InvalidEmailArgsError,
135
137
  L as LAYER_DISPLAY_NAME,
136
- k as LAYER_ORDER,
137
- l as LAYER_SHORT_CODE,
138
- m as LIST_DIRECTORY_TOOL,
138
+ m as LAYER_ORDER,
139
+ n as LAYER_SHORT_CODE,
140
+ o as LIST_DIRECTORY_TOOL,
141
+ p as LiveSteeringChannel,
139
142
  MAX_OPTIONS_PER_QUESTION,
140
143
  MAX_QUESTIONS_PER_BATCH,
141
144
  MIN_OPTIONS_PER_QUESTION,
142
- P as PathOutsideWorkspaceError,
143
- n as PersonalAssistant,
144
- o as PrivateNetworkTargetError,
145
+ P as PROVIDER_SETUP,
146
+ q as PathOutsideWorkspaceError,
147
+ r as PersonalAssistant,
148
+ s as PrivateNetworkTargetError,
145
149
  R as READ_FILE_TOOL,
146
- p as RUN_SHELL_COMMAND_TOOL,
150
+ t as RUN_SHELL_COMMAND_TOOL,
147
151
  S as SEND_EMAIL_TOOL,
148
- q as SHELL_TOOLS,
152
+ u as SHELL_TOOLS,
149
153
  W as WEB_SEARCH_TOOL,
150
- r as WEB_TOOLS,
151
- s as WRITE_FILE_TOOL,
152
- t as abandonPlan,
153
- u as applyPendingAction,
154
- v as assertPublicHttpUrl,
155
- w as braveSearch,
156
- x as buildClaudePrompt,
154
+ v as WEB_TOOLS,
155
+ w as WRITE_FILE_TOOL,
156
+ x as abandonPlan,
157
+ y as applyPendingAction,
158
+ z as assertPublicHttpUrl,
159
+ B as braveSearch,
160
+ G as buildClaudePrompt,
157
161
  buildPlanFromTemplate,
158
- y as buildWhyChain,
159
- z as classifyError,
162
+ H as buildWhyChain,
163
+ J as checkApiKeyFormat,
164
+ K as classifyError,
160
165
  classifyRisk,
161
- G as classifyToolYield,
162
- H as classifyTurnIntent,
163
- J as computePlanPosition,
164
- K as createPlanRecord,
165
- M as createResendSender,
166
+ N as classifyToolYield,
167
+ O as classifyTurnIntent,
168
+ Q as cleanApiKey,
169
+ T as computePlanPosition,
170
+ U as createPlanRecord,
171
+ V as createResendSender,
166
172
  createScriptedLLMClient,
167
- N as createSmtpSender,
168
- O as defaultExportFilename,
169
- T as detectHomogeneousBatchList,
170
- U as discardPendingAction,
171
- X as estimateCostUsd,
172
- Y as executeActionTool,
173
- Z as executeFileTool,
174
- _ as executeShellTool,
175
- $ as executeWebTool,
176
- a1 as formatCostSummary,
177
- a2 as formatDoctorReport,
178
- a3 as formatEmailApprovalReason,
179
- a7 as formatMemorySummary,
180
- a8 as formatPlanProgress,
181
- a9 as formatSearchResults,
182
- ac as formatTranscriptMarkdown,
183
- af as isLikelyEmailAddress,
184
- ag as listTemplateNames,
185
- ah as loadActivePlan,
186
- ai as loadPendingAction,
187
- aj as loadTemplate,
188
- ak as matchTemplateIfConfident,
189
- al as nextPendingTask,
190
- am as nodeDisplayName,
191
- an as nodeToLayer,
192
- ao as normalizeAskMode,
193
- ap as normalizeOneLoopMode,
194
- aq as normalizePlanMode,
195
- ar as parseClaudeCliOutput,
196
- at as pickTemplateForTask,
197
- au as planCompletionPct,
198
- av as resolveAskMode,
199
- aw as resolveConfig,
200
- ax as resolveInWorkspace,
201
- ay as resolveOneLoopMode,
202
- az as resolvePlanMode,
203
- aA as savePlan,
204
- aC as stagePendingAction,
205
- aD as stagedActionInput,
206
- aF as stripMcpToolPrefix,
207
- aG as summarizeToolStep,
208
- aH as updatePlanFromRun,
173
+ X as createSmtpSender,
174
+ Y as defaultExportFilename,
175
+ _ as detectHomogeneousBatchList,
176
+ $ as discardPendingAction,
177
+ a1 as estimateCostUsd,
178
+ a2 as executeActionTool,
179
+ a3 as executeFileTool,
180
+ a4 as executeShellTool,
181
+ a5 as executeWebTool,
182
+ a7 as formatCostSummary,
183
+ a8 as formatDoctorReport,
184
+ a9 as formatEmailApprovalReason,
185
+ aa as formatGoalGraphState,
186
+ ae as formatMemorySummary,
187
+ ag as formatPlanProgress,
188
+ ah as formatSearchResults,
189
+ ak as formatTranscriptMarkdown,
190
+ am as getProviderSetup,
191
+ ao as isGoalGraphEnabled,
192
+ ap as isGoalGraphSuggestEnabled,
193
+ aq as isLikelyEmailAddress,
194
+ ar as listTemplateNames,
195
+ as as loadActivePlan,
196
+ at as loadPendingAction,
197
+ au as loadTemplate,
198
+ av as matchTemplateIfConfident,
199
+ aw as nextPendingTask,
200
+ ax as nodeDisplayName,
201
+ ay as nodeToLayer,
202
+ az as normalizeAskMode,
203
+ aA as normalizeGoalGraphMode,
204
+ aB as normalizeGoalGraphSuggestMode,
205
+ aC as normalizeOneLoopMode,
206
+ aD as normalizePlanMode,
207
+ aE as parseClaudeCliOutput,
208
+ aG as pickTemplateForTask,
209
+ aH as planCompletionPct,
210
+ aI as resolveAskMode,
211
+ aJ as resolveConfig,
212
+ aK as resolveGoalGraphMode,
213
+ aL as resolveGoalGraphSuggestMode,
214
+ aM as resolveInWorkspace,
215
+ aN as resolveOneLoopMode,
216
+ aO as resolvePlanMode,
217
+ aP as savePlan,
218
+ aR as stagePendingAction,
219
+ aS as stagedActionInput,
220
+ aU as stripMcpToolPrefix,
221
+ aV as summarizeToolStep,
222
+ aW as testApiKey,
223
+ aX as updatePlanFromRun,
209
224
  validateAskResponse,
210
- aI as validateConfig
225
+ aY as validateConfig
211
226
  };
212
227
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,31 @@
1
+ /**
2
+ * R1 (mid-task steering) of plans/hierarchical_goal_tree_and_steering_plan.html — a message sent
3
+ * while a turn is already running is absorbed here instead of waiting for the CLI's
4
+ * `dispatchQueue` or chat-ui's disabled composer to free up (see Figure 1 of that plan). One
5
+ * instance per session, mirroring `OneShotAnswerChannel`'s per-session lifetime
6
+ * (ask-clarification-service.ts) but with a different shape: that channel resumes a *paused* run
7
+ * with exactly one answer, this one accumulates zero or more raw steering messages while a turn
8
+ * keeps running and hands them all back at once.
9
+ *
10
+ * Phase 3 only builds the queue and the producer-side routing (cli.ts's line-handler split,
11
+ * chat-ui's composer un-disabling) — `poll()` has no consumer yet. Phase 4 wires it into
12
+ * `checkCallerUpdates` via the Scope×Urgency classifier at the harness's own iteration boundary
13
+ * (`UpdateChannel.poll()` in check-caller-updates.ts), turning each drained message into a real
14
+ * `CallerUpdate`. This class is deliberately unaware of `GoalGraphRecord`/`GoalThread` — same
15
+ * "standalone, unused until the wiring phase" discipline `goal-identity-matcher.ts` (Phase 2)
16
+ * already used.
17
+ */
18
+ export interface SteeringEvent {
19
+ message: string;
20
+ enqueuedAt: number;
21
+ }
22
+ export declare class LiveSteeringChannel {
23
+ private queue;
24
+ enqueue(message: string): void;
25
+ /**
26
+ * Drains every event queued since the last poll, oldest first (FIFO) — never partial, never
27
+ * re-delivered: a second call with nothing newly enqueued returns an empty array.
28
+ */
29
+ poll(): SteeringEvent[];
30
+ get pendingCount(): number;
31
+ }
@@ -75,6 +75,16 @@ export interface RecordFactsResult {
75
75
  contradictions: ExternalContradictionInput[];
76
76
  corroborations: Corroboration[];
77
77
  }
78
+ /**
79
+ * `AUDIT_MODEL_INFERRED_FACTS` gate — feature-value audit (Phase C3 of the internal plan).
80
+ * Default **ON**: `classifyTurnIntent`'s `statesDurableFacts` (source `model_inferred`) reach
81
+ * memory today, so an unset / empty / truthy value keeps that behaviour. Set to a falsy value
82
+ * (`0` / `false` / `off` / `no` / `disabled`) to drop them, leaving only the lexical
83
+ * `user_asserted` pass. Gates the *consumption* of the classifier's facts, not the classifier call
84
+ * (which also produces the intent/risk fields every arm needs). Read at exactly one call site —
85
+ * `buildTurnFacts()` below. Same shape as `semanticContradictionEnabled()` (contradiction-checker.ts).
86
+ */
87
+ export declare function modelInferredFactsEnabled(env?: Record<string, string | undefined>): boolean;
78
88
  /**
79
89
  * The exact lexical+LLM merge `recordFacts()` uses to decide what to write to the fact stores,
80
90
  * exposed (Phase 4 of the internal plan) so a
@@ -0,0 +1,52 @@
1
+ import { ILLMClient, TokenUsage } from '@buildaharness/runtime';
2
+ import { GoalThread } from './goal-graph-store.js';
3
+ import { GoalGraphSuggestMode } from './goal-graph-suggest-flag.js';
4
+ export type SuggestionConfidence = 'high' | 'medium' | 'low';
5
+ /** Mirrors `shouldAutoPromote()`'s three-way policy *shape* (memory-service.ts) — not its bands, since Q10 found no numeric threshold to reuse: `high` auto-promotes, `medium` queues for explicit confirmation, `low` stays advisory-only and is never persisted past the turn that produced it. */
6
+ export type SuggestionPromotion = 'auto' | 'pending_confirm' | 'session_only';
7
+ export interface NextStepSuggestion {
8
+ /** A concrete, actionable next step description — third person, e.g. "add tests for the login page". */
9
+ description: string;
10
+ confidence: SuggestionConfidence;
11
+ /** Why this follows from the completed goal — surfaced to the user alongside the suggestion, same spirit as StatedFact's rationale-free text but here always populated since a suggestion needs justification a stated fact doesn't. */
12
+ rationale: string;
13
+ }
14
+ /**
15
+ * A persistent advisory node (R7) — `proposeNextSteps()`'s per-suggestion output, carrying the
16
+ * promotion decision alongside the LLM's own judgment. Self-contained rather than a
17
+ * `GoalTaskRecord`: a suggestion isn't yet a task on any thread (it may never be promoted at all,
18
+ * see `session_only`), so it deliberately doesn't reuse that shape.
19
+ */
20
+ export interface SuggestedNextStepNode {
21
+ id: string;
22
+ goalThreadId: string;
23
+ description: string;
24
+ rationale: string;
25
+ confidence: SuggestionConfidence;
26
+ promotion: SuggestionPromotion;
27
+ createdAt: string;
28
+ }
29
+ /** Q10's three-way policy shape, applied to this mechanism's own confidence rubric — see this module's doc comment on why the bands aren't reused from `shouldAutoPromote()`. */
30
+ export declare function classifySuggestionPromotion(confidence: SuggestionConfidence): SuggestionPromotion;
31
+ /**
32
+ * Tier 1.5's entry point (R7): proposes next-step nodes for `thread`, gated by
33
+ * `goalGraphSuggestMode` independently of `goalGraphMode` (Q8) — returns `[]` without any LLM call
34
+ * both when the flag is off (INV-43: a flag-off session sees zero behavior change) and when
35
+ * `thread` hasn't actually reached `DONE` yet, since a suggestion only makes sense once the goal
36
+ * it follows from is finished.
37
+ */
38
+ export declare function proposeNextSteps(thread: GoalThread, llmClient: ILLMClient, suggestMode: GoalGraphSuggestMode, model?: string, onUsage?: (usage: TokenUsage) => void): Promise<SuggestedNextStepNode[]>;
39
+ /**
40
+ * The turn-end entry point: after a full (non-trivial) turn completes, propose up to three
41
+ * concrete next steps for the user to pick from — shown under the reply, like Claude Code's prompt
42
+ * suggestions. Same bounded call and confidence rubric as `proposeNextSteps` (the turn's request
43
+ * stands in for the thread's success criteria, the reply for its rationale), gated by
44
+ * `goalGraphSuggestMode`. Returns `[]` without any LLM call when the mode isn't 'enabled' or there
45
+ * is nothing to follow up on. Ordered most-confident first and capped at three; unlike thread
46
+ * suggestions nothing here is persisted — a turn-end option is advisory for the turn that produced
47
+ * it, so every confidence tier (including `low`, `session_only` in the thread policy) is shown.
48
+ */
49
+ export declare function proposeTurnNextSteps(turn: {
50
+ userMessage: string;
51
+ reply: string;
52
+ }, llmClient: ILLMClient, suggestMode: GoalGraphSuggestMode, model?: string, onUsage?: (usage: TokenUsage) => void): Promise<NextStepSuggestion[]>;
@@ -58,5 +58,5 @@ export declare class PlanApprovalService {
58
58
  * or a throwing edit/activation step, leaves `mode: 'awaiting_approval'` untouched and returns a
59
59
  * new `needs_plan_approval` result rather than silently advancing or discarding the plan.
60
60
  */
61
- resolvePendingPlanApproval(sessionId: string, planApprovalId: string, decision: PlanDecision | undefined, edits: PlanApprovalEdits | undefined): Promise<PlanApprovalOutcome>;
61
+ resolvePendingPlanApproval(sessionId: string, planApprovalId: string, decision: PlanDecision | undefined, edits: PlanApprovalEdits | undefined, threadId?: string): Promise<PlanApprovalOutcome>;
62
62
  }
@@ -79,7 +79,7 @@ export declare class PlanDraftingService {
79
79
  * rather than silently proceeding or discarding the batch.
80
80
  */
81
81
  resolvePendingAsk(sessionId: string, transcriptKey: string, pendingAskId: string, response: AskResponse | undefined, onUsage: (usage: TokenUsage) => void): Promise<AssistantTurnResult>;
82
- draftTurn(sessionId: string, transcriptKey: string, userMessage: string, onUsage: (usage: TokenUsage) => void, seed?: PlanDraftSeed): Promise<PlanDraftOutcome>;
82
+ draftTurn(sessionId: string, transcriptKey: string, userMessage: string, onUsage: (usage: TokenUsage) => void, seed?: PlanDraftSeed, threadId?: string): Promise<PlanDraftOutcome>;
83
83
  private stillAwaitingApproval;
84
84
  /** Stages a single nested question (P8) and returns the `needs_clarification` result — mirrors AskClarificationService.stageAndRespond's "append the user's message, return no reply yet" shape, but into `plan-ask-pending:` instead of `ask-pending:`, and resolved by `resolvePendingAsk` above instead of a harness resume. */
85
85
  private stageNestedAsk;