@assistant-wi/core 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/dist/tool/tool.d.ts +10 -10
  2. package/package.json +2 -2
@@ -1,24 +1,24 @@
1
1
  import { default as z } from 'zod/v4';
2
2
  import { UI } from '../ui';
3
- export interface Tool<Input extends z.ZodType = z.ZodType, Output extends z.ZodType = z.ZodType> {
3
+ export interface Tool<I extends z.ZodTypeAny = z.ZodTypeAny, O extends z.ZodTypeAny = z.ZodTypeAny> {
4
4
  description: string;
5
- inputSchema: Input;
6
- outputSchema: Output;
5
+ inputSchema: I;
6
+ outputSchema: O;
7
7
  workflow: {
8
- call: (props: ToolCallProps<Input, Output>) => Promise<void>;
9
- done: (props: ToolDoneProps<Input, Output>) => void;
8
+ call: (props: ToolCallProps<I, O>) => Promise<void>;
9
+ done: (props: ToolDoneProps<I, O>) => void;
10
10
  };
11
11
  }
12
- export interface ToolCallProps<Input extends z.ZodType, Output extends z.ZodType> {
12
+ export interface ToolCallProps<Input extends z.ZodTypeAny, Output extends z.ZodTypeAny> {
13
13
  toolCallId: string;
14
14
  input: z.infer<Input>;
15
15
  render: (ui: UI) => void;
16
16
  commit: (result: z.infer<Output>) => void;
17
17
  }
18
- export interface ToolDoneProps<Input extends z.ZodType, Output extends z.ZodType> {
18
+ export interface ToolDoneProps<I extends z.ZodTypeAny, O extends z.ZodTypeAny> {
19
19
  toolCallId: string;
20
- input: z.infer<Input>;
21
- output: z.infer<Output>;
20
+ input: z.infer<I>;
21
+ output: z.infer<O>;
22
22
  render: (ui: UI) => void;
23
23
  }
24
- export declare function createTool<Input extends z.ZodType, Output extends z.ZodType>(tool: Tool<Input, Output>): Tool<Input, Output>;
24
+ export declare function createTool<I extends z.ZodTypeAny, O extends z.ZodTypeAny>(tool: Tool<I, O>): Tool<I, O>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@assistant-wi/core",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.es.js",
@@ -47,6 +47,6 @@
47
47
  "zod": "^4.1.5"
48
48
  },
49
49
  "peerDependencies": {
50
- "zod": "^3.25.76 || ^4"
50
+ "zod": "^4"
51
51
  }
52
52
  }