/** * The CI guard — creating and triggering CI is owner-gated. * * Two routes, both config-gated (`guards.ci.create` / `guards.ci.run`; off by * default for every project): * * create a write/edit that adds or changes a workflow definition — under * `.github/workflows/`, `.gitea/workflows/`, `.forgejo/workflows/`, * or a `.gitlab-ci.yml` — is blocked. A workflow file is code the * forge runs on the next push; writing one is arming it. * run `gh workflow run`, `gh run rerun`, and the `dispatches` REST * endpoint are blocked: triggering CI consumes the repo's minutes * and runs its automation without the owner watching. * * The only way through is an explicit owner instruction in the same turn, * carried as the command's first word: `AW_ALLOW=ci`. Reads (`gh workflow * list`, `gh run list`, `gh run view`) are not gated. */ import { type GuardDecision, type ToolCallLike } from "./guard-util.js"; export declare const CI_CREATE_REASON: string; export declare const CI_RUN_REASON: string; /** * The `tool_call` gate. `create` judges write/edit targets, `run` judges bash * commands; both are no-ops while disabled. Reads pass. */ export declare function ciGuard({ toolName, command, path }: ToolCallLike, policy?: { create: boolean; run: boolean; }): GuardDecision;