import { B as BaseAgent, a as LLMProvider } from '../../agent-zMxIG3gI.mjs'; import { A as AgentType, a as EADKAgentConfig, R as RunConfig, b as RunResult, L as LLMRequest, e as LLMResponse } from '../../types-Ks98Z0E_.mjs'; import 'zod'; /** * Edge Agent * * Runs entirely in browser/worker with on-device inference. * Leverages existing edgework WebGPU/WASM inference backends. * UNIQUE to EADK — no other framework has this. */ interface EdgeAgentConfig extends EADKAgentConfig { /** Local model to use (e.g., 'smollm-360m', 'phi-2') */ localModel?: string; /** Inference backend preference */ inferenceBackend?: 'webgpu' | 'wasm' | 'auto'; /** Whether to fall back to cloud if local inference fails */ fallbackToCloud?: boolean; /** Cloud model to fall back to */ cloudFallbackModel?: string; /** Max tokens for local generation */ localMaxTokens?: number; } /** * Local inference provider that wraps edgework's inference engines. * This is a bridge between the EADK agent system and the existing * WebGPU/WASM inference backends. */ declare class LocalInferenceProvider implements LLMProvider { private generateFn; constructor(generateFn: LocalInferenceProvider['generateFn']); chat(request: LLMRequest): Promise; } declare class EdgeAgent extends BaseAgent { readonly type: AgentType; private edgeConfig; constructor(config: EdgeAgentConfig); run(input: string, runConfig?: RunConfig): Promise; } /** * Peer Agent * * Distributed agent that runs across peer compute nodes. * Leverages existing edgework gateway connector and compute node infrastructure. * UNIQUE to EADK — no other framework has this. */ interface PeerAgentConfig extends EADKAgentConfig { /** Peer discovery method */ discovery?: 'gateway' | 'mdns' | 'manual'; /** Known peer endpoints */ peers?: string[]; /** Timeout for peer communication */ peerTimeoutMs?: number; /** Number of peers to fan out to */ fanOut?: number; /** Strategy for aggregating peer results */ aggregation?: 'first' | 'majority' | 'all' | 'custom'; /** Custom aggregation function */ aggregateFn?: (results: PeerResult[]) => string; } interface PeerResult { peerId: string; output: string; latencyMs: number; success: boolean; error?: string; } declare class PeerAgent extends BaseAgent { readonly type: AgentType; private peerConfig; constructor(config: PeerAgentConfig); run(input: string, runConfig?: RunConfig): Promise; private queryPeer; private aggregateResults; } export { EdgeAgent, type EdgeAgentConfig, LocalInferenceProvider, PeerAgent, type PeerAgentConfig, type PeerResult };