feat(skill): add per-agent filtering to skill tool description (#6000)

This commit is contained in:
Mohammad Alhashemi
2025-12-23 04:14:33 +03:00
committed by GitHub
parent 44fd0eee64
commit 3a54ab68d1
6 changed files with 219 additions and 87 deletions

View File

@@ -115,7 +115,7 @@ export namespace ToolRegistry {
return all().then((x) => x.map((t) => t.id))
}
export async function tools(providerID: string) {
export async function tools(providerID: string, agent?: Agent.Info) {
const tools = await all()
const result = await Promise.all(
tools
@@ -130,7 +130,7 @@ export namespace ToolRegistry {
using _ = log.time(t.id)
return {
id: t.id,
...(await t.init()),
...(await t.init({ agent })),
}
}),
)