import type { Plugin } from '../types/plugin.js'; import type { ResolvedChimeraConfig, ReviewContextBundle } from './review-types.js'; export type { ResolvedChimeraConfig, ReviewContextBundle, ReviewFileEntry } from './review-types.js'; interface ChimeraConfig { enabled?: boolean | undefined; provider?: string | undefined; model?: string | undefined; maxFiles?: number | undefined; /** * How to handle chimera review findings: * - `off` (default): Send result to mailbox; leader waits for user command. * - `ask`: Send ask to mailbox; leader prompts user for permission. * - `auto`: Spawn a fix subagent automatically with the review report. */ autoFix?: 'off' | 'ask' | 'auto' | undefined; /** * Cascade severity threshold for follow-up agents. When the post-session * review finds findings at or above this level, security-scanner and/or * bug-hunter agents are spawned to investigate and fix. Mirrors the * auto-review plugin's cascadeOn. Default: "off" (no cascade). */ cascadeOn?: 'off' | 'critical' | 'high' | undefined; /** * Maximum cascade fix→re-review cycles before the self-correcting loop * stops. Default: 2. 0 disables re-review (fix agents run once, no * re-check). Mirrors the auto-review plugin's maxCascadeDepth. */ maxCascadeDepth?: number | undefined; /** * @deprecated Removed. The subagent's `Request.maxTokens` now defaults to * the provider's `capabilities.maxOutput`, so Chimera reports can run up * to the selected model's native ceiling. Kept on the config interface as an `unknown` sink * so old config files don't crash — but it's no longer read. */ maxTokens?: unknown; } export declare function resolveChimeraConfig(cfg: ChimeraConfig, sessionProvider: string, sessionModel: string): ResolvedChimeraConfig; /** Legacy alias — the payload type is the bundle type. */ export type ChimeraReviewNeededPayload = ReviewContextBundle; /** * Payload emitted as `chimera.review_complete` after the review subagent * finishes (success or failure). Consumed by the auto-review plugin's * cascade listener to parse severity and decide whether to emit * `chimera.cascade_needed`. */ export interface ChimeraReviewCompletePayload { /** The original review context bundle that triggered this review. */ bundle: ReviewContextBundle; /** The review report text the subagent produced (empty on failure). */ reviewText: string; /** Whether the subagent succeeded (`'success'`) or failed otherwise. */ status: string; /** Project root. */ cwd: string; } /** * Payload emitted as `chimera.cascade_needed` when a review report * contains findings at or above the configured `cascadeOn` threshold. * Consumed by execution.ts to spawn follow-up investigation agents. */ export interface ChimeraCascadeNeededPayload { /** The original review context bundle (carries cwd + files). */ bundle: ReviewContextBundle; /** The review report text that triggered the cascade. */ reviewText: string; /** The parsed severity counts that crossed the threshold. */ severities: { critical: number; high: number; medium: number; }; /** The threshold that was crossed (`'high'` or `'critical'`). */ threshold: 'high' | 'critical'; /** Follow-up agent roles to spawn, derived from the finding types. */ agents: CascadeAgentKind[]; } /** * Follow-up cascade agent kinds. Each maps to a roster role and a * tailored task description. Multiple may be spawned in parallel when * a review surfaces both security and correctness concerns. */ export type CascadeAgentKind = 'security-scanner' | 'bug-hunter'; export declare const CHIMERA_REVIEW_PROMPT: string; export declare function createChimeraPlugin(): Plugin; //# sourceMappingURL=chimera-plugin.d.ts.map