/** * Pure governance decision logic. * This module contains the PHI/TAU matrix and merging rules. * It has no side effects and does not call any MCPs. * * This is the shared "pure logic" that both the Governance MCP * and any HTTP deployment (Vercel) can use. */ import type { GovernanceVote, GovernanceResult } from './governance-types.js'; export interface DecisionMatrixInput { resonance: number; /** Present only when a real moralFusion number was supplied. Absent is not 0.5. */ isotopicRatio?: number; vortexVolume?: number; historicalCoherence?: number; solarActivity?: 'quiet' | 'moderate' | 'active' | 'storm'; moralTension?: 'Aligned' | 'Mild' | 'Significant' | 'Critical'; moralScore?: number; moralFusion?: number; } export interface DecisionMatrixOutput { recommendation: 'PASS' | 'NEEDS_REVISION' | 'REJECT'; confidence: number; voteWeight: number; reasons: string[]; moralOverride?: 'rejected_critical' | 'downgraded_significant' | 'none'; } export declare const MORAL_OVERRIDE_LEVELS: { Critical: "rejected_critical"; Significant: "downgraded_significant"; Mild: "none"; Aligned: "none"; }; export type MoralOverrideThreshold = 'Critical' | 'Significant' | 'Mild' | 'Aligned' | 'disabled'; /** * The core PHI/TAU decision matrix. * Extracted so it can be shared between local MCP and deployed HTTP versions. */ export declare function applyDecisionMatrix(input: DecisionMatrixInput): DecisionMatrixOutput; /** * Simple weighted merge of votes from multiple servers + external. */ export declare function mergeVotes(votes: GovernanceVote[]): { finalDecision: GovernanceResult['finalDecision']; averageConfidence: number; reasoningSummary: string; }; export interface MetamorphosisInput { averageConfidence: number; proposalType: 'fix' | 'automate' | 'codify' | 'compliance'; historicalCoherence?: number; resonanceScore?: number; } export declare function calculateMetamorphosisScore(input: MetamorphosisInput): number;