agent-contracts 0.30.4 → 0.32.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 +10 -0
- package/cli-contract.yaml +1 -1
- package/dist/cli.js +76 -3687
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +99 -16
- package/dist/index.js +79 -3687
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -278,6 +278,8 @@ A **Guardrail Policy** defines enforcement strategy for guardrails:
|
|
|
278
278
|
|
|
279
279
|
* rules — array of enforcement rules mapping guardrails to actions
|
|
280
280
|
* Each rule specifies: severity (`critical`/`mandatory`/`warning`/`info`), action (`block`/`warn`/`shadow`/`info`), override permissions
|
|
281
|
+
* `action` supports a conditional form for state-dependent enforcement: `{ default: "block", when: { maintenance: "shadow" } }`
|
|
282
|
+
* Available states are declared system-wide via `system.states`
|
|
281
283
|
|
|
282
284
|
### Handoff Type
|
|
283
285
|
|
|
@@ -337,6 +339,7 @@ Design regressions become testable.
|
|
|
337
339
|
* **Inheritance with merge operators via `extends`**
|
|
338
340
|
* **Guardrail definitions** for cross-cutting process constraints
|
|
339
341
|
* **Guardrail policies** with configurable enforcement (block/warn/shadow/info)
|
|
342
|
+
* **State-dependent guardrail action** — `action` accepts a conditional form `{ default, when }` keyed by `system.states` for workspace-mode-aware enforcement
|
|
340
343
|
* **Software bindings** (DI) for tool-specific guardrail implementation (Cursor, Git, GitHub)
|
|
341
344
|
* **Guardrail generation** from DSL + policy + bindings via `generate guardrails`
|
|
342
345
|
* **Navigation index** — compile-time artifact-centric model mapping artifacts to operations, agent permissions, relations, and action routes
|
|
@@ -374,6 +377,7 @@ system:
|
|
|
374
377
|
- audit
|
|
375
378
|
- release
|
|
376
379
|
- reflect
|
|
380
|
+
states: [] # optional — named workspace states for conditional guardrail action
|
|
377
381
|
|
|
378
382
|
agents: {}
|
|
379
383
|
tasks: {}
|
|
@@ -1536,6 +1540,12 @@ guardrail_policies:
|
|
|
1536
1540
|
- guardrail: no-force-push
|
|
1537
1541
|
severity: critical
|
|
1538
1542
|
action: block
|
|
1543
|
+
- guardrail: branch-lock
|
|
1544
|
+
severity: critical
|
|
1545
|
+
action:
|
|
1546
|
+
default: block
|
|
1547
|
+
when:
|
|
1548
|
+
maintenance: shadow
|
|
1539
1549
|
- guardrail: english-only-code
|
|
1540
1550
|
severity: warning
|
|
1541
1551
|
action: warn
|
package/cli-contract.yaml
CHANGED