feat: add backend-neutral agent tools

This commit is contained in:
Andrey Avtomonov 2026-05-15 12:49:51 +02:00
parent 79369fea6c
commit 73d0f91d3c
8 changed files with 123 additions and 33 deletions

View file

@ -386,8 +386,8 @@ class LocalShapeOnlySlValidator implements SlValidatorPort<SlValidationDeps> {
class LocalMemoryToolSet implements MemoryToolSetLike {
constructor(private readonly tools: BaseTool[]) {}
toAiSdkTools(context: ToolContext) {
return Object.fromEntries(this.tools.map((tool) => [tool.name, tool.toAiSdkTool(context)]));
toAgentTools(context: ToolContext) {
return Object.fromEntries(this.tools.map((tool) => [tool.name, tool.toAgentTool(context)]));
}
}