import { z } from 'zod'; import type { DefinitionSchema, InferSchema } from './definition.js'; export declare const executionGuardSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"turns">; value: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"timeMs">; value: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"credits">; value: z.ZodNumber; }, z.core.$strict>], "kind">; export type ExecutionGuard = z.infer; export declare const maxTurns: (value: number) => ExecutionGuard; export declare const maxTimeMs: (value: number) => ExecutionGuard; export declare const maxCredits: (value: number) => ExecutionGuard; export interface ToolDefinition { readonly description: string; readonly inputSchema: DefinitionSchema; readonly outputSchema: DefinitionSchema; readonly execute: (input: I) => O; } /** Validate callbacks without invoking author code. Runtime also rejects returned promises. */ export declare function assertSynchronousTool(execute: unknown, field?: string): void; /** Define a typed calculation tool. Callbacks run in bounded QuickJS, without Node, network or filesystem access. */ export declare function createTool(options: { /** Model-facing explanation of when this tool is useful. */ description: string; /** Zod 4 or raw JSON object schema. Zod infers arguments; raw schemas infer unknown. */ inputSchema: I; /** Zod 4 or raw JSON object schema. Zod checks return types; both validate the returned JSON at runtime. */ outputSchema: O; /** Synchronous, JSON-compatible computation. No host APIs or asynchronous I/O. */ execute: (input: InferSchema) => InferSchema; }): ToolDefinition, InferSchema>; export interface CompiledTool { description: string; inputSchema: Record; outputSchema: Record; }