4 Commits
v3.0.0 ... main

Author SHA1 Message Date
e8fcdd05af v3.0.2
Some checks failed
Default (tags) / security (push) Successful in 41s
Default (tags) / test (push) Failing after 4m0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-03-06 22:48:09 +00:00
91865e9f57 fix(agent): use output parameter when invoking onToolResult instead of toolCall.result 2026-03-06 22:48:09 +00:00
2947842499 v3.0.1
Some checks failed
Default (tags) / security (push) Successful in 44s
Default (tags) / test (push) Failing after 4m1s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-03-06 11:41:30 +00:00
c503690d52 fix(readme): adjust ASCII art in README to fix box widths and spacing in agent diagram 2026-03-06 11:41:30 +00:00
5 changed files with 20 additions and 8 deletions

View File

@@ -1,5 +1,17 @@
# Changelog
## 2026-03-06 - 3.0.2 - fix(agent)
use output parameter when invoking onToolResult instead of toolCall.result
- Replace (toolCall as any).result with the explicit output parameter when calling options.onToolResult.
- Prevents undefined/misread results by aligning the callback with the tool runner's output signature.
## 2026-03-06 - 3.0.1 - fix(readme)
adjust ASCII art in README to fix box widths and spacing in agent diagram
- Updated readme.md diagram: expanded 'Messages' box width and realigned 'streamText' and 'Tools' columns
- Documentation-only change; no code or behavior affected
## 2026-03-06 - 3.0.0 - BREAKING CHANGE(api)
Migrate public API to ai-sdk v6 and refactor core agent architecture: replace class-based DualAgent/Driver/Guardian with a single runAgent function; introduce ts_tools factories for tools, a compactMessages compaction subpath, and truncateOutput utility; simplify ToolRegistry to return ToolSet and remove legacy BaseToolWrapper/tool classes; update package exports and dependencies and bump major version.

View File

@@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartagent",
"version": "3.0.0",
"version": "3.0.2",
"private": false,
"description": "Agentic loop for ai-sdk (Vercel AI SDK). Wraps streamText with stopWhen for parallel multi-step tool execution. Built on @push.rocks/smartai.",
"main": "dist_ts/index.js",

View File

@@ -58,10 +58,10 @@ console.log(result.usage); // { promptTokens, completionTokens, totalTokens }
┌─────────────────────────────────────────────────┐
│ runAgent({ model, prompt, tools, maxSteps }) │
│ │
│ ┌───────────┐ ┌──────────┐ ┌───────────┐
│ │ Messages │──▶│ streamText│──▶│ Tools │
│ │ (history) │◀──│ (AI SDK) │◀──│ (ToolSet) │
│ └───────────┘ └──────────┘ └───────────┘
│ ┌───────────┐ ┌──────────┐ ┌───────────┐ │
│ │ Messages │──▶│ streamText│──▶│ Tools │ │
│ │ (history) │◀──│ (AI SDK) │◀──│ (ToolSet) │ │
│ └───────────┘ └──────────┘ └───────────┘ │
│ │
│ stopWhen: stepCountIs(maxSteps) │
│ + retry with backoff on 429/529/503 │

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartagent',
version: '3.0.0',
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,