@yourgpt/copilot-sdk 0.1.0 → 0.1.1

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,288 +1,288 @@
1
1
  'use strict';
2
2
 
3
- var chunk2ZCWVAAK_cjs = require('../chunk-2ZCWVAAK.cjs');
3
+ var chunkIH7WXWX4_cjs = require('../chunk-IH7WXWX4.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "CLOUD_MAX_FILE_SIZE", {
8
8
  enumerable: true,
9
- get: function () { return chunk2ZCWVAAK_cjs.CLOUD_MAX_FILE_SIZE; }
9
+ get: function () { return chunkIH7WXWX4_cjs.CLOUD_MAX_FILE_SIZE; }
10
10
  });
11
11
  Object.defineProperty(exports, "DEFAULT_MODELS", {
12
12
  enumerable: true,
13
- get: function () { return chunk2ZCWVAAK_cjs.DEFAULT_MODELS; }
13
+ get: function () { return chunkIH7WXWX4_cjs.DEFAULT_MODELS; }
14
14
  });
15
15
  Object.defineProperty(exports, "DEFAULT_YOURGPT_ENDPOINT", {
16
16
  enumerable: true,
17
- get: function () { return chunk2ZCWVAAK_cjs.DEFAULT_YOURGPT_ENDPOINT; }
17
+ get: function () { return chunkIH7WXWX4_cjs.DEFAULT_YOURGPT_ENDPOINT; }
18
18
  });
19
19
  Object.defineProperty(exports, "actionToTool", {
20
20
  enumerable: true,
21
- get: function () { return chunk2ZCWVAAK_cjs.actionToTool; }
21
+ get: function () { return chunkIH7WXWX4_cjs.actionToTool; }
22
22
  });
23
23
  Object.defineProperty(exports, "builtinTools", {
24
24
  enumerable: true,
25
- get: function () { return chunk2ZCWVAAK_cjs.builtinTools; }
25
+ get: function () { return chunkIH7WXWX4_cjs.builtinTools; }
26
26
  });
27
27
  Object.defineProperty(exports, "captureCurrentLogs", {
28
28
  enumerable: true,
29
- get: function () { return chunk2ZCWVAAK_cjs.captureCurrentLogs; }
29
+ get: function () { return chunkIH7WXWX4_cjs.captureCurrentLogs; }
30
30
  });
31
31
  Object.defineProperty(exports, "captureScreenshot", {
32
32
  enumerable: true,
33
- get: function () { return chunk2ZCWVAAK_cjs.captureScreenshot; }
33
+ get: function () { return chunkIH7WXWX4_cjs.captureScreenshot; }
34
34
  });
35
35
  Object.defineProperty(exports, "clearConsoleLogs", {
36
36
  enumerable: true,
37
- get: function () { return chunk2ZCWVAAK_cjs.clearConsoleLogs; }
37
+ get: function () { return chunkIH7WXWX4_cjs.clearConsoleLogs; }
38
38
  });
39
39
  Object.defineProperty(exports, "clearNetworkRequests", {
40
40
  enumerable: true,
41
- get: function () { return chunk2ZCWVAAK_cjs.clearNetworkRequests; }
41
+ get: function () { return chunkIH7WXWX4_cjs.clearNetworkRequests; }
42
42
  });
43
43
  Object.defineProperty(exports, "consoleLogsTool", {
44
44
  enumerable: true,
45
- get: function () { return chunk2ZCWVAAK_cjs.consoleLogsTool; }
45
+ get: function () { return chunkIH7WXWX4_cjs.consoleLogsTool; }
46
46
  });
47
47
  Object.defineProperty(exports, "createAssistantMessage", {
48
48
  enumerable: true,
49
- get: function () { return chunk2ZCWVAAK_cjs.createAssistantMessage; }
49
+ get: function () { return chunkIH7WXWX4_cjs.createAssistantMessage; }
50
50
  });
51
51
  Object.defineProperty(exports, "createCloudStorage", {
52
52
  enumerable: true,
53
- get: function () { return chunk2ZCWVAAK_cjs.createCloudStorage; }
53
+ get: function () { return chunkIH7WXWX4_cjs.createCloudStorage; }
54
54
  });
55
55
  Object.defineProperty(exports, "createConsoleLogsTool", {
56
56
  enumerable: true,
57
- get: function () { return chunk2ZCWVAAK_cjs.createConsoleLogsTool; }
57
+ get: function () { return chunkIH7WXWX4_cjs.createConsoleLogsTool; }
58
58
  });
59
59
  Object.defineProperty(exports, "createCustomDetector", {
60
60
  enumerable: true,
61
- get: function () { return chunk2ZCWVAAK_cjs.createCustomDetector; }
61
+ get: function () { return chunkIH7WXWX4_cjs.createCustomDetector; }
62
62
  });
63
63
  Object.defineProperty(exports, "createMessage", {
64
64
  enumerable: true,
65
- get: function () { return chunk2ZCWVAAK_cjs.createMessage; }
65
+ get: function () { return chunkIH7WXWX4_cjs.createMessage; }
66
66
  });
67
67
  Object.defineProperty(exports, "createNetworkRequestsTool", {
68
68
  enumerable: true,
69
- get: function () { return chunk2ZCWVAAK_cjs.createNetworkRequestsTool; }
69
+ get: function () { return chunkIH7WXWX4_cjs.createNetworkRequestsTool; }
70
70
  });
71
71
  Object.defineProperty(exports, "createSSEStream", {
72
72
  enumerable: true,
73
- get: function () { return chunk2ZCWVAAK_cjs.createSSEStream; }
73
+ get: function () { return chunkIH7WXWX4_cjs.createSSEStream; }
74
74
  });
75
75
  Object.defineProperty(exports, "createScreenshotTool", {
76
76
  enumerable: true,
77
- get: function () { return chunk2ZCWVAAK_cjs.createScreenshotTool; }
77
+ get: function () { return chunkIH7WXWX4_cjs.createScreenshotTool; }
78
78
  });
79
79
  Object.defineProperty(exports, "createToolCall", {
80
80
  enumerable: true,
81
- get: function () { return chunk2ZCWVAAK_cjs.createToolCall; }
81
+ get: function () { return chunkIH7WXWX4_cjs.createToolCall; }
82
82
  });
83
83
  Object.defineProperty(exports, "createToolMessage", {
84
84
  enumerable: true,
85
- get: function () { return chunk2ZCWVAAK_cjs.createToolMessage; }
85
+ get: function () { return chunkIH7WXWX4_cjs.createToolMessage; }
86
86
  });
87
87
  Object.defineProperty(exports, "createToolResult", {
88
88
  enumerable: true,
89
- get: function () { return chunk2ZCWVAAK_cjs.createToolResult; }
89
+ get: function () { return chunkIH7WXWX4_cjs.createToolResult; }
90
90
  });
91
91
  Object.defineProperty(exports, "createUserMessage", {
92
92
  enumerable: true,
93
- get: function () { return chunk2ZCWVAAK_cjs.createUserMessage; }
93
+ get: function () { return chunkIH7WXWX4_cjs.createUserMessage; }
94
94
  });
95
95
  Object.defineProperty(exports, "defaultSystemMessage", {
96
96
  enumerable: true,
97
- get: function () { return chunk2ZCWVAAK_cjs.defaultSystemMessage; }
97
+ get: function () { return chunkIH7WXWX4_cjs.defaultSystemMessage; }
98
98
  });
99
99
  Object.defineProperty(exports, "defineClientTool", {
100
100
  enumerable: true,
101
- get: function () { return chunk2ZCWVAAK_cjs.defineClientTool; }
101
+ get: function () { return chunkIH7WXWX4_cjs.defineClientTool; }
102
102
  });
103
103
  Object.defineProperty(exports, "defineServerTool", {
104
104
  enumerable: true,
105
- get: function () { return chunk2ZCWVAAK_cjs.defineServerTool; }
105
+ get: function () { return chunkIH7WXWX4_cjs.defineServerTool; }
106
106
  });
107
107
  Object.defineProperty(exports, "defineTool", {
108
108
  enumerable: true,
109
- get: function () { return chunk2ZCWVAAK_cjs.defineTool; }
109
+ get: function () { return chunkIH7WXWX4_cjs.defineTool; }
110
110
  });
111
111
  Object.defineProperty(exports, "detectIntent", {
112
112
  enumerable: true,
113
- get: function () { return chunk2ZCWVAAK_cjs.detectIntent; }
113
+ get: function () { return chunkIH7WXWX4_cjs.detectIntent; }
114
114
  });
115
115
  Object.defineProperty(exports, "failure", {
116
116
  enumerable: true,
117
- get: function () { return chunk2ZCWVAAK_cjs.failure; }
117
+ get: function () { return chunkIH7WXWX4_cjs.failure; }
118
118
  });
119
119
  Object.defineProperty(exports, "formatLogsForAI", {
120
120
  enumerable: true,
121
- get: function () { return chunk2ZCWVAAK_cjs.formatLogsForAI; }
121
+ get: function () { return chunkIH7WXWX4_cjs.formatLogsForAI; }
122
122
  });
123
123
  Object.defineProperty(exports, "formatRequestsForAI", {
124
124
  enumerable: true,
125
- get: function () { return chunk2ZCWVAAK_cjs.formatRequestsForAI; }
125
+ get: function () { return chunkIH7WXWX4_cjs.formatRequestsForAI; }
126
126
  });
127
127
  Object.defineProperty(exports, "formatSSE", {
128
128
  enumerable: true,
129
- get: function () { return chunk2ZCWVAAK_cjs.formatSSE; }
129
+ get: function () { return chunkIH7WXWX4_cjs.formatSSE; }
130
130
  });
131
131
  Object.defineProperty(exports, "generateId", {
132
132
  enumerable: true,
133
- get: function () { return chunk2ZCWVAAK_cjs.generateId; }
133
+ get: function () { return chunkIH7WXWX4_cjs.generateId; }
134
134
  });
135
135
  Object.defineProperty(exports, "generateMessageId", {
136
136
  enumerable: true,
137
- get: function () { return chunk2ZCWVAAK_cjs.generateMessageId; }
137
+ get: function () { return chunkIH7WXWX4_cjs.generateMessageId; }
138
138
  });
139
139
  Object.defineProperty(exports, "generateSuggestionReason", {
140
140
  enumerable: true,
141
- get: function () { return chunk2ZCWVAAK_cjs.generateSuggestionReason; }
141
+ get: function () { return chunkIH7WXWX4_cjs.generateSuggestionReason; }
142
142
  });
143
143
  Object.defineProperty(exports, "generateThreadId", {
144
144
  enumerable: true,
145
- get: function () { return chunk2ZCWVAAK_cjs.generateThreadId; }
145
+ get: function () { return chunkIH7WXWX4_cjs.generateThreadId; }
146
146
  });
147
147
  Object.defineProperty(exports, "generateThreadTitle", {
148
148
  enumerable: true,
149
- get: function () { return chunk2ZCWVAAK_cjs.generateThreadTitle; }
149
+ get: function () { return chunkIH7WXWX4_cjs.generateThreadTitle; }
150
150
  });
151
151
  Object.defineProperty(exports, "generateToolCallId", {
152
152
  enumerable: true,
153
- get: function () { return chunk2ZCWVAAK_cjs.generateToolCallId; }
153
+ get: function () { return chunkIH7WXWX4_cjs.generateToolCallId; }
154
154
  });
155
155
  Object.defineProperty(exports, "getAttachmentTypeFromMime", {
156
156
  enumerable: true,
157
- get: function () { return chunk2ZCWVAAK_cjs.getAttachmentTypeFromMime; }
157
+ get: function () { return chunkIH7WXWX4_cjs.getAttachmentTypeFromMime; }
158
158
  });
159
159
  Object.defineProperty(exports, "getConsoleErrors", {
160
160
  enumerable: true,
161
- get: function () { return chunk2ZCWVAAK_cjs.getConsoleErrors; }
161
+ get: function () { return chunkIH7WXWX4_cjs.getConsoleErrors; }
162
162
  });
163
163
  Object.defineProperty(exports, "getConsoleLogs", {
164
164
  enumerable: true,
165
- get: function () { return chunk2ZCWVAAK_cjs.getConsoleLogs; }
165
+ get: function () { return chunkIH7WXWX4_cjs.getConsoleLogs; }
166
166
  });
167
167
  Object.defineProperty(exports, "getConsoleWarnings", {
168
168
  enumerable: true,
169
- get: function () { return chunk2ZCWVAAK_cjs.getConsoleWarnings; }
169
+ get: function () { return chunkIH7WXWX4_cjs.getConsoleWarnings; }
170
170
  });
171
171
  Object.defineProperty(exports, "getDefaultModel", {
172
172
  enumerable: true,
173
- get: function () { return chunk2ZCWVAAK_cjs.getDefaultModel; }
173
+ get: function () { return chunkIH7WXWX4_cjs.getDefaultModel; }
174
174
  });
175
175
  Object.defineProperty(exports, "getFailedRequests", {
176
176
  enumerable: true,
177
- get: function () { return chunk2ZCWVAAK_cjs.getFailedRequests; }
177
+ get: function () { return chunkIH7WXWX4_cjs.getFailedRequests; }
178
178
  });
179
179
  Object.defineProperty(exports, "getNetworkRequests", {
180
180
  enumerable: true,
181
- get: function () { return chunk2ZCWVAAK_cjs.getNetworkRequests; }
181
+ get: function () { return chunkIH7WXWX4_cjs.getNetworkRequests; }
182
182
  });
183
183
  Object.defineProperty(exports, "getPrimaryTool", {
184
184
  enumerable: true,
185
- get: function () { return chunk2ZCWVAAK_cjs.getPrimaryTool; }
185
+ get: function () { return chunkIH7WXWX4_cjs.getPrimaryTool; }
186
186
  });
187
187
  Object.defineProperty(exports, "hasToolCalls", {
188
188
  enumerable: true,
189
- get: function () { return chunk2ZCWVAAK_cjs.hasToolCalls; }
189
+ get: function () { return chunkIH7WXWX4_cjs.hasToolCalls; }
190
190
  });
191
191
  Object.defineProperty(exports, "hasToolSuggestions", {
192
192
  enumerable: true,
193
- get: function () { return chunk2ZCWVAAK_cjs.hasToolSuggestions; }
193
+ get: function () { return chunkIH7WXWX4_cjs.hasToolSuggestions; }
194
194
  });
195
195
  Object.defineProperty(exports, "isConsoleCaptureActive", {
196
196
  enumerable: true,
197
- get: function () { return chunk2ZCWVAAK_cjs.isConsoleCaptureActive; }
197
+ get: function () { return chunkIH7WXWX4_cjs.isConsoleCaptureActive; }
198
198
  });
199
199
  Object.defineProperty(exports, "isNetworkCaptureActive", {
200
200
  enumerable: true,
201
- get: function () { return chunk2ZCWVAAK_cjs.isNetworkCaptureActive; }
201
+ get: function () { return chunkIH7WXWX4_cjs.isNetworkCaptureActive; }
202
202
  });
203
203
  Object.defineProperty(exports, "isScreenshotSupported", {
204
204
  enumerable: true,
205
- get: function () { return chunk2ZCWVAAK_cjs.isScreenshotSupported; }
205
+ get: function () { return chunkIH7WXWX4_cjs.isScreenshotSupported; }
206
206
  });
207
207
  Object.defineProperty(exports, "isToolResult", {
208
208
  enumerable: true,
209
- get: function () { return chunk2ZCWVAAK_cjs.isToolResult; }
209
+ get: function () { return chunkIH7WXWX4_cjs.isToolResult; }
210
210
  });
211
211
  Object.defineProperty(exports, "networkRequestsTool", {
212
212
  enumerable: true,
213
- get: function () { return chunk2ZCWVAAK_cjs.networkRequestsTool; }
213
+ get: function () { return chunkIH7WXWX4_cjs.networkRequestsTool; }
214
214
  });
215
215
  Object.defineProperty(exports, "parseSSELine", {
216
216
  enumerable: true,
217
- get: function () { return chunk2ZCWVAAK_cjs.parseSSELine; }
217
+ get: function () { return chunkIH7WXWX4_cjs.parseSSELine; }
218
218
  });
219
219
  Object.defineProperty(exports, "parseStreamEvent", {
220
220
  enumerable: true,
221
- get: function () { return chunk2ZCWVAAK_cjs.parseStreamEvent; }
221
+ get: function () { return chunkIH7WXWX4_cjs.parseStreamEvent; }
222
222
  });
223
223
  Object.defineProperty(exports, "parseToolCallArgs", {
224
224
  enumerable: true,
225
- get: function () { return chunk2ZCWVAAK_cjs.parseToolCallArgs; }
225
+ get: function () { return chunkIH7WXWX4_cjs.parseToolCallArgs; }
226
226
  });
227
227
  Object.defineProperty(exports, "processFileToAttachment", {
228
228
  enumerable: true,
229
- get: function () { return chunk2ZCWVAAK_cjs.processFileToAttachment; }
229
+ get: function () { return chunkIH7WXWX4_cjs.processFileToAttachment; }
230
230
  });
231
231
  Object.defineProperty(exports, "resizeScreenshot", {
232
232
  enumerable: true,
233
- get: function () { return chunk2ZCWVAAK_cjs.resizeScreenshot; }
233
+ get: function () { return chunkIH7WXWX4_cjs.resizeScreenshot; }
234
234
  });
235
235
  Object.defineProperty(exports, "screenshotTool", {
236
236
  enumerable: true,
237
- get: function () { return chunk2ZCWVAAK_cjs.screenshotTool; }
237
+ get: function () { return chunkIH7WXWX4_cjs.screenshotTool; }
238
238
  });
239
239
  Object.defineProperty(exports, "serializeStreamEvent", {
240
240
  enumerable: true,
241
- get: function () { return chunk2ZCWVAAK_cjs.serializeStreamEvent; }
241
+ get: function () { return chunkIH7WXWX4_cjs.serializeStreamEvent; }
242
242
  });
243
243
  Object.defineProperty(exports, "startConsoleCapture", {
244
244
  enumerable: true,
245
- get: function () { return chunk2ZCWVAAK_cjs.startConsoleCapture; }
245
+ get: function () { return chunkIH7WXWX4_cjs.startConsoleCapture; }
246
246
  });
247
247
  Object.defineProperty(exports, "startNetworkCapture", {
248
248
  enumerable: true,
249
- get: function () { return chunk2ZCWVAAK_cjs.startNetworkCapture; }
249
+ get: function () { return chunkIH7WXWX4_cjs.startNetworkCapture; }
250
250
  });
251
251
  Object.defineProperty(exports, "stopConsoleCapture", {
252
252
  enumerable: true,
253
- get: function () { return chunk2ZCWVAAK_cjs.stopConsoleCapture; }
253
+ get: function () { return chunkIH7WXWX4_cjs.stopConsoleCapture; }
254
254
  });
255
255
  Object.defineProperty(exports, "stopNetworkCapture", {
256
256
  enumerable: true,
257
- get: function () { return chunk2ZCWVAAK_cjs.stopNetworkCapture; }
257
+ get: function () { return chunkIH7WXWX4_cjs.stopNetworkCapture; }
258
258
  });
259
259
  Object.defineProperty(exports, "streamSSE", {
260
260
  enumerable: true,
261
- get: function () { return chunk2ZCWVAAK_cjs.streamSSE; }
261
+ get: function () { return chunkIH7WXWX4_cjs.streamSSE; }
262
262
  });
263
263
  Object.defineProperty(exports, "success", {
264
264
  enumerable: true,
265
- get: function () { return chunk2ZCWVAAK_cjs.success; }
265
+ get: function () { return chunkIH7WXWX4_cjs.success; }
266
266
  });
267
267
  Object.defineProperty(exports, "tool", {
268
268
  enumerable: true,
269
- get: function () { return chunk2ZCWVAAK_cjs.tool; }
269
+ get: function () { return chunkIH7WXWX4_cjs.tool; }
270
270
  });
271
271
  Object.defineProperty(exports, "toolToAnthropicFormat", {
272
272
  enumerable: true,
273
- get: function () { return chunk2ZCWVAAK_cjs.toolToAnthropicFormat; }
273
+ get: function () { return chunkIH7WXWX4_cjs.toolToAnthropicFormat; }
274
274
  });
275
275
  Object.defineProperty(exports, "toolToOpenAIFormat", {
276
276
  enumerable: true,
277
- get: function () { return chunk2ZCWVAAK_cjs.toolToOpenAIFormat; }
277
+ get: function () { return chunkIH7WXWX4_cjs.toolToOpenAIFormat; }
278
278
  });
279
279
  Object.defineProperty(exports, "zodObjectToInputSchema", {
280
280
  enumerable: true,
281
- get: function () { return chunk2ZCWVAAK_cjs.zodObjectToInputSchema; }
281
+ get: function () { return chunkIH7WXWX4_cjs.zodObjectToInputSchema; }
282
282
  });
283
283
  Object.defineProperty(exports, "zodToJsonSchema", {
284
284
  enumerable: true,
285
- get: function () { return chunk2ZCWVAAK_cjs.zodToJsonSchema; }
285
+ get: function () { return chunkIH7WXWX4_cjs.zodToJsonSchema; }
286
286
  });
287
287
  //# sourceMappingURL=index.cjs.map
288
288
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,7 @@
1
- import { S as ScreenshotOptions, a as ScreenshotResult, C as ConsoleLogOptions, b as ConsoleLogResult, c as ConsoleLogEntry, N as NetworkRequestOptions, d as NetworkRequestResult, e as NetworkRequestEntry, T as ToolDefinition, f as Source, g as ToolExecutionStatus, h as ToolResponse, J as JSONSchemaProperty, i as ToolInputSchema, j as ToolLocation, k as ToolContext, M as MessageAttachment } from '../thread-C2FjuGLb.cjs';
2
- export { ae as AIContent, a3 as AIProvider, ad as AIResponseMode, O as ActionDefinition, K as ActionParameter, Q as ActionRenderProps, ab as AgentLoopConfig, ac as AgentLoopState, v as CapturedContext, E as CloudConfig, q as ConsoleLogType, G as CopilotConfig, w as CustomKeywords, au as DEFAULT_MODELS, F as Extension, H as HttpMethod, I as IntentDetectionResult, Y as InternalKnowledgeBaseConfig, Z as InternalKnowledgeBaseResult, _ as InternalKnowledgeBaseSearchResponse, U as KnowledgeBaseConfig, R as KnowledgeBaseProvider, V as KnowledgeBaseResult, W as KnowledgeBaseSearchRequest, X as KnowledgeBaseSearchResponse, D as LLMConfig, L as LLMProvider, y as Message, z as MessageMetadata, x as MessageRole, P as ParameterType, af as PermissionLevel, ai as PermissionStorageAdapter, ah as PermissionStorageConfig, a1 as PersistenceConfig, $ as Thread, a0 as ThreadData, a2 as ThreadStorageAdapter, B as TokenUsage, a9 as ToolApprovalStatus, A as ToolCall, a5 as ToolConfig, t as ToolConsentRequest, u as ToolConsentResponse, aa as ToolExecution, ag as ToolPermission, a4 as ToolRenderProps, a6 as ToolSet, r as ToolType, s as ToolsConfig, a7 as UnifiedToolCall, a8 as UnifiedToolResult, as as actionToTool, am as createAssistantMessage, p as createCustomDetector, ak as createMessage, ao as createToolCall, an as createToolMessage, ay as createToolResult, al as createUserMessage, l as detectIntent, aA as failure, o as generateSuggestionReason, aj as generateThreadTitle, at as getDefaultModel, n as getPrimaryTool, aq as hasToolCalls, m as hasToolSuggestions, ar as isToolResult, ap as parseToolCallArgs, az as success, av as tool, ax as toolToAnthropicFormat, aw as toolToOpenAIFormat } from '../thread-C2FjuGLb.cjs';
1
+ import { S as ScreenshotOptions, a as ScreenshotResult, C as ConsoleLogOptions, b as ConsoleLogResult, c as ConsoleLogEntry, N as NetworkRequestOptions, d as NetworkRequestResult, e as NetworkRequestEntry, f as Source, M as MessageAttachment } from '../thread-CLmfwine.cjs';
2
+ export { z as ActionDefinition, A as ActionParameter, B as ActionRenderProps, p as CapturedContext, x as CloudConfig, l as ConsoleLogType, y as CopilotConfig, q as CustomKeywords, a7 as DEFAULT_MODELS, E as Extension, H as HttpMethod, I as IntentDetectionResult, O as InternalKnowledgeBaseConfig, Q as InternalKnowledgeBaseResult, R as InternalKnowledgeBaseSearchResponse, D as KnowledgeBaseConfig, K as KnowledgeBaseProvider, F as KnowledgeBaseResult, G as KnowledgeBaseSearchRequest, J as KnowledgeBaseSearchResponse, w as LLMConfig, L as LLMProvider, s as Message, t as MessageMetadata, r as MessageRole, P as ParameterType, W as PersistenceConfig, U as Thread, V as ThreadData, X as ThreadStorageAdapter, v as TokenUsage, u as ToolCall, n as ToolConsentRequest, o as ToolConsentResponse, T as ToolType, m as ToolsConfig, a5 as actionToTool, $ as createAssistantMessage, k as createCustomDetector, Z as createMessage, a1 as createToolCall, a0 as createToolMessage, _ as createUserMessage, g as detectIntent, j as generateSuggestionReason, Y as generateThreadTitle, a6 as getDefaultModel, i as getPrimaryTool, a3 as hasToolCalls, h as hasToolSuggestions, a4 as isToolResult, a2 as parseToolCallArgs } from '../thread-CLmfwine.cjs';
3
+ import { T as ToolDefinition, a as ToolExecutionStatus, b as ToolResponse, J as JSONSchemaProperty, c as ToolInputSchema, d as ToolLocation, e as ToolContext } from '../tools-eeJ5iEC4.cjs';
4
+ export { o as AIContent, A as AIProvider, n as AIResponseMode, l as AgentLoopConfig, m as AgentLoopState, P as PermissionLevel, r as PermissionStorageAdapter, q as PermissionStorageConfig, j as ToolApprovalStatus, g as ToolConfig, k as ToolExecution, p as ToolPermission, f as ToolRenderProps, h as ToolSet, U as UnifiedToolCall, i as UnifiedToolResult, v as createToolResult, x as failure, w as success, t as tool, u as toolToAnthropicFormat, s as toolToOpenAIFormat } from '../tools-eeJ5iEC4.cjs';
3
5
 
4
6
  /**
5
7
  * Screenshot Capture Tool
@@ -633,12 +635,19 @@ interface DefineToolConfig<TSchema extends {
633
635
  schema: TSchema;
634
636
  /** Handler function */
635
637
  handler?: (params: TSchema["_output"], context?: ToolContext) => Promise<ToolResponse> | ToolResponse;
636
- /** Optional render function */
638
+ /** Optional render function for custom UI */
637
639
  render?: (props: {
638
- status: "pending" | "executing" | "completed" | "error";
640
+ status: "pending" | "approval-required" | "executing" | "completed" | "error";
639
641
  args: TSchema["_output"];
640
642
  result?: ToolResponse;
641
643
  error?: string;
644
+ toolCallId: string;
645
+ toolName: string;
646
+ approval?: {
647
+ onApprove: (extraData?: Record<string, unknown>) => void;
648
+ onReject: (reason?: string) => void;
649
+ message?: string;
650
+ };
642
651
  }) => unknown;
643
652
  /** Whether the tool is available */
644
653
  available?: boolean;
@@ -1,5 +1,7 @@
1
- import { S as ScreenshotOptions, a as ScreenshotResult, C as ConsoleLogOptions, b as ConsoleLogResult, c as ConsoleLogEntry, N as NetworkRequestOptions, d as NetworkRequestResult, e as NetworkRequestEntry, T as ToolDefinition, f as Source, g as ToolExecutionStatus, h as ToolResponse, J as JSONSchemaProperty, i as ToolInputSchema, j as ToolLocation, k as ToolContext, M as MessageAttachment } from '../thread-C2FjuGLb.js';
2
- export { ae as AIContent, a3 as AIProvider, ad as AIResponseMode, O as ActionDefinition, K as ActionParameter, Q as ActionRenderProps, ab as AgentLoopConfig, ac as AgentLoopState, v as CapturedContext, E as CloudConfig, q as ConsoleLogType, G as CopilotConfig, w as CustomKeywords, au as DEFAULT_MODELS, F as Extension, H as HttpMethod, I as IntentDetectionResult, Y as InternalKnowledgeBaseConfig, Z as InternalKnowledgeBaseResult, _ as InternalKnowledgeBaseSearchResponse, U as KnowledgeBaseConfig, R as KnowledgeBaseProvider, V as KnowledgeBaseResult, W as KnowledgeBaseSearchRequest, X as KnowledgeBaseSearchResponse, D as LLMConfig, L as LLMProvider, y as Message, z as MessageMetadata, x as MessageRole, P as ParameterType, af as PermissionLevel, ai as PermissionStorageAdapter, ah as PermissionStorageConfig, a1 as PersistenceConfig, $ as Thread, a0 as ThreadData, a2 as ThreadStorageAdapter, B as TokenUsage, a9 as ToolApprovalStatus, A as ToolCall, a5 as ToolConfig, t as ToolConsentRequest, u as ToolConsentResponse, aa as ToolExecution, ag as ToolPermission, a4 as ToolRenderProps, a6 as ToolSet, r as ToolType, s as ToolsConfig, a7 as UnifiedToolCall, a8 as UnifiedToolResult, as as actionToTool, am as createAssistantMessage, p as createCustomDetector, ak as createMessage, ao as createToolCall, an as createToolMessage, ay as createToolResult, al as createUserMessage, l as detectIntent, aA as failure, o as generateSuggestionReason, aj as generateThreadTitle, at as getDefaultModel, n as getPrimaryTool, aq as hasToolCalls, m as hasToolSuggestions, ar as isToolResult, ap as parseToolCallArgs, az as success, av as tool, ax as toolToAnthropicFormat, aw as toolToOpenAIFormat } from '../thread-C2FjuGLb.js';
1
+ import { S as ScreenshotOptions, a as ScreenshotResult, C as ConsoleLogOptions, b as ConsoleLogResult, c as ConsoleLogEntry, N as NetworkRequestOptions, d as NetworkRequestResult, e as NetworkRequestEntry, f as Source, M as MessageAttachment } from '../thread-CLmfwine.js';
2
+ export { z as ActionDefinition, A as ActionParameter, B as ActionRenderProps, p as CapturedContext, x as CloudConfig, l as ConsoleLogType, y as CopilotConfig, q as CustomKeywords, a7 as DEFAULT_MODELS, E as Extension, H as HttpMethod, I as IntentDetectionResult, O as InternalKnowledgeBaseConfig, Q as InternalKnowledgeBaseResult, R as InternalKnowledgeBaseSearchResponse, D as KnowledgeBaseConfig, K as KnowledgeBaseProvider, F as KnowledgeBaseResult, G as KnowledgeBaseSearchRequest, J as KnowledgeBaseSearchResponse, w as LLMConfig, L as LLMProvider, s as Message, t as MessageMetadata, r as MessageRole, P as ParameterType, W as PersistenceConfig, U as Thread, V as ThreadData, X as ThreadStorageAdapter, v as TokenUsage, u as ToolCall, n as ToolConsentRequest, o as ToolConsentResponse, T as ToolType, m as ToolsConfig, a5 as actionToTool, $ as createAssistantMessage, k as createCustomDetector, Z as createMessage, a1 as createToolCall, a0 as createToolMessage, _ as createUserMessage, g as detectIntent, j as generateSuggestionReason, Y as generateThreadTitle, a6 as getDefaultModel, i as getPrimaryTool, a3 as hasToolCalls, h as hasToolSuggestions, a4 as isToolResult, a2 as parseToolCallArgs } from '../thread-CLmfwine.js';
3
+ import { T as ToolDefinition, a as ToolExecutionStatus, b as ToolResponse, J as JSONSchemaProperty, c as ToolInputSchema, d as ToolLocation, e as ToolContext } from '../tools-eeJ5iEC4.js';
4
+ export { o as AIContent, A as AIProvider, n as AIResponseMode, l as AgentLoopConfig, m as AgentLoopState, P as PermissionLevel, r as PermissionStorageAdapter, q as PermissionStorageConfig, j as ToolApprovalStatus, g as ToolConfig, k as ToolExecution, p as ToolPermission, f as ToolRenderProps, h as ToolSet, U as UnifiedToolCall, i as UnifiedToolResult, v as createToolResult, x as failure, w as success, t as tool, u as toolToAnthropicFormat, s as toolToOpenAIFormat } from '../tools-eeJ5iEC4.js';
3
5
 
4
6
  /**
5
7
  * Screenshot Capture Tool
@@ -633,12 +635,19 @@ interface DefineToolConfig<TSchema extends {
633
635
  schema: TSchema;
634
636
  /** Handler function */
635
637
  handler?: (params: TSchema["_output"], context?: ToolContext) => Promise<ToolResponse> | ToolResponse;
636
- /** Optional render function */
638
+ /** Optional render function for custom UI */
637
639
  render?: (props: {
638
- status: "pending" | "executing" | "completed" | "error";
640
+ status: "pending" | "approval-required" | "executing" | "completed" | "error";
639
641
  args: TSchema["_output"];
640
642
  result?: ToolResponse;
641
643
  error?: string;
644
+ toolCallId: string;
645
+ toolName: string;
646
+ approval?: {
647
+ onApprove: (extraData?: Record<string, unknown>) => void;
648
+ onReject: (reason?: string) => void;
649
+ message?: string;
650
+ };
642
651
  }) => unknown;
643
652
  /** Whether the tool is available */
644
653
  available?: boolean;
@@ -1,3 +1,3 @@
1
- export { CLOUD_MAX_FILE_SIZE, DEFAULT_MODELS, DEFAULT_YOURGPT_ENDPOINT, actionToTool, builtinTools, captureCurrentLogs, captureScreenshot, clearConsoleLogs, clearNetworkRequests, consoleLogsTool, createAssistantMessage, createCloudStorage, createConsoleLogsTool, createCustomDetector, createMessage, createNetworkRequestsTool, createSSEStream, createScreenshotTool, createToolCall, createToolMessage, createToolResult, createUserMessage, defaultSystemMessage, defineClientTool, defineServerTool, defineTool, detectIntent, failure, formatLogsForAI, formatRequestsForAI, formatSSE, generateId, generateMessageId, generateSuggestionReason, generateThreadId, generateThreadTitle, generateToolCallId, getAttachmentTypeFromMime, getConsoleErrors, getConsoleLogs, getConsoleWarnings, getDefaultModel, getFailedRequests, getNetworkRequests, getPrimaryTool, hasToolCalls, hasToolSuggestions, isConsoleCaptureActive, isNetworkCaptureActive, isScreenshotSupported, isToolResult, networkRequestsTool, parseSSELine, parseStreamEvent, parseToolCallArgs, processFileToAttachment, resizeScreenshot, screenshotTool, serializeStreamEvent, startConsoleCapture, startNetworkCapture, stopConsoleCapture, stopNetworkCapture, streamSSE, success, tool, toolToAnthropicFormat, toolToOpenAIFormat, zodObjectToInputSchema, zodToJsonSchema } from '../chunk-N4OA2J32.js';
1
+ export { CLOUD_MAX_FILE_SIZE, DEFAULT_MODELS, DEFAULT_YOURGPT_ENDPOINT, actionToTool, builtinTools, captureCurrentLogs, captureScreenshot, clearConsoleLogs, clearNetworkRequests, consoleLogsTool, createAssistantMessage, createCloudStorage, createConsoleLogsTool, createCustomDetector, createMessage, createNetworkRequestsTool, createSSEStream, createScreenshotTool, createToolCall, createToolMessage, createToolResult, createUserMessage, defaultSystemMessage, defineClientTool, defineServerTool, defineTool, detectIntent, failure, formatLogsForAI, formatRequestsForAI, formatSSE, generateId, generateMessageId, generateSuggestionReason, generateThreadId, generateThreadTitle, generateToolCallId, getAttachmentTypeFromMime, getConsoleErrors, getConsoleLogs, getConsoleWarnings, getDefaultModel, getFailedRequests, getNetworkRequests, getPrimaryTool, hasToolCalls, hasToolSuggestions, isConsoleCaptureActive, isNetworkCaptureActive, isScreenshotSupported, isToolResult, networkRequestsTool, parseSSELine, parseStreamEvent, parseToolCallArgs, processFileToAttachment, resizeScreenshot, screenshotTool, serializeStreamEvent, startConsoleCapture, startNetworkCapture, stopConsoleCapture, stopNetworkCapture, streamSSE, success, tool, toolToAnthropicFormat, toolToOpenAIFormat, zodObjectToInputSchema, zodToJsonSchema } from '../chunk-QWQELTEB.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,137 +1,137 @@
1
1
  'use strict';
2
2
 
3
- var chunkW6KQT7YZ_cjs = require('../chunk-W6KQT7YZ.cjs');
4
- var chunk2ZCWVAAK_cjs = require('../chunk-2ZCWVAAK.cjs');
3
+ var chunkR452HH3J_cjs = require('../chunk-R452HH3J.cjs');
4
+ var chunkIH7WXWX4_cjs = require('../chunk-IH7WXWX4.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "AbstractAgentLoop", {
9
9
  enumerable: true,
10
- get: function () { return chunkW6KQT7YZ_cjs.AbstractAgentLoop; }
10
+ get: function () { return chunkR452HH3J_cjs.AbstractAgentLoop; }
11
11
  });
12
12
  Object.defineProperty(exports, "AbstractChat", {
13
13
  enumerable: true,
14
- get: function () { return chunkW6KQT7YZ_cjs.AbstractChat; }
14
+ get: function () { return chunkR452HH3J_cjs.AbstractChat; }
15
15
  });
16
16
  Object.defineProperty(exports, "CopilotProvider", {
17
17
  enumerable: true,
18
- get: function () { return chunkW6KQT7YZ_cjs.CopilotProvider; }
18
+ get: function () { return chunkR452HH3J_cjs.CopilotProvider; }
19
19
  });
20
20
  Object.defineProperty(exports, "ReactChat", {
21
21
  enumerable: true,
22
- get: function () { return chunkW6KQT7YZ_cjs.ReactChat; }
22
+ get: function () { return chunkR452HH3J_cjs.ReactChat; }
23
23
  });
24
24
  Object.defineProperty(exports, "ReactChatState", {
25
25
  enumerable: true,
26
- get: function () { return chunkW6KQT7YZ_cjs.ReactChatState; }
26
+ get: function () { return chunkR452HH3J_cjs.ReactChatState; }
27
27
  });
28
28
  Object.defineProperty(exports, "createPermissionStorage", {
29
29
  enumerable: true,
30
- get: function () { return chunkW6KQT7YZ_cjs.createPermissionStorage; }
30
+ get: function () { return chunkR452HH3J_cjs.createPermissionStorage; }
31
31
  });
32
32
  Object.defineProperty(exports, "createReactChat", {
33
33
  enumerable: true,
34
- get: function () { return chunkW6KQT7YZ_cjs.createReactChat; }
34
+ get: function () { return chunkR452HH3J_cjs.createReactChat; }
35
35
  });
36
36
  Object.defineProperty(exports, "createReactChatState", {
37
37
  enumerable: true,
38
- get: function () { return chunkW6KQT7YZ_cjs.createReactChatState; }
38
+ get: function () { return chunkR452HH3J_cjs.createReactChatState; }
39
39
  });
40
40
  Object.defineProperty(exports, "createSessionPermissionCache", {
41
41
  enumerable: true,
42
- get: function () { return chunkW6KQT7YZ_cjs.createSessionPermissionCache; }
42
+ get: function () { return chunkR452HH3J_cjs.createSessionPermissionCache; }
43
43
  });
44
44
  Object.defineProperty(exports, "formatKnowledgeResultsForAI", {
45
45
  enumerable: true,
46
- get: function () { return chunkW6KQT7YZ_cjs.formatKnowledgeResultsForAI; }
46
+ get: function () { return chunkR452HH3J_cjs.formatKnowledgeResultsForAI; }
47
47
  });
48
48
  Object.defineProperty(exports, "initialAgentLoopState", {
49
49
  enumerable: true,
50
- get: function () { return chunkW6KQT7YZ_cjs.initialAgentLoopState; }
50
+ get: function () { return chunkR452HH3J_cjs.initialAgentLoopState; }
51
51
  });
52
52
  Object.defineProperty(exports, "searchKnowledgeBase", {
53
53
  enumerable: true,
54
- get: function () { return chunkW6KQT7YZ_cjs.searchKnowledgeBase; }
54
+ get: function () { return chunkR452HH3J_cjs.searchKnowledgeBase; }
55
55
  });
56
56
  Object.defineProperty(exports, "useAIAction", {
57
57
  enumerable: true,
58
- get: function () { return chunkW6KQT7YZ_cjs.useAIAction; }
58
+ get: function () { return chunkR452HH3J_cjs.useAIAction; }
59
59
  });
60
60
  Object.defineProperty(exports, "useAIActions", {
61
61
  enumerable: true,
62
- get: function () { return chunkW6KQT7YZ_cjs.useAIActions; }
62
+ get: function () { return chunkR452HH3J_cjs.useAIActions; }
63
63
  });
64
64
  Object.defineProperty(exports, "useAIContext", {
65
65
  enumerable: true,
66
- get: function () { return chunkW6KQT7YZ_cjs.useAIContext; }
66
+ get: function () { return chunkR452HH3J_cjs.useAIContext; }
67
67
  });
68
68
  Object.defineProperty(exports, "useAIContexts", {
69
69
  enumerable: true,
70
- get: function () { return chunkW6KQT7YZ_cjs.useAIContexts; }
70
+ get: function () { return chunkR452HH3J_cjs.useAIContexts; }
71
71
  });
72
72
  Object.defineProperty(exports, "useAITools", {
73
73
  enumerable: true,
74
- get: function () { return chunkW6KQT7YZ_cjs.useAITools; }
74
+ get: function () { return chunkR452HH3J_cjs.useAITools; }
75
75
  });
76
76
  Object.defineProperty(exports, "useAgent", {
77
77
  enumerable: true,
78
- get: function () { return chunkW6KQT7YZ_cjs.useAgent; }
78
+ get: function () { return chunkR452HH3J_cjs.useAgent; }
79
79
  });
80
80
  Object.defineProperty(exports, "useCapabilities", {
81
81
  enumerable: true,
82
- get: function () { return chunkW6KQT7YZ_cjs.useCapabilities; }
82
+ get: function () { return chunkR452HH3J_cjs.useCapabilities; }
83
83
  });
84
84
  Object.defineProperty(exports, "useChat", {
85
85
  enumerable: true,
86
- get: function () { return chunkW6KQT7YZ_cjs.useChat; }
86
+ get: function () { return chunkR452HH3J_cjs.useChat; }
87
87
  });
88
88
  Object.defineProperty(exports, "useCopilot", {
89
89
  enumerable: true,
90
- get: function () { return chunkW6KQT7YZ_cjs.useCopilot; }
90
+ get: function () { return chunkR452HH3J_cjs.useCopilot; }
91
91
  });
92
92
  Object.defineProperty(exports, "useDevLogger", {
93
93
  enumerable: true,
94
- get: function () { return chunkW6KQT7YZ_cjs.useDevLogger; }
94
+ get: function () { return chunkR452HH3J_cjs.useDevLogger; }
95
95
  });
96
96
  Object.defineProperty(exports, "useFeatureSupport", {
97
97
  enumerable: true,
98
- get: function () { return chunkW6KQT7YZ_cjs.useFeatureSupport; }
98
+ get: function () { return chunkR452HH3J_cjs.useFeatureSupport; }
99
99
  });
100
100
  Object.defineProperty(exports, "useKnowledgeBase", {
101
101
  enumerable: true,
102
- get: function () { return chunkW6KQT7YZ_cjs.useKnowledgeBase; }
102
+ get: function () { return chunkR452HH3J_cjs.useKnowledgeBase; }
103
103
  });
104
104
  Object.defineProperty(exports, "useSuggestions", {
105
105
  enumerable: true,
106
- get: function () { return chunkW6KQT7YZ_cjs.useSuggestions; }
106
+ get: function () { return chunkR452HH3J_cjs.useSuggestions; }
107
107
  });
108
108
  Object.defineProperty(exports, "useSupportedMediaTypes", {
109
109
  enumerable: true,
110
- get: function () { return chunkW6KQT7YZ_cjs.useSupportedMediaTypes; }
110
+ get: function () { return chunkR452HH3J_cjs.useSupportedMediaTypes; }
111
111
  });
112
112
  Object.defineProperty(exports, "useTool", {
113
113
  enumerable: true,
114
- get: function () { return chunkW6KQT7YZ_cjs.useTool; }
114
+ get: function () { return chunkR452HH3J_cjs.useTool; }
115
115
  });
116
116
  Object.defineProperty(exports, "useToolExecutor", {
117
117
  enumerable: true,
118
- get: function () { return chunkW6KQT7YZ_cjs.useToolExecutor; }
118
+ get: function () { return chunkR452HH3J_cjs.useToolExecutor; }
119
119
  });
120
120
  Object.defineProperty(exports, "useToolWithSchema", {
121
121
  enumerable: true,
122
- get: function () { return chunkW6KQT7YZ_cjs.useToolWithSchema; }
122
+ get: function () { return chunkR452HH3J_cjs.useToolWithSchema; }
123
123
  });
124
124
  Object.defineProperty(exports, "useTools", {
125
125
  enumerable: true,
126
- get: function () { return chunkW6KQT7YZ_cjs.useTools; }
126
+ get: function () { return chunkR452HH3J_cjs.useTools; }
127
127
  });
128
128
  Object.defineProperty(exports, "useToolsWithSchema", {
129
129
  enumerable: true,
130
- get: function () { return chunkW6KQT7YZ_cjs.useToolsWithSchema; }
130
+ get: function () { return chunkR452HH3J_cjs.useToolsWithSchema; }
131
131
  });
132
132
  Object.defineProperty(exports, "generateSuggestionReason", {
133
133
  enumerable: true,
134
- get: function () { return chunk2ZCWVAAK_cjs.generateSuggestionReason; }
134
+ get: function () { return chunkIH7WXWX4_cjs.generateSuggestionReason; }
135
135
  });
136
136
  //# sourceMappingURL=index.cjs.map
137
137
  //# sourceMappingURL=index.cjs.map