/** * Process-wide SubagentPool singleton. * * The subagent tool and the `/subagent` command both delegate through one pool * so concurrency limits, lifeguard monitoring, and token budgets are shared * across every delegation in the session. Created lazily on first use and torn * down on process exit. */ import type { Api, Model } from "@kolisachint/hoocode-ai"; import { SubagentPool } from "./subagent-pool.js"; /** * Get the shared pool for a given working directory, creating it on first use. * * `availableModels` (the caller's `ModelRegistry.getAvailable()`) is snapshotted * on first creation and used to derive default model-category mappings for any * tier the user has not explicitly configured. Later calls reuse the existing * pool, so pass it on the first dispatch of a session. */ export declare function getSubagentPool(cwd: string, availableModels?: readonly Model[]): SubagentPool; /** * Return the shared pool if one already exists, without creating it. Use this for * best-effort signaling (e.g. reporting external load) that must not spin up a pool * and its lifeguard just because the signal fired before any subagent was dispatched. */ export declare function peekSubagentPool(): SubagentPool | undefined; /** * Update the skill paths forwarded to every subagent. * Call this after the resource loader reloads or extends its skill set. * If the pool has already been created, updates it immediately. * If not, the paths will be passed in when the pool is first created. */ export declare function updateSubagentSkillPaths(paths: string[]): void; /** Dispose and clear the shared pool. Intended for test isolation and shutdown. */ export declare function disposeSubagentPool(): void; /** * Inject a pool instance for tests, bypassing real child-process spawning. * Pass `undefined` to clear the override. */ export declare function setSubagentPoolForTesting(testPool: SubagentPool | undefined): void; //# sourceMappingURL=subagent-pool-instance.d.ts.map