Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(pi): keep MCP fetch unit cases on HTTPS path

DavidShen724e688935af
diff --git a/packages/maker-core/src/agents/pi/__tests__/pi-mcp-client.test.ts b/packages/maker-core/src/agents/pi/__tests__/pi-mcp-client.test.ts
index dba2cf0491..7e988858f0 100644
--- a/packages/maker-core/src/agents/pi/__tests__/pi-mcp-client.test.ts
+++ b/packages/maker-core/src/agents/pi/__tests__/pi-mcp-client.test.ts
@@ -21,7 +21,9 @@ function gatewayWithFetch(fetchImpl: typeof fetch) {
setTimeout, clearTimeout, createHash,
};
runInNewContext(compiled, context);
- const client = new context.Client({ name: 'cindy', url: 'http://127.0.0.1/mcp' }, 'fake-token');
+ // These unit cases inject fetch to verify response and cancellation semantics
+ // on the HTTPS path. Loopback uses a direct socket and is covered by real Pi integration.
+ const client = new context.Client({ name: 'cindy', url: 'https://example.test/mcp' }, 'fake-token');
client.finishStartup();
const gateway = new context.Gateway();
gateway.add('cindy', client, [{ name: 'ghost_call', inputSchema: {