(config: {
name: string;
description: string;
parameters: TParameters;
execute?: (args: InferSchemaOutput<TParameters>) => Promise<unknown>;
interrupt?: boolean;
interruptReason?: string;
interruptMessage?: string;
})
| 290 | * @returns Tool definition |
| 291 | */ |
| 292 | export function defineTool<TParameters extends StandardSchemaV1>(config: { |
| 293 | name: string; |
| 294 | description: string; |
| 295 | parameters: TParameters; |
| 296 | execute?: (args: InferSchemaOutput<TParameters>) => Promise<unknown>; |
| 297 | interrupt?: boolean; |
| 298 | interruptReason?: string; |
| 299 | interruptMessage?: string; |
| 300 | }): ToolDefinition<TParameters> { |
| 301 | return { |
| 302 | name: config.name, |
| 303 | description: config.description, |
| 304 | parameters: config.parameters, |
| 305 | execute: config.execute, |
| 306 | interrupt: config.interrupt, |
| 307 | interruptReason: config.interruptReason, |
| 308 | interruptMessage: config.interruptMessage, |
| 309 | }; |
| 310 | } |
| 311 | |
| 312 | type AGUIUserMessage = Extract<Message, { role: "user" }>; |
| 313 |
no outgoing calls
no test coverage detected
searching dependent graphs…