|
|
||
|---|---|---|
| guardrail_space | ||
| src/guardrail_space | ||
| tests | ||
| .gitignore | ||
| AGENTS.md | ||
| README.md | ||
| guard_logs.jsonl | ||
| pyproject.toml | ||
| setup.cfg | ||
| setup.py | ||
| test.sh | ||
README.md
GuardRail.Space — Safety Contracts DSL (partial)
This repository contains a minimal Python package implementing a lightweight SafetyContract DSL and a tiny runtime policy engine suitable for use as the basis of GuardRail.Space. It is intentionally small: a focused, well-tested chunk that implements SafetyContracts, basic budget checks, and a policy engine that can veto or rewrite proposed actions.
What is included in this change
- A small Python package
guardrail_spacewith:contract.py: SafetyContract dataclasses and checks
engine.py: a minimal policy engine that can accept, veto, or rewrite actions- Unit tests under
tests/exercising contract evaluation and engine behavior - Packaging metadata (
pyproject.toml,setup.cfg) sopython3 -m buildworks test.shwhich runs the test-suite and builds a sdist/wheel This is a focused increment toward the full GuardRail.Space vision (WASM runner, ROS shims, fuzz harness, etc.). Next steps can extend the DSL, add serialization (YAML/DSL), shadow runner integration, and the situation-summary artifacts.
Added in this iteration:
src/guardrail_space/capsule.py: Poetic Situation Capsule generator for tiny (128-512B) human+machine readable summaries useful in low-bandwidth operator triage. See tests/test_capsule.py for deterministic behavior and size checks.src/guardrail_space/collision_oracle.py: deterministic pairwise plan-collision oracle useful for multi-agent custody-window checks and small sidecar conflict verdicts. See tests/test_collision_oracle.py for examples and determinism.