@yourgpt/copilot-sdk 2.1.0 → 2.1.2
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-33JSFVGH.cjs → chunk-7MZLBGFQ.cjs} +23 -23
- package/dist/{chunk-33JSFVGH.cjs.map → chunk-7MZLBGFQ.cjs.map} +1 -1
- package/dist/{chunk-BRUDSHCV.js → chunk-BMYNG3WM.js} +2 -2
- package/dist/{chunk-BRUDSHCV.js.map → chunk-BMYNG3WM.js.map} +1 -1
- package/dist/{chunk-MUZ2RYS2.cjs → chunk-BNBEKK3U.cjs} +226 -33
- package/dist/chunk-BNBEKK3U.cjs.map +1 -0
- package/dist/{chunk-HNRFRNMY.cjs → chunk-CSEZZ5DX.cjs} +2 -2
- package/dist/{chunk-HNRFRNMY.cjs.map → chunk-CSEZZ5DX.cjs.map} +1 -1
- package/dist/{chunk-O33I4HBL.cjs → chunk-GSTTJ46F.cjs} +5 -5
- package/dist/{chunk-O33I4HBL.cjs.map → chunk-GSTTJ46F.cjs.map} +1 -1
- package/dist/{chunk-7YZVSG62.js → chunk-VUHP6TAN.js} +3 -3
- package/dist/{chunk-7YZVSG62.js.map → chunk-VUHP6TAN.js.map} +1 -1
- package/dist/{chunk-3SP6V22Y.js → chunk-VXT2O6R6.js} +202 -9
- package/dist/chunk-VXT2O6R6.js.map +1 -0
- package/dist/{chunk-7PJ4GAJR.js → chunk-XAC7NTIO.js} +4 -4
- package/dist/{chunk-7PJ4GAJR.js.map → chunk-XAC7NTIO.js.map} +1 -1
- package/dist/core/index.cjs +80 -80
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +3 -3
- package/dist/{index-25qIYJ21.d.ts → index-Du3Akr_E.d.ts} +1 -1
- package/dist/{index-C261xY-B.d.cts → index-jwRcC2QD.d.cts} +1 -1
- package/dist/mcp/index.d.cts +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/react/index.cjs +49 -49
- package/dist/react/index.d.cts +130 -15
- package/dist/react/index.d.ts +130 -15
- 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-Clyufshc.d.cts → tools-BHQRB_YT.d.cts} +5 -0
- package/dist/{tools-Clyufshc.d.ts → tools-BHQRB_YT.d.ts} +5 -0
- package/dist/{types-DM6M_pv_.d.cts → types-8_Hp2rmm.d.cts} +1 -1
- package/dist/{types-wudOhedT.d.ts → types-OYi-iUVY.d.ts} +1 -1
- package/dist/ui/index.cjs +39 -18
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +6 -1
- package/dist/ui/index.d.ts +6 -1
- package/dist/ui/index.js +35 -14
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3SP6V22Y.js.map +0 -1
- package/dist/chunk-MUZ2RYS2.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkGSTTJ46F_cjs = require('./chunk-GSTTJ46F.cjs');
|
|
4
|
+
var chunkCSEZZ5DX_cjs = require('./chunk-CSEZZ5DX.cjs');
|
|
5
5
|
|
|
6
6
|
// src/core/tools/screenshot.ts
|
|
7
7
|
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
|
@@ -1036,7 +1036,7 @@ function createCustomDetector(customKeywords) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
// src/core/tools/builtin/screenshot.ts
|
|
1039
|
-
var screenshotTool =
|
|
1039
|
+
var screenshotTool = chunkCSEZZ5DX_cjs.tool({
|
|
1040
1040
|
description: "Capture a screenshot of the user's current screen/viewport. Use this when the user asks you to look at their screen, see what they're seeing, help with visual issues, or debug UI problems.",
|
|
1041
1041
|
location: "client",
|
|
1042
1042
|
inputSchema: {
|
|
@@ -1055,7 +1055,7 @@ var screenshotTool = chunkHNRFRNMY_cjs.tool({
|
|
|
1055
1055
|
approvalMessage: "Allow AI to capture a screenshot of your screen?",
|
|
1056
1056
|
handler: async (params) => {
|
|
1057
1057
|
if (!isScreenshotSupported()) {
|
|
1058
|
-
return
|
|
1058
|
+
return chunkCSEZZ5DX_cjs.failure("Screenshot capture is not supported in this environment");
|
|
1059
1059
|
}
|
|
1060
1060
|
try {
|
|
1061
1061
|
const options = {};
|
|
@@ -1081,20 +1081,20 @@ var screenshotTool = chunkHNRFRNMY_cjs.tool({
|
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
1083
|
} catch (error) {
|
|
1084
|
-
return
|
|
1084
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1085
1085
|
error instanceof Error ? error.message : "Screenshot capture failed"
|
|
1086
1086
|
);
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
1089
|
});
|
|
1090
1090
|
function createScreenshotTool(options) {
|
|
1091
|
-
return
|
|
1091
|
+
return chunkCSEZZ5DX_cjs.tool({
|
|
1092
1092
|
...screenshotTool,
|
|
1093
1093
|
needsApproval: options?.needsApproval ?? true,
|
|
1094
1094
|
approvalMessage: options?.approvalMessage ?? "Allow AI to capture a screenshot of your screen?",
|
|
1095
1095
|
handler: async (params) => {
|
|
1096
1096
|
if (!isScreenshotSupported()) {
|
|
1097
|
-
return
|
|
1097
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1098
1098
|
"Screenshot capture is not supported in this environment"
|
|
1099
1099
|
);
|
|
1100
1100
|
}
|
|
@@ -1120,7 +1120,7 @@ function createScreenshotTool(options) {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
};
|
|
1122
1122
|
} catch (error) {
|
|
1123
|
-
return
|
|
1123
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1124
1124
|
error instanceof Error ? error.message : "Screenshot capture failed"
|
|
1125
1125
|
);
|
|
1126
1126
|
}
|
|
@@ -1133,7 +1133,7 @@ var isBrowser4 = typeof window !== "undefined" && typeof console !== "undefined"
|
|
|
1133
1133
|
if (isBrowser4 && !isConsoleCaptureActive()) {
|
|
1134
1134
|
startConsoleCapture();
|
|
1135
1135
|
}
|
|
1136
|
-
var consoleLogsTool =
|
|
1136
|
+
var consoleLogsTool = chunkCSEZZ5DX_cjs.tool({
|
|
1137
1137
|
description: "Get recent console logs from the browser. Use this when debugging JavaScript errors, checking for warnings, or understanding what's happening in the application.",
|
|
1138
1138
|
location: "client",
|
|
1139
1139
|
inputSchema: {
|
|
@@ -1166,7 +1166,7 @@ var consoleLogsTool = chunkHNRFRNMY_cjs.tool({
|
|
|
1166
1166
|
types: params.types
|
|
1167
1167
|
});
|
|
1168
1168
|
const formattedLogs = formatLogsForAI(logs.logs);
|
|
1169
|
-
return
|
|
1169
|
+
return chunkCSEZZ5DX_cjs.success(
|
|
1170
1170
|
{
|
|
1171
1171
|
logs: formattedLogs,
|
|
1172
1172
|
count: logs.logs.length,
|
|
@@ -1175,14 +1175,14 @@ var consoleLogsTool = chunkHNRFRNMY_cjs.tool({
|
|
|
1175
1175
|
`Retrieved ${logs.logs.length} console logs`
|
|
1176
1176
|
);
|
|
1177
1177
|
} catch (error) {
|
|
1178
|
-
return
|
|
1178
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1179
1179
|
error instanceof Error ? error.message : "Failed to get console logs"
|
|
1180
1180
|
);
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
});
|
|
1184
1184
|
function createConsoleLogsTool(options) {
|
|
1185
|
-
return
|
|
1185
|
+
return chunkCSEZZ5DX_cjs.tool({
|
|
1186
1186
|
...consoleLogsTool,
|
|
1187
1187
|
needsApproval: options?.needsApproval ?? true,
|
|
1188
1188
|
approvalMessage: options?.approvalMessage ?? "Allow AI to access browser console logs?",
|
|
@@ -1196,7 +1196,7 @@ function createConsoleLogsTool(options) {
|
|
|
1196
1196
|
types: params.types
|
|
1197
1197
|
});
|
|
1198
1198
|
const formattedLogs = formatLogsForAI(logs.logs);
|
|
1199
|
-
return
|
|
1199
|
+
return chunkCSEZZ5DX_cjs.success(
|
|
1200
1200
|
{
|
|
1201
1201
|
logs: formattedLogs,
|
|
1202
1202
|
count: logs.logs.length,
|
|
@@ -1205,7 +1205,7 @@ function createConsoleLogsTool(options) {
|
|
|
1205
1205
|
`Retrieved ${logs.logs.length} console logs`
|
|
1206
1206
|
);
|
|
1207
1207
|
} catch (error) {
|
|
1208
|
-
return
|
|
1208
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1209
1209
|
error instanceof Error ? error.message : "Failed to get console logs"
|
|
1210
1210
|
);
|
|
1211
1211
|
}
|
|
@@ -1214,7 +1214,7 @@ function createConsoleLogsTool(options) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
|
|
1216
1216
|
// src/core/tools/builtin/network.ts
|
|
1217
|
-
var networkRequestsTool =
|
|
1217
|
+
var networkRequestsTool = chunkCSEZZ5DX_cjs.tool({
|
|
1218
1218
|
description: "Get recent network requests from the browser. Use this when debugging API calls, checking for failed requests, analyzing network activity, or troubleshooting connectivity issues.",
|
|
1219
1219
|
location: "client",
|
|
1220
1220
|
inputSchema: {
|
|
@@ -1243,7 +1243,7 @@ var networkRequestsTool = chunkHNRFRNMY_cjs.tool({
|
|
|
1243
1243
|
failedOnly: params.failedOnly
|
|
1244
1244
|
});
|
|
1245
1245
|
const formattedRequests = formatRequestsForAI(requests.requests);
|
|
1246
|
-
return
|
|
1246
|
+
return chunkCSEZZ5DX_cjs.success(
|
|
1247
1247
|
{
|
|
1248
1248
|
requests: formattedRequests,
|
|
1249
1249
|
count: requests.requests.length,
|
|
@@ -1252,14 +1252,14 @@ var networkRequestsTool = chunkHNRFRNMY_cjs.tool({
|
|
|
1252
1252
|
`Retrieved ${requests.requests.length} network requests`
|
|
1253
1253
|
);
|
|
1254
1254
|
} catch (error) {
|
|
1255
|
-
return
|
|
1255
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1256
1256
|
error instanceof Error ? error.message : "Failed to get network requests"
|
|
1257
1257
|
);
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
1260
|
});
|
|
1261
1261
|
function createNetworkRequestsTool(options) {
|
|
1262
|
-
return
|
|
1262
|
+
return chunkCSEZZ5DX_cjs.tool({
|
|
1263
1263
|
...networkRequestsTool,
|
|
1264
1264
|
needsApproval: options?.needsApproval ?? true,
|
|
1265
1265
|
approvalMessage: options?.approvalMessage ?? "Allow AI to access network request history?",
|
|
@@ -1273,7 +1273,7 @@ function createNetworkRequestsTool(options) {
|
|
|
1273
1273
|
failedOnly: params.failedOnly
|
|
1274
1274
|
});
|
|
1275
1275
|
const formattedRequests = formatRequestsForAI(requests.requests);
|
|
1276
|
-
return
|
|
1276
|
+
return chunkCSEZZ5DX_cjs.success(
|
|
1277
1277
|
{
|
|
1278
1278
|
requests: formattedRequests,
|
|
1279
1279
|
count: requests.requests.length,
|
|
@@ -1282,7 +1282,7 @@ function createNetworkRequestsTool(options) {
|
|
|
1282
1282
|
`Retrieved ${requests.requests.length} network requests`
|
|
1283
1283
|
);
|
|
1284
1284
|
} catch (error) {
|
|
1285
|
-
return
|
|
1285
|
+
return chunkCSEZZ5DX_cjs.failure(
|
|
1286
1286
|
error instanceof Error ? error.message : "Failed to get network requests"
|
|
1287
1287
|
);
|
|
1288
1288
|
}
|
|
@@ -1306,7 +1306,7 @@ var builtinTools = {
|
|
|
1306
1306
|
},
|
|
1307
1307
|
web_search: {
|
|
1308
1308
|
name: "web_search",
|
|
1309
|
-
...
|
|
1309
|
+
...chunkGSTTJ46F_cjs.webSearchTool
|
|
1310
1310
|
}
|
|
1311
1311
|
};
|
|
1312
1312
|
|
|
@@ -2889,5 +2889,5 @@ exports.stopNetworkCapture = stopNetworkCapture;
|
|
|
2889
2889
|
exports.streamSSE = streamSSE;
|
|
2890
2890
|
exports.zodObjectToInputSchema = zodObjectToInputSchema;
|
|
2891
2891
|
exports.zodToJsonSchema = zodToJsonSchema;
|
|
2892
|
-
//# sourceMappingURL=chunk-
|
|
2893
|
-
//# sourceMappingURL=chunk-
|
|
2892
|
+
//# sourceMappingURL=chunk-7MZLBGFQ.cjs.map
|
|
2893
|
+
//# sourceMappingURL=chunk-7MZLBGFQ.cjs.map
|