/** * Agentic Pack Engine - Type Definitions * * Core invariant: Canonical payload is the truth. Renderers are only views. * Renderers NEVER change meaning. They change compression, typography, and stance. */ export type AgentRole = 'Sensor' | 'Analyst' | 'Overmind' | 'Specialist'; export type AgentStatus = 'OK' | 'DEGRADED' | 'BLOCKED' | 'ALERT'; export type LoadLevel = 'GREEN' | 'YELLOW' | 'RED'; export interface Evidence { source: string; value: unknown; confidence?: number; timestamp?: string; } export interface MissingData { field: string; reason: string; severity: 'blocking' | 'degraded' | 'informational'; } export interface Guardrail { id: string; description: string; status: 'active' | 'triggered' | 'disabled'; } export interface DissentSummary { agent_id: string; position: string; confidence: number; } export interface PayloadMetadata { pack_id: string; pack_hash: string; renderer_id?: string; specialist_id?: string; created_at: string; } export interface CanonicalPayload { role: AgentRole; status: AgentStatus; load: LoadLevel; summary: string; evidence: Evidence[]; missing_data: MissingData[]; decision?: string; guardrails?: Guardrail[]; dissent_summary?: DissentSummary[]; specialist_id?: string; specialist_name?: string; metadata: PayloadMetadata; } export type RenderTarget = 'plain' | 'markdown' | 'ansi'; export interface RendererConstraints { max_emoji_count?: number; emoji_position?: 'header-only' | 'none' | 'anywhere'; max_lines?: number; max_section_lines?: number; required_sections?: string[]; banned_punctuation?: string[]; banned_words?: string[]; } export interface RendererConfig { id: string; name: string; description?: string; template: string; constraints: RendererConstraints; ansi_styles?: Record; } export interface RenderOutput { rendered: string; renderer_id: string; target: RenderTarget; warnings: string[]; metadata: { line_count: number; char_count: number; emoji_count: number; }; } export type LintSeverity = 'error' | 'warning' | 'info'; export interface LintViolation { rule: string; severity: LintSeverity; message: string; line?: number; column?: number; suggestion?: string; } export interface LintResult { valid: boolean; violations: LintViolation[]; renderer_id: string; checked_at: string; } export interface AvatarConfig { id: string; name: string; emoji?: string; role: AgentRole; description?: string; } export interface TaxonomyConfig { roles: Record; statuses: Record; loads: Record; } export interface ConsensusConfig { quorum_threshold: number; dissent_highlight_threshold: number; max_pending_decisions: number; } export interface CompiledPack { taxonomy: TaxonomyConfig; renderers: Record; consensus?: ConsensusConfig; avatars: Record; ansi_styles?: Record; } export interface CompileResult { pack_id: string; pack_hash: string; compiled_at: string; content: CompiledPack; source_files: string[]; } export interface GoldenCase { name: string; payload_file: string; expected_outputs: Record; } export interface GoldenTestResult { case_name: string; renderer_id: string; passed: boolean; expected_file: string; actual?: string; expected?: string; diff?: string[]; lint_result?: LintResult; } export interface GoldenResult { passed: boolean; total_cases: number; passed_cases: number; failed_cases: number; results: GoldenTestResult[]; run_at: string; } export interface CompilePackInput { projectId?: string; } export interface CompilePackOutput { status: 'compiled' | 'error'; result?: CompileResult; error?: string; } export interface RenderInput { projectId?: string; payload: CanonicalPayload; renderer_id: string; target?: RenderTarget; } export interface RenderOutputResult { status: 'rendered' | 'error'; result?: RenderOutput; error?: string; } export interface LintInput { projectId?: string; rendered: string; renderer_id: string; payload?: CanonicalPayload; } export interface LintOutputResult { status: 'linted' | 'error'; result?: LintResult; error?: string; } export interface GoldenInput { projectId?: string; case_name?: string; strict?: boolean; } export interface GoldenOutputResult { status: 'executed' | 'error'; result?: GoldenResult; error?: string; } import { z } from 'zod'; export declare const EvidenceSchema: z.ZodObject<{ source: z.ZodString; value: z.ZodUnknown; confidence: z.ZodOptional; timestamp: z.ZodOptional; }, z.core.$strip>; export declare const MissingDataSchema: z.ZodObject<{ field: z.ZodString; reason: z.ZodString; severity: z.ZodEnum<{ degraded: "degraded"; blocking: "blocking"; informational: "informational"; }>; }, z.core.$strip>; export declare const GuardrailSchema: z.ZodObject<{ id: z.ZodString; description: z.ZodString; status: z.ZodEnum<{ active: "active"; triggered: "triggered"; disabled: "disabled"; }>; }, z.core.$strip>; export declare const DissentSummarySchema: z.ZodObject<{ agent_id: z.ZodString; position: z.ZodString; confidence: z.ZodNumber; }, z.core.$strip>; export declare const PayloadMetadataSchema: z.ZodObject<{ pack_id: z.ZodString; pack_hash: z.ZodString; renderer_id: z.ZodOptional; specialist_id: z.ZodOptional; created_at: z.ZodString; }, z.core.$strip>; export declare const CanonicalPayloadSchema: z.ZodObject<{ role: z.ZodEnum<{ Sensor: "Sensor"; Analyst: "Analyst"; Overmind: "Overmind"; Specialist: "Specialist"; }>; status: z.ZodEnum<{ OK: "OK"; DEGRADED: "DEGRADED"; BLOCKED: "BLOCKED"; ALERT: "ALERT"; }>; load: z.ZodEnum<{ GREEN: "GREEN"; YELLOW: "YELLOW"; RED: "RED"; }>; summary: z.ZodString; evidence: z.ZodArray; timestamp: z.ZodOptional; }, z.core.$strip>>; missing_data: z.ZodArray; }, z.core.$strip>>; decision: z.ZodOptional; guardrails: z.ZodOptional; }, z.core.$strip>>>; dissent_summary: z.ZodOptional>>; specialist_id: z.ZodOptional; specialist_name: z.ZodOptional; metadata: z.ZodObject<{ pack_id: z.ZodString; pack_hash: z.ZodString; renderer_id: z.ZodOptional; specialist_id: z.ZodOptional; created_at: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; /** * Validate a canonical payload, returning a flat list of human-readable errors. * Empty array means valid. * * Rejects rather than coerces. A confidence of 47 is not silently clamped to 1: * the whole premise of this module is that the canonical payload is the truth * and renderers are only views, and a truth that quietly rewrites its inputs is * a worse foundation than one that refuses them. */ export declare function validateCanonicalPayload(payload: unknown): string[]; //# sourceMappingURL=types.d.ts.map