/** * Check whether a credentials/auth file exists under the real user HOME. * * `relPath` is relative to `os.homedir()` (the runner's HOME, NOT the * isolated per-job HOME). Empty files return false — a zero-byte * credentials file is never a real session. */ export declare function hasHomeFile(relPath: string): boolean; /** * Read a JSON file under the real user HOME and check whether any of the * dotted `paths` resolves to a non-empty value. Used to detect a logged-in * session in agent config files like `~/.claude.json` where the OAuth * account block is the actual signal of "logged in" (the Keychain entry * alone is not enough — `claude-code` reads its `oauthAccount` from the * JSON to know which Keychain token to use). */ export declare function homeJsonHasValue(relPath: string, dottedPaths: string[]): boolean; /** * Check whether a generic-password entry exists in the macOS Keychain. * * Claude Code on macOS stores OAuth credentials in Keychain by default * (service name `"Claude Code-credentials"`), so file-based detection * alone misses logged-in users. Returns false on non-Darwin or any * lookup error. */ export declare function hasKeychainEntry(serviceName: string): Promise; /** * Read a macOS Keychain generic-password secret and write it verbatim to * `destPath` (mode 0600). Returns true on success. Adapters use this to * materialize OAuth credentials stored in Keychain (e.g. `claude login`) * into a file-based form that the CLI looks for when its config dir is * an isolated path that bypasses Keychain. * * Note: macOS may prompt the user the first time `security` reads an entry * that wasn't created by `/usr/bin/security` itself. Clicking "Always Allow" * authorizes subsequent runs. */ export declare function extractKeychainSecretToFile(serviceName: string, destPath: string): Promise; /** * Copy a file from the real user HOME into an isolated config dir, so an * agent CLI can authenticate via the user's existing local login without * the runner needing an API key. No-op if the source doesn't exist or * the destination already has the file (caller may pre-populate). */ export declare function copyHomeFile(srcRelPath: string, destDir: string, destFileName?: string): void; //# sourceMappingURL=local-session.d.ts.map