feat: integrate approved MCP tools and recovery for 1.12
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user