/** * Noah — Temporal Guidance Engine (Grillo Integration Hook) * * The main entry point for the Noah temporal guidance system. * Registers as a post-assessment hook in Grillo's assessment pipeline. * * This is the "TemporalGuidanceEngine" from the implementation spec Section 3.1. * It orchestrates the full temporal pipeline: * 1. clock.update() * 2. waypoints.evaluate() * 3. flightPlan.interpolate() * 4. deviation.calculate() * 5. alert.classify() * 6. store.record() */ import { NoahInternalClock, type ClockConfig } from '../clock/internal-clock.js'; import { FlightPlanEngine } from '../flight-plan/flight-plan-engine.js'; import { DeviationCalculator } from '../deviation/deviation-calculator.js'; import { InertialMonitor, type InertialConfig } from '../waypoints/inertial-monitor.js'; import { AlertSystem, type AlertConfig } from '../alert/alert-system.js'; import { type EscalationDecision } from '../alert/commander-escalation.js'; import { TemporalDecisionMatrix } from '../go-no-go/temporal-decision-matrix.js'; import { NoahEventEmitter } from './event-emitter.js'; import type { TemporalStateStore } from '../store/types.js'; import type { TemporalState } from '../types/temporal-state.js'; import type { TemporalAssessmentRecord } from '../types/assessment-record.js'; import type { EthicalFlightPlan } from '../types/flight-plan.js'; import type { ClockUpdateEvent, TriggeredWaypoint } from '../types/events.js'; import type { DeviationResult, TemporalGoNoGoResult, GuidanceColor } from '../types/guidance.js'; export interface GrilloAssessmentResult { agentId: string; runId: string; scores: { lying: number; cheating: number; stealing: number; harm: number; }; classification: string; passed: boolean; completedAt: Date; metadata?: Record; /** * Scoring methodology version that produced `scores`. * 1 = legacy binary-derived (averaged BankAnswer.score, pre-Phase-2) * 2 = graduated personality distribution (Phase 2 onward) * * Optional for back-compat: when undefined, callers SHOULD treat the * record as version-agnostic (no methodology-shift guard applied). * * SPEC: docs/specs/SPEC-scoring-unification-graduated-personality-v1.0.md * (v1.2 — BB Q3 amendment + Section 8.9 Correction 1). */ scoringVersion?: number; } export interface TemporalGuidanceConfig { agentId: string; commanderId?: string; store: TemporalStateStore; clock?: Partial; inertial?: Partial; alert?: Partial; } export interface GuidanceProcessingResult { /** The temporal assessment record (persisted) */ record: TemporalAssessmentRecord; /** Deviation analysis */ deviation: DeviationResult; /** Commander escalation decision */ escalation: EscalationDecision; /** Waypoints triggered by this assessment */ triggeredWaypoints: TriggeredWaypoint[]; /** Whether inertial monitor recommends a fix */ inertialFixRecommended: boolean; /** Updated temporal state */ state: TemporalState; } export declare class TemporalGuidanceEngine { readonly clock: NoahInternalClock; readonly flightPlanEngine: FlightPlanEngine; readonly deviationCalculator: DeviationCalculator; readonly decisionMatrix: TemporalDecisionMatrix; readonly inertialMonitor: InertialMonitor; readonly alertSystem: AlertSystem; readonly events: NoahEventEmitter; private waypointManager; private readonly store; private readonly agentId; constructor(config: TemporalGuidanceConfig); /** * Initialize the engine with a flight plan. * Must be called before processing assessments. */ initialize(flightPlan: EthicalFlightPlan): Promise; /** * Process a Grillo assessment result through the full temporal pipeline. * This is the main hook — called after every Grillo assessment. */ processAssessment(result: GrilloAssessmentResult, now?: Date): Promise; /** * Process a non-assessment event (veto, incident, financial update, etc.). */ processEvent(event: ClockUpdateEvent, now?: Date): Promise; /** * Get a Go/No-Go decision with temporal context. */ getGoNoGoDecision(assessmentPassed: boolean, guidanceStatus: GuidanceColor): TemporalGoNoGoResult; /** * Get the current temporal state. */ getState(): TemporalState; /** * Check if a terrain fix (full assessment) is recommended * based on inertial confidence decay. */ shouldAssess(now?: Date): boolean; } //# sourceMappingURL=grillo-hook.d.ts.map