mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-29 12:42:57 +00:00
fix(agents): restore optional MCP requirements on daemon hydration
This commit is contained in:
@@ -214,3 +214,14 @@ describe("persistence hooks", () => {
|
||||
expect(handle).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
test("restores optional MCP requirements for continuation", () => {
|
||||
const record = createRecord({
|
||||
config: {
|
||||
mcpServerRequirements: { hub: "optional" },
|
||||
mcpServers: { hub: { type: "http", url: "https://hub.test/mcp" } },
|
||||
},
|
||||
});
|
||||
expect(buildConfigOverrides(record).mcpServerRequirements).toEqual({ hub: "optional" });
|
||||
expect(buildSessionConfig(record)?.mcpServerRequirements).toEqual({ hub: "optional" });
|
||||
});
|
||||
|
||||
@@ -78,6 +78,7 @@ export function buildConfigOverrides(record: StoredAgentRecord): Partial<AgentSe
|
||||
toolPolicy: record.config?.toolPolicy ?? undefined,
|
||||
systemPrompt: record.config?.systemPrompt ?? undefined,
|
||||
mcpServers: record.config?.mcpServers ?? undefined,
|
||||
mcpServerRequirements: record.config?.mcpServerRequirements ?? undefined,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -100,6 +101,7 @@ export function buildSessionConfig(
|
||||
toolPolicy: overrides.toolPolicy,
|
||||
systemPrompt: overrides.systemPrompt,
|
||||
mcpServers: overrides.mcpServers,
|
||||
mcpServerRequirements: overrides.mcpServerRequirements,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user