fix: preserve full MCP schemas and relay server validation errors

This commit is contained in:
Agent Workbench Dev
2026-11-07 10:47:31 +08:00
parent e2e19a06fe
commit 231db3a1f9
10 changed files with 321 additions and 73 deletions
+1 -1
View File
@@ -589,7 +589,7 @@ export function verifyPlanEvidence(store, session, plan, cache = new Map()) {
if (artifact.taskId !== plan.taskId || artifact.runId !== plan.runId || document.projectId !== session.projectId
|| document.sessionId !== session.id || document.taskId !== plan.taskId || document.runId !== plan.runId
|| document.kind !== 'registered-mcp-catalog' || !Array.isArray(document.entries) || document.entries.length !== plan.mcpCatalogEntries
|| document.entries.length > MCP_LIMITS.allowedTools || Buffer.byteLength(JSON.stringify(document), 'utf8') > 24000) throw new Error('MCP目录归属或范围不匹配。');
|| plan.budget.capacityMode !== 'passthrough' && (document.entries.length > MCP_LIMITS.allowedTools || Buffer.byteLength(JSON.stringify(document), 'utf8') > 24000)) throw new Error('MCP目录归属或范围不匹配。');
const message = mcpCatalogMessage(artifact, document);
if (!carriesContext(message.content)) throw new Error('MCP目录与实际发送内容不匹配。');
}