fix(agent): use output parameter when invoking onToolResult instead of toolCall.result

This commit is contained in:
2026-03-06 22:48:09 +00:00
parent 2947842499
commit 91865e9f57
3 changed files with 9 additions and 3 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartagent',
version: '3.0.1',
version: '3.0.2',
description: 'Agentic loop for ai-sdk (Vercel AI SDK). Wraps streamText with stopWhen for parallel multi-step tool execution. Built on @push.rocks/smartai.'
}

View File

@@ -142,8 +142,8 @@ export async function runAgent(options: IAgentRunOptions): Promise<IAgentRunResu
: undefined,
experimental_onToolCallFinish: options.onToolResult
? ({ toolCall }) => {
options.onToolResult!(toolCall.toolName, (toolCall as any).result);
? ({ toolCall, output }) => {
options.onToolResult!(toolCall.toolName, output);
}
: undefined,