feat(agent): pi-schema's Static types TypeBox-built schemas too, without depending on TypeBox

This commit is contained in:
Mario Zechner 2026-11-01 11:12:44 +00:00
parent a6bde34bb6
commit 6291b9bcc3
12 changed files with 304 additions and 10 deletions

View file

@ -4,8 +4,8 @@ import type { ExtensionToolContext, ToolDefinition } from "../extensions/types.t
/**
* An `AgentTool` with a TypeBox parameter schema whose `execute` and `prepareArguments` are typed by TypeBox's
* `Static`, as the built-in tools are (pi-agent-core types `params` through pi-schema, which gives `unknown` for
* TypeBox schemas). Spreads into a `ToolDefinition` of the same schema.
* `Static`, as the built-in tools are (pi-agent-core types `params` through pi-schema, which maps only the common
* TypeBox kinds). Spreads into a `ToolDefinition` of the same schema.
*/
export type TypeBoxAgentTool<TParams extends TSchema = TSchema, TDetails = any> = Omit<
AgentTool<TParams, TDetails>,