feat: integrate approved MCP tools and recovery for 1.12

This commit is contained in:
Agent Workbench Dev
2026-10-30 20:34:54 +08:00
parent 601f13c4f8
commit 3f6797b8ee
80 changed files with 5141 additions and 70 deletions
+2
View File
@@ -4,6 +4,7 @@ import os from 'node:os';
import { randomUUID } from 'node:crypto';
import { DeepSeekAdapter } from './engines/deepseek-adapter.mjs';
import { resolveDeepSeekInstallation } from './engines/deepseek-installation.mjs';
import { assertMcpResolved } from './tools/mcp-contract.mjs';
import { ENGINE_ACTIVE, ENGINE_SCOPE, ENGINE_LIMITS, engineInput, engineReportContract, engineError } from '../shared/contracts/engines.mjs';
const at = () => new Date().toISOString();
@@ -50,6 +51,7 @@ export class EngineManager {
message, scope: job.scope, limitations: ENGINE_LIMITS };
}
start(session, input = {}) {
assertMcpResolved(this.store, session.projectId);
if (!input || typeof input !== 'object' || Array.isArray(input) || Object.keys(input).some(key => !['root', 'retry', 'identitySha256'].includes(key))
|| input.retry !== undefined && typeof input.retry !== 'boolean'
|| input.identitySha256 !== undefined && (typeof input.identitySha256 !== 'string' || !/^[a-f0-9]{64}$/.test(input.identitySha256))) throw engineError('连接核验只接受本地安装目录、检测身份和明确的重新验证选项。', 400);