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.
90 lines
3.1 KiB
Markdown
90 lines
3.1 KiB
Markdown
# MeiFleet ↔ agent-mei
|
|
|
|
Brand: **agent-mei** hosts MeiFleet.
|
|
|
|
## Load roster
|
|
|
|
```bash
|
|
meifleet roster path/to/demo.fleet.toml
|
|
# control:
|
|
fleet_roster { "path": "..." }
|
|
# open on *.fleet.toml routes here
|
|
```
|
|
|
|
## Activate bot (bind grant)
|
|
|
|
```text
|
|
fleet_activate { "id": "research", "apply_grant": true }
|
|
```
|
|
|
|
- Rebuilds live `CascadeGate` from the bot's verbs + `max_joules` (→ µJ).
|
|
- Sets process `JOULE_CODE_GRANT` / `JOULE_CODE_BUDGET_UJ` for child CLIs.
|
|
- Stores `fleet_path`, `drivers`, `connectors` on `fleet_active` for later BYOA / connectors / routines.
|
|
- Never auto-ACP. L4 only if the bot's grant allows it.
|
|
- `apply_grant: false` selects the bot in UI/state without changing the gate.
|
|
|
|
MCP: `agent_mei_fleet_activate`.
|
|
|
|
## Computer (grant-gated)
|
|
|
|
Requires an activated bot with `apply_grant: true`.
|
|
|
|
```text
|
|
computer_probe { "allow_host": true }
|
|
computer_probe { "allow_local_vm": true }
|
|
computer_probe { "allow_box": true }
|
|
computer_shell { "cmdline": "echo ok", "allow_host": true }
|
|
computer_shell { "cmdline": "pwd", "allow_local_vm": true }
|
|
```
|
|
|
|
- Uses the active bot's `computer` class (`none` | `host` | `local_vm` | `box`).
|
|
- Each privileged class needs its own allow_* opt-in.
|
|
- Shells PATH `meifleet`; receipt schema `meifleet.act/v1` (unmetered → 0 uj + provenance none; never invent).
|
|
- LocalVm: `MEIFLEET_LOCAL_VM_ROOT` (+ optional `MEIFLEET_LOCAL_VM_DOCKER`).
|
|
- Box: `MEIFLEET_BOX_URL` → `GET /v1/health`, `POST /v1/shell`.
|
|
|
|
MCP: `agent_mei_computer_probe`, `agent_mei_computer_shell`.
|
|
|
|
## BYOA (grant-gated)
|
|
|
|
Requires activated bot with grant applied. Shells PATH `meifleet byoa probe|run`.
|
|
|
|
```text
|
|
byoa_probe { "driver": "mock", "allow_byoa": true }
|
|
byoa_run { "driver": "mock", "prompt": "hello", "allow_byoa": true }
|
|
byoa_run { "driver": "claude", "prompt": "…", "allow_byoa": true, "allow_l4_driver": true }
|
|
```
|
|
|
|
- Frontier drivers need `grant.allows_l4()` + `allow_l4_driver`.
|
|
- When the bot's IR `drivers` is non-empty, unlisted kinds are refused.
|
|
- Stable non-interactive defaults: Claude/Grok `-p`, Codex `exec --skip-git-repo-check` (ARGS env still wins; FORCE_RAW optional).
|
|
- Receipt: `meifleet.byoa/v1` (unmetered → 0 uj + provenance none).
|
|
|
|
MCP: `agent_mei_byoa_probe`, `agent_mei_byoa_run`.
|
|
|
|
## Connectors / routines (thin controls)
|
|
|
|
```text
|
|
connectors_list { "allow_connectors": true }
|
|
routines_list {}
|
|
```
|
|
|
|
- Connectors: IR `connectors[]` via `meifleet connectors list|probe|invoke` (`meifleet.connector/v1`).
|
|
- Live MCP when `MEIFLEET_MCP_<ID>_CMD` / `MEIFLEET_CONNECTORS_CATALOG` set; else stubs (`web-search`, `filesystem`).
|
|
- Invoke needs grant ≥ l2 + `allow_connectors`.
|
|
- Routines: fleet-level `[[routines]]` via `meifleet routines list|due|fire`.
|
|
- Optional `driver` (default mock); frontier fire needs L4 + `--allow-byoa --allow-l4-driver`.
|
|
|
|
MCP: `agent_mei_connectors_list`, `agent_mei_routines_list`.
|
|
|
|
## Local Box backend
|
|
|
|
```bash
|
|
meifleet boxd --bind 127.0.0.1:8787
|
|
# or: meifleet-boxd --bind 127.0.0.1:8787
|
|
export MEIFLEET_BOX_URL=http://127.0.0.1:8787
|
|
meifleet probe box --allow-box
|
|
meifleet shell 'echo hi' --class box --allow-box
|
|
```
|
|
|
|
Local reference backend only — not a cloud PC. Optional `MEIFLEET_BOXD_ROOT` sandbox cwd.
|