Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
development/examples/warm-pool: default orchestrator to kind-local-node (:9099)
Tomas Tormofee4abe50697
diff --git a/development/examples/warm-pool/README.md b/development/examples/warm-pool/README.mdindex b8e8b1bc..1d968a24 100644--- a/development/examples/warm-pool/README.md+++ b/development/examples/warm-pool/README.md@@ -48,28 +48,34 @@ dispatcher (fine for a single-manager pool).2. Mesh layout ships in `development/kind/mesh-config.yaml`:```yaml- node-a: # orchestrator entry (bare)+ node-a: # in-cluster bare nodenode-b: code-reviewer-mcp # workernode-c: code-reviewer-mcp # workernode-d: code-reviewer-mcp # workernode-e: pool-manager-mcp # manager```-3. Bring the mesh up, then port-forward the caller node:+3. Bring the mesh up and start a **local caller node** — this is the orchestrator+ entry point:```- make kind- kubectl --context kind-sam-kind -n sam-kind port-forward deploy/node-a 9091:8080+ make build # builds ./bin/sam-node (once)+ make kind-up # hub + reviewer pool (node-b/c/d) + manager (node-e)+ make kind-local-node # local sam-node enrolled in the mesh — LEAVE RUNNING```+ `kind-local-node` runs in the foreground (own shell). It exposes the mesh MCP+ tools at **`http://127.0.0.1:9099/mcp`** (token `devtoken`) — no+ `kubectl port-forward` needed. This `:9099` endpoint is the base for both+ options below.### Option A — drive it from Claude Code (the cool one)-Register node-a as an MCP server (`.mcp.json` in the project root):+Register the local node as an MCP server (`.mcp.json` in the project root):```json{"mcpServers": {"sam-mesh": {"type": "http",- "url": "http://127.0.0.1:9091/mcp",+ "url": "http://127.0.0.1:9099/mcp","headers": { "Authorization": "Bearer devtoken" }}}@@ -89,7 +95,7 @@ chains; you watch the reviews come back concurrently.```cd development/examples/warm-poolnpm install-node orchestrator.mjs samples+node orchestrator.mjs samples # defaults to http://127.0.0.1:9099/mcp```Example output:```@@ -116,7 +122,7 @@ kubectl --context kind-sam-kind -n sam-kind scale deploy/node-d --replicas=1| var | default | used by ||-----|---------|---------|-| `SAM_NODE_URL` | manager: `http://127.0.0.1:8080/mcp`, orchestrator: `http://127.0.0.1:9091/mcp` | both |+| `SAM_NODE_URL` | manager: `http://127.0.0.1:8080/mcp`, orchestrator: `http://127.0.0.1:9099/mcp` | both || `SAM_API_TOKEN` | `devtoken` | both || `SAM_POOL_SERVICE` | `code-reviewer` | manager || `SAM_DISCOVERY_MS` | `3000` | manager |diff --git a/development/examples/warm-pool/orchestrator.mjs b/development/examples/warm-pool/orchestrator.mjsindex 2bba792f..2eceff53 100644--- a/development/examples/warm-pool/orchestrator.mjs+++ b/development/examples/warm-pool/orchestrator.mjs@@ -7,7 +7,7 @@ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/import { readFileSync, readdirSync, statSync } from "node:fs";import { join } from "node:path";-const NODE_URL = process.env.SAM_NODE_URL ?? "http://127.0.0.1:9091/mcp";+const NODE_URL = process.env.SAM_NODE_URL ?? "http://127.0.0.1:9099/mcp";const API_TOKEN = process.env.SAM_API_TOKEN ?? "devtoken";const ACQUIRE_TIMEOUT = Number(process.env.SAM_ACQUIRE_TIMEOUT ?? 60);