import { type BeforeWritableCommit, type ResolvedStateScope } from '../mcp/state-paths.js'; import { type SkillActiveStateLike } from './skill-active.js'; import { assertModeBindingOwnerIdentity as assertStateFileWriteTransactionIdentity, outsideModeBindingOwnerTransaction as outsideStateFileWriteTransaction, withModeBindingOwnerTransaction as withStateFileWriteTransaction } from './mode-binding-lease.js'; export { assertStateFileWriteTransactionIdentity, outsideStateFileWriteTransaction, withStateFileWriteTransaction }; export declare const SUPPORTED_STATE_READ_MODES: readonly ['autopilot', 'autoresearch', 'team', 'ralph', 'ultrawork', 'ultraqa', 'ralplan', 'deep-interview', 'skill-active', 'ultragoal']; export type SupportedStateReadMode = (typeof SUPPORTED_STATE_READ_MODES)[number]; export type StateOperationName = 'state_read' | 'state_write' | 'state_clear' | 'state_list_active' | 'state_get_status'; export interface StateOperationResponse { payload: unknown; isError?: boolean; } declare const stateOperationTestHooks: { afterStateClearPrimary?: () => void; }; export declare function __setStateOperationTestHooksForTests(hooks: typeof stateOperationTestHooks): void; /** * The sole writer primitive for `.omx/state/` session-scoped workflow state. * Every module that persists `{mode}-state.json` MUST route through this function * so that the single-writer invariant is preserved. */ export declare function writeStateFile(path: string, data: string, authorizedBaseStateDir?: string): Promise; /** * Holds the canonical successor-safe state lock across a multi-projection owner * transaction. Nested sanctioned writes to the same path inherit the lease. */ /** * Durably pin a mode projection already published by the canonical workflow * writer. Keeping the path resolution and descriptor validation in the state * owner prevents callers from becoming undeclared mode-state writers merely * to obtain a durable activation boundary. */ export declare function syncExplicitSessionModeState(mode: string, cwd: string, sessionId: string): Promise; export declare function projectRalplanTerminalSkillMirrors(input: { rootSkillState: SkillActiveStateLike | null; sessionSkillState: SkillActiveStateLike | null; terminalState: Record; sessionId: string; nowIso: string; }): { root_skill: SkillActiveStateLike | null; session_skill: SkillActiveStateLike | null; }; export declare function completeRalplanSession(options: { cwd: string; baseStateDir: string; state: Record; explicitSessionId?: string; beforeCommit?: BeforeWritableCommit; capturedScope?: ResolvedStateScope; }): Promise; export declare function listStateStatuses(cwd: string, explicitSessionId?: string, mode?: string, options?: { authoritativeActiveDecision?: boolean; }): Promise>; export declare function listActiveStateModes(workingDirectory?: string, explicitSessionId?: string): Promise; export declare function executeStateOperation(name: StateOperationName, rawArgs?: Record): Promise; //# sourceMappingURL=operations.d.ts.map