import type { HookPayload } from '../types.mts'; import type { HookHarness } from './types.mts'; /** * True when the process runs unattended, where merge authority is never delegated: Claude's * `claude -p` (`CLAUDE_CODE_SESSION_ATTENDED=0`) or a CI marker. `extraMarkers` adds * caller-specific variable names. */ export declare function isAutomationContext(env: NodeJS.ProcessEnv, extraMarkers?: readonly string[]): boolean; /** * Parses hook stdin into a payload. Blank, invalid, or non-object input is an empty payload unless * `strict`, which throws so a blocking hook fails closed instead of reading a missing or truncated * payload as "nothing to judge". */ export declare function parseHookPayload(stdin: string, strict?: boolean): HookPayload; export declare function normalizeCursorShellPayload(payload: HookPayload): HookPayload; /** * The harness actually calling. Grok and Cursor reuse another harness's hook configuration, so * their own env and payload markers win over the declared `--harness`. Cursor resolves before * `claude` is trusted because it inherits Claude's attended env when launched from a Claude session. */ export declare function resolveHarness(declared: HookHarness, env: NodeJS.ProcessEnv, payload: HookPayload): HookHarness; /** * True only when Claude Code marks the session attended (CLAUDE_CODE_SESSION_ATTENDED=1; 0 for * `claude -p`). A missing or changed variable fails safe: no silent merge allow. */ export declare function isAttendedClaudeSession(env: NodeJS.ProcessEnv): boolean;