export declare const SESSION_ID_PATTERN: RegExp; export declare const STATE_MODE_SEGMENT_PATTERN: RegExp; export type StateFileScope = 'root' | 'session'; export interface ModeStateFileRef { mode: string; path: string; scope: StateFileScope; } export declare function validateSessionId(sessionId: unknown): string | undefined; export declare function validateStateModeSegment(mode: unknown): string; export declare function validateStateFileName(fileName: unknown): string; export declare function resolveWorkingDirectoryForState(workingDirectory?: string): string; export declare function getBaseStateDir(workingDirectory?: string): string; export declare function getStateDir(workingDirectory?: string, sessionId?: string): string; export declare function getStatePath(mode: string, workingDirectory?: string, sessionId?: string): string; export declare function getStateFilePath(fileName: string, workingDirectory?: string, sessionId?: string): string; export type StateScopeSource = 'explicit' | 'session' | 'root'; export interface ResolvedStateScope { source: StateScopeSource; sessionId?: string; stateDir: string; } export declare function readCurrentSessionId(workingDirectory?: string): Promise; export declare function resolveStateScope(workingDirectory?: string, explicitSessionId?: string): Promise; /** * Read scope precedence: * - explicit session_id => session path only * - implicit current session => session path first, root as compatibility fallback * - no session => root path only * * This is a compatibility read surface. Do not use it for active-mode * decisions that drive Stop hooks or runtime continuation; use * getAuthoritativeActiveStateDirs instead so stale root state cannot * reactivate an explicitly session-scoped turn. */ export declare function getReadScopedStateDirs(workingDirectory?: string, explicitSessionId?: string): Promise; /** * Active-decision scope precedence: * - explicit/current session => that session path only, even if it is missing * - no session => root path only * * Stop hooks, list-active, and other continuation gates should use this path * instead of compatibility reads. A missing session directory means no active * state for that session; root fallback remains available only to explicit * read/status compatibility surfaces. */ export declare function getAuthoritativeActiveStateDirs(workingDirectory?: string, explicitSessionId?: string): Promise; export declare function getAuthoritativeActiveStatePaths(mode: string, workingDirectory?: string, explicitSessionId?: string): Promise; export declare function getReadScopedStatePaths(mode: string, workingDirectory?: string, explicitSessionId?: string): Promise; export declare function getReadScopedStateFilePaths(fileName: string, workingDirectory?: string, explicitSessionId?: string, options?: { rootFallback?: boolean; }): Promise; export declare function getAllSessionScopedStatePaths(mode: string, workingDirectory?: string): Promise; export declare function getAllScopedStatePaths(mode: string, workingDirectory?: string): Promise; export declare function getAllSessionScopedStateDirs(workingDirectory?: string): Promise; export declare function getAllScopedStateDirs(workingDirectory?: string): Promise; export declare function isModeStateFilename(filename: string): boolean; export declare function listModeStateFilesWithScopePreference(workingDirectory?: string, explicitSessionId?: string): Promise; //# sourceMappingURL=state-paths.d.ts.map