| audit-mode | Set to true to run `swarm audit` against a PR diff. When true, the
action operates as a merge gate: exit 0 = pass, exit 1 = blocking
findings. Pairs with `pr` (default: ${{ github.event.pull_request.number }}).
| no | false |
| pr | PR reference for audit mode. owner/repo#NN, a GitHub PR URL, or just
the PR number (the action infers owner/repo from GITHUB_REPOSITORY).
| no | — |
| diff-file | Path to a unified diff on disk (alternative to `pr`). Used by
audit mode when a diff is already materialized.
| no | — |
| emit-aibom | Emit an AI-BOM artifact alongside the audit. Values: cyclonedx-ml |
spdx-ai | both. Output written to .swarm/aibom/.
| no | — |
| audit-comment | When true (the default in audit mode), the action posts the rendered
Markdown comment to the PR using GITHUB_TOKEN.
| no | true |
| goal | Natural-language goal. Compiled into a contract and executed unless
contract-only is true. Mutually exclusive with contract-path.
| no | — |
| contract-path | Path to an already-compiled contract directory (skips compile). Use
this when you compile contracts in a prior step and want to run them
verbatim. Mutually exclusive with goal.
| no | — |
| contract-only | When true, compile the goal into a contract and stop without
executing it. The contract directory under .swarm/contracts/ is the
artifact. Requires goal (cannot be combined with contract-path).
| no | false |
| contract-file | Path to a YAML or JSON contract file. Consumed by the deterministic
extractor; pairs with goal to produce a compiled contract without an
LLM round-trip.
| no | — |
| contract-module | Path to a TS/JS module whose default export is a contract object.
Deterministic extractor only.
| no | — |
| extractor | Extractor provider: deterministic | local | anthropic. | no | — |
| session | Session provider: deterministic | local | anthropic. | no | — |
| model | Model id override (anthropic provider). API keys are NEVER passed as
inputs, set ANTHROPIC_API_KEY through the workflow `env:` block.
| no | — |
| local-backend | Local backend: openai-compatible | ollama | llama-cpp | vllm. | no | — |
| local-base-url | Base URL for the local provider. | no | — |
| local-model-extractor | Local-provider model id for the extractor (compile pass). | no | — |
| local-model-session | Local-provider model id for the session (run pass). | no | — |
| local-grammar | Grammar mode: auto | gbnf | json-schema | outlines | none. | no | — |
| external-patches-queue | Path to a JSONL queue of patch envelopes (deterministic session). | no | — |
| external-patches-dir | Path to a watched dir of patch envelopes (deterministic session). | no | — |
| falsifiers | on (default) | off, disables falsifier adapter calls when off. | no | — |
| mode | Execution mode: single (default) | tournament. | no | — |
| candidates | Tournament candidates per round (1-8). Ignored in single mode. | no | — |
| max-obligations | Cap on the number of obligations attempted per run. | no | — |
| cost-cap | Live output-token ceiling; aborts streams once projected output crosses it. | no | — |
| repo-root | Project root for repo-context discovery (default: GITHUB_WORKSPACE). | no | — |
| working-directory | Directory to cd into before running. Default: GITHUB_WORKSPACE. | no | — |
| result-path | Where the structured run-result JSON is written. Default:
/tmp/swarm-result.json. The entrypoint always reads this path back
into the `result` step output.
| no | — |
| extra-args | Additional raw CLI flags appended verbatim to the swarm invocation,
whitespace-separated (shell-style quoting respected). Use this only
for flags not exposed above (e.g. `--snapshot-cleanup always`,
`--forbid-import lodash`, `--falsifier-scheduler ucb1`).
| no | — |