feat(hololake): expose typed runtime context and modules

This commit is contained in:
冰朔 2026-09-03 21:26:20 +08:00
commit b433611857
4 changed files with 56 additions and 3 deletions

View file

@ -49,6 +49,12 @@ if runtime_contract["transport"]["bind"] != "127.0.0.1":
errors.append("realtime bridge is not loopback-only")
if runtime_contract["mutation_gate"] != "PENDING_HUMAN_APPROVAL_TO_EXPLICIT_UI_APPROVAL_TO_EXECUTION":
errors.append("agent human approval gate missing")
if "system_context" not in runtime_contract.get("server_messages", []):
errors.append("persona-visible system context missing from GLP contract")
realtime_source = (ROOT / "src-tauri/src/realtime_bridge.rs").read_text()
for required_context in ("sourceKinds", "pendingAgentProposals", "enterpriseEntrance", "proposalIsNotExecution"):
if required_context not in realtime_source:
errors.append(f"persona-visible system context field missing: {required_context}")
baseline = json.loads((ROOT / "contracts/clean-v1-execution-baseline.json").read_text())
if baseline.get("anchor_manifest_sha256") != "7e130de78f91a32726e22e4be7d92acf4da966c8968ec359062aa8186c4243c2":
errors.append("current direct-language anchor manifest drift")