import { type StepCatalog } from "#execution/catalog/step-catalog.js"; import type { GenerationSteering } from "#harness/generation-steering.js"; import { type HarnessModelMessage } from "#harness/messages.js"; import { type ApprovedWork } from "#harness/hitl/index.js"; import { type Step } from "#harness/step/context.js"; import type { TurnInput } from "#harness/step/intake.js"; import type { HarnessStepResult } from "#harness/step-hooks.js"; import { type StepResult } from "#harness/types.js"; import type { InstrumentationAttempt } from "#instrumentation/runtime.js"; import { type EndsTurnTools } from "./tools.js"; /** A model step's response, for the session to act on. */ export interface ModelResponse { /** The step's catalog, which decides what each of the response's calls runs. */ readonly catalog: StepCatalog; /** How many prompt messages the model read, when no client context was spliced in. */ readonly durableModelPromptMessageCount?: number; /** Tools that can end the turn in this step, with their `endsTurn` option. */ readonly endsTurnTools: EndsTurnTools; readonly promptMessages: readonly HarnessModelMessage[]; readonly requestEnvelopeTokens?: number; readonly result: HarnessStepResult; } /** * One model step of the open turn: the prompt it reads, the model that serves it, and the call * with its retries and recoveries. `onResponse` decides what the session does with the response. * * Approved work runs where the AI SDK ran it, between the step's start and the model call: * approved workflow calls join their runs, the budget gate passes, then approved local calls run * and the model reads their results. */ export declare function runModelStep(step: Step, input: { readonly onResponse: (response: ModelResponse) => Promise; readonly turn: TurnInput; readonly approved: ApprovedWork; readonly generation: GenerationSteering; /** A child's caller and a schedule hear only the turn's real end. */ readonly hidesHeldText: boolean; /** The attempt the step's events belong to, for instrumentation. */ readonly setAttemptScope: (scope: InstrumentationAttempt | undefined) => void; }): Promise;