You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor AskUser tool to deferred client-rendered model (#25)
Replace server-side onQuestion/onStructuredQuestions handlers with a
deferred tool that emits structured questions for the client to render.
Each question now has a stable `id` for deterministic answer mapping.
Simplifies config from `askUser: { onQuestion }` to `askUser: true`.
Bumps version to 0.6.0 (breaking change).
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Skill -- Load specialized instructions from SKILL.md files
72
72
@@ -81,7 +81,7 @@ Each tool exports `<Name>Output` for success and `<Name>Error` for errors:
81
81
### Data Flow
82
82
83
83
1.**Tool Creation**: `createAgentTools()` → individual `create*Tool()` factories → `tool()` from AI SDK
84
-
2.**Execution**: AI model calls tool → `execute()` function → sandbox operation or external API → return Output or Error
84
+
2.**Execution**: AI model calls tool → `execute()` function or deferred client round-trip → sandbox operation or external API → return Output or Error
85
85
3.**Caching** (optional): `resolveCache()` wraps cacheable tools with `cached()` from cache module
86
86
4.**Model Registry** (optional): `createAgentTools()` fetches model info (pricing + context lengths) from a provider (e.g., OpenRouter). Data is shared with budget tracking and returned as `openRouterModels` in the result.
87
87
5.**Budget** (optional): `createAgentTools()` creates a `BudgetTracker` from config, using pricing derived from model registry or manual overrides. Returns it for wiring into `onStepFinish`/`stopWhen`. Auto-wires into Task tool sub-agents.
0 commit comments