/** * ThreadWeaver — Dynamic Weighting * Computes final weights from self-confidence, cross-agreement, and domain relevance. */ import type { AgentOutput, AgentWeight, Critique, AgentRole } from "./types"; /** * Extract self-reported confidence from agent output. * Looks for "Confidence: X/10" pattern at end of content. * Returns 0.0-1.0 (normalized from 0-10 scale). * Default: 0.5 if not found. */ export declare function extractConfidence(content: string): number; /** * Parse critique blocks from an agent's round-2 output. * * Expected format: * ## Re: [agent-id] * Agreement: 1 (or 0, -1) * Issues: ... * Strengths: ... */ export declare function parseCritiques(criticId: string, content: string): Critique[]; /** * Compute cross-agreement score for an agent. * Average of all agreement values from other agents, normalized to 0-1. * agreement: -1 → 0.0, 0 → 0.5, 1 → 1.0 */ export declare function computeCrossAgreement(agentId: string, allCritiques: Critique[]): number; /** * Compute dynamic weights for all agents after all rounds. * * Formula: * raw_weight = (selfConfidence * 0.25) + (crossAgreement * 0.45) + (domainRelevance * 0.30) * final_weight = raw_weight / sum(all_raw_weights) */ export declare function computeDynamicWeights(outputs: AgentOutput[], allCritiques: Critique[], activatedRoles: AgentRole[], query: string): AgentWeight[];