export type RuntimeWriterVersion = 1 | 2; export interface ActiveRuntimePointerView { readonly schema_version: 2; readonly active_version: RuntimeWriterVersion; readonly updated_at: string; readonly reason: string; } /** * Shared dual-writer guard. Every durable mutator (v1 and v2) must call this * before writing. Absent pointer allows only v1 (legacy default). */ export declare function assertMutationAllowed(writerVersion: RuntimeWriterVersion, activeRuntimePath: string): void; /** * Workspace-level fence: always consult `/.oms/active-runtime.json`, * even when v1 state is rooted elsewhere via override. */ export declare function workspaceActiveRuntimePath(workspaceRoot: string, cwd?: string): string; export declare function assertWorkspaceWriterAllowed(writerVersion: RuntimeWriterVersion, workspaceRoot: string, cwd?: string): void; export declare function readActiveRuntimePointer(activeRuntimePath: string): ActiveRuntimePointerView | null; /** @deprecated Prefer workspaceActiveRuntimePath — co-located pointer for default state roots. */ export declare function activeRuntimePathForStateRoot(stateRoot: string): string; export declare function activeRuntimePathForOmsRoot(omsRoot: string): string; /** Infer state root from a record-store locks directory (`…/locks`). */ export declare function stateRootFromLocksRoot(locksRoot: string): string; /** * Infer workspace from locks root when state lives at `/.oms/locks`. * Returns undefined for non-default layouts (caller must pass workspaceRoot). */ export declare function inferWorkspaceRootFromLocksRoot(locksRoot: string): string | undefined; export declare function assertV1MutationAllowedFromLocksRoot(locksRoot: string, workspaceRoot?: string): void;