Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(providers): keep the MCP bearer out of ACP and Pi child environments #17957

Closedonly21mil(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/17957/headopened View on GitHub

Showing 20 changed files with 51 additions and 5 deletions (loading 17).

x
0 of 20 viewed, 20 left
5 additions and 0 deletionsapps/server/scripts/acp-mock-agent.tsModified
View file
@@ -2329,6 +2329,11 @@
return Effect.succeed({
inherited: process.env.T3_ACP_RUNTIME_AMBIENT === "sentinel",
explicit: process.env.T3_ACP_RUNTIME_EXPLICIT === "kept",
+ rawMcpCredential: [
+ "T3_ACP_MCP_AUTHORIZATION",
+ "T3_MCP_BEARER_TOKEN",
+ "T3_CODE_MCP_AUTHORIZATION",
+ ].some((name) => process.env[name] !== undefined),
if (method === "_test/release-resume") {
5 additions and 4 deletionsapps/server/src/cli/acpMcpBridge.tsModified
View file
@@ -6,10 +6,11 @@
/**
* `t3 acp-mcp-bridge` — internal stdio MCP server that ACP agents spawn.
*
- * The T3 server injects this command (with per-session endpoint and
- * credential environment variables) into `session/new` so every ACP agent
- * reaches the t3-code toolkit through ACP's required stdio MCP transport.
- * The credential stays in the environment, never on the command line.
+ * The T3 server injects this command (with the per-session endpoint and the
+ * path of a private credential file in its environment) into `session/new`
+ * so every ACP agent reaches the t3-code toolkit through ACP's required stdio
+ * MCP transport. The credential itself is in neither the environment nor the
+ * command line.