Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): defer T3 MCP tools and forward session MCP env #37886

Closedadi-IL(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/37886/headopened View on GitHub

Showing 8 changed files with 38 additions and 3 deletions (loading 5).

x
0 of 8 viewed, 8 left
28 additions and 0 deletionsapps/server/src/mcp/AcpMcpStdioBridge.test.tsModified
View file
@@ -445,4 +445,32 @@
expect(signal?.aborted).toBe(true);
}),
+​
+ it.effect("forwards t3-tool-exposure when toolExposure is configured on the stdio bridge", () =>
+ Effect.gen(function* () {
+ const headersSeen: Array<string | null> = [];
+ const input = new NodeStream.PassThrough();
+ const written: Array<string> = [];
+ const bridge = runAcpMcpStdioBridge({
+ endpoint: "http://127.0.0.1:1/mcp",
+ authorization: "Bearer bridge-test",
+ toolExposure: "deferred",
+ input,
+ output: {
+ write: (chunk: string) => {
+ written.push(chunk);
+ },
+ },
+ fetchImplementation: async (_url, init) => {
+ const request = new Request("http://127.0.0.1:1/mcp", init);
+ headersSeen.push(request.headers.get("t3-tool-exposure"));
+ return Response.json({ jsonrpc: "2.0", id: 1, result: { tools: [] } });
+ },
+ });
+ input.end(`${JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" })}\n`);
+ yield* bridge;
+ expect(headersSeen).toEqual(["deferred"]);
+ expect(written).toHaveLength(1);