/** * Published owner map for durable `.omx/state/` namespaces (#3498 follow-up). * * The original "sole writer" claim was that `src/state/operations.ts` is the only module that * persists durable state. That claim was false: roughly a dozen production paths write their own * projections directly, and the lexical invariant test only recognized one path-construction * pattern (`getStateFilename` + `writeFile`), so it never saw them. * * Rather than migrate every writer — deliberately out of scope, because paths like the multi-file * cancel and native hook-cancel transactions carry identity checks, rollback, and atomicity that a * naive single-file write would lose — this map states the truth: the **workflow** namespace has one * sanctioned writer, and every other namespace has a declared owner. * * The audit in `src/state/__tests__/single-writer-invariant.test.ts` consumes this map. Adding a new * module that writes a `{mode}-state.json` fails that audit until the module is either routed * through the sanctioned workflow writer or declared here with a reason. The map is therefore a * contract, not documentation: it is only accurate because a test enforces it. */ export interface StateNamespaceOwner { /** Namespace label used in audit output. */ namespace: string; /** `src`-relative modules permitted to persist state in this namespace. */ owners: readonly string[]; /** Why these modules own the namespace, and why they are not the workflow writer. */ reason: string; } /** The single sanctioned writer for workflow-mode projections. */ export declare const WORKFLOW_STATE_WRITER = "state/operations.ts"; export declare const STATE_NAMESPACE_OWNERS: readonly StateNamespaceOwner[]; /** Every module permitted to persist durable state in any declared namespace. */ export declare function declaredStateWriters(): ReadonlySet; /** The namespaces a module owns, for audit reporting. */ export declare function namespacesOwnedBy(srcRelativeModule: string): readonly string[]; //# sourceMappingURL=namespace-owners.d.ts.map