import type { CouncilMemberOutput, CouncilMemberResult, CouncilMemberSpec, CouncilSynthOutput, CouncilTaskSpec, ResolvedCouncilConfig } from "./types.js"; /** * Build a concise member prompt. Role is injected via {{COUNCIL_ROLE}}. * Members are told to wrap their JSON in sentinels so the engine can extract it * reliably from fence/banner noise (verified necessary in the Task 0 spike). * NOTE: sentinels are NOT a security boundary — a hostile --context could embed * the markers; the engine schema-validates extracted blocks to mitigate. */ export declare function buildMemberPrompt(spec: CouncilTaskSpec, member: CouncilMemberSpec): string; /** Build the low-context synthesizer prompt from surviving members. */ export declare function buildSynthPrompt(config: ResolvedCouncilConfig, spec: CouncilTaskSpec, survivors: CouncilMemberResult[]): string; /** * Enumerate top-level balanced {...} blocks in text (brace-depth scan). * Returns the raw substrings in order of appearance. */ export declare function balancedBlocks(text: string): string[]; /** * Extract candidate JSON strings from raw stdout. Sentinel-wrapped content is * preferred (primary contract); otherwise fall back to all balanced {...} blocks. */ export declare function extractJsonCandidates(stdout: string): string[]; export declare function isValidMemberOutput(value: unknown): value is CouncilMemberOutput; export declare function isValidSynthOutput(value: unknown): value is CouncilSynthOutput; /** * Parse a member's stdout into a validated CouncilMemberOutput. * Strategy: enumerate candidate blocks, JSON.parse each, return the FIRST that * passes schema validation. Tie-break = schema validity, not size/position. * Returns null when no candidate validates (caller marks "unparseable"). */ export declare function parseMemberOutput(stdout: string): CouncilMemberOutput | null; /** Parse the synthesizer's stdout into a validated CouncilSynthOutput. */ export declare function parseSynthOutput(stdout: string): CouncilSynthOutput | null;