/** * Frame Metadata Type Definitions * * Canonical TypeScript types for work session snapshots. */ export interface StatusSnapshot { next_action: string; blockers?: string[]; merge_blockers?: string[]; tests_failing?: string[]; } export interface SpendMetadata { prompts?: number; tokens_estimated?: number; } export interface TurnCostComponent { latency: number; contextReset: number; renegotiation: number; tokenBloat: number; attentionSwitch: number; } export interface TurnCostWeights { lambda: number; gamma: number; rho: number; tau: number; alpha: number; } export interface TurnCost { components: TurnCostComponent; weights?: TurnCostWeights; weightedScore?: number; sessionId?: string; timestamp?: string; } export type CapabilityTier = "senior" | "mid" | "junior"; export interface TaskComplexity { tier: CapabilityTier; assignedModel?: string; actualModel?: string; escalated?: boolean; escalationReason?: string; retryCount?: number; tierMismatch?: boolean; } export interface Frame { id: string; timestamp: string; branch: string; module_scope: string[]; summary_caption: string; reference_point: string; status_snapshot: StatusSnapshot; jira?: string; keywords?: string[]; atlas_frame_id?: string; feature_flags?: string[]; permissions?: string[]; image_ids?: string[]; runId?: string; planHash?: string; spend?: SpendMetadata; userId?: string; executorRole?: string; toolCalls?: string[]; guardrailProfile?: string; turnCost?: TurnCost; capabilityTier?: CapabilityTier; taskComplexity?: TaskComplexity; superseded_by?: string; merged_from?: string[]; } /** * Frame schema version constant * v1: Initial schema (pre-0.4.0) * v2: Added runId, planHash, spend fields for execution provenance (0.4.0) * v3: Added executorRole, toolCalls, guardrailProfile for LexRunner (0.5.0) * v4: Added turnCost, capabilityTier, taskComplexity for governance model (2.0.0) * v5: Added superseded_by, merged_from for deduplication (2.2.0) */ export declare const FRAME_SCHEMA_VERSION = 5; export declare function validateFrameMetadata(frame: unknown): frame is Frame;