export declare function claudeStateRoot(env?: NodeJS.ProcessEnv): string; export declare function projectSlugForCwd(cwd: string): string; export declare function sessionsDir(env?: NodeJS.ProcessEnv): string; export declare function projectsDirForCwd(cwd: string, env?: NodeJS.ProcessEnv): string; /** Task 258 — single derivation site for the on-disk path of a session's * JSONL transcript. The JSONL basename IS the sessionId; we never store * a path. `opts.archived` returns the `archive/` variant for the user- * initiated archive route. Callers that need the live-or-archived check * consult both variants. */ export declare function jsonlPathForSessionId(spawnCwd: string, sessionId: string, opts?: { archived?: boolean; }, env?: NodeJS.ProcessEnv): string; /** Task 260 — archive subdir for a given spawn cwd. fs-watcher uses this * to enumerate archived JSONLs at boot and to mount a second fs.watch. */ export declare function archiveDirForCwd(cwd: string, env?: NodeJS.ProcessEnv): string; /** Task 260 — sidecar path for a session's spawn metadata. Lives alongside * the JSONL: archived JSONL → archived sidecar; live JSONL → live sidecar. * The pair moves together on /archive and /unarchive. */ export declare function sidecarPathForSessionId(spawnCwd: string, sessionId: string, opts?: { archived?: boolean; }, env?: NodeJS.ProcessEnv): string; /** Task 278 — per-session capture of the binary's `[auto-mode] * verifyAutoModeGateAccess: ...` debug line, written when the spawn passes * `--debug=auto-mode --debug-file=`. The file sits next to the JSONL * and meta sidecar, and `permission-mode-tail.ts` watches it via fs-watcher * to derive `effectivePermissionMode` for the SSE row payload. Single line * on auto spawns; absent on non-auto spawns. */ export declare function permissionModeLogPathForSessionId(spawnCwd: string, sessionId: string, opts?: { archived?: boolean; }, env?: NodeJS.ProcessEnv): string; /** Task 1639 — per-session capture of the binary's MCP-connection debug lines, * written when a passive spawn passes `--debug=mcp --debug-file=`. Sits next * to the JSONL, meta sidecar, and permission-mode log. `passive-spawn-tools-tail.ts` * reads it once at PTY exit to emit the `op=spawn-tools` registration post-condition. * Present on passive spawns only; absent on every other spawn. */ export declare function mcpDebugLogPathForSessionId(spawnCwd: string, sessionId: string, opts?: { archived?: boolean; }, env?: NodeJS.ProcessEnv): string; /** Task 1643 — per-session capture of the passive print spawn's stream-json * stdout. Sits next to the JSONL and the mcp-debug log. The print-child * launcher appends the child's stdout here; the census parses it once at spawn * exit to read the authoritative model-facing tool surface from the init * frame. Present on passive print spawns only; absent on every other spawn. */ export declare function printStreamPathForSessionId(spawnCwd: string, sessionId: string, opts?: { archived?: boolean; }, env?: NodeJS.ProcessEnv): string; /** Task 547 — walk `/projects//` (and each * `/archive/`) for `.jsonl`. Returns the first match * or null when no JSONL exists. Used by `/rc-spawn` to decide between * `--resume ` (existing transcript) and `--session-id ` * (fresh conversation under that id). */ export declare function findExistingJsonlForSessionId(claudeConfigDir: string, sessionId: string): string | null; /** Task 1298 — resolve which project-slug directory holds a session's * JSONL (top-level or archive/), mirroring findExistingJsonlForSessionId's * walk but returning the slug (not the file path) so callers can derive * sidecar/subdir paths in the same directory. Used by the DELETE handler * so it can locate and remove a JSONL under any slug the list is willing * to show, not just the manager's current spawnCwd slug. Returns null if * no slug has a JSONL for this sessionId. */ export declare function slugForExistingJsonl(claudeConfigDir: string, sessionId: string): string | null; /** Task 1298 — slug-scoped counterpart to jsonlPathForSessionId. cwd -> slug * is a lossy, one-way transform (every '/' becomes '-'), so a slug resolved * by slugForExistingJsonl cannot be turned back into a cwd to reuse the * cwd-scoped builder. */ export declare function jsonlPathForSlug(claudeConfigDir: string, slug: string, sessionId: string, opts?: { archived?: boolean; }): string; /** Task 1298 — slug-scoped counterpart to sidecarPathForSessionId. */ export declare function sidecarPathForSlug(claudeConfigDir: string, slug: string, sessionId: string, opts?: { archived?: boolean; }): string; /** Extract the bridge-session suffix from a `/remote-control` URL. This is * the part after `session_`, not the intrinsic JSONL filename. Returns * null if the URL has no `session_<...>` component. */ export declare function bridgeSuffixFromUrl(url: string): string | null; /** Task 662 — the durable `/rc-spawn` bind signal. Claude Code 2.1.167 stopped * writing `${CLAUDE_CONFIG_DIR}/sessions/.json`, so the only place the * bridge session id appears is the stdout banner the CLI prints when * `--remote-control` registers, pre-connection: * * /remote-control is active · Continue here, on your phone, or at * https://claude.ai/code/session_ * * Returns the full `session_` (the `bridgeSessionId` form the pid file * carried and the client navigates by), or null when the text holds no * `claude.ai/code/session_<...>` URL. The match is scoped to the real bind * URL so a stray `session_` token in unrelated output cannot be mistaken for * a bind. The slug character class stops at the terminal `\r` the PTY emits * after the URL, so the captured value is clean. Pure function — unit-tested * against the exact production bytes without a real PTY. */ export declare function detectRemoteControlSlug(text: string): string | null; export type BindBlocker = 'settings-warning' | 'remote-control-consent' | 'bypass-disclaimer' | 'none'; /** Task 664 — when an rc-spawn fails to bind (no stdout URL, no pid file), * the captured child stdout usually carries the blocking TUI screen that * halted the CLI before it could print the bind banner. Naming that screen * in one log line turns a silent `stdoutBytes=N` into a diagnosable cause. * Checked most-specific first; `settings-warning` (the CC >= 2.1.167 * allow-rule rejection that motivated this task) wins over the others when * several markers co-occur. Pure function — unit-tested against the exact * production bytes without a real PTY. */ export declare function classifyBindBlocker(stdout: string): BindBlocker; export type ChildAuthResult = 'not-logged-in' | 'unknown'; /** Task 1406 — when a darwin rc-spawn fails to bind, the captured child stdout * usually carries the CLI's first-turn auth verdict. A child that rendered its * welcome banner but could not authenticate the API call prints * `Not logged in · Please run /login`. Naming that in `op=child-auth` turns the * file-healthy-but-child-unauthenticated divergence (the 1406 signature) into a * single log line instead of an implicit bind-timeout. `unknown` covers a tail * with no login-required marker. Pure — unit-tested against the production * bytes without a real PTY. */ export declare function classifyChildAuth(stdout: string): ChildAuthResult; //# sourceMappingURL=jsonl-path.d.ts.map