import type { Logger, SourceAdapter } from "@onenomad/przm-cortex-core"; import type { LLMRouter } from "@onenomad/przm-cortex-llm-core"; import type { EngramClient } from "./clients/engram.js"; import { type AdapterRegistry } from "./registry/adapters.js"; import { type LoadedTaxonomy } from "./taxonomy.js"; import type { Scheduler } from "./scheduler.js"; import type { HeartbeatWriter } from "./heartbeat.js"; /** * Mutable container for the subsystems a running Cortex needs. The * dashboard API holds a single reference to this and dereferences * `.current` per request, so a hot-reload that swaps entries in * place transparently flows to every handler. * * Engram and persona stay stdio subprocesses across reloads — killing * them would tear down the LanceDB connection and is overkill for a * config change. */ export interface LiveState { configPath: string; repoRoot: string; logger: Logger; engram: EngramClient; heartbeat: HeartbeatWriter; adapters: Record; adapterRegistry: AdapterRegistry; /** Cortex 0.2 — `current` may be undefined when no LLM provider * is configured (queue-based enrichment via MCP client). */ router: { current: LLMRouter | undefined; }; taxonomy: { current: LoadedTaxonomy; }; scheduler: Scheduler; } export interface ReloadResult { adaptersBuilt: number; providersBuilt: number; schedulerEntries: number; durationMs: number; } /** * Rebuild every config-driven subsystem from the current cortex.yaml: * - LLM router (provider changes land here) * - Taxonomy (projects/people YAML edits) * - Adapter registry (new enable/disable/reconfig flows through) * - Scheduler (cron changes live-apply) * * Engram + persona subprocesses are NOT touched — they're stateful * and restarting them would be slow and disruptive. * * Callers should trigger this after any write to cortex.yaml / * cortex.local.yaml / projects.yaml / people.yaml / .env. */ export declare function hotReload(state: LiveState): Promise; //# sourceMappingURL=hot-reload.d.ts.map