modality-kit 0.12.16 → 0.12.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copy of StandardSchemaV1 interface for compatibility
|
|
3
3
|
*/
|
|
4
|
+
import { z } from "zod";
|
|
4
5
|
export interface ToolParameters<Input = unknown, Output = Input> {
|
|
5
6
|
readonly "~standard": ToolParameters.Props<Input, Output>;
|
|
6
7
|
}
|
|
@@ -36,7 +37,7 @@ export declare namespace ToolParameters {
|
|
|
36
37
|
/**
|
|
37
38
|
* Tool interface for AI SDK compatibility
|
|
38
39
|
*/
|
|
39
|
-
export interface AITool<T extends Record<string, unknown> | undefined = any, TParams extends ToolParameters =
|
|
40
|
+
export interface AITool<T extends Record<string, unknown> | undefined = any, TParams extends ToolParameters = z.ZodSchema> {
|
|
40
41
|
annotations?: {
|
|
41
42
|
streamingHint?: boolean;
|
|
42
43
|
} & {
|
|
@@ -62,6 +63,6 @@ export interface FastMCPTool<T extends Record<string, unknown> | undefined = any
|
|
|
62
63
|
* @template T - Record mapping tool names to their inputSchema types
|
|
63
64
|
* @example AITools<{getUserById: z.object({id: z.string()}), createUser: z.object({name: z.string()})}>
|
|
64
65
|
*/
|
|
65
|
-
export type AITools<T extends Record<string, ToolParameters> = Record<string,
|
|
66
|
+
export type AITools<T extends Record<string, ToolParameters> = Record<string, z.ZodSchema>> = {
|
|
66
67
|
[K in keyof T]: AITool<any, T[K]>;
|
|
67
68
|
};
|
package/package.json
CHANGED