import { Effect, Schema } from "effect"; import { AiError, LanguageModel, Response, Tool, Toolkit } from "effect/unstable/ai"; import { type ToolJsonSchemaCompiler } from "./model-registry.js"; declare const InvalidToolCallParameters_base: Schema.Class; readonly outputTokens: Schema.optionalKey; readonly totalTokens: Schema.optionalKey; }>>; }>, import("effect/Cause").YieldableError>; /** @experimental A model emitted parameters that do not satisfy the named Effect tool schema. */ export declare class InvalidToolCallParameters extends InvalidToolCallParameters_base { } declare const ToolJsonSchemaCompilerMissing_base: Schema.Class, import("effect/Cause").YieldableError>; /** @experimental Tool correction was enabled for schema-backed tools, but the active model has no exact compiler. */ export declare class ToolJsonSchemaCompilerMissing extends ToolJsonSchemaCompilerMissing_base { } /** @experimental A model-facing toolkit whose parameter decoding is permissive. */ export interface ProjectedToolkit { readonly toolkit: Toolkit.Toolkit>; } /** @experimental Project a toolkit with the active provider's exact JSON Schema compiler. */ export declare const projectToolkit: { (compile: ToolJsonSchemaCompiler): (original: Toolkit.Any) => Effect.Effect; (original: Toolkit.Any, compile: ToolJsonSchemaCompiler): Effect.Effect; }; /** @experimental Decode one raw model tool call with the original Effect parameter schema. */ export declare const decodeToolCall: { (part: Response.ToolCallPart): (toolkit: Toolkit.Any) => Effect.Effect, InvalidToolCallParameters>; (toolkit: Toolkit.Any, part: Response.ToolCallPart): Effect.Effect, InvalidToolCallParameters>; }; /** @experimental Validate a middleware-produced call against the decoded side of its original schema. */ export declare const validateDecodedToolCall: { (part: Response.ToolCallPart): (toolkit: Toolkit.Any) => Effect.Effect, InvalidToolCallParameters>; (toolkit: Toolkit.Any, part: Response.ToolCallPart): Effect.Effect, InvalidToolCallParameters>; }; /** @experimental Wrap a model so Baton can validate tool calls before output escapes. */ export declare const wrap: { (original: Toolkit.Any, projected: Toolkit.Toolkit>): (model: LanguageModel.Service) => LanguageModel.Service; (model: LanguageModel.Service, original: Toolkit.Any, projected: Toolkit.Toolkit>): LanguageModel.Service; }; /** @experimental Prepare correction validation for the active direct or registered model. */ export declare const prepare: { (original: Toolkit.Any, correctionLimit: number): (model: LanguageModel.Service) => Effect.Effect; (model: LanguageModel.Service, original: Toolkit.Any, correctionLimit: number): Effect.Effect; }; /** @experimental Test whether a failure is the precise Baton-owned correction signal. */ export declare const isInvalidToolCallParameters: (input: I) => input is I & InvalidToolCallParameters; export {};