fix: select capable models and align effective permission evidence
This commit is contained in:
@@ -13,6 +13,7 @@ import { observeRequest, providerHistory, requestPath } from './request-observat
|
||||
import { verifyToolSurface } from './tool-surface.mjs';
|
||||
import { isPassthrough } from '../../shared/contracts/model-capacity.mjs';
|
||||
import { verifyReminderMessage } from './reminder-manager.mjs';
|
||||
import { mcpPermissionContext } from '../../shared/contracts/execution-policy.mjs';
|
||||
|
||||
const hash = value => createHash('sha256').update(typeof value === 'string' ? value : JSON.stringify(value), 'utf8').digest('hex');
|
||||
const PLACEHOLDER_ID = '00000000-0000-0000-0000-000000000000';
|
||||
@@ -342,7 +343,7 @@ export class RequestPlanner {
|
||||
...structuredClone(groups.filter(group => selected.has(group.index)).flatMap(group => group.messages)), ...tail];
|
||||
let mcpReference = null, mcpDocument = null;
|
||||
if (mcpCatalog?.projectId === session.projectId && mcpCatalog.entries?.length) {
|
||||
mcpDocument = { ...mcpCatalog, sessionId: session.id, taskId: run.taskId, runId: run.id, entries: [] };
|
||||
mcpDocument = { ...mcpCatalog, permissionContext: mcpPermissionContext(config), sessionId: session.id, taskId: run.taskId, runId: run.id, entries: [] };
|
||||
for (const entry of mcpCatalog.entries.slice(0, isPassthrough(config) ? Infinity : MCP_LIMITS.allowedTools)) {
|
||||
mcpDocument.entries.push(entry);
|
||||
const candidate = addContext(messages, mcpCatalogMessage({ id: PLACEHOLDER_ID, sha256: PLACEHOLDER_SHA }, mcpDocument));
|
||||
|
||||
Reference in New Issue
Block a user