/**
 * Automation-mode session flag — file-existence flip for "is this session in
 * an automation loop right now?" (G.12).
 *
 * Flag location: `~/.opensquid/sessions/<session-id>/automation.flag` — sits
 * alongside `session_state.json` under the same `sessionStateDir(...)` root
 * so the `OPENSQUID_HOME` test seam extends to it automatically. The file's
 * contents are intentionally not load-bearing (we only check EXISTENCE), so
 * we write an ASCII timestamp purely for human-debuggability when poking the
 * directory by hand.
 *
 * Behavior contract:
 *   - `setAutomationFlag(sessionId)`   — mkdir -p + writeFile (idempotent;
 *                                        re-setting refreshes the timestamp).
 *   - `clearAutomationFlag(sessionId)` — unlink; ENOENT swallowed (idempotent).
 *   - `isAutomationFlagSet(sessionId)` — `fs.stat`; ENOENT → false. ANY other
 *                                        error also returns false (fail-safe:
 *                                        a permissions glitch inside a hook
 *                                        bin should not crash the parent
 *                                        agent's tool call — we'd rather miss
 *                                        the automation signal than block).
 *
 * The env-var override (`OPENSQUID_AUTOMATION=1`) is checked by the
 * `is_automation_mode` primitive, NOT here — this module deals only with the
 * flag-file lifecycle. Both signals OR together at the primitive boundary.
 *
 * Imports from: node:fs/promises, node:path, ./paths.js.
 * Imported by: src/functions/is_automation_mode.ts, src/setup/cli/automation.ts.
 */
/** Absolute path to the automation flag file for the given session id. */
export declare const automationFlagPath: (sessionId: string) => string;
/** Write the flag file (mkdir -p first). Idempotent. */
export declare function setAutomationFlag(sessionId: string): Promise<void>;
/** Remove the flag file. ENOENT is swallowed — idempotent. */
export declare function clearAutomationFlag(sessionId: string): Promise<void>;
/**
 * Returns true iff the flag file exists. ENOENT (and every other stat error)
 * → false: hooks must NEVER throw at the parent agent over a missing flag.
 */
export declare function isAutomationFlagSet(sessionId: string): Promise<boolean>;
//# sourceMappingURL=automation_state.d.ts.map