MACHINE-WRITTEN repository — generated by CI from the TruVerifAI product repo (
plugin-core/). Hand edits are overwritten on release.
Copilot has no plugin-bundle format for hooks, so this repo carries the hook CONFIG TEMPLATES plus a vendored copy of the gate code. The recommended install is the CLI, which writes everything with absolute paths and then proves the gate fires:
npx @truverifai/init
- Write gate + commit gate on Copilot CLI, VS Code (agent hooks, Preview)
and the Copilot Cloud Agent, via
.github/hooks/truverifai-gate.jsonin your repo (commit it to cover your whole team + the Cloud Agent) or~/.copilot/hooks/for just you. - Fail-open by construction: Copilot CLI DENIES a tool call on any non-zero hook exit, so the TruVerifAI gate wraps everything in total containment — a gate crash emits an explicit allow. Your edit is never blocked by our bug.
- Copy
gates/somewhere stable, e.g.~/.truverifai/gates/current/. - Copy
truverifai-gate.jsoninto.github/hooks/in your repo and replace__GATES__with the absolute path from step 1. - Set your key:
tvai login, or exportTVAI_API_KEY=tvai_...(create one at https://truverif.ai/settings/api-keys). - Verify:
npx @truverifai/init doctor --platform copilot_cli
| Surface | Events | Notes |
|---|---|---|
| Copilot CLI | full hook set | fails CLOSED on non-zero exits — our containment guarantees exit 0 |
| VS Code | PreToolUse (Preview) | reads .github/hooks/; format may change upstream |
| Cloud Agent | preToolUse only | .github/hooks/ only; Linux bash only |