/**
 * `olam flywheel install-sessionstart-hook [--scope project|user] [--uninstall]`
 *
 * Wires `olam flywheel session-start` into `<scope>/.claude/settings.json`
 * hooks.SessionStart so Claude Code injects operator-state context (active
 * workspace + active world + most-recent wake-brief) before the first user
 * prompt. The 4th defense layer in Olam's hook chain (FF / PreToolUse /
 * PostToolUse / Stop).
 *
 * Coexists with the existing skills-sync SessionStart hook
 * (sentinel `olam-skills-sync-hook-v1`). Both entries sit side-by-side in
 * the SessionStart array; Claude Code runs each matcher in order and merges
 * their `additionalContext` outputs into the first turn's system prompt.
 *
 * Idempotent: re-running over an existing install is a no-op (sentinel match
 * via `mergeHomeSettingsJson`).
 *
 * Pairs with: `docs/runbooks/install-sessionstart-hook.md`,
 *             `docs/decisions/051-sessionstart-hook-4th-defense.md`.
 */
import type { Command } from 'commander';
export declare const SESSIONSTART_HOOK_STAGE = "SessionStart";
export declare const SESSIONSTART_HOOK_TIMEOUT_MS = 5000;
interface SessionStartHookMatcher {
    readonly matcher: string;
    readonly hooks: ReadonlyArray<{
        readonly type: 'command';
        readonly command: string;
        readonly timeout: number;
    }>;
}
/**
 * Build the matcher-entry object that lands under hooks.SessionStart in
 * .claude/settings.json. Embeds the sentinel as a leading no-op shell
 * assignment so `command.includes(sentinel)` works for idempotent install +
 * surgical uninstall, then guards against uninstalled-olam to keep the hook
 * silent when the CLI is missing (audited by `audit:hook-guards`).
 */
export declare function buildSessionStartHookEntry(): SessionStartHookMatcher;
export interface InstallResult {
    readonly status: 'installed' | 'already-present' | 'no-op';
    readonly filePath: string;
    readonly backupPath: string | null;
}
/**
 * Install (idempotent) — programmatic API for both the CLI action and tests.
 * Creates parent dir if needed; backs up an existing settings.json before
 * writing (auto-deletes the backup when the install is a no-op).
 */
export declare function installSessionStartHook(filePath: string): InstallResult;
export interface UninstallResult {
    readonly status: 'removed' | 'not-found' | 'no-settings';
    readonly filePath: string;
}
/**
 * Uninstall (surgical) — walks hooks.SessionStart, drops inner entries whose
 * command contains the sentinel, drops the outer matcher when its hooks
 * array becomes empty. Other SessionStart entries (e.g. the skills-sync
 * hook) are preserved verbatim.
 */
export declare function uninstallSessionStartHook(filePath: string): UninstallResult;
export declare function registerFlywheelInstallSessionStartHook(parent: Command): void;
export {};
//# sourceMappingURL=install-sessionstart-hook.d.ts.map