/** * Loads the mcoda agent inventory that {@link resolveCodaliGatewayAgentTiers} * resolves roles against. * * Loaded **once** and cached for the process lifetime. Shelling out to * `mcoda agent list` costs hundreds of milliseconds and the inventory does not * change mid-request, so doing it per query would put a subprocess spawn on the * critical path of every question asked. */ export interface AgentInventoryEntry extends Record { id?: string; slug?: string; adapter?: string; defaultModel?: string; model?: string; contextWindow?: number; maxOutputTokens?: number; supportsTools?: boolean; capabilities?: string[]; rating?: number; reasoningRating?: number; costPerMillion?: number; maxComplexity?: number; health?: { status?: string; }; } export interface AgentInventoryLoadOptions { command?: string; timeoutMs?: number; /** Include agents whose health is unknown. Unhealthy is always excluded. */ includeUnknownHealth?: boolean; /** Injected in tests. */ runCommand?: (command: string, args: string[], timeoutMs: number) => Promise<{ code: number; stdout: string; stderr: string; }>; } export interface AgentInventoryLoadResult { agents: AgentInventoryEntry[]; warnings: string[]; source: "mcoda" | "empty"; } export declare const loadAgentInventory: (options?: AgentInventoryLoadOptions) => Promise; export declare const isLocallyDrivable: (agent: AgentInventoryEntry) => boolean; /** Narrows an inventory to agents the in-process CLI can actually call. */ export declare const filterLocallyDrivable: (agents: readonly AgentInventoryEntry[]) => AgentInventoryEntry[]; /** * Process-lifetime cached inventory. Call once at startup; every later caller * gets the same promise rather than spawning another subprocess. */ export declare const getAgentInventory: (options?: AgentInventoryLoadOptions) => Promise; /** Test-only: drops the cache so a fresh load can be exercised. */ export declare const resetAgentInventoryCache: () => void; //# sourceMappingURL=AgentInventory.d.ts.map