Skip to content

Commit f8fefb0

Browse files
hyperpolymathclaude
andcommitted
feat(local-coord-mcp): expose Task #33 client_kind+variant via mcp-bridge
The Zig adapter, FFI, Idris ABI and cartridge.json were already updated for Task #33 (extend client_kind enum with openai/mistral, accept free- form variant at register time), but mcp-bridge/lib/tools.js still advertised the legacy 4-kind enum and omitted the optional variant. AI clients calling coord_register through the MCP bridge therefore could not register as openai/mistral or set their variant in one shot. - mcp-bridge/lib/tools.js: extend client_kind enum to 6 kinds, add optional variant property mirroring the adapter contract, refresh description. - cartridges/local-coord-mcp/LOCAL-COORD-MCP-REPORT.adoc: refresh DD-3 (Client Identity) to reflect 6-LLM split + new register input shape. Live-tested both new kinds against the running adapter on 127.0.0.1:7745 — registration + variant accepted. mcp-bridge dispatch_test.js suite green (8/8). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent aa62bf7 commit f8fefb0

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

cartridges/local-coord-mcp/LOCAL-COORD-MCP-REPORT.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ Ports 7700–7744 are allocated. 7745 is the next sequential assignment.
5959

6060
*Decision:* Hybrid — human-readable prefix + 4-char hex suffix.
6161

62-
Examples: `claude-7f3a`, `gemini-b2c1`, `copilot-4e9d`. Readable in logs
63-
and tool output, unique enough to prevent collisions on a single machine.
64-
Supports the 4-LLM workflow split (Claude, Gemini, Copilot, custom).
62+
Examples: `claude-7f3a`, `gemini-b2c1`, `copilot-4e9d`, `openai-5fab`,
63+
`mistral-9c0e`. Readable in logs and tool output, unique enough to prevent
64+
collisions on a single machine. Supports the 6-LLM workflow split — Claude,
65+
Gemini, Copilot, OpenAI, Mistral, plus a `custom` fall-through (Task #33
66+
extended `openai` + `mistral`).
6567

6668
== Security Architecture
6769

@@ -166,11 +168,13 @@ primitives — these are not introduced by this cartridge.)
166168

167169
Register this instance. Returns a hybrid peer ID and a session token.
168170

169-
*Input:* `{ client_kind: "claude" | "gemini" | "copilot" | "custom" }`
171+
*Input:* `{ client_kind: "claude" | "gemini" | "copilot" | "custom" | "openai" | "mistral", context?: string, declared_affinities?: [string], variant?: string }`
170172

171173
*Output:* `{ peer_id: "claude-7f3a", token: "abc123..." }`
172174

173-
*Side effects:* Allocates a peer slot (1 of 16).
175+
*Side effects:* Allocates a peer slot (1 of 16). Optional `variant` is
176+
applied via the same code path as `coord_set_variant` and rolls back the
177+
registration on validation failure.
174178

175179
=== coord_list_peers
176180

mcp-bridge/lib/tools.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,14 @@ function buildToolList() {
293293
// Local coordination (localhost multi-instance AI coordination — local-coord-mcp cartridge)
294294
tools.push({
295295
name: "coord_register",
296-
description: "Register this AI instance as a coordination peer on the loopback coord bus (127.0.0.1:7745). Side-effectful on the bus (creates peer entry + inbox); Loopback-only for security. Returns `{peer_id, token}` where the token must be passed to all subsequent coord_* calls. Optional `context` disambiguates windows; `declared_affinities` seeds the reassignment engine. Essential for multi-agent collaboration.",
296+
description: "Register this AI instance as a coordination peer on the loopback coord bus (127.0.0.1:7745). Side-effectful on the bus (creates peer entry + inbox); Loopback-only for security. Returns `{peer_id, token}` where the token must be passed to all subsequent coord_* calls. Optional `context` disambiguates windows; `declared_affinities` seeds the reassignment engine; `variant` sets the model identifier in one shot (otherwise call `coord_set_variant` later). Essential for multi-agent collaboration.",
297297
inputSchema: {
298298
type: "object",
299299
properties: {
300-
client_kind: { type: "string", enum: ["claude", "gemini", "copilot", "custom"], description: "Client type prefix for the generated peer ID (`<kind>-<4hex>[@<context>]`)." },
300+
client_kind: { type: "string", enum: ["claude", "gemini", "copilot", "custom", "openai", "mistral"], description: "Client family prefix for the generated peer ID (`<kind>-<4hex>[@<context>]`). Task #33 extended `openai` + `mistral`; `custom` covers anything else." },
301301
context: { type: "string", description: "Optional disambiguator, e.g. current repo name. Alphanumeric + hyphen/underscore, max 32 bytes. Absent = plain `<kind>-<4hex>` form.", maxLength: 32, pattern: "^[A-Za-z0-9_-]*$" },
302302
declared_affinities: { type: "array", items: { type: "string", maxLength: 64 }, description: "Optional self-reported strength tags (e.g. ['proof-analysis', 'supervision']). Max 256 bytes as CSV; feeds reassignment-engine comparisons (DD-28)." },
303+
variant: { type: "string", description: "Optional free-form model/variant label set at register time (Task #33). Alphanumeric + `.`/`-`/`_`, max 32 bytes. e.g. `opus-4.7`, `flash-2.5`, `leanstral`. Equivalent to a follow-up `coord_set_variant` call.", maxLength: 32, pattern: "^[A-Za-z0-9._-]*$" },
303304
},
304305
required: ["client_kind"],
305306
additionalProperties: false,

0 commit comments

Comments
 (0)