/** * The merge guard — owner-only merges at the `tool_call` gate (issue #278). * * On 2026-09-29 an agent session ran `gh pr merge` after an owner message that * waived only the *review* ("No hace falta una review para esto"), not the * merge. Merging is owner-only, and the direct routes are self-evident — a * command that *is* a merge needs no simulation and no spelling census: * * `git merge ` the command is a merge (read-only forms — * `merge-tree`, `merge-base`, `merge-file` — stay out). * `gh pr merge` the command merges the PR. * `gh api` merge the REST endpoint (`pulls/N/merge`) and the GraphQL * mutations (`mergePullRequest`, `mergeBranch`, * `enablePullRequestAutoMerge`) — the same merge by * other syntax, still self-evident. * `git pull` fetch + merge by default; only `--rebase`/`--ff-only` * (no merge commit) pass. * * The guard is config-gated (`guards.merge`): off by default for every * project, enabled where an operator asks for it. The only way through is an * explicit owner instruction in the same turn, carried as the command's first * word: `AW_ALLOW=merge`. * * What is deliberately out of scope: merges hidden inside scripts or * interpreter one-liners. A text predicate that chased every wrapper would * grow a regex zoo and still miss the file it never read; the direct routes * above are the honest boundary. */ import { type GuardDecision, type ToolCallLike } from "./guard-util.js"; export declare const MERGE_REASON: string; /** * The `tool_call` gate. Blocks merge shapes on the `bash` tool only — every * other tool passes, and every non-merge command passes. `enabled` comes from * the config (`guards.merge`); the guard is a no-op while disabled. */ export declare function mergeGuard({ toolName, command }: ToolCallLike, enabled?: boolean): GuardDecision;