@superblocksteam/cli 2.0.109 → 2.0.110-next.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.
- package/README.md +1 -1
- package/bin/run.js +3 -1
- package/dist/{acorn-GBLRFWNY.js → acorn-UR4JG5KH.js} +3 -3
- package/dist/{angular-IP3IGOHI.js → angular-SZFU2CEP.js} +3 -3
- package/dist/{api-ZS5BVXSG.js → api-37KSTQN3.js} +4 -4
- package/dist/{babel-VJBQEWAI.js → babel-HEH4MWQU.js} +3 -3
- package/dist/{chunk-ZNVZ3JT6.js → chunk-2GZKLQ7M.js} +1615 -484
- package/dist/{chunk-ZNVZ3JT6.js.map → chunk-2GZKLQ7M.js.map} +1 -1
- package/dist/{chunk-VTFCA3LM.js → chunk-2PE6N3C7.js} +3 -3
- package/dist/{chunk-CTI6OHM2.js → chunk-3VTPXQ3D.js} +3 -3
- package/dist/{chunk-S3ML32B5.js → chunk-52MVK3W4.js} +2 -2
- package/dist/{chunk-FXAF7RNO.js → chunk-66XXQIRA.js} +4 -4
- package/dist/{chunk-NDAFR2DP.js → chunk-CZ4POMBA.js} +4 -4
- package/dist/{chunk-AOPT7DRV.js → chunk-D3AXBKRC.js} +3 -3
- package/dist/{chunk-4GVZOCXJ.js → chunk-GM76XOJA.js} +3 -3
- package/dist/{chunk-RHPOP2DA.js → chunk-HHIOHKG6.js} +6 -6
- package/dist/{chunk-PTQA5FLH.js → chunk-J6OU3UYV.js} +3 -3
- package/dist/{chunk-BTJWY2DV.js → chunk-KHITEA4P.js} +3 -3
- package/dist/{chunk-MAIUSRSC.js → chunk-KV2U75ZM.js} +3 -3
- package/dist/{chunk-5737NF6B.js → chunk-MHAWHI6L.js} +4 -4
- package/dist/{chunk-66TBUQUR.js → chunk-PGU5Z45J.js} +4 -4
- package/dist/{chunk-7KRMVI4O.js → chunk-RNBDV7EI.js} +6 -6
- package/dist/{chunk-BR7BZ7EA.js → chunk-T5OIL6OD.js} +3 -3
- package/dist/{chunk-DDLIEJEY.js → chunk-XOFSSW2I.js} +3 -3
- package/dist/{cli-truncate-F6CDBPKD.js → cli-truncate-ATN3PFYS.js} +5 -5
- package/dist/commands/dev-parent.js +2 -2
- package/dist/{dd-trace-DZ3YUS5D.js → dd-trace-3SG4HWF4.js} +7 -7
- package/dist/{dist-KZM2P5MW.js → dist-G7M35CKS.js} +13 -13
- package/dist/{embedded-playwright-mcp-server-VW4DEGUD.js → embedded-playwright-mcp-server-FGXRA5KL.js} +3 -3
- package/dist/{enquirer-ODT4GPUQ.js → enquirer-DI5P5CGS.js} +4 -4
- package/dist/{estree-TPSH2EBT.js → estree-AE4AYPC4.js} +3 -3
- package/dist/{flow-656YKDYS.js → flow-IJDC7AGM.js} +3 -3
- package/dist/{getMachineId-bsd-Z6HWL3U5.js → getMachineId-bsd-FYJPFKU4.js} +5 -5
- package/dist/{getMachineId-darwin-HA7K2NA7.js → getMachineId-darwin-VKKW65F3.js} +5 -5
- package/dist/{getMachineId-linux-K73YYETW.js → getMachineId-linux-YFN65QK4.js} +4 -4
- package/dist/{getMachineId-unsupported-CIOZQXBS.js → getMachineId-unsupported-T73AAGBH.js} +4 -4
- package/dist/{getMachineId-win-SXVPKVUL.js → getMachineId-win-B6V2GN2V.js} +5 -5
- package/dist/{glimmer-Y32NXV7D.js → glimmer-ZAAHC7TU.js} +3 -3
- package/dist/{graphql-UHI5GK5S.js → graphql-MLHVZQEB.js} +3 -3
- package/dist/{html-AKOAC7KI.js → html-OMSSJL4C.js} +3 -3
- package/dist/{http-BSE5VG6J.js → http-CFCE6OZX.js} +12 -12
- package/dist/index.js +298 -26
- package/dist/index.js.map +1 -1
- package/dist/{jiti-LMRJHKOH.js → jiti-ACCLL432.js} +3 -3
- package/dist/{log-update-7RDR3J7X.js → log-update-MZOBBWTE.js} +6 -6
- package/dist/{markdown-CBHFZZRO.js → markdown-4TFWLCBJ.js} +3 -3
- package/dist/{meriyah-3MUABTKL.js → meriyah-4QUVCBG2.js} +3 -3
- package/dist/{postcss-TBC76OV7.js → postcss-UQC7SVOC.js} +3 -3
- package/dist/{read-pkg-VIKP3WOL.js → read-pkg-U4YY3GP6.js} +5 -5
- package/dist/{spans-LYLJRY7I.js → spans-WMJ44MKH.js} +4 -4
- package/dist/{src-4JITH7KM.js → src-JJZPJD7X.js} +3 -3
- package/dist/{token-C2XMJUYI.js → token-OWGZVHVZ.js} +5 -5
- package/dist/{token-util-CXIZP2NO.js → token-util-LQBRSAR7.js} +5 -5
- package/dist/{typescript-4YGPGOJ2.js → typescript-VF6HLTSS.js} +3 -3
- package/dist/{wrap-ansi-UDC6Y4SF.js → wrap-ansi-PYGFTEUH.js} +5 -5
- package/dist/{yaml-IAEDIY5C.js → yaml-ZXLKK666.js} +3 -3
- package/oclif.manifest.json +8 -1
- package/package.json +5 -5
- /package/dist/{acorn-GBLRFWNY.js.map → acorn-UR4JG5KH.js.map} +0 -0
- /package/dist/{angular-IP3IGOHI.js.map → angular-SZFU2CEP.js.map} +0 -0
- /package/dist/{api-ZS5BVXSG.js.map → api-37KSTQN3.js.map} +0 -0
- /package/dist/{babel-VJBQEWAI.js.map → babel-HEH4MWQU.js.map} +0 -0
- /package/dist/{chunk-VTFCA3LM.js.map → chunk-2PE6N3C7.js.map} +0 -0
- /package/dist/{chunk-CTI6OHM2.js.map → chunk-3VTPXQ3D.js.map} +0 -0
- /package/dist/{chunk-S3ML32B5.js.map → chunk-52MVK3W4.js.map} +0 -0
- /package/dist/{chunk-FXAF7RNO.js.map → chunk-66XXQIRA.js.map} +0 -0
- /package/dist/{chunk-NDAFR2DP.js.map → chunk-CZ4POMBA.js.map} +0 -0
- /package/dist/{chunk-AOPT7DRV.js.map → chunk-D3AXBKRC.js.map} +0 -0
- /package/dist/{chunk-4GVZOCXJ.js.map → chunk-GM76XOJA.js.map} +0 -0
- /package/dist/{chunk-RHPOP2DA.js.map → chunk-HHIOHKG6.js.map} +0 -0
- /package/dist/{chunk-PTQA5FLH.js.map → chunk-J6OU3UYV.js.map} +0 -0
- /package/dist/{chunk-BTJWY2DV.js.map → chunk-KHITEA4P.js.map} +0 -0
- /package/dist/{chunk-MAIUSRSC.js.map → chunk-KV2U75ZM.js.map} +0 -0
- /package/dist/{chunk-5737NF6B.js.map → chunk-MHAWHI6L.js.map} +0 -0
- /package/dist/{chunk-66TBUQUR.js.map → chunk-PGU5Z45J.js.map} +0 -0
- /package/dist/{chunk-7KRMVI4O.js.map → chunk-RNBDV7EI.js.map} +0 -0
- /package/dist/{chunk-BR7BZ7EA.js.map → chunk-T5OIL6OD.js.map} +0 -0
- /package/dist/{chunk-DDLIEJEY.js.map → chunk-XOFSSW2I.js.map} +0 -0
- /package/dist/{cli-truncate-F6CDBPKD.js.map → cli-truncate-ATN3PFYS.js.map} +0 -0
- /package/dist/{dd-trace-DZ3YUS5D.js.map → dd-trace-3SG4HWF4.js.map} +0 -0
- /package/dist/{dist-KZM2P5MW.js.map → dist-G7M35CKS.js.map} +0 -0
- /package/dist/{embedded-playwright-mcp-server-VW4DEGUD.js.map → embedded-playwright-mcp-server-FGXRA5KL.js.map} +0 -0
- /package/dist/{enquirer-ODT4GPUQ.js.map → enquirer-DI5P5CGS.js.map} +0 -0
- /package/dist/{estree-TPSH2EBT.js.map → estree-AE4AYPC4.js.map} +0 -0
- /package/dist/{flow-656YKDYS.js.map → flow-IJDC7AGM.js.map} +0 -0
- /package/dist/{getMachineId-bsd-Z6HWL3U5.js.map → getMachineId-bsd-FYJPFKU4.js.map} +0 -0
- /package/dist/{getMachineId-darwin-HA7K2NA7.js.map → getMachineId-darwin-VKKW65F3.js.map} +0 -0
- /package/dist/{getMachineId-linux-K73YYETW.js.map → getMachineId-linux-YFN65QK4.js.map} +0 -0
- /package/dist/{getMachineId-unsupported-CIOZQXBS.js.map → getMachineId-unsupported-T73AAGBH.js.map} +0 -0
- /package/dist/{getMachineId-win-SXVPKVUL.js.map → getMachineId-win-B6V2GN2V.js.map} +0 -0
- /package/dist/{glimmer-Y32NXV7D.js.map → glimmer-ZAAHC7TU.js.map} +0 -0
- /package/dist/{graphql-UHI5GK5S.js.map → graphql-MLHVZQEB.js.map} +0 -0
- /package/dist/{html-AKOAC7KI.js.map → html-OMSSJL4C.js.map} +0 -0
- /package/dist/{http-BSE5VG6J.js.map → http-CFCE6OZX.js.map} +0 -0
- /package/dist/{jiti-LMRJHKOH.js.map → jiti-ACCLL432.js.map} +0 -0
- /package/dist/{log-update-7RDR3J7X.js.map → log-update-MZOBBWTE.js.map} +0 -0
- /package/dist/{markdown-CBHFZZRO.js.map → markdown-4TFWLCBJ.js.map} +0 -0
- /package/dist/{meriyah-3MUABTKL.js.map → meriyah-4QUVCBG2.js.map} +0 -0
- /package/dist/{postcss-TBC76OV7.js.map → postcss-UQC7SVOC.js.map} +0 -0
- /package/dist/{read-pkg-VIKP3WOL.js.map → read-pkg-U4YY3GP6.js.map} +0 -0
- /package/dist/{spans-LYLJRY7I.js.map → spans-WMJ44MKH.js.map} +0 -0
- /package/dist/{src-4JITH7KM.js.map → src-JJZPJD7X.js.map} +0 -0
- /package/dist/{token-C2XMJUYI.js.map → token-OWGZVHVZ.js.map} +0 -0
- /package/dist/{token-util-CXIZP2NO.js.map → token-util-LQBRSAR7.js.map} +0 -0
- /package/dist/{typescript-4YGPGOJ2.js.map → typescript-VF6HLTSS.js.map} +0 -0
- /package/dist/{wrap-ansi-UDC6Y4SF.js.map → wrap-ansi-PYGFTEUH.js.map} +0 -0
- /package/dist/{yaml-IAEDIY5C.js.map → yaml-ZXLKK666.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof process === 'object' && process !== null &&
|
|
2
2
|
process.env !== null && typeof process.env === 'object') {
|
|
3
3
|
process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
|
|
4
|
-
process.env.DD_GIT_COMMIT_SHA = '
|
|
4
|
+
process.env.DD_GIT_COMMIT_SHA = 'd5d5d19dbabfb4f7350ba9099130b5f678ca33ef';
|
|
5
5
|
}
|
|
6
6
|
import { createRequire as $dd_createRequire } from 'module';
|
|
7
7
|
import { fileURLToPath as $dd_fileURLToPath } from 'url';
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
require_re,
|
|
25
25
|
require_semver,
|
|
26
26
|
require_valid
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-T5OIL6OD.js";
|
|
28
28
|
import {
|
|
29
29
|
debounce_default,
|
|
30
30
|
get_default,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
require_lib,
|
|
42
42
|
require_slugify,
|
|
43
43
|
throttle_default
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-XOFSSW2I.js";
|
|
45
45
|
import {
|
|
46
46
|
require_dd_trace,
|
|
47
47
|
require_import_in_the_middle,
|
|
@@ -50,16 +50,16 @@ import {
|
|
|
50
50
|
require_p_limit,
|
|
51
51
|
require_path_to_regexp,
|
|
52
52
|
require_src
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-RNBDV7EI.js";
|
|
54
54
|
import {
|
|
55
55
|
require_commonjs
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-J6OU3UYV.js";
|
|
57
57
|
import {
|
|
58
58
|
require_dc_polyfill
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-3VTPXQ3D.js";
|
|
60
60
|
import {
|
|
61
61
|
require_token_error
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-KHITEA4P.js";
|
|
63
63
|
import {
|
|
64
64
|
SpanKind,
|
|
65
65
|
SpanStatusCode,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
init_esm,
|
|
69
69
|
metrics,
|
|
70
70
|
trace
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-2PE6N3C7.js";
|
|
72
72
|
import {
|
|
73
73
|
__commonJS,
|
|
74
74
|
__esm,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
__toCommonJS,
|
|
78
78
|
__toESM,
|
|
79
79
|
init_cjs_shims
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-52MVK3W4.js";
|
|
81
81
|
|
|
82
82
|
// ../../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
|
|
83
83
|
var require_constants3 = __commonJS({
|
|
@@ -6888,7 +6888,7 @@ var require_lodash = __commonJS({
|
|
|
6888
6888
|
var strSymbols = stringToArray(string5), start = charsStartIndex(strSymbols, stringToArray(chars));
|
|
6889
6889
|
return castSlice(strSymbols, start).join("");
|
|
6890
6890
|
}
|
|
6891
|
-
function
|
|
6891
|
+
function truncate2(string5, options8) {
|
|
6892
6892
|
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
|
6893
6893
|
if (isObject4(options8)) {
|
|
6894
6894
|
var separator = "separator" in options8 ? options8.separator : separator;
|
|
@@ -7448,7 +7448,7 @@ var require_lodash = __commonJS({
|
|
|
7448
7448
|
lodash.trim = trim3;
|
|
7449
7449
|
lodash.trimEnd = trimEnd;
|
|
7450
7450
|
lodash.trimStart = trimStart;
|
|
7451
|
-
lodash.truncate =
|
|
7451
|
+
lodash.truncate = truncate2;
|
|
7452
7452
|
lodash.unescape = unescape3;
|
|
7453
7453
|
lodash.uniqueId = uniqueId;
|
|
7454
7454
|
lodash.upperCase = upperCase;
|
|
@@ -43398,13 +43398,36 @@ var require_attachment_upload = __commonJS({
|
|
|
43398
43398
|
exports2.TEXT_LIKE_FILE_EXTENSIONS = void 0;
|
|
43399
43399
|
exports2.buildAttachmentUploadMetadata = buildAttachmentUploadMetadata;
|
|
43400
43400
|
exports2.isTextLikeMimeType = isTextLikeMimeType;
|
|
43401
|
+
exports2.isOfficeXml = isOfficeXml;
|
|
43401
43402
|
exports2.getTextAttachmentType = getTextAttachmentType;
|
|
43402
43403
|
exports2.normalizeAttachmentMimeType = normalizeAttachmentMimeType;
|
|
43403
43404
|
exports2.toAttachmentUploadDescriptor = toAttachmentUploadDescriptor2;
|
|
43404
43405
|
exports2.buildAttachmentUploadFormData = buildAttachmentUploadFormData2;
|
|
43405
43406
|
exports2.createUploadedAttachmentFromServer = createUploadedAttachmentFromServer;
|
|
43406
43407
|
exports2.uploadAttachmentToServerApi = uploadAttachmentToServerApi2;
|
|
43407
|
-
var
|
|
43408
|
+
var OFFICE_MIME_SUBSTRINGS = [
|
|
43409
|
+
"application/msword",
|
|
43410
|
+
"application/vnd.ms-excel",
|
|
43411
|
+
"application/vnd.ms-powerpoint",
|
|
43412
|
+
"application/vnd.openxmlformats-officedocument",
|
|
43413
|
+
"application/vnd.oasis.opendocument",
|
|
43414
|
+
"application/rtf"
|
|
43415
|
+
];
|
|
43416
|
+
var OFFICE_EXTENSIONS = [
|
|
43417
|
+
".doc",
|
|
43418
|
+
".docm",
|
|
43419
|
+
".docx",
|
|
43420
|
+
".odp",
|
|
43421
|
+
".ods",
|
|
43422
|
+
".odt",
|
|
43423
|
+
".ppt",
|
|
43424
|
+
".pptm",
|
|
43425
|
+
".pptx",
|
|
43426
|
+
".rtf",
|
|
43427
|
+
".xls",
|
|
43428
|
+
".xlsm",
|
|
43429
|
+
".xlsx"
|
|
43430
|
+
];
|
|
43408
43431
|
var TEXT_ATTACHMENT_MIME_TYPES2 = {
|
|
43409
43432
|
csv: "text/csv",
|
|
43410
43433
|
css: "text/css",
|
|
@@ -43488,7 +43511,21 @@ var require_attachment_upload = __commonJS({
|
|
|
43488
43511
|
const normalizedMimeType = mimeType.toLowerCase();
|
|
43489
43512
|
return normalizedMimeType.startsWith("text/") || normalizedMimeType.includes("json") || normalizedMimeType.includes("xml") || normalizedMimeType.includes("yaml") || normalizedMimeType.includes("toml") || normalizedMimeType.includes("javascript") || normalizedMimeType.includes("typescript") || normalizedMimeType.includes("ecmascript") || normalizedMimeType.includes("markdown") || normalizedMimeType.includes("shellscript") || normalizedMimeType.includes("python") || normalizedMimeType.includes("ruby") || normalizedMimeType.includes("php") || normalizedMimeType.includes("sql");
|
|
43490
43513
|
}
|
|
43514
|
+
function isOfficeXml(params) {
|
|
43515
|
+
const normalizedMimeType = normalizeNonEmptyString(params.mimeType)?.toLowerCase();
|
|
43516
|
+
if (normalizedMimeType && OFFICE_MIME_SUBSTRINGS.some((mimeType) => normalizedMimeType.includes(mimeType))) {
|
|
43517
|
+
return true;
|
|
43518
|
+
}
|
|
43519
|
+
const normalizedFileName = normalizeNonEmptyString(params.fileName)?.toLowerCase();
|
|
43520
|
+
if (!normalizedFileName) {
|
|
43521
|
+
return false;
|
|
43522
|
+
}
|
|
43523
|
+
return OFFICE_EXTENSIONS.some((extension) => normalizedFileName.endsWith(extension));
|
|
43524
|
+
}
|
|
43491
43525
|
function getTextAttachmentType(params) {
|
|
43526
|
+
if (isOfficeXml(params)) {
|
|
43527
|
+
return null;
|
|
43528
|
+
}
|
|
43492
43529
|
const normalizedFileName = normalizeNonEmptyString(params.fileName)?.toLowerCase();
|
|
43493
43530
|
const normalizedMimeType = normalizeNonEmptyString(params.mimeType)?.toLowerCase();
|
|
43494
43531
|
if (normalizedMimeType === "text/csv" || normalizedFileName?.endsWith(".csv")) {
|
|
@@ -43515,13 +43552,13 @@ var require_attachment_upload = __commonJS({
|
|
|
43515
43552
|
function normalizeAttachmentMimeType(params) {
|
|
43516
43553
|
const normalizedMimeType = normalizeNonEmptyString(params.mimeType)?.toLowerCase() ?? normalizeNonEmptyString(params.fallbackMimeType)?.toLowerCase();
|
|
43517
43554
|
const textLikeMimeType = getTextLikeMimeTypeFromFileName(params.fileName);
|
|
43518
|
-
if (
|
|
43519
|
-
return normalizedMimeType
|
|
43555
|
+
if (normalizedMimeType && isTextLikeMimeType(normalizedMimeType)) {
|
|
43556
|
+
return normalizedMimeType;
|
|
43520
43557
|
}
|
|
43521
|
-
if (
|
|
43558
|
+
if (textLikeMimeType) {
|
|
43522
43559
|
return textLikeMimeType;
|
|
43523
43560
|
}
|
|
43524
|
-
return
|
|
43561
|
+
return normalizedMimeType ?? void 0;
|
|
43525
43562
|
}
|
|
43526
43563
|
function getDefaultFileName(mimeType) {
|
|
43527
43564
|
const normalizedMimeType = mimeType.toLowerCase();
|
|
@@ -43543,6 +43580,12 @@ var require_attachment_upload = __commonJS({
|
|
|
43543
43580
|
function decodeBase64(base64Data) {
|
|
43544
43581
|
return Uint8Array.from(atob(base64Data), (char) => char.charCodeAt(0));
|
|
43545
43582
|
}
|
|
43583
|
+
function withMimeType(blob, mimeType) {
|
|
43584
|
+
if (blob.type === mimeType) {
|
|
43585
|
+
return blob;
|
|
43586
|
+
}
|
|
43587
|
+
return new Blob([blob], { type: mimeType });
|
|
43588
|
+
}
|
|
43546
43589
|
function parseDataUrl2(data3) {
|
|
43547
43590
|
const match2 = data3.match(/^data:([^;,]+)?(?:;base64)?,(.*)$/s);
|
|
43548
43591
|
if (!match2) {
|
|
@@ -43563,8 +43606,11 @@ var require_attachment_upload = __commonJS({
|
|
|
43563
43606
|
mimeType: source2.type,
|
|
43564
43607
|
fallbackMimeType: options8?.fallbackMimeType
|
|
43565
43608
|
});
|
|
43609
|
+
if (!mimeType) {
|
|
43610
|
+
return null;
|
|
43611
|
+
}
|
|
43566
43612
|
return {
|
|
43567
|
-
blob: source2,
|
|
43613
|
+
blob: withMimeType(source2, mimeType),
|
|
43568
43614
|
fileName: resolveFileName({
|
|
43569
43615
|
fileName: source2.name,
|
|
43570
43616
|
fallbackFileName: options8?.fallbackFileName,
|
|
@@ -43580,8 +43626,11 @@ var require_attachment_upload = __commonJS({
|
|
|
43580
43626
|
mimeType: source2.type,
|
|
43581
43627
|
fallbackMimeType: options8?.fallbackMimeType
|
|
43582
43628
|
});
|
|
43629
|
+
if (!mimeType) {
|
|
43630
|
+
return null;
|
|
43631
|
+
}
|
|
43583
43632
|
return {
|
|
43584
|
-
blob: source2,
|
|
43633
|
+
blob: withMimeType(source2, mimeType),
|
|
43585
43634
|
fileName: resolveFileName({
|
|
43586
43635
|
fileName: sourceWithOptionalName.name,
|
|
43587
43636
|
fallbackFileName: options8?.fallbackFileName,
|
|
@@ -43598,6 +43647,9 @@ var require_attachment_upload = __commonJS({
|
|
|
43598
43647
|
fallbackMimeType: options8?.fallbackMimeType
|
|
43599
43648
|
});
|
|
43600
43649
|
const base64Data = parsedDataUrl?.base64Data ?? source2.data;
|
|
43650
|
+
if (!mimeType) {
|
|
43651
|
+
return null;
|
|
43652
|
+
}
|
|
43601
43653
|
return {
|
|
43602
43654
|
blob: new Blob([decodeBase64(base64Data)], { type: mimeType }),
|
|
43603
43655
|
fileName: resolveFileName({
|
|
@@ -43646,6 +43698,9 @@ var require_attachment_upload = __commonJS({
|
|
|
43646
43698
|
mimeType: source2.mimeType,
|
|
43647
43699
|
fallbackMimeType: options8?.fallbackMimeType ?? TEXT_ATTACHMENT_MIME_TYPES2[source2.type]
|
|
43648
43700
|
});
|
|
43701
|
+
if (!mimeType) {
|
|
43702
|
+
return null;
|
|
43703
|
+
}
|
|
43649
43704
|
return {
|
|
43650
43705
|
blob: new Blob([source2.content], { type: mimeType }),
|
|
43651
43706
|
fileName: resolveFileName({
|
|
@@ -70089,12 +70144,12 @@ var require_unreachable = __commonJS({
|
|
|
70089
70144
|
var require_base64 = __commonJS({
|
|
70090
70145
|
"../../../../node_modules/.pnpm/js-base64@3.7.7/node_modules/js-base64/base64.js"(exports2, module2) {
|
|
70091
70146
|
init_cjs_shims();
|
|
70092
|
-
(function(global2,
|
|
70093
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports =
|
|
70147
|
+
(function(global2, factory12) {
|
|
70148
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory12() : typeof define === "function" && define.amd ? define(factory12) : (
|
|
70094
70149
|
// cf. https://github.com/dankogai/js-base64/issues/119
|
|
70095
70150
|
(function() {
|
|
70096
70151
|
var _Base64 = global2.Base64;
|
|
70097
|
-
var gBase64 =
|
|
70152
|
+
var gBase64 = factory12();
|
|
70098
70153
|
gBase64.noConflict = function() {
|
|
70099
70154
|
global2.Base64 = _Base64;
|
|
70100
70155
|
return gBase64;
|
|
@@ -88861,8 +88916,8 @@ var require_data = __commonJS({
|
|
|
88861
88916
|
var require_uri_all = __commonJS({
|
|
88862
88917
|
"../../../../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports2, module2) {
|
|
88863
88918
|
init_cjs_shims();
|
|
88864
|
-
(function(global2,
|
|
88865
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
88919
|
+
(function(global2, factory12) {
|
|
88920
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory12(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory12) : factory12(global2.URI = global2.URI || {});
|
|
88866
88921
|
})(exports2, (function(exports3) {
|
|
88867
88922
|
"use strict";
|
|
88868
88923
|
function merge5() {
|
|
@@ -96624,15 +96679,15 @@ var require_api_files = __commonJS({
|
|
|
96624
96679
|
exports2.readAppApiYamlFile = readAppApiYamlFile4;
|
|
96625
96680
|
exports2.resolveLanguageSpecificStepContentFromBlocks = resolveLanguageSpecificStepContentFromBlocks2;
|
|
96626
96681
|
async function writeApiFiles3(...args) {
|
|
96627
|
-
const esmFunction = await import("./api-
|
|
96682
|
+
const esmFunction = await import("./api-37KSTQN3.js");
|
|
96628
96683
|
return esmFunction.writeApiFiles(...args);
|
|
96629
96684
|
}
|
|
96630
96685
|
async function readAppApiYamlFile4(...args) {
|
|
96631
|
-
const esmFunction = await import("./api-
|
|
96686
|
+
const esmFunction = await import("./api-37KSTQN3.js");
|
|
96632
96687
|
return esmFunction.readAppApiYamlFile(...args);
|
|
96633
96688
|
}
|
|
96634
96689
|
async function resolveLanguageSpecificStepContentFromBlocks2(...args) {
|
|
96635
|
-
const esmFunction = await import("./api-
|
|
96690
|
+
const esmFunction = await import("./api-37KSTQN3.js");
|
|
96636
96691
|
return esmFunction.resolveLanguageSpecificStepContentFromBlocks(...args);
|
|
96637
96692
|
}
|
|
96638
96693
|
}
|
|
@@ -109424,19 +109479,19 @@ var require_getMachineId = __commonJS({
|
|
|
109424
109479
|
if (!getMachineIdImpl) {
|
|
109425
109480
|
switch (process5.platform) {
|
|
109426
109481
|
case "darwin":
|
|
109427
|
-
getMachineIdImpl = (await import("./getMachineId-darwin-
|
|
109482
|
+
getMachineIdImpl = (await import("./getMachineId-darwin-VKKW65F3.js")).getMachineId;
|
|
109428
109483
|
break;
|
|
109429
109484
|
case "linux":
|
|
109430
|
-
getMachineIdImpl = (await import("./getMachineId-linux-
|
|
109485
|
+
getMachineIdImpl = (await import("./getMachineId-linux-YFN65QK4.js")).getMachineId;
|
|
109431
109486
|
break;
|
|
109432
109487
|
case "freebsd":
|
|
109433
|
-
getMachineIdImpl = (await import("./getMachineId-bsd-
|
|
109488
|
+
getMachineIdImpl = (await import("./getMachineId-bsd-FYJPFKU4.js")).getMachineId;
|
|
109434
109489
|
break;
|
|
109435
109490
|
case "win32":
|
|
109436
|
-
getMachineIdImpl = (await import("./getMachineId-win-
|
|
109491
|
+
getMachineIdImpl = (await import("./getMachineId-win-B6V2GN2V.js")).getMachineId;
|
|
109437
109492
|
break;
|
|
109438
109493
|
default:
|
|
109439
|
-
getMachineIdImpl = (await import("./getMachineId-unsupported-
|
|
109494
|
+
getMachineIdImpl = (await import("./getMachineId-unsupported-T73AAGBH.js")).getMachineId;
|
|
109440
109495
|
break;
|
|
109441
109496
|
}
|
|
109442
109497
|
}
|
|
@@ -132107,8 +132162,8 @@ var require_float = __commonJS({
|
|
|
132107
132162
|
"../../../../node_modules/.pnpm/@protobufjs+float@1.0.2/node_modules/@protobufjs/float/index.js"(exports2, module2) {
|
|
132108
132163
|
"use strict";
|
|
132109
132164
|
init_cjs_shims();
|
|
132110
|
-
module2.exports =
|
|
132111
|
-
function
|
|
132165
|
+
module2.exports = factory12(factory12);
|
|
132166
|
+
function factory12(exports3) {
|
|
132112
132167
|
if (typeof Float32Array !== "undefined") (function() {
|
|
132113
132168
|
var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
|
|
132114
132169
|
function writeFloat_f32_cpy(val2, buf, pos3) {
|
|
@@ -139775,23 +139830,23 @@ var require_util7 = __commonJS({
|
|
|
139775
139830
|
var require_umd = __commonJS({
|
|
139776
139831
|
"../../../../node_modules/.pnpm/long@5.3.1/node_modules/long/umd/index.js"(exports2, module2) {
|
|
139777
139832
|
init_cjs_shims();
|
|
139778
|
-
(function(global2,
|
|
139833
|
+
(function(global2, factory12) {
|
|
139779
139834
|
function unwrapDefault(exports3) {
|
|
139780
139835
|
return "default" in exports3 ? exports3.default : exports3;
|
|
139781
139836
|
}
|
|
139782
139837
|
if (typeof define === "function" && define.amd) {
|
|
139783
139838
|
define([], function() {
|
|
139784
139839
|
var exports3 = {};
|
|
139785
|
-
|
|
139840
|
+
factory12(exports3);
|
|
139786
139841
|
return unwrapDefault(exports3);
|
|
139787
139842
|
});
|
|
139788
139843
|
} else if (typeof exports2 === "object") {
|
|
139789
|
-
|
|
139844
|
+
factory12(exports2);
|
|
139790
139845
|
if (typeof module2 === "object") module2.exports = unwrapDefault(exports2);
|
|
139791
139846
|
} else {
|
|
139792
139847
|
(function() {
|
|
139793
139848
|
var exports3 = {};
|
|
139794
|
-
|
|
139849
|
+
factory12(exports3);
|
|
139795
139850
|
global2.Long = unwrapDefault(exports3);
|
|
139796
139851
|
})();
|
|
139797
139852
|
}
|
|
@@ -143502,7 +143557,7 @@ var require_filter_stack = __commonJS({
|
|
|
143502
143557
|
return new _FilterStackFactory([...this.factories]);
|
|
143503
143558
|
}
|
|
143504
143559
|
createFilter() {
|
|
143505
|
-
return new FilterStack(this.factories.map((
|
|
143560
|
+
return new FilterStack(this.factories.map((factory12) => factory12.createFilter()));
|
|
143506
143561
|
}
|
|
143507
143562
|
};
|
|
143508
143563
|
exports2.FilterStackFactory = FilterStackFactory;
|
|
@@ -154366,8 +154421,8 @@ var require_splat = __commonJS({
|
|
|
154366
154421
|
var require_fecha_umd = __commonJS({
|
|
154367
154422
|
"../../../../node_modules/.pnpm/fecha@4.2.3/node_modules/fecha/lib/fecha.umd.js"(exports2, module2) {
|
|
154368
154423
|
init_cjs_shims();
|
|
154369
|
-
(function(global2,
|
|
154370
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
154424
|
+
(function(global2, factory12) {
|
|
154425
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory12(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory12) : factory12(global2.fecha = {});
|
|
154371
154426
|
})(exports2, (function(exports3) {
|
|
154372
154427
|
"use strict";
|
|
154373
154428
|
var token2 = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
@@ -163163,7 +163218,7 @@ var require_globrex = __commonJS({
|
|
|
163163
163218
|
"../../../../node_modules/.pnpm/globrex@0.1.2/node_modules/globrex/index.js"(exports2, module2) {
|
|
163164
163219
|
init_cjs_shims();
|
|
163165
163220
|
var isWin = process.platform === "win32";
|
|
163166
|
-
var
|
|
163221
|
+
var SEP2 = isWin ? `\\\\+` : `\\/`;
|
|
163167
163222
|
var SEP_ESC = isWin ? `\\\\` : `/`;
|
|
163168
163223
|
var GLOBSTAR2 = `((?:[^/]*(?:/|$))*)`;
|
|
163169
163224
|
var WILDCARD = `([^/]*)`;
|
|
@@ -163179,7 +163234,7 @@ var require_globrex = __commonJS({
|
|
|
163179
163234
|
function add2(str, { split, last: last3, only } = {}) {
|
|
163180
163235
|
if (only !== "path") regex += str;
|
|
163181
163236
|
if (filepath && only !== "regex") {
|
|
163182
|
-
path77.regex += str === "\\/" ?
|
|
163237
|
+
path77.regex += str === "\\/" ? SEP2 : str;
|
|
163183
163238
|
if (split) {
|
|
163184
163239
|
if (last3) segment += str;
|
|
163185
163240
|
if (segment !== "") {
|
|
@@ -182722,7 +182777,7 @@ var require_dist6 = __commonJS({
|
|
|
182722
182777
|
asSchema: () => asSchema4,
|
|
182723
182778
|
combineHeaders: () => combineHeaders3,
|
|
182724
182779
|
convertAsyncIteratorToReadableStream: () => convertAsyncIteratorToReadableStream,
|
|
182725
|
-
convertBase64ToUint8Array: () =>
|
|
182780
|
+
convertBase64ToUint8Array: () => convertBase64ToUint8Array2,
|
|
182726
182781
|
convertImageModelFileToDataUri: () => convertImageModelFileToDataUri,
|
|
182727
182782
|
convertToBase64: () => convertToBase642,
|
|
182728
182783
|
convertToFormData: () => convertToFormData,
|
|
@@ -182921,7 +182976,7 @@ var require_dist6 = __commonJS({
|
|
|
182921
182976
|
return Object.fromEntries([...response.headers]);
|
|
182922
182977
|
}
|
|
182923
182978
|
var { btoa: btoa4, atob: atob4 } = globalThis;
|
|
182924
|
-
function
|
|
182979
|
+
function convertBase64ToUint8Array2(base64String) {
|
|
182925
182980
|
const base64Url = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
|
182926
182981
|
const latin1string = atob4(base64Url);
|
|
182927
182982
|
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
@@ -185299,8 +185354,8 @@ var require_get_vercel_oidc_token = __commonJS({
|
|
|
185299
185354
|
}
|
|
185300
185355
|
try {
|
|
185301
185356
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
185302
|
-
await import("./token-util-
|
|
185303
|
-
await import("./token-
|
|
185357
|
+
await import("./token-util-LQBRSAR7.js"),
|
|
185358
|
+
await import("./token-OWGZVHVZ.js")
|
|
185304
185359
|
]);
|
|
185305
185360
|
if (!token2 || isExpired(getTokenPayload(token2))) {
|
|
185306
185361
|
await refreshToken();
|
|
@@ -185403,7 +185458,7 @@ var require_dist8 = __commonJS({
|
|
|
185403
185458
|
module2.exports = __toCommonJS3(src_exports2);
|
|
185404
185459
|
var import_provider_utils112 = require_dist6();
|
|
185405
185460
|
var import_provider25 = require_dist4();
|
|
185406
|
-
var
|
|
185461
|
+
var import_v425 = require_v4();
|
|
185407
185462
|
var marker17 = "vercel.ai.gateway.error";
|
|
185408
185463
|
var symbol18 = Symbol.for(marker17);
|
|
185409
185464
|
var _a21;
|
|
@@ -185537,15 +185592,15 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185537
185592
|
return GatewayError.hasMarker(error40) && symbol42 in error40;
|
|
185538
185593
|
}
|
|
185539
185594
|
};
|
|
185540
|
-
var
|
|
185541
|
-
var
|
|
185595
|
+
var import_v426 = require_v4();
|
|
185596
|
+
var import_provider_utils30 = require_dist6();
|
|
185542
185597
|
var name42 = "GatewayModelNotFoundError";
|
|
185543
185598
|
var marker52 = `vercel.ai.gateway.error.${name42}`;
|
|
185544
185599
|
var symbol52 = Symbol.for(marker52);
|
|
185545
|
-
var modelNotFoundParamSchema = (0,
|
|
185546
|
-
() => (0,
|
|
185547
|
-
|
|
185548
|
-
modelId:
|
|
185600
|
+
var modelNotFoundParamSchema = (0, import_provider_utils30.lazySchema)(
|
|
185601
|
+
() => (0, import_provider_utils30.zodSchema)(
|
|
185602
|
+
import_v426.z.object({
|
|
185603
|
+
modelId: import_v426.z.string()
|
|
185549
185604
|
})
|
|
185550
185605
|
)
|
|
185551
185606
|
);
|
|
@@ -185615,7 +185670,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185615
185670
|
return GatewayError.hasMarker(error40) && symbol72 in error40;
|
|
185616
185671
|
}
|
|
185617
185672
|
};
|
|
185618
|
-
var
|
|
185673
|
+
var import_provider_utils210 = require_dist6();
|
|
185619
185674
|
async function createGatewayErrorFromResponse({
|
|
185620
185675
|
response,
|
|
185621
185676
|
statusCode,
|
|
@@ -185624,7 +185679,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185624
185679
|
authMethod
|
|
185625
185680
|
}) {
|
|
185626
185681
|
var _a92;
|
|
185627
|
-
const parseResult = await (0,
|
|
185682
|
+
const parseResult = await (0, import_provider_utils210.safeValidateTypes)({
|
|
185628
185683
|
value: response,
|
|
185629
185684
|
schema: gatewayErrorResponseSchema
|
|
185630
185685
|
});
|
|
@@ -185667,7 +185722,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185667
185722
|
generationId
|
|
185668
185723
|
});
|
|
185669
185724
|
case "model_not_found": {
|
|
185670
|
-
const modelResult = await (0,
|
|
185725
|
+
const modelResult = await (0, import_provider_utils210.safeValidateTypes)({
|
|
185671
185726
|
value: validatedResponse.error.param,
|
|
185672
185727
|
schema: modelNotFoundParamSchema
|
|
185673
185728
|
});
|
|
@@ -185695,16 +185750,16 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185695
185750
|
});
|
|
185696
185751
|
}
|
|
185697
185752
|
}
|
|
185698
|
-
var gatewayErrorResponseSchema = (0,
|
|
185699
|
-
() => (0,
|
|
185700
|
-
|
|
185701
|
-
error:
|
|
185702
|
-
message:
|
|
185703
|
-
type:
|
|
185704
|
-
param:
|
|
185705
|
-
code:
|
|
185753
|
+
var gatewayErrorResponseSchema = (0, import_provider_utils210.lazySchema)(
|
|
185754
|
+
() => (0, import_provider_utils210.zodSchema)(
|
|
185755
|
+
import_v425.z.object({
|
|
185756
|
+
error: import_v425.z.object({
|
|
185757
|
+
message: import_v425.z.string(),
|
|
185758
|
+
type: import_v425.z.string().nullish(),
|
|
185759
|
+
param: import_v425.z.unknown().nullish(),
|
|
185760
|
+
code: import_v425.z.union([import_v425.z.string(), import_v425.z.number()]).nullish()
|
|
185706
185761
|
}),
|
|
185707
|
-
generationId:
|
|
185762
|
+
generationId: import_v425.z.string().nullish()
|
|
185708
185763
|
})
|
|
185709
185764
|
)
|
|
185710
185765
|
);
|
|
@@ -186470,37 +186525,37 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
186470
186525
|
})
|
|
186471
186526
|
]);
|
|
186472
186527
|
var import_provider_utils92 = require_dist6();
|
|
186473
|
-
var
|
|
186528
|
+
var import_zod55 = require_zod();
|
|
186474
186529
|
var parallelSearchInputSchema = (0, import_provider_utils92.lazySchema)(
|
|
186475
186530
|
() => (0, import_provider_utils92.zodSchema)(
|
|
186476
|
-
|
|
186477
|
-
objective:
|
|
186531
|
+
import_zod55.z.object({
|
|
186532
|
+
objective: import_zod55.z.string().describe(
|
|
186478
186533
|
"Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."
|
|
186479
186534
|
),
|
|
186480
|
-
search_queries:
|
|
186535
|
+
search_queries: import_zod55.z.array(import_zod55.z.string()).optional().describe(
|
|
186481
186536
|
"Optional search queries to supplement the objective. Maximum 200 characters per query."
|
|
186482
186537
|
),
|
|
186483
|
-
mode:
|
|
186538
|
+
mode: import_zod55.z.enum(["one-shot", "agentic"]).optional().describe(
|
|
186484
186539
|
'Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'
|
|
186485
186540
|
),
|
|
186486
|
-
max_results:
|
|
186541
|
+
max_results: import_zod55.z.number().optional().describe(
|
|
186487
186542
|
"Maximum number of results to return (1-20). Defaults to 10 if not specified."
|
|
186488
186543
|
),
|
|
186489
|
-
source_policy:
|
|
186490
|
-
include_domains:
|
|
186491
|
-
exclude_domains:
|
|
186492
|
-
after_date:
|
|
186544
|
+
source_policy: import_zod55.z.object({
|
|
186545
|
+
include_domains: import_zod55.z.array(import_zod55.z.string()).optional().describe("List of domains to include in search results."),
|
|
186546
|
+
exclude_domains: import_zod55.z.array(import_zod55.z.string()).optional().describe("List of domains to exclude from search results."),
|
|
186547
|
+
after_date: import_zod55.z.string().optional().describe(
|
|
186493
186548
|
"Only include results published after this date (ISO 8601 format)."
|
|
186494
186549
|
)
|
|
186495
186550
|
}).optional().describe(
|
|
186496
186551
|
"Source policy for controlling which domains to include/exclude and freshness."
|
|
186497
186552
|
),
|
|
186498
|
-
excerpts:
|
|
186499
|
-
max_chars_per_result:
|
|
186500
|
-
max_chars_total:
|
|
186553
|
+
excerpts: import_zod55.z.object({
|
|
186554
|
+
max_chars_per_result: import_zod55.z.number().optional().describe("Maximum characters per result."),
|
|
186555
|
+
max_chars_total: import_zod55.z.number().optional().describe("Maximum total characters across all results.")
|
|
186501
186556
|
}).optional().describe("Excerpt configuration for controlling result length."),
|
|
186502
|
-
fetch_policy:
|
|
186503
|
-
max_age_seconds:
|
|
186557
|
+
fetch_policy: import_zod55.z.object({
|
|
186558
|
+
max_age_seconds: import_zod55.z.number().optional().describe(
|
|
186504
186559
|
"Maximum age in seconds for cached content. Set to 0 to always fetch fresh content."
|
|
186505
186560
|
)
|
|
186506
186561
|
}).optional().describe("Fetch policy for controlling content freshness.")
|
|
@@ -186509,23 +186564,23 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
186509
186564
|
);
|
|
186510
186565
|
var parallelSearchOutputSchema = (0, import_provider_utils92.lazySchema)(
|
|
186511
186566
|
() => (0, import_provider_utils92.zodSchema)(
|
|
186512
|
-
|
|
186567
|
+
import_zod55.z.union([
|
|
186513
186568
|
// Success response
|
|
186514
|
-
|
|
186515
|
-
searchId:
|
|
186516
|
-
results:
|
|
186517
|
-
|
|
186518
|
-
url:
|
|
186519
|
-
title:
|
|
186520
|
-
excerpt:
|
|
186521
|
-
publishDate:
|
|
186522
|
-
relevanceScore:
|
|
186569
|
+
import_zod55.z.object({
|
|
186570
|
+
searchId: import_zod55.z.string(),
|
|
186571
|
+
results: import_zod55.z.array(
|
|
186572
|
+
import_zod55.z.object({
|
|
186573
|
+
url: import_zod55.z.string(),
|
|
186574
|
+
title: import_zod55.z.string(),
|
|
186575
|
+
excerpt: import_zod55.z.string(),
|
|
186576
|
+
publishDate: import_zod55.z.string().nullable().optional(),
|
|
186577
|
+
relevanceScore: import_zod55.z.number().optional()
|
|
186523
186578
|
})
|
|
186524
186579
|
)
|
|
186525
186580
|
}),
|
|
186526
186581
|
// Error response
|
|
186527
|
-
|
|
186528
|
-
error:
|
|
186582
|
+
import_zod55.z.object({
|
|
186583
|
+
error: import_zod55.z.enum([
|
|
186529
186584
|
"api_error",
|
|
186530
186585
|
"rate_limit",
|
|
186531
186586
|
"timeout",
|
|
@@ -186533,8 +186588,8 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
186533
186588
|
"configuration_error",
|
|
186534
186589
|
"unknown"
|
|
186535
186590
|
]),
|
|
186536
|
-
statusCode:
|
|
186537
|
-
message:
|
|
186591
|
+
statusCode: import_zod55.z.number().optional(),
|
|
186592
|
+
message: import_zod55.z.string()
|
|
186538
186593
|
})
|
|
186539
186594
|
])
|
|
186540
186595
|
)
|
|
@@ -186847,7 +186902,7 @@ var require_dist9 = __commonJS({
|
|
|
186847
186902
|
DefaultChatTransport: () => DefaultChatTransport,
|
|
186848
186903
|
DefaultGeneratedFile: () => DefaultGeneratedFile,
|
|
186849
186904
|
DirectChatTransport: () => DirectChatTransport,
|
|
186850
|
-
DownloadError: () =>
|
|
186905
|
+
DownloadError: () => import_provider_utils30.DownloadError,
|
|
186851
186906
|
EmptyResponseBodyError: () => import_provider212.EmptyResponseBodyError,
|
|
186852
186907
|
Experimental_Agent: () => ToolLoopAgent,
|
|
186853
186908
|
HttpChatTransport: () => HttpChatTransport,
|
|
@@ -186922,7 +186977,7 @@ var require_dist9 = __commonJS({
|
|
|
186922
186977
|
gateway: () => import_gateway3.gateway,
|
|
186923
186978
|
generateId: () => import_provider_utils39.generateId,
|
|
186924
186979
|
generateImage: () => generateImage,
|
|
186925
|
-
generateObject: () =>
|
|
186980
|
+
generateObject: () => generateObject7,
|
|
186926
186981
|
generateText: () => generateText2,
|
|
186927
186982
|
getStaticToolName: () => getStaticToolName,
|
|
186928
186983
|
getTextFromDataUrl: () => getTextFromDataUrl,
|
|
@@ -187374,7 +187429,7 @@ var require_dist9 = __commonJS({
|
|
|
187374
187429
|
}
|
|
187375
187430
|
};
|
|
187376
187431
|
_a182 = symbol182;
|
|
187377
|
-
var
|
|
187432
|
+
var import_provider_utils30 = require_dist6();
|
|
187378
187433
|
var import_provider202 = require_dist4();
|
|
187379
187434
|
var name19 = "AI_RetryError";
|
|
187380
187435
|
var marker19 = `vercel.ai.error.${name19}`;
|
|
@@ -187731,7 +187786,7 @@ var require_dist9 = __commonJS({
|
|
|
187731
187786
|
return timeout.chunkMs;
|
|
187732
187787
|
}
|
|
187733
187788
|
var import_provider_utils62 = require_dist6();
|
|
187734
|
-
var
|
|
187789
|
+
var import_provider_utils210 = require_dist6();
|
|
187735
187790
|
var imageMediaTypeSignatures = [
|
|
187736
187791
|
{
|
|
187737
187792
|
mediaType: "image/gif",
|
|
@@ -187929,7 +187984,7 @@ var require_dist9 = __commonJS({
|
|
|
187929
187984
|
}
|
|
187930
187985
|
];
|
|
187931
187986
|
var stripID3 = (data3) => {
|
|
187932
|
-
const bytes = typeof data3 === "string" ? (0,
|
|
187987
|
+
const bytes = typeof data3 === "string" ? (0, import_provider_utils210.convertBase64ToUint8Array)(data3) : data3;
|
|
187933
187988
|
const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;
|
|
187934
187989
|
return bytes.slice(id3Size + 10);
|
|
187935
187990
|
};
|
|
@@ -187944,7 +187999,7 @@ var require_dist9 = __commonJS({
|
|
|
187944
187999
|
signatures
|
|
187945
188000
|
}) {
|
|
187946
188001
|
const processedData = stripID3TagsIfPresent(data3);
|
|
187947
|
-
const bytes = typeof processedData === "string" ? (0,
|
|
188002
|
+
const bytes = typeof processedData === "string" ? (0, import_provider_utils210.convertBase64ToUint8Array)(
|
|
187948
188003
|
processedData.substring(0, Math.min(processedData.length, 24))
|
|
187949
188004
|
) : processedData;
|
|
187950
188005
|
for (const signature of signatures) {
|
|
@@ -188005,7 +188060,7 @@ var require_dist9 = __commonJS({
|
|
|
188005
188060
|
);
|
|
188006
188061
|
var import_provider222 = require_dist4();
|
|
188007
188062
|
var import_provider_utils52 = require_dist6();
|
|
188008
|
-
var
|
|
188063
|
+
var import_v425 = require_v4();
|
|
188009
188064
|
function splitDataUrl(dataUrl) {
|
|
188010
188065
|
try {
|
|
188011
188066
|
const [header, base64Content] = dataUrl.split(",");
|
|
@@ -188020,11 +188075,11 @@ var require_dist9 = __commonJS({
|
|
|
188020
188075
|
};
|
|
188021
188076
|
}
|
|
188022
188077
|
}
|
|
188023
|
-
var dataContentSchema =
|
|
188024
|
-
|
|
188025
|
-
|
|
188026
|
-
|
|
188027
|
-
|
|
188078
|
+
var dataContentSchema = import_v425.z.union([
|
|
188079
|
+
import_v425.z.string(),
|
|
188080
|
+
import_v425.z.instanceof(Uint8Array),
|
|
188081
|
+
import_v425.z.instanceof(ArrayBuffer),
|
|
188082
|
+
import_v425.z.custom(
|
|
188028
188083
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
188029
188084
|
(value2) => {
|
|
188030
188085
|
var _a212, _b17;
|
|
@@ -188619,15 +188674,15 @@ var require_dist9 = __commonJS({
|
|
|
188619
188674
|
var import_v462 = require_v4();
|
|
188620
188675
|
var import_v452 = require_v4();
|
|
188621
188676
|
var import_v432 = require_v4();
|
|
188622
|
-
var
|
|
188623
|
-
var jsonValueSchema =
|
|
188624
|
-
() =>
|
|
188625
|
-
|
|
188626
|
-
|
|
188627
|
-
|
|
188628
|
-
|
|
188629
|
-
|
|
188630
|
-
|
|
188677
|
+
var import_v426 = require_v4();
|
|
188678
|
+
var jsonValueSchema = import_v426.z.lazy(
|
|
188679
|
+
() => import_v426.z.union([
|
|
188680
|
+
import_v426.z.null(),
|
|
188681
|
+
import_v426.z.string(),
|
|
188682
|
+
import_v426.z.number(),
|
|
188683
|
+
import_v426.z.boolean(),
|
|
188684
|
+
import_v426.z.record(import_v426.z.string(), jsonValueSchema.optional()),
|
|
188685
|
+
import_v426.z.array(jsonValueSchema)
|
|
188631
188686
|
])
|
|
188632
188687
|
);
|
|
188633
188688
|
var providerMetadataSchema = import_v432.z.record(
|
|
@@ -196521,7 +196576,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196521
196576
|
}
|
|
196522
196577
|
}
|
|
196523
196578
|
var originalGenerateId3 = (0, import_provider_utils282.createIdGenerator)({ prefix: "aiobj", size: 24 });
|
|
196524
|
-
async function
|
|
196579
|
+
async function generateObject7(options8) {
|
|
196525
196580
|
const {
|
|
196526
196581
|
model: modelArg,
|
|
196527
196582
|
output = "object",
|
|
@@ -196789,7 +196844,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196789
196844
|
});
|
|
196790
196845
|
}
|
|
196791
196846
|
};
|
|
196792
|
-
var
|
|
196847
|
+
var import_provider_utils302 = require_dist6();
|
|
196793
196848
|
function cosineSimilarity(vector1, vector2) {
|
|
196794
196849
|
if (vector1.length !== vector2.length) {
|
|
196795
196850
|
throw new InvalidArgumentError2({
|
|
@@ -196892,7 +196947,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196892
196947
|
});
|
|
196893
196948
|
}
|
|
196894
196949
|
};
|
|
196895
|
-
var
|
|
196950
|
+
var import_provider_utils292 = require_dist6();
|
|
196896
196951
|
function simulateReadableStream({
|
|
196897
196952
|
chunks,
|
|
196898
196953
|
initialDelayInMs = 0,
|
|
@@ -196900,7 +196955,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196900
196955
|
_internal
|
|
196901
196956
|
}) {
|
|
196902
196957
|
var _a212;
|
|
196903
|
-
const delay22 = (_a212 = _internal == null ? void 0 : _internal.delay) != null ? _a212 :
|
|
196958
|
+
const delay22 = (_a212 = _internal == null ? void 0 : _internal.delay) != null ? _a212 : import_provider_utils292.delay;
|
|
196904
196959
|
let index2 = 0;
|
|
196905
196960
|
return new ReadableStream({
|
|
196906
196961
|
async pull(controller) {
|
|
@@ -196913,7 +196968,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196913
196968
|
}
|
|
196914
196969
|
});
|
|
196915
196970
|
}
|
|
196916
|
-
var originalGenerateId4 = (0,
|
|
196971
|
+
var originalGenerateId4 = (0, import_provider_utils302.createIdGenerator)({ prefix: "aiobj", size: 24 });
|
|
196917
196972
|
function streamObject(options8) {
|
|
196918
196973
|
const {
|
|
196919
196974
|
model,
|
|
@@ -197003,13 +197058,13 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
197003
197058
|
currentDate,
|
|
197004
197059
|
now: now2
|
|
197005
197060
|
}) {
|
|
197006
|
-
this._object = new
|
|
197007
|
-
this._usage = new
|
|
197008
|
-
this._providerMetadata = new
|
|
197009
|
-
this._warnings = new
|
|
197010
|
-
this._request = new
|
|
197011
|
-
this._response = new
|
|
197012
|
-
this._finishReason = new
|
|
197061
|
+
this._object = new import_provider_utils302.DelayedPromise();
|
|
197062
|
+
this._usage = new import_provider_utils302.DelayedPromise();
|
|
197063
|
+
this._providerMetadata = new import_provider_utils302.DelayedPromise();
|
|
197064
|
+
this._warnings = new import_provider_utils302.DelayedPromise();
|
|
197065
|
+
this._request = new import_provider_utils302.DelayedPromise();
|
|
197066
|
+
this._response = new import_provider_utils302.DelayedPromise();
|
|
197067
|
+
this._finishReason = new import_provider_utils302.DelayedPromise();
|
|
197013
197068
|
const model = resolveLanguageModel(modelArg);
|
|
197014
197069
|
const { maxRetries, retry } = prepareRetries({
|
|
197015
197070
|
maxRetries: maxRetriesArg,
|
|
@@ -233980,15 +234035,15 @@ var require_lib9 = __commonJS({
|
|
|
233980
234035
|
var require_esprima = __commonJS({
|
|
233981
234036
|
"../../../../node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js"(exports2, module2) {
|
|
233982
234037
|
init_cjs_shims();
|
|
233983
|
-
(function webpackUniversalModuleDefinition(root3,
|
|
234038
|
+
(function webpackUniversalModuleDefinition(root3, factory12) {
|
|
233984
234039
|
if (typeof exports2 === "object" && typeof module2 === "object")
|
|
233985
|
-
module2.exports =
|
|
234040
|
+
module2.exports = factory12();
|
|
233986
234041
|
else if (typeof define === "function" && define.amd)
|
|
233987
|
-
define([],
|
|
234042
|
+
define([], factory12);
|
|
233988
234043
|
else if (typeof exports2 === "object")
|
|
233989
|
-
exports2["esprima"] =
|
|
234044
|
+
exports2["esprima"] = factory12();
|
|
233990
234045
|
else
|
|
233991
|
-
root3["esprima"] =
|
|
234046
|
+
root3["esprima"] = factory12();
|
|
233992
234047
|
})(exports2, function() {
|
|
233993
234048
|
return (
|
|
233994
234049
|
/******/
|
|
@@ -255746,18 +255801,18 @@ var require_scope2 = __commonJS({
|
|
|
255746
255801
|
var require_sourcemap_codec_umd = __commonJS({
|
|
255747
255802
|
"../../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports2, module2) {
|
|
255748
255803
|
init_cjs_shims();
|
|
255749
|
-
(function(global2,
|
|
255804
|
+
(function(global2, factory12) {
|
|
255750
255805
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
255751
|
-
|
|
255806
|
+
factory12(module2);
|
|
255752
255807
|
module2.exports = def(module2);
|
|
255753
255808
|
} else if (typeof define === "function" && define.amd) {
|
|
255754
255809
|
define(["module"], function(mod2) {
|
|
255755
|
-
|
|
255810
|
+
factory12.apply(this, arguments);
|
|
255756
255811
|
mod2.exports = def(mod2);
|
|
255757
255812
|
});
|
|
255758
255813
|
} else {
|
|
255759
255814
|
const mod2 = { exports: {} };
|
|
255760
|
-
|
|
255815
|
+
factory12(mod2);
|
|
255761
255816
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
255762
255817
|
global2.sourcemapCodec = def(mod2);
|
|
255763
255818
|
}
|
|
@@ -256208,8 +256263,8 @@ var require_sourcemap_codec_umd = __commonJS({
|
|
|
256208
256263
|
var require_resolve_uri_umd = __commonJS({
|
|
256209
256264
|
"../../../../node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(exports2, module2) {
|
|
256210
256265
|
init_cjs_shims();
|
|
256211
|
-
(function(global2,
|
|
256212
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports =
|
|
256266
|
+
(function(global2, factory12) {
|
|
256267
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory12() : typeof define === "function" && define.amd ? define(factory12) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.resolveURI = factory12());
|
|
256213
256268
|
})(exports2, (function() {
|
|
256214
256269
|
"use strict";
|
|
256215
256270
|
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
@@ -256388,18 +256443,18 @@ var require_resolve_uri_umd = __commonJS({
|
|
|
256388
256443
|
var require_trace_mapping_umd = __commonJS({
|
|
256389
256444
|
"../../../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports2, module2) {
|
|
256390
256445
|
init_cjs_shims();
|
|
256391
|
-
(function(global2,
|
|
256446
|
+
(function(global2, factory12) {
|
|
256392
256447
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
256393
|
-
|
|
256448
|
+
factory12(module2, require_resolve_uri_umd(), require_sourcemap_codec_umd());
|
|
256394
256449
|
module2.exports = def(module2);
|
|
256395
256450
|
} else if (typeof define === "function" && define.amd) {
|
|
256396
256451
|
define(["module", "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec"], function(mod2) {
|
|
256397
|
-
|
|
256452
|
+
factory12.apply(this, arguments);
|
|
256398
256453
|
mod2.exports = def(mod2);
|
|
256399
256454
|
});
|
|
256400
256455
|
} else {
|
|
256401
256456
|
const mod2 = { exports: {} };
|
|
256402
|
-
|
|
256457
|
+
factory12(mod2, global2.resolveURI, global2.sourcemapCodec);
|
|
256403
256458
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
256404
256459
|
global2.traceMapping = def(mod2);
|
|
256405
256460
|
}
|
|
@@ -256929,18 +256984,18 @@ var require_trace_mapping_umd = __commonJS({
|
|
|
256929
256984
|
var require_gen_mapping_umd = __commonJS({
|
|
256930
256985
|
"../../../../node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports2, module2) {
|
|
256931
256986
|
init_cjs_shims();
|
|
256932
|
-
(function(global2,
|
|
256987
|
+
(function(global2, factory12) {
|
|
256933
256988
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
256934
|
-
|
|
256989
|
+
factory12(module2, require_sourcemap_codec_umd(), require_trace_mapping_umd());
|
|
256935
256990
|
module2.exports = def(module2);
|
|
256936
256991
|
} else if (typeof define === "function" && define.amd) {
|
|
256937
256992
|
define(["module", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping"], function(mod2) {
|
|
256938
|
-
|
|
256993
|
+
factory12.apply(this, arguments);
|
|
256939
256994
|
mod2.exports = def(mod2);
|
|
256940
256995
|
});
|
|
256941
256996
|
} else {
|
|
256942
256997
|
const mod2 = { exports: {} };
|
|
256943
|
-
|
|
256998
|
+
factory12(mod2, global2.sourcemapCodec, global2.traceMapping);
|
|
256944
256999
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
256945
257000
|
global2.genMapping = def(mod2);
|
|
256946
257001
|
}
|
|
@@ -257281,18 +257336,18 @@ var require_gen_mapping_umd = __commonJS({
|
|
|
257281
257336
|
var require_trace_mapping_umd2 = __commonJS({
|
|
257282
257337
|
"../../../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.30/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports2, module2) {
|
|
257283
257338
|
init_cjs_shims();
|
|
257284
|
-
(function(global2,
|
|
257339
|
+
(function(global2, factory12) {
|
|
257285
257340
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
257286
|
-
|
|
257341
|
+
factory12(module2, require_resolve_uri_umd(), require_sourcemap_codec_umd());
|
|
257287
257342
|
module2.exports = def(module2);
|
|
257288
257343
|
} else if (typeof define === "function" && define.amd) {
|
|
257289
257344
|
define(["module", "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec"], function(mod2) {
|
|
257290
|
-
|
|
257345
|
+
factory12.apply(this, arguments);
|
|
257291
257346
|
mod2.exports = def(mod2);
|
|
257292
257347
|
});
|
|
257293
257348
|
} else {
|
|
257294
257349
|
const mod2 = { exports: {} };
|
|
257295
|
-
|
|
257350
|
+
factory12(mod2, global2.resolveURI, global2.sourcemapCodec);
|
|
257296
257351
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
257297
257352
|
global2.traceMapping = def(mod2);
|
|
257298
257353
|
}
|
|
@@ -292475,8 +292530,8 @@ var require_utils24 = __commonJS({
|
|
|
292475
292530
|
var require_acorn = __commonJS({
|
|
292476
292531
|
"../../../../node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.js"(exports2, module2) {
|
|
292477
292532
|
init_cjs_shims();
|
|
292478
|
-
(function(global2,
|
|
292479
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
292533
|
+
(function(global2, factory12) {
|
|
292534
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory12(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory12) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory12(global2.acorn = {}));
|
|
292480
292535
|
})(exports2, (function(exports3) {
|
|
292481
292536
|
"use strict";
|
|
292482
292537
|
var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
@@ -332632,11 +332687,11 @@ var require_ignore = __commonJS({
|
|
|
332632
332687
|
return this._test(path77, this._testCache, true);
|
|
332633
332688
|
}
|
|
332634
332689
|
};
|
|
332635
|
-
var
|
|
332690
|
+
var factory12 = (options8) => new Ignore2(options8);
|
|
332636
332691
|
var isPathValid = (path77) => checkPath(path77 && checkPath.convert(path77), path77, RETURN_FALSE);
|
|
332637
|
-
|
|
332638
|
-
|
|
332639
|
-
module2.exports =
|
|
332692
|
+
factory12.isPathValid = isPathValid;
|
|
332693
|
+
factory12.default = factory12;
|
|
332694
|
+
module2.exports = factory12;
|
|
332640
332695
|
if (
|
|
332641
332696
|
// Detect `process` so that it can run in browsers.
|
|
332642
332697
|
typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
|
|
@@ -351585,7 +351640,7 @@ var require_token_store = __commonJS({
|
|
|
351585
351640
|
}
|
|
351586
351641
|
return map3;
|
|
351587
351642
|
}
|
|
351588
|
-
function createCursorWithSkip(
|
|
351643
|
+
function createCursorWithSkip(factory12, tokens, comments, indexMap, startLoc, endLoc, opts) {
|
|
351589
351644
|
let includeComments = false;
|
|
351590
351645
|
let skip2 = 0;
|
|
351591
351646
|
let filter9 = null;
|
|
@@ -351603,7 +351658,7 @@ var require_token_store = __commonJS({
|
|
|
351603
351658
|
!filter9 || typeof filter9 === "function",
|
|
351604
351659
|
"options.filter should be a function."
|
|
351605
351660
|
);
|
|
351606
|
-
return
|
|
351661
|
+
return factory12.createCursor(
|
|
351607
351662
|
tokens,
|
|
351608
351663
|
comments,
|
|
351609
351664
|
indexMap,
|
|
@@ -351615,7 +351670,7 @@ var require_token_store = __commonJS({
|
|
|
351615
351670
|
-1
|
|
351616
351671
|
);
|
|
351617
351672
|
}
|
|
351618
|
-
function createCursorWithCount(
|
|
351673
|
+
function createCursorWithCount(factory12, tokens, comments, indexMap, startLoc, endLoc, opts) {
|
|
351619
351674
|
let includeComments = false;
|
|
351620
351675
|
let count = 0;
|
|
351621
351676
|
let countExists = false;
|
|
@@ -351636,7 +351691,7 @@ var require_token_store = __commonJS({
|
|
|
351636
351691
|
!filter9 || typeof filter9 === "function",
|
|
351637
351692
|
"options.filter should be a function."
|
|
351638
351693
|
);
|
|
351639
|
-
return
|
|
351694
|
+
return factory12.createCursor(
|
|
351640
351695
|
tokens,
|
|
351641
351696
|
comments,
|
|
351642
351697
|
indexMap,
|
|
@@ -355716,7 +355771,7 @@ var require_Num = __commonJS({
|
|
|
355716
355771
|
var acos;
|
|
355717
355772
|
var atan;
|
|
355718
355773
|
var atan2;
|
|
355719
|
-
var
|
|
355774
|
+
var truncate2;
|
|
355720
355775
|
var round;
|
|
355721
355776
|
var ceiling;
|
|
355722
355777
|
var floor;
|
|
@@ -355777,7 +355832,7 @@ var require_Num = __commonJS({
|
|
|
355777
355832
|
atan2 = curry$(function(x, y) {
|
|
355778
355833
|
return Math.atan2(x, y);
|
|
355779
355834
|
});
|
|
355780
|
-
|
|
355835
|
+
truncate2 = function(x) {
|
|
355781
355836
|
return ~~x;
|
|
355782
355837
|
};
|
|
355783
355838
|
round = Math.round;
|
|
@@ -355830,7 +355885,7 @@ var require_Num = __commonJS({
|
|
|
355830
355885
|
asin,
|
|
355831
355886
|
atan,
|
|
355832
355887
|
atan2,
|
|
355833
|
-
truncate,
|
|
355888
|
+
truncate: truncate2,
|
|
355834
355889
|
round,
|
|
355835
355890
|
ceiling,
|
|
355836
355891
|
floor,
|
|
@@ -381182,7 +381237,7 @@ var require_config_loader = __commonJS({
|
|
|
381182
381237
|
* @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
|
|
381183
381238
|
*/
|
|
381184
381239
|
static async loadJiti() {
|
|
381185
|
-
const { createJiti } = await import("./jiti-
|
|
381240
|
+
const { createJiti } = await import("./jiti-ACCLL432.js");
|
|
381186
381241
|
const version5 = require_package6().version;
|
|
381187
381242
|
return { createJiti, version: version5 };
|
|
381188
381243
|
}
|
|
@@ -381511,7 +381566,7 @@ var require_eslint_helpers = __commonJS({
|
|
|
381511
381566
|
}
|
|
381512
381567
|
async function globMatch({ basePath, pattern }) {
|
|
381513
381568
|
let found = false;
|
|
381514
|
-
const { hfs } = await import("./src-
|
|
381569
|
+
const { hfs } = await import("./src-JJZPJD7X.js");
|
|
381515
381570
|
const patternToUse = normalizeToPosix(path77.relative(basePath, pattern));
|
|
381516
381571
|
const matcher = new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
|
|
381517
381572
|
const walkSettings = {
|
|
@@ -381551,7 +381606,7 @@ var require_eslint_helpers = __commonJS({
|
|
|
381551
381606
|
return new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
|
|
381552
381607
|
});
|
|
381553
381608
|
const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
|
|
381554
|
-
const { hfs } = await import("./src-
|
|
381609
|
+
const { hfs } = await import("./src-JJZPJD7X.js");
|
|
381555
381610
|
const walk2 = hfs.walk(basePath, {
|
|
381556
381611
|
async directoryFilter(entry) {
|
|
381557
381612
|
if (!matchers.some((matcher) => matcher.match(entry.path, true))) {
|
|
@@ -382574,7 +382629,7 @@ var require_eslint = __commonJS({
|
|
|
382574
382629
|
"../../../../node_modules/.pnpm/eslint@9.39.2_jiti@2.6.1/node_modules/eslint/lib/eslint/eslint.js"(exports2, module2) {
|
|
382575
382630
|
"use strict";
|
|
382576
382631
|
init_cjs_shims();
|
|
382577
|
-
var { existsSync:
|
|
382632
|
+
var { existsSync: existsSync6 } = __require("node:fs");
|
|
382578
382633
|
var fs44 = __require("node:fs/promises");
|
|
382579
382634
|
var os8 = __require("node:os");
|
|
382580
382635
|
var path77 = __require("node:path");
|
|
@@ -382982,7 +383037,7 @@ var require_eslint = __commonJS({
|
|
|
382982
383037
|
configLoader: this.#configLoader,
|
|
382983
383038
|
warningService
|
|
382984
383039
|
});
|
|
382985
|
-
if (
|
|
383040
|
+
if (existsSync6(path77.resolve(processedOptions.cwd, ".eslintignore"))) {
|
|
382986
383041
|
warningService.emitESLintIgnoreWarning();
|
|
382987
383042
|
}
|
|
382988
383043
|
}
|
|
@@ -383150,11 +383205,11 @@ var require_eslint = __commonJS({
|
|
|
383150
383205
|
if (!lintResultCache && cacheFilePath) {
|
|
383151
383206
|
debug3(`Deleting cache file at ${cacheFilePath}`);
|
|
383152
383207
|
try {
|
|
383153
|
-
if (
|
|
383208
|
+
if (existsSync6(cacheFilePath)) {
|
|
383154
383209
|
await fs44.unlink(cacheFilePath);
|
|
383155
383210
|
}
|
|
383156
383211
|
} catch (error40) {
|
|
383157
|
-
if (
|
|
383212
|
+
if (existsSync6(cacheFilePath)) {
|
|
383158
383213
|
throw error40;
|
|
383159
383214
|
}
|
|
383160
383215
|
}
|
|
@@ -390530,8 +390585,8 @@ var require_readdir_glob = __commonJS({
|
|
|
390530
390585
|
var require_async9 = __commonJS({
|
|
390531
390586
|
"../../../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js"(exports2, module2) {
|
|
390532
390587
|
init_cjs_shims();
|
|
390533
|
-
(function(global2,
|
|
390534
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
390588
|
+
(function(global2, factory12) {
|
|
390589
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory12(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory12) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory12(global2.async = {}));
|
|
390535
390590
|
})(exports2, (function(exports3) {
|
|
390536
390591
|
"use strict";
|
|
390537
390592
|
function apply(fn, ...args) {
|
|
@@ -408863,21 +408918,21 @@ var require_crc32 = __commonJS({
|
|
|
408863
408918
|
"../../../../node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js"(exports2) {
|
|
408864
408919
|
init_cjs_shims();
|
|
408865
408920
|
var CRC32;
|
|
408866
|
-
(function(
|
|
408921
|
+
(function(factory12) {
|
|
408867
408922
|
if (typeof DO_NOT_EXPORT_CRC === "undefined") {
|
|
408868
408923
|
if ("object" === typeof exports2) {
|
|
408869
|
-
|
|
408924
|
+
factory12(exports2);
|
|
408870
408925
|
} else if ("function" === typeof define && define.amd) {
|
|
408871
408926
|
define(function() {
|
|
408872
408927
|
var module3 = {};
|
|
408873
|
-
|
|
408928
|
+
factory12(module3);
|
|
408874
408929
|
return module3;
|
|
408875
408930
|
});
|
|
408876
408931
|
} else {
|
|
408877
|
-
|
|
408932
|
+
factory12(CRC32 = {});
|
|
408878
408933
|
}
|
|
408879
408934
|
} else {
|
|
408880
|
-
|
|
408935
|
+
factory12(CRC32 = {});
|
|
408881
408936
|
}
|
|
408882
408937
|
})(function(CRC322) {
|
|
408883
408938
|
CRC322.version = "1.2.2";
|
|
@@ -444605,7 +444660,7 @@ var require_pool2 = __commonJS({
|
|
|
444605
444660
|
var Pool = class extends PoolBase {
|
|
444606
444661
|
constructor(origin2, {
|
|
444607
444662
|
connections,
|
|
444608
|
-
factory:
|
|
444663
|
+
factory: factory12 = defaultFactory,
|
|
444609
444664
|
connect,
|
|
444610
444665
|
connectTimeout,
|
|
444611
444666
|
tls,
|
|
@@ -444620,7 +444675,7 @@ var require_pool2 = __commonJS({
|
|
|
444620
444675
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
|
444621
444676
|
throw new InvalidArgumentError2("invalid connections");
|
|
444622
444677
|
}
|
|
444623
|
-
if (typeof
|
|
444678
|
+
if (typeof factory12 !== "function") {
|
|
444624
444679
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444625
444680
|
}
|
|
444626
444681
|
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
@@ -444642,7 +444697,7 @@ var require_pool2 = __commonJS({
|
|
|
444642
444697
|
this[kUrl] = util5.parseOrigin(origin2);
|
|
444643
444698
|
this[kOptions] = { ...util5.deepClone(options8), connect, allowH2, clientTtl };
|
|
444644
444699
|
this[kOptions].interceptors = options8.interceptors ? { ...options8.interceptors } : void 0;
|
|
444645
|
-
this[kFactory] =
|
|
444700
|
+
this[kFactory] = factory12;
|
|
444646
444701
|
this.on("connect", (origin3, targets) => {
|
|
444647
444702
|
if (clientTtl != null && clientTtl > 0) {
|
|
444648
444703
|
for (const target of targets) {
|
|
@@ -444720,8 +444775,8 @@ var require_balanced_pool = __commonJS({
|
|
|
444720
444775
|
return new Pool(origin2, opts);
|
|
444721
444776
|
}
|
|
444722
444777
|
var BalancedPool = class extends PoolBase {
|
|
444723
|
-
constructor(upstreams = [], { factory:
|
|
444724
|
-
if (typeof
|
|
444778
|
+
constructor(upstreams = [], { factory: factory12 = defaultFactory, ...opts } = {}) {
|
|
444779
|
+
if (typeof factory12 !== "function") {
|
|
444725
444780
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444726
444781
|
}
|
|
444727
444782
|
super();
|
|
@@ -444733,7 +444788,7 @@ var require_balanced_pool = __commonJS({
|
|
|
444733
444788
|
if (!Array.isArray(upstreams)) {
|
|
444734
444789
|
upstreams = [upstreams];
|
|
444735
444790
|
}
|
|
444736
|
-
this[kFactory] =
|
|
444791
|
+
this[kFactory] = factory12;
|
|
444737
444792
|
for (const upstream of upstreams) {
|
|
444738
444793
|
this.addUpstream(upstream);
|
|
444739
444794
|
}
|
|
@@ -444857,7 +444912,7 @@ var require_round_robin_pool = __commonJS({
|
|
|
444857
444912
|
var RoundRobinPool = class extends PoolBase {
|
|
444858
444913
|
constructor(origin2, {
|
|
444859
444914
|
connections,
|
|
444860
|
-
factory:
|
|
444915
|
+
factory: factory12 = defaultFactory,
|
|
444861
444916
|
connect,
|
|
444862
444917
|
connectTimeout,
|
|
444863
444918
|
tls,
|
|
@@ -444872,7 +444927,7 @@ var require_round_robin_pool = __commonJS({
|
|
|
444872
444927
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
|
444873
444928
|
throw new InvalidArgumentError2("invalid connections");
|
|
444874
444929
|
}
|
|
444875
|
-
if (typeof
|
|
444930
|
+
if (typeof factory12 !== "function") {
|
|
444876
444931
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444877
444932
|
}
|
|
444878
444933
|
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
@@ -444894,7 +444949,7 @@ var require_round_robin_pool = __commonJS({
|
|
|
444894
444949
|
this[kUrl] = util5.parseOrigin(origin2);
|
|
444895
444950
|
this[kOptions] = { ...util5.deepClone(options8), connect, allowH2, clientTtl };
|
|
444896
444951
|
this[kOptions].interceptors = options8.interceptors ? { ...options8.interceptors } : void 0;
|
|
444897
|
-
this[kFactory] =
|
|
444952
|
+
this[kFactory] = factory12;
|
|
444898
444953
|
this[kIndex] = -1;
|
|
444899
444954
|
this.on("connect", (origin3, targets) => {
|
|
444900
444955
|
if (clientTtl != null && clientTtl > 0) {
|
|
@@ -444967,8 +445022,8 @@ var require_agent4 = __commonJS({
|
|
|
444967
445022
|
return opts && opts.connections === 1 ? new Client2(origin2, opts) : new Pool(origin2, opts);
|
|
444968
445023
|
}
|
|
444969
445024
|
var Agent3 = class extends DispatcherBase {
|
|
444970
|
-
constructor({ factory:
|
|
444971
|
-
if (typeof
|
|
445025
|
+
constructor({ factory: factory12 = defaultFactory, maxOrigins = Infinity, connect, ...options8 } = {}) {
|
|
445026
|
+
if (typeof factory12 !== "function") {
|
|
444972
445027
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444973
445028
|
}
|
|
444974
445029
|
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
@@ -444982,7 +445037,7 @@ var require_agent4 = __commonJS({
|
|
|
444982
445037
|
connect = { ...connect };
|
|
444983
445038
|
}
|
|
444984
445039
|
this[kOptions] = { ...util5.deepClone(options8), maxOrigins, connect };
|
|
444985
|
-
this[kFactory] =
|
|
445040
|
+
this[kFactory] = factory12;
|
|
444986
445041
|
this[kClients] = /* @__PURE__ */ new Map();
|
|
444987
445042
|
this[kOrigins] = /* @__PURE__ */ new Set();
|
|
444988
445043
|
this[kOnDrain] = (origin2, targets) => {
|
|
@@ -445113,14 +445168,14 @@ var require_proxy_agent = __commonJS({
|
|
|
445113
445168
|
}
|
|
445114
445169
|
var Http1ProxyWrapper = class extends DispatcherBase {
|
|
445115
445170
|
#client;
|
|
445116
|
-
constructor(proxyUrl, { headers = {}, connect, factory:
|
|
445171
|
+
constructor(proxyUrl, { headers = {}, connect, factory: factory12 }) {
|
|
445117
445172
|
if (!proxyUrl) {
|
|
445118
445173
|
throw new InvalidArgumentError2("Proxy URL is mandatory");
|
|
445119
445174
|
}
|
|
445120
445175
|
super();
|
|
445121
445176
|
this[kProxyHeaders] = headers;
|
|
445122
|
-
if (
|
|
445123
|
-
this.#client =
|
|
445177
|
+
if (factory12) {
|
|
445178
|
+
this.#client = factory12(proxyUrl, { connect });
|
|
445124
445179
|
} else {
|
|
445125
445180
|
this.#client = new Client2(proxyUrl, { connect });
|
|
445126
445181
|
}
|
|
@@ -445186,7 +445241,7 @@ var require_proxy_agent = __commonJS({
|
|
|
445186
445241
|
const connect = buildConnector({ ...opts.proxyTls });
|
|
445187
445242
|
this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
|
|
445188
445243
|
const agentFactory = opts.factory || defaultAgentFactory;
|
|
445189
|
-
const
|
|
445244
|
+
const factory12 = (origin3, options8) => {
|
|
445190
445245
|
const { protocol: protocol2 } = new URL(origin3);
|
|
445191
445246
|
if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") {
|
|
445192
445247
|
return new Http1ProxyWrapper(this[kProxy].uri, {
|
|
@@ -445200,7 +445255,7 @@ var require_proxy_agent = __commonJS({
|
|
|
445200
445255
|
this[kClient] = clientFactory(url4, { connect });
|
|
445201
445256
|
this[kAgent] = new Agent3({
|
|
445202
445257
|
...opts,
|
|
445203
|
-
factory:
|
|
445258
|
+
factory: factory12,
|
|
445204
445259
|
connect: async (opts2, callback) => {
|
|
445205
445260
|
let requestedPath = opts2.host;
|
|
445206
445261
|
if (!opts2.port) {
|
|
@@ -446477,7 +446532,7 @@ var require_api_stream = __commonJS({
|
|
|
446477
446532
|
function noop7() {
|
|
446478
446533
|
}
|
|
446479
446534
|
var StreamHandler = class extends AsyncResource {
|
|
446480
|
-
constructor(opts,
|
|
446535
|
+
constructor(opts, factory12, callback) {
|
|
446481
446536
|
if (!opts || typeof opts !== "object") {
|
|
446482
446537
|
throw new InvalidArgumentError2("invalid opts");
|
|
446483
446538
|
}
|
|
@@ -446486,7 +446541,7 @@ var require_api_stream = __commonJS({
|
|
|
446486
446541
|
if (typeof callback !== "function") {
|
|
446487
446542
|
throw new InvalidArgumentError2("invalid callback");
|
|
446488
446543
|
}
|
|
446489
|
-
if (typeof
|
|
446544
|
+
if (typeof factory12 !== "function") {
|
|
446490
446545
|
throw new InvalidArgumentError2("invalid factory");
|
|
446491
446546
|
}
|
|
446492
446547
|
if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
|
|
@@ -446507,7 +446562,7 @@ var require_api_stream = __commonJS({
|
|
|
446507
446562
|
}
|
|
446508
446563
|
this.responseHeaders = responseHeaders || null;
|
|
446509
446564
|
this.opaque = opaque || null;
|
|
446510
|
-
this.factory =
|
|
446565
|
+
this.factory = factory12;
|
|
446511
446566
|
this.callback = callback;
|
|
446512
446567
|
this.res = null;
|
|
446513
446568
|
this.abort = null;
|
|
@@ -446532,7 +446587,7 @@ var require_api_stream = __commonJS({
|
|
|
446532
446587
|
this.context = context;
|
|
446533
446588
|
}
|
|
446534
446589
|
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
|
446535
|
-
const { factory:
|
|
446590
|
+
const { factory: factory12, opaque, context, responseHeaders } = this;
|
|
446536
446591
|
const headers = responseHeaders === "raw" ? util5.parseRawHeaders(rawHeaders) : util5.parseHeaders(rawHeaders);
|
|
446537
446592
|
if (statusCode < 200) {
|
|
446538
446593
|
if (this.onInfo) {
|
|
@@ -446541,10 +446596,10 @@ var require_api_stream = __commonJS({
|
|
|
446541
446596
|
return;
|
|
446542
446597
|
}
|
|
446543
446598
|
this.factory = null;
|
|
446544
|
-
if (
|
|
446599
|
+
if (factory12 === null) {
|
|
446545
446600
|
return;
|
|
446546
446601
|
}
|
|
446547
|
-
const res = this.runInAsyncScope(
|
|
446602
|
+
const res = this.runInAsyncScope(factory12, null, {
|
|
446548
446603
|
statusCode,
|
|
446549
446604
|
headers,
|
|
446550
446605
|
opaque,
|
|
@@ -446602,16 +446657,16 @@ var require_api_stream = __commonJS({
|
|
|
446602
446657
|
}
|
|
446603
446658
|
}
|
|
446604
446659
|
};
|
|
446605
|
-
function stream5(opts,
|
|
446660
|
+
function stream5(opts, factory12, callback) {
|
|
446606
446661
|
if (callback === void 0) {
|
|
446607
446662
|
return new Promise((resolve9, reject) => {
|
|
446608
|
-
stream5.call(this, opts,
|
|
446663
|
+
stream5.call(this, opts, factory12, (err, data3) => {
|
|
446609
446664
|
return err ? reject(err) : resolve9(data3);
|
|
446610
446665
|
});
|
|
446611
446666
|
});
|
|
446612
446667
|
}
|
|
446613
446668
|
try {
|
|
446614
|
-
const handler = new StreamHandler(opts,
|
|
446669
|
+
const handler = new StreamHandler(opts, factory12, callback);
|
|
446615
446670
|
this.dispatch(opts, handler);
|
|
446616
446671
|
} catch (err) {
|
|
446617
446672
|
if (typeof callback !== "function") {
|
|
@@ -483969,10 +484024,10 @@ var require_full = __commonJS({
|
|
|
483969
484024
|
const externalDependencies = [];
|
|
483970
484025
|
let item = value2;
|
|
483971
484026
|
if (typeof value2 === "function") {
|
|
483972
|
-
const
|
|
484027
|
+
const factory12 = (0, _async.maybeAsync)(value2, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
|
|
483973
484028
|
const api = Object.assign({}, context, apiFactory(cache3, externalDependencies));
|
|
483974
484029
|
try {
|
|
483975
|
-
item = yield*
|
|
484030
|
+
item = yield* factory12(api, options8, dirname19);
|
|
483976
484031
|
} catch (e) {
|
|
483977
484032
|
if (alias) {
|
|
483978
484033
|
e.message += ` (While processing: ${JSON.stringify(alias)})`;
|
|
@@ -485188,8 +485243,8 @@ var require_normalize_file = __commonJS({
|
|
|
485188
485243
|
var require_remapping_umd = __commonJS({
|
|
485189
485244
|
"../../../../node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping/dist/remapping.umd.js"(exports2, module2) {
|
|
485190
485245
|
init_cjs_shims();
|
|
485191
|
-
(function(global2,
|
|
485192
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports =
|
|
485246
|
+
(function(global2, factory12) {
|
|
485247
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory12(require_trace_mapping_umd(), require_gen_mapping_umd()) : typeof define === "function" && define.amd ? define(["@jridgewell/trace-mapping", "@jridgewell/gen-mapping"], factory12) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.remapping = factory12(global2.traceMapping, global2.genMapping));
|
|
485193
485248
|
})(exports2, (function(traceMapping, genMapping) {
|
|
485194
485249
|
"use strict";
|
|
485195
485250
|
const SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
|
|
@@ -511693,7 +511748,7 @@ var require_axios = __commonJS({
|
|
|
511693
511748
|
return false;
|
|
511694
511749
|
}
|
|
511695
511750
|
};
|
|
511696
|
-
var
|
|
511751
|
+
var factory12 = (env2) => {
|
|
511697
511752
|
env2 = utils$1.merge.call({
|
|
511698
511753
|
skipUndefined: true
|
|
511699
511754
|
}, globalFetchAPI2, env2);
|
|
@@ -511877,7 +511932,7 @@ var require_axios = __commonJS({
|
|
|
511877
511932
|
while (i--) {
|
|
511878
511933
|
seed = seeds[i];
|
|
511879
511934
|
target = map3.get(seed);
|
|
511880
|
-
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() :
|
|
511935
|
+
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() : factory12(env2));
|
|
511881
511936
|
map3 = target;
|
|
511882
511937
|
}
|
|
511883
511938
|
return target;
|
|
@@ -520524,7 +520579,7 @@ init_cjs_shims();
|
|
|
520524
520579
|
// ../sdk/package.json
|
|
520525
520580
|
var package_default = {
|
|
520526
520581
|
name: "@superblocksteam/sdk",
|
|
520527
|
-
version: "2.0.
|
|
520582
|
+
version: "2.0.110-next.1",
|
|
520528
520583
|
description: "Superblocks JS SDK",
|
|
520529
520584
|
homepage: "https://www.superblocks.com",
|
|
520530
520585
|
license: "Superblocks Community Software License",
|
|
@@ -520878,7 +520933,7 @@ var config = void 0;
|
|
|
520878
520933
|
var configured = false;
|
|
520879
520934
|
var ddTracePromise = void 0;
|
|
520880
520935
|
async function getDdTrace() {
|
|
520881
|
-
ddTracePromise ??= import("./dd-trace-
|
|
520936
|
+
ddTracePromise ??= import("./dd-trace-3SG4HWF4.js").then((module2) => module2.default);
|
|
520882
520937
|
return await ddTracePromise;
|
|
520883
520938
|
}
|
|
520884
520939
|
var deploymentType = (() => {
|
|
@@ -524919,7 +524974,7 @@ init_cjs_shims();
|
|
|
524919
524974
|
|
|
524920
524975
|
// ../../../vite-plugin-file-sync/dist/ai-service/index.js
|
|
524921
524976
|
init_cjs_shims();
|
|
524922
|
-
var
|
|
524977
|
+
var import_ai17 = __toESM(require_dist9(), 1);
|
|
524923
524978
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
524924
524979
|
import os5 from "node:os";
|
|
524925
524980
|
import path51 from "node:path";
|
|
@@ -529014,11 +529069,12 @@ var AiEntityType;
|
|
|
529014
529069
|
AiEntityType2["BLOCK"] = "block";
|
|
529015
529070
|
})(AiEntityType || (AiEntityType = {}));
|
|
529016
529071
|
var MODEL_CAPABILITIES = {
|
|
529017
|
-
"claude-
|
|
529018
|
-
"claude-sonnet-4-6": { maxOutputTokens: 128e3 },
|
|
529072
|
+
"claude-haiku-4-5": { maxOutputTokens: 64e3 },
|
|
529019
529073
|
"claude-opus-4-5": { maxOutputTokens: 64e3 },
|
|
529020
529074
|
"claude-opus-4-6": { maxOutputTokens: 128e3 },
|
|
529021
|
-
"claude-
|
|
529075
|
+
"claude-opus-4-7": { maxOutputTokens: 128e3 },
|
|
529076
|
+
"claude-sonnet-4-5": { maxOutputTokens: 64e3 },
|
|
529077
|
+
"claude-sonnet-4-6": { maxOutputTokens: 128e3 }
|
|
529022
529078
|
};
|
|
529023
529079
|
var MAX_OUTPUT_TOKENS = 48e3;
|
|
529024
529080
|
var DEFAULT_CONTEXT_OPTIONS_V2 = {
|
|
@@ -529048,6 +529104,83 @@ var EXCLUDED_MESSAGE_TYPES = [
|
|
|
529048
529104
|
"commitRestoring",
|
|
529049
529105
|
"git_setup_required"
|
|
529050
529106
|
];
|
|
529107
|
+
var NEXT_STEPS_ICON_NAMES = [
|
|
529108
|
+
"alert-triangle",
|
|
529109
|
+
"arrow-right-left",
|
|
529110
|
+
"arrow-up-down",
|
|
529111
|
+
"bar-chart-3",
|
|
529112
|
+
"bell",
|
|
529113
|
+
"bookmark",
|
|
529114
|
+
"calendar",
|
|
529115
|
+
"check",
|
|
529116
|
+
"check-circle",
|
|
529117
|
+
"circle-user",
|
|
529118
|
+
"clipboard",
|
|
529119
|
+
"clock",
|
|
529120
|
+
"cloud",
|
|
529121
|
+
"code",
|
|
529122
|
+
"copy",
|
|
529123
|
+
"database",
|
|
529124
|
+
"download",
|
|
529125
|
+
"external-link",
|
|
529126
|
+
"eye",
|
|
529127
|
+
"file-down",
|
|
529128
|
+
"file-plus",
|
|
529129
|
+
"file-text",
|
|
529130
|
+
"filter",
|
|
529131
|
+
"folder",
|
|
529132
|
+
"git-branch",
|
|
529133
|
+
"globe",
|
|
529134
|
+
"grip-vertical",
|
|
529135
|
+
"hard-drive",
|
|
529136
|
+
"heart",
|
|
529137
|
+
"home",
|
|
529138
|
+
"image",
|
|
529139
|
+
"info",
|
|
529140
|
+
"key",
|
|
529141
|
+
"layers",
|
|
529142
|
+
"layout-grid",
|
|
529143
|
+
"line-chart",
|
|
529144
|
+
"link",
|
|
529145
|
+
"list",
|
|
529146
|
+
"lock",
|
|
529147
|
+
"log-out",
|
|
529148
|
+
"mail",
|
|
529149
|
+
"map",
|
|
529150
|
+
"message-square",
|
|
529151
|
+
"monitor",
|
|
529152
|
+
"moon",
|
|
529153
|
+
"package",
|
|
529154
|
+
"palette",
|
|
529155
|
+
"pencil",
|
|
529156
|
+
"pie-chart",
|
|
529157
|
+
"plus",
|
|
529158
|
+
"printer",
|
|
529159
|
+
"puzzle",
|
|
529160
|
+
"refresh-cw",
|
|
529161
|
+
"repeat",
|
|
529162
|
+
"rocket",
|
|
529163
|
+
"save",
|
|
529164
|
+
"search",
|
|
529165
|
+
"server",
|
|
529166
|
+
"settings",
|
|
529167
|
+
"share-2",
|
|
529168
|
+
"shield",
|
|
529169
|
+
"sliders",
|
|
529170
|
+
"smartphone",
|
|
529171
|
+
"sparkles",
|
|
529172
|
+
"star",
|
|
529173
|
+
"table",
|
|
529174
|
+
"tag",
|
|
529175
|
+
"thumbs-up",
|
|
529176
|
+
"toggle-left",
|
|
529177
|
+
"trash-2",
|
|
529178
|
+
"upload",
|
|
529179
|
+
"user-plus",
|
|
529180
|
+
"users",
|
|
529181
|
+
"wand-2",
|
|
529182
|
+
"zap"
|
|
529183
|
+
];
|
|
529051
529184
|
var DEFAULT_ATTACHMENT_FILE_NAME = "Attachment";
|
|
529052
529185
|
function fallbackFileNameForImageMime(mtLower) {
|
|
529053
529186
|
const match2 = /^image\/([^;\s]+)/i.exec(mtLower);
|
|
@@ -529273,10 +529406,10 @@ var PermissionLevel;
|
|
|
529273
529406
|
PermissionLevel2["PROMPT"] = "prompt";
|
|
529274
529407
|
PermissionLevel2["BLOCK"] = "block";
|
|
529275
529408
|
})(PermissionLevel || (PermissionLevel = {}));
|
|
529276
|
-
function createToolFactory(name17,
|
|
529409
|
+
function createToolFactory(name17, factory12) {
|
|
529277
529410
|
return {
|
|
529278
529411
|
name: name17,
|
|
529279
|
-
create: (deps) => ({ ...
|
|
529412
|
+
create: (deps) => ({ ...factory12(deps), name: name17 })
|
|
529280
529413
|
};
|
|
529281
529414
|
}
|
|
529282
529415
|
var ToolExecutionError = class _ToolExecutionError extends Error {
|
|
@@ -529762,6 +529895,9 @@ function getTotalInputTokens(usage) {
|
|
|
529762
529895
|
}
|
|
529763
529896
|
return usage.inputTokens ?? nonCached;
|
|
529764
529897
|
}
|
|
529898
|
+
function computeContextUsed(usage) {
|
|
529899
|
+
return getTotalInputTokens(usage);
|
|
529900
|
+
}
|
|
529765
529901
|
function getTotalTokens(usage) {
|
|
529766
529902
|
const recomputedTotal = getTotalInputTokens(usage) + (usage.outputTokens ?? 0);
|
|
529767
529903
|
const hasDetailedBreakdown = usage.inputTokenDetails?.noCacheTokens !== void 0 || usage.inputTokenDetails?.cacheReadTokens !== void 0 || usage.inputTokenDetails?.cacheWriteTokens !== void 0;
|
|
@@ -529823,15 +529959,59 @@ function getActiveContext(clark, services) {
|
|
|
529823
529959
|
|
|
529824
529960
|
// ../../../vite-plugin-file-sync/dist/ai-service/util/llm-config-utils.js
|
|
529825
529961
|
init_cjs_shims();
|
|
529962
|
+
var INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-14";
|
|
529963
|
+
var EFFORT_BETA = "effort-2025-11-24";
|
|
529964
|
+
var ADAPTIVE_EFFORT_MODELS = /* @__PURE__ */ new Set(["claude-opus-4-7"]);
|
|
529965
|
+
var HARDCODED_EFFORT = "high";
|
|
529966
|
+
function usesAdaptiveEffort(coreModel) {
|
|
529967
|
+
return coreModel !== void 0 && ADAPTIVE_EFFORT_MODELS.has(coreModel);
|
|
529968
|
+
}
|
|
529969
|
+
function buildThinkingProviderOptions(coreModel, params) {
|
|
529970
|
+
const { thinkingEnabled, thinkingBudgetTokens, interleavedThinking } = params;
|
|
529971
|
+
if (usesAdaptiveEffort(coreModel)) {
|
|
529972
|
+
const anthropic3 = {
|
|
529973
|
+
thinking: { type: "adaptive", display: "summarized" },
|
|
529974
|
+
effort: HARDCODED_EFFORT
|
|
529975
|
+
};
|
|
529976
|
+
const bedrockBetas = [EFFORT_BETA];
|
|
529977
|
+
if (interleavedThinking) {
|
|
529978
|
+
bedrockBetas.push(INTERLEAVED_THINKING_BETA);
|
|
529979
|
+
}
|
|
529980
|
+
const bedrock2 = {
|
|
529981
|
+
additionalModelRequestFields: {
|
|
529982
|
+
thinking: { type: "adaptive", display: "summarized" },
|
|
529983
|
+
output_config: { effort: HARDCODED_EFFORT },
|
|
529984
|
+
anthropic_beta: bedrockBetas
|
|
529985
|
+
}
|
|
529986
|
+
};
|
|
529987
|
+
const headers2 = interleavedThinking ? { "anthropic-beta": INTERLEAVED_THINKING_BETA } : {};
|
|
529988
|
+
return { anthropic: anthropic3, bedrock: bedrock2, headers: headers2 };
|
|
529989
|
+
}
|
|
529990
|
+
if (!thinkingEnabled) {
|
|
529991
|
+
return { headers: {} };
|
|
529992
|
+
}
|
|
529993
|
+
const anthropic2 = {
|
|
529994
|
+
thinking: { type: "enabled", budgetTokens: thinkingBudgetTokens }
|
|
529995
|
+
};
|
|
529996
|
+
const bedrock = {
|
|
529997
|
+
additionalModelRequestFields: {
|
|
529998
|
+
thinking: { type: "enabled", budget_tokens: thinkingBudgetTokens },
|
|
529999
|
+
anthropic_beta: [INTERLEAVED_THINKING_BETA]
|
|
530000
|
+
}
|
|
530001
|
+
};
|
|
530002
|
+
const headers = interleavedThinking ? { "anthropic-beta": INTERLEAVED_THINKING_BETA } : {};
|
|
530003
|
+
return { anthropic: anthropic2, bedrock, headers };
|
|
530004
|
+
}
|
|
529826
530005
|
function processLLMConfig(llmConfig, defaultBudgetTokens = 5e3, logContext) {
|
|
529827
530006
|
const logger15 = getLogger3();
|
|
529828
530007
|
const thinkingEnabled = llmConfig?.thinkingEnabled ?? true;
|
|
529829
530008
|
let thinkingBudgetTokens = llmConfig?.thinkingBudgetTokens ? parseInt(llmConfig.thinkingBudgetTokens) : defaultBudgetTokens;
|
|
529830
530009
|
const interleavedThinking = llmConfig?.interleavedThinking ?? true;
|
|
529831
530010
|
const maxOutputTokens = MAX_OUTPUT_TOKENS;
|
|
529832
|
-
|
|
529833
|
-
|
|
529834
|
-
const
|
|
530011
|
+
const coreModel = llmConfig?.coreModel;
|
|
530012
|
+
if (thinkingEnabled && !usesAdaptiveEffort(coreModel)) {
|
|
530013
|
+
const modelKey = coreModel ?? "claude-sonnet-4-5";
|
|
530014
|
+
const modelCaps = MODEL_CAPABILITIES[modelKey];
|
|
529835
530015
|
const modelMaxOutput = modelCaps?.maxOutputTokens ?? 64e3;
|
|
529836
530016
|
const total = maxOutputTokens + thinkingBudgetTokens;
|
|
529837
530017
|
if (total > modelMaxOutput) {
|
|
@@ -529841,29 +530021,24 @@ function processLLMConfig(llmConfig, defaultBudgetTokens = 5e3, logContext) {
|
|
|
529841
530021
|
}
|
|
529842
530022
|
}
|
|
529843
530023
|
if (logContext) {
|
|
529844
|
-
getLogger3().info(`${logContext} LLM Provider Config: provider=${llmConfig?.provider || "bedrock (default)"}, thinking=${thinkingEnabled}, budget=${thinkingBudgetTokens}, interleaved=${interleavedThinking}`);
|
|
530024
|
+
getLogger3().info(`${logContext} LLM Provider Config: provider=${llmConfig?.provider || "bedrock (default)"}, coreModel=${coreModel ?? "unset"}, thinking=${thinkingEnabled}, budget=${thinkingBudgetTokens}, interleaved=${interleavedThinking}`);
|
|
529845
530025
|
}
|
|
529846
|
-
const
|
|
529847
|
-
|
|
529848
|
-
|
|
529849
|
-
|
|
529850
|
-
|
|
529851
|
-
|
|
529852
|
-
|
|
529853
|
-
|
|
529854
|
-
}
|
|
529855
|
-
}
|
|
530026
|
+
const thinkingOptions = buildThinkingProviderOptions(coreModel, {
|
|
530027
|
+
thinkingEnabled,
|
|
530028
|
+
thinkingBudgetTokens,
|
|
530029
|
+
interleavedThinking
|
|
530030
|
+
});
|
|
530031
|
+
const providerOptions = thinkingOptions.anthropic && thinkingOptions.bedrock ? {
|
|
530032
|
+
anthropic: thinkingOptions.anthropic,
|
|
530033
|
+
bedrock: thinkingOptions.bedrock
|
|
529856
530034
|
} : void 0;
|
|
529857
|
-
const headers = thinkingEnabled && interleavedThinking ? {
|
|
529858
|
-
"anthropic-beta": "interleaved-thinking-2025-05-14"
|
|
529859
|
-
} : {};
|
|
529860
530035
|
return {
|
|
529861
530036
|
thinkingEnabled,
|
|
529862
530037
|
thinkingBudgetTokens,
|
|
529863
530038
|
interleavedThinking,
|
|
529864
530039
|
maxOutputTokens,
|
|
529865
530040
|
providerOptions,
|
|
529866
|
-
headers
|
|
530041
|
+
headers: thinkingOptions.headers
|
|
529867
530042
|
};
|
|
529868
530043
|
}
|
|
529869
530044
|
|
|
@@ -529934,7 +530109,7 @@ var sendInteractiveMessageChannel = (clark, chatSessionStore) => {
|
|
|
529934
530109
|
};
|
|
529935
530110
|
var sendUserMessageChannel = (clark, chatSessionStore) => {
|
|
529936
530111
|
const queue = peerQueue(clark);
|
|
529937
|
-
return async (payload, delay3 = 0, immediate = false) => {
|
|
530112
|
+
return async (payload, delay3 = 0, immediate = false, { persistBeforeDeliver = false } = {}) => {
|
|
529938
530113
|
const messageId = payload.id ?? crypto.randomUUID();
|
|
529939
530114
|
const payloadWithId = { ...payload, id: messageId };
|
|
529940
530115
|
if (immediate) {
|
|
@@ -529946,7 +530121,15 @@ var sendUserMessageChannel = (clark, chatSessionStore) => {
|
|
|
529946
530121
|
return clark.context.peer.call.aiPushMessage(payloadWithId);
|
|
529947
530122
|
}
|
|
529948
530123
|
return queue(async () => {
|
|
529949
|
-
|
|
530124
|
+
if (persistBeforeDeliver) {
|
|
530125
|
+
try {
|
|
530126
|
+
await chatSessionStore.recordAssistant(payloadWithId);
|
|
530127
|
+
} catch (err) {
|
|
530128
|
+
getLogger3().warn(`[ai-service] recordAssistant failed; continuing with peer delivery. type=${payloadWithId.type}`, err);
|
|
530129
|
+
}
|
|
530130
|
+
} else {
|
|
530131
|
+
void chatSessionStore.recordAssistant(payloadWithId);
|
|
530132
|
+
}
|
|
529950
530133
|
if (!clark.context.peer) {
|
|
529951
530134
|
getLogger3().warn(`[ai-service] Cannot send message: no peer. type=${payloadWithId.type}, state=${clark.state}`);
|
|
529952
530135
|
return;
|
|
@@ -530026,7 +530209,7 @@ var MAX_ATTRIBUTE_LENGTH = 64e3;
|
|
|
530026
530209
|
var LLMObsSpanWriter = null;
|
|
530027
530210
|
async function loadLLMObsSpanWriter() {
|
|
530028
530211
|
if (!LLMObsSpanWriter) {
|
|
530029
|
-
const module2 = await import("./spans-
|
|
530212
|
+
const module2 = await import("./spans-WMJ44MKH.js");
|
|
530030
530213
|
LLMObsSpanWriter = module2.default;
|
|
530031
530214
|
}
|
|
530032
530215
|
return LLMObsSpanWriter;
|
|
@@ -531280,7 +531463,7 @@ var Clark = class _Clark extends TracedFSM {
|
|
|
531280
531463
|
async streamText(services, options8) {
|
|
531281
531464
|
const { model: providedModel, context: contextConfig, logging: loggingConfig, enableFallback: enableFallbackOverride, ...streamOptions } = options8;
|
|
531282
531465
|
const model = providedModel ?? services.llmProvider.modelForTask("generateBroadEdit");
|
|
531283
|
-
const { thinkingEnabled, thinkingBudgetTokens, maxOutputTokens, headers, providerOptions } = processLLMConfig(this.context.llmConfig);
|
|
531466
|
+
const { thinkingEnabled, thinkingBudgetTokens, interleavedThinking, maxOutputTokens, headers, providerOptions } = processLLMConfig(this.context.llmConfig);
|
|
531284
531467
|
const logging = loggingConfig !== false ? {
|
|
531285
531468
|
conversationId: loggingConfig?.conversationId ?? String(Date.now()),
|
|
531286
531469
|
runTimestamp: this.context.runTimestamp || (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -531352,6 +531535,11 @@ var Clark = class _Clark extends TracedFSM {
|
|
|
531352
531535
|
logging,
|
|
531353
531536
|
retry: streamOptions.retry,
|
|
531354
531537
|
providerConfig,
|
|
531538
|
+
thinking: {
|
|
531539
|
+
enabled: thinkingEnabled,
|
|
531540
|
+
budgetTokens: thinkingBudgetTokens,
|
|
531541
|
+
interleaved: interleavedThinking
|
|
531542
|
+
},
|
|
531355
531543
|
enableFallback,
|
|
531356
531544
|
fallbackStrategy,
|
|
531357
531545
|
peer: this.context.peer,
|
|
@@ -531412,8 +531600,7 @@ var Clark = class _Clark extends TracedFSM {
|
|
|
531412
531600
|
}
|
|
531413
531601
|
}
|
|
531414
531602
|
pushContextUsed(usage) {
|
|
531415
|
-
const
|
|
531416
|
-
const contextUsed = normalizedInputTokens + (usage.reasoningTokens ?? 0) + (usage.outputTokens ?? 0);
|
|
531603
|
+
const contextUsed = computeContextUsed(usage);
|
|
531417
531604
|
const formatTokens = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : `${n}`;
|
|
531418
531605
|
this.logger.info(`Context used: ${formatTokens(contextUsed)} tokens`);
|
|
531419
531606
|
void this.context.peer?.call.aiPushContextUsed({ contextUsed }).catch((err) => {
|
|
@@ -561978,17 +562165,17 @@ var ToolRegistry = class {
|
|
|
561978
562165
|
* @param deps - Optional dependencies to instantiate the tool immediately
|
|
561979
562166
|
* @throws Error if tool with same name already registered
|
|
561980
562167
|
*/
|
|
561981
|
-
register(
|
|
561982
|
-
if (this.factories.has(
|
|
561983
|
-
throw new Error(`Tool "${
|
|
562168
|
+
register(factory12, deps) {
|
|
562169
|
+
if (this.factories.has(factory12.name) || this.instances.has(factory12.name)) {
|
|
562170
|
+
throw new Error(`Tool "${factory12.name}" already registered`);
|
|
561984
562171
|
}
|
|
561985
|
-
this.factories.set(
|
|
562172
|
+
this.factories.set(factory12.name, factory12);
|
|
561986
562173
|
if (deps !== void 0) {
|
|
561987
|
-
const instance3 =
|
|
561988
|
-
if (instance3.name !==
|
|
561989
|
-
throw new Error(`Tool name mismatch: factory.name="${
|
|
562174
|
+
const instance3 = factory12.create(deps);
|
|
562175
|
+
if (instance3.name !== factory12.name) {
|
|
562176
|
+
throw new Error(`Tool name mismatch: factory.name="${factory12.name}" but tool.name="${instance3.name}"`);
|
|
561990
562177
|
}
|
|
561991
|
-
this.instances.set(
|
|
562178
|
+
this.instances.set(factory12.name, instance3);
|
|
561992
562179
|
}
|
|
561993
562180
|
}
|
|
561994
562181
|
/**
|
|
@@ -562020,8 +562207,8 @@ var ToolRegistry = class {
|
|
|
562020
562207
|
* @param factories - Array of tool factories to register
|
|
562021
562208
|
*/
|
|
562022
562209
|
registerAll(factories) {
|
|
562023
|
-
for (const
|
|
562024
|
-
this.register(
|
|
562210
|
+
for (const factory12 of factories) {
|
|
562211
|
+
this.register(factory12);
|
|
562025
562212
|
}
|
|
562026
562213
|
}
|
|
562027
562214
|
/**
|
|
@@ -565846,43 +566033,63 @@ const ProductsPage = () => {
|
|
|
565846
566033
|
|
|
565847
566034
|
### Loading States
|
|
565848
566035
|
|
|
565849
|
-
|
|
566036
|
+
Loading behavior must differ based on whether data has already been fetched:
|
|
566037
|
+
|
|
566038
|
+
**Initial load (no data yet):** Show skeleton shimmers that mirror the shape of the final content. Never show a blank screen or a generic spinner.
|
|
565850
566039
|
|
|
565851
|
-
**
|
|
566040
|
+
**Refetch / background refresh (data already exists):** Keep showing the existing data. Use \`fetching\` from \`useApiData\` to apply a subtle visual indicator: light opacity (e.g. \`opacity-70\`) to signal a refresh is in progress, plus a non-blocking label such as a small inline spinner, a thin progress bar, or an "Updating\u2026" label. **Do not** use \`pointer-events-none\` or otherwise disable the content \u2014 it must remain fully interactive during refetch.
|
|
566041
|
+
|
|
566042
|
+
Use \`loading\` and \`fetching\` from \`useApiData\` to distinguish these states:
|
|
565852
566043
|
|
|
565853
566044
|
\`\`\`tsx
|
|
565854
|
-
// \u2705 CORRECT \u2014 skeleton for first load, overlay for refetch
|
|
565855
566045
|
const { data, loading, fetching, isError, error } = useApiData("GetOrders", {
|
|
565856
566046
|
status: statusFilter,
|
|
565857
566047
|
search,
|
|
565858
566048
|
});
|
|
565859
566049
|
|
|
565860
|
-
|
|
566050
|
+
// Initial load \u2014 no data yet \u2192 show skeleton placeholder
|
|
566051
|
+
if (loading) {
|
|
566052
|
+
return <OrderTableSkeleton />;
|
|
566053
|
+
}
|
|
566054
|
+
|
|
565861
566055
|
if (isError) return <ErrorBanner error={error} />;
|
|
566056
|
+
|
|
566057
|
+
// Refetch \u2014 data exists \u2192 subtle opacity + indicator, table stays interactive
|
|
565862
566058
|
return (
|
|
565863
|
-
<div
|
|
565864
|
-
<
|
|
566059
|
+
<div>
|
|
566060
|
+
{fetching && <div className="text-xs text-muted-foreground">Updating\u2026</div>}
|
|
566061
|
+
<div className={fetching ? "opacity-70" : ""}>
|
|
566062
|
+
<OrderTable orders={data.orders} />
|
|
566063
|
+
</div>
|
|
565865
566064
|
</div>
|
|
565866
566065
|
);
|
|
565867
566066
|
\`\`\`
|
|
565868
566067
|
|
|
565869
566068
|
\`\`\`tsx
|
|
565870
|
-
// \u274C WRONG \u2014
|
|
565871
|
-
|
|
565872
|
-
|
|
565873
|
-
|
|
565874
|
-
|
|
566069
|
+
// \u274C WRONG \u2014 pointer-events-none disables the table, making it feel broken
|
|
566070
|
+
return (
|
|
566071
|
+
<div className={fetching ? "pointer-events-none" : ""}>
|
|
566072
|
+
<OrderTable orders={data.orders} />
|
|
566073
|
+
</div>
|
|
566074
|
+
);
|
|
565875
566075
|
|
|
566076
|
+
// \u274C WRONG \u2014 no loading feedback when filters change
|
|
565876
566077
|
if (loading) return <Skeleton />;
|
|
565877
566078
|
return <OrderTable orders={data.orders} />;
|
|
565878
566079
|
\`\`\`
|
|
565879
566080
|
|
|
566081
|
+
#### Table Loading Rules
|
|
566082
|
+
|
|
566083
|
+
- **Do not** use \`pointer-events-none\` on a table during loading \u2014 this disables interaction and makes the UI feel broken. During refetch, apply a subtle opacity (e.g. \`opacity-70\`) plus a non-blocking indicator (e.g., an "Updating\u2026" label or a thin progress bar). The table must remain clickable, sortable, and scrollable.
|
|
566084
|
+
- **Do not** replace a populated table with a full skeleton on refetch \u2014 this causes disorienting content flashes.
|
|
566085
|
+
- **Skeleton tables are only for initial load** (\`loading\` is true) when there is no data to display yet. Build them to match the real table's column structure (header + a few placeholder rows).
|
|
566086
|
+
|
|
565880
566087
|
### Efficient Loading Patterns
|
|
565881
566088
|
|
|
565882
|
-
1. **Always show loading indicators on refetch**: When inputs change (e.g. filters, search), show a visual
|
|
566089
|
+
1. **Always show loading indicators on refetch**: When inputs change (e.g. filters, search), show a non-blocking visual indicator while new data loads. Use \`fetching\` from \`useApiData\`.
|
|
565883
566090
|
2. **Loading State Hierarchy**:
|
|
565884
566091
|
- No data yet (\`loading\`) \u2192 Full skeleton placeholder
|
|
565885
|
-
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a
|
|
566092
|
+
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a subtle visual indicator: light opacity (e.g. \`opacity-70\`) plus a non-blocking label (e.g. "Updating\u2026" text, thin progress bar, inline spinner). Do not use \`pointer-events-none\` \u2014 the content must remain fully interactive.
|
|
565886
566093
|
- Error state (\`isError\`) \u2192 Show error with retry option, optionally keep stale data visible
|
|
565887
566094
|
3. **Debounce Rapid Requests**: Prevent multiple API calls in short succession
|
|
565888
566095
|
4. **Use useApiData for automatic refetching**: \`useApiData\` auto-refetches when inputs change and supports \`staleTime\`, \`refetchOnWindowFocus\`, \`refetchOnReconnect\`, \`refetchInterval\`, and \`retry\` options.
|
|
@@ -569092,6 +569299,15 @@ var ChatSessionStore = (() => {
|
|
|
569092
569299
|
responseToMessageId: typeof msg.responseToMessageId === "string" ? msg.responseToMessageId : void 0,
|
|
569093
569300
|
savedFacts: Array.isArray(msg.savedFacts) ? msg.savedFacts : void 0
|
|
569094
569301
|
};
|
|
569302
|
+
} else if (msg.type === "next_steps") {
|
|
569303
|
+
return {
|
|
569304
|
+
role: msg.role,
|
|
569305
|
+
content: msg.content,
|
|
569306
|
+
type: "next_steps",
|
|
569307
|
+
id: typeof msg.id === "string" ? msg.id : void 0,
|
|
569308
|
+
timestamp,
|
|
569309
|
+
nextSteps: Array.isArray(msg.nextSteps) ? msg.nextSteps : []
|
|
569310
|
+
};
|
|
569095
569311
|
}
|
|
569096
569312
|
const baseMessage = {
|
|
569097
569313
|
role: msg.role,
|
|
@@ -569521,6 +569737,15 @@ var ChatSessionStore = (() => {
|
|
|
569521
569737
|
responseToMessageId: payload.responseToMessageId,
|
|
569522
569738
|
savedFacts: payload.savedFacts
|
|
569523
569739
|
};
|
|
569740
|
+
} else if (payload.type === "next_steps") {
|
|
569741
|
+
message = {
|
|
569742
|
+
role: "assistant",
|
|
569743
|
+
content: payload.text,
|
|
569744
|
+
type: "next_steps",
|
|
569745
|
+
id: messageId,
|
|
569746
|
+
timestamp: Date.now(),
|
|
569747
|
+
nextSteps: payload.nextSteps ?? []
|
|
569748
|
+
};
|
|
569524
569749
|
} else {
|
|
569525
569750
|
message = {
|
|
569526
569751
|
role: "assistant",
|
|
@@ -584057,6 +584282,13 @@ var ClarkChatLanguageModel = class {
|
|
|
584057
584282
|
});
|
|
584058
584283
|
break;
|
|
584059
584284
|
}
|
|
584285
|
+
case "raw": {
|
|
584286
|
+
controller.enqueue({
|
|
584287
|
+
type: "raw",
|
|
584288
|
+
rawValue: value2.rawValue ?? value2
|
|
584289
|
+
});
|
|
584290
|
+
break;
|
|
584291
|
+
}
|
|
584060
584292
|
case "object": {
|
|
584061
584293
|
const id2 = asString(value2.id);
|
|
584062
584294
|
if (id2 == null) {
|
|
@@ -588814,11 +589046,13 @@ var StreamConfig = class _StreamConfig {
|
|
|
588814
589046
|
_provider;
|
|
588815
589047
|
_fallback;
|
|
588816
589048
|
_logging;
|
|
588817
|
-
|
|
589049
|
+
_thinking;
|
|
589050
|
+
constructor(retry, provider, fallback, logging, thinking) {
|
|
588818
589051
|
this._retry = Object.freeze(retry);
|
|
588819
589052
|
this._provider = Object.freeze(provider);
|
|
588820
589053
|
this._fallback = Object.freeze(fallback);
|
|
588821
589054
|
this._logging = Object.freeze(logging);
|
|
589055
|
+
this._thinking = thinking ? Object.freeze({ ...thinking }) : void 0;
|
|
588822
589056
|
}
|
|
588823
589057
|
static create(options8) {
|
|
588824
589058
|
if (!options8.provider || !options8.model) {
|
|
@@ -588848,7 +589082,7 @@ var StreamConfig = class _StreamConfig {
|
|
|
588848
589082
|
saveArtifact: options8.logging?.saveArtifact,
|
|
588849
589083
|
metadata: options8.logging?.metadata ?? {}
|
|
588850
589084
|
};
|
|
588851
|
-
return new _StreamConfig(retry, provider, fallback, logging);
|
|
589085
|
+
return new _StreamConfig(retry, provider, fallback, logging, options8.thinking);
|
|
588852
589086
|
}
|
|
588853
589087
|
get retry() {
|
|
588854
589088
|
return this._retry;
|
|
@@ -588862,6 +589096,9 @@ var StreamConfig = class _StreamConfig {
|
|
|
588862
589096
|
get logging() {
|
|
588863
589097
|
return this._logging;
|
|
588864
589098
|
}
|
|
589099
|
+
get thinking() {
|
|
589100
|
+
return this._thinking;
|
|
589101
|
+
}
|
|
588865
589102
|
};
|
|
588866
589103
|
|
|
588867
589104
|
// ../../../vite-plugin-file-sync/dist/ai-service/llm/stream/orchestrator.js
|
|
@@ -589637,10 +589874,15 @@ var StreamOrchestrator = class {
|
|
|
589637
589874
|
}
|
|
589638
589875
|
}
|
|
589639
589876
|
} : options8;
|
|
589877
|
+
const thinkingRebuilt = this.rebuildThinkingOptions(baseOptions, provider);
|
|
589640
589878
|
return {
|
|
589641
|
-
...
|
|
589879
|
+
...thinkingRebuilt,
|
|
589880
|
+
headers: {
|
|
589881
|
+
...options8.headers,
|
|
589882
|
+
...thinkingRebuilt.headers
|
|
589883
|
+
},
|
|
589642
589884
|
providerOptions: {
|
|
589643
|
-
...
|
|
589885
|
+
...thinkingRebuilt.providerOptions,
|
|
589644
589886
|
billing: {
|
|
589645
589887
|
retry_count: session.metrics.retryCount,
|
|
589646
589888
|
workflow_failed: session.outcome === "error"
|
|
@@ -589648,6 +589890,50 @@ var StreamOrchestrator = class {
|
|
|
589648
589890
|
}
|
|
589649
589891
|
};
|
|
589650
589892
|
}
|
|
589893
|
+
/**
|
|
589894
|
+
* Replaces the thinking-related fields on `providerOptions.anthropic` and
|
|
589895
|
+
* `providerOptions.bedrock.additionalModelRequestFields` with the shape
|
|
589896
|
+
* the given model accepts. Any stale thinking keys (e.g. `budgetTokens`
|
|
589897
|
+
* from a previous opus-4-6 attempt, or `effort` from a previous 4-7
|
|
589898
|
+
* attempt) are dropped so the new shape isn't polluted.
|
|
589899
|
+
*/
|
|
589900
|
+
rebuildThinkingOptions(options8, provider) {
|
|
589901
|
+
const thinkingConfig = this.config.thinking;
|
|
589902
|
+
if (!thinkingConfig) {
|
|
589903
|
+
return options8;
|
|
589904
|
+
}
|
|
589905
|
+
const fresh = buildThinkingProviderOptions(provider.model, {
|
|
589906
|
+
thinkingEnabled: thinkingConfig.enabled,
|
|
589907
|
+
thinkingBudgetTokens: thinkingConfig.budgetTokens,
|
|
589908
|
+
interleavedThinking: thinkingConfig.interleaved
|
|
589909
|
+
});
|
|
589910
|
+
const existing = options8.providerOptions ?? {};
|
|
589911
|
+
const existingAnthropic = existing.anthropic ?? {};
|
|
589912
|
+
const existingBedrock = existing.bedrock ?? {};
|
|
589913
|
+
const existingBedrockFields = existingBedrock.additionalModelRequestFields ?? {};
|
|
589914
|
+
const { thinking: _a21, effort: _b17, ...anthropicRest } = existingAnthropic;
|
|
589915
|
+
const { thinking: _c, output_config: _d, anthropic_beta: _e, budget_tokens: _f, ...bedrockFieldsRest } = existingBedrockFields;
|
|
589916
|
+
const anthropic2 = fresh.anthropic ? { ...anthropicRest, ...fresh.anthropic } : anthropicRest;
|
|
589917
|
+
const bedrock = fresh.bedrock ? {
|
|
589918
|
+
...existingBedrock,
|
|
589919
|
+
additionalModelRequestFields: {
|
|
589920
|
+
...bedrockFieldsRest,
|
|
589921
|
+
...fresh.bedrock.additionalModelRequestFields
|
|
589922
|
+
}
|
|
589923
|
+
} : Object.keys(bedrockFieldsRest).length > 0 ? {
|
|
589924
|
+
...existingBedrock,
|
|
589925
|
+
additionalModelRequestFields: bedrockFieldsRest
|
|
589926
|
+
} : { ...existingBedrock, additionalModelRequestFields: {} };
|
|
589927
|
+
return {
|
|
589928
|
+
...options8,
|
|
589929
|
+
headers: { ...options8.headers, ...fresh.headers },
|
|
589930
|
+
providerOptions: {
|
|
589931
|
+
...existing,
|
|
589932
|
+
anthropic: anthropic2,
|
|
589933
|
+
bedrock
|
|
589934
|
+
}
|
|
589935
|
+
};
|
|
589936
|
+
}
|
|
589651
589937
|
getFallbackReason(error40) {
|
|
589652
589938
|
if (error40 && typeof error40 === "object" && "type" in error40) {
|
|
589653
589939
|
const errorType = error40.type;
|
|
@@ -591110,7 +591396,7 @@ var LLMClient = class {
|
|
|
591110
591396
|
}
|
|
591111
591397
|
}
|
|
591112
591398
|
async streamText(options8, logger15 = getLogger3(), tracer4 = LLMObsTracer.instance) {
|
|
591113
|
-
const { model, user, system, context: contextConfig, logging: loggingConfig, retry: retryConfig, providerConfig, enableFallback, fallbackStrategy, peer, chatSessionStore, observers: customObservers, prepareStep, onStepFinish, onFinish, onChunk, onError: onError2, summarizationModel, safety: safetyConfig, ...streamOptions } = options8;
|
|
591399
|
+
const { model, user, system, context: contextConfig, logging: loggingConfig, retry: retryConfig, providerConfig, thinking: thinkingConfig, enableFallback, fallbackStrategy, peer, chatSessionStore, observers: customObservers, prepareStep, onStepFinish, onFinish, onChunk, onError: onError2, summarizationModel, safety: safetyConfig, ...streamOptions } = options8;
|
|
591114
591400
|
if (!user) {
|
|
591115
591401
|
throw new Error("user message is required");
|
|
591116
591402
|
}
|
|
@@ -591207,11 +591493,15 @@ var LLMClient = class {
|
|
|
591207
591493
|
try {
|
|
591208
591494
|
const fallbackEnabled = this.unifiedProviderEnabled && (enableFallback ?? false);
|
|
591209
591495
|
logger15.info(`[llm-client] provider=${providerConfig.provider} model=${providerConfig.model} unifiedProvider=${this.unifiedProviderEnabled} fallback=${fallbackEnabled} retry=${safeJsonStringify(retryConfig)}`);
|
|
591496
|
+
const adaptiveEffortCapable = usesAdaptiveEffort(providerConfig.model);
|
|
591497
|
+
const defaultMaxTotalTimeMs = adaptiveEffortCapable ? 5 * 60 * 1e3 : 2 * 60 * 1e3;
|
|
591498
|
+
const defaultIdleTimeoutMs = adaptiveEffortCapable ? 18e4 : 9e4;
|
|
591210
591499
|
const config4 = StreamConfig.create({
|
|
591211
591500
|
retry: {
|
|
591212
591501
|
...this.retryOptions,
|
|
591213
591502
|
...retryConfig,
|
|
591214
|
-
maxTotalTimeMs: retryConfig?.maxTotalTimeMs ?? this.retryOptions?.maxTotalTimeMs ??
|
|
591503
|
+
maxTotalTimeMs: retryConfig?.maxTotalTimeMs ?? this.retryOptions?.maxTotalTimeMs ?? defaultMaxTotalTimeMs,
|
|
591504
|
+
idleTimeoutMs: retryConfig?.idleTimeoutMs ?? this.retryOptions?.idleTimeoutMs ?? defaultIdleTimeoutMs
|
|
591215
591505
|
},
|
|
591216
591506
|
provider: providerConfig.provider,
|
|
591217
591507
|
model: providerConfig.model,
|
|
@@ -591219,6 +591509,7 @@ var LLMClient = class {
|
|
|
591219
591509
|
enabled: fallbackEnabled,
|
|
591220
591510
|
strategy: fallbackStrategy
|
|
591221
591511
|
},
|
|
591512
|
+
thinking: thinkingConfig,
|
|
591222
591513
|
logging: loggingConfig !== false ? {
|
|
591223
591514
|
enabled: true,
|
|
591224
591515
|
conversationId: loggingConfig?.conversationId,
|
|
@@ -591397,10 +591688,10 @@ init_cjs_shims();
|
|
|
591397
591688
|
// ../../../vite-plugin-file-sync/dist/ai-service/llm/impl/anthropic.js
|
|
591398
591689
|
init_cjs_shims();
|
|
591399
591690
|
|
|
591400
|
-
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.
|
|
591691
|
+
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.71_zod@3.25.76/node_modules/@ai-sdk/anthropic/dist/index.mjs
|
|
591401
591692
|
init_cjs_shims();
|
|
591402
591693
|
|
|
591403
|
-
// ../../../../node_modules/.pnpm/@ai-sdk+provider-utils@4.0.
|
|
591694
|
+
// ../../../../node_modules/.pnpm/@ai-sdk+provider-utils@4.0.23_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs
|
|
591404
591695
|
init_cjs_shims();
|
|
591405
591696
|
function combineHeaders2(...headers) {
|
|
591406
591697
|
return headers.reduce(
|
|
@@ -591413,25 +591704,30 @@ function combineHeaders2(...headers) {
|
|
|
591413
591704
|
}
|
|
591414
591705
|
function createToolNameMapping({
|
|
591415
591706
|
tools = [],
|
|
591416
|
-
providerToolNames
|
|
591707
|
+
providerToolNames,
|
|
591708
|
+
resolveProviderToolName
|
|
591417
591709
|
}) {
|
|
591710
|
+
var _a22;
|
|
591418
591711
|
const customToolNameToProviderToolName = {};
|
|
591419
591712
|
const providerToolNameToCustomToolName = {};
|
|
591420
591713
|
for (const tool22 of tools) {
|
|
591421
|
-
if (tool22.type === "provider"
|
|
591422
|
-
const providerToolName = providerToolNames[tool22.id];
|
|
591714
|
+
if (tool22.type === "provider") {
|
|
591715
|
+
const providerToolName = (_a22 = resolveProviderToolName == null ? void 0 : resolveProviderToolName(tool22)) != null ? _a22 : tool22.id in providerToolNames ? providerToolNames[tool22.id] : void 0;
|
|
591716
|
+
if (providerToolName == null) {
|
|
591717
|
+
continue;
|
|
591718
|
+
}
|
|
591423
591719
|
customToolNameToProviderToolName[tool22.name] = providerToolName;
|
|
591424
591720
|
providerToolNameToCustomToolName[providerToolName] = tool22.name;
|
|
591425
591721
|
}
|
|
591426
591722
|
}
|
|
591427
591723
|
return {
|
|
591428
591724
|
toProviderToolName: (customToolName) => {
|
|
591429
|
-
var
|
|
591430
|
-
return (
|
|
591725
|
+
var _a32;
|
|
591726
|
+
return (_a32 = customToolNameToProviderToolName[customToolName]) != null ? _a32 : customToolName;
|
|
591431
591727
|
},
|
|
591432
591728
|
toCustomToolName: (providerToolName) => {
|
|
591433
|
-
var
|
|
591434
|
-
return (
|
|
591729
|
+
var _a32;
|
|
591730
|
+
return (_a32 = providerToolNameToCustomToolName[providerToolName]) != null ? _a32 : providerToolName;
|
|
591435
591731
|
}
|
|
591436
591732
|
};
|
|
591437
591733
|
}
|
|
@@ -591439,6 +591735,11 @@ function extractResponseHeaders2(response) {
|
|
|
591439
591735
|
return Object.fromEntries([...response.headers]);
|
|
591440
591736
|
}
|
|
591441
591737
|
var { btoa: btoa3, atob: atob3 } = globalThis;
|
|
591738
|
+
function convertBase64ToUint8Array(base64String) {
|
|
591739
|
+
const base64Url = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
|
591740
|
+
const latin1string = atob3(base64Url);
|
|
591741
|
+
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
591742
|
+
}
|
|
591442
591743
|
function convertUint8ArrayToBase64(array3) {
|
|
591443
591744
|
let latin1string = "";
|
|
591444
591745
|
for (let i = 0; i < array3.length; i++) {
|
|
@@ -591601,7 +591902,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
|
|
|
591601
591902
|
);
|
|
591602
591903
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
591603
591904
|
}
|
|
591604
|
-
var VERSION2 = true ? "4.0.
|
|
591905
|
+
var VERSION2 = true ? "4.0.23" : "0.0.0-test";
|
|
591605
591906
|
function isNonNullable(value2) {
|
|
591606
591907
|
return value2 != null;
|
|
591607
591908
|
}
|
|
@@ -591621,7 +591922,7 @@ function loadApiKey({
|
|
|
591621
591922
|
}
|
|
591622
591923
|
if (typeof process === "undefined") {
|
|
591623
591924
|
throw new LoadAPIKeyError2({
|
|
591624
|
-
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables
|
|
591925
|
+
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables are not supported in this environment.`
|
|
591625
591926
|
});
|
|
591626
591927
|
}
|
|
591627
591928
|
apiKey = process.env[environmentVariableName];
|
|
@@ -591653,8 +591954,8 @@ function loadOptionalSetting({
|
|
|
591653
591954
|
}
|
|
591654
591955
|
return settingValue;
|
|
591655
591956
|
}
|
|
591656
|
-
var suspectProtoRx2 = /"
|
|
591657
|
-
var suspectConstructorRx2 = /"
|
|
591957
|
+
var suspectProtoRx2 = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
|
|
591958
|
+
var suspectConstructorRx2 = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
591658
591959
|
function _parse3(text3) {
|
|
591659
591960
|
const obj = JSON.parse(text3);
|
|
591660
591961
|
if (obj === null || typeof obj !== "object") {
|
|
@@ -591674,7 +591975,7 @@ function filter3(obj) {
|
|
|
591674
591975
|
if (Object.prototype.hasOwnProperty.call(node, "__proto__")) {
|
|
591675
591976
|
throw new SyntaxError("Object contains forbidden prototype property");
|
|
591676
591977
|
}
|
|
591677
|
-
if (Object.prototype.hasOwnProperty.call(node, "constructor") && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
|
|
591978
|
+
if (Object.prototype.hasOwnProperty.call(node, "constructor") && node.constructor !== null && typeof node.constructor === "object" && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
|
|
591678
591979
|
throw new SyntaxError("Object contains forbidden prototype property");
|
|
591679
591980
|
}
|
|
591680
591981
|
for (const key2 in node) {
|
|
@@ -591734,7 +592035,7 @@ function visit2(def) {
|
|
|
591734
592035
|
if (typeof def === "boolean") return def;
|
|
591735
592036
|
return addAdditionalPropertiesToJsonSchema2(def);
|
|
591736
592037
|
}
|
|
591737
|
-
var ignoreOverride2 = Symbol(
|
|
592038
|
+
var ignoreOverride2 = /* @__PURE__ */ Symbol(
|
|
591738
592039
|
"Let zodToJsonSchema decide on which parser to use"
|
|
591739
592040
|
);
|
|
591740
592041
|
var defaultOptions3 = {
|
|
@@ -592833,7 +593134,7 @@ var zod3ToJsonSchema2 = (schema, options8) => {
|
|
|
592833
593134
|
combined.$schema = "http://json-schema.org/draft-07/schema#";
|
|
592834
593135
|
return combined;
|
|
592835
593136
|
};
|
|
592836
|
-
var schemaSymbol2 = Symbol.for("vercel.ai.schema");
|
|
593137
|
+
var schemaSymbol2 = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
|
|
592837
593138
|
function lazySchema(createSchema2) {
|
|
592838
593139
|
let schema;
|
|
592839
593140
|
return () => {
|
|
@@ -593294,8 +593595,8 @@ function withoutTrailingSlash2(url4) {
|
|
|
593294
593595
|
return url4 == null ? void 0 : url4.replace(/\/$/, "");
|
|
593295
593596
|
}
|
|
593296
593597
|
|
|
593297
|
-
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.
|
|
593298
|
-
var VERSION3 = true ? "3.0.
|
|
593598
|
+
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.71_zod@3.25.76/node_modules/@ai-sdk/anthropic/dist/index.mjs
|
|
593599
|
+
var VERSION3 = true ? "3.0.71" : "0.0.0-test";
|
|
593299
593600
|
var anthropicErrorDataSchema = lazySchema(
|
|
593300
593601
|
() => zodSchema3(
|
|
593301
593602
|
external_exports2.object({
|
|
@@ -593374,6 +593675,10 @@ var anthropicMessagesResponseSchema = lazySchema(
|
|
|
593374
593675
|
type: external_exports2.literal("code_execution_20250825"),
|
|
593375
593676
|
tool_id: external_exports2.string()
|
|
593376
593677
|
}),
|
|
593678
|
+
external_exports2.object({
|
|
593679
|
+
type: external_exports2.literal("code_execution_20260120"),
|
|
593680
|
+
tool_id: external_exports2.string()
|
|
593681
|
+
}),
|
|
593377
593682
|
external_exports2.object({
|
|
593378
593683
|
type: external_exports2.literal("direct")
|
|
593379
593684
|
})
|
|
@@ -593383,7 +593688,16 @@ var anthropicMessagesResponseSchema = lazySchema(
|
|
|
593383
593688
|
type: external_exports2.literal("server_tool_use"),
|
|
593384
593689
|
id: external_exports2.string(),
|
|
593385
593690
|
name: external_exports2.string(),
|
|
593386
|
-
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish()
|
|
593691
|
+
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish(),
|
|
593692
|
+
caller: external_exports2.union([
|
|
593693
|
+
external_exports2.object({
|
|
593694
|
+
type: external_exports2.literal("code_execution_20260120"),
|
|
593695
|
+
tool_id: external_exports2.string()
|
|
593696
|
+
}),
|
|
593697
|
+
external_exports2.object({
|
|
593698
|
+
type: external_exports2.literal("direct")
|
|
593699
|
+
})
|
|
593700
|
+
]).optional()
|
|
593387
593701
|
}),
|
|
593388
593702
|
external_exports2.object({
|
|
593389
593703
|
type: external_exports2.literal("mcp_tool_use"),
|
|
@@ -593471,6 +593785,18 @@ var anthropicMessagesResponseSchema = lazySchema(
|
|
|
593471
593785
|
})
|
|
593472
593786
|
).optional().default([])
|
|
593473
593787
|
}),
|
|
593788
|
+
external_exports2.object({
|
|
593789
|
+
type: external_exports2.literal("encrypted_code_execution_result"),
|
|
593790
|
+
encrypted_stdout: external_exports2.string(),
|
|
593791
|
+
stderr: external_exports2.string(),
|
|
593792
|
+
return_code: external_exports2.number(),
|
|
593793
|
+
content: external_exports2.array(
|
|
593794
|
+
external_exports2.object({
|
|
593795
|
+
type: external_exports2.literal("code_execution_output"),
|
|
593796
|
+
file_id: external_exports2.string()
|
|
593797
|
+
})
|
|
593798
|
+
).optional().default([])
|
|
593799
|
+
}),
|
|
593474
593800
|
external_exports2.object({
|
|
593475
593801
|
type: external_exports2.literal("code_execution_tool_result_error"),
|
|
593476
593802
|
error_code: external_exports2.string()
|
|
@@ -593630,6 +593956,10 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
593630
593956
|
type: external_exports2.literal("code_execution_20250825"),
|
|
593631
593957
|
tool_id: external_exports2.string()
|
|
593632
593958
|
}),
|
|
593959
|
+
external_exports2.object({
|
|
593960
|
+
type: external_exports2.literal("code_execution_20260120"),
|
|
593961
|
+
tool_id: external_exports2.string()
|
|
593962
|
+
}),
|
|
593633
593963
|
external_exports2.object({
|
|
593634
593964
|
type: external_exports2.literal("direct")
|
|
593635
593965
|
})
|
|
@@ -593668,6 +593998,10 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
593668
593998
|
type: external_exports2.literal("code_execution_20250825"),
|
|
593669
593999
|
tool_id: external_exports2.string()
|
|
593670
594000
|
}),
|
|
594001
|
+
external_exports2.object({
|
|
594002
|
+
type: external_exports2.literal("code_execution_20260120"),
|
|
594003
|
+
tool_id: external_exports2.string()
|
|
594004
|
+
}),
|
|
593671
594005
|
external_exports2.object({
|
|
593672
594006
|
type: external_exports2.literal("direct")
|
|
593673
594007
|
})
|
|
@@ -593685,7 +594019,16 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
593685
594019
|
type: external_exports2.literal("server_tool_use"),
|
|
593686
594020
|
id: external_exports2.string(),
|
|
593687
594021
|
name: external_exports2.string(),
|
|
593688
|
-
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish()
|
|
594022
|
+
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish(),
|
|
594023
|
+
caller: external_exports2.union([
|
|
594024
|
+
external_exports2.object({
|
|
594025
|
+
type: external_exports2.literal("code_execution_20260120"),
|
|
594026
|
+
tool_id: external_exports2.string()
|
|
594027
|
+
}),
|
|
594028
|
+
external_exports2.object({
|
|
594029
|
+
type: external_exports2.literal("direct")
|
|
594030
|
+
})
|
|
594031
|
+
]).optional()
|
|
593689
594032
|
}),
|
|
593690
594033
|
external_exports2.object({
|
|
593691
594034
|
type: external_exports2.literal("mcp_tool_use"),
|
|
@@ -593773,6 +594116,18 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
593773
594116
|
})
|
|
593774
594117
|
).optional().default([])
|
|
593775
594118
|
}),
|
|
594119
|
+
external_exports2.object({
|
|
594120
|
+
type: external_exports2.literal("encrypted_code_execution_result"),
|
|
594121
|
+
encrypted_stdout: external_exports2.string(),
|
|
594122
|
+
stderr: external_exports2.string(),
|
|
594123
|
+
return_code: external_exports2.number(),
|
|
594124
|
+
content: external_exports2.array(
|
|
594125
|
+
external_exports2.object({
|
|
594126
|
+
type: external_exports2.literal("code_execution_output"),
|
|
594127
|
+
file_id: external_exports2.string()
|
|
594128
|
+
})
|
|
594129
|
+
).optional().default([])
|
|
594130
|
+
}),
|
|
593776
594131
|
external_exports2.object({
|
|
593777
594132
|
type: external_exports2.literal("code_execution_tool_result_error"),
|
|
593778
594133
|
error_code: external_exports2.string()
|
|
@@ -594025,7 +594380,7 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594025
594380
|
/**
|
|
594026
594381
|
* Determines how structured outputs are generated.
|
|
594027
594382
|
*
|
|
594028
|
-
* - `outputFormat`: Use the `
|
|
594383
|
+
* - `outputFormat`: Use the `output_config.format` parameter to specify the structured output format.
|
|
594029
594384
|
* - `jsonTool`: Use a special 'json' tool to specify the structured output format.
|
|
594030
594385
|
* - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
|
|
594031
594386
|
*/
|
|
@@ -594039,7 +594394,13 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594039
594394
|
thinking: external_exports2.discriminatedUnion("type", [
|
|
594040
594395
|
external_exports2.object({
|
|
594041
594396
|
/** for Sonnet 4.6, Opus 4.6, and newer models */
|
|
594042
|
-
type: external_exports2.literal("adaptive")
|
|
594397
|
+
type: external_exports2.literal("adaptive"),
|
|
594398
|
+
/**
|
|
594399
|
+
* Controls whether thinking content is included in the response.
|
|
594400
|
+
* - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
|
|
594401
|
+
* - `"summarized"`: Thinking content is returned. Required to see reasoning output.
|
|
594402
|
+
*/
|
|
594403
|
+
display: external_exports2.enum(["omitted", "summarized"]).optional()
|
|
594043
594404
|
}),
|
|
594044
594405
|
external_exports2.object({
|
|
594045
594406
|
/** for models before Opus 4.6, except Sonnet 4.6 still supports it */
|
|
@@ -594063,6 +594424,20 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594063
594424
|
type: external_exports2.literal("ephemeral"),
|
|
594064
594425
|
ttl: external_exports2.union([external_exports2.literal("5m"), external_exports2.literal("1h")]).optional()
|
|
594065
594426
|
}).optional(),
|
|
594427
|
+
/**
|
|
594428
|
+
* Metadata to include with the request.
|
|
594429
|
+
*
|
|
594430
|
+
* See https://platform.claude.com/docs/en/api/messages/create for details.
|
|
594431
|
+
*/
|
|
594432
|
+
metadata: external_exports2.object({
|
|
594433
|
+
/**
|
|
594434
|
+
* An external identifier for the user associated with the request.
|
|
594435
|
+
*
|
|
594436
|
+
* Should be a UUID, hash value, or other opaque identifier.
|
|
594437
|
+
* Must not contain PII (name, email, phone number, etc.).
|
|
594438
|
+
*/
|
|
594439
|
+
userId: external_exports2.string().optional()
|
|
594440
|
+
}).optional(),
|
|
594066
594441
|
/**
|
|
594067
594442
|
* MCP servers to be utilized in this request.
|
|
594068
594443
|
*/
|
|
@@ -594094,10 +594469,11 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594094
594469
|
).optional()
|
|
594095
594470
|
}).optional(),
|
|
594096
594471
|
/**
|
|
594097
|
-
* Whether to enable
|
|
594098
|
-
*
|
|
594099
|
-
*
|
|
594100
|
-
*
|
|
594472
|
+
* Whether to enable fine-grained (eager) streaming of tool call inputs
|
|
594473
|
+
* and structured outputs for every function tool in the request. When
|
|
594474
|
+
* true (the default), each function tool receives a default of
|
|
594475
|
+
* `eager_input_streaming: true` unless it explicitly sets
|
|
594476
|
+
* `providerOptions.anthropic.eagerInputStreaming`.
|
|
594101
594477
|
*
|
|
594102
594478
|
* @default true
|
|
594103
594479
|
*/
|
|
@@ -594105,12 +594481,38 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594105
594481
|
/**
|
|
594106
594482
|
* @default 'high'
|
|
594107
594483
|
*/
|
|
594108
|
-
effort: external_exports2.enum(["low", "medium", "high", "max"]).optional(),
|
|
594484
|
+
effort: external_exports2.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
|
594485
|
+
/**
|
|
594486
|
+
* Task budget for agentic turns. Informs the model of the total token budget
|
|
594487
|
+
* available for the current task, allowing it to prioritize work and wind down
|
|
594488
|
+
* gracefully as the budget is consumed.
|
|
594489
|
+
*
|
|
594490
|
+
* Advisory only — does not enforce a hard token limit.
|
|
594491
|
+
*/
|
|
594492
|
+
taskBudget: external_exports2.object({
|
|
594493
|
+
type: external_exports2.literal("tokens"),
|
|
594494
|
+
total: external_exports2.number().int().min(2e4),
|
|
594495
|
+
remaining: external_exports2.number().int().min(0).optional()
|
|
594496
|
+
}).optional(),
|
|
594109
594497
|
/**
|
|
594110
594498
|
* Enable fast mode for faster inference (2.5x faster output token speeds).
|
|
594111
594499
|
* Only supported with claude-opus-4-6.
|
|
594112
594500
|
*/
|
|
594113
594501
|
speed: external_exports2.enum(["fast", "standard"]).optional(),
|
|
594502
|
+
/**
|
|
594503
|
+
* Controls where model inference runs for this request.
|
|
594504
|
+
*
|
|
594505
|
+
* - `"global"`: Inference may run in any available geography (default).
|
|
594506
|
+
* - `"us"`: Inference runs only in US-based infrastructure.
|
|
594507
|
+
*
|
|
594508
|
+
* See https://platform.claude.com/docs/en/build-with-claude/data-residency
|
|
594509
|
+
*/
|
|
594510
|
+
inferenceGeo: external_exports2.enum(["us", "global"]).optional(),
|
|
594511
|
+
/**
|
|
594512
|
+
* A set of beta features to enable.
|
|
594513
|
+
* Allow a provider to receive the full `betas` set if it needs it.
|
|
594514
|
+
*/
|
|
594515
|
+
anthropicBeta: external_exports2.array(external_exports2.string()).optional(),
|
|
594114
594516
|
contextManagement: external_exports2.object({
|
|
594115
594517
|
edits: external_exports2.array(
|
|
594116
594518
|
external_exports2.discriminatedUnion("type", [
|
|
@@ -594228,6 +594630,51 @@ var factory = createProviderToolFactory({
|
|
|
594228
594630
|
var textEditor_20250728 = (args = {}) => {
|
|
594229
594631
|
return factory(args);
|
|
594230
594632
|
};
|
|
594633
|
+
var webSearch_20260209ArgsSchema = lazySchema(
|
|
594634
|
+
() => zodSchema3(
|
|
594635
|
+
external_exports2.object({
|
|
594636
|
+
maxUses: external_exports2.number().optional(),
|
|
594637
|
+
allowedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594638
|
+
blockedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594639
|
+
userLocation: external_exports2.object({
|
|
594640
|
+
type: external_exports2.literal("approximate"),
|
|
594641
|
+
city: external_exports2.string().optional(),
|
|
594642
|
+
region: external_exports2.string().optional(),
|
|
594643
|
+
country: external_exports2.string().optional(),
|
|
594644
|
+
timezone: external_exports2.string().optional()
|
|
594645
|
+
}).optional()
|
|
594646
|
+
})
|
|
594647
|
+
)
|
|
594648
|
+
);
|
|
594649
|
+
var webSearch_20260209OutputSchema = lazySchema(
|
|
594650
|
+
() => zodSchema3(
|
|
594651
|
+
external_exports2.array(
|
|
594652
|
+
external_exports2.object({
|
|
594653
|
+
url: external_exports2.string(),
|
|
594654
|
+
title: external_exports2.string().nullable(),
|
|
594655
|
+
pageAge: external_exports2.string().nullable(),
|
|
594656
|
+
encryptedContent: external_exports2.string(),
|
|
594657
|
+
type: external_exports2.literal("web_search_result")
|
|
594658
|
+
})
|
|
594659
|
+
)
|
|
594660
|
+
)
|
|
594661
|
+
);
|
|
594662
|
+
var webSearch_20260209InputSchema = lazySchema(
|
|
594663
|
+
() => zodSchema3(
|
|
594664
|
+
external_exports2.object({
|
|
594665
|
+
query: external_exports2.string()
|
|
594666
|
+
})
|
|
594667
|
+
)
|
|
594668
|
+
);
|
|
594669
|
+
var factory2 = createProviderToolFactoryWithOutputSchema({
|
|
594670
|
+
id: "anthropic.web_search_20260209",
|
|
594671
|
+
inputSchema: webSearch_20260209InputSchema,
|
|
594672
|
+
outputSchema: webSearch_20260209OutputSchema,
|
|
594673
|
+
supportsDeferredResults: true
|
|
594674
|
+
});
|
|
594675
|
+
var webSearch_20260209 = (args = {}) => {
|
|
594676
|
+
return factory2(args);
|
|
594677
|
+
};
|
|
594231
594678
|
var webSearch_20250305ArgsSchema = lazySchema(
|
|
594232
594679
|
() => zodSchema3(
|
|
594233
594680
|
external_exports2.object({
|
|
@@ -594264,14 +594711,67 @@ var webSearch_20250305InputSchema = lazySchema(
|
|
|
594264
594711
|
})
|
|
594265
594712
|
)
|
|
594266
594713
|
);
|
|
594267
|
-
var
|
|
594714
|
+
var factory3 = createProviderToolFactoryWithOutputSchema({
|
|
594268
594715
|
id: "anthropic.web_search_20250305",
|
|
594269
594716
|
inputSchema: webSearch_20250305InputSchema,
|
|
594270
594717
|
outputSchema: webSearch_20250305OutputSchema,
|
|
594271
594718
|
supportsDeferredResults: true
|
|
594272
594719
|
});
|
|
594273
594720
|
var webSearch_20250305 = (args = {}) => {
|
|
594274
|
-
return
|
|
594721
|
+
return factory3(args);
|
|
594722
|
+
};
|
|
594723
|
+
var webFetch_20260209ArgsSchema = lazySchema(
|
|
594724
|
+
() => zodSchema3(
|
|
594725
|
+
external_exports2.object({
|
|
594726
|
+
maxUses: external_exports2.number().optional(),
|
|
594727
|
+
allowedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594728
|
+
blockedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594729
|
+
citations: external_exports2.object({ enabled: external_exports2.boolean() }).optional(),
|
|
594730
|
+
maxContentTokens: external_exports2.number().optional()
|
|
594731
|
+
})
|
|
594732
|
+
)
|
|
594733
|
+
);
|
|
594734
|
+
var webFetch_20260209OutputSchema = lazySchema(
|
|
594735
|
+
() => zodSchema3(
|
|
594736
|
+
external_exports2.object({
|
|
594737
|
+
type: external_exports2.literal("web_fetch_result"),
|
|
594738
|
+
url: external_exports2.string(),
|
|
594739
|
+
content: external_exports2.object({
|
|
594740
|
+
type: external_exports2.literal("document"),
|
|
594741
|
+
title: external_exports2.string().nullable(),
|
|
594742
|
+
citations: external_exports2.object({ enabled: external_exports2.boolean() }).optional(),
|
|
594743
|
+
source: external_exports2.union([
|
|
594744
|
+
external_exports2.object({
|
|
594745
|
+
type: external_exports2.literal("base64"),
|
|
594746
|
+
mediaType: external_exports2.literal("application/pdf"),
|
|
594747
|
+
data: external_exports2.string()
|
|
594748
|
+
}),
|
|
594749
|
+
external_exports2.object({
|
|
594750
|
+
type: external_exports2.literal("text"),
|
|
594751
|
+
mediaType: external_exports2.literal("text/plain"),
|
|
594752
|
+
data: external_exports2.string()
|
|
594753
|
+
})
|
|
594754
|
+
])
|
|
594755
|
+
}),
|
|
594756
|
+
retrievedAt: external_exports2.string().nullable()
|
|
594757
|
+
})
|
|
594758
|
+
)
|
|
594759
|
+
);
|
|
594760
|
+
var webFetch_20260209InputSchema = lazySchema(
|
|
594761
|
+
() => zodSchema3(
|
|
594762
|
+
external_exports2.object({
|
|
594763
|
+
url: external_exports2.string()
|
|
594764
|
+
})
|
|
594765
|
+
)
|
|
594766
|
+
);
|
|
594767
|
+
var factory4 = createProviderToolFactoryWithOutputSchema({
|
|
594768
|
+
id: "anthropic.web_fetch_20260209",
|
|
594769
|
+
inputSchema: webFetch_20260209InputSchema,
|
|
594770
|
+
outputSchema: webFetch_20260209OutputSchema,
|
|
594771
|
+
supportsDeferredResults: true
|
|
594772
|
+
});
|
|
594773
|
+
var webFetch_20260209 = (args = {}) => {
|
|
594774
|
+
return factory4(args);
|
|
594275
594775
|
};
|
|
594276
594776
|
var webFetch_20250910ArgsSchema = lazySchema(
|
|
594277
594777
|
() => zodSchema3(
|
|
@@ -594317,23 +594817,25 @@ var webFetch_20250910InputSchema = lazySchema(
|
|
|
594317
594817
|
})
|
|
594318
594818
|
)
|
|
594319
594819
|
);
|
|
594320
|
-
var
|
|
594820
|
+
var factory5 = createProviderToolFactoryWithOutputSchema({
|
|
594321
594821
|
id: "anthropic.web_fetch_20250910",
|
|
594322
594822
|
inputSchema: webFetch_20250910InputSchema,
|
|
594323
594823
|
outputSchema: webFetch_20250910OutputSchema,
|
|
594324
594824
|
supportsDeferredResults: true
|
|
594325
594825
|
});
|
|
594326
594826
|
var webFetch_20250910 = (args = {}) => {
|
|
594327
|
-
return
|
|
594827
|
+
return factory5(args);
|
|
594328
594828
|
};
|
|
594329
594829
|
async function prepareTools({
|
|
594330
594830
|
tools,
|
|
594331
594831
|
toolChoice,
|
|
594332
594832
|
disableParallelToolUse,
|
|
594333
594833
|
cacheControlValidator,
|
|
594334
|
-
supportsStructuredOutput
|
|
594834
|
+
supportsStructuredOutput,
|
|
594835
|
+
supportsStrictTools,
|
|
594836
|
+
defaultEagerInputStreaming = false
|
|
594335
594837
|
}) {
|
|
594336
|
-
var _a21;
|
|
594838
|
+
var _a21, _b17;
|
|
594337
594839
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
594338
594840
|
const toolWarnings = [];
|
|
594339
594841
|
const betas = /* @__PURE__ */ new Set();
|
|
@@ -594350,14 +594852,23 @@ async function prepareTools({
|
|
|
594350
594852
|
canCache: true
|
|
594351
594853
|
});
|
|
594352
594854
|
const anthropicOptions = (_a21 = tool3.providerOptions) == null ? void 0 : _a21.anthropic;
|
|
594855
|
+
const eagerInputStreaming = (_b17 = anthropicOptions == null ? void 0 : anthropicOptions.eagerInputStreaming) != null ? _b17 : defaultEagerInputStreaming;
|
|
594353
594856
|
const deferLoading = anthropicOptions == null ? void 0 : anthropicOptions.deferLoading;
|
|
594354
594857
|
const allowedCallers = anthropicOptions == null ? void 0 : anthropicOptions.allowedCallers;
|
|
594858
|
+
if (!supportsStrictTools && tool3.strict != null) {
|
|
594859
|
+
toolWarnings.push({
|
|
594860
|
+
type: "unsupported",
|
|
594861
|
+
feature: "strict",
|
|
594862
|
+
details: `Tool '${tool3.name}' has strict: ${tool3.strict}, but strict mode is not supported by this provider. The strict property will be ignored.`
|
|
594863
|
+
});
|
|
594864
|
+
}
|
|
594355
594865
|
anthropicTools2.push({
|
|
594356
594866
|
name: tool3.name,
|
|
594357
594867
|
description: tool3.description,
|
|
594358
594868
|
input_schema: tool3.inputSchema,
|
|
594359
594869
|
cache_control: cacheControl,
|
|
594360
|
-
...
|
|
594870
|
+
...eagerInputStreaming ? { eager_input_streaming: true } : {},
|
|
594871
|
+
...supportsStrictTools === true && tool3.strict != null ? { strict: tool3.strict } : {},
|
|
594361
594872
|
...deferLoading != null ? { defer_loading: deferLoading } : {},
|
|
594362
594873
|
...allowedCallers != null ? { allowed_callers: allowedCallers } : {},
|
|
594363
594874
|
...tool3.inputExamples != null ? {
|
|
@@ -594393,6 +594904,13 @@ async function prepareTools({
|
|
|
594393
594904
|
});
|
|
594394
594905
|
break;
|
|
594395
594906
|
}
|
|
594907
|
+
case "anthropic.code_execution_20260120": {
|
|
594908
|
+
anthropicTools2.push({
|
|
594909
|
+
type: "code_execution_20260120",
|
|
594910
|
+
name: "code_execution"
|
|
594911
|
+
});
|
|
594912
|
+
break;
|
|
594913
|
+
}
|
|
594396
594914
|
case "anthropic.computer_20250124": {
|
|
594397
594915
|
betas.add("computer-use-2025-01-24");
|
|
594398
594916
|
anthropicTools2.push({
|
|
@@ -594514,6 +595032,24 @@ async function prepareTools({
|
|
|
594514
595032
|
});
|
|
594515
595033
|
break;
|
|
594516
595034
|
}
|
|
595035
|
+
case "anthropic.web_fetch_20260209": {
|
|
595036
|
+
betas.add("code-execution-web-tools-2026-02-09");
|
|
595037
|
+
const args = await validateTypes2({
|
|
595038
|
+
value: tool3.args,
|
|
595039
|
+
schema: webFetch_20260209ArgsSchema
|
|
595040
|
+
});
|
|
595041
|
+
anthropicTools2.push({
|
|
595042
|
+
type: "web_fetch_20260209",
|
|
595043
|
+
name: "web_fetch",
|
|
595044
|
+
max_uses: args.maxUses,
|
|
595045
|
+
allowed_domains: args.allowedDomains,
|
|
595046
|
+
blocked_domains: args.blockedDomains,
|
|
595047
|
+
citations: args.citations,
|
|
595048
|
+
max_content_tokens: args.maxContentTokens,
|
|
595049
|
+
cache_control: void 0
|
|
595050
|
+
});
|
|
595051
|
+
break;
|
|
595052
|
+
}
|
|
594517
595053
|
case "anthropic.web_search_20250305": {
|
|
594518
595054
|
const args = await validateTypes2({
|
|
594519
595055
|
value: tool3.args,
|
|
@@ -594530,8 +595066,24 @@ async function prepareTools({
|
|
|
594530
595066
|
});
|
|
594531
595067
|
break;
|
|
594532
595068
|
}
|
|
595069
|
+
case "anthropic.web_search_20260209": {
|
|
595070
|
+
betas.add("code-execution-web-tools-2026-02-09");
|
|
595071
|
+
const args = await validateTypes2({
|
|
595072
|
+
value: tool3.args,
|
|
595073
|
+
schema: webSearch_20260209ArgsSchema
|
|
595074
|
+
});
|
|
595075
|
+
anthropicTools2.push({
|
|
595076
|
+
type: "web_search_20260209",
|
|
595077
|
+
name: "web_search",
|
|
595078
|
+
max_uses: args.maxUses,
|
|
595079
|
+
allowed_domains: args.allowedDomains,
|
|
595080
|
+
blocked_domains: args.blockedDomains,
|
|
595081
|
+
user_location: args.userLocation,
|
|
595082
|
+
cache_control: void 0
|
|
595083
|
+
});
|
|
595084
|
+
break;
|
|
595085
|
+
}
|
|
594533
595086
|
case "anthropic.tool_search_regex_20251119": {
|
|
594534
|
-
betas.add("advanced-tool-use-2025-11-20");
|
|
594535
595087
|
anthropicTools2.push({
|
|
594536
595088
|
type: "tool_search_tool_regex_20251119",
|
|
594537
595089
|
name: "tool_search_tool_regex"
|
|
@@ -594539,7 +595091,6 @@ async function prepareTools({
|
|
|
594539
595091
|
break;
|
|
594540
595092
|
}
|
|
594541
595093
|
case "anthropic.tool_search_bm25_20251119": {
|
|
594542
|
-
betas.add("advanced-tool-use-2025-11-20");
|
|
594543
595094
|
anthropicTools2.push({
|
|
594544
595095
|
type: "tool_search_tool_bm25_20251119",
|
|
594545
595096
|
name: "tool_search_tool_bm25"
|
|
@@ -594677,13 +595228,13 @@ var codeExecution_20250522InputSchema = lazySchema(
|
|
|
594677
595228
|
})
|
|
594678
595229
|
)
|
|
594679
595230
|
);
|
|
594680
|
-
var
|
|
595231
|
+
var factory6 = createProviderToolFactoryWithOutputSchema({
|
|
594681
595232
|
id: "anthropic.code_execution_20250522",
|
|
594682
595233
|
inputSchema: codeExecution_20250522InputSchema,
|
|
594683
595234
|
outputSchema: codeExecution_20250522OutputSchema
|
|
594684
595235
|
});
|
|
594685
595236
|
var codeExecution_20250522 = (args = {}) => {
|
|
594686
|
-
return
|
|
595237
|
+
return factory6(args);
|
|
594687
595238
|
};
|
|
594688
595239
|
var codeExecution_20250825OutputSchema = lazySchema(
|
|
594689
595240
|
() => zodSchema3(
|
|
@@ -594778,7 +595329,7 @@ var codeExecution_20250825InputSchema = lazySchema(
|
|
|
594778
595329
|
])
|
|
594779
595330
|
)
|
|
594780
595331
|
);
|
|
594781
|
-
var
|
|
595332
|
+
var factory7 = createProviderToolFactoryWithOutputSchema({
|
|
594782
595333
|
id: "anthropic.code_execution_20250825",
|
|
594783
595334
|
inputSchema: codeExecution_20250825InputSchema,
|
|
594784
595335
|
outputSchema: codeExecution_20250825OutputSchema,
|
|
@@ -594788,7 +595339,120 @@ var factory5 = createProviderToolFactoryWithOutputSchema({
|
|
|
594788
595339
|
supportsDeferredResults: true
|
|
594789
595340
|
});
|
|
594790
595341
|
var codeExecution_20250825 = (args = {}) => {
|
|
594791
|
-
return
|
|
595342
|
+
return factory7(args);
|
|
595343
|
+
};
|
|
595344
|
+
var codeExecution_20260120OutputSchema = lazySchema(
|
|
595345
|
+
() => zodSchema3(
|
|
595346
|
+
external_exports2.discriminatedUnion("type", [
|
|
595347
|
+
external_exports2.object({
|
|
595348
|
+
type: external_exports2.literal("code_execution_result"),
|
|
595349
|
+
stdout: external_exports2.string(),
|
|
595350
|
+
stderr: external_exports2.string(),
|
|
595351
|
+
return_code: external_exports2.number(),
|
|
595352
|
+
content: external_exports2.array(
|
|
595353
|
+
external_exports2.object({
|
|
595354
|
+
type: external_exports2.literal("code_execution_output"),
|
|
595355
|
+
file_id: external_exports2.string()
|
|
595356
|
+
})
|
|
595357
|
+
).optional().default([])
|
|
595358
|
+
}),
|
|
595359
|
+
external_exports2.object({
|
|
595360
|
+
type: external_exports2.literal("encrypted_code_execution_result"),
|
|
595361
|
+
encrypted_stdout: external_exports2.string(),
|
|
595362
|
+
stderr: external_exports2.string(),
|
|
595363
|
+
return_code: external_exports2.number(),
|
|
595364
|
+
content: external_exports2.array(
|
|
595365
|
+
external_exports2.object({
|
|
595366
|
+
type: external_exports2.literal("code_execution_output"),
|
|
595367
|
+
file_id: external_exports2.string()
|
|
595368
|
+
})
|
|
595369
|
+
).optional().default([])
|
|
595370
|
+
}),
|
|
595371
|
+
external_exports2.object({
|
|
595372
|
+
type: external_exports2.literal("bash_code_execution_result"),
|
|
595373
|
+
content: external_exports2.array(
|
|
595374
|
+
external_exports2.object({
|
|
595375
|
+
type: external_exports2.literal("bash_code_execution_output"),
|
|
595376
|
+
file_id: external_exports2.string()
|
|
595377
|
+
})
|
|
595378
|
+
),
|
|
595379
|
+
stdout: external_exports2.string(),
|
|
595380
|
+
stderr: external_exports2.string(),
|
|
595381
|
+
return_code: external_exports2.number()
|
|
595382
|
+
}),
|
|
595383
|
+
external_exports2.object({
|
|
595384
|
+
type: external_exports2.literal("bash_code_execution_tool_result_error"),
|
|
595385
|
+
error_code: external_exports2.string()
|
|
595386
|
+
}),
|
|
595387
|
+
external_exports2.object({
|
|
595388
|
+
type: external_exports2.literal("text_editor_code_execution_tool_result_error"),
|
|
595389
|
+
error_code: external_exports2.string()
|
|
595390
|
+
}),
|
|
595391
|
+
external_exports2.object({
|
|
595392
|
+
type: external_exports2.literal("text_editor_code_execution_view_result"),
|
|
595393
|
+
content: external_exports2.string(),
|
|
595394
|
+
file_type: external_exports2.string(),
|
|
595395
|
+
num_lines: external_exports2.number().nullable(),
|
|
595396
|
+
start_line: external_exports2.number().nullable(),
|
|
595397
|
+
total_lines: external_exports2.number().nullable()
|
|
595398
|
+
}),
|
|
595399
|
+
external_exports2.object({
|
|
595400
|
+
type: external_exports2.literal("text_editor_code_execution_create_result"),
|
|
595401
|
+
is_file_update: external_exports2.boolean()
|
|
595402
|
+
}),
|
|
595403
|
+
external_exports2.object({
|
|
595404
|
+
type: external_exports2.literal("text_editor_code_execution_str_replace_result"),
|
|
595405
|
+
lines: external_exports2.array(external_exports2.string()).nullable(),
|
|
595406
|
+
new_lines: external_exports2.number().nullable(),
|
|
595407
|
+
new_start: external_exports2.number().nullable(),
|
|
595408
|
+
old_lines: external_exports2.number().nullable(),
|
|
595409
|
+
old_start: external_exports2.number().nullable()
|
|
595410
|
+
})
|
|
595411
|
+
])
|
|
595412
|
+
)
|
|
595413
|
+
);
|
|
595414
|
+
var codeExecution_20260120InputSchema = lazySchema(
|
|
595415
|
+
() => zodSchema3(
|
|
595416
|
+
external_exports2.discriminatedUnion("type", [
|
|
595417
|
+
external_exports2.object({
|
|
595418
|
+
type: external_exports2.literal("programmatic-tool-call"),
|
|
595419
|
+
code: external_exports2.string()
|
|
595420
|
+
}),
|
|
595421
|
+
external_exports2.object({
|
|
595422
|
+
type: external_exports2.literal("bash_code_execution"),
|
|
595423
|
+
command: external_exports2.string()
|
|
595424
|
+
}),
|
|
595425
|
+
external_exports2.discriminatedUnion("command", [
|
|
595426
|
+
external_exports2.object({
|
|
595427
|
+
type: external_exports2.literal("text_editor_code_execution"),
|
|
595428
|
+
command: external_exports2.literal("view"),
|
|
595429
|
+
path: external_exports2.string()
|
|
595430
|
+
}),
|
|
595431
|
+
external_exports2.object({
|
|
595432
|
+
type: external_exports2.literal("text_editor_code_execution"),
|
|
595433
|
+
command: external_exports2.literal("create"),
|
|
595434
|
+
path: external_exports2.string(),
|
|
595435
|
+
file_text: external_exports2.string().nullish()
|
|
595436
|
+
}),
|
|
595437
|
+
external_exports2.object({
|
|
595438
|
+
type: external_exports2.literal("text_editor_code_execution"),
|
|
595439
|
+
command: external_exports2.literal("str_replace"),
|
|
595440
|
+
path: external_exports2.string(),
|
|
595441
|
+
old_str: external_exports2.string(),
|
|
595442
|
+
new_str: external_exports2.string()
|
|
595443
|
+
})
|
|
595444
|
+
])
|
|
595445
|
+
])
|
|
595446
|
+
)
|
|
595447
|
+
);
|
|
595448
|
+
var factory8 = createProviderToolFactoryWithOutputSchema({
|
|
595449
|
+
id: "anthropic.code_execution_20260120",
|
|
595450
|
+
inputSchema: codeExecution_20260120InputSchema,
|
|
595451
|
+
outputSchema: codeExecution_20260120OutputSchema,
|
|
595452
|
+
supportsDeferredResults: true
|
|
595453
|
+
});
|
|
595454
|
+
var codeExecution_20260120 = (args = {}) => {
|
|
595455
|
+
return factory8(args);
|
|
594792
595456
|
};
|
|
594793
595457
|
var toolSearchRegex_20251119OutputSchema = lazySchema(
|
|
594794
595458
|
() => zodSchema3(
|
|
@@ -594821,18 +595485,18 @@ var toolSearchRegex_20251119InputSchema = lazySchema(
|
|
|
594821
595485
|
})
|
|
594822
595486
|
)
|
|
594823
595487
|
);
|
|
594824
|
-
var
|
|
595488
|
+
var factory9 = createProviderToolFactoryWithOutputSchema({
|
|
594825
595489
|
id: "anthropic.tool_search_regex_20251119",
|
|
594826
595490
|
inputSchema: toolSearchRegex_20251119InputSchema,
|
|
594827
595491
|
outputSchema: toolSearchRegex_20251119OutputSchema,
|
|
594828
595492
|
supportsDeferredResults: true
|
|
594829
595493
|
});
|
|
594830
595494
|
var toolSearchRegex_20251119 = (args = {}) => {
|
|
594831
|
-
return
|
|
595495
|
+
return factory9(args);
|
|
594832
595496
|
};
|
|
594833
595497
|
function convertToString(data3) {
|
|
594834
595498
|
if (typeof data3 === "string") {
|
|
594835
|
-
return
|
|
595499
|
+
return new TextDecoder().decode(convertBase64ToUint8Array(data3));
|
|
594836
595500
|
}
|
|
594837
595501
|
if (data3 instanceof Uint8Array) {
|
|
594838
595502
|
return new TextDecoder().decode(data3);
|
|
@@ -594862,7 +595526,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
594862
595526
|
cacheControlValidator,
|
|
594863
595527
|
toolNameMapping
|
|
594864
595528
|
}) {
|
|
594865
|
-
var _a21, _b17, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
595529
|
+
var _a21, _b17, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
594866
595530
|
const betas = /* @__PURE__ */ new Set();
|
|
594867
595531
|
const blocks = groupIntoBlocks(prompt);
|
|
594868
595532
|
const validator = cacheControlValidator || new CacheControlValidator();
|
|
@@ -595300,8 +595964,8 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
595300
595964
|
break;
|
|
595301
595965
|
}
|
|
595302
595966
|
const callerOptions = (_l = part.providerOptions) == null ? void 0 : _l.anthropic;
|
|
595303
|
-
const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? callerOptions.caller.type === "code_execution_20250825" && callerOptions.caller.toolId ? {
|
|
595304
|
-
type:
|
|
595967
|
+
const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? (callerOptions.caller.type === "code_execution_20250825" || callerOptions.caller.type === "code_execution_20260120") && callerOptions.caller.toolId ? {
|
|
595968
|
+
type: callerOptions.caller.type,
|
|
595305
595969
|
tool_id: callerOptions.caller.toolId
|
|
595306
595970
|
} : callerOptions.caller.type === "direct" ? { type: "direct" } : void 0 : void 0;
|
|
595307
595971
|
anthropicContent.push({
|
|
@@ -595400,6 +596064,25 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
595400
596064
|
},
|
|
595401
596065
|
cache_control: cacheControl
|
|
595402
596066
|
});
|
|
596067
|
+
} else if (output.value.type === "encrypted_code_execution_result") {
|
|
596068
|
+
const codeExecutionOutput = await validateTypes2({
|
|
596069
|
+
value: output.value,
|
|
596070
|
+
schema: codeExecution_20260120OutputSchema
|
|
596071
|
+
});
|
|
596072
|
+
if (codeExecutionOutput.type === "encrypted_code_execution_result") {
|
|
596073
|
+
anthropicContent.push({
|
|
596074
|
+
type: "code_execution_tool_result",
|
|
596075
|
+
tool_use_id: part.toolCallId,
|
|
596076
|
+
content: {
|
|
596077
|
+
type: codeExecutionOutput.type,
|
|
596078
|
+
encrypted_stdout: codeExecutionOutput.encrypted_stdout,
|
|
596079
|
+
stderr: codeExecutionOutput.stderr,
|
|
596080
|
+
return_code: codeExecutionOutput.return_code,
|
|
596081
|
+
content: (_p = codeExecutionOutput.content) != null ? _p : []
|
|
596082
|
+
},
|
|
596083
|
+
cache_control: cacheControl
|
|
596084
|
+
});
|
|
596085
|
+
}
|
|
595403
596086
|
} else {
|
|
595404
596087
|
const codeExecutionOutput = await validateTypes2({
|
|
595405
596088
|
value: output.value,
|
|
@@ -595414,7 +596097,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
595414
596097
|
stdout: codeExecutionOutput.stdout,
|
|
595415
596098
|
stderr: codeExecutionOutput.stderr,
|
|
595416
596099
|
return_code: codeExecutionOutput.return_code,
|
|
595417
|
-
content: (
|
|
596100
|
+
content: (_q = codeExecutionOutput.content) != null ? _q : []
|
|
595418
596101
|
},
|
|
595419
596102
|
cache_control: cacheControl
|
|
595420
596103
|
});
|
|
@@ -595447,9 +596130,9 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
595447
596130
|
errorValue = output.value;
|
|
595448
596131
|
}
|
|
595449
596132
|
} catch (e) {
|
|
595450
|
-
const extractedErrorCode = (
|
|
596133
|
+
const extractedErrorCode = (_r = output.value) == null ? void 0 : _r.errorCode;
|
|
595451
596134
|
errorValue = {
|
|
595452
|
-
errorCode: typeof extractedErrorCode === "string" ? extractedErrorCode : "
|
|
596135
|
+
errorCode: typeof extractedErrorCode === "string" ? extractedErrorCode : "unavailable"
|
|
595453
596136
|
};
|
|
595454
596137
|
}
|
|
595455
596138
|
anthropicContent.push({
|
|
@@ -595457,7 +596140,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
595457
596140
|
tool_use_id: part.toolCallId,
|
|
595458
596141
|
content: {
|
|
595459
596142
|
type: "web_fetch_tool_result_error",
|
|
595460
|
-
error_code: (
|
|
596143
|
+
error_code: (_s = errorValue.errorCode) != null ? _s : "unavailable"
|
|
595461
596144
|
},
|
|
595462
596145
|
cache_control: cacheControl
|
|
595463
596146
|
});
|
|
@@ -595730,7 +596413,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
595730
596413
|
providerOptions,
|
|
595731
596414
|
stream: stream5
|
|
595732
596415
|
}) {
|
|
595733
|
-
var _a21, _b17, _c, _d, _e, _f;
|
|
596416
|
+
var _a21, _b17, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
595734
596417
|
const warnings = [];
|
|
595735
596418
|
if (frequencyPenalty != null) {
|
|
595736
596419
|
warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
|
|
@@ -595785,10 +596468,39 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
595785
596468
|
const {
|
|
595786
596469
|
maxOutputTokens: maxOutputTokensForModel,
|
|
595787
596470
|
supportsStructuredOutput: modelSupportsStructuredOutput,
|
|
596471
|
+
rejectsSamplingParameters,
|
|
595788
596472
|
isKnownModel
|
|
595789
596473
|
} = getModelCapabilities(this.modelId);
|
|
596474
|
+
if (rejectsSamplingParameters) {
|
|
596475
|
+
if (temperature != null) {
|
|
596476
|
+
warnings.push({
|
|
596477
|
+
type: "unsupported",
|
|
596478
|
+
feature: "temperature",
|
|
596479
|
+
details: `temperature is not supported by ${this.modelId} and will be ignored`
|
|
596480
|
+
});
|
|
596481
|
+
temperature = void 0;
|
|
596482
|
+
}
|
|
596483
|
+
if (topK != null) {
|
|
596484
|
+
warnings.push({
|
|
596485
|
+
type: "unsupported",
|
|
596486
|
+
feature: "topK",
|
|
596487
|
+
details: `topK is not supported by ${this.modelId} and will be ignored`
|
|
596488
|
+
});
|
|
596489
|
+
topK = void 0;
|
|
596490
|
+
}
|
|
596491
|
+
if (topP != null) {
|
|
596492
|
+
warnings.push({
|
|
596493
|
+
type: "unsupported",
|
|
596494
|
+
feature: "topP",
|
|
596495
|
+
details: `topP is not supported by ${this.modelId} and will be ignored`
|
|
596496
|
+
});
|
|
596497
|
+
topP = void 0;
|
|
596498
|
+
}
|
|
596499
|
+
}
|
|
596500
|
+
const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
|
|
595790
596501
|
const supportsStructuredOutput = ((_a21 = this.config.supportsNativeStructuredOutput) != null ? _a21 : true) && modelSupportsStructuredOutput;
|
|
595791
|
-
const
|
|
596502
|
+
const supportsStrictTools = ((_b17 = this.config.supportsStrictTools) != null ? _b17 : true) && modelSupportsStructuredOutput;
|
|
596503
|
+
const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
|
|
595792
596504
|
const useStructuredOutput = structureOutputMode === "outputFormat" || structureOutputMode === "auto" && supportsStructuredOutput;
|
|
595793
596505
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useStructuredOutput ? {
|
|
595794
596506
|
type: "function",
|
|
@@ -595803,6 +596515,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
595803
596515
|
providerToolNames: {
|
|
595804
596516
|
"anthropic.code_execution_20250522": "code_execution",
|
|
595805
596517
|
"anthropic.code_execution_20250825": "code_execution",
|
|
596518
|
+
"anthropic.code_execution_20260120": "code_execution",
|
|
595806
596519
|
"anthropic.computer_20241022": "computer",
|
|
595807
596520
|
"anthropic.computer_20250124": "computer",
|
|
595808
596521
|
"anthropic.text_editor_20241022": "str_replace_editor",
|
|
@@ -595813,21 +596526,24 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
595813
596526
|
"anthropic.bash_20250124": "bash",
|
|
595814
596527
|
"anthropic.memory_20250818": "memory",
|
|
595815
596528
|
"anthropic.web_search_20250305": "web_search",
|
|
596529
|
+
"anthropic.web_search_20260209": "web_search",
|
|
595816
596530
|
"anthropic.web_fetch_20250910": "web_fetch",
|
|
596531
|
+
"anthropic.web_fetch_20260209": "web_fetch",
|
|
595817
596532
|
"anthropic.tool_search_regex_20251119": "tool_search_tool_regex",
|
|
595818
596533
|
"anthropic.tool_search_bm25_20251119": "tool_search_tool_bm25"
|
|
595819
596534
|
}
|
|
595820
596535
|
});
|
|
595821
596536
|
const { prompt: messagesPrompt, betas } = await convertToAnthropicMessagesPrompt({
|
|
595822
596537
|
prompt,
|
|
595823
|
-
sendReasoning: (
|
|
596538
|
+
sendReasoning: (_d = anthropicOptions == null ? void 0 : anthropicOptions.sendReasoning) != null ? _d : true,
|
|
595824
596539
|
warnings,
|
|
595825
596540
|
cacheControlValidator,
|
|
595826
596541
|
toolNameMapping
|
|
595827
596542
|
});
|
|
595828
|
-
const thinkingType = (
|
|
596543
|
+
const thinkingType = (_e = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _e.type;
|
|
595829
596544
|
const isThinking = thinkingType === "enabled" || thinkingType === "adaptive";
|
|
595830
|
-
let thinkingBudget = thinkingType === "enabled" ? (
|
|
596545
|
+
let thinkingBudget = thinkingType === "enabled" ? (_f = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _f.budgetTokens : void 0;
|
|
596546
|
+
const thinkingDisplay = thinkingType === "adaptive" ? (_g = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _g.display : void 0;
|
|
595831
596547
|
const maxTokens = maxOutputTokens != null ? maxOutputTokens : maxOutputTokensForModel;
|
|
595832
596548
|
const baseArgs = {
|
|
595833
596549
|
// model id:
|
|
@@ -595842,21 +596558,43 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
595842
596558
|
...isThinking && {
|
|
595843
596559
|
thinking: {
|
|
595844
596560
|
type: thinkingType,
|
|
595845
|
-
...thinkingBudget != null && { budget_tokens: thinkingBudget }
|
|
596561
|
+
...thinkingBudget != null && { budget_tokens: thinkingBudget },
|
|
596562
|
+
...thinkingDisplay != null && { display: thinkingDisplay }
|
|
595846
596563
|
}
|
|
595847
596564
|
},
|
|
595848
|
-
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
595849
|
-
output_config: {
|
|
596565
|
+
...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
|
596566
|
+
output_config: {
|
|
596567
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
596568
|
+
effort: anthropicOptions.effort
|
|
596569
|
+
},
|
|
596570
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) && {
|
|
596571
|
+
task_budget: {
|
|
596572
|
+
type: anthropicOptions.taskBudget.type,
|
|
596573
|
+
total: anthropicOptions.taskBudget.total,
|
|
596574
|
+
...anthropicOptions.taskBudget.remaining != null && {
|
|
596575
|
+
remaining: anthropicOptions.taskBudget.remaining
|
|
596576
|
+
}
|
|
596577
|
+
}
|
|
596578
|
+
},
|
|
596579
|
+
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
596580
|
+
format: {
|
|
596581
|
+
type: "json_schema",
|
|
596582
|
+
schema: responseFormat.schema
|
|
596583
|
+
}
|
|
596584
|
+
}
|
|
596585
|
+
}
|
|
595850
596586
|
},
|
|
595851
596587
|
...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
|
|
595852
596588
|
speed: anthropicOptions.speed
|
|
595853
596589
|
},
|
|
595854
|
-
|
|
595855
|
-
|
|
595856
|
-
|
|
595857
|
-
|
|
595858
|
-
|
|
595859
|
-
|
|
596590
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.inferenceGeo) && {
|
|
596591
|
+
inference_geo: anthropicOptions.inferenceGeo
|
|
596592
|
+
},
|
|
596593
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
|
|
596594
|
+
cache_control: anthropicOptions.cacheControl
|
|
596595
|
+
},
|
|
596596
|
+
...((_h = anthropicOptions == null ? void 0 : anthropicOptions.metadata) == null ? void 0 : _h.userId) != null && {
|
|
596597
|
+
metadata: { user_id: anthropicOptions.metadata.userId }
|
|
595860
596598
|
},
|
|
595861
596599
|
// mcp servers:
|
|
595862
596600
|
...(anthropicOptions == null ? void 0 : anthropicOptions.mcpServers) && anthropicOptions.mcpServers.length > 0 && {
|
|
@@ -595981,7 +596719,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
595981
596719
|
}
|
|
595982
596720
|
baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
|
|
595983
596721
|
} else {
|
|
595984
|
-
if (topP != null && temperature != null) {
|
|
596722
|
+
if (isAnthropicModel && topP != null && temperature != null) {
|
|
595985
596723
|
warnings.push({
|
|
595986
596724
|
type: "unsupported",
|
|
595987
596725
|
feature: "topP",
|
|
@@ -596014,7 +596752,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596014
596752
|
betas.add("skills-2025-10-02");
|
|
596015
596753
|
betas.add("files-api-2025-04-14");
|
|
596016
596754
|
if (!(tools == null ? void 0 : tools.some(
|
|
596017
|
-
(tool3) => tool3.type === "provider" && tool3.id === "anthropic.code_execution_20250825"
|
|
596755
|
+
(tool3) => tool3.type === "provider" && (tool3.id === "anthropic.code_execution_20250825" || tool3.id === "anthropic.code_execution_20260120")
|
|
596018
596756
|
))) {
|
|
596019
596757
|
warnings.push({
|
|
596020
596758
|
type: "other",
|
|
@@ -596025,16 +596763,13 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596025
596763
|
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
596026
596764
|
betas.add("effort-2025-11-24");
|
|
596027
596765
|
}
|
|
596766
|
+
if (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) {
|
|
596767
|
+
betas.add("task-budgets-2026-03-13");
|
|
596768
|
+
}
|
|
596028
596769
|
if ((anthropicOptions == null ? void 0 : anthropicOptions.speed) === "fast") {
|
|
596029
596770
|
betas.add("fast-mode-2026-02-01");
|
|
596030
596771
|
}
|
|
596031
|
-
|
|
596032
|
-
betas.add("fine-grained-tool-streaming-2025-05-14");
|
|
596033
|
-
}
|
|
596034
|
-
const usingNativeOutputFormat = useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null;
|
|
596035
|
-
if (usingNativeOutputFormat) {
|
|
596036
|
-
betas.add("structured-outputs-2025-11-13");
|
|
596037
|
-
}
|
|
596772
|
+
const defaultEagerInputStreaming = stream5 && ((_i = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _i : true);
|
|
596038
596773
|
const {
|
|
596039
596774
|
tools: anthropicTools2,
|
|
596040
596775
|
toolChoice: anthropicToolChoice,
|
|
@@ -596046,13 +596781,17 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596046
596781
|
toolChoice: { type: "required" },
|
|
596047
596782
|
disableParallelToolUse: true,
|
|
596048
596783
|
cacheControlValidator,
|
|
596049
|
-
supportsStructuredOutput: false
|
|
596784
|
+
supportsStructuredOutput: false,
|
|
596785
|
+
supportsStrictTools,
|
|
596786
|
+
defaultEagerInputStreaming
|
|
596050
596787
|
} : {
|
|
596051
596788
|
tools: tools != null ? tools : [],
|
|
596052
596789
|
toolChoice,
|
|
596053
596790
|
disableParallelToolUse: anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse,
|
|
596054
596791
|
cacheControlValidator,
|
|
596055
|
-
supportsStructuredOutput
|
|
596792
|
+
supportsStructuredOutput,
|
|
596793
|
+
supportsStrictTools,
|
|
596794
|
+
defaultEagerInputStreaming
|
|
596056
596795
|
}
|
|
596057
596796
|
);
|
|
596058
596797
|
const cacheWarnings = cacheControlValidator.getWarnings();
|
|
@@ -596065,7 +596804,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596065
596804
|
// do not send when not streaming
|
|
596066
596805
|
},
|
|
596067
596806
|
warnings: [...warnings, ...toolWarnings, ...cacheWarnings],
|
|
596068
|
-
betas: /* @__PURE__ */ new Set([
|
|
596807
|
+
betas: /* @__PURE__ */ new Set([
|
|
596808
|
+
...betas,
|
|
596809
|
+
...toolsBetas,
|
|
596810
|
+
...userSuppliedBetas,
|
|
596811
|
+
...(_j = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _j : []
|
|
596812
|
+
]),
|
|
596069
596813
|
usesJsonResponseTool: jsonResponseTool != null,
|
|
596070
596814
|
toolNameMapping,
|
|
596071
596815
|
providerOptionsName,
|
|
@@ -596098,9 +596842,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596098
596842
|
var _a21, _b17, _c;
|
|
596099
596843
|
return (_c = (_b17 = (_a21 = this.config).buildRequestUrl) == null ? void 0 : _b17.call(_a21, this.config.baseURL, isStreaming)) != null ? _c : `${this.config.baseURL}/messages`;
|
|
596100
596844
|
}
|
|
596101
|
-
transformRequestBody(args) {
|
|
596845
|
+
transformRequestBody(args, betas) {
|
|
596102
596846
|
var _a21, _b17, _c;
|
|
596103
|
-
return (_c = (_b17 = (_a21 = this.config).transformRequestBody) == null ? void 0 : _b17.call(_a21, args)) != null ? _c : args;
|
|
596847
|
+
return (_c = (_b17 = (_a21 = this.config).transformRequestBody) == null ? void 0 : _b17.call(_a21, args, betas)) != null ? _c : args;
|
|
596104
596848
|
}
|
|
596105
596849
|
extractCitationDocuments(prompt) {
|
|
596106
596850
|
const isCitationPart = (part) => {
|
|
@@ -596126,7 +596870,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596126
596870
|
});
|
|
596127
596871
|
}
|
|
596128
596872
|
async doGenerate(options8) {
|
|
596129
|
-
var _a21, _b17, _c, _d, _e, _f;
|
|
596873
|
+
var _a21, _b17, _c, _d, _e, _f, _g;
|
|
596130
596874
|
const {
|
|
596131
596875
|
args,
|
|
596132
596876
|
warnings,
|
|
@@ -596143,6 +596887,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596143
596887
|
const citationDocuments = [
|
|
596144
596888
|
...this.extractCitationDocuments(options8.prompt)
|
|
596145
596889
|
];
|
|
596890
|
+
const markCodeExecutionDynamic = hasWebTool20260209WithoutCodeExecution(
|
|
596891
|
+
args.tools
|
|
596892
|
+
);
|
|
596146
596893
|
const {
|
|
596147
596894
|
responseHeaders,
|
|
596148
596895
|
value: response,
|
|
@@ -596150,7 +596897,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596150
596897
|
} = await postJsonToApi2({
|
|
596151
596898
|
url: this.buildRequestUrl(false),
|
|
596152
596899
|
headers: await this.getHeaders({ betas, headers: options8.headers }),
|
|
596153
|
-
body: this.transformRequestBody(args),
|
|
596900
|
+
body: this.transformRequestBody(args, betas),
|
|
596154
596901
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
596155
596902
|
successfulResponseHandler: createJsonResponseHandler(
|
|
596156
596903
|
anthropicMessagesResponseSchema
|
|
@@ -596264,7 +597011,10 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596264
597011
|
toolCallId: part.id,
|
|
596265
597012
|
toolName: toolNameMapping.toCustomToolName(part.name),
|
|
596266
597013
|
input: JSON.stringify(inputToSerialize),
|
|
596267
|
-
providerExecuted: true
|
|
597014
|
+
providerExecuted: true,
|
|
597015
|
+
// We want this 'code_execution' tool call to be allowed even if the tool is not explicitly provided.
|
|
597016
|
+
// Since the validation generally bypasses dynamic tools, we mark this specific tool as dynamic.
|
|
597017
|
+
...markCodeExecutionDynamic && part.name === "code_execution" ? { dynamic: true } : {}
|
|
596268
597018
|
});
|
|
596269
597019
|
} else if (part.name === "tool_search_tool_regex" || part.name === "tool_search_tool_bm25") {
|
|
596270
597020
|
serverToolCalls[part.id] = part.name;
|
|
@@ -596408,6 +597158,19 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596408
597158
|
content: (_c = part.content.content) != null ? _c : []
|
|
596409
597159
|
}
|
|
596410
597160
|
});
|
|
597161
|
+
} else if (part.content.type === "encrypted_code_execution_result") {
|
|
597162
|
+
content9.push({
|
|
597163
|
+
type: "tool-result",
|
|
597164
|
+
toolCallId: part.tool_use_id,
|
|
597165
|
+
toolName: toolNameMapping.toCustomToolName("code_execution"),
|
|
597166
|
+
result: {
|
|
597167
|
+
type: part.content.type,
|
|
597168
|
+
encrypted_stdout: part.content.encrypted_stdout,
|
|
597169
|
+
stderr: part.content.stderr,
|
|
597170
|
+
return_code: part.content.return_code,
|
|
597171
|
+
content: (_d = part.content.content) != null ? _d : []
|
|
597172
|
+
}
|
|
597173
|
+
});
|
|
596411
597174
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
596412
597175
|
content9.push({
|
|
596413
597176
|
type: "tool-result",
|
|
@@ -596484,13 +597247,13 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596484
597247
|
finishReason: response.stop_reason,
|
|
596485
597248
|
isJsonResponseFromTool
|
|
596486
597249
|
}),
|
|
596487
|
-
raw: (
|
|
597250
|
+
raw: (_e = response.stop_reason) != null ? _e : void 0
|
|
596488
597251
|
},
|
|
596489
597252
|
usage: convertAnthropicMessagesUsage({ usage: response.usage }),
|
|
596490
597253
|
request: { body: args },
|
|
596491
597254
|
response: {
|
|
596492
|
-
id: (
|
|
596493
|
-
modelId: (
|
|
597255
|
+
id: (_f = response.id) != null ? _f : void 0,
|
|
597256
|
+
modelId: (_g = response.model) != null ? _g : void 0,
|
|
596494
597257
|
headers: responseHeaders,
|
|
596495
597258
|
body: rawResponse
|
|
596496
597259
|
},
|
|
@@ -596547,11 +597310,14 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596547
597310
|
const citationDocuments = [
|
|
596548
597311
|
...this.extractCitationDocuments(options8.prompt)
|
|
596549
597312
|
];
|
|
597313
|
+
const markCodeExecutionDynamic = hasWebTool20260209WithoutCodeExecution(
|
|
597314
|
+
body.tools
|
|
597315
|
+
);
|
|
596550
597316
|
const url4 = this.buildRequestUrl(true);
|
|
596551
597317
|
const { responseHeaders, value: response } = await postJsonToApi2({
|
|
596552
597318
|
url: url4,
|
|
596553
597319
|
headers: await this.getHeaders({ betas, headers: options8.headers }),
|
|
596554
|
-
body: this.transformRequestBody(body),
|
|
597320
|
+
body: this.transformRequestBody(body, betas),
|
|
596555
597321
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
596556
597322
|
successfulResponseHandler: createEventSourceResponseHandler(
|
|
596557
597323
|
anthropicMessagesChunkSchema
|
|
@@ -596587,7 +597353,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596587
597353
|
controller.enqueue({ type: "stream-start", warnings });
|
|
596588
597354
|
},
|
|
596589
597355
|
transform(chunk, controller) {
|
|
596590
|
-
var _a22, _b22, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
597356
|
+
var _a22, _b22, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
596591
597357
|
if (options8.includeRawChunks) {
|
|
596592
597358
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
596593
597359
|
}
|
|
@@ -596696,12 +597462,14 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596696
597462
|
].includes(part.name)) {
|
|
596697
597463
|
const providerToolName = part.name === "text_editor_code_execution" || part.name === "bash_code_execution" ? "code_execution" : part.name;
|
|
596698
597464
|
const customToolName = toolNameMapping.toCustomToolName(providerToolName);
|
|
597465
|
+
const finalInput = part.input != null && typeof part.input === "object" && Object.keys(part.input).length > 0 ? JSON.stringify(part.input) : "";
|
|
596699
597466
|
contentBlocks[value2.index] = {
|
|
596700
597467
|
type: "tool-call",
|
|
596701
597468
|
toolCallId: part.id,
|
|
596702
597469
|
toolName: customToolName,
|
|
596703
|
-
input:
|
|
597470
|
+
input: finalInput,
|
|
596704
597471
|
providerExecuted: true,
|
|
597472
|
+
...markCodeExecutionDynamic && providerToolName === "code_execution" ? { dynamic: true } : {},
|
|
596705
597473
|
firstDelta: true,
|
|
596706
597474
|
providerToolName: part.name
|
|
596707
597475
|
};
|
|
@@ -596709,7 +597477,8 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596709
597477
|
type: "tool-input-start",
|
|
596710
597478
|
id: part.id,
|
|
596711
597479
|
toolName: customToolName,
|
|
596712
|
-
providerExecuted: true
|
|
597480
|
+
providerExecuted: true,
|
|
597481
|
+
...markCodeExecutionDynamic && providerToolName === "code_execution" ? { dynamic: true } : {}
|
|
596713
597482
|
});
|
|
596714
597483
|
} else if (part.name === "tool_search_tool_regex" || part.name === "tool_search_tool_bm25") {
|
|
596715
597484
|
serverToolCalls[part.id] = part.name;
|
|
@@ -596834,6 +597603,19 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596834
597603
|
content: (_c = part.content.content) != null ? _c : []
|
|
596835
597604
|
}
|
|
596836
597605
|
});
|
|
597606
|
+
} else if (part.content.type === "encrypted_code_execution_result") {
|
|
597607
|
+
controller.enqueue({
|
|
597608
|
+
type: "tool-result",
|
|
597609
|
+
toolCallId: part.tool_use_id,
|
|
597610
|
+
toolName: toolNameMapping.toCustomToolName("code_execution"),
|
|
597611
|
+
result: {
|
|
597612
|
+
type: part.content.type,
|
|
597613
|
+
encrypted_stdout: part.content.encrypted_stdout,
|
|
597614
|
+
stderr: part.content.stderr,
|
|
597615
|
+
return_code: part.content.return_code,
|
|
597616
|
+
content: (_d = part.content.content) != null ? _d : []
|
|
597617
|
+
}
|
|
597618
|
+
});
|
|
596837
597619
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
596838
597620
|
controller.enqueue({
|
|
596839
597621
|
type: "tool-result",
|
|
@@ -596983,6 +597765,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596983
597765
|
toolName: contentBlock.toolName,
|
|
596984
597766
|
input: finalInput,
|
|
596985
597767
|
providerExecuted: contentBlock.providerExecuted,
|
|
597768
|
+
...markCodeExecutionDynamic && contentBlock.providerToolName === "code_execution" ? { dynamic: true } : {},
|
|
596986
597769
|
...contentBlock.caller && {
|
|
596987
597770
|
providerMetadata: {
|
|
596988
597771
|
anthropic: {
|
|
@@ -597100,12 +597883,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597100
597883
|
}
|
|
597101
597884
|
case "message_start": {
|
|
597102
597885
|
usage.input_tokens = value2.message.usage.input_tokens;
|
|
597103
|
-
usage.cache_read_input_tokens = (
|
|
597104
|
-
usage.cache_creation_input_tokens = (
|
|
597886
|
+
usage.cache_read_input_tokens = (_e = value2.message.usage.cache_read_input_tokens) != null ? _e : 0;
|
|
597887
|
+
usage.cache_creation_input_tokens = (_f = value2.message.usage.cache_creation_input_tokens) != null ? _f : 0;
|
|
597105
597888
|
rawUsage = {
|
|
597106
597889
|
...value2.message.usage
|
|
597107
597890
|
};
|
|
597108
|
-
cacheCreationInputTokens = (
|
|
597891
|
+
cacheCreationInputTokens = (_g = value2.message.usage.cache_creation_input_tokens) != null ? _g : null;
|
|
597109
597892
|
if (value2.message.container != null) {
|
|
597110
597893
|
container = {
|
|
597111
597894
|
expiresAt: value2.message.container.expires_at,
|
|
@@ -597124,8 +597907,8 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597124
597907
|
}
|
|
597125
597908
|
controller.enqueue({
|
|
597126
597909
|
type: "response-metadata",
|
|
597127
|
-
id: (
|
|
597128
|
-
modelId: (
|
|
597910
|
+
id: (_h = value2.message.id) != null ? _h : void 0,
|
|
597911
|
+
modelId: (_i = value2.message.model) != null ? _i : void 0
|
|
597129
597912
|
});
|
|
597130
597913
|
if (value2.message.content != null) {
|
|
597131
597914
|
for (let contentIndex = 0; contentIndex < value2.message.content.length; contentIndex++) {
|
|
@@ -597141,7 +597924,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597141
597924
|
id: part.id,
|
|
597142
597925
|
toolName: part.name
|
|
597143
597926
|
});
|
|
597144
|
-
const inputStr = JSON.stringify((
|
|
597927
|
+
const inputStr = JSON.stringify((_j = part.input) != null ? _j : {});
|
|
597145
597928
|
controller.enqueue({
|
|
597146
597929
|
type: "tool-input-delta",
|
|
597147
597930
|
id: part.id,
|
|
@@ -597189,17 +597972,17 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597189
597972
|
finishReason: value2.delta.stop_reason,
|
|
597190
597973
|
isJsonResponseFromTool
|
|
597191
597974
|
}),
|
|
597192
|
-
raw: (
|
|
597975
|
+
raw: (_k = value2.delta.stop_reason) != null ? _k : void 0
|
|
597193
597976
|
};
|
|
597194
|
-
stopSequence = (
|
|
597977
|
+
stopSequence = (_l = value2.delta.stop_sequence) != null ? _l : null;
|
|
597195
597978
|
container = value2.delta.container != null ? {
|
|
597196
597979
|
expiresAt: value2.delta.container.expires_at,
|
|
597197
597980
|
id: value2.delta.container.id,
|
|
597198
|
-
skills: (
|
|
597981
|
+
skills: (_n = (_m = value2.delta.container.skills) == null ? void 0 : _m.map((skill) => ({
|
|
597199
597982
|
type: skill.type,
|
|
597200
597983
|
skillId: skill.skill_id,
|
|
597201
597984
|
version: skill.version
|
|
597202
|
-
}))) != null ?
|
|
597985
|
+
}))) != null ? _n : null
|
|
597203
597986
|
} : null;
|
|
597204
597987
|
if (value2.context_management) {
|
|
597205
597988
|
contextManagement = mapAnthropicResponseContextManagement(
|
|
@@ -597284,56 +598067,82 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597284
598067
|
}
|
|
597285
598068
|
};
|
|
597286
598069
|
function getModelCapabilities(modelId) {
|
|
597287
|
-
if (modelId.includes("claude-
|
|
598070
|
+
if (modelId.includes("claude-opus-4-7")) {
|
|
597288
598071
|
return {
|
|
597289
598072
|
maxOutputTokens: 128e3,
|
|
597290
598073
|
supportsStructuredOutput: true,
|
|
598074
|
+
rejectsSamplingParameters: true,
|
|
598075
|
+
isKnownModel: true
|
|
598076
|
+
};
|
|
598077
|
+
} else if (modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-opus-4-6")) {
|
|
598078
|
+
return {
|
|
598079
|
+
maxOutputTokens: 128e3,
|
|
598080
|
+
supportsStructuredOutput: true,
|
|
598081
|
+
rejectsSamplingParameters: false,
|
|
597291
598082
|
isKnownModel: true
|
|
597292
598083
|
};
|
|
597293
598084
|
} else if (modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5") || modelId.includes("claude-haiku-4-5")) {
|
|
597294
598085
|
return {
|
|
597295
598086
|
maxOutputTokens: 64e3,
|
|
597296
598087
|
supportsStructuredOutput: true,
|
|
598088
|
+
rejectsSamplingParameters: false,
|
|
597297
598089
|
isKnownModel: true
|
|
597298
598090
|
};
|
|
597299
598091
|
} else if (modelId.includes("claude-opus-4-1")) {
|
|
597300
598092
|
return {
|
|
597301
598093
|
maxOutputTokens: 32e3,
|
|
597302
598094
|
supportsStructuredOutput: true,
|
|
598095
|
+
rejectsSamplingParameters: false,
|
|
597303
598096
|
isKnownModel: true
|
|
597304
598097
|
};
|
|
597305
|
-
} else if (modelId.includes("claude-sonnet-4-")
|
|
598098
|
+
} else if (modelId.includes("claude-sonnet-4-")) {
|
|
597306
598099
|
return {
|
|
597307
598100
|
maxOutputTokens: 64e3,
|
|
597308
598101
|
supportsStructuredOutput: false,
|
|
598102
|
+
rejectsSamplingParameters: false,
|
|
597309
598103
|
isKnownModel: true
|
|
597310
598104
|
};
|
|
597311
598105
|
} else if (modelId.includes("claude-opus-4-")) {
|
|
597312
598106
|
return {
|
|
597313
598107
|
maxOutputTokens: 32e3,
|
|
597314
598108
|
supportsStructuredOutput: false,
|
|
597315
|
-
|
|
597316
|
-
};
|
|
597317
|
-
} else if (modelId.includes("claude-3-5-haiku")) {
|
|
597318
|
-
return {
|
|
597319
|
-
maxOutputTokens: 8192,
|
|
597320
|
-
supportsStructuredOutput: false,
|
|
598109
|
+
rejectsSamplingParameters: false,
|
|
597321
598110
|
isKnownModel: true
|
|
597322
598111
|
};
|
|
597323
598112
|
} else if (modelId.includes("claude-3-haiku")) {
|
|
597324
598113
|
return {
|
|
597325
598114
|
maxOutputTokens: 4096,
|
|
597326
598115
|
supportsStructuredOutput: false,
|
|
598116
|
+
rejectsSamplingParameters: false,
|
|
597327
598117
|
isKnownModel: true
|
|
597328
598118
|
};
|
|
597329
598119
|
} else {
|
|
597330
598120
|
return {
|
|
597331
598121
|
maxOutputTokens: 4096,
|
|
597332
598122
|
supportsStructuredOutput: false,
|
|
598123
|
+
rejectsSamplingParameters: false,
|
|
597333
598124
|
isKnownModel: false
|
|
597334
598125
|
};
|
|
597335
598126
|
}
|
|
597336
598127
|
}
|
|
598128
|
+
function hasWebTool20260209WithoutCodeExecution(tools) {
|
|
598129
|
+
if (!tools) {
|
|
598130
|
+
return false;
|
|
598131
|
+
}
|
|
598132
|
+
let hasWebTool20260209 = false;
|
|
598133
|
+
let hasCodeExecutionTool = false;
|
|
598134
|
+
for (const tool3 of tools) {
|
|
598135
|
+
if ("type" in tool3 && (tool3.type === "web_fetch_20260209" || tool3.type === "web_search_20260209")) {
|
|
598136
|
+
hasWebTool20260209 = true;
|
|
598137
|
+
continue;
|
|
598138
|
+
}
|
|
598139
|
+
if (tool3.name === "code_execution") {
|
|
598140
|
+
hasCodeExecutionTool = true;
|
|
598141
|
+
break;
|
|
598142
|
+
}
|
|
598143
|
+
}
|
|
598144
|
+
return hasWebTool20260209 && !hasCodeExecutionTool;
|
|
598145
|
+
}
|
|
597337
598146
|
function mapAnthropicResponseContextManagement(contextManagement) {
|
|
597338
598147
|
return contextManagement ? {
|
|
597339
598148
|
appliedEdits: contextManagement.applied_edits.map((edit) => {
|
|
@@ -597602,14 +598411,14 @@ var toolSearchBm25_20251119InputSchema = lazySchema(
|
|
|
597602
598411
|
})
|
|
597603
598412
|
)
|
|
597604
598413
|
);
|
|
597605
|
-
var
|
|
598414
|
+
var factory10 = createProviderToolFactoryWithOutputSchema({
|
|
597606
598415
|
id: "anthropic.tool_search_bm25_20251119",
|
|
597607
598416
|
inputSchema: toolSearchBm25_20251119InputSchema,
|
|
597608
598417
|
outputSchema: toolSearchBm25_20251119OutputSchema,
|
|
597609
598418
|
supportsDeferredResults: true
|
|
597610
598419
|
});
|
|
597611
598420
|
var toolSearchBm25_20251119 = (args = {}) => {
|
|
597612
|
-
return
|
|
598421
|
+
return factory10(args);
|
|
597613
598422
|
};
|
|
597614
598423
|
var anthropicTools = {
|
|
597615
598424
|
/**
|
|
@@ -597646,6 +598455,19 @@ var anthropicTools = {
|
|
|
597646
598455
|
* This is the latest version with enhanced Bash support and file operations.
|
|
597647
598456
|
*/
|
|
597648
598457
|
codeExecution_20250825,
|
|
598458
|
+
/**
|
|
598459
|
+
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
598460
|
+
* run system commands, create and edit files, and process uploaded files directly within
|
|
598461
|
+
* the API conversation.
|
|
598462
|
+
*
|
|
598463
|
+
* The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
|
|
598464
|
+
* including writing code, in a secure, sandboxed environment.
|
|
598465
|
+
*
|
|
598466
|
+
* This is the recommended version. Does not require a beta header.
|
|
598467
|
+
*
|
|
598468
|
+
* Supported models: Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, Opus 4.5
|
|
598469
|
+
*/
|
|
598470
|
+
codeExecution_20260120,
|
|
597649
598471
|
/**
|
|
597650
598472
|
* Claude can interact with computer environments through the computer use tool, which
|
|
597651
598473
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -597741,6 +598563,16 @@ var anthropicTools = {
|
|
|
597741
598563
|
* @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
|
|
597742
598564
|
*/
|
|
597743
598565
|
webFetch_20250910,
|
|
598566
|
+
/**
|
|
598567
|
+
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
598568
|
+
*
|
|
598569
|
+
* @param maxUses - The max_uses parameter limits the number of web fetches performed
|
|
598570
|
+
* @param allowedDomains - Only fetch from these domains
|
|
598571
|
+
* @param blockedDomains - Never fetch from these domains
|
|
598572
|
+
* @param citations - Unlike web search where citations are always enabled, citations are optional for web fetch. Set "citations": {"enabled": true} to enable Claude to cite specific passages from fetched documents.
|
|
598573
|
+
* @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
|
|
598574
|
+
*/
|
|
598575
|
+
webFetch_20260209,
|
|
597744
598576
|
/**
|
|
597745
598577
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
597746
598578
|
*
|
|
@@ -597750,6 +598582,15 @@ var anthropicTools = {
|
|
|
597750
598582
|
* @param userLocation - Optional user location information to provide geographically relevant search results.
|
|
597751
598583
|
*/
|
|
597752
598584
|
webSearch_20250305,
|
|
598585
|
+
/**
|
|
598586
|
+
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
598587
|
+
*
|
|
598588
|
+
* @param maxUses - Maximum number of web searches Claude can perform during the conversation.
|
|
598589
|
+
* @param allowedDomains - Optional list of domains that Claude is allowed to search.
|
|
598590
|
+
* @param blockedDomains - Optional list of domains that Claude should avoid when searching.
|
|
598591
|
+
* @param userLocation - Optional user location information to provide geographically relevant search results.
|
|
598592
|
+
*/
|
|
598593
|
+
webSearch_20260209,
|
|
597753
598594
|
/**
|
|
597754
598595
|
* Creates a tool search tool that uses regex patterns to find tools.
|
|
597755
598596
|
*
|
|
@@ -597852,12 +598693,13 @@ var anthropic = createAnthropic();
|
|
|
597852
598693
|
// ../../../vite-plugin-file-sync/dist/ai-service/llm/impl/anthropic.js
|
|
597853
598694
|
var anthropicImpl = (settings) => {
|
|
597854
598695
|
const anthropic2 = createAnthropic(settings.anthropic);
|
|
598696
|
+
const generateBroadEditModelId = process.env.SUPERBLOCKS_EVAL_ANTHROPIC_MODEL_ID ?? "claude-sonnet-4-6";
|
|
597855
598697
|
return {
|
|
597856
|
-
explain: anthropic2("claude-
|
|
597857
|
-
classifyPrompt: anthropic2("claude-
|
|
598698
|
+
explain: anthropic2("claude-haiku-4-5-20251001"),
|
|
598699
|
+
classifyPrompt: anthropic2("claude-haiku-4-5-20251001"),
|
|
597858
598700
|
summarizeMessages: anthropic2("claude-sonnet-4-6"),
|
|
597859
598701
|
fast: anthropic2("claude-haiku-4-5-20251001"),
|
|
597860
|
-
generateBroadEdit: anthropic2(
|
|
598702
|
+
generateBroadEdit: anthropic2(generateBroadEditModelId)
|
|
597861
598703
|
};
|
|
597862
598704
|
};
|
|
597863
598705
|
|
|
@@ -597972,7 +598814,7 @@ var PlaywrightMcpServerManager = class {
|
|
|
597972
598814
|
this.logger.info(`Starting embedded Playwright MCP server: browser=${options8?.browser || "chromium"}, headless=${options8?.headless !== false}`);
|
|
597973
598815
|
}
|
|
597974
598816
|
try {
|
|
597975
|
-
const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-
|
|
598817
|
+
const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-FGXRA5KL.js");
|
|
597976
598818
|
this.server = await startEmbeddedPlaywrightMcpServer({
|
|
597977
598819
|
storageStatePath: options8?.storageStatePath,
|
|
597978
598820
|
jwt: options8?.jwt,
|
|
@@ -606276,7 +607118,69 @@ ${error40.stack ?? error40.message}
|
|
|
606276
607118
|
|
|
606277
607119
|
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/awaiting-user.js
|
|
606278
607120
|
init_cjs_shims();
|
|
607121
|
+
var import_ai15 = __toESM(require_dist9());
|
|
607122
|
+
|
|
607123
|
+
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/next-steps.js
|
|
607124
|
+
init_cjs_shims();
|
|
606279
607125
|
var import_ai14 = __toESM(require_dist9());
|
|
607126
|
+
var MAX_NEXT_STEPS = 3;
|
|
607127
|
+
var ICON_LIST = NEXT_STEPS_ICON_NAMES.join(", ");
|
|
607128
|
+
var SUMMARY_CHAR_CAP = 4e3;
|
|
607129
|
+
var truncate = (s) => s.length <= SUMMARY_CHAR_CAP ? s : `${s.slice(0, SUMMARY_CHAR_CAP)}\u2026[truncated]`;
|
|
607130
|
+
var NextStepSchema = external_exports.object({
|
|
607131
|
+
label: external_exports.string().describe("Short action title, max 6 words, starts with a verb (e.g. 'Add search and filtering')"),
|
|
607132
|
+
prompt: external_exports.string().describe("Detailed 1-2 sentence prompt that Clark would receive to build this enhancement"),
|
|
607133
|
+
icon: external_exports.enum([...NEXT_STEPS_ICON_NAMES]).optional().describe(`Lucide icon name in kebab-case from: ${ICON_LIST}`)
|
|
607134
|
+
});
|
|
607135
|
+
var NextStepsSchema = external_exports.object({
|
|
607136
|
+
nextSteps: external_exports.array(NextStepSchema).min(1).max(MAX_NEXT_STEPS).describe("3 follow-up next steps for what the user should build next")
|
|
607137
|
+
});
|
|
607138
|
+
async function getNextSteps({ model, chatSessionStore, logger: logger15, abortSignal }) {
|
|
607139
|
+
const summary = await chatSessionStore.getLatestSummary();
|
|
607140
|
+
if (!summary) {
|
|
607141
|
+
logger15?.info("[next-steps] No build summary found; skipping generation");
|
|
607142
|
+
return [];
|
|
607143
|
+
}
|
|
607144
|
+
const systemPrompt = `You are helping suggest what a user should build next with Clark (an AI app builder) after they just finished building something.
|
|
607145
|
+
|
|
607146
|
+
Suggest exactly 3 follow-up things the user could ask Clark to do next. These should be specific, actionable enhancements to the app that was just built.
|
|
607147
|
+
|
|
607148
|
+
Focus on:
|
|
607149
|
+
- New features that complement what was built (e.g. "Add search and filtering", "Add an export to CSV button")
|
|
607150
|
+
- Performance and UX improvements (e.g. "Add loading states and pagination", "Add dark mode support")
|
|
607151
|
+
- Data and workflow enhancements (e.g. "Add edit and delete functionality", "Add role-based access control")
|
|
607152
|
+
|
|
607153
|
+
Do NOT suggest generic improvements \u2014 be specific to the app that was built.
|
|
607154
|
+
Every suggestion must be different from each other. Vary the categories.
|
|
607155
|
+
|
|
607156
|
+
For each suggestion, pick ONE icon from this list: ${ICON_LIST}`;
|
|
607157
|
+
const prompt = `WHAT CLARK JUST BUILT:
|
|
607158
|
+
${truncate(summary.summary)}`;
|
|
607159
|
+
logger15?.info("[next-steps] Starting next-steps LLM generation");
|
|
607160
|
+
let nextSteps = [];
|
|
607161
|
+
try {
|
|
607162
|
+
const { object: result } = await llmobs_default.trace({ name: "nextSteps.generate", kind: "llm" }, async () => {
|
|
607163
|
+
return await (0, import_ai14.generateObject)({
|
|
607164
|
+
model,
|
|
607165
|
+
schema: NextStepsSchema,
|
|
607166
|
+
system: systemPrompt,
|
|
607167
|
+
prompt,
|
|
607168
|
+
abortSignal
|
|
607169
|
+
});
|
|
607170
|
+
});
|
|
607171
|
+
nextSteps = result.nextSteps;
|
|
607172
|
+
logger15?.info("[next-steps] Next-steps LLM generation succeeded", {
|
|
607173
|
+
count: nextSteps.length
|
|
607174
|
+
});
|
|
607175
|
+
} catch (error40) {
|
|
607176
|
+
logger15?.warn("[next-steps] Next-steps LLM generation failed; returning empty", {
|
|
607177
|
+
error: error40 instanceof Error ? error40.message : String(error40)
|
|
607178
|
+
});
|
|
607179
|
+
}
|
|
607180
|
+
return nextSteps.slice(0, MAX_NEXT_STEPS);
|
|
607181
|
+
}
|
|
607182
|
+
|
|
607183
|
+
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/awaiting-user.js
|
|
606280
607184
|
function createWorkflowSummary(promptId, workflowMetrics) {
|
|
606281
607185
|
const completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
606282
607186
|
const startedAt = workflowMetrics.workflowStartedAt;
|
|
@@ -606319,6 +607223,53 @@ async function checkPromptCost(promptId, workflowMetrics, chatSessionStore, prom
|
|
|
606319
607223
|
var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProfiler, features }) => {
|
|
606320
607224
|
const sendUsergenerationState = sendUserGenerationStateChannel(clark);
|
|
606321
607225
|
const sendUserMessage = sendUserMessageChannel(clark, chatSessionStore);
|
|
607226
|
+
const emitNextSteps = async () => {
|
|
607227
|
+
const abortSignal = clark.context.abortController?.signal;
|
|
607228
|
+
const startedAt = performance.now();
|
|
607229
|
+
let stepCount = 0;
|
|
607230
|
+
let caughtError;
|
|
607231
|
+
try {
|
|
607232
|
+
if (abortSignal?.aborted)
|
|
607233
|
+
return;
|
|
607234
|
+
clark.logger.info("[awaiting-user] emitNextSteps starting");
|
|
607235
|
+
const model = llmProvider.modelForTask("summarizeMessages");
|
|
607236
|
+
const nextSteps = await getNextSteps({
|
|
607237
|
+
model,
|
|
607238
|
+
chatSessionStore,
|
|
607239
|
+
logger: clark.logger,
|
|
607240
|
+
abortSignal
|
|
607241
|
+
});
|
|
607242
|
+
stepCount = nextSteps.length;
|
|
607243
|
+
if (abortSignal?.aborted)
|
|
607244
|
+
return;
|
|
607245
|
+
if (nextSteps.length > 0) {
|
|
607246
|
+
await sendUserMessage({
|
|
607247
|
+
type: "next_steps",
|
|
607248
|
+
text: "",
|
|
607249
|
+
nextSteps
|
|
607250
|
+
}, 0, false, { persistBeforeDeliver: true });
|
|
607251
|
+
}
|
|
607252
|
+
} catch (err) {
|
|
607253
|
+
caughtError = err;
|
|
607254
|
+
} finally {
|
|
607255
|
+
const durationMs = Math.round((performance.now() - startedAt) * 100) / 100;
|
|
607256
|
+
const aborted2 = abortSignal?.aborted === true;
|
|
607257
|
+
if (caughtError) {
|
|
607258
|
+
clark.logger.warn("[awaiting-user] Next steps generation failed; skipping", {
|
|
607259
|
+
durationMs,
|
|
607260
|
+
stepCount,
|
|
607261
|
+
aborted: aborted2,
|
|
607262
|
+
error: caughtError instanceof Error ? { name: caughtError.name, message: caughtError.message } : String(caughtError)
|
|
607263
|
+
});
|
|
607264
|
+
} else {
|
|
607265
|
+
clark.logger.info("[awaiting-user] emitNextSteps completed", {
|
|
607266
|
+
durationMs,
|
|
607267
|
+
stepCount,
|
|
607268
|
+
aborted: aborted2
|
|
607269
|
+
});
|
|
607270
|
+
}
|
|
607271
|
+
}
|
|
607272
|
+
};
|
|
606322
607273
|
return async ({ event }) => {
|
|
606323
607274
|
switch (event.type) {
|
|
606324
607275
|
case AGENT_NEEDS_USER_INPUT: {
|
|
@@ -606372,13 +607323,16 @@ var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProf
|
|
|
606372
607323
|
willTriggerUpload: hasSuggestions,
|
|
606373
607324
|
currentMode: clark.context.currentMode
|
|
606374
607325
|
});
|
|
606375
|
-
signals.emit("generationCompleted", hasSuggestions);
|
|
606376
607326
|
await clarkProfiler?.endSession();
|
|
606377
607327
|
const { promptId, workflowMetrics } = clark.context;
|
|
606378
607328
|
if (promptId && workflowMetrics) {
|
|
606379
607329
|
await checkPromptCost(promptId, workflowMetrics, chatSessionStore, features.promptUsageAlarmThreshold, clark.logger);
|
|
606380
607330
|
await chatSessionStore.submitWorkflowSummary(createWorkflowSummary(promptId, workflowMetrics));
|
|
606381
607331
|
}
|
|
607332
|
+
if (features.suggestWhatsNext) {
|
|
607333
|
+
await emitNextSteps();
|
|
607334
|
+
}
|
|
607335
|
+
signals.emit("generationCompleted", hasSuggestions);
|
|
606382
607336
|
void sendUsergenerationState({
|
|
606383
607337
|
state: AiGenerationState.COMPLETED,
|
|
606384
607338
|
hasSuggestions: true
|
|
@@ -606391,7 +607345,6 @@ var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProf
|
|
|
606391
607345
|
hasSuggestions,
|
|
606392
607346
|
willTriggerUpload: hasSuggestions
|
|
606393
607347
|
});
|
|
606394
|
-
signals.emit("generationCompleted", hasSuggestions);
|
|
606395
607348
|
await clarkProfiler?.endSession();
|
|
606396
607349
|
const { promptId, workflowMetrics } = clark.context;
|
|
606397
607350
|
if (promptId && workflowMetrics) {
|
|
@@ -606430,6 +607383,10 @@ var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProf
|
|
|
606430
607383
|
}
|
|
606431
607384
|
}
|
|
606432
607385
|
}
|
|
607386
|
+
if (features.suggestWhatsNext) {
|
|
607387
|
+
await emitNextSteps();
|
|
607388
|
+
}
|
|
607389
|
+
signals.emit("generationCompleted", hasSuggestions);
|
|
606433
607390
|
void sendUsergenerationState({
|
|
606434
607391
|
state: AiGenerationState.COMPLETED,
|
|
606435
607392
|
hasSuggestions
|
|
@@ -606474,7 +607431,7 @@ Please create a BRIEF summary that:
|
|
|
606474
607431
|
Create a summary of what was accomplished:`;
|
|
606475
607432
|
const model = llmProvider.modelForTask("summarizeMessages");
|
|
606476
607433
|
const summary = await traceLLM("getFinalSummary", model.modelId, model.provider, async () => {
|
|
606477
|
-
return (0,
|
|
607434
|
+
return (0, import_ai15.generateText)({
|
|
606478
607435
|
model,
|
|
606479
607436
|
prompt,
|
|
606480
607437
|
abortSignal
|
|
@@ -606758,25 +607715,35 @@ Here are some examples (not exhaustive) that you should consider when building a
|
|
|
606758
607715
|
1. **Always show loading indicators on refetch**: When inputs change (e.g. filters, search), show a visual loading indicator while new data loads. Use \`fetching\` from useApiData.
|
|
606759
607716
|
2. **Loading State Hierarchy**:
|
|
606760
607717
|
- No data yet (\`loading\`) \u2192 Full skeleton placeholder
|
|
606761
|
-
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a
|
|
607718
|
+
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a subtle visual indicator: apply light opacity (e.g. \`opacity-70\`) to signal a refresh is in progress, plus a non-blocking label (e.g. "Updating\u2026" text, small spinner, or thin progress bar). Do not use \`pointer-events-none\` \u2014 the content must remain fully interactive during refetch.
|
|
606762
607719
|
- Error state (\`isError\`) \u2192 Show error with retry option, optionally keep stale data visible
|
|
606763
607720
|
3. **Debounce Rapid Requests**: Prevent multiple API calls in short succession
|
|
606764
607721
|
4. **Use useApiData for automatic refetching**: \`useApiData\` auto-refetches when inputs change and supports \`staleTime\`, \`refetchOnWindowFocus\`, and \`refetchOnReconnect\` options.
|
|
606765
607722
|
|
|
606766
607723
|
\`\`\`tsx
|
|
606767
|
-
// \u2705 CORRECT \u2014
|
|
607724
|
+
// \u2705 CORRECT \u2014 subtle opacity + indicator, table stays interactive
|
|
606768
607725
|
const { data, loading, fetching, isError, error } = useApiData("GetOrders", { status: statusFilter, search });
|
|
606769
607726
|
|
|
606770
607727
|
if (loading) return <Skeleton />; // First load: full skeleton
|
|
606771
607728
|
if (isError) return <ErrorBanner error={error} />;
|
|
606772
607729
|
return (
|
|
606773
|
-
<div
|
|
606774
|
-
|
|
607730
|
+
<div>
|
|
607731
|
+
{fetching && <div className="text-xs text-muted-foreground">Updating\u2026</div>}
|
|
607732
|
+
<div className={fetching ? "opacity-70" : ""}>
|
|
607733
|
+
<OrderTable orders={data.orders} /> {/* Dimmed but still interactive */}
|
|
607734
|
+
</div>
|
|
606775
607735
|
</div>
|
|
606776
607736
|
);
|
|
606777
607737
|
\`\`\`
|
|
606778
607738
|
|
|
606779
607739
|
\`\`\`tsx
|
|
607740
|
+
// \u274C WRONG \u2014 pointer-events-none disables the table, making it feel broken
|
|
607741
|
+
return (
|
|
607742
|
+
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
607743
|
+
<OrderTable orders={data.orders} />
|
|
607744
|
+
</div>
|
|
607745
|
+
);
|
|
607746
|
+
|
|
606780
607747
|
// \u274C WRONG \u2014 no loading indicator when filters change. User sees stale data with no feedback.
|
|
606781
607748
|
const { data, loading } = useApiData("GetOrders", { status: statusFilter, search });
|
|
606782
607749
|
|
|
@@ -607245,25 +608212,35 @@ Here are some examples (not exhaustive) that you should consider when building a
|
|
|
607245
608212
|
1. **Always show loading indicators on refetch**: When inputs change (e.g. filters, search), show a visual loading indicator while new data loads. Use \`fetching\` from useApiData.
|
|
607246
608213
|
2. **Loading State Hierarchy**:
|
|
607247
608214
|
- No data yet (\`loading\`) \u2192 Full skeleton placeholder
|
|
607248
|
-
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a
|
|
608215
|
+
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a subtle visual indicator: apply light opacity (e.g. \`opacity-70\`) to signal a refresh is in progress, plus a non-blocking label (e.g. "Updating\u2026" text, small spinner, or thin progress bar). Do not use \`pointer-events-none\` \u2014 the content must remain fully interactive during refetch.
|
|
607249
608216
|
- Error state (\`isError\`) \u2192 Show error with retry option, optionally keep stale data visible
|
|
607250
608217
|
3. **Debounce Rapid Requests**: Prevent multiple API calls in short succession
|
|
607251
608218
|
4. **Use useApiData for automatic refetching**: \`useApiData\` auto-refetches when inputs change and supports \`staleTime\`, \`refetchOnWindowFocus\`, and \`refetchOnReconnect\` options.
|
|
607252
608219
|
|
|
607253
608220
|
\`\`\`tsx
|
|
607254
|
-
// \u2705 CORRECT \u2014
|
|
608221
|
+
// \u2705 CORRECT \u2014 subtle opacity + indicator, table stays interactive
|
|
607255
608222
|
const { data, loading, fetching, isError, error } = useApiData("GetOrders", { status: statusFilter, search });
|
|
607256
608223
|
|
|
607257
608224
|
if (loading) return <Skeleton />; // First load: full skeleton
|
|
607258
608225
|
if (isError) return <ErrorBanner error={error} />;
|
|
607259
608226
|
return (
|
|
607260
|
-
<div
|
|
607261
|
-
|
|
608227
|
+
<div>
|
|
608228
|
+
{fetching && <div className="text-xs text-muted-foreground">Updating\u2026</div>}
|
|
608229
|
+
<div className={fetching ? "opacity-70" : ""}>
|
|
608230
|
+
<OrderTable orders={data.orders} /> {/* Dimmed but still interactive */}
|
|
608231
|
+
</div>
|
|
607262
608232
|
</div>
|
|
607263
608233
|
);
|
|
607264
608234
|
\`\`\`
|
|
607265
608235
|
|
|
607266
608236
|
\`\`\`tsx
|
|
608237
|
+
// \u274C WRONG \u2014 pointer-events-none disables the table, making it feel broken
|
|
608238
|
+
return (
|
|
608239
|
+
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
608240
|
+
<OrderTable orders={data.orders} />
|
|
608241
|
+
</div>
|
|
608242
|
+
);
|
|
608243
|
+
|
|
607267
608244
|
// \u274C WRONG \u2014 no loading indicator when filters change. User sees stale data with no feedback.
|
|
607268
608245
|
const { data, loading } = useApiData("GetOrders", { status: statusFilter, search });
|
|
607269
608246
|
|
|
@@ -610335,7 +611312,7 @@ ${diagnostics.join("\n")}`);
|
|
|
610335
611312
|
|
|
610336
611313
|
// ../../../vite-plugin-file-sync/dist/ai-service/agent/tools2/tools/web-fetch.js
|
|
610337
611314
|
init_cjs_shims();
|
|
610338
|
-
var
|
|
611315
|
+
var import_ai16 = __toESM(require_dist9());
|
|
610339
611316
|
var import_turndown = __toESM(require_turndown_cjs());
|
|
610340
611317
|
var WebFetchResponseSchema = external_exports.object({
|
|
610341
611318
|
content: external_exports.string().describe("The extracted information as plain markdown text (NOT JSON). Use markdown formatting for headers, lists, bold, etc.")
|
|
@@ -610486,7 +611463,7 @@ Examples:
|
|
|
610486
611463
|
}
|
|
610487
611464
|
const truncatedContent = truncateContent(markdown, MAX_CONTENT_LENGTH);
|
|
610488
611465
|
const model = llmProvider.modelForTask("fast");
|
|
610489
|
-
const { object: result } = await (0,
|
|
611466
|
+
const { object: result } = await (0, import_ai16.generateObject)({
|
|
610490
611467
|
model,
|
|
610491
611468
|
schema: WebFetchResponseSchema,
|
|
610492
611469
|
system: WEB_FETCH_SYSTEM_PROMPT,
|
|
@@ -631809,7 +632786,7 @@ var buildTools = async (clark, services) => {
|
|
|
631809
632786
|
init_cjs_shims();
|
|
631810
632787
|
function hasToolSuccess(toolName, maxAttempts = 5) {
|
|
631811
632788
|
return ({ steps }) => {
|
|
631812
|
-
const hasSuccess = steps[steps.length - 1]?.toolResults?.some((toolResult) => toolResult.toolName === toolName) ?? false;
|
|
632789
|
+
const hasSuccess = steps[steps.length - 1]?.toolResults?.some((toolResult) => toolResult.toolName === toolName && toolResult.output?.success !== false) ?? false;
|
|
631813
632790
|
if (hasSuccess) {
|
|
631814
632791
|
return true;
|
|
631815
632792
|
}
|
|
@@ -632405,13 +633382,14 @@ var doLLMGenerating = (clark, services) => {
|
|
|
632405
633382
|
if (chunk.type === "tool-result") {
|
|
632406
633383
|
const isOpenIntegrationTool = chunk.toolName === "openExistingIntegration" || chunk.toolName === "openIntegrationSetup";
|
|
632407
633384
|
const isUpdateIntegrationTool = chunk.toolName === "updateIntegrationFields";
|
|
632408
|
-
if (chunk.toolName === "askMultiChoice" || chunk.toolName === "askSearchableDropdown"
|
|
633385
|
+
if (chunk.toolName === "askMultiChoice" || chunk.toolName === "askSearchableDropdown") {
|
|
632409
633386
|
shouldTransitionToAwaitingUser = true;
|
|
632410
633387
|
}
|
|
632411
633388
|
if (isOpenIntegrationTool || isUpdateIntegrationTool) {
|
|
632412
633389
|
const output = getToolResultOutputObject(chunk.output);
|
|
632413
633390
|
const success2 = output?.success === true;
|
|
632414
633391
|
if (success2) {
|
|
633392
|
+
shouldTransitionToAwaitingUser = true;
|
|
632415
633393
|
const sendInteractiveMessage = sendInteractiveMessageChannel(clark, services.chatSessionStore);
|
|
632416
633394
|
const payload = {
|
|
632417
633395
|
type: "multi_choice",
|
|
@@ -635140,6 +636118,10 @@ var FLAG_DEFINITIONS = {
|
|
|
635140
636118
|
key: "ai.clark-delete-package-lock.enabled",
|
|
635141
636119
|
schema: zod_default.boolean()
|
|
635142
636120
|
},
|
|
636121
|
+
suggestWhatsNext: {
|
|
636122
|
+
key: "ai.suggest-whats-next",
|
|
636123
|
+
schema: zod_default.boolean()
|
|
636124
|
+
},
|
|
635143
636125
|
integrationSetupEnabled: {
|
|
635144
636126
|
key: "clark.integration-setup.enabled",
|
|
635145
636127
|
schema: zod_default.boolean()
|
|
@@ -635791,7 +636773,7 @@ var AiService = class extends import_shared40.TracedEventEmitter {
|
|
|
635791
636773
|
try {
|
|
635792
636774
|
const streamResult = await this.llmClient.streamText({
|
|
635793
636775
|
model,
|
|
635794
|
-
stopWhen: (0,
|
|
636776
|
+
stopWhen: (0, import_ai17.hasToolCall)(explainCodeFinalize.name),
|
|
635795
636777
|
tools: {
|
|
635796
636778
|
build_readFile,
|
|
635797
636779
|
explainCodeFinalize
|
|
@@ -636109,7 +637091,7 @@ ${apiSourceCode.slice(0, 2e3)}
|
|
|
636109
637091
|
const timeoutId = setTimeout(() => timeoutController.abort(), timeout);
|
|
636110
637092
|
try {
|
|
636111
637093
|
const contentPart = this.attachmentToContentPart(attachment);
|
|
636112
|
-
const { object: result } = await (0,
|
|
637094
|
+
const { object: result } = await (0, import_ai17.generateObject)({
|
|
636113
637095
|
model,
|
|
636114
637096
|
schema: LabelAttachmentSchema,
|
|
636115
637097
|
messages: [
|
|
@@ -639518,6 +640500,26 @@ function createSocketRecordingMiddleware(recorder) {
|
|
|
639518
640500
|
};
|
|
639519
640501
|
}
|
|
639520
640502
|
|
|
640503
|
+
// ../../../vite-plugin-file-sync/dist/git-log.js
|
|
640504
|
+
init_cjs_shims();
|
|
640505
|
+
var SEP = "<<SEP>>";
|
|
640506
|
+
var GIT_LOG_FORMAT = ["%H", "%P", "%s", "%an", "%aI"].join(SEP);
|
|
640507
|
+
function parseGitLog(raw2) {
|
|
640508
|
+
if (!raw2.trim())
|
|
640509
|
+
return [];
|
|
640510
|
+
return raw2.trimEnd().split("\n").map((line3) => {
|
|
640511
|
+
const parts = line3.split(SEP);
|
|
640512
|
+
const parents2 = (parts[1] ?? "").split(" ").filter((sha) => sha.length > 0);
|
|
640513
|
+
return {
|
|
640514
|
+
sha: parts[0] ?? "",
|
|
640515
|
+
parents: parents2,
|
|
640516
|
+
message: parts[2] ?? "",
|
|
640517
|
+
author: parts[3] ?? "",
|
|
640518
|
+
date: parts[4] ?? ""
|
|
640519
|
+
};
|
|
640520
|
+
});
|
|
640521
|
+
}
|
|
640522
|
+
|
|
639521
640523
|
// ../../../vite-plugin-file-sync/dist/git-service/azure-devops-workflow.js
|
|
639522
640524
|
init_cjs_shims();
|
|
639523
640525
|
var import_shared53 = __toESM(require_dist2());
|
|
@@ -640520,26 +641522,14 @@ var SocketManager = class extends import_shared58.TracedEventEmitter {
|
|
|
640520
641522
|
});
|
|
640521
641523
|
}
|
|
640522
641524
|
}
|
|
640523
|
-
const SEP = "<<SEP>>";
|
|
640524
|
-
const format4 = ["%H", "%s", "%an", "%aI"].join(SEP);
|
|
640525
641525
|
const raw2 = await readyGitService.raw([
|
|
640526
641526
|
"log",
|
|
640527
641527
|
logRef,
|
|
640528
|
-
`--format=${
|
|
641528
|
+
`--format=${GIT_LOG_FORMAT}`,
|
|
640529
641529
|
`-n`,
|
|
640530
641530
|
String(limit)
|
|
640531
641531
|
]);
|
|
640532
|
-
|
|
640533
|
-
return [];
|
|
640534
|
-
return raw2.trimEnd().split("\n").map((line3) => {
|
|
640535
|
-
const parts = line3.split(SEP);
|
|
640536
|
-
return {
|
|
640537
|
-
sha: parts[0] ?? "",
|
|
640538
|
-
message: parts[1] ?? "",
|
|
640539
|
-
author: parts[2] ?? "",
|
|
640540
|
-
date: parts[3] ?? ""
|
|
640541
|
-
};
|
|
640542
|
-
});
|
|
641532
|
+
return parseGitLog(raw2);
|
|
640543
641533
|
}
|
|
640544
641534
|
],
|
|
640545
641535
|
gitPrepareMainCommit: [
|
|
@@ -658754,7 +659744,7 @@ var require_ignore3 = __commonJS3({
|
|
|
658754
659744
|
return this._test(path152, this._testCache, true);
|
|
658755
659745
|
}
|
|
658756
659746
|
};
|
|
658757
|
-
var
|
|
659747
|
+
var factory12 = (options8) => new Ignore2(options8);
|
|
658758
659748
|
var isPathValid = (path152) => checkPath(path152 && checkPath.convert(path152), path152, RETURN_FALSE);
|
|
658759
659749
|
var setupWindows = () => {
|
|
658760
659750
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
@@ -658768,8 +659758,8 @@ var require_ignore3 = __commonJS3({
|
|
|
658768
659758
|
) {
|
|
658769
659759
|
setupWindows();
|
|
658770
659760
|
}
|
|
658771
|
-
module2.exports =
|
|
658772
|
-
|
|
659761
|
+
module2.exports = factory12;
|
|
659762
|
+
factory12.default = factory12;
|
|
658773
659763
|
module2.exports.isPathValid = isPathValid;
|
|
658774
659764
|
define2(module2.exports, Symbol.for("setupWindows"), setupWindows);
|
|
658775
659765
|
}
|
|
@@ -662163,7 +663153,7 @@ var parseYaml3;
|
|
|
662163
663153
|
async function loadYaml(file2) {
|
|
662164
663154
|
const content9 = await read_file_default(file2);
|
|
662165
663155
|
if (!parseYaml3) {
|
|
662166
|
-
({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-
|
|
663156
|
+
({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-ZXLKK666.js"));
|
|
662167
663157
|
}
|
|
662168
663158
|
try {
|
|
662169
663159
|
return parseYaml3(content9);
|
|
@@ -667557,7 +668547,7 @@ function createParsersAndPrinters(modules) {
|
|
|
667557
668547
|
}
|
|
667558
668548
|
var estreePlugin = createParsersAndPrinters([
|
|
667559
668549
|
{
|
|
667560
|
-
importPlugin: () => import("./estree-
|
|
668550
|
+
importPlugin: () => import("./estree-AE4AYPC4.js"),
|
|
667561
668551
|
printers: ["estree", "estree-json"]
|
|
667562
668552
|
}
|
|
667563
668553
|
]);
|
|
@@ -667581,11 +668571,11 @@ var languages = [
|
|
|
667581
668571
|
];
|
|
667582
668572
|
var { parsers: parsers12, printers } = createParsersAndPrinters([
|
|
667583
668573
|
{
|
|
667584
|
-
importPlugin: () => import("./acorn-
|
|
668574
|
+
importPlugin: () => import("./acorn-UR4JG5KH.js"),
|
|
667585
668575
|
parsers: ["acorn", "espree"]
|
|
667586
668576
|
},
|
|
667587
668577
|
{
|
|
667588
|
-
importPlugin: () => import("./angular-
|
|
668578
|
+
importPlugin: () => import("./angular-SZFU2CEP.js"),
|
|
667589
668579
|
parsers: [
|
|
667590
668580
|
"__ng_action",
|
|
667591
668581
|
"__ng_binding",
|
|
@@ -667594,7 +668584,7 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
|
|
|
667594
668584
|
]
|
|
667595
668585
|
},
|
|
667596
668586
|
{
|
|
667597
|
-
importPlugin: () => import("./babel-
|
|
668587
|
+
importPlugin: () => import("./babel-HEH4MWQU.js"),
|
|
667598
668588
|
parsers: [
|
|
667599
668589
|
"babel",
|
|
667600
668590
|
"babel-flow",
|
|
@@ -667613,44 +668603,44 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
|
|
|
667613
668603
|
]
|
|
667614
668604
|
},
|
|
667615
668605
|
{
|
|
667616
|
-
importPlugin: () => import("./flow-
|
|
668606
|
+
importPlugin: () => import("./flow-IJDC7AGM.js"),
|
|
667617
668607
|
parsers: ["flow"]
|
|
667618
668608
|
},
|
|
667619
668609
|
{
|
|
667620
|
-
importPlugin: () => import("./glimmer-
|
|
668610
|
+
importPlugin: () => import("./glimmer-ZAAHC7TU.js"),
|
|
667621
668611
|
parsers: ["glimmer"],
|
|
667622
668612
|
printers: ["glimmer"]
|
|
667623
668613
|
},
|
|
667624
668614
|
{
|
|
667625
|
-
importPlugin: () => import("./graphql-
|
|
668615
|
+
importPlugin: () => import("./graphql-MLHVZQEB.js"),
|
|
667626
668616
|
parsers: ["graphql"],
|
|
667627
668617
|
printers: ["graphql"]
|
|
667628
668618
|
},
|
|
667629
668619
|
{
|
|
667630
|
-
importPlugin: () => import("./html-
|
|
668620
|
+
importPlugin: () => import("./html-OMSSJL4C.js"),
|
|
667631
668621
|
parsers: ["html", "angular", "vue", "lwc", "mjml"],
|
|
667632
668622
|
printers: ["html"]
|
|
667633
668623
|
},
|
|
667634
668624
|
{
|
|
667635
|
-
importPlugin: () => import("./markdown-
|
|
668625
|
+
importPlugin: () => import("./markdown-4TFWLCBJ.js"),
|
|
667636
668626
|
parsers: ["markdown", "mdx", "remark"],
|
|
667637
668627
|
printers: ["mdast"]
|
|
667638
668628
|
},
|
|
667639
668629
|
{
|
|
667640
|
-
importPlugin: () => import("./meriyah-
|
|
668630
|
+
importPlugin: () => import("./meriyah-4QUVCBG2.js"),
|
|
667641
668631
|
parsers: ["meriyah"]
|
|
667642
668632
|
},
|
|
667643
668633
|
{
|
|
667644
|
-
importPlugin: () => import("./postcss-
|
|
668634
|
+
importPlugin: () => import("./postcss-UQC7SVOC.js"),
|
|
667645
668635
|
parsers: ["css", "less", "scss"],
|
|
667646
668636
|
printers: ["postcss"]
|
|
667647
668637
|
},
|
|
667648
668638
|
{
|
|
667649
|
-
importPlugin: () => import("./typescript-
|
|
668639
|
+
importPlugin: () => import("./typescript-VF6HLTSS.js"),
|
|
667650
668640
|
parsers: ["typescript"]
|
|
667651
668641
|
},
|
|
667652
668642
|
{
|
|
667653
|
-
importPlugin: () => import("./yaml-
|
|
668643
|
+
importPlugin: () => import("./yaml-ZXLKK666.js"),
|
|
667654
668644
|
parsers: ["yaml"],
|
|
667655
668645
|
printers: ["yaml"]
|
|
667656
668646
|
}
|
|
@@ -675055,7 +676045,7 @@ var test = (fn, ...args) => {
|
|
|
675055
676045
|
return false;
|
|
675056
676046
|
}
|
|
675057
676047
|
};
|
|
675058
|
-
var
|
|
676048
|
+
var factory11 = (env2) => {
|
|
675059
676049
|
env2 = utils_default.merge.call({
|
|
675060
676050
|
skipUndefined: true
|
|
675061
676051
|
}, globalFetchAPI, env2);
|
|
@@ -675239,7 +676229,7 @@ var getFetch = (config4) => {
|
|
|
675239
676229
|
while (i--) {
|
|
675240
676230
|
seed = seeds[i];
|
|
675241
676231
|
target = map3.get(seed);
|
|
675242
|
-
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() :
|
|
676232
|
+
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() : factory11(env2));
|
|
675243
676233
|
map3 = target;
|
|
675244
676234
|
}
|
|
675245
676235
|
return target;
|
|
@@ -679480,7 +680470,7 @@ async function upgradeCliWithPackageManager(pm, targetVersion, alias) {
|
|
|
679480
680470
|
clearCliVersionCache({ version: targetVersion, alias });
|
|
679481
680471
|
logger14.info(`Successfully upgraded packages to ${targetVersion}`);
|
|
679482
680472
|
}
|
|
679483
|
-
async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgrade = false) {
|
|
680473
|
+
async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgrade = false, skipCliUpgrade = false) {
|
|
679484
680474
|
let cliUpdated = false;
|
|
679485
680475
|
let hasFailedToUpgrade = false;
|
|
679486
680476
|
const upgradePromises = [];
|
|
@@ -679542,7 +680532,7 @@ async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgra
|
|
|
679542
680532
|
return;
|
|
679543
680533
|
}
|
|
679544
680534
|
try {
|
|
679545
|
-
if ((cliNeedsUpgrade || forceUpgrade) && currentCliInfo) {
|
|
680535
|
+
if (!skipCliUpgrade && (cliNeedsUpgrade || forceUpgrade) && currentCliInfo) {
|
|
679546
680536
|
const cliUpgradePromise = (0, import_shared70.traceFunction)({
|
|
679547
680537
|
name: "upgradeCli",
|
|
679548
680538
|
tracer: tracer2,
|
|
@@ -679602,6 +680592,8 @@ async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgra
|
|
|
679602
680592
|
init_cjs_shims();
|
|
679603
680593
|
var import_cors = __toESM(require_lib51(), 1);
|
|
679604
680594
|
var import_express = __toESM(require_express2(), 1);
|
|
680595
|
+
import * as child_process3 from "node:child_process";
|
|
680596
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
679605
680597
|
import net from "node:net";
|
|
679606
680598
|
import os6 from "node:os";
|
|
679607
680599
|
import path73 from "node:path";
|
|
@@ -679670,7 +680662,7 @@ function getJwksUriWithBaseUrl(superblocksBaseUrl) {
|
|
|
679670
680662
|
return jwksUri;
|
|
679671
680663
|
}
|
|
679672
680664
|
var httpServer;
|
|
679673
|
-
async function createDevServer({ root: root3, mode, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, logger: loggerOverride, port, sdk, superblocksBaseUrl: explicitBaseUrl }) {
|
|
680665
|
+
async function createDevServer({ root: root3, mode, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, logger: loggerOverride, port, sdk, superblocksBaseUrl: explicitBaseUrl, existingServer }) {
|
|
679674
680666
|
const logger15 = getLogger2(loggerOverride);
|
|
679675
680667
|
if (httpServer) {
|
|
679676
680668
|
logger15.debug("Dev server already running");
|
|
@@ -679697,6 +680689,8 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
679697
680689
|
viteResolve = resolve9;
|
|
679698
680690
|
viteReject = reject;
|
|
679699
680691
|
});
|
|
680692
|
+
vitePromise.catch(() => {
|
|
680693
|
+
});
|
|
679700
680694
|
async function gracefulShutdown({ logger: logger16, serverInitiated, switchingTo, initiatedByEmail }) {
|
|
679701
680695
|
try {
|
|
679702
680696
|
await lockService?.shutdown({
|
|
@@ -679843,43 +680837,14 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
679843
680837
|
return;
|
|
679844
680838
|
}
|
|
679845
680839
|
}
|
|
679846
|
-
logger15.info("
|
|
679847
|
-
|
|
679848
|
-
|
|
680840
|
+
logger15.info("Received connect request, waiting for vite server...");
|
|
680841
|
+
try {
|
|
680842
|
+
await vitePromise;
|
|
679849
680843
|
res.send(JSON.stringify(healthResponse));
|
|
679850
|
-
|
|
680844
|
+
} catch (e) {
|
|
680845
|
+
logger15.error("Vite server failed to initialize", getErrorMeta(e));
|
|
680846
|
+
res.status(500).send(JSON.stringify({ error: "Dev server failed to initialize" }));
|
|
679851
680847
|
}
|
|
679852
|
-
logger15.info("Starting dev server");
|
|
679853
|
-
isViteServerInitialized = true;
|
|
679854
|
-
const featureFlags = await sdk?.getFeatureFlagsForCurrentUser();
|
|
679855
|
-
startVite({
|
|
679856
|
-
port,
|
|
679857
|
-
app,
|
|
679858
|
-
root: root3,
|
|
679859
|
-
mode,
|
|
679860
|
-
fsOperationQueue,
|
|
679861
|
-
syncService,
|
|
679862
|
-
lockService,
|
|
679863
|
-
aiService,
|
|
679864
|
-
gitService,
|
|
679865
|
-
activateGitService,
|
|
679866
|
-
snapshotManager,
|
|
679867
|
-
checkAuthorization,
|
|
679868
|
-
logger: loggerOverride,
|
|
679869
|
-
httpServer,
|
|
679870
|
-
superblocksBaseUrl: explicitBaseUrl || localToken?.superblocksBaseUrl,
|
|
679871
|
-
features: {
|
|
679872
|
-
enableSessionRecording: featureFlags?.enableSessionRecording() ?? false
|
|
679873
|
-
}
|
|
679874
|
-
}).then((result) => {
|
|
679875
|
-
logger15.info("Dev server initialized");
|
|
679876
|
-
viteResolve();
|
|
679877
|
-
viteCreationResults = result;
|
|
679878
|
-
res.send(JSON.stringify(healthResponse));
|
|
679879
|
-
}, (e) => {
|
|
679880
|
-
logger15.error("Error initializing dev server", getErrorMeta(e));
|
|
679881
|
-
viteReject(e);
|
|
679882
|
-
});
|
|
679883
680848
|
});
|
|
679884
680849
|
app.post("/_sb_disconnect", authHandler, async (req, res) => {
|
|
679885
680850
|
logger15.info("Disconnecting dev server...");
|
|
@@ -679902,6 +680867,8 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
679902
680867
|
viteResolve = resolve9;
|
|
679903
680868
|
viteReject = reject;
|
|
679904
680869
|
});
|
|
680870
|
+
vitePromise.catch(() => {
|
|
680871
|
+
});
|
|
679905
680872
|
isViteServerInitialized = false;
|
|
679906
680873
|
}
|
|
679907
680874
|
res.send("ok");
|
|
@@ -679942,8 +680909,95 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
679942
680909
|
timeSinceLastActivityMs: lockService.timeSinceLastActivity
|
|
679943
680910
|
});
|
|
679944
680911
|
} else {
|
|
679945
|
-
|
|
679946
|
-
|
|
680912
|
+
res.json({
|
|
680913
|
+
isUserActive: false,
|
|
680914
|
+
connectedUsers: [],
|
|
680915
|
+
timeSinceLastActivityMs: Number.MAX_SAFE_INTEGER
|
|
680916
|
+
});
|
|
680917
|
+
}
|
|
680918
|
+
});
|
|
680919
|
+
let persistInProgress = false;
|
|
680920
|
+
app.post("/_sb_persist", authHandler, async (req, res) => {
|
|
680921
|
+
if (persistInProgress) {
|
|
680922
|
+
res.status(409).json({ error: "persist already in progress" });
|
|
680923
|
+
return;
|
|
680924
|
+
}
|
|
680925
|
+
persistInProgress = true;
|
|
680926
|
+
const persistStart = Date.now();
|
|
680927
|
+
try {
|
|
680928
|
+
const { uploadURL } = req.body;
|
|
680929
|
+
if (!uploadURL) {
|
|
680930
|
+
res.status(400).json({ error: "uploadURL required" });
|
|
680931
|
+
return;
|
|
680932
|
+
}
|
|
680933
|
+
logger15.info("/_sb_persist: archiving and uploading workspace to S3...");
|
|
680934
|
+
const archive = await new Promise((resolveArchive, rejectArchive) => {
|
|
680935
|
+
const tarProc = child_process3.spawn("tar", [
|
|
680936
|
+
"cf",
|
|
680937
|
+
"-",
|
|
680938
|
+
"--exclude",
|
|
680939
|
+
".git",
|
|
680940
|
+
"--exclude",
|
|
680941
|
+
"node_modules/.cache",
|
|
680942
|
+
"--exclude",
|
|
680943
|
+
".superblocks",
|
|
680944
|
+
"-C",
|
|
680945
|
+
process.cwd(),
|
|
680946
|
+
"."
|
|
680947
|
+
], { stdio: ["ignore", "pipe", "pipe"] });
|
|
680948
|
+
const zstdProc = child_process3.spawn("zstd", ["-1", "--no-progress"], {
|
|
680949
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
680950
|
+
});
|
|
680951
|
+
tarProc.stdout.pipe(zstdProc.stdin);
|
|
680952
|
+
zstdProc.stdin.on("error", (err) => {
|
|
680953
|
+
rejectArchive(new Error(`zstd stdin stream error: ${err.message}`));
|
|
680954
|
+
});
|
|
680955
|
+
const chunks = [];
|
|
680956
|
+
zstdProc.stdout.on("data", (chunk) => chunks.push(chunk));
|
|
680957
|
+
let stderr = "";
|
|
680958
|
+
tarProc.stderr.on("data", (chunk) => {
|
|
680959
|
+
stderr += chunk.toString();
|
|
680960
|
+
});
|
|
680961
|
+
zstdProc.stderr.on("data", (chunk) => {
|
|
680962
|
+
stderr += chunk.toString();
|
|
680963
|
+
});
|
|
680964
|
+
let tarExitCode = null;
|
|
680965
|
+
tarProc.on("close", (code2) => {
|
|
680966
|
+
tarExitCode = code2;
|
|
680967
|
+
});
|
|
680968
|
+
zstdProc.on("close", (code2) => {
|
|
680969
|
+
if (code2 !== 0) {
|
|
680970
|
+
rejectArchive(new Error(`zstd compression failed (code ${code2}): ${stderr}`));
|
|
680971
|
+
} else if (tarExitCode !== null && tarExitCode !== 0) {
|
|
680972
|
+
rejectArchive(new Error(`tar archival failed (code ${tarExitCode}): ${stderr}`));
|
|
680973
|
+
} else {
|
|
680974
|
+
resolveArchive(Buffer.concat(chunks));
|
|
680975
|
+
}
|
|
680976
|
+
});
|
|
680977
|
+
tarProc.on("error", rejectArchive);
|
|
680978
|
+
zstdProc.on("error", rejectArchive);
|
|
680979
|
+
});
|
|
680980
|
+
logger15.info(`/_sb_persist: archive created (${(archive.length / 1024 / 1024).toFixed(1)}MB) in ${Date.now() - persistStart}ms, uploading...`);
|
|
680981
|
+
const uploadStart = Date.now();
|
|
680982
|
+
const uploadResp = await fetch(uploadURL, {
|
|
680983
|
+
method: "PUT",
|
|
680984
|
+
body: archive,
|
|
680985
|
+
headers: {
|
|
680986
|
+
"Content-Type": "application/zstd",
|
|
680987
|
+
"Content-Length": String(archive.length)
|
|
680988
|
+
},
|
|
680989
|
+
signal: AbortSignal.timeout(3e4)
|
|
680990
|
+
});
|
|
680991
|
+
if (!uploadResp.ok) {
|
|
680992
|
+
throw new Error(`S3 upload failed: ${uploadResp.status} ${uploadResp.statusText}`);
|
|
680993
|
+
}
|
|
680994
|
+
logger15.info(`/_sb_persist: uploaded in ${Date.now() - uploadStart}ms (total ${Date.now() - persistStart}ms)`);
|
|
680995
|
+
res.status(200).json({ status: "uploaded" });
|
|
680996
|
+
} catch (error40) {
|
|
680997
|
+
logger15.error(`/_sb_persist failed: ${error40}`);
|
|
680998
|
+
res.status(500).json({ error: String(error40) });
|
|
680999
|
+
} finally {
|
|
681000
|
+
persistInProgress = false;
|
|
679947
681001
|
}
|
|
679948
681002
|
});
|
|
679949
681003
|
process.on("SIGINT", async () => {
|
|
@@ -679965,9 +681019,52 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
679965
681019
|
process.exit(1);
|
|
679966
681020
|
});
|
|
679967
681021
|
});
|
|
679968
|
-
|
|
679969
|
-
|
|
679970
|
-
|
|
681022
|
+
if (existingServer) {
|
|
681023
|
+
existingServer.removeAllListeners("request");
|
|
681024
|
+
existingServer.on("request", app);
|
|
681025
|
+
httpServer = existingServer;
|
|
681026
|
+
logger15.info(`Attached full dev server to existing HTTP server on port ${port}`);
|
|
681027
|
+
} else {
|
|
681028
|
+
logger15.info(`Starting HTTP server on port ${port}`);
|
|
681029
|
+
httpServer = await app.listen(port);
|
|
681030
|
+
logger15.info(`HTTP server started successfully on port ${port}`);
|
|
681031
|
+
}
|
|
681032
|
+
if (!isViteServerInitialized) {
|
|
681033
|
+
isViteServerInitialized = true;
|
|
681034
|
+
logger15.info("Eagerly starting vite server...");
|
|
681035
|
+
const featureFlags = await sdk?.getFeatureFlagsForCurrentUser().catch((err) => {
|
|
681036
|
+
logger15.warn(`Failed to fetch feature flags, using defaults: ${err}`);
|
|
681037
|
+
return void 0;
|
|
681038
|
+
});
|
|
681039
|
+
const viteStartPromise = startVite({
|
|
681040
|
+
port,
|
|
681041
|
+
app,
|
|
681042
|
+
root: root3,
|
|
681043
|
+
mode,
|
|
681044
|
+
fsOperationQueue,
|
|
681045
|
+
syncService,
|
|
681046
|
+
lockService,
|
|
681047
|
+
aiService,
|
|
681048
|
+
gitService,
|
|
681049
|
+
activateGitService,
|
|
681050
|
+
snapshotManager,
|
|
681051
|
+
checkAuthorization,
|
|
681052
|
+
logger: loggerOverride,
|
|
681053
|
+
httpServer,
|
|
681054
|
+
superblocksBaseUrl: explicitBaseUrl || localToken?.superblocksBaseUrl,
|
|
681055
|
+
features: {
|
|
681056
|
+
enableSessionRecording: featureFlags?.enableSessionRecording() ?? false
|
|
681057
|
+
}
|
|
681058
|
+
});
|
|
681059
|
+
viteStartPromise.then((result) => {
|
|
681060
|
+
logger15.info("Vite server initialized eagerly");
|
|
681061
|
+
viteResolve();
|
|
681062
|
+
viteCreationResults = result;
|
|
681063
|
+
}, (e) => {
|
|
681064
|
+
logger15.error("Error initializing vite server", getErrorMeta(e));
|
|
681065
|
+
viteReject(e);
|
|
681066
|
+
});
|
|
681067
|
+
}
|
|
679971
681068
|
return httpServer;
|
|
679972
681069
|
}
|
|
679973
681070
|
async function startVite({ app, httpServer: httpServer2, root: root3, mode, port, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, checkAuthorization, logger: loggerOverride, superblocksBaseUrl, features }) {
|
|
@@ -680116,6 +681213,32 @@ async function startVite({ app, httpServer: httpServer2, root: root3, mode, port
|
|
|
680116
681213
|
}
|
|
680117
681214
|
});
|
|
680118
681215
|
}
|
|
681216
|
+
async function preWarmViteCache(root3) {
|
|
681217
|
+
const start = Date.now();
|
|
681218
|
+
console.log("[warm] Pre-warming Vite dependency cache...");
|
|
681219
|
+
try {
|
|
681220
|
+
const server = await createServer({
|
|
681221
|
+
root: root3,
|
|
681222
|
+
mode: "development",
|
|
681223
|
+
server: { middlewareMode: true, hmr: false },
|
|
681224
|
+
plugins: [src_default()],
|
|
681225
|
+
logLevel: "warn",
|
|
681226
|
+
optimizeDeps: { noDiscovery: true }
|
|
681227
|
+
});
|
|
681228
|
+
const depsDir = path73.join(root3, "node_modules", ".vite", "deps");
|
|
681229
|
+
const maxWaitMs = 5e3;
|
|
681230
|
+
const pollMs = 50;
|
|
681231
|
+
const deadline = Date.now() + maxWaitMs;
|
|
681232
|
+
while (!existsSync4(depsDir) && Date.now() < deadline) {
|
|
681233
|
+
await new Promise((r2) => setTimeout(r2, pollMs));
|
|
681234
|
+
}
|
|
681235
|
+
await server.close();
|
|
681236
|
+
const cached2 = existsSync4(depsDir);
|
|
681237
|
+
console.log(`[warm] Vite cache ${cached2 ? "warmed" : "not committed (timed out)"} in ${Date.now() - start}ms`);
|
|
681238
|
+
} catch (error40) {
|
|
681239
|
+
console.warn(`[warm] Vite cache pre-warm failed (non-fatal, ${Date.now() - start}ms):`, error40);
|
|
681240
|
+
}
|
|
681241
|
+
}
|
|
680119
681242
|
var DEFAULT_HMR_PORT = 24678;
|
|
680120
681243
|
function getFreePort() {
|
|
680121
681244
|
return new Promise((resolve9) => {
|
|
@@ -680255,7 +681378,7 @@ async function fetchAndWriteApplication({ resourceId, viewMode, featureFlags, pr
|
|
|
680255
681378
|
|
|
680256
681379
|
// ../sdk/dist/cli-replacement/socket-utils.mjs
|
|
680257
681380
|
init_cjs_shims();
|
|
680258
|
-
import { existsSync as
|
|
681381
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
680259
681382
|
import * as fs41 from "node:fs/promises";
|
|
680260
681383
|
import * as net2 from "node:net";
|
|
680261
681384
|
import * as os7 from "node:os";
|
|
@@ -680303,7 +681426,7 @@ async function getAllSocketFiles() {
|
|
|
680303
681426
|
}
|
|
680304
681427
|
async function getSocketFileForPid(pid) {
|
|
680305
681428
|
const socketPath = path74.join(getSocketDirectory(), `superblocks-auth-${pid}.sock`);
|
|
680306
|
-
return
|
|
681429
|
+
return existsSync5(socketPath) ? socketPath : null;
|
|
680307
681430
|
}
|
|
680308
681431
|
async function cleanupSocketFile(socketPath) {
|
|
680309
681432
|
try {
|
|
@@ -680346,7 +681469,7 @@ async function isSocketAlive(socketPath) {
|
|
|
680346
681469
|
// ../sdk/dist/cli-replacement/dev.mjs
|
|
680347
681470
|
init_cjs_shims();
|
|
680348
681471
|
init_esm();
|
|
680349
|
-
import * as
|
|
681472
|
+
import * as child_process4 from "node:child_process";
|
|
680350
681473
|
import * as nodeFs from "node:fs/promises";
|
|
680351
681474
|
import path76 from "node:path";
|
|
680352
681475
|
import * as readline2 from "node:readline";
|
|
@@ -680542,7 +681665,7 @@ async function ensureRemoteHasDefaultBranch(git, remoteUrl) {
|
|
|
680542
681665
|
}
|
|
680543
681666
|
|
|
680544
681667
|
// ../sdk/dist/cli-replacement/dev.mjs
|
|
680545
|
-
var exec10 = promisify7(
|
|
681668
|
+
var exec10 = promisify7(child_process4.exec);
|
|
680546
681669
|
var passErrorToVSCode = (message, logger15) => {
|
|
680547
681670
|
if (message && process.env.SUPERBLOCKS_VSCODE === "true") {
|
|
680548
681671
|
logger15.error(`clierr: ${JSON.stringify({ message })}`);
|
|
@@ -680632,7 +681755,7 @@ async function handleLockConflict(error40, lockSvc, span, logger15) {
|
|
|
680632
681755
|
}
|
|
680633
681756
|
async function readPkgJson(cwd) {
|
|
680634
681757
|
try {
|
|
680635
|
-
const { readPackage } = await import("./read-pkg-
|
|
681758
|
+
const { readPackage } = await import("./read-pkg-U4YY3GP6.js");
|
|
680636
681759
|
return await readPackage({ cwd });
|
|
680637
681760
|
} catch {
|
|
680638
681761
|
return null;
|
|
@@ -680674,6 +681797,7 @@ var DevServerAutoUpgradeMode;
|
|
|
680674
681797
|
(function(DevServerAutoUpgradeMode2) {
|
|
680675
681798
|
DevServerAutoUpgradeMode2["SKIP"] = "skip-upgrade";
|
|
680676
681799
|
DevServerAutoUpgradeMode2["FORCE"] = "force-upgrade";
|
|
681800
|
+
DevServerAutoUpgradeMode2["SKIP_CLI_ONLY"] = "skip-cli-only";
|
|
680677
681801
|
})(DevServerAutoUpgradeMode || (DevServerAutoUpgradeMode = {}));
|
|
680678
681802
|
async function dev(options8) {
|
|
680679
681803
|
const { cwd, tokenConfig, devServerPort, skipSync, applicationConfig, autoUpgradeMode, tokenManager, authHotReloadServer, sdk } = options8;
|
|
@@ -680688,6 +681812,7 @@ async function dev(options8) {
|
|
|
680688
681812
|
const tracer4 = getTracer();
|
|
680689
681813
|
const logger15 = getLogger2(options8.logger);
|
|
680690
681814
|
const skipAutoUpgrade = autoUpgradeMode === DevServerAutoUpgradeMode.SKIP;
|
|
681815
|
+
const skipCliUpgrade = skipAutoUpgrade || autoUpgradeMode === DevServerAutoUpgradeMode.SKIP_CLI_ONLY;
|
|
680691
681816
|
await tracer4.startActiveSpan("devServerStartup", async (startupSpan) => {
|
|
680692
681817
|
try {
|
|
680693
681818
|
if (!import_fs_extra5.default.existsSync(path76.join(cwd, "node_modules"))) {
|
|
@@ -680905,7 +682030,8 @@ async function dev(options8) {
|
|
|
680905
682030
|
let hasCliUpdated = false;
|
|
680906
682031
|
let upgradePromises = [];
|
|
680907
682032
|
const forceUpgrade = options8.autoUpgradeMode === DevServerAutoUpgradeMode.FORCE;
|
|
680908
|
-
|
|
682033
|
+
const skipCliOnly = options8.autoUpgradeMode === DevServerAutoUpgradeMode.SKIP_CLI_ONLY;
|
|
682034
|
+
if (!skipAutoUpgrade || forceUpgrade || skipCliOnly) {
|
|
680909
682035
|
await tracer4.startActiveSpan("versionCheckAndUpgrade", async (span) => {
|
|
680910
682036
|
if (lockService) {
|
|
680911
682037
|
const applicationConfigWithTokenConfigAndUserInfo = {
|
|
@@ -680917,7 +682043,7 @@ async function dev(options8) {
|
|
|
680917
682043
|
organizationId: currentUser.user.currentOrganizationId,
|
|
680918
682044
|
featureFlags: sdk.getFeatureFlagsForUser(currentUser)
|
|
680919
682045
|
};
|
|
680920
|
-
const result = await checkVersionsAndWritePackageJson(lockService, applicationConfigWithTokenConfigAndUserInfo, forceUpgrade);
|
|
682046
|
+
const result = await checkVersionsAndWritePackageJson(lockService, applicationConfigWithTokenConfigAndUserInfo, forceUpgrade, skipCliUpgrade);
|
|
680921
682047
|
hasCliUpdated = result.cliUpdated;
|
|
680922
682048
|
upgradePromises = result.upgradePromises;
|
|
680923
682049
|
} else {
|
|
@@ -681074,7 +682200,11 @@ async function dev(options8) {
|
|
|
681074
682200
|
snapshotManager,
|
|
681075
682201
|
logger: options8.logger,
|
|
681076
682202
|
sdk,
|
|
681077
|
-
superblocksBaseUrl: tokenConfig.superblocksBaseUrl
|
|
682203
|
+
superblocksBaseUrl: tokenConfig.superblocksBaseUrl,
|
|
682204
|
+
existingServer: options8.existingServer
|
|
682205
|
+
// TODO: Remove this cast — build the options object to match
|
|
682206
|
+
// CreateDevServerOptions directly so new required fields cause a
|
|
682207
|
+
// compile error instead of silently passing undefined.
|
|
681078
682208
|
};
|
|
681079
682209
|
const result = await createDevServer(createDevServerOptions);
|
|
681080
682210
|
span.end();
|
|
@@ -681421,6 +682551,7 @@ export {
|
|
|
681421
682551
|
SuperblocksSdk,
|
|
681422
682552
|
AUTO_UPGRADE_EXIT_CODE,
|
|
681423
682553
|
RESTART_EXIT_CODE,
|
|
682554
|
+
preWarmViteCache,
|
|
681424
682555
|
TokenManager,
|
|
681425
682556
|
tryDecodeJwtToken,
|
|
681426
682557
|
fetchAndWriteApplication,
|
|
@@ -681972,4 +683103,4 @@ serve-static/index.js:
|
|
|
681972
683103
|
chokidar/esm/index.js:
|
|
681973
683104
|
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
681974
683105
|
*/
|
|
681975
|
-
//# sourceMappingURL=chunk-
|
|
683106
|
+
//# sourceMappingURL=chunk-2GZKLQ7M.js.map
|