@agenttrail/guardrails 0.2.6 → 0.2.7
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 +11 -2
- package/dist/{chunk-XIRL7M4H.js → chunk-3BH4CH3D.js} +3 -3
- package/dist/{chunk-XIRL7M4H.js.map → chunk-3BH4CH3D.js.map} +1 -1
- package/dist/{chunk-U7KZ447W.js → chunk-GBV64XPP.js} +13 -2
- package/dist/chunk-GBV64XPP.js.map +1 -0
- package/dist/guardrails.cjs +2 -2
- package/dist/guardrails.cjs.map +1 -1
- package/dist/guardrails.d.cts +4 -4
- package/dist/guardrails.d.ts +4 -4
- package/dist/guardrails.js +1 -1
- package/dist/index.cjs +14 -3
- 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 +6 -2
- package/dist/{schema-B2pYoi9Z.d.cts → schema-DmT-Vm1T.d.cts} +110 -23
- package/dist/{schema-B2pYoi9Z.d.ts → schema-DmT-Vm1T.d.ts} +110 -23
- package/dist/schema.cjs +12 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +5 -1
- package/package.json +1 -1
- package/dist/chunk-U7KZ447W.js.map +0 -1
package/README.md
CHANGED
|
@@ -348,6 +348,9 @@ Guardrails are meant to be contributed. The bar is not "clever regex"; it is **d
|
|
|
348
348
|
thing, and stay quiet on the near-miss**.
|
|
349
349
|
|
|
350
350
|
**1. Write it**, following the shape above. Give it a `description` that says what it misses.
|
|
351
|
+
If you already use it with the guard, `agenttrail-guard guardrails export <id>` writes it in
|
|
352
|
+
this library's format; [Submit a guardrail](CONTRIBUTING.md#submit-a-guardrail) walks through
|
|
353
|
+
it.
|
|
351
354
|
|
|
352
355
|
**2. Check the shape locally:**
|
|
353
356
|
|
|
@@ -398,8 +401,9 @@ so the guardrail matches nothing, forever, with no error anywhere. Write a singl
|
|
|
398
401
|
|
|
399
402
|
### Ready to open a pull request?
|
|
400
403
|
|
|
401
|
-
[CONTRIBUTING.md](CONTRIBUTING.md)
|
|
402
|
-
|
|
404
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) walks through
|
|
405
|
+
[submitting a guardrail](CONTRIBUTING.md#submit-a-guardrail) step by step, and has a
|
|
406
|
+
pre-submission checklist, local build and test commands, and where to report what. Please follow the [Code of Conduct](CODE_OF_CONDUCT.md),
|
|
403
407
|
and report vulnerabilities privately as described in [SECURITY.md](SECURITY.md).
|
|
404
408
|
|
|
405
409
|
## Stability and versioning
|
|
@@ -485,6 +489,11 @@ follow from that:
|
|
|
485
489
|
merely *names* a command in a text field (`{"title":"fix the rm -rf / bug"}`) is matched the same
|
|
486
490
|
as one that runs it; a JSON blob cannot be told apart from a shell-running MCP server.
|
|
487
491
|
|
|
492
|
+
A condition can say which text it reads with `channel`: `command` (the text a call runs) or `content`
|
|
493
|
+
(the call's whole input). When it is omitted the channel is `command`, unless the condition's `label`
|
|
494
|
+
starts with `mcp__`, which makes it `content`. A condition carrying `channel` needs `detail_contains` or
|
|
495
|
+
`detail_matches`. Versions up to and including 0.2.6 reject the field.
|
|
496
|
+
|
|
488
497
|
File guardrails match by path on whichever file tool a client uses. No guardrail is shell-only by design; a
|
|
489
498
|
guardrail that does not reach the MCP channel does so because its pattern, not its label, does not match
|
|
490
499
|
the serialized shape.
|
|
@@ -3924,8 +3924,8 @@ function isPack(value) {
|
|
|
3924
3924
|
}
|
|
3925
3925
|
|
|
3926
3926
|
// src/stamp.ts
|
|
3927
|
-
var CATALOG_VERSION = "0.2.
|
|
3928
|
-
var CATALOG_PUBLISHED_AT = "2026-
|
|
3927
|
+
var CATALOG_VERSION = "0.2.7";
|
|
3928
|
+
var CATALOG_PUBLISHED_AT = "2026-11-06T07:10:34Z";
|
|
3929
3929
|
|
|
3930
3930
|
// src/rules.ts
|
|
3931
3931
|
var RULES_BY_PACK = {
|
|
@@ -3975,4 +3975,4 @@ export {
|
|
|
3975
3975
|
getRule,
|
|
3976
3976
|
rulesForPack
|
|
3977
3977
|
};
|
|
3978
|
-
//# sourceMappingURL=chunk-
|
|
3978
|
+
//# sourceMappingURL=chunk-3BH4CH3D.js.map
|