diff --git a/packages/superintendent/src/runtime/run-owner-review.test.ts b/packages/superintendent/src/runtime/run-owner-review.test.ts index 4a3a93a5a..076fb3864 100644 --- a/packages/superintendent/src/runtime/run-owner-review.test.ts +++ b/packages/superintendent/src/runtime/run-owner-review.test.ts @@ -206,15 +206,10 @@ describe("runOwnerReview", () => { }); }); - it("propagates mcp timeout values to spawn", async () => { + it("ignores document-defined MCP servers during owner review", async () => { autonomousMock.mockImplementation(async (_, { mcpServers }) => { - expect(mcpServers).toMatchObject({ - "plan-browser": { - command: "poe-code", - args: ["plan", "list"], - timeout: 90 - } - }); + expect(mcpServers).not.toHaveProperty("plan-browser"); + expect(findWorkflowServer(mcpServers)).toBeDefined(); return { toolCalls: [ diff --git a/packages/superintendent/src/runtime/run-owner-review.ts b/packages/superintendent/src/runtime/run-owner-review.ts index d7c755642..d1ecad149 100644 --- a/packages/superintendent/src/runtime/run-owner-review.ts +++ b/packages/superintendent/src/runtime/run-owner-review.ts @@ -1,5 +1,5 @@ import "@poe-code/agent-spawn/register-factories"; -import type { McpConfig, SuperintendentDoc } from "../document/parse.js"; +import type { SuperintendentDoc } from "../document/parse.js"; import { runAutonomousAgent, type AutonomousOutput, @@ -77,21 +77,10 @@ function buildTemplateContext( return { ...context, plan: { path: doc.filePath } }; } -function buildMcpServers(doc: SuperintendentDoc): McpSpawnConfig { - const servers: McpSpawnConfig = { +function buildMcpServers(_doc: SuperintendentDoc): McpSpawnConfig { + return { [WORKFLOW_SERVER_NAME]: createWorkflowServer() }; - - const merged = { - ...(doc.frontmatter.mcp ?? {}), - ...(doc.frontmatter.owner.mcp ?? {}) - }; - - for (const [name, config] of Object.entries(merged)) { - servers[name] = toSpawnMcpServer(config); - } - - return servers; } function createWorkflowServer(): McpSpawnConfig[string] { @@ -104,14 +93,6 @@ function createWorkflowServer(): McpSpawnConfig[string] { }; } -function toSpawnMcpServer(config: McpConfig): McpSpawnConfig[string] { - return { - command: config.command, - ...(config.args ? { args: [...config.args] } : {}), - ...(config.timeout !== undefined ? { timeout: config.timeout } : {}) - }; -} - function extractLogPath(result: AutonomousOutput): string | undefined { if (typeof result === "string") return undefined; return typeof result.logFile === "string" ? result.logFile : undefined;