/** * CouncilBrainArbiter — a multi-LLM decision panel for high-stakes questions. * * A thin adapter over CouncilOrchestrator. Each CouncilVoter becomes a seat * with its OWN Provider via per-seat CouncilLLMCaller, so multi-provider * panels work correctly (no voters[0] collapsing). * * Decision lenses (personas): * - executor — biased toward forward progress; hates stalling. * - skeptic — hunts for the reason the proposed action is wrong; may veto. * - auditor — cost/waste/budget lens; hates throwing tokens at dead ends. * - security — examines trust boundaries, abuse cases, security impact. * - maintainer — evaluates complexity, compatibility, long-term ownership. * - user-advocate — evaluates from the affected user's perspective. * * @module council-brain */ import type { BrainArbiter, BrainDecisionRequest } from '../coordination/brain.js'; import type { EventBus } from '../kernel/events.js'; import type { Provider } from '../types/provider.js'; /** * Refusal option id used by the Brain adapter. Re-exported from the * orchestrator so both layers share a single source of truth. */ export { COUNCIL_REFUSAL_OPTION_ID as COUNCIL_REFUSE_OPTION_ID } from './council-orchestrator.js'; /** One voting seat on the council. */ export interface CouncilVoter { /** Provider instance this voter uses. */ provider: Provider; /** Model id this voter uses. */ model: string; /** * Decision lens. Built-ins: 'executor', 'skeptic', 'auditor'. Any other * string is injected verbatim as the persona description. */ persona?: string | undefined; /** Vote weight. Default 1. */ weight?: number | undefined; /** A refusal from this seat immediately denies the proposal. */ veto?: boolean | undefined; /** Display label for status/logs. Defaults to model. */ label?: string | undefined; } export interface CouncilBrainOptions { voters: CouncilVoter[]; /** Tie-breaker / synthesizer. Default: none (ties call for human). */ judge?: CouncilVoter | undefined; /** Fraction of voters that must vote. Default 0.5. */ quorumFraction?: number | undefined; /** Winning option weight must exceed this fraction. Default 0.5. */ approvalFraction?: number | undefined; /** Per-voter completion timeout in ms. Default 15 000. */ decisionTimeoutMs?: number | undefined; /** Seats polled concurrently, 1..8. Default 3 (the orchestrator's default). */ maxConcurrency?: number | undefined; /** Panel-diversity warning policy. Default 'none'. */ distinctness?: 'none' | 'model' | 'provider' | undefined; /** Output budget for the judge call. */ judgeMaxTokens?: number | undefined; /** Optional digest of past decisions for context. */ getDecisionDigest?: ((request: BrainDecisionRequest) => string | undefined) | undefined; /** * Bus for per-seat vote and resolution trace events. Optional: the council * decides identically without it, but nothing downstream can reconstruct * HOW a panel reached its verdict. */ events?: EventBus | undefined; /** * Include vote rationales / stances / reasons in the emitted trace events. * Off by default — this is production decision content. */ traceContent?: boolean | undefined; } /** * Create a council-of-LLMs Brain arbiter backed by CouncilOrchestrator * with per-seat LLM callers — each voter's own Provider is used for its * seat, avoiding the single-provider collapsing bug. */ export declare function createCouncilBrainArbiter(opts: CouncilBrainOptions): BrainArbiter; //# sourceMappingURL=council-brain.d.ts.map