AGENTS.md@packages/chat-gateway/src/guard agentsA
AGENTS.md@packages/chat-gateway/src/guard is agent-read markdown (agents) from blackbelttechnology/pi-agent-dashboard.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# DOX — packages/chat-gateway/src/guard
Files in this directory. One row per source file. See change: add-chat-gateway.
| File | Purpose |
|------|---------|
| `policy.ts` | The PURE L3 decision engine. `decideToolCall(toolName, policy)` — DENY-FIRST: explicit `allow` > explicit `approval` > `defaultAction` (default `"deny"`). An unrecognised tool name is denied, so the default fails closed; an empty/non-string name is denied rather than matching loosely. Deliberately NOT gamalan's prompt-injection guard — that shape is arguable out of a decision by model output, whereas pi's `tool_call` return is a hard gate. |
| `index.ts` | The companion pi extension loaded into gateway-SPAWNED sessions ONLY (attached sessions are owner-trusted and never handed it). `createToolCallGuard` returns the `tool_call` handler: allow ⇒ `undefined`, deny ⇒ `{block:true, reason}`, approval ⇒ `ctx.ui.confirm(...)` (which the bridge routes PromptBus → gateway → Discord yes/no). FAIL CLOSED (C3): an unanswered approval, a throwing confirm, or a timer expiry all resolve to BLOCK — never auto-allow. Timers are injectable for tests. Default export is the pi extension entrypoint; `policyFromEnv()` reads the…
…Read the whole file at its exact version.
How to install
mdr add blackbelttechnology/pi-agent-dashboard/packages/chat-gateway/src/guard/AGENTS.md@git:20260918.2f0b7e4mdr add blackbelttechnology/pi-agent-dashboard/packages/chat-gateway/src/guard/AGENTS.md@sha256:3e4af6ec872aac9aPin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_bujyugeyjavyoft7)
1 badge views in 30 days
Versions
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (1907 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
blackbelttechnology/pi-agent-dashboard · 299 stars · license MIT · pushed 2026-09-23 · branch develop
API
GET https://markdownregistry.com/api/v1/artifacts/art_bujyugeyjavyoft7 GET https://markdownregistry.com/api/v1/resolve?ref=blackbelttechnology/pi-agent-dashboard/packages/chat-gateway/src/guard/AGENTS.md GET https://markdownregistry.com/api/v1/blob/3e4af6ec872aac9a96aa731543bd8e315be9ee8873523e8a6c35783f5763208e
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.