An engine (goose) member gets its own mesh server, with the crew realm key and stations (from martha#158) #181

Closed
opened 2026-11-25 11:05:56 +00:00 by venus · 3 comments
Member

Purpose (feature): an engine (goose) member reaches the crew's mesh realm through its own mesh server, as a Claude Code member does, with the realm key and stations that martha up resolved from martha.json.

Why it is its own package (RULED by Mars 2026-11-25, on martha#158): martha#158 covers Claude Code members only. Engine members have no mesh server today: src/launch_a_goose_member/the_engines_places.ts:14-17 says "the config's only server is the crew's". So there is nothing on the engine side to hand MACULA_MESH_REALMS or MACULA_MESH_STATIONS to.

Quoting martha#158 comment 3923 (Supervisor, under DECIDED 2026-11-24 "i'm not sure if station should be optional, frankly, unless it is part of the mcp config already, right?" (Raf)): "martha up hands it to every member's mesh server as MACULA_MESH_STATIONS (Claude Code and engine members alike)".

Done-when:

  • An engine member's config carries the pinned @macula-io/mcp server, under the same recorded-bytes and env-allowlist rules as a Claude Code member (src/install_the_recorded_mesh_server/).
  • It gets the same MACULA_MESH_REALMS and MACULA_MESH_STATIONS that martha#158 hands Claude Code members.
  • Tests use a fake realm endpoint and never reach an outside host.

Refs martha-ai/martha#158

Purpose (feature): an engine (goose) member reaches the crew's mesh realm through its own mesh server, as a Claude Code member does, with the realm key and stations that `martha up` resolved from martha.json. Why it is its own package (RULED by Mars 2026-11-25, on martha#158): martha#158 covers Claude Code members only. Engine members have no mesh server today: `src/launch_a_goose_member/the_engines_places.ts:14-17` says "the config's only server is the crew's". So there is nothing on the engine side to hand `MACULA_MESH_REALMS` or `MACULA_MESH_STATIONS` to. Quoting martha#158 comment 3923 (Supervisor, under DECIDED 2026-11-24 "i'm not sure if station should be optional, frankly, unless it is part of the mcp config already, right?" (Raf)): "`martha up` hands it to every member's mesh server as MACULA_MESH_STATIONS (Claude Code and engine members alike)". Done-when: - An engine member's config carries the pinned `@macula-io/mcp` server, under the same recorded-bytes and env-allowlist rules as a Claude Code member (`src/install_the_recorded_mesh_server/`). - It gets the same `MACULA_MESH_REALMS` and `MACULA_MESH_STATIONS` that martha#158 hands Claude Code members. - Tests use a fake realm endpoint and never reach an outside host. Refs martha-ai/martha#158
Member

Threat model (Uranus, before any code), read at main 37fb64bb. Build: Opus. Review: fable, r1 with Neptunus.

What changes. A Goose launch's config root names two stdio extensions instead of one: the crew's tool server (as today) and the recorded @macula-io/mcp server, which placeRecordedMeshServers places from its proved tree. The mesh server's envs carry the same MACULA_MESH_REALMS / MACULA_MESH_STATIONS that theMeshSettingsOf gives a Claude Code member (martha#158), plus a team member's pinned key (thePinnedIdentity).

Assets:

  • the member's model context, where words from outside agents could arrive;
  • the crew's realm membership and the member's mesh key;
  • the owner's environment and secrets;
  • the bytes that serve mesh tools.

Threats and how each is held:

  • T1. Substituted bytes serve the mesh tools. Reuse placeRecordedMeshServers / provedTreeOf as they are: install from the recorded lock, compare file by file before every launch, start by path confined to the tree, and refuse an unrecorded version or bin. No second copy of the rule.
  • T2. The owner's or the engine's environment reaches the server. Goose spawns an extension with its own environment, not cleared, plus envs. The launch environment is already built from nothing: root, the launch's own home, a narrow PATH. On top of that, the entry's envs empty every name the engine has except SERVER_NEEDS, the same allow-list as builtEnvironment.
    • env_keys is never written, so nothing is pulled from the engine's secret store.
    • A name in the recorded disallowed_env (PATH, LD_*, NODE_OPTIONS, …) is never written, because the engine would drop it with only a warning. It fails by name, as the crew's tool server entry does.
  • T3. A mesh answer carries an outside agent's words into the model (prompt injection). Today the_engines_places.ts:15-17 leaves wordless_answers absent on the premise "the config's only server is the crew's". That premise ends here. The engine's places get wordless_answers from the server environment that was really built (aMeshAnswersReading, as for Claude Code). Without this, the package does not ship.
  • T4. Mesh tool calls bypass the crew's gate. The mode that asks stays pinned, so every mesh tool call reaches Martha's entry under the engine's names (<ext>__<tool>, gooseToolNames). A test shows a mesh tool call judged by the entry, and that a room read goes through its gate.
  • T5. The root or the session holds another server. theRootReadBack / theServersAConfigNames and the session-store read-back move from "exactly the crew's" to "exactly the crew's and this launch's mesh entry, byte for byte". Any third server, or a changed mesh entry, still starts nothing or stops the member.
  • T6. Wrong identity.
    • A team member's mesh server pins that member's key, last, so no entry setting can replace it.
    • A solo member's server has HOME set to the launch's own home, so it never reads the owner's ~/.macula key. It gets a fresh key per launch, which is said in the docs and not hidden.
  • T7. The server outlives the launch. It is the engine's child in the engine's process group, so the existing group kill ends it. A test names it among what the end takes.
  • T8. No mesh declared. With no mesh in martha.json, the root is today's, byte for byte: no mesh server and no settings.
  • T9. Tests reach outside. Tests use a stand-in engine that never starts the server, and recorded or fake values: a fake realm document and stations on 127.0.0.1. No outside host, and no unshare-less process killing (the #195 ruling).

Out of scope: Claude Code members (#191), new mesh server versions, and Summon/delegates (still off).

**Threat model (Uranus, before any code)**, read at main 37fb64bb. Build: Opus. Review: fable, r1 with Neptunus. **What changes.** A Goose launch's config root names two stdio extensions instead of one: the crew's tool server (as today) and the recorded `@macula-io/mcp` server, which `placeRecordedMeshServers` places from its proved tree. The mesh server's `envs` carry the same `MACULA_MESH_REALMS` / `MACULA_MESH_STATIONS` that `theMeshSettingsOf` gives a Claude Code member (martha#158), plus a team member's pinned key (`thePinnedIdentity`). **Assets:** - the member's model context, where words from outside agents could arrive; - the crew's realm membership and the member's mesh key; - the owner's environment and secrets; - the bytes that serve mesh tools. **Threats and how each is held:** - **T1. Substituted bytes serve the mesh tools.** Reuse `placeRecordedMeshServers` / `provedTreeOf` as they are: install from the recorded lock, compare file by file before every launch, start by path confined to the tree, and refuse an unrecorded version or bin. No second copy of the rule. - **T2. The owner's or the engine's environment reaches the server.** Goose spawns an extension with its own environment, not cleared, plus `envs`. The launch environment is already built from nothing: root, the launch's own home, a narrow PATH. On top of that, the entry's `envs` empty every name the engine has except SERVER_NEEDS, the same allow-list as `builtEnvironment`. - `env_keys` is never written, so nothing is pulled from the engine's secret store. - A name in the recorded `disallowed_env` (PATH, LD_*, NODE_OPTIONS, …) is never written, because the engine would drop it with only a warning. It fails by name, as the crew's tool server entry does. - **T3. A mesh answer carries an outside agent's words into the model (prompt injection).** Today `the_engines_places.ts:15-17` leaves `wordless_answers` absent on the premise "the config's only server is the crew's". That premise ends here. The engine's places get `wordless_answers` from the server environment that was really built (`aMeshAnswersReading`, as for Claude Code). Without this, the package does not ship. - **T4. Mesh tool calls bypass the crew's gate.** The mode that asks stays pinned, so every mesh tool call reaches Martha's entry under the engine's names (`<ext>__<tool>`, `gooseToolNames`). A test shows a mesh tool call judged by the entry, and that a room read goes through its gate. - **T5. The root or the session holds another server.** `theRootReadBack` / `theServersAConfigNames` and the session-store read-back move from "exactly the crew's" to "exactly the crew's and this launch's mesh entry, byte for byte". Any third server, or a changed mesh entry, still starts nothing or stops the member. - **T6. Wrong identity.** - A team member's mesh server pins that member's key, last, so no entry setting can replace it. - A solo member's server has HOME set to the launch's own home, so it never reads the owner's `~/.macula` key. It gets a fresh key per launch, which is said in the docs and not hidden. - **T7. The server outlives the launch.** It is the engine's child in the engine's process group, so the existing group kill ends it. A test names it among what the end takes. - **T8. No mesh declared.** With no `mesh` in martha.json, the root is today's, byte for byte: no mesh server and no settings. - **T9. Tests reach outside.** Tests use a stand-in engine that never starts the server, and recorded or fake values: a fake realm document and stations on 127.0.0.1. No outside host, and no unshare-less process killing (the #195 ruling). **Out of scope:** Claude Code members (#191), new mesh server versions, and Summon/delegates (still off).
Member

Build plan (Uranus), after threat model 5162. Worktree martha-181-engine-mesh-server on branch uranus/181-engine-mesh-server, from main 37fb64bb. No commits yet.

  1. derive_the_config_of_a_goose_launch. theConfigOfALaunch takes the crew's server plus an optional mesh server, both written under extensions. theRootReadBack takes the exact list of keys expected: the crew's alone, or the crew's and the mesh key. Any other set is refused by name, and the byte check stays.

  2. New slice src/give_an_engine_member_its_mesh_server/. It builds the mesh server's AToolServerTheConfigNames by running a one-entry mcpServers pin of the recorded @macula-io/mcp version through placeRecordedMeshServers, so there is no second copy of the recorded-bytes and env rules.

    • From the placed entry: cmd is node, args is the confined start, and envs is the allow-list environment (the launch environment's names emptied except SERVER_NEEDS, then mesh_settings, then the pinned identity).
    • env_keys is never written. A name in the recorded disallowed_env fails by name.
  3. the_engines_places. It gets wordless_answers from the built env, as launch_a_claude_code_member.ts:583 does. The header premise ("only server is the crew's") is rewritten.

  4. the_session_store_read_back. The expected extensions list includes the mesh key when the launch has one.

  5. start_the_member_on_its_host → startOnTheEngine → launchTheGooseEngine. These pass theMeshIdentityOfAStart and theCrewsMeshOfAStart(...).settings. With no mesh declared, there is no mesh server and the root is byte-identical to today's.

  6. Tests:

    • with mesh and without (T8 bytes equal);
    • a third server, or a changed mesh entry, is refused (T5);
    • envs follow the allow-list, and a disallowed name fails (T2);
    • wordless_answers is set (T3);
    • a mesh tool call reaches the entry under the engine's names (T4).

    Everything uses a stand-in engine and a fake realm; no outside host. Process-ending tests run only inside unshare, one run at a time.

Open: the version is the one RECORDED_MESH_SERVERS holds (today 0.51.6). If several are recorded, it takes the version the crew's Claude Code members pin, if one is defined; otherwise the newest. To confirm in review.

**Build plan (Uranus)**, after threat model 5162. Worktree `martha-181-engine-mesh-server` on branch `uranus/181-engine-mesh-server`, from main 37fb64bb. No commits yet. 1. **`derive_the_config_of_a_goose_launch`.** `theConfigOfALaunch` takes the crew's server plus an optional mesh server, both written under `extensions`. `theRootReadBack` takes the exact list of keys expected: the crew's alone, or the crew's and the mesh key. Any other set is refused by name, and the byte check stays. 2. **New slice `src/give_an_engine_member_its_mesh_server/`.** It builds the mesh server's `AToolServerTheConfigNames` by running a one-entry `mcpServers` pin of the recorded `@macula-io/mcp` version through `placeRecordedMeshServers`, so there is no second copy of the recorded-bytes and env rules. - From the placed entry: `cmd` is node, `args` is the confined start, and `envs` is the allow-list environment (the launch environment's names emptied except SERVER_NEEDS, then `mesh_settings`, then the pinned identity). - `env_keys` is never written. A name in the recorded `disallowed_env` fails by name. 3. **`the_engines_places`.** It gets `wordless_answers` from the built env, as `launch_a_claude_code_member.ts:583` does. The header premise ("only server is the crew's") is rewritten. 4. **`the_session_store_read_back`.** The expected `extensions` list includes the mesh key when the launch has one. 5. **`start_the_member_on_its_host` → `startOnTheEngine` → `launchTheGooseEngine`.** These pass `theMeshIdentityOfAStart` and `theCrewsMeshOfAStart(...).settings`. With no `mesh` declared, there is no mesh server and the root is byte-identical to today's. 6. **Tests:** - with mesh and without (T8 bytes equal); - a third server, or a changed mesh entry, is refused (T5); - envs follow the allow-list, and a disallowed name fails (T2); - `wordless_answers` is set (T3); - a mesh tool call reaches the entry under the engine's names (T4). Everything uses a stand-in engine and a fake realm; no outside host. Process-ending tests run only inside unshare, one run at a time. Open: the version is the one `RECORDED_MESH_SERVERS` holds (today 0.51.6). If several are recorded, it takes the version the crew's Claude Code members pin, if one is defined; otherwise the newest. To confirm in review.
Member

Landed as 965e3df8 (PR 210). Main ci.yml is green at a10a6e98, which holds it: run 5312 (job 22334 "gate coverage" red once on a #179-family tear-down flake, recorded on #179 c5625; Mars reran it once, now green) and run 5342 green.

Done-when, by test:

  • An engine member gets its mesh server when the crew declares a mesh: give_an_engine_member_its_mesh_server.node-test.ts :70, :83, :96, :104, :112
  • The goose launch's config carries it: derive_the_config_of_a_goose_launch.node-test.ts :165, :179, :185
  • The launch wiring starts it: launch_a_goose_member.node-test.ts :558, :582, against a fake realm endpoint, with no outside host reached.

Closing.

Landed as 965e3df8 (PR 210). Main ci.yml is green at a10a6e98, which holds it: run 5312 (job 22334 "gate coverage" red once on a #179-family tear-down flake, recorded on #179 c5625; Mars reran it once, now green) and run 5342 green. Done-when, by test: - An engine member gets its mesh server when the crew declares a mesh: `give_an_engine_member_its_mesh_server.node-test.ts` :70, :83, :96, :104, :112 - The goose launch's config carries it: `derive_the_config_of_a_goose_launch.node-test.ts` :165, :179, :185 - The launch wiring starts it: `launch_a_goose_member.node-test.ts` :558, :582, against a fake realm endpoint, with no outside host reached. Closing.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#181
No description provided.