@yourgpt/copilot-sdk 2.1.2 → 2.1.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.
- package/dist/{chunk-XAC7NTIO.js → chunk-37KEHUCE.js} +14 -10
- package/dist/chunk-37KEHUCE.js.map +1 -0
- package/dist/{chunk-VXT2O6R6.js → chunk-7PKGRYHY.js} +278 -82
- package/dist/chunk-7PKGRYHY.js.map +1 -0
- package/dist/{chunk-VUHP6TAN.js → chunk-LZMBBGWH.js} +3 -3
- package/dist/{chunk-VUHP6TAN.js.map → chunk-LZMBBGWH.js.map} +1 -1
- package/dist/{chunk-BNBEKK3U.cjs → chunk-N6VZ7FOW.cjs} +302 -106
- package/dist/chunk-N6VZ7FOW.cjs.map +1 -0
- package/dist/{chunk-7MZLBGFQ.cjs → chunk-OQPRIB73.cjs} +33 -29
- package/dist/chunk-OQPRIB73.cjs.map +1 -0
- package/dist/{chunk-CSEZZ5DX.cjs → chunk-POZNNKNJ.cjs} +2 -2
- package/dist/{chunk-CSEZZ5DX.cjs.map → chunk-POZNNKNJ.cjs.map} +1 -1
- package/dist/{chunk-BMYNG3WM.js → chunk-QLH6TSCC.js} +2 -2
- package/dist/{chunk-BMYNG3WM.js.map → chunk-QLH6TSCC.js.map} +1 -1
- package/dist/{chunk-GSTTJ46F.cjs → chunk-WAPGTQDR.cjs} +5 -5
- package/dist/{chunk-GSTTJ46F.cjs.map → chunk-WAPGTQDR.cjs.map} +1 -1
- package/dist/core/index.cjs +80 -80
- package/dist/core/index.d.cts +17 -6
- package/dist/core/index.d.ts +17 -6
- package/dist/core/index.js +3 -3
- package/dist/{index-jwRcC2QD.d.cts → index-BHkRA0mM.d.cts} +1 -1
- package/dist/{index-Du3Akr_E.d.ts → index-tB0qI8my.d.ts} +1 -1
- package/dist/mcp/index.d.cts +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/react/index.cjs +53 -49
- package/dist/react/index.d.cts +78 -19
- package/dist/react/index.d.ts +78 -19
- package/dist/react/index.js +4 -4
- package/dist/tools/anthropic/index.d.cts +1 -1
- package/dist/tools/anthropic/index.d.ts +1 -1
- package/dist/tools/brave/index.cjs +2 -2
- package/dist/tools/brave/index.d.cts +1 -1
- package/dist/tools/brave/index.d.ts +1 -1
- package/dist/tools/brave/index.js +1 -1
- package/dist/tools/exa/index.cjs +2 -2
- package/dist/tools/exa/index.d.cts +1 -1
- package/dist/tools/exa/index.d.ts +1 -1
- package/dist/tools/exa/index.js +1 -1
- package/dist/tools/google/index.cjs +2 -2
- package/dist/tools/google/index.d.cts +1 -1
- package/dist/tools/google/index.d.ts +1 -1
- package/dist/tools/google/index.js +1 -1
- package/dist/tools/openai/index.cjs +2 -2
- package/dist/tools/openai/index.d.cts +1 -1
- package/dist/tools/openai/index.d.ts +1 -1
- package/dist/tools/openai/index.js +1 -1
- package/dist/tools/searxng/index.cjs +2 -2
- package/dist/tools/searxng/index.d.cts +1 -1
- package/dist/tools/searxng/index.d.ts +1 -1
- package/dist/tools/searxng/index.js +1 -1
- package/dist/tools/serper/index.cjs +2 -2
- package/dist/tools/serper/index.d.cts +1 -1
- package/dist/tools/serper/index.d.ts +1 -1
- package/dist/tools/serper/index.js +1 -1
- package/dist/tools/tavily/index.cjs +2 -2
- package/dist/tools/tavily/index.d.cts +1 -1
- package/dist/tools/tavily/index.d.ts +1 -1
- package/dist/tools/tavily/index.js +1 -1
- package/dist/tools/web-search/index.cjs +3 -3
- package/dist/tools/web-search/index.d.cts +2 -2
- package/dist/tools/web-search/index.d.ts +2 -2
- package/dist/tools/web-search/index.js +2 -2
- package/dist/{tools-BHQRB_YT.d.cts → tools-coIcskZ4.d.cts} +18 -4
- package/dist/{tools-BHQRB_YT.d.ts → tools-coIcskZ4.d.ts} +18 -4
- package/dist/{types-8_Hp2rmm.d.cts → types-C8t4Ut8f.d.cts} +1 -1
- package/dist/{types-OYi-iUVY.d.ts → types-rjaSVmEF.d.ts} +1 -1
- package/dist/ui/index.cjs +8 -8
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-7MZLBGFQ.cjs.map +0 -1
- package/dist/chunk-BNBEKK3U.cjs.map +0 -1
- package/dist/chunk-VXT2O6R6.js.map +0 -1
- package/dist/chunk-XAC7NTIO.js.map +0 -1
package/dist/react/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkN6VZ7FOW_cjs = require('../chunk-N6VZ7FOW.cjs');
|
|
4
|
+
var chunkOQPRIB73_cjs = require('../chunk-OQPRIB73.cjs');
|
|
5
5
|
require('../chunk-JGPDQDY4.cjs');
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-WAPGTQDR.cjs');
|
|
7
|
+
var chunkPOZNNKNJ_cjs = require('../chunk-POZNNKNJ.cjs');
|
|
8
8
|
require('../chunk-ASV6JLYG.cjs');
|
|
9
9
|
require('../chunk-CBAHCI4R.cjs');
|
|
10
10
|
require('../chunk-MEBXW75C.cjs');
|
|
@@ -20,183 +20,187 @@ require('../chunk-JEQ2X3Z6.cjs');
|
|
|
20
20
|
|
|
21
21
|
Object.defineProperty(exports, "AbstractAgentLoop", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkN6VZ7FOW_cjs.AbstractAgentLoop; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "AbstractChat", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkN6VZ7FOW_cjs.AbstractChat; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "CopilotProvider", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkN6VZ7FOW_cjs.CopilotProvider; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "ReactChat", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkN6VZ7FOW_cjs.ReactChat; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "ReactChatState", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkN6VZ7FOW_cjs.ReactChatState; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "ReactThreadManager", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkN6VZ7FOW_cjs.ReactThreadManager; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "ReactThreadManagerState", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkN6VZ7FOW_cjs.ReactThreadManagerState; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "createMessageIntentHandler", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkN6VZ7FOW_cjs.createMessageIntentHandler; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "createPermissionStorage", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkN6VZ7FOW_cjs.createPermissionStorage; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "createReactChat", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkN6VZ7FOW_cjs.createReactChat; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "createReactChatState", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkN6VZ7FOW_cjs.createReactChatState; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "createReactThreadManager", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkN6VZ7FOW_cjs.createReactThreadManager; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "createReactThreadManagerState", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkN6VZ7FOW_cjs.createReactThreadManagerState; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "createSessionPermissionCache", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkN6VZ7FOW_cjs.createSessionPermissionCache; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "createToolIntentHandler", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkN6VZ7FOW_cjs.createToolIntentHandler; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "formatKnowledgeResultsForAI", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkN6VZ7FOW_cjs.formatKnowledgeResultsForAI; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "initialAgentLoopState", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkN6VZ7FOW_cjs.initialAgentLoopState; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "searchKnowledgeBase", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkN6VZ7FOW_cjs.searchKnowledgeBase; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "useAIAction", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkN6VZ7FOW_cjs.useAIAction; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "useAIActions", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkN6VZ7FOW_cjs.useAIActions; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "useAIContext", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkN6VZ7FOW_cjs.useAIContext; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "useAIContexts", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkN6VZ7FOW_cjs.useAIContexts; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "useAITools", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkN6VZ7FOW_cjs.useAITools; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "useAgent", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkN6VZ7FOW_cjs.useAgent; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "useCapabilities", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkN6VZ7FOW_cjs.useCapabilities; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "useChat", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkN6VZ7FOW_cjs.useChat; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "useCopilot", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkN6VZ7FOW_cjs.useCopilot; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "useDevLogger", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkN6VZ7FOW_cjs.useDevLogger; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "useFeatureSupport", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkN6VZ7FOW_cjs.useFeatureSupport; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "useKnowledgeBase", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkN6VZ7FOW_cjs.useKnowledgeBase; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "useMCPClient", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkN6VZ7FOW_cjs.useMCPClient; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "useMCPTools", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkN6VZ7FOW_cjs.useMCPTools; }
|
|
148
148
|
});
|
|
149
149
|
Object.defineProperty(exports, "useMCPUIIntents", {
|
|
150
150
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkN6VZ7FOW_cjs.useMCPUIIntents; }
|
|
152
152
|
});
|
|
153
153
|
Object.defineProperty(exports, "useSuggestions", {
|
|
154
154
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkN6VZ7FOW_cjs.useSuggestions; }
|
|
156
156
|
});
|
|
157
157
|
Object.defineProperty(exports, "useSupportedMediaTypes", {
|
|
158
158
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkN6VZ7FOW_cjs.useSupportedMediaTypes; }
|
|
160
160
|
});
|
|
161
161
|
Object.defineProperty(exports, "useThreadManager", {
|
|
162
162
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkN6VZ7FOW_cjs.useThreadManager; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "useTool", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkN6VZ7FOW_cjs.useTool; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "useToolExecutor", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkN6VZ7FOW_cjs.useToolExecutor; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "useToolWithSchema", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkN6VZ7FOW_cjs.useToolWithSchema; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "useTools", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkN6VZ7FOW_cjs.useTools; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "useToolsWithSchema", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkN6VZ7FOW_cjs.useToolsWithSchema; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "createLocalStorageAdapter", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkOQPRIB73_cjs.createLocalStorageAdapter; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "createMemoryAdapter", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkOQPRIB73_cjs.createMemoryAdapter; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "createServerAdapter", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkOQPRIB73_cjs.createServerAdapter; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "generateSuggestionReason", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkOQPRIB73_cjs.generateSuggestionReason; }
|
|
200
|
+
});
|
|
201
|
+
Object.defineProperty(exports, "tool", {
|
|
202
|
+
enumerable: true,
|
|
203
|
+
get: function () { return chunkPOZNNKNJ_cjs.tool; }
|
|
200
204
|
});
|
|
201
205
|
//# sourceMappingURL=index.cjs.map
|
|
202
206
|
//# sourceMappingURL=index.cjs.map
|
package/dist/react/index.d.cts
CHANGED
|
@@ -2,12 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { L as LLMConfig, l as ToolsConfig, s as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, y as InternalKnowledgeBaseConfig, B as InternalKnowledgeBaseSearchResponse, z as InternalKnowledgeBaseResult, Y as ThreadManagerState, Z as LoadStatus, U as ThreadManagerConfig, F as ThreadManager, V as ThreadManagerCallbacks, W as CreateThreadOptions, X as UpdateThreadOptions } from '../ThreadManager-LfFRhr4e.cjs';
|
|
4
4
|
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-LfFRhr4e.cjs';
|
|
5
|
-
import { T as ToolDefinition, f as ToolSource, P as PermissionLevel, c as ToolInputSchema,
|
|
6
|
-
export {
|
|
5
|
+
import { T as ToolDefinition, f as ToolSource, P as PermissionLevel, c as ToolInputSchema, m as ToolExecution$1, e as ToolContext, b as ToolResponse$1, g as ToolRenderProps, i as ToolSet, U as UnifiedToolCall, s as PermissionStorageConfig, t as PermissionStorageAdapter } from '../tools-coIcskZ4.cjs';
|
|
6
|
+
export { n as AgentLoopConfig, h as ToolConfig, a as ToolExecutionStatus, r as ToolPermission, j as ToolSetEntry, u as tool } from '../tools-coIcskZ4.cjs';
|
|
7
7
|
import { A as AsyncThreadStorageAdapter, c as MessageAttachment, f as ToolCall, S as Source, M as Message, T as Thread, a as ThreadData, b as ThreadStorageAdapter } from '../types-DG2ya08y.cjs';
|
|
8
8
|
export { P as PersistenceConfig, h as ThreadStorageAdapter } from '../types-DG2ya08y.cjs';
|
|
9
|
-
import { G as MCPServerConfig, U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-
|
|
10
|
-
export { b as MCPClientState } from '../types-
|
|
9
|
+
import { G as MCPServerConfig, U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-C8t4Ut8f.cjs';
|
|
10
|
+
export { b as MCPClientState } from '../types-C8t4Ut8f.cjs';
|
|
11
11
|
import { U as UseMCPUIIntentsConfig, m as UseMCPUIIntentsReturn } from '../types-B20VCJXL.cjs';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -468,6 +468,15 @@ interface ChatConfig {
|
|
|
468
468
|
/** Available tools (passed to LLM) */
|
|
469
469
|
tools?: ToolDefinition[];
|
|
470
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Server-side tool execution info (from streaming action events)
|
|
473
|
+
*/
|
|
474
|
+
interface ServerToolInfo {
|
|
475
|
+
id: string;
|
|
476
|
+
name: string;
|
|
477
|
+
args?: Record<string, unknown>;
|
|
478
|
+
hidden?: boolean;
|
|
479
|
+
}
|
|
471
480
|
/**
|
|
472
481
|
* Chat callbacks for state updates
|
|
473
482
|
*/
|
|
@@ -488,6 +497,15 @@ interface ChatCallbacks<T extends UIMessage = UIMessage> {
|
|
|
488
497
|
onToolCalls?: (toolCalls: T["toolCalls"]) => void;
|
|
489
498
|
/** Called when generation is complete */
|
|
490
499
|
onFinish?: (messages: T[]) => void;
|
|
500
|
+
/** Called when a server-side tool starts executing (action:start event) */
|
|
501
|
+
onServerToolStart?: (info: ServerToolInfo) => void;
|
|
502
|
+
/** Called when a server-side tool receives args (action:args event) */
|
|
503
|
+
onServerToolArgs?: (info: ServerToolInfo) => void;
|
|
504
|
+
/** Called when a server-side tool finishes (action:end event) */
|
|
505
|
+
onServerToolEnd?: (info: ServerToolInfo & {
|
|
506
|
+
result?: unknown;
|
|
507
|
+
error?: string;
|
|
508
|
+
}) => void;
|
|
491
509
|
}
|
|
492
510
|
/**
|
|
493
511
|
* Chat initialization options
|
|
@@ -882,7 +900,10 @@ declare class AbstractAgentLoop implements AgentLoopActions {
|
|
|
882
900
|
private setIteration;
|
|
883
901
|
private setProcessing;
|
|
884
902
|
private addToolExecution;
|
|
885
|
-
|
|
903
|
+
/**
|
|
904
|
+
* Update a tool execution with partial data
|
|
905
|
+
*/
|
|
906
|
+
updateToolExecution(id: string, update: Partial<ToolExecution>): void;
|
|
886
907
|
/**
|
|
887
908
|
* Register a tool (reference counted for React StrictMode compatibility)
|
|
888
909
|
* Tools are never fully removed - ref counting ensures StrictMode works correctly
|
|
@@ -923,6 +944,27 @@ declare class AbstractAgentLoop implements AgentLoopActions {
|
|
|
923
944
|
* Clear all tool executions
|
|
924
945
|
*/
|
|
925
946
|
clearToolExecutions(): void;
|
|
947
|
+
/**
|
|
948
|
+
* Add a server-side tool execution (from streaming action:start event)
|
|
949
|
+
* Used to track tools executed on the server (not client-side)
|
|
950
|
+
*/
|
|
951
|
+
addServerToolExecution(info: {
|
|
952
|
+
id: string;
|
|
953
|
+
name: string;
|
|
954
|
+
hidden?: boolean;
|
|
955
|
+
}): void;
|
|
956
|
+
/**
|
|
957
|
+
* Update a server-side tool execution with args (from action:args event)
|
|
958
|
+
*/
|
|
959
|
+
updateServerToolArgs(id: string, args: Record<string, unknown>): void;
|
|
960
|
+
/**
|
|
961
|
+
* Complete a server-side tool execution (from action:end event)
|
|
962
|
+
*/
|
|
963
|
+
completeServerToolExecution(info: {
|
|
964
|
+
id: string;
|
|
965
|
+
result?: unknown;
|
|
966
|
+
error?: string;
|
|
967
|
+
}): void;
|
|
926
968
|
/**
|
|
927
969
|
* Cancel all pending and executing tools
|
|
928
970
|
* This will:
|
|
@@ -1340,19 +1382,21 @@ interface UseAIToolsReturn {
|
|
|
1340
1382
|
declare function useAITools(options?: UseAIToolsOptions): UseAIToolsReturn;
|
|
1341
1383
|
|
|
1342
1384
|
/**
|
|
1343
|
-
* Configuration for registering a tool
|
|
1385
|
+
* Configuration for registering a tool
|
|
1344
1386
|
*/
|
|
1345
1387
|
interface UseToolConfig<TParams = Record<string, unknown>> {
|
|
1346
1388
|
/** Unique tool name */
|
|
1347
1389
|
name: string;
|
|
1348
1390
|
/** Tool description for LLM */
|
|
1349
1391
|
description: string;
|
|
1350
|
-
/**
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1392
|
+
/**
|
|
1393
|
+
* Input schema - accepts either:
|
|
1394
|
+
* - Zod schema: z.object({ name: z.string() })
|
|
1395
|
+
* - JSON Schema: { type: "object", properties: { name: { type: "string" } } }
|
|
1396
|
+
*
|
|
1397
|
+
* Zod schemas are automatically converted to JSON Schema at runtime.
|
|
1398
|
+
*/
|
|
1399
|
+
inputSchema: any;
|
|
1356
1400
|
/** Handler function */
|
|
1357
1401
|
handler: (params: TParams, context?: ToolContext) => Promise<ToolResponse$1> | ToolResponse$1;
|
|
1358
1402
|
/** Optional render function for UI */
|
|
@@ -1376,22 +1420,37 @@ interface UseToolConfig<TParams = Record<string, unknown>> {
|
|
|
1376
1420
|
* This hook registers a tool that can be called by the AI during a conversation.
|
|
1377
1421
|
* The tool will execute on the client side.
|
|
1378
1422
|
*
|
|
1423
|
+
* Supports both Zod schemas and JSON schemas for inputSchema.
|
|
1424
|
+
*
|
|
1379
1425
|
* @example
|
|
1380
1426
|
* ```tsx
|
|
1427
|
+
* // Using Zod schema (recommended)
|
|
1428
|
+
* import { z } from "zod";
|
|
1429
|
+
*
|
|
1381
1430
|
* useTool({
|
|
1382
1431
|
* name: "navigate_to_page",
|
|
1383
1432
|
* description: "Navigate to a specific page in the app",
|
|
1433
|
+
* inputSchema: z.object({
|
|
1434
|
+
* path: z.string().describe("The path to navigate to"),
|
|
1435
|
+
* }),
|
|
1436
|
+
* handler: async ({ path }) => {
|
|
1437
|
+
* router.push(path);
|
|
1438
|
+
* return { success: true, message: `Navigated to ${path}` };
|
|
1439
|
+
* },
|
|
1440
|
+
* });
|
|
1441
|
+
*
|
|
1442
|
+
* // Using JSON Schema
|
|
1443
|
+
* useTool({
|
|
1444
|
+
* name: "open_modal",
|
|
1445
|
+
* description: "Open a modal dialog",
|
|
1384
1446
|
* inputSchema: {
|
|
1385
1447
|
* type: "object",
|
|
1386
1448
|
* properties: {
|
|
1387
|
-
*
|
|
1449
|
+
* modalId: { type: "string" },
|
|
1388
1450
|
* },
|
|
1389
|
-
* required: ["
|
|
1390
|
-
* },
|
|
1391
|
-
* handler: async ({ path }) => {
|
|
1392
|
-
* router.push(path);
|
|
1393
|
-
* return { success: true, message: `Navigated to ${path}` };
|
|
1451
|
+
* required: ["modalId"],
|
|
1394
1452
|
* },
|
|
1453
|
+
* handler: async ({ modalId }) => { ... },
|
|
1395
1454
|
* });
|
|
1396
1455
|
* ```
|
|
1397
1456
|
*/
|
|
@@ -2647,4 +2706,4 @@ interface UseChatReturn {
|
|
|
2647
2706
|
*/
|
|
2648
2707
|
declare function useChat(config: UseChatConfig): UseChatReturn;
|
|
2649
2708
|
|
|
2650
|
-
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, Message, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, type ServerAdapterConfig, Source, type Suggestion, Thread, ThreadData, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolType, type ToolsActions, ToolsConfig, type ToolsState, type UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
|
2709
|
+
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, Message, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, type ServerAdapterConfig, Source, type Suggestion, Thread, ThreadData, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolSet, ToolType, type ToolsActions, ToolsConfig, type ToolsState, type UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { L as LLMConfig, l as ToolsConfig, s as ActionDefinition, o as CapturedContext, m as ToolConsentRequest, T as ToolType, n as ToolConsentResponse, S as ScreenshotOptions, C as ConsoleLogOptions, N as NetworkRequestOptions, I as IntentDetectionResult, y as InternalKnowledgeBaseConfig, B as InternalKnowledgeBaseSearchResponse, z as InternalKnowledgeBaseResult, Y as ThreadManagerState, Z as LoadStatus, U as ThreadManagerConfig, F as ThreadManager, V as ThreadManagerCallbacks, W as CreateThreadOptions, X as UpdateThreadOptions } from '../ThreadManager-Dkp_eLty.js';
|
|
4
4
|
export { A as ActionParameter, q as CloudConfig, r as CopilotConfig, _ as LocalStorageAdapterConfig, J as createLocalStorageAdapter, O as createMemoryAdapter, i as generateSuggestionReason } from '../ThreadManager-Dkp_eLty.js';
|
|
5
|
-
import { T as ToolDefinition, f as ToolSource, P as PermissionLevel, c as ToolInputSchema,
|
|
6
|
-
export {
|
|
5
|
+
import { T as ToolDefinition, f as ToolSource, P as PermissionLevel, c as ToolInputSchema, m as ToolExecution$1, e as ToolContext, b as ToolResponse$1, g as ToolRenderProps, i as ToolSet, U as UnifiedToolCall, s as PermissionStorageConfig, t as PermissionStorageAdapter } from '../tools-coIcskZ4.js';
|
|
6
|
+
export { n as AgentLoopConfig, h as ToolConfig, a as ToolExecutionStatus, r as ToolPermission, j as ToolSetEntry, u as tool } from '../tools-coIcskZ4.js';
|
|
7
7
|
import { A as AsyncThreadStorageAdapter, c as MessageAttachment, f as ToolCall, S as Source, M as Message, T as Thread, a as ThreadData, b as ThreadStorageAdapter } from '../types-DG2ya08y.js';
|
|
8
8
|
export { P as PersistenceConfig, h as ThreadStorageAdapter } from '../types-DG2ya08y.js';
|
|
9
|
-
import { G as MCPServerConfig, U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-
|
|
10
|
-
export { b as MCPClientState } from '../types-
|
|
9
|
+
import { G as MCPServerConfig, U as UseMCPClientConfig, D as UseMCPClientReturn, E as UseMCPToolsConfig, F as UseMCPToolsReturn } from '../types-rjaSVmEF.js';
|
|
10
|
+
export { b as MCPClientState } from '../types-rjaSVmEF.js';
|
|
11
11
|
import { U as UseMCPUIIntentsConfig, m as UseMCPUIIntentsReturn } from '../types-B20VCJXL.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -468,6 +468,15 @@ interface ChatConfig {
|
|
|
468
468
|
/** Available tools (passed to LLM) */
|
|
469
469
|
tools?: ToolDefinition[];
|
|
470
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Server-side tool execution info (from streaming action events)
|
|
473
|
+
*/
|
|
474
|
+
interface ServerToolInfo {
|
|
475
|
+
id: string;
|
|
476
|
+
name: string;
|
|
477
|
+
args?: Record<string, unknown>;
|
|
478
|
+
hidden?: boolean;
|
|
479
|
+
}
|
|
471
480
|
/**
|
|
472
481
|
* Chat callbacks for state updates
|
|
473
482
|
*/
|
|
@@ -488,6 +497,15 @@ interface ChatCallbacks<T extends UIMessage = UIMessage> {
|
|
|
488
497
|
onToolCalls?: (toolCalls: T["toolCalls"]) => void;
|
|
489
498
|
/** Called when generation is complete */
|
|
490
499
|
onFinish?: (messages: T[]) => void;
|
|
500
|
+
/** Called when a server-side tool starts executing (action:start event) */
|
|
501
|
+
onServerToolStart?: (info: ServerToolInfo) => void;
|
|
502
|
+
/** Called when a server-side tool receives args (action:args event) */
|
|
503
|
+
onServerToolArgs?: (info: ServerToolInfo) => void;
|
|
504
|
+
/** Called when a server-side tool finishes (action:end event) */
|
|
505
|
+
onServerToolEnd?: (info: ServerToolInfo & {
|
|
506
|
+
result?: unknown;
|
|
507
|
+
error?: string;
|
|
508
|
+
}) => void;
|
|
491
509
|
}
|
|
492
510
|
/**
|
|
493
511
|
* Chat initialization options
|
|
@@ -882,7 +900,10 @@ declare class AbstractAgentLoop implements AgentLoopActions {
|
|
|
882
900
|
private setIteration;
|
|
883
901
|
private setProcessing;
|
|
884
902
|
private addToolExecution;
|
|
885
|
-
|
|
903
|
+
/**
|
|
904
|
+
* Update a tool execution with partial data
|
|
905
|
+
*/
|
|
906
|
+
updateToolExecution(id: string, update: Partial<ToolExecution>): void;
|
|
886
907
|
/**
|
|
887
908
|
* Register a tool (reference counted for React StrictMode compatibility)
|
|
888
909
|
* Tools are never fully removed - ref counting ensures StrictMode works correctly
|
|
@@ -923,6 +944,27 @@ declare class AbstractAgentLoop implements AgentLoopActions {
|
|
|
923
944
|
* Clear all tool executions
|
|
924
945
|
*/
|
|
925
946
|
clearToolExecutions(): void;
|
|
947
|
+
/**
|
|
948
|
+
* Add a server-side tool execution (from streaming action:start event)
|
|
949
|
+
* Used to track tools executed on the server (not client-side)
|
|
950
|
+
*/
|
|
951
|
+
addServerToolExecution(info: {
|
|
952
|
+
id: string;
|
|
953
|
+
name: string;
|
|
954
|
+
hidden?: boolean;
|
|
955
|
+
}): void;
|
|
956
|
+
/**
|
|
957
|
+
* Update a server-side tool execution with args (from action:args event)
|
|
958
|
+
*/
|
|
959
|
+
updateServerToolArgs(id: string, args: Record<string, unknown>): void;
|
|
960
|
+
/**
|
|
961
|
+
* Complete a server-side tool execution (from action:end event)
|
|
962
|
+
*/
|
|
963
|
+
completeServerToolExecution(info: {
|
|
964
|
+
id: string;
|
|
965
|
+
result?: unknown;
|
|
966
|
+
error?: string;
|
|
967
|
+
}): void;
|
|
926
968
|
/**
|
|
927
969
|
* Cancel all pending and executing tools
|
|
928
970
|
* This will:
|
|
@@ -1340,19 +1382,21 @@ interface UseAIToolsReturn {
|
|
|
1340
1382
|
declare function useAITools(options?: UseAIToolsOptions): UseAIToolsReturn;
|
|
1341
1383
|
|
|
1342
1384
|
/**
|
|
1343
|
-
* Configuration for registering a tool
|
|
1385
|
+
* Configuration for registering a tool
|
|
1344
1386
|
*/
|
|
1345
1387
|
interface UseToolConfig<TParams = Record<string, unknown>> {
|
|
1346
1388
|
/** Unique tool name */
|
|
1347
1389
|
name: string;
|
|
1348
1390
|
/** Tool description for LLM */
|
|
1349
1391
|
description: string;
|
|
1350
|
-
/**
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1392
|
+
/**
|
|
1393
|
+
* Input schema - accepts either:
|
|
1394
|
+
* - Zod schema: z.object({ name: z.string() })
|
|
1395
|
+
* - JSON Schema: { type: "object", properties: { name: { type: "string" } } }
|
|
1396
|
+
*
|
|
1397
|
+
* Zod schemas are automatically converted to JSON Schema at runtime.
|
|
1398
|
+
*/
|
|
1399
|
+
inputSchema: any;
|
|
1356
1400
|
/** Handler function */
|
|
1357
1401
|
handler: (params: TParams, context?: ToolContext) => Promise<ToolResponse$1> | ToolResponse$1;
|
|
1358
1402
|
/** Optional render function for UI */
|
|
@@ -1376,22 +1420,37 @@ interface UseToolConfig<TParams = Record<string, unknown>> {
|
|
|
1376
1420
|
* This hook registers a tool that can be called by the AI during a conversation.
|
|
1377
1421
|
* The tool will execute on the client side.
|
|
1378
1422
|
*
|
|
1423
|
+
* Supports both Zod schemas and JSON schemas for inputSchema.
|
|
1424
|
+
*
|
|
1379
1425
|
* @example
|
|
1380
1426
|
* ```tsx
|
|
1427
|
+
* // Using Zod schema (recommended)
|
|
1428
|
+
* import { z } from "zod";
|
|
1429
|
+
*
|
|
1381
1430
|
* useTool({
|
|
1382
1431
|
* name: "navigate_to_page",
|
|
1383
1432
|
* description: "Navigate to a specific page in the app",
|
|
1433
|
+
* inputSchema: z.object({
|
|
1434
|
+
* path: z.string().describe("The path to navigate to"),
|
|
1435
|
+
* }),
|
|
1436
|
+
* handler: async ({ path }) => {
|
|
1437
|
+
* router.push(path);
|
|
1438
|
+
* return { success: true, message: `Navigated to ${path}` };
|
|
1439
|
+
* },
|
|
1440
|
+
* });
|
|
1441
|
+
*
|
|
1442
|
+
* // Using JSON Schema
|
|
1443
|
+
* useTool({
|
|
1444
|
+
* name: "open_modal",
|
|
1445
|
+
* description: "Open a modal dialog",
|
|
1384
1446
|
* inputSchema: {
|
|
1385
1447
|
* type: "object",
|
|
1386
1448
|
* properties: {
|
|
1387
|
-
*
|
|
1449
|
+
* modalId: { type: "string" },
|
|
1388
1450
|
* },
|
|
1389
|
-
* required: ["
|
|
1390
|
-
* },
|
|
1391
|
-
* handler: async ({ path }) => {
|
|
1392
|
-
* router.push(path);
|
|
1393
|
-
* return { success: true, message: `Navigated to ${path}` };
|
|
1451
|
+
* required: ["modalId"],
|
|
1394
1452
|
* },
|
|
1453
|
+
* handler: async ({ modalId }) => { ... },
|
|
1395
1454
|
* });
|
|
1396
1455
|
* ```
|
|
1397
1456
|
*/
|
|
@@ -2647,4 +2706,4 @@ interface UseChatReturn {
|
|
|
2647
2706
|
*/
|
|
2648
2707
|
declare function useChat(config: UseChatConfig): UseChatReturn;
|
|
2649
2708
|
|
|
2650
|
-
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, Message, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, type ServerAdapterConfig, Source, type Suggestion, Thread, ThreadData, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolType, type ToolsActions, ToolsConfig, type ToolsState, type UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
|
2709
|
+
export { type AIContextItem, AbstractAgentLoop, AbstractChat, ActionDefinition, type AgentLoopActions, type AgentLoopCallbacks, type AgentLoopState, AsyncThreadStorageAdapter, type CapabilitiesResponse, CapturedContext, type ChatActions, type ChatCallbacks, type ChatConfig, type ChatState, type ChatStatus, type ToolExecution as ChatToolExecution, type ToolResponse as ChatToolResponse, type CombinedChatState, type CopilotContextValue, CopilotProvider, type CopilotProviderProps, type AgentLoopState$1 as CoreAgentLoopState, type ChatState$1 as CoreChatState, type DevLoggerState, IntentDetectionResult, type KnowledgeBaseConfig, type KnowledgeBaseResult, type KnowledgeBaseSearchResponse, LLMConfig, Message, PermissionLevel, PermissionStorageAdapter, PermissionStorageConfig, type ProviderCapabilities, ReactChat, type ReactChatConfig, ReactChatState, ReactThreadManager, type ReactThreadManagerConfig, ReactThreadManagerState, type ServerAdapterConfig, Source, type Suggestion, Thread, ThreadData, ToolConsentRequest, ToolConsentResponse, ToolContext, ToolDefinition, ToolExecution$1 as ToolExecution, ToolResponse$1 as ToolResponse, ToolSet, ToolType, type ToolsActions, ToolsConfig, type ToolsState, type UIMessage, UnifiedToolCall, type UseAIToolsOptions, type UseAIToolsReturn, type UseAgentOptions, type UseAgentReturn, type UseChatConfig, type UseChatReturn, type UseKnowledgeBaseConfig, UseMCPClientConfig, UseMCPClientReturn, UseMCPToolsConfig, UseMCPToolsReturn, UseMCPUIIntentsConfig, UseMCPUIIntentsReturn, type UseSuggestionsOptions, type UseSuggestionsReturn, type UseThreadManagerConfig, type UseThreadManagerReturn, type UseToolConfig, type UseToolExecutorReturn, type UseToolWithSchemaConfig, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createServerAdapter, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema };
|
package/dist/react/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AbstractAgentLoop, AbstractChat, CopilotProvider, ReactChat, ReactChatState, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema } from '../chunk-
|
|
2
|
-
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-
|
|
1
|
+
export { AbstractAgentLoop, AbstractChat, CopilotProvider, ReactChat, ReactChatState, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactChatState, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, formatKnowledgeResultsForAI, initialAgentLoopState, searchKnowledgeBase, useAIAction, useAIActions, useAIContext, useAIContexts, useAITools, useAgent, useCapabilities, useChat, useCopilot, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPClient, useMCPTools, useMCPUIIntents, useSuggestions, useSupportedMediaTypes, useThreadManager, useTool, useToolExecutor, useToolWithSchema, useTools, useToolsWithSchema } from '../chunk-7PKGRYHY.js';
|
|
2
|
+
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-37KEHUCE.js';
|
|
3
3
|
import '../chunk-EWVQWTNV.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
|
|
4
|
+
import '../chunk-LZMBBGWH.js';
|
|
5
|
+
export { tool } from '../chunk-QLH6TSCC.js';
|
|
6
6
|
import '../chunk-XGITAEXU.js';
|
|
7
7
|
import '../chunk-7W7QLZNC.js';
|
|
8
8
|
import '../chunk-CEOMTQTP.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPOZNNKNJ_cjs = require('../../chunk-POZNNKNJ.cjs');
|
|
4
4
|
var chunkASV6JLYG_cjs = require('../../chunk-ASV6JLYG.cjs');
|
|
5
5
|
require('../../chunk-CBAHCI4R.cjs');
|
|
6
6
|
require('../../chunk-MEBXW75C.cjs');
|
|
@@ -70,7 +70,7 @@ function braveSearch(config) {
|
|
|
70
70
|
};
|
|
71
71
|
} catch (error) {
|
|
72
72
|
const errorMessage = error instanceof Error ? error.message : "Web search failed";
|
|
73
|
-
return
|
|
73
|
+
return chunkPOZNNKNJ_cjs.failure(errorMessage);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
};
|