feat(runtime): default to passthrough and persist execution permissions

This commit is contained in:
Agent Workbench Dev
2026-11-06 04:58:57 +08:00
parent 67c034f4b6
commit 2fa220735d
113 changed files with 1866 additions and 631 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ export const HOST_ENVIRONMENT = Object.freeze(['AGENT_WORKBENCH_DEEPSEEK_ROOT',
async function jsonResponse(response) {
if (!response.ok) throw hostError('本机宿主接口拒绝操作(HTTP ' + response.status + ')。', 'HOST_API_REJECTED', response.status);
const chunks = []; let length = 0;
for await (const chunk of response.body) { length += chunk.length; if (length > 4 * 1024 * 1024) throw hostError('本机宿主响应过大。'); chunks.push(chunk); }
const chunks = [];
for await (const chunk of response.body) chunks.push(chunk);
try { return JSON.parse(Buffer.concat(chunks).toString('utf8')); } catch { throw hostError('端口未返回有效的宿主协议。'); }
}