import type { CliAdapter } from './types.js'; /** Return the Reasonix session directory for a working directory. */ export declare function reasonixSessionsDir(cwd: string, sessionRoot?: string): string; /** * Check whether pid belongs to ancestorPid's process tree. Linux reads the * parent chain from procfs; other POSIX platforms use one `ps` snapshot. */ export declare function isDescendantOf(pid: number, ancestorPid: number): boolean; /** Match a lease pid against a host process tree, including nested PID namespaces. */ export declare function pidBelongsToProcessTree(pid: number, rootPid: number, procRoot?: string): boolean; /** * Find the session lease owned by the current CLI process tree. The lease file * is created at CLI startup, so its stem — the identifier `--resume` accepts — * is available before the first prompt. The npm launcher may add an * intermediate process; bwrap may add a PID namespace. */ export declare function findSessionStemForCli(sessionsDir: string, cliPid: number): string | undefined; /** * Adapter for the Reasonix Bubble Tea TUI. * * Reasonix does not emit a stable ready marker after each turn, so input uses * the standard quiescence detector. Sessions live under * `~/.reasonix/projects//sessions`. The lease pid identifies the * session file owned by this process tree, and its stem — the same identifier * `--resume` accepts, alongside a transcript path or a free-text query — is * persisted as the cliSessionId. `reasonix session list` is deliberately NOT * used: it reports opaque `session_` machine ids that only the * `session show|status|recovery` query surface accepts, and it omits a session * until its first turn has been persisted. If capture fails, a later restart * opens a fresh session because cwd-scoped `--continue` can select another * topic's session. */ export declare function createReasonixAdapter(pathOverride?: string): CliAdapter; export declare const create: typeof createReasonixAdapter; //# sourceMappingURL=reasonix.d.ts.map