/** * [WHO]: Thin shell exporting reportDiagnostic / isDevRuntime for soul-core * [FROM]: Depends only on node:events * [TO]: Consumed by soul-core internals (manager.ts, evolution.ts, ...) so personality-engine logs/failures route through the unified diagnostic bus * [HERE]: packages/soul-core/src/diagnostics.ts - mirrors utils/diagnostics.ts; explicit dev/debug mode prints to console, and all copies bind to the same Symbol.for slot on globalThis at runtime so the diagnostics extension subscribed via utils/diagnostics.ts receives soul-core events too * * Keep this file structurally identical to utils/diagnostics.ts and * packages/mem-core/src/diagnostics.ts. The Symbol.for(...) slot is the * runtime contract that ties all copies together. */ export type DiagnosticSeverity = "debug" | "info" | "warning" | "error"; export type DiagnosticCategory = "network" | "fallback" | "persistence" | "config" | "extension_timeout" | "schema" | "unknown"; export interface DiagnosticEvent { source: string; severity: DiagnosticSeverity; category: DiagnosticCategory; message: string; detail?: unknown; fingerprint?: string; context?: Record; } export declare function isDevRuntime(): boolean; export declare function reportDiagnostic(event: DiagnosticEvent): void;