/** * Catalog calls in the harness. Once a step's calls enter the harness, every * seam reads an `eve__tool` or `eve__skill` call as the call to the entry it * names. Model history keeps the model's own calls. */ import type { ModelMessage, TelemetryOptions, TextStreamPart, ToolSet } from "ai"; import type { HarnessToolDefinition } from "#harness/execute-tool.js"; import type { HarnessStepResult } from "#harness/step-hooks.js"; import { toolCallModelOutput } from "#harness/tool-call-io.js"; import type { CallResolver, ResolvedCall, ToolCallLike } from "#harness/types.js"; import type { ToolExecuteOptions } from "#tools/definition.js"; /** * The name each tool call has in model history, by call id. A result written * to history carries its call's name there, which is the catalog tool for a * call made through one. */ export declare function historyCallNames(messages: readonly ModelMessage[]): ReadonlyMap; /** Whether a call runs as a workflow tool or agent the harness dispatches after the step. */ export declare function dispatchesAfterStep(resolved: ResolvedCall | undefined): boolean; /** Runs a resolved catalog call, or stands in for one the harness dispatches. */ export declare function runEntryCall(resolved: ResolvedCall, options: ToolExecuteOptions): unknown; /** * The call a tool stub matches. An `eve__tool` call matches as the call to its * entry, with the entry's input, so a stub applies to it exactly as to a direct * call. A call the harness dispatches after the step has none here: its * dispatch applies the stub, as it does for a direct call. */ export declare function stubbedCall(call: ToolCallLike, resolved: ResolvedCall | undefined): ToolCallLike | undefined; /** The model output of a call's result; a stand-in's output is dropped with it. */ export declare function entryModelOutput(definition: Pick, output: unknown, toolCallId: string | undefined): ReturnType; /** * The step as the harness reads it: catalog calls become calls to * their entries and stand-in results are dropped. The response messages, which * become history, keep the model's own calls. */ export declare function toEntryStep(step: HarnessStepResult, responseMessages: readonly T[], resolve: CallResolver): readonly [HarnessStepResult, T[]]; /** * The stream as the harness reads it, as {@link toEntryStep} reads the step. * A catalog call's input stream is dropped: its entry is known only once the * input is complete. */ export declare function toEntryStream(stream: AsyncIterable>, resolve: CallResolver): AsyncIterable>; /** * Telemetry as the harness reports it. Integrations see each catalog call as * the call to its entry, and never see a stand-in run: a direct * call to the same entry never runs in the SDK. */ export declare function toEntryTelemetry(telemetry: TelemetryOptions | undefined, resolve: CallResolver): TelemetryOptions | undefined;