/** * State file I/O helpers for notify-hook modules. */ import { readdir } from 'fs/promises'; export { readdir }; export declare function readJsonIfExists(path: string, fallback: any): Promise; export interface SessionMetadata { sessionId?: string; aliases: string[]; status: 'missing' | 'unusable' | 'usable'; } export declare function readNotifySessionMetadata(baseStateDir: string): Promise; /** Neutral fact for the provenance evaluator; it never interprets fork policy. */ export declare function hasExistingScopedSessionDir(baseStateDir: string, sessionId: string): Promise; export declare function getOmxSessionIdFromEnvironment(): string | undefined; export declare function readCurrentSessionId(baseStateDir: string): Promise; export declare function resolveScopedStateDir(baseStateDir: string, explicitSessionId?: string): Promise; export declare function getScopedStateDirsForCurrentSession(baseStateDir: string, explicitSessionId?: string, options?: { includeRootFallback?: boolean; }): Promise; export interface NotifyStateScope { readonly targetSessionId: string; readonly ownerCodexSessionId: string; readonly allowedStorageSessionIds: readonly string[]; } export declare function getScopedStatePathAtScope(baseStateDir: string, fileName: string, scope: NotifyStateScope): Promise; export declare function getScopedStatePath(baseStateDir: string, fileName: string, explicitSessionId?: string): Promise; export declare function readScopedJsonIfExists(baseStateDir: string, fileName: string, explicitSessionId: string | undefined, fallback: any, options?: { includeRootFallback?: boolean; }): Promise; export declare function writeScopedJson(baseStateDir: string, fileName: string, explicitSessionId: string | undefined, value: unknown): Promise; export declare function readScopedJsonAtScope(baseStateDir: string, fileName: string, scope: NotifyStateScope, fallback: any): Promise; export declare function writeScopedJsonAtScope(baseStateDir: string, fileName: string, scope: NotifyStateScope, value: unknown): Promise; export declare function normalizeTmuxState(raw: any): any; export declare function normalizeNotifyState(raw: any): any; export declare function pruneRecentTurns(recentTurns: any, now: number): Record; export declare function pruneRecentKeys(recentKeys: any, now: number): Record; //# sourceMappingURL=state-io.d.ts.map