Brings over the uncommitted agent-mei work (Mac checkout, Sep 22) plus box follow-ups (Oct 17: agent_mei action namespace in keymap/zed.rs, MEI_BRIDGE.md, RENAME_AGENT_MEI.md, unmetered receipts report 0 uJ). joule_core, JOULE_CODE_* and JouleDB names unchanged. *.bak.* scratch files excluded.
1.8 KiB
1.8 KiB
MEI bridge (protocol lives in mei-studio)
agent-mei opens MEI (Machine Educated Intelligence) artifacts authored in MeiStudio. The shared wire is implemented in mei-studio (Rust 1.94.1 — do not bump this editor’s toolchain to chase it):
- Protocol crate:
mei-studio/crates/agent-mei-bridge - Docs:
mei-studio/docs/agent-mei.md - Exact Mac patch steps:
mei-studio/docs/agent-mei-mac-patch.md
Landed in this tree (source)
crates/agent_mei_panel/src/agent_mei_panel.rs—control_dispatch:"mei_open";"open"routes.mei.json/.meito it.crates/agent_mei_panel/src/mei_panel.rs— GPUIMeiReceiptPanelovermei.panel/v1(tier, joules, measured_vs_modelled, merkle, jcr1_rows + grant toast).crates/zed/src/zed.rs— dock loadsMeiReceiptPanel.crates/joule_core/src/control.rs— MCP toolagent_mei_mei_open.crates/joule_core/src/cascade_gate.rs— MEI grant alignment note (no auto-export / no auto-ACP).
Shells PATH binary mei-open (prefer binary over path-dep — toolchain split). No network / no phone-home.
Headless today (works without GPUI)
mei-open path/to/graph.mei.json # validate + handle JSON
mei-open path/to/graph.mei.json --panel # mei.panel/v1 for the dock
mei-open path/to/graph.mei.json --grant-env # → JOULE_CODE_GRANT=l0,l1,l2,l3[,l4]
Naked L4 is refused unless the artifact’s grant_capabilities contains l4_frontier
(aligned with omitting l4 from JOULE_CODE_GRANT / JCR-1 cascade gate).
Smoke (Mac, after mei-open on PATH)
export JOULE_CODE_CONTROL_SOCK=/tmp/jc-mei.sock
export JOULE_CODE_GRANT=l0,l1,l2,l3 # no l4
agent-mei /path/to/project &
agent-mei --jc-control mei_open --jc-params '{"path":"/path/to/examples/demo.mei.json"}'
agent-mei --jc-control state