@agenttrail/guardrails 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/{chunk-DBB7HO4T.js → chunk-3NDBRXP3.js} +344 -226
- package/dist/chunk-3NDBRXP3.js.map +1 -0
- package/dist/{chunk-C4B2NPWH.js → chunk-FTTMZCDH.js} +2 -2
- package/dist/chunk-FTTMZCDH.js.map +1 -0
- package/dist/guardrails.cjs +343 -225
- package/dist/guardrails.cjs.map +1 -1
- package/dist/guardrails.d.cts +95 -9
- package/dist/guardrails.d.ts +95 -9
- package/dist/guardrails.js +7 -1
- package/dist/index.cjs +344 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -2
- package/dist/schema.cjs +1 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +7 -2
- package/dist/schema.d.ts +7 -2
- package/dist/schema.js +1 -1
- package/package.json +10 -1
- package/dist/chunk-C4B2NPWH.js.map +0 -1
- package/dist/chunk-DBB7HO4T.js.map +0 -1
package/README.md
CHANGED
|
@@ -174,6 +174,18 @@ At most four quoted arguments are recognised. A carrier that can be made to exec
|
|
|
174
174
|
the checker does not have. And an MCP tool whose input carries the same text is not exempt either,
|
|
175
175
|
because exempting a JSON blob would exempt a shell-running MCP server along with it.
|
|
176
176
|
|
|
177
|
+
**MCP coverage.** A command rule fires on `Bash`, `PowerShell` *and* any `mcp__*` tool: the guard hands
|
|
178
|
+
the checker an MCP call's serialized `tool_input` as the same command text every command rule reads, so
|
|
179
|
+
a command shape run through an MCP server — `{"command":"rm -rf /"}` — is caught, not ignored. Two
|
|
180
|
+
honest limits follow from that. First, a rule whose pattern is anchored to the start of the command
|
|
181
|
+
(`^…` or a command-position class) may not fire inside the JSON, where the shape sits after a `"`
|
|
182
|
+
rather than at a command boundary; the `\b`-anchored rules — most of the corpus — do fire. Second, the
|
|
183
|
+
quoted-mention exemptions are shell-only, so an MCP payload that merely *names* a command in a text
|
|
184
|
+
field (`{"title":"fix the rm -rf / bug"}`) is matched the same as one that runs it — a JSON blob cannot
|
|
185
|
+
be told apart from a shell-running MCP server. File rules match by path on whichever file tool a client
|
|
186
|
+
uses. No rule is shell-only by design; a rule that does not reach the MCP channel does so because its
|
|
187
|
+
pattern, not its label, does not match the serialized shape.
|
|
188
|
+
|
|
177
189
|
## What these rules deliberately do not catch
|
|
178
190
|
|
|
179
191
|
Stated here rather than discovered later. Every one is a real limit of the format, not something
|