mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(agent): pi-schema's Static types TypeBox-built schemas too, without depending on TypeBox
This commit is contained in:
parent
a6bde34bb6
commit
6291b9bcc3
12 changed files with 304 additions and 10 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue