import { c as Address } from "../../abi-Bjd7pZee.mjs"; import { r as Hex } from "../../misc-BASHpEmW.mjs"; //#region extensions/crypto/src/services/agent-pool.d.ts interface SubAgentDef { /** Unique ID. Presets use 'preset_'. */ id: string; /** Agent name (snake_case, unique). */ name: string; /** Human-readable label. */ label: string; /** What this agent specializes in (shown to the main LLM). */ description: string; /** System prompt sent to the sub-agent LLM. */ systemPrompt: string; /** Which tools this agent can call. Empty = no tool access (reasoning only). */ allowedTools: string[]; /** Model shortcut or full ID. Default: 'haiku'. */ model: string; /** Max output tokens per task. Default: 4096. */ maxTokens: number; /** Temperature. Default: 0.3 (focused). */ temperature: number; /** Max tool-use loop iterations per task. Default: 10. */ maxToolCalls: number; /** Max time per task in ms. Default: 60000 (1 min). */ timeoutMs: number; /** Whether this agent is currently enabled. */ enabled: boolean; /** Whether this is a built-in preset (cannot be deleted). */ isPreset: boolean; /** Who created this agent. 'system' for presets. */ createdBy: string; /** Usage count. */ usageCount: number; createdAt: number; updatedAt: number; /** Ephemeral wallet address for sub-delegation. */ walletAddress?: Address; /** Ephemeral private key (hex). In-memory only, never serialized. */ walletPrivateKey?: Hex; /** Parent delegation hash this agent's sub-delegation chains from. */ parentDelegationHash?: Hex; } declare class AgentPool { private agents; private stateDir; constructor(opts?: { stateDir?: string; }); /** Create a new sub-agent. */ create(params: { name: string; label: string; description: string; systemPrompt: string; createdBy: string; allowedTools?: string[]; model?: string; maxTokens?: number; temperature?: number; maxToolCalls?: number; timeoutMs?: number; }): SubAgentDef; /** Update an existing agent. Cannot change name or isPreset. */ update(id: string, updates: Partial>): SubAgentDef | null; /** Delete an agent. Presets cannot be deleted (disable them instead). */ delete(id: string): boolean; get(id: string): SubAgentDef | null; getByName(name: string): SubAgentDef | null; list(opts?: { enabled?: boolean; isPreset?: boolean; }): SubAgentDef[]; getEnabledAgents(): SubAgentDef[]; recordUsage(id: string): void; /** Clear all agents (for testing). */ clear(): void; /** * Assign an ephemeral keypair to an agent for sub-delegation. * Generated in-memory, never persisted to disk. * Safe to call multiple times — skips if already assigned. */ assignEphemeralWallet(id: string): Promise<{ address: Address; privateKey: Hex; } | null>; /** * Get the ephemeral wallet for an agent (if assigned). */ getWallet(id: string): { address: Address; privateKey: Hex; } | null; private initPresets; private loadState; private saveState; } declare class AgentPoolError extends Error { constructor(message: string); } declare function getAgentPool(opts?: { stateDir?: string; }): AgentPool; declare function resetAgentPool(): void; //#endregion export { AgentPool, AgentPoolError, SubAgentDef, getAgentPool, resetAgentPool }; //# sourceMappingURL=agent-pool.d.mts.map