feat(plugin): support dynamic Effect tools

This commit is contained in:
Kit Langton 2026-07-15 18:47:10 -04:00
commit 7832a677fb
4 changed files with 49 additions and 1 deletions

View file

@ -103,7 +103,7 @@ export type DynamicOutput = {
* time (MCP servers, plugin manifests). Input is passed through as `unknown`;
* `execute` returns the already-projected structured value and model content.
*/
type DynamicConfig = {
export type DynamicConfig = {
readonly description: string
readonly jsonSchema: JsonSchema.JsonSchema
readonly outputSchema?: JsonSchema.JsonSchema
@ -284,6 +284,8 @@ export interface RegisterOptions {
export interface ToolDraft {
add(name: string, tool: AnyTool, options?: RegisterOptions): void
/** Registers a dynamic Effect tool without importing the host's Tool module. */
addDynamic(name: string, config: DynamicConfig, options?: RegisterOptions): void
}
export interface ToolHooks {