Serve the Pipelines chat tools over a loopback MCP endpoint and register it with Claude Code, Codex and OpenCode chats
This commit is contained in:
@@ -585,3 +585,18 @@ test("raw peer HTML and legacy SVG files retain a local sandbox and no cookie au
|
||||
assert.match(await response.text(), /<script>/);
|
||||
}
|
||||
});
|
||||
|
||||
test("the relay never forwards a machine's loopback MCP chat-tools endpoint", async (t) => {
|
||||
const f = await fixture(t);
|
||||
await f.register("one", { endpoints: [f.remotes[0]], password: "password-one" });
|
||||
const before = f.observations.length;
|
||||
for (const method of ["GET", "POST"]) {
|
||||
const reply = await fetch(f.base + "/peers/one/mcp/chat/" + "a".repeat(64), {
|
||||
method,
|
||||
headers: { Cookie: f.cookie, "Content-Type": "application/json" },
|
||||
body: method === "POST" ? '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' : undefined,
|
||||
});
|
||||
assert.equal(reply.status, 404);
|
||||
}
|
||||
assert.equal(f.observations.length, before);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user