import { Effect, Schema } from "effect"; import { Prompt, Tool } from "effect/unstable/ai"; import { type Agent, type Result, type RunRequirements } from "./agent.js"; import { type RunBudget } from "../durable/run-budget.js"; import { type Registration } from "../policy/handoff.js"; type AgentToolRunOptions = { readonly prompt: Prompt.RawInput; readonly inheritedBudget?: RunBudget; }; declare const defaultParameters: Schema.Struct<{ readonly prompt: Schema.String; }>; type DefaultParameters = typeof defaultParameters; type DefaultSuccess = typeof Schema.String; /** @experimental */ export interface AsToolOptions { readonly name?: Name; readonly description?: string; readonly parameters?: Parameters; readonly success?: Success; readonly toPrompt?: (params: Parameters["Type"]) => Prompt.RawInput; readonly fromResult?: (result: Result) => Success["Type"]; } /** @experimental A schema-backed tool with a stable name and closed invocation. */ export type AgentToolTool = Tool.Tool; /** @experimental */ export interface AgentToolToolkit<_Name extends string, Parameters extends Schema.Top, Success extends Schema.Top, R> { readonly name: string; readonly tool: AgentToolTool; readonly tools: { readonly [name: string]: AgentToolTool; }; readonly parametersSchema: Schema.Top; readonly successSchema: Schema.Top; readonly invoke: (params: unknown) => Effect.Effect; readonly requirements: (value: R) => R; } /** @experimental */ export declare const asTool: { (options?: AsToolOptions): , R>(agent: Agent | Registration) => AgentToolToolkit>; , R, const Name extends string = string, Parameters extends Schema.Top = DefaultParameters, Success extends Schema.Top = DefaultSuccess>(agent: Agent | Registration, options?: AsToolOptions): AgentToolToolkit>; }; export {};