@quercle/ai-sdk 0.1.3 → 0.2.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/dist/tools.d.ts +8 -58
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +4 -4
- package/dist/tools.js.map +1 -1
- package/package.json +3 -3
package/dist/tools.d.ts
CHANGED
|
@@ -17,25 +17,11 @@ import { type QuercleConfig } from "@quercle/sdk";
|
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export declare const quercleSearch: import("ai").Tool<
|
|
21
|
-
query: import("zod").ZodString;
|
|
22
|
-
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
23
|
-
blockedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
24
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
20
|
+
export declare const quercleSearch: import("ai").Tool<{
|
|
25
21
|
query: string;
|
|
26
22
|
allowedDomains?: string[] | undefined;
|
|
27
23
|
blockedDomains?: string[] | undefined;
|
|
28
|
-
},
|
|
29
|
-
query: string;
|
|
30
|
-
allowedDomains?: string[] | undefined;
|
|
31
|
-
blockedDomains?: string[] | undefined;
|
|
32
|
-
}>, string> & {
|
|
33
|
-
execute: (args: {
|
|
34
|
-
query: string;
|
|
35
|
-
allowedDomains?: string[] | undefined;
|
|
36
|
-
blockedDomains?: string[] | undefined;
|
|
37
|
-
}, options: import("ai").ToolExecutionOptions) => PromiseLike<string>;
|
|
38
|
-
};
|
|
24
|
+
}, string>;
|
|
39
25
|
/**
|
|
40
26
|
* Fetch a URL and analyze its content with AI using Quercle.
|
|
41
27
|
*
|
|
@@ -54,21 +40,10 @@ export declare const quercleSearch: import("ai").Tool<import("zod").ZodObject<{
|
|
|
54
40
|
* });
|
|
55
41
|
* ```
|
|
56
42
|
*/
|
|
57
|
-
export declare const quercleFetch: import("ai").Tool<
|
|
58
|
-
url: import("zod").ZodString;
|
|
59
|
-
prompt: import("zod").ZodString;
|
|
60
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
61
|
-
url: string;
|
|
62
|
-
prompt: string;
|
|
63
|
-
}, {
|
|
43
|
+
export declare const quercleFetch: import("ai").Tool<{
|
|
64
44
|
url: string;
|
|
65
45
|
prompt: string;
|
|
66
|
-
}
|
|
67
|
-
execute: (args: {
|
|
68
|
-
url: string;
|
|
69
|
-
prompt: string;
|
|
70
|
-
}, options: import("ai").ToolExecutionOptions) => PromiseLike<string>;
|
|
71
|
-
};
|
|
46
|
+
}, string>;
|
|
72
47
|
/**
|
|
73
48
|
* Create Quercle tools with custom configuration.
|
|
74
49
|
*
|
|
@@ -93,39 +68,14 @@ export declare const quercleFetch: import("ai").Tool<import("zod").ZodObject<{
|
|
|
93
68
|
* ```
|
|
94
69
|
*/
|
|
95
70
|
export declare function createQuercleTools(config?: QuercleConfig): {
|
|
96
|
-
quercleSearch: import("ai").Tool<
|
|
97
|
-
query: import("zod").ZodString;
|
|
98
|
-
allowedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
99
|
-
blockedDomains: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
100
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
101
|
-
query: string;
|
|
102
|
-
allowedDomains?: string[] | undefined;
|
|
103
|
-
blockedDomains?: string[] | undefined;
|
|
104
|
-
}, {
|
|
71
|
+
quercleSearch: import("ai").Tool<{
|
|
105
72
|
query: string;
|
|
106
73
|
allowedDomains?: string[] | undefined;
|
|
107
74
|
blockedDomains?: string[] | undefined;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
query: string;
|
|
111
|
-
allowedDomains?: string[] | undefined;
|
|
112
|
-
blockedDomains?: string[] | undefined;
|
|
113
|
-
}, options: import("ai").ToolExecutionOptions) => PromiseLike<string>;
|
|
114
|
-
};
|
|
115
|
-
quercleFetch: import("ai").Tool<import("zod").ZodObject<{
|
|
116
|
-
url: import("zod").ZodString;
|
|
117
|
-
prompt: import("zod").ZodString;
|
|
118
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
119
|
-
url: string;
|
|
120
|
-
prompt: string;
|
|
121
|
-
}, {
|
|
75
|
+
}, string>;
|
|
76
|
+
quercleFetch: import("ai").Tool<{
|
|
122
77
|
url: string;
|
|
123
78
|
prompt: string;
|
|
124
|
-
}
|
|
125
|
-
execute: (args: {
|
|
126
|
-
url: string;
|
|
127
|
-
prompt: string;
|
|
128
|
-
}, options: import("ai").ToolExecutionOptions) => PromiseLike<string>;
|
|
129
|
-
};
|
|
79
|
+
}, string>;
|
|
130
80
|
};
|
|
131
81
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,aAAa,EAGnB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa;;;;UAOxB,CAAC;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY;;;UAOvB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;;;;;;;;;;EAmBxD"}
|
package/dist/tools.js
CHANGED
|
@@ -20,7 +20,7 @@ import { QuercleClient, TOOL_DESCRIPTIONS, searchToolSchema, fetchToolSchema, }
|
|
|
20
20
|
*/
|
|
21
21
|
export const quercleSearch = tool({
|
|
22
22
|
description: TOOL_DESCRIPTIONS.SEARCH,
|
|
23
|
-
|
|
23
|
+
inputSchema: searchToolSchema,
|
|
24
24
|
execute: async ({ query, allowedDomains, blockedDomains }) => {
|
|
25
25
|
const client = new QuercleClient();
|
|
26
26
|
return await client.search(query, { allowedDomains, blockedDomains });
|
|
@@ -46,7 +46,7 @@ export const quercleSearch = tool({
|
|
|
46
46
|
*/
|
|
47
47
|
export const quercleFetch = tool({
|
|
48
48
|
description: TOOL_DESCRIPTIONS.FETCH,
|
|
49
|
-
|
|
49
|
+
inputSchema: fetchToolSchema,
|
|
50
50
|
execute: async ({ url, prompt }) => {
|
|
51
51
|
const client = new QuercleClient();
|
|
52
52
|
return await client.fetch(url, prompt);
|
|
@@ -80,14 +80,14 @@ export function createQuercleTools(config) {
|
|
|
80
80
|
return {
|
|
81
81
|
quercleSearch: tool({
|
|
82
82
|
description: TOOL_DESCRIPTIONS.SEARCH,
|
|
83
|
-
|
|
83
|
+
inputSchema: searchToolSchema,
|
|
84
84
|
execute: async ({ query, allowedDomains, blockedDomains }) => {
|
|
85
85
|
return await client.search(query, { allowedDomains, blockedDomains });
|
|
86
86
|
},
|
|
87
87
|
}),
|
|
88
88
|
quercleFetch: tool({
|
|
89
89
|
description: TOOL_DESCRIPTIONS.FETCH,
|
|
90
|
-
|
|
90
|
+
inputSchema: fetchToolSchema,
|
|
91
91
|
execute: async ({ url, prompt }) => {
|
|
92
92
|
return await client.fetch(url, prompt);
|
|
93
93
|
},
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,iB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AAE,cAAc,EAAE,CAAC,CAAC;YACxE,CAAC;SACF,CAAC;QACF,YAAY,EAAE,IAAI,CAAyB;YACzC,WAAW,EAAE,iBAAiB,CAAC,KAAK;YACpC,WAAW,EAAE,eAAe;YAC5B,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;gBACjC,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YACzC,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quercle/ai-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Quercle web tools for Vercel AI SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@quercle/sdk": "^0.2.4",
|
|
23
|
-
"ai": "^
|
|
23
|
+
"ai": "^5.0.0",
|
|
24
24
|
"zod": "^3.24.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typescript-eslint": "^8.48.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"ai": ">=
|
|
35
|
+
"ai": ">=5.0.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=18"
|