/** * namespace-resolver.ts — shared namespace resolution for fozikio CLI commands. * * Resolves the effective namespace prefix that CLI commands should use when * reading from or writing to the cortex store. Priority order: * * 1. Explicit --namespace flag on the command line * 2. The namespace marked `default: true` in the config (set by * loadConfig(cwd, agentName) when --agent is passed) * 3. Empty string (= the legacy default namespace) * * Before this resolver existed, every CLI subcommand silently ignored the * agent.yaml default_namespace and --namespace flag, causing fozikio health, * vitals, anomalies, and maintain to read empty tables on any workspace that * used a non-default namespace. */ import type { CortexConfig } from '../core/config.js'; export interface NamespaceArgs { /** Value of --namespace flag, or null if not provided. */ namespace: string | null; /** Value of --agent flag, or null if not provided. */ agentName: string | null; } /** * Parse --namespace and --agent from args. Other arg parsing is * left to each command; this only handles the namespace-related flags so the * shared helper can be called early. */ export declare function parseNamespaceArgs(args: string[]): NamespaceArgs; /** * Resolve the effective namespace prefix from CLI args and config. * * The returned string is the value to pass to SqliteCortexStore / * FirestoreCortexStore constructors (or to createStore's namespace param). * An empty string targets the legacy un-prefixed tables; any non-empty value * targets tables prefixed with `${namespace}_`. */ export declare function resolveNamespace(args: NamespaceArgs, config: CortexConfig): string; /** * Human-readable label for stderr logging. Empty string is rendered as * '(default)' so users can tell whether namespace resolution actually picked * up their agent config. */ export declare function namespaceLabel(namespace: string): string; //# sourceMappingURL=namespace-resolver.d.ts.map