import type { CouncilLLMCaller, CouncilQuestion, CouncilResult } from '../types/council.js'; import { type CouncilPersonaRegistry } from './council-personas.js'; import { type CouncilProfileRegistry } from './council-profiles.js'; import type { FallbackProfileManager } from '../core/fallback-profile-manager.js'; import type { Config } from '../types/config.js'; /** Synthetic ballot entry for "refuse every real option". */ export declare const COUNCIL_REFUSAL_OPTION_ID = "council_refuse"; export declare const DEFAULT_COUNCIL_MAX_CONCURRENCY = 3; export declare const MAX_COUNCIL_CONCURRENCY = 8; export interface CouncilOrchestratorOptions { /** * Shared LLM caller used for every seat and the judge when no per-seat * caller is configured. Optional — supply `seatCaller` (per-seat callers) * and/or `judgeCaller` (separate judge caller) to route votes to different * providers. At least one of `caller`, `seatCaller`, or `judgeCaller` * must be provided; the constructor throws otherwise. */ caller?: CouncilLLMCaller | undefined; personas?: CouncilPersonaRegistry | undefined; profiles?: CouncilProfileRegistry | undefined; defaultProfile?: string | undefined; maxConcurrency?: number | undefined; refusalOptionId?: string | undefined; /** Live config accessor for fallback profile resolution. */ getConfig?: (() => Config) | undefined; /** * Shared live FallbackProfileManager — required for reliable fallback * profile pre-resolution. Pass the runtime container's manager. */ fallbackProfileManager?: FallbackProfileManager | undefined; /** * Per-seat LLM caller factory. When set, each seat gets its own caller * instead of the shared `caller`. The factory receives (seatIndex) and * returns a CouncilLLMCaller. Used by Brain council arbitration where * each voter has its own Provider instance. */ seatCaller?: ((seatIndex: number) => CouncilLLMCaller) | undefined; /** * Separate caller for the judge seat. Required when `seatCaller` is set * because the judge uses the shared caller path. When absent and * `seatCaller` is set, the judge falls back to `seatCaller(0)`. */ judgeCaller?: CouncilLLMCaller | undefined; } /** Provider-neutral Council runner backed by an injected one-shot LLM caller. */ export declare class CouncilOrchestrator { private readonly caller; private readonly personas; private readonly profiles; private readonly defaultProfile; private readonly maxConcurrency; private readonly refusalOptionId; private readonly fallbackProfileManager; private readonly seatCaller; private readonly judgeCaller; constructor(opts: CouncilOrchestratorOptions); ask(question: CouncilQuestion): Promise; private callSeat; private resolveOptionQuestion; private resolveOpenQuestion; private callJudge; /** * Resolve the effective LLM caller for a call. Voter seats use * `seatCaller(seatIndex)` when wired. Judge seats (seatIndex undefined) * use `judgeCaller` if set, otherwise `seatCaller(0)` if set, otherwise * the shared `caller`. */ private resolveCaller; private safeCall; /** * Resolve a CouncilModelTarget: pre-resolve fallbackProfile to fallbackModels * so the downstream caller only sees the resolved chain. */ private resolveCouncilTarget; } //# sourceMappingURL=council-orchestrator.d.ts.map