/**
 * Claude Stop Hook command — internal handler for Claude Code's Stop hook.
 *
 * Claude invokes `atomic _claude-stop-hook` at the end of every turn,
 * piping a JSON payload via stdin. This handler has two jobs:
 *
 *   1. Write a per-session marker file that the workflow runtime watches via
 *      `fs.watch` to detect turn completion (replacing tmux-pane scraping).
 *
 *   2. Deliver follow-up prompts without tmux send-keys. After the marker is
 *      written, this process block-polls `~/.atomic/claude-queue/<session_id>`.
 *      If the workflow enqueues a prompt there, we read it, delete the queue
 *      entry, and emit `{"decision":"block","reason":<prompt>}` on stdout.
 *      Claude Code treats `reason` as the next user message and keeps the
 *      agent loop running on the same session — no TUI keystrokes required.
 *      If the workflow instead signals session end via
 *      `~/.atomic/claude-release/<session_id>`, we exit 0 and let Claude stop.
 *
 * Usage (configured in Claude's Stop hook):
 *   atomic _claude-stop-hook
 *
 * Payload (JSON via stdin):
 *   {
 *     "session_id": "abc123",
 *     "transcript_path": "/path/to/transcript",
 *     "cwd": "/path/to/cwd",
 *     "stop_hook_active": false
 *   }
 */
/** Shape of the JSON payload Claude pipes to the Stop hook via stdin. */
export interface ClaudeStopHookPayload {
    session_id: string;
    transcript_path?: string;
    cwd?: string;
    stop_hook_active?: boolean;
}
/**
 * Directory paths used by the Stop hook and the workflow runtime to exchange
 * per-session signals.
 *
 * Exported so tests and `src/sdk/providers/claude.ts` share one source of truth.
 */
export declare function claudeHookDirs(): {
    marker: string;
    queue: string;
    release: string;
    hil: string;
    pid: string;
    ready: string;
};
/** Options for {@link claudeStopHookCommand}. Primarily used by tests to shrink the wait budget. */
export interface ClaudeStopHookOptions {
    /** Maximum time the hook waits for a queued follow-up prompt before letting Claude stop. */
    waitTimeoutMs?: number;
    /**
     * Interval for the polling fallback that runs alongside the `fs.watch`
     * watchers in case an inotify/FSEvent notification gets dropped. In the
     * happy path, watcher events fire on create and the poll never matches.
     */
    pollIntervalMs?: number;
    /**
     * Interval at which the hook checks whether the atomic workflow process
     * that owns this session is still alive. Coarser than `pollIntervalMs`
     * because atomic crashing is rare and `process.kill(pid, 0)` is a syscall.
     */
    livenessIntervalMs?: number;
}
/**
 * Handler for the hidden `_claude-stop-hook` subcommand.
 *
 * Returns an exit code (0 on success or benign failure).  The caller
 * in src/cli.ts does `process.exit(exitCode)`, so we just return the code.
 *
 * We always return 0 — a non-zero exit would surface as a hook error in
 * Claude's transcript, which is not what we want.
 */
export declare function claudeStopHookCommand(options?: ClaudeStopHookOptions): Promise<number>;
//# sourceMappingURL=claude-stop-hook.d.ts.map