|
|
||
|---|---|---|
| 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 checksengine.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.