feat: connect controlled engines to owned Tasks, approvals and budget ledger

This commit is contained in:
Agent Workbench Dev
2026-10-31 05:04:55 +08:00
parent a01c41811b
commit f0eecbda47
27 changed files with 1653 additions and 33 deletions
+1
View File
@@ -59,6 +59,7 @@ export async function apply(ctx, config) {
tools: options.tools ?? [], toolHistory: options.toolHistory ?? null,
model: options.model, maxTokens: options.maxTokens ?? config.maxOutputTokens }, options.signal);
const message = result.message;
if (result.finishReason === 'length') throw new Error('Owned model output reached its bound; incomplete tools are not executed.');
if (!message || message.role !== 'assistant' || typeof message.content !== 'string'
|| message.tool_calls !== undefined && !Array.isArray(message.tool_calls)) throw new Error('Invalid owned model result.');
let index = 0;