/**
 * Workflow gate — engine-backed commit-blocking check (v0.6.1).
 *
 * Wired into the PreToolUse hook when the planned tool call is
 * `git commit` (without `--amend`). Checks that the active task's
 * phase ledger has the required workflow phases logged; blocks the
 * commit with an actionable stderr message if not.
 *
 * The required-phase policy is fixed for now (per user direction):
 * `audit` + `post_research` must be logged. These are the phases
 * empirically skipped under "ship fast" pressure. The other phases
 * (pre_research, learn, code, test, fix) are either obvious from the
 * commit itself or naturally happen — gating them too creates
 * paperwork friction without catching real drift.
 *
 * Fail-open invariant: any error reaching the engine, parsing the
 * transcript, or detecting the active task → return non-blocking
 * with a stderr warning. The gate is best-effort drift protection,
 * not a hard safety wall (mirrors the honesty-ledger precedent at
 * pre-tool-use.ts).
 */
/**
 * Resolve the set of phases that must be logged before `git commit`
 * is allowed.
 *
 * 0.7.16 (drift-as-codex chunk 3a): the required-phase list now comes
 * from `bundled-default/codex.yaml`'s `default_workflow_id` workflow,
 * filtered to phases with `required: true`. Previously this was a
 * hard-coded `REQUIRED_PHASES` array; the codex is now the single
 * source of truth, which is what drift-as-codex was for.
 *
 * Fail-open: if the codex can't be loaded (missing file, parse error,
 * missing workflow id), the gate disables itself with a stderr
 * warning rather than blocking every commit. The codex is bundled
 * in the npm package so this should be unreachable in normal use.
 */
export declare function getRequiredPhasesFromCodex(): readonly string[];
export interface WorkflowGateInput {
    /** Path to the session's JSONL transcript. Optional — gate falls
     * back to allow-commit when absent (can't detect active task). */
    transcriptPath?: string;
}
export interface WorkflowGateResult {
    /** True when the commit should be blocked. */
    block: boolean;
    /** Stderr message (always present when stderr should be written;
     * non-blocking warnings also use this). */
    stderr: string;
}
/**
 * Evaluate whether the planned `git commit` should be blocked.
 * Pure function over its inputs + an engine RPC; safe to call from
 * the hook handler.
 */
export declare function evaluateWorkflowGate(input: WorkflowGateInput): Promise<WorkflowGateResult>;
/**
 * Emergency-override env var. Lets the user bypass the gate when they
 * know what they're doing. Logged loudly to stderr so the bypass is
 * always visible in scrollback / CI logs.
 *
 * Exported for the test suite.
 */
export declare function checkOverrideEnv(): boolean;
//# sourceMappingURL=workflow-gate.d.ts.map