export { ENV_NATIVE_SESSION_ROOT } from "../kernel/env-names.ts"; export declare const MAX_NATIVE_SESSION_BYTES: number; export type NativeSessionSource = "herdr-id" | "herdr-path" | "pi-session-file" | "pi-session-manager"; export interface NativeSessionObservation { source: NativeSessionSource | null; status: "missing" | "verified" | "invalid" | "changed" | "truncated" | "unsupported"; sessionId: string | null; sessionPath: string | null; parentSessionPath: string | null; branchLeafId: string | null; branchState: "unknown" | "observed"; lastPersistedEntryId: string | null; sha256: string | null; reason: string | null; } export interface NativeSessionCapture { observation: NativeSessionObservation; bytes?: Buffer; fileIdentity?: { device: string; inode: string; }; } /** Read-only methods of pi 0.84.2's public SessionManager; no runtime/session creation or model work. */ export interface NativeSessionManager { getSessionFile(): string | undefined; getSessionId(): string; getLeafId(): string | null; } export declare const missingNativeSession: () => NativeSessionObservation; /** Parse the retained native v3 bytes, never load/migrate/rewrite a session via SessionManager.open(). */ export declare function parseNativeSessionBytes(bytes: Uint8Array, input: { source: NativeSessionSource; path: string; expectedSessionId?: string; truncated?: boolean; liveLeaf?: { sessionId: string; leafId: string | null; }; }): NativeSessionCapture; /** Private allowlisted files only, bounded non-following descriptor reads, no scan of session/auth dirs. */ export declare function readNativeSession(input: { path: string; source: NativeSessionSource; expectedSessionId?: string; allowedRoot?: string; manager?: NativeSessionManager; expectedFile?: { device: string; inode: string; }; }): Promise; /** Herdr 0.8.2 protocol 20 AgentInfo.agent_session; never scrape terminal text, PID or names. */ export declare function herdrSessionReference(value: unknown, expectedPane: string): { source: "herdr-id" | "herdr-path"; value: string; } | null; //# sourceMappingURL=native-session.d.ts.map