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 = 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, ToolParameters>> = {
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
  };
@@ -19,7 +19,7 @@ export interface McpErrorResponse {
19
19
  }
20
20
  interface SuccessData extends Record<string, any> {
21
21
  message?: string;
22
- instructions?: string;
22
+ instructions?: string | string[];
23
23
  }
24
24
  /**
25
25
  * Generic error data interface for MCP error responses
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.12.16",
2
+ "version": "0.12.18",
3
3
  "name": "modality-kit",
4
4
  "repository": {
5
5
  "type": "git",