From 6adea8e9b6eb31c625601c1a1dc094ba6d80ce2b Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Sun, 24 May 2026 11:51:17 -0600 Subject: [PATCH] =?UTF-8?q?chore(mcp):=20rename=20SANDBOX=5FAPI=5FKEY=20?= =?UTF-8?q?=E2=86=92=20TANGLE=5FAPI=5FKEY=20for=20product=20parity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Products all read TANGLE_API_KEY; the MCP bin used SANDBOX_API_KEY which required a separate operator env var. Single name, single source of truth. --- README.md | 6 +++--- package.json | 2 +- src/mcp/bin.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6ba5ac0..051c328 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ import { createDefaultCoderDelegate, } from '@tangle-network/agent-runtime/mcp' -const sandboxClient = new Sandbox({ apiKey: process.env.SANDBOX_API_KEY! }) +const sandboxClient = new Sandbox({ apiKey: process.env.TANGLE_API_KEY! }) const server = createMcpServer({ coderDelegate: createDefaultCoderDelegate({ sandboxClient }), // researcherDelegate: wire your own — see below. @@ -210,14 +210,14 @@ await server.serve() // reads JSON-RPC from stdin, writes responses to stdout Or run the ready-made bin: ```bash -SANDBOX_API_KEY=sk_sandbox_... agent-runtime-mcp +TANGLE_API_KEY=sk_sandbox_... agent-runtime-mcp ``` The bin auto-wires the coder delegate and, when `@tangle-network/agent-knowledge` is installed as a peer, the researcher delegate. Environment knobs: -- `SANDBOX_API_KEY` — required (unless both `MCP_DISABLE_*` are set) +- `TANGLE_API_KEY` — required (unless both `MCP_DISABLE_*` are set) - `SANDBOX_BASE_URL` — sandbox-SDK base URL override - `MCP_MAX_CONCURRENT_SANDBOXES` — kernel `maxConcurrency` cap (default 4) - `MCP_CODER_FANOUT_HARNESSES` — comma-separated harness ids for `variants > 1` diff --git a/package.json b/package.json index ce6ae42..4ccac34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tangle-network/agent-runtime", - "version": "0.20.1", + "version": "0.20.2", "description": "Reusable runtime lifecycle for domain-specific agents.", "homepage": "https://github.com/tangle-network/agent-runtime#readme", "repository": { diff --git a/src/mcp/bin.ts b/src/mcp/bin.ts index c5132ae..9ead4a6 100644 --- a/src/mcp/bin.ts +++ b/src/mcp/bin.ts @@ -11,7 +11,7 @@ * delegate against `multiHarnessResearcherFanout`. * * Environment variables: - * SANDBOX_API_KEY required — passed to `new Sandbox({ apiKey })` + * TANGLE_API_KEY required — passed to `new Sandbox({ apiKey })` * SANDBOX_BASE_URL optional — sandbox-SDK base URL override * MCP_MAX_CONCURRENT_SANDBOXES default 4 — kernel maxConcurrency cap * MCP_CODER_FANOUT_HARNESSES comma-separated harness ids to use for variants > 1 @@ -38,10 +38,10 @@ async function main(): Promise { const needsSandbox = wantCoder || wantResearcher let sandboxClient: LoopSandboxClient | undefined if (needsSandbox) { - const apiKey = process.env.SANDBOX_API_KEY + const apiKey = process.env.TANGLE_API_KEY if (!apiKey && !process.env.AGENT_RUNTIME_MCP_ALLOW_NO_KEY) { process.stderr.write( - 'agent-runtime-mcp: SANDBOX_API_KEY is required (set AGENT_RUNTIME_MCP_ALLOW_NO_KEY=1 to run without it for diagnostics, or set MCP_DISABLE_CODER=1 MCP_DISABLE_RESEARCHER=1 to run the queue-only subset)\n', + 'agent-runtime-mcp: TANGLE_API_KEY is required (set AGENT_RUNTIME_MCP_ALLOW_NO_KEY=1 to run without it for diagnostics, or set MCP_DISABLE_CODER=1 MCP_DISABLE_RESEARCHER=1 to run the queue-only subset)\n', ) process.exit(2) } @@ -85,7 +85,7 @@ async function loadSandboxClient(apiKey: string | undefined): Promise