import { type ChorusPaths, type StateMode } from "./paths"; import type { OpenCodeState, SharedState } from "./state-types"; export type StateStoreOptions = { projectRoot: string; worktree?: string; stateMode?: StateMode; stateDir?: string; globalStateRoot?: string; }; export declare class StateStore { private queue; private runtimeState; private readonly options; paths: ChorusPaths; fallbackReason?: string; constructor(projectRoot: string, stateDir: string); constructor(options: StateStoreOptions); init(): Promise; ensureStagingDir(): Promise; cleanupStagingDir(): Promise; usesProjectLocalState(): boolean; setActiveAgent(agent: string): void; getActiveAgent(): string | undefined; isActivated(): boolean; setActivated(activated: boolean): void; readOpenCodeState(): Promise; private readPersistedOpenCodeState; updateOpenCodeState(updater: (state: OpenCodeState) => OpenCodeState): Promise; private runOpenCodeStateUpdate; readSharedState(): Promise; updateSharedState(updater: (state: SharedState) => SharedState): Promise; private runSharedStateUpdate; private enqueue; private atomicWrite; private writePersistedOpenCodeState; private migrateLegacyProjectState; private cleanupLegacyProjectState; private fallbackToProjectLocal; private withLock; private acquireLock; }