Download frontierlab/isolation.py from Jaycee766/FrontierLab-Meta-Hackathon-2026: direct link, hf CLI and curl.
- Browser
- Download file 938 Bytes
-
https://huggingface.co/spaces/Jaycee766/FrontierLab-Meta-Hackathon-2026/resolve/main/frontierlab/isolation.py
- Command line
-
hf download hf://spaces/Jaycee766/FrontierLab-Meta-Hackathon-2026/frontierlab/isolation.py
-
curl -L -o isolation.py https://huggingface.co/spaces/Jaycee766/FrontierLab-Meta-Hackathon-2026/resolve/main/frontierlab/isolation.py
938 Bytes
| """Offline FrontierLab capability gate (NOT real OpenShell enforcement).""" | |
| from dataclasses import dataclass, asdict | |
| from datetime import datetime, timezone | |
| SAFE_TASKS = {"synthetic_conflict", "synthetic_heterogeneity"} | |
| class Decision: | |
| action: str | |
| target: str | |
| allowed: bool | |
| rule: str | |
| timestamp: str | |
| enforcement: str = "SIMULATED_APPLICATION_GATE_ONLY" | |
| def as_dict(self): | |
| return asdict(self) | |
| def evaluate(action: str, target: str) -> Decision: | |
| if action in {"read_fixture", "compute"} and target in SAFE_TASKS: | |
| allowed, reason = True, "ALLOW_EXPLICIT_SYNTHETIC_TASK" | |
| elif action == "write_audit" and target == "isolated_test_report": | |
| allowed, reason = True, "ALLOW_SANDBOX_LOCAL_REPORT_ONLY" | |
| else: | |
| allowed, reason = False, "DENY_NOT_ON_ALLOWLIST" | |
| return Decision(action, target, allowed, reason, datetime.now(timezone.utc).isoformat()) | |