import { t as ActionContext } from "./context-Ewez0LPe.js"; //#region src/agent.d.ts type JsonSchema = { type: "object"; properties: Record; required?: readonly string[]; }; type JsonPrimitive = T extends "string" ? string : T extends "number" | "integer" ? number : T extends "boolean" ? boolean : T extends "array" ? unknown[] : T extends "object" ? Record : unknown; type RequiredName = S["required"] extends readonly string[] ? S["required"][number] : never; type InferInput = { [K in keyof S["properties"] as K extends RequiredName ? K : never]: JsonPrimitive; } & { [K in keyof S["properties"] as K extends RequiredName ? never : K]?: JsonPrimitive; }; declare function validateInput(schema: JsonSchema, input: unknown): string | null; type ToolAnnotations = { title?: string; readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; }; type ActionDefinition = { id: string; description: string; input: JsonSchema; run: (input: I, ctx: ActionContext) => O | Promise; annotations?: ToolAnnotations; requiresPrincipal?: boolean; mode?: "local" | "remote"; }; type AnyAction = ActionDefinition; declare const ACTION_REGISTRY: Map; type ServerReferenceRegistrar = (fn: (...args: unknown[]) => unknown, id: string) => unknown; declare function setServerReferenceRegistrar(fn: ServerReferenceRegistrar): void; declare function defineAction(def: { id: string; description: string; input: S; run: (input: InferInput, ctx: ActionContext) => O | Promise; annotations?: ToolAnnotations; requiresPrincipal?: boolean; mode?: "local" | "remote"; }): ActionDefinition, O>; type ActionDispatchErrorCode = "unknown_action" | "unauthorized" | "invalid_input"; declare function actionDispatchCode(error: unknown): ActionDispatchErrorCode | undefined; declare function invokeAction(id: string, input: unknown, ctx?: ActionContext): Promise; //#endregion export { InferInput as a, actionDispatchCode as c, setServerReferenceRegistrar as d, validateInput as f, AnyAction as i, defineAction as l, ActionDefinition as n, JsonSchema as o, ActionDispatchErrorCode as r, ToolAnnotations as s, ACTION_REGISTRY as t, invokeAction as u };