/**
 * `opensquid automation on|off|status` CLI verb group (G.12).
 *
 * Thin wrapper around the `runtime/automation_state.ts` flag-file helpers.
 * The flag at `~/.opensquid/sessions/<session-id>/automation.flag` is the
 * canonical signal for "is this session in an automation loop?"; the
 * `is_automation_mode` primitive reads it (OR'd with `OPENSQUID_AUTOMATION=1`)
 * to gate skills like `d9-guard`.
 *
 * Session-id resolution (Phase-2 lock #5):
 *   1. `--session-id <id>` flag (explicit override)              source: 'flag'
 *   2. `OPENSQUID_SESSION_ID` env var                             source: 'env'
 *   3. `.current-session` pointer (UserPromptSubmit hook writes)  source: 'pointer'
 *   4. fresh `randomUUID()` — printed to stderr so the user can   source: 'random'
 *      paste it into a follow-up `status` / `off` call.
 *
 * ASG.2 plausibility gate: only `source === 'pointer'` is gated. The pointer
 * can go stale (a leaky test or contamination), so the CLI cross-checks that
 * `sessions/<id>/active-task.json` or `state/tool-ledger.json` was modified
 * within `OPENSQUID_SESSION_FRESH_MS` (default 30min). Stale ⇒ refuse +
 * `process.exitCode = 2` unless `--force`. See `runtime/hooks/session_liveness.ts`.
 *
 * Exit codes:
 *   - `on` / `off`     — 0 (idempotent), or 2 if the pointer's stale
 *   - `status`         — 0 if any signal is on, 1 if completely off, 2 if the
 *                        pointer's stale (gate fires before on/off check)
 *
 * Imports from: node:crypto, commander, ../../runtime/automation_state.js.
 * Imported by: src/cli.ts.
 */
import { type PlausibilityResult } from '../../runtime/hooks/session_liveness.js';
import type { Command } from 'commander';
export interface AutomationCliDeps {
    stdout?: (s: string) => void;
    stderr?: (s: string) => void;
    randomSessionId?: () => string;
    /** Reads the live-session pointer written by the UserPromptSubmit hook. */
    readCurrentSession?: () => Promise<string | null>;
    /**
     * Plausibility probe — default: the real `isSessionPlausible` over the
     * filesystem. Tests inject a stub so they don't depend on real fs mtimes.
     */
    isSessionPlausible?: (sid: string) => Promise<PlausibilityResult>;
}
/** Register `opensquid automation` on the parent program. */
export declare function registerAutomation(parent: Command, deps?: AutomationCliDeps): Command;
//# sourceMappingURL=automation.d.ts.map