/** The Mediator's four intent buckets, slugs for the prose in * skills/the-mediator/SKILL.md "Classifying Intent". An intent outside this * set is bucket 1 by definition — a prompt that fits none of the four is * under-specified, not a fifth kind. */ export declare const ROUTING_INTENTS: readonly ["ambiguous", "capacity-sensitive", "entry-violation", "clear-specialist"]; export type RoutingIntent = (typeof ROUTING_INTENTS)[number]; /** Below this the Mediator must run Parallel Evaluation or escalate to The * Strategist before routing. Kept here so the threshold lives in one place — * SKILL.md, the Steward's own cascade, and this validator cannot drift. */ export declare const PARALLEL_EVALUATION_THRESHOLD = 70; export type ParallelEvaluation = { asked: string[]; responses: Array<{ member: string; agrees: boolean; classification: RoutingIntent; }>; outcome: 'consensus' | 'disagreement' | 'split'; }; /** One routing decision, exactly as members write it to * `.agenthood/routing/.json`. Deliberately not a DecisionLogEntry: that * type carries `task`/`decision`/`rationale`/`outcome`/`tags` free-text, and * DecisionLog.loadCache() casts every .json in its own directory to that * shape — matchEntry() then dereferences entry.tags unguarded. A second record * kind in that directory crashes search(). Separate home, separate shape. * * Field names are snake_case because this is the on-disk contract members * hand-write, not a TS-internal shape. */ export type RoutingDecision = { id: string; timestamp: string; member: string; intent: RoutingIntent; confidence: number; confidence_factors: string[]; target: string; reasoning: string; alternatives_considered: string[]; cascade_applied: boolean; parallel_evaluation: ParallelEvaluation | null; }; /** * Enforces what the member docs promise: intent is one of the four buckets, * confidence is 0-100, target is a registered member, and a sub-threshold * score actually triggered the cascade. Returns one message per violation, so * a member can fix every problem in one pass. Unknown extra keys are ignored — * the docs forbid free-text beyond `reasoning`, but an extra key is noise, not * a routing error, and dropping records over it would lose the audit trail. */ export declare function validateRoutingDecision(raw: unknown, knownMembers: readonly string[]): string[]; /** * Persists one routing decision to `routingDir/.json`, refusing to write * records that would fail `agenthood verify`. Fail-closed: a violating record * throws with every violation listed instead of corrupting the audit trail. * Returns the written file path. */ export declare function writeRoutingDecision(routingDir: string, decision: RoutingDecision, knownMembers: readonly string[]): string; export type RoutingAudit = { file: string; errors: string[]; }; /** Reads and validates every routing record in `routingDir`. A missing * directory is not an error — a Society that has not routed anything yet is * in the correct state, and CI has no .agenthood at all. */ export declare function auditRoutingRecords(routingDir: string, knownMembers: readonly string[]): RoutingAudit[]; //# sourceMappingURL=routing.d.ts.map