@firstlovecenter/ai-chat 0.2.3 → 0.5.0
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.
- package/CHANGELOG.md +25 -0
- package/dist/drizzle/index.d.cts +2 -1
- package/dist/drizzle/index.d.ts +2 -1
- package/dist/prisma/index.d.cts +2 -1
- package/dist/prisma/index.d.ts +2 -1
- package/dist/server/index.cjs +307 -4
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +40 -3
- package/dist/server/index.d.ts +40 -3
- package/dist/server/index.js +307 -4
- package/dist/server/index.js.map +1 -1
- package/dist/{types-DNwFvL-C.d.cts → types-CDKxdzQc.d.cts} +9 -0
- package/dist/{types-DNwFvL-C.d.ts → types-CDKxdzQc.d.ts} +9 -0
- package/dist/ui/index.cjs +952 -86
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +24 -12
- package/dist/ui/index.d.ts +24 -12
- package/dist/ui/index.js +950 -87
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GoogleAuth } from 'google-auth-library';
|
|
2
|
+
import { ZodType } from 'zod';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Tool typing for the agent loop.
|
|
@@ -39,8 +40,16 @@ type ToolResult = {
|
|
|
39
40
|
message: string;
|
|
40
41
|
};
|
|
41
42
|
};
|
|
43
|
+
|
|
42
44
|
type ToolDefinition<I = unknown, S = unknown> = {
|
|
43
45
|
schema: ToolSchema;
|
|
46
|
+
/**
|
|
47
|
+
* Optional Zod schema for the same input. Required by the Vercel AI SDK
|
|
48
|
+
* route (which needs Zod to feed `tool({ parameters })`); the custom
|
|
49
|
+
* SSE route ignores it. Tools registered without a `zodSchema` will
|
|
50
|
+
* cause `buildVercelTools` to throw at config time.
|
|
51
|
+
*/
|
|
52
|
+
zodSchema?: ZodType<I>;
|
|
44
53
|
execute(input: I, ctx: ToolContext<S>): Promise<ToolResult>;
|
|
45
54
|
};
|
|
46
55
|
/** The terminal tool that closes the agent loop. The host's tool registry MUST include it. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GoogleAuth } from 'google-auth-library';
|
|
2
|
+
import { ZodType } from 'zod';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Tool typing for the agent loop.
|
|
@@ -39,8 +40,16 @@ type ToolResult = {
|
|
|
39
40
|
message: string;
|
|
40
41
|
};
|
|
41
42
|
};
|
|
43
|
+
|
|
42
44
|
type ToolDefinition<I = unknown, S = unknown> = {
|
|
43
45
|
schema: ToolSchema;
|
|
46
|
+
/**
|
|
47
|
+
* Optional Zod schema for the same input. Required by the Vercel AI SDK
|
|
48
|
+
* route (which needs Zod to feed `tool({ parameters })`); the custom
|
|
49
|
+
* SSE route ignores it. Tools registered without a `zodSchema` will
|
|
50
|
+
* cause `buildVercelTools` to throw at config time.
|
|
51
|
+
*/
|
|
52
|
+
zodSchema?: ZodType<I>;
|
|
44
53
|
execute(input: I, ctx: ToolContext<S>): Promise<ToolResult>;
|
|
45
54
|
};
|
|
46
55
|
/** The terminal tool that closes the agent loop. The host's tool registry MUST include it. */
|