import { T as Tool, a0 as ToolGuardrail, l as ComputePreference, $ as ToolContext, d as AgentContext, E as EADKAgent, R as RunConfig, b as RunResult, c as RunEvent, z as LiveSession, N as SessionState, B as Message, u as GuardrailContext, x as HookContext, S as SessionConfig, g as MemoryScope, K as RunHooks } from '../../types-Ks98Z0E_.js'; export { k as AgentCallbacks, A as AgentType, C as Checkpointer, m as CrewAgentConfig, a as EADKAgentConfig, n as EvalCase, o as EvalContext, p as EvalMetric, q as EvalResult, G as GraphConfig, r as GraphEdge, s as GraphNode, t as Guardrail, v as GuardrailResult, H as Handoff, w as HandoffResult, L as LLMRequest, e as LLMResponse, y as LLMToolDefinition, j as MemoryBackend, i as MemoryConfig, f as MemoryEntry, h as MemorySearchResult, D as MessageRole, M as ModelConfig, F as ResponseMeta, I as RunEventData, J as RunEventType, O as Span, P as SpanEvent, Q as SpanType, U as SteeringConfig, V as SteeringVectorInput, W as SuperinferenceConfig, X as SuperinferenceMode, Y as TokenUsage, Z as ToolCall, _ as ToolCallResult, a1 as ToolGuardrailResult, a2 as TraceExporter } from '../../types-Ks98Z0E_.js'; export { B as BaseAgent, C as CustomAgent, L as LLMAgent, a as LLMProvider, g as getProvider, r as registerProvider } from '../../agent-D4EhksZS.js'; import { z } from 'zod'; /** * EADK Tool System * * Tool definitions, helpers, and built-in tool implementations. * Combines patterns from all major ADKs with edge-native extensions. */ /** * Create a tool from a typed function with automatic schema inference. * This is the primary way to define tools — similar to Google ADK's FunctionTool. */ declare function defineTool(config: { name: string; description: string; input: TInput; output?: z.ZodSchema; needsApproval?: boolean | ((input: z.infer) => Promise); guardrails?: { input?: ToolGuardrail[]; output?: ToolGuardrail[]; }; strictMode?: boolean; computeTarget?: ComputePreference; }, handler: (input: z.infer, ctx: ToolContext) => Promise): Tool; /** * Convert a Zod schema to a JSON Schema object (for LLM tool definitions). */ declare function zodToJsonSchema(schema: z.ZodSchema): Record; /** * Convert tools to LLM tool definitions for API calls. */ declare function toolsToLLMDefinitions(tools: Tool[]): Array<{ name: string; description: string; parameters: Record; }>; /** * Execute a tool with full guardrail, validation, and approval pipeline. */ declare function executeTool(tool: Tool, input: unknown, agentCtx: AgentContext, retryCount?: number): Promise<{ result: unknown; error?: string; durationMs: number; }>; /** * Wrap an agent as a tool that can be used by other agents. * The agent is consulted and its result is returned as the tool output. */ declare function agentAsTool(agent: { run: (input: string) => Promise<{ output: string; }>; }, options?: { name?: string; description?: string; }): Tool; /** * EADK Runner * * Static entry point for executing agents with run/stream/runLive methods. * Provides a clean API for starting agent execution. */ /** * Runner provides static methods for executing agents. * This is the primary API for running agents. * * @example * ```ts * const result = await Runner.run(myAgent, "Hello, world!"); * console.log(result.output); * * for await (const event of Runner.stream(myAgent, "Tell me a joke")) { * console.log(event.type, event.data); * } * ``` */ declare class Runner { /** * Run an agent to completion and return the result. */ static run(agent: EADKAgent, input: string, config?: RunConfig): Promise; /** * Stream events from an agent as they occur. */ static stream(agent: EADKAgent, input: string, config?: RunConfig): AsyncIterable; /** * Start a live bidirectional session with an agent. * Supports real-time message exchange and optional audio streaming. */ static runLive(agent: EADKAgent, config?: RunConfig): LiveSession; } /** * EADK Context * * Provides runtime context objects for agents, tools, guardrails, and hooks. */ /** * Create a new root agent context. */ declare function createAgentContext(options: { agentName: string; session?: SessionState; computePreference?: ComputePreference; messages?: Message[]; abortSignal?: AbortSignal; metadata?: Record; parent?: AgentContext; }): AgentContext; /** * Create a child context for sub-agent delegation. */ declare function createChildContext(parent: AgentContext, childAgentName: string, overrides?: Partial): AgentContext; /** * Create a tool execution context from an agent context. */ declare function createToolContext(agentCtx: AgentContext, toolName: string, retryCount?: number): ToolContext; /** * Create a guardrail evaluation context. */ declare function createGuardrailContext(agentCtx: AgentContext, guardrailName: string, phase: 'input' | 'output'): GuardrailContext; /** * Create a hook execution context. */ declare function createHookContext(agentCtx: AgentContext, spanId?: string): HookContext; /** * EADK Session * * Session state management with scoped key-value storage. * Implements Google ADK's state scoping pattern (app/user/session/temp). */ /** * In-memory session state with scope-based key namespacing. */ declare class Session implements SessionState { readonly id: string; private state; private createdAt; private readonly timeoutMs?; constructor(config?: SessionConfig); private scopedKey; get(key: string, scope?: MemoryScope): unknown; set(key: string, value: unknown, scope?: MemoryScope): void; delete(key: string, scope?: MemoryScope): void; getAll(scope?: MemoryScope): Record; clear(scope?: MemoryScope): void; /** * Check if session has expired. */ isExpired(): boolean; /** * Create a snapshot of the current state for checkpointing. */ snapshot(): Record; /** * Restore state from a checkpoint snapshot. */ restore(snapshot: Record): void; /** * Fork the session (creates a copy for exploring different paths). */ fork(newId?: string): Session; } /** * EADK Lifecycle Hooks * * Hook system for intercepting and modifying agent execution at key points. * Combines patterns from OpenAI Agents SDK, Google ADK, and Claude Agent SDK. */ /** * Merge multiple hook sets into a single composite hook set. * When multiple hooks exist for the same event, they run sequentially. * Transform hooks (onLLMStart, onLLMEnd, onToolStart, onToolEnd) chain their results. */ declare function mergeHooks(...hookSets: (RunHooks | undefined)[]): RunHooks; /** * Create a no-op hook context for testing. */ declare function createNoOpHooks(): RunHooks; export { AgentContext, ComputePreference, EADKAgent, GuardrailContext, HookContext, LiveSession, MemoryScope, Message, RunConfig, RunEvent, RunHooks, RunResult, Runner, Session, SessionConfig, SessionState, Tool, ToolContext, ToolGuardrail, agentAsTool, createAgentContext, createChildContext, createGuardrailContext, createHookContext, createNoOpHooks, createToolContext, defineTool, executeTool, mergeHooks, toolsToLLMDefinitions, zodToJsonSchema };