import { type Message, type UserMessage } from '../../../types/message/index.js'; import type { ToolChoice } from '../../../types/provider/chat.js'; import type { PrepareStepContext, PrepareStepResult, StepResult, StepVeto } from '../../../types/session/index.js'; import type { Skill } from '../../../types/skills/index.js'; import type { IterationContext } from './phases/index.js'; import { stepContextMessage } from './step-context.js'; /** * How the next request is shaped: admission, preparation, and the context * budget handed to both. * * Three of these read state the loop replaces or grows as it runs, so they * arrive as accessors rather than as values — `latestUserMessage` is replaced * on every operator turn and `steps` gains a member per step, and a captured * copy of either would describe an earlier return. `ctx` is the turn's own * context object, passed through rather than re-derived, because * `selectContextModel` WRITES two of its fields (`contextModel` and * `activeProviderContextWindow`) for the compaction pass to read. */ export interface StepShaping { readonly ctx: IterationContext; readonly latestUserMessage: () => UserMessage | undefined; readonly steps: () => readonly StepResult[]; } export { stepContextMessage }; /** Derived after request projection; never accumulates in canonical history or replaces operator intent. */ export declare function appendWorkContext(shaping: StepShaping, messages: Message[], stepNumber: number, prepared: PrepareStepResult): void; export declare function stepContext(shaping: StepShaping, stepNumber: number, prepared: PrepareStepResult): PrepareStepContext; /** Refuse the next call on a veto or hook error; do not skip a failed admission check. */ export declare function beforeStep(shaping: StepShaping, stepNumber: number): Promise; /** Shape the next request. A failed tuning stage is skipped; admission belongs to beforeStep. */ export declare function prepareStep(shaping: StepShaping, stepNumber: number): Promise<{ allowedTools?: string[]; toolChoice?: ToolChoice; model?: string; system?: string; context?: string; skills?: readonly Skill[]; temperature?: number; maxResponseTokens?: number; }>; export declare function selectContextModel(shaping: StepShaping, model: string | undefined): Promise; //# sourceMappingURL=step-shaping.d.ts.map