/**
 * Engine vocabulary gate — pre-commit check enforcing substrate purity
 * in engine repos (0.7.21 / drift D6).
 *
 * Wired into the PreToolUse hook for `git commit` commands when the
 * cwd is detected as an engine repo. Catches commit messages AND
 * staged content (CHANGELOG.md, code comments, etc.) that reference
 * consumer-product names like `opensquid` or `claude code` — engine
 * is general substrate and must not name specific consumers per
 * `[[feedback_engine_vocabulary_discipline]]`.
 *
 * Why this gate exists: the existing `substrate-purity` pattern in
 * drift-patterns.ts only matched commit messages where the bash
 * command itself contained the path `loop/engine`. Real engine work
 * happens in cwd /Users/slee/projects/loop/engine/ with the command
 * just `git commit -m "..."` — the path isn't in the command. This
 * gate uses cwd directly + scans both the -m message AND the staged
 * diff content.
 *
 * Detection:
 *   1. Skip silently if cwd doesn't look like an engine repo.
 *   2. Parse the -m message text from the bash command; check for
 *      consumer names.
 *   3. Run `git diff --cached` and scan added lines for consumer
 *      names, excluding `src/host/claude_code/**` paths and lines
 *      that look like MIT attribution comments.
 *   4. Block with an actionable message if any leak found.
 *
 * Fail-open invariant: any error parsing the command, running git, or
 * scanning the diff → allow with stderr warning. Mirrors the
 * workflow-gate / versioning-gate precedent.
 *
 * Override: `OPENSQUID_SKIP_ENGINE_VOCAB_GATE=1` bypasses with loud
 * stderr warning. For genuine emergencies where naming the consumer
 * is unavoidable (e.g. a migration-note commit explicitly tracking
 * cross-product impact).
 */
export interface EngineVocabGateInput {
    /** Working directory — used to detect if this is an engine repo and
     * as the cwd for the git diff subprocess. */
    cwd?: string;
    /** The full bash command text — scanned for `-m "..."` message content. */
    bashCommand?: string;
}
export interface EngineVocabGateResult {
    block: boolean;
    stderr: string;
}
/**
 * Evaluate the gate against a planned `git commit` invocation.
 *
 * Exported for direct unit testing.
 */
export declare function evaluateEngineVocabGate(input: EngineVocabGateInput): Promise<EngineVocabGateResult>;
/**
 * Heuristic: is this cwd an engine repo?
 *
 * Catches:
 *   - /any/path/engine (engine repo as a directory inside a monorepo)
 *   - /any/path/loop-engine (standalone engine repo)
 *   - /any/path/<anything>-engine
 *
 * False-positives risk: a `/Users/foo/projects/build-engine/` Vue.js
 * project would match. Acceptable — this gate runs only on `git commit`
 * in that dir, and the regex would not match any of its content. Net
 * cost: one git-diff subprocess call. Cheap.
 *
 * Exported for direct unit testing.
 */
export declare function isEngineRepoCwd(cwd: string): boolean;
/**
 * Parse a `git commit -m "..."` (or `-m '...'`) message from a bash
 * command and check for consumer names. Returns the first matched
 * consumer-name substring, or null if clean.
 *
 * Handles common shells: -m followed by a quoted string, OR -m
 * followed by a HEREDOC (`-m "$(cat <<'EOF' ... EOF)"`). For HEREDOC
 * the regex below catches the body since it's embedded in the bash
 * command string.
 *
 * Exported for direct unit testing.
 */
export declare function scanCommitMessage(bashCommand: string): string | null;
interface DiffHit {
    file: string;
    match: string;
}
/**
 * Run `git diff --cached` and scan added lines for consumer names.
 * Excludes structurally-allowed paths and MIT attribution comments.
 *
 * Returns the list of hits (empty if clean).
 *
 * Exported for direct unit testing.
 */
export declare function scanStagedDiff(cwd: string): Promise<DiffHit[]>;
/**
 * Parse a unified diff text and return consumer-name hits on added
 * lines, with path-prefix and attribution-comment exclusions applied.
 *
 * Exported for direct unit testing (avoids needing a git subprocess
 * in unit tests).
 */
export declare function parseDiffForConsumerNames(diff: string): DiffHit[];
/** Exported for the test suite. */
export declare function checkOverrideEnv(): boolean;
export {};
//# sourceMappingURL=engine-vocab-gate.d.ts.map