feat: streamline agent integration and MCP routing

This commit is contained in:
N0zoM1z0
2026-07-20 17:11:06 +08:00
parent 0810486f63
commit 3e3d45856e
151 changed files with 2642 additions and 663 deletions
+8 -5
View File
@@ -12,6 +12,9 @@ import { afterEach, describe, expect, it } from "vitest";
import { resolveClientConfigTransactionPath } from "../src/application/ClientConfigPath.js";
import { configureJsonClient } from "../src/application/Setup.js";
import { PRODUCT_IDENTITY } from "../src/identity.js";
const pinnedPackage = PRODUCT_IDENTITY.registrationPackageSpecifier;
let directory: string | undefined;
afterEach(async () => {
@@ -55,7 +58,7 @@ describe("JSON client configuration transaction", () => {
other: { command: "other" },
rea: {
command: "npx",
args: ["-y", "rea-agents@latest", "mcp"],
args: ["-y", pinnedPackage, "mcp"],
},
},
});
@@ -79,7 +82,7 @@ describe("JSON client configuration transaction", () => {
mcpServers: {
rea: {
command: "npx",
args: ["-y", "rea-agents@latest", "mcp"],
args: ["-y", pinnedPackage, "mcp"],
},
},
});
@@ -108,7 +111,7 @@ describe("JSON client configuration transaction", () => {
const configPath = join(directory, "mcp.json");
await writeFile(
configPath,
'{"mcpServers":{"rea":{"command":"npx","args":["-y","rea-agents@latest","mcp"]}}}\n',
`${JSON.stringify({ mcpServers: { rea: { command: "npx", args: ["-y", pinnedPackage, "mcp"] } } })}\n`,
);
expect(await configureJsonClient({ name: "cursor", configPath })).toEqual({
status: "unchanged",
@@ -134,7 +137,7 @@ describe("JSON client configuration transaction", () => {
mcpServers: {
rea: {
command: "npx",
args: ["-y", "rea-agents@latest", "mcp"],
args: ["-y", pinnedPackage, "mcp"],
},
other: { command: "other" },
},
@@ -156,7 +159,7 @@ describe("JSON client configuration transaction", () => {
mcpServers: {
rea: {
command: "npx",
args: ["-y", "rea-agents@latest", "mcp"],
args: ["-y", pinnedPackage, "mcp"],
env: { HOPPER_LAUNCHER_PATH: hopperPath },
},
},