@superblocksteam/cli 2.0.110-next.12 → 2.0.110-next.14
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 +1 -3
- package/dist/{acorn-JGS2O6LY.js → acorn-QRHEJZ4Y.js} +3 -3
- package/dist/{angular-25TUYG76.js → angular-E7FCGLEO.js} +3 -3
- package/dist/{api-HLGD6X6N.js → api-F7VFMVH5.js} +4 -4
- package/dist/{babel-KAWIAIQ2.js → babel-XU2VNNSQ.js} +3 -3
- package/dist/{chunk-DCNPDB2I.js → chunk-42MJC4KH.js} +4 -4
- package/dist/{chunk-WHKM72UJ.js → chunk-4N2GPPW5.js} +3 -3
- package/dist/{chunk-VTPSPFPH.js → chunk-5M7JSMKP.js} +3 -3
- package/dist/{chunk-V3LBAYMT.js → chunk-6L5GMSF2.js} +484 -1673
- package/dist/{chunk-V3LBAYMT.js.map → chunk-6L5GMSF2.js.map} +1 -1
- package/dist/{chunk-HLGDWS76.js → chunk-6SIVP4XD.js} +6 -6
- package/dist/{chunk-B4NW2XE3.js → chunk-7XGJ2DPJ.js} +3 -3
- package/dist/{chunk-L6VBVY6A.js → chunk-CHRYSMMG.js} +3 -3
- package/dist/{chunk-HGL4SBSD.js → chunk-E33HPBUC.js} +2 -2
- package/dist/{chunk-H6LSGMIY.js → chunk-FAJ3NJRT.js} +3 -3
- package/dist/{chunk-TJOOJ5A3.js → chunk-H427LM2L.js} +3 -3
- package/dist/{chunk-KVAVCK4Q.js → chunk-QQTIZ3JW.js} +3 -3
- package/dist/{chunk-WOWJTZY5.js → chunk-SOVZ4MKE.js} +3 -3
- package/dist/{chunk-MOMDULGA.js → chunk-UQQWHXCE.js} +4 -4
- package/dist/{chunk-FONAPW6P.js → chunk-VUXGBCHS.js} +4 -4
- package/dist/{chunk-Y72WRGK7.js → chunk-X2O46BBJ.js} +6 -6
- package/dist/{chunk-F7XPGIIV.js → chunk-Y5UCK4QB.js} +3 -3
- package/dist/{chunk-7TGMLTD5.js → chunk-Z64OZ4VQ.js} +4 -4
- package/dist/{cli-truncate-I574C7MQ.js → cli-truncate-R7BZHTWM.js} +5 -5
- package/dist/commands/dev-parent.js +2 -2
- package/dist/{dd-trace-X7BJHKGF.js → dd-trace-TMWNM5TU.js} +7 -7
- package/dist/{dist-X25VMXTA.js → dist-LAIEBQ3V.js} +13 -13
- package/dist/{embedded-playwright-mcp-server-XXH7SLHS.js → embedded-playwright-mcp-server-6GY37WOF.js} +3 -3
- package/dist/{enquirer-MIABCZ2Y.js → enquirer-QSA4Q3KI.js} +4 -4
- package/dist/{estree-H3PLBGLB.js → estree-M5XOW65K.js} +3 -3
- package/dist/{flow-5ERWHPRF.js → flow-L3D4WX3Z.js} +3 -3
- package/dist/{getMachineId-bsd-FY57SPCY.js → getMachineId-bsd-I2VASQDS.js} +5 -5
- package/dist/{getMachineId-darwin-CV2PJXIY.js → getMachineId-darwin-VTQRCEUS.js} +5 -5
- package/dist/{getMachineId-linux-4DQZB2LI.js → getMachineId-linux-4IXPONMU.js} +4 -4
- package/dist/{getMachineId-unsupported-LXN7J4B7.js → getMachineId-unsupported-UAR7YCNX.js} +4 -4
- package/dist/{getMachineId-win-S4IQBWI4.js → getMachineId-win-C7XX6XLO.js} +5 -5
- package/dist/{glimmer-7ONGRFTP.js → glimmer-LUDC5QNV.js} +3 -3
- package/dist/{graphql-VCKEERSG.js → graphql-VIZ3REIC.js} +3 -3
- package/dist/{html-QBRF6OFR.js → html-I6EAKISS.js} +3 -3
- package/dist/{http-IM5QRMOL.js → http-TOEXWWMX.js} +12 -12
- package/dist/index.js +26 -298
- package/dist/index.js.map +1 -1
- package/dist/{jiti-5S5LDA32.js → jiti-EJ36EOMK.js} +3 -3
- package/dist/{log-update-GDTKCAKQ.js → log-update-53HBE7QZ.js} +6 -6
- package/dist/{markdown-SU223TR6.js → markdown-STBGDZM6.js} +3 -3
- package/dist/{meriyah-3S2WWPMR.js → meriyah-65T7PG5O.js} +3 -3
- package/dist/{postcss-RA47AJ7I.js → postcss-ASIVSSN2.js} +3 -3
- package/dist/{read-pkg-HWNLHFCY.js → read-pkg-MWZA3RU5.js} +5 -5
- package/dist/{spans-TV4F3RZ7.js → spans-3EJDY2PZ.js} +4 -4
- package/dist/{src-ALE7QWXL.js → src-DWCFAABS.js} +3 -3
- package/dist/{token-34GS4QKE.js → token-YF6QEPIT.js} +5 -5
- package/dist/{token-util-WAHOBHZI.js → token-util-TV464TI4.js} +5 -5
- package/dist/{typescript-TZHIKPAW.js → typescript-ZZIEC5OF.js} +3 -3
- package/dist/{wrap-ansi-AK2NK734.js → wrap-ansi-7RMGVNIF.js} +5 -5
- package/dist/{yaml-IKUL3PG4.js → yaml-P2AMYUL3.js} +3 -3
- package/oclif.manifest.json +1 -8
- package/package.json +5 -5
- /package/dist/{acorn-JGS2O6LY.js.map → acorn-QRHEJZ4Y.js.map} +0 -0
- /package/dist/{angular-25TUYG76.js.map → angular-E7FCGLEO.js.map} +0 -0
- /package/dist/{api-HLGD6X6N.js.map → api-F7VFMVH5.js.map} +0 -0
- /package/dist/{babel-KAWIAIQ2.js.map → babel-XU2VNNSQ.js.map} +0 -0
- /package/dist/{chunk-DCNPDB2I.js.map → chunk-42MJC4KH.js.map} +0 -0
- /package/dist/{chunk-WHKM72UJ.js.map → chunk-4N2GPPW5.js.map} +0 -0
- /package/dist/{chunk-VTPSPFPH.js.map → chunk-5M7JSMKP.js.map} +0 -0
- /package/dist/{chunk-HLGDWS76.js.map → chunk-6SIVP4XD.js.map} +0 -0
- /package/dist/{chunk-B4NW2XE3.js.map → chunk-7XGJ2DPJ.js.map} +0 -0
- /package/dist/{chunk-L6VBVY6A.js.map → chunk-CHRYSMMG.js.map} +0 -0
- /package/dist/{chunk-HGL4SBSD.js.map → chunk-E33HPBUC.js.map} +0 -0
- /package/dist/{chunk-H6LSGMIY.js.map → chunk-FAJ3NJRT.js.map} +0 -0
- /package/dist/{chunk-TJOOJ5A3.js.map → chunk-H427LM2L.js.map} +0 -0
- /package/dist/{chunk-KVAVCK4Q.js.map → chunk-QQTIZ3JW.js.map} +0 -0
- /package/dist/{chunk-WOWJTZY5.js.map → chunk-SOVZ4MKE.js.map} +0 -0
- /package/dist/{chunk-MOMDULGA.js.map → chunk-UQQWHXCE.js.map} +0 -0
- /package/dist/{chunk-FONAPW6P.js.map → chunk-VUXGBCHS.js.map} +0 -0
- /package/dist/{chunk-Y72WRGK7.js.map → chunk-X2O46BBJ.js.map} +0 -0
- /package/dist/{chunk-F7XPGIIV.js.map → chunk-Y5UCK4QB.js.map} +0 -0
- /package/dist/{chunk-7TGMLTD5.js.map → chunk-Z64OZ4VQ.js.map} +0 -0
- /package/dist/{cli-truncate-I574C7MQ.js.map → cli-truncate-R7BZHTWM.js.map} +0 -0
- /package/dist/{dd-trace-X7BJHKGF.js.map → dd-trace-TMWNM5TU.js.map} +0 -0
- /package/dist/{dist-X25VMXTA.js.map → dist-LAIEBQ3V.js.map} +0 -0
- /package/dist/{embedded-playwright-mcp-server-XXH7SLHS.js.map → embedded-playwright-mcp-server-6GY37WOF.js.map} +0 -0
- /package/dist/{enquirer-MIABCZ2Y.js.map → enquirer-QSA4Q3KI.js.map} +0 -0
- /package/dist/{estree-H3PLBGLB.js.map → estree-M5XOW65K.js.map} +0 -0
- /package/dist/{flow-5ERWHPRF.js.map → flow-L3D4WX3Z.js.map} +0 -0
- /package/dist/{getMachineId-bsd-FY57SPCY.js.map → getMachineId-bsd-I2VASQDS.js.map} +0 -0
- /package/dist/{getMachineId-darwin-CV2PJXIY.js.map → getMachineId-darwin-VTQRCEUS.js.map} +0 -0
- /package/dist/{getMachineId-linux-4DQZB2LI.js.map → getMachineId-linux-4IXPONMU.js.map} +0 -0
- /package/dist/{getMachineId-unsupported-LXN7J4B7.js.map → getMachineId-unsupported-UAR7YCNX.js.map} +0 -0
- /package/dist/{getMachineId-win-S4IQBWI4.js.map → getMachineId-win-C7XX6XLO.js.map} +0 -0
- /package/dist/{glimmer-7ONGRFTP.js.map → glimmer-LUDC5QNV.js.map} +0 -0
- /package/dist/{graphql-VCKEERSG.js.map → graphql-VIZ3REIC.js.map} +0 -0
- /package/dist/{html-QBRF6OFR.js.map → html-I6EAKISS.js.map} +0 -0
- /package/dist/{http-IM5QRMOL.js.map → http-TOEXWWMX.js.map} +0 -0
- /package/dist/{jiti-5S5LDA32.js.map → jiti-EJ36EOMK.js.map} +0 -0
- /package/dist/{log-update-GDTKCAKQ.js.map → log-update-53HBE7QZ.js.map} +0 -0
- /package/dist/{markdown-SU223TR6.js.map → markdown-STBGDZM6.js.map} +0 -0
- /package/dist/{meriyah-3S2WWPMR.js.map → meriyah-65T7PG5O.js.map} +0 -0
- /package/dist/{postcss-RA47AJ7I.js.map → postcss-ASIVSSN2.js.map} +0 -0
- /package/dist/{read-pkg-HWNLHFCY.js.map → read-pkg-MWZA3RU5.js.map} +0 -0
- /package/dist/{spans-TV4F3RZ7.js.map → spans-3EJDY2PZ.js.map} +0 -0
- /package/dist/{src-ALE7QWXL.js.map → src-DWCFAABS.js.map} +0 -0
- /package/dist/{token-34GS4QKE.js.map → token-YF6QEPIT.js.map} +0 -0
- /package/dist/{token-util-WAHOBHZI.js.map → token-util-TV464TI4.js.map} +0 -0
- /package/dist/{typescript-TZHIKPAW.js.map → typescript-ZZIEC5OF.js.map} +0 -0
- /package/dist/{wrap-ansi-AK2NK734.js.map → wrap-ansi-7RMGVNIF.js.map} +0 -0
- /package/dist/{yaml-IKUL3PG4.js.map → yaml-P2AMYUL3.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 = 'd6e752a2cecf8e93bafaf04dda2d5214949ae79a';
|
|
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-QQTIZ3JW.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-7XGJ2DPJ.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-X2O46BBJ.js";
|
|
54
54
|
import {
|
|
55
55
|
require_commonjs
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-H427LM2L.js";
|
|
57
57
|
import {
|
|
58
58
|
require_dc_polyfill
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-Y5UCK4QB.js";
|
|
60
60
|
import {
|
|
61
61
|
require_token_error
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-4N2GPPW5.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-FAJ3NJRT.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-E33HPBUC.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 truncate(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 = truncate;
|
|
7452
7452
|
lodash.unescape = unescape3;
|
|
7453
7453
|
lodash.uniqueId = uniqueId;
|
|
7454
7454
|
lodash.upperCase = upperCase;
|
|
@@ -43398,36 +43398,13 @@ 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;
|
|
43402
43401
|
exports2.getTextAttachmentType = getTextAttachmentType;
|
|
43403
43402
|
exports2.normalizeAttachmentMimeType = normalizeAttachmentMimeType;
|
|
43404
43403
|
exports2.toAttachmentUploadDescriptor = toAttachmentUploadDescriptor2;
|
|
43405
43404
|
exports2.buildAttachmentUploadFormData = buildAttachmentUploadFormData2;
|
|
43406
43405
|
exports2.createUploadedAttachmentFromServer = createUploadedAttachmentFromServer;
|
|
43407
43406
|
exports2.uploadAttachmentToServerApi = uploadAttachmentToServerApi2;
|
|
43408
|
-
var
|
|
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
|
-
];
|
|
43407
|
+
var DEFAULT_MIME_TYPE = "application/octet-stream";
|
|
43431
43408
|
var TEXT_ATTACHMENT_MIME_TYPES2 = {
|
|
43432
43409
|
csv: "text/csv",
|
|
43433
43410
|
css: "text/css",
|
|
@@ -43511,21 +43488,7 @@ var require_attachment_upload = __commonJS({
|
|
|
43511
43488
|
const normalizedMimeType = mimeType.toLowerCase();
|
|
43512
43489
|
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");
|
|
43513
43490
|
}
|
|
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
|
-
}
|
|
43525
43491
|
function getTextAttachmentType(params) {
|
|
43526
|
-
if (isOfficeXml(params)) {
|
|
43527
|
-
return null;
|
|
43528
|
-
}
|
|
43529
43492
|
const normalizedFileName = normalizeNonEmptyString(params.fileName)?.toLowerCase();
|
|
43530
43493
|
const normalizedMimeType = normalizeNonEmptyString(params.mimeType)?.toLowerCase();
|
|
43531
43494
|
if (normalizedMimeType === "text/csv" || normalizedFileName?.endsWith(".csv")) {
|
|
@@ -43552,13 +43515,13 @@ var require_attachment_upload = __commonJS({
|
|
|
43552
43515
|
function normalizeAttachmentMimeType(params) {
|
|
43553
43516
|
const normalizedMimeType = normalizeNonEmptyString(params.mimeType)?.toLowerCase() ?? normalizeNonEmptyString(params.fallbackMimeType)?.toLowerCase();
|
|
43554
43517
|
const textLikeMimeType = getTextLikeMimeTypeFromFileName(params.fileName);
|
|
43555
|
-
if (
|
|
43556
|
-
return normalizedMimeType;
|
|
43518
|
+
if (!textLikeMimeType) {
|
|
43519
|
+
return normalizedMimeType ?? DEFAULT_MIME_TYPE;
|
|
43557
43520
|
}
|
|
43558
|
-
if (
|
|
43521
|
+
if (!normalizedMimeType) {
|
|
43559
43522
|
return textLikeMimeType;
|
|
43560
43523
|
}
|
|
43561
|
-
return normalizedMimeType
|
|
43524
|
+
return isTextLikeMimeType(normalizedMimeType) ? normalizedMimeType : textLikeMimeType;
|
|
43562
43525
|
}
|
|
43563
43526
|
function getDefaultFileName(mimeType) {
|
|
43564
43527
|
const normalizedMimeType = mimeType.toLowerCase();
|
|
@@ -43580,12 +43543,6 @@ var require_attachment_upload = __commonJS({
|
|
|
43580
43543
|
function decodeBase64(base64Data) {
|
|
43581
43544
|
return Uint8Array.from(atob(base64Data), (char) => char.charCodeAt(0));
|
|
43582
43545
|
}
|
|
43583
|
-
function withMimeType(blob, mimeType) {
|
|
43584
|
-
if (blob.type === mimeType) {
|
|
43585
|
-
return blob;
|
|
43586
|
-
}
|
|
43587
|
-
return new Blob([blob], { type: mimeType });
|
|
43588
|
-
}
|
|
43589
43546
|
function parseDataUrl2(data3) {
|
|
43590
43547
|
const match2 = data3.match(/^data:([^;,]+)?(?:;base64)?,(.*)$/s);
|
|
43591
43548
|
if (!match2) {
|
|
@@ -43606,11 +43563,8 @@ var require_attachment_upload = __commonJS({
|
|
|
43606
43563
|
mimeType: source2.type,
|
|
43607
43564
|
fallbackMimeType: options8?.fallbackMimeType
|
|
43608
43565
|
});
|
|
43609
|
-
if (!mimeType) {
|
|
43610
|
-
return null;
|
|
43611
|
-
}
|
|
43612
43566
|
return {
|
|
43613
|
-
blob:
|
|
43567
|
+
blob: source2,
|
|
43614
43568
|
fileName: resolveFileName({
|
|
43615
43569
|
fileName: source2.name,
|
|
43616
43570
|
fallbackFileName: options8?.fallbackFileName,
|
|
@@ -43626,11 +43580,8 @@ var require_attachment_upload = __commonJS({
|
|
|
43626
43580
|
mimeType: source2.type,
|
|
43627
43581
|
fallbackMimeType: options8?.fallbackMimeType
|
|
43628
43582
|
});
|
|
43629
|
-
if (!mimeType) {
|
|
43630
|
-
return null;
|
|
43631
|
-
}
|
|
43632
43583
|
return {
|
|
43633
|
-
blob:
|
|
43584
|
+
blob: source2,
|
|
43634
43585
|
fileName: resolveFileName({
|
|
43635
43586
|
fileName: sourceWithOptionalName.name,
|
|
43636
43587
|
fallbackFileName: options8?.fallbackFileName,
|
|
@@ -43647,9 +43598,6 @@ var require_attachment_upload = __commonJS({
|
|
|
43647
43598
|
fallbackMimeType: options8?.fallbackMimeType
|
|
43648
43599
|
});
|
|
43649
43600
|
const base64Data = parsedDataUrl?.base64Data ?? source2.data;
|
|
43650
|
-
if (!mimeType) {
|
|
43651
|
-
return null;
|
|
43652
|
-
}
|
|
43653
43601
|
return {
|
|
43654
43602
|
blob: new Blob([decodeBase64(base64Data)], { type: mimeType }),
|
|
43655
43603
|
fileName: resolveFileName({
|
|
@@ -43698,9 +43646,6 @@ var require_attachment_upload = __commonJS({
|
|
|
43698
43646
|
mimeType: source2.mimeType,
|
|
43699
43647
|
fallbackMimeType: options8?.fallbackMimeType ?? TEXT_ATTACHMENT_MIME_TYPES2[source2.type]
|
|
43700
43648
|
});
|
|
43701
|
-
if (!mimeType) {
|
|
43702
|
-
return null;
|
|
43703
|
-
}
|
|
43704
43649
|
return {
|
|
43705
43650
|
blob: new Blob([source2.content], { type: mimeType }),
|
|
43706
43651
|
fileName: resolveFileName({
|
|
@@ -43881,7 +43826,6 @@ var require_git_url = __commonJS({
|
|
|
43881
43826
|
exports2.detectGitProvider = detectGitProvider;
|
|
43882
43827
|
exports2.isGitCommitHash = isGitCommitHash;
|
|
43883
43828
|
exports2.getCommitUrlForHash = getCommitUrlForHash2;
|
|
43884
|
-
exports2.sshGitUrlToHttps = sshGitUrlToHttps;
|
|
43885
43829
|
exports2.isCommitUrlForHash = isCommitUrlForHash;
|
|
43886
43830
|
var HTTPS_GIT_URL_RE = /^https?:\/\/[^\s/$.?#]+(?:\.[^\s/$.?#]+)+\/[^\s/$.?#]+(\/[^\s/$.?#]+)+(\.git)?\/?$/i;
|
|
43887
43831
|
var SSH_GIT_URL_RE = /^[\w-]+@[\w.-]+:[\w./-]+(\.git)?$/;
|
|
@@ -44008,47 +43952,6 @@ var require_git_url = __commonJS({
|
|
|
44008
43952
|
provider
|
|
44009
43953
|
})}`;
|
|
44010
43954
|
}
|
|
44011
|
-
function sshGitUrlToHttps(url4) {
|
|
44012
|
-
const trimmed2 = url4.trim();
|
|
44013
|
-
try {
|
|
44014
|
-
const parsed = new URL(trimmed2);
|
|
44015
|
-
if (parsed.protocol === "https:" || parsed.protocol === "http:") {
|
|
44016
|
-
if (parsed.hostname === "dev.azure.com" && parsed.pathname.includes("/_git/")) {
|
|
44017
|
-
return trimmed2.replace(/\/+$/, "");
|
|
44018
|
-
}
|
|
44019
|
-
return ensureGitSuffix(trimmed2);
|
|
44020
|
-
}
|
|
44021
|
-
if (parsed.protocol === "ssh:") {
|
|
44022
|
-
const host = parsed.hostname;
|
|
44023
|
-
const path77 = parsed.pathname;
|
|
44024
|
-
if (host === "ssh.dev.azure.com") {
|
|
44025
|
-
const azureMatch = path77.match(/^\/v3\/([^/]+)\/([^/]+)\/(.+?)(?:\.git)?\/?$/);
|
|
44026
|
-
if (azureMatch) {
|
|
44027
|
-
return `https://dev.azure.com/${azureMatch[1]}/${azureMatch[2]}/_git/${azureMatch[3]}`;
|
|
44028
|
-
}
|
|
44029
|
-
}
|
|
44030
|
-
return ensureGitSuffix(`https://${host}${path77}`);
|
|
44031
|
-
}
|
|
44032
|
-
} catch {
|
|
44033
|
-
}
|
|
44034
|
-
const sshMatch = trimmed2.match(/^[\w-]+@([\w.-]+):(.+?)(?:\.git)?\s*$/);
|
|
44035
|
-
if (sshMatch?.[1] && sshMatch[2]) {
|
|
44036
|
-
const host = sshMatch[1];
|
|
44037
|
-
const path77 = sshMatch[2];
|
|
44038
|
-
if (host === "ssh.dev.azure.com") {
|
|
44039
|
-
const azureMatch = path77.match(/^v3\/([^/]+)\/([^/]+)\/(.+)$/);
|
|
44040
|
-
if (azureMatch) {
|
|
44041
|
-
return `https://dev.azure.com/${azureMatch[1]}/${azureMatch[2]}/_git/${azureMatch[3]}`;
|
|
44042
|
-
}
|
|
44043
|
-
}
|
|
44044
|
-
return `https://${host}/${path77}.git`;
|
|
44045
|
-
}
|
|
44046
|
-
return null;
|
|
44047
|
-
}
|
|
44048
|
-
function ensureGitSuffix(url4) {
|
|
44049
|
-
const cleaned = url4.replace(/\/+$/, "");
|
|
44050
|
-
return cleaned.endsWith(".git") ? cleaned : `${cleaned}.git`;
|
|
44051
|
-
}
|
|
44052
43955
|
function isCommitUrlForHash(params) {
|
|
44053
43956
|
const { hash: hash2, url: url4 } = params;
|
|
44054
43957
|
const trimmedHash = hash2.trim();
|
|
@@ -70186,12 +70089,12 @@ var require_unreachable = __commonJS({
|
|
|
70186
70089
|
var require_base64 = __commonJS({
|
|
70187
70090
|
"../../../../node_modules/.pnpm/js-base64@3.7.7/node_modules/js-base64/base64.js"(exports2, module2) {
|
|
70188
70091
|
init_cjs_shims();
|
|
70189
|
-
(function(global2,
|
|
70190
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports =
|
|
70092
|
+
(function(global2, factory9) {
|
|
70093
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory9() : typeof define === "function" && define.amd ? define(factory9) : (
|
|
70191
70094
|
// cf. https://github.com/dankogai/js-base64/issues/119
|
|
70192
70095
|
(function() {
|
|
70193
70096
|
var _Base64 = global2.Base64;
|
|
70194
|
-
var gBase64 =
|
|
70097
|
+
var gBase64 = factory9();
|
|
70195
70098
|
gBase64.noConflict = function() {
|
|
70196
70099
|
global2.Base64 = _Base64;
|
|
70197
70100
|
return gBase64;
|
|
@@ -88958,8 +88861,8 @@ var require_data = __commonJS({
|
|
|
88958
88861
|
var require_uri_all = __commonJS({
|
|
88959
88862
|
"../../../../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports2, module2) {
|
|
88960
88863
|
init_cjs_shims();
|
|
88961
|
-
(function(global2,
|
|
88962
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
88864
|
+
(function(global2, factory9) {
|
|
88865
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory9(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory9) : factory9(global2.URI = global2.URI || {});
|
|
88963
88866
|
})(exports2, (function(exports3) {
|
|
88964
88867
|
"use strict";
|
|
88965
88868
|
function merge5() {
|
|
@@ -96721,15 +96624,15 @@ var require_api_files = __commonJS({
|
|
|
96721
96624
|
exports2.readAppApiYamlFile = readAppApiYamlFile4;
|
|
96722
96625
|
exports2.resolveLanguageSpecificStepContentFromBlocks = resolveLanguageSpecificStepContentFromBlocks2;
|
|
96723
96626
|
async function writeApiFiles3(...args) {
|
|
96724
|
-
const esmFunction = await import("./api-
|
|
96627
|
+
const esmFunction = await import("./api-F7VFMVH5.js");
|
|
96725
96628
|
return esmFunction.writeApiFiles(...args);
|
|
96726
96629
|
}
|
|
96727
96630
|
async function readAppApiYamlFile4(...args) {
|
|
96728
|
-
const esmFunction = await import("./api-
|
|
96631
|
+
const esmFunction = await import("./api-F7VFMVH5.js");
|
|
96729
96632
|
return esmFunction.readAppApiYamlFile(...args);
|
|
96730
96633
|
}
|
|
96731
96634
|
async function resolveLanguageSpecificStepContentFromBlocks2(...args) {
|
|
96732
|
-
const esmFunction = await import("./api-
|
|
96635
|
+
const esmFunction = await import("./api-F7VFMVH5.js");
|
|
96733
96636
|
return esmFunction.resolveLanguageSpecificStepContentFromBlocks(...args);
|
|
96734
96637
|
}
|
|
96735
96638
|
}
|
|
@@ -109521,19 +109424,19 @@ var require_getMachineId = __commonJS({
|
|
|
109521
109424
|
if (!getMachineIdImpl) {
|
|
109522
109425
|
switch (process5.platform) {
|
|
109523
109426
|
case "darwin":
|
|
109524
|
-
getMachineIdImpl = (await import("./getMachineId-darwin-
|
|
109427
|
+
getMachineIdImpl = (await import("./getMachineId-darwin-VTQRCEUS.js")).getMachineId;
|
|
109525
109428
|
break;
|
|
109526
109429
|
case "linux":
|
|
109527
|
-
getMachineIdImpl = (await import("./getMachineId-linux-
|
|
109430
|
+
getMachineIdImpl = (await import("./getMachineId-linux-4IXPONMU.js")).getMachineId;
|
|
109528
109431
|
break;
|
|
109529
109432
|
case "freebsd":
|
|
109530
|
-
getMachineIdImpl = (await import("./getMachineId-bsd-
|
|
109433
|
+
getMachineIdImpl = (await import("./getMachineId-bsd-I2VASQDS.js")).getMachineId;
|
|
109531
109434
|
break;
|
|
109532
109435
|
case "win32":
|
|
109533
|
-
getMachineIdImpl = (await import("./getMachineId-win-
|
|
109436
|
+
getMachineIdImpl = (await import("./getMachineId-win-C7XX6XLO.js")).getMachineId;
|
|
109534
109437
|
break;
|
|
109535
109438
|
default:
|
|
109536
|
-
getMachineIdImpl = (await import("./getMachineId-unsupported-
|
|
109439
|
+
getMachineIdImpl = (await import("./getMachineId-unsupported-UAR7YCNX.js")).getMachineId;
|
|
109537
109440
|
break;
|
|
109538
109441
|
}
|
|
109539
109442
|
}
|
|
@@ -132204,8 +132107,8 @@ var require_float = __commonJS({
|
|
|
132204
132107
|
"../../../../node_modules/.pnpm/@protobufjs+float@1.0.2/node_modules/@protobufjs/float/index.js"(exports2, module2) {
|
|
132205
132108
|
"use strict";
|
|
132206
132109
|
init_cjs_shims();
|
|
132207
|
-
module2.exports =
|
|
132208
|
-
function
|
|
132110
|
+
module2.exports = factory9(factory9);
|
|
132111
|
+
function factory9(exports3) {
|
|
132209
132112
|
if (typeof Float32Array !== "undefined") (function() {
|
|
132210
132113
|
var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
|
|
132211
132114
|
function writeFloat_f32_cpy(val2, buf, pos3) {
|
|
@@ -139872,23 +139775,23 @@ var require_util7 = __commonJS({
|
|
|
139872
139775
|
var require_umd = __commonJS({
|
|
139873
139776
|
"../../../../node_modules/.pnpm/long@5.3.1/node_modules/long/umd/index.js"(exports2, module2) {
|
|
139874
139777
|
init_cjs_shims();
|
|
139875
|
-
(function(global2,
|
|
139778
|
+
(function(global2, factory9) {
|
|
139876
139779
|
function unwrapDefault(exports3) {
|
|
139877
139780
|
return "default" in exports3 ? exports3.default : exports3;
|
|
139878
139781
|
}
|
|
139879
139782
|
if (typeof define === "function" && define.amd) {
|
|
139880
139783
|
define([], function() {
|
|
139881
139784
|
var exports3 = {};
|
|
139882
|
-
|
|
139785
|
+
factory9(exports3);
|
|
139883
139786
|
return unwrapDefault(exports3);
|
|
139884
139787
|
});
|
|
139885
139788
|
} else if (typeof exports2 === "object") {
|
|
139886
|
-
|
|
139789
|
+
factory9(exports2);
|
|
139887
139790
|
if (typeof module2 === "object") module2.exports = unwrapDefault(exports2);
|
|
139888
139791
|
} else {
|
|
139889
139792
|
(function() {
|
|
139890
139793
|
var exports3 = {};
|
|
139891
|
-
|
|
139794
|
+
factory9(exports3);
|
|
139892
139795
|
global2.Long = unwrapDefault(exports3);
|
|
139893
139796
|
})();
|
|
139894
139797
|
}
|
|
@@ -143599,7 +143502,7 @@ var require_filter_stack = __commonJS({
|
|
|
143599
143502
|
return new _FilterStackFactory([...this.factories]);
|
|
143600
143503
|
}
|
|
143601
143504
|
createFilter() {
|
|
143602
|
-
return new FilterStack(this.factories.map((
|
|
143505
|
+
return new FilterStack(this.factories.map((factory9) => factory9.createFilter()));
|
|
143603
143506
|
}
|
|
143604
143507
|
};
|
|
143605
143508
|
exports2.FilterStackFactory = FilterStackFactory;
|
|
@@ -154463,8 +154366,8 @@ var require_splat = __commonJS({
|
|
|
154463
154366
|
var require_fecha_umd = __commonJS({
|
|
154464
154367
|
"../../../../node_modules/.pnpm/fecha@4.2.3/node_modules/fecha/lib/fecha.umd.js"(exports2, module2) {
|
|
154465
154368
|
init_cjs_shims();
|
|
154466
|
-
(function(global2,
|
|
154467
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
154369
|
+
(function(global2, factory9) {
|
|
154370
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory9(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory9) : factory9(global2.fecha = {});
|
|
154468
154371
|
})(exports2, (function(exports3) {
|
|
154469
154372
|
"use strict";
|
|
154470
154373
|
var token2 = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
@@ -163260,7 +163163,7 @@ var require_globrex = __commonJS({
|
|
|
163260
163163
|
"../../../../node_modules/.pnpm/globrex@0.1.2/node_modules/globrex/index.js"(exports2, module2) {
|
|
163261
163164
|
init_cjs_shims();
|
|
163262
163165
|
var isWin = process.platform === "win32";
|
|
163263
|
-
var
|
|
163166
|
+
var SEP = isWin ? `\\\\+` : `\\/`;
|
|
163264
163167
|
var SEP_ESC = isWin ? `\\\\` : `/`;
|
|
163265
163168
|
var GLOBSTAR2 = `((?:[^/]*(?:/|$))*)`;
|
|
163266
163169
|
var WILDCARD = `([^/]*)`;
|
|
@@ -163276,7 +163179,7 @@ var require_globrex = __commonJS({
|
|
|
163276
163179
|
function add2(str, { split, last: last3, only } = {}) {
|
|
163277
163180
|
if (only !== "path") regex += str;
|
|
163278
163181
|
if (filepath && only !== "regex") {
|
|
163279
|
-
path77.regex += str === "\\/" ?
|
|
163182
|
+
path77.regex += str === "\\/" ? SEP : str;
|
|
163280
163183
|
if (split) {
|
|
163281
163184
|
if (last3) segment += str;
|
|
163282
163185
|
if (segment !== "") {
|
|
@@ -182819,7 +182722,7 @@ var require_dist6 = __commonJS({
|
|
|
182819
182722
|
asSchema: () => asSchema4,
|
|
182820
182723
|
combineHeaders: () => combineHeaders3,
|
|
182821
182724
|
convertAsyncIteratorToReadableStream: () => convertAsyncIteratorToReadableStream,
|
|
182822
|
-
convertBase64ToUint8Array: () =>
|
|
182725
|
+
convertBase64ToUint8Array: () => convertBase64ToUint8Array,
|
|
182823
182726
|
convertImageModelFileToDataUri: () => convertImageModelFileToDataUri,
|
|
182824
182727
|
convertToBase64: () => convertToBase642,
|
|
182825
182728
|
convertToFormData: () => convertToFormData,
|
|
@@ -183018,7 +182921,7 @@ var require_dist6 = __commonJS({
|
|
|
183018
182921
|
return Object.fromEntries([...response.headers]);
|
|
183019
182922
|
}
|
|
183020
182923
|
var { btoa: btoa4, atob: atob4 } = globalThis;
|
|
183021
|
-
function
|
|
182924
|
+
function convertBase64ToUint8Array(base64String) {
|
|
183022
182925
|
const base64Url = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
|
183023
182926
|
const latin1string = atob4(base64Url);
|
|
183024
182927
|
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
@@ -185396,8 +185299,8 @@ var require_get_vercel_oidc_token = __commonJS({
|
|
|
185396
185299
|
}
|
|
185397
185300
|
try {
|
|
185398
185301
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
185399
|
-
await import("./token-util-
|
|
185400
|
-
await import("./token-
|
|
185302
|
+
await import("./token-util-TV464TI4.js"),
|
|
185303
|
+
await import("./token-YF6QEPIT.js")
|
|
185401
185304
|
]);
|
|
185402
185305
|
if (!token2 || isExpired(getTokenPayload(token2))) {
|
|
185403
185306
|
await refreshToken();
|
|
@@ -185500,7 +185403,7 @@ var require_dist8 = __commonJS({
|
|
|
185500
185403
|
module2.exports = __toCommonJS3(src_exports2);
|
|
185501
185404
|
var import_provider_utils112 = require_dist6();
|
|
185502
185405
|
var import_provider25 = require_dist4();
|
|
185503
|
-
var
|
|
185406
|
+
var import_v422 = require_v4();
|
|
185504
185407
|
var marker17 = "vercel.ai.gateway.error";
|
|
185505
185408
|
var symbol18 = Symbol.for(marker17);
|
|
185506
185409
|
var _a21;
|
|
@@ -185634,15 +185537,15 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185634
185537
|
return GatewayError.hasMarker(error40) && symbol42 in error40;
|
|
185635
185538
|
}
|
|
185636
185539
|
};
|
|
185637
|
-
var
|
|
185638
|
-
var
|
|
185540
|
+
var import_v423 = require_v4();
|
|
185541
|
+
var import_provider_utils27 = require_dist6();
|
|
185639
185542
|
var name42 = "GatewayModelNotFoundError";
|
|
185640
185543
|
var marker52 = `vercel.ai.gateway.error.${name42}`;
|
|
185641
185544
|
var symbol52 = Symbol.for(marker52);
|
|
185642
|
-
var modelNotFoundParamSchema = (0,
|
|
185643
|
-
() => (0,
|
|
185644
|
-
|
|
185645
|
-
modelId:
|
|
185545
|
+
var modelNotFoundParamSchema = (0, import_provider_utils27.lazySchema)(
|
|
185546
|
+
() => (0, import_provider_utils27.zodSchema)(
|
|
185547
|
+
import_v423.z.object({
|
|
185548
|
+
modelId: import_v423.z.string()
|
|
185646
185549
|
})
|
|
185647
185550
|
)
|
|
185648
185551
|
);
|
|
@@ -185712,7 +185615,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185712
185615
|
return GatewayError.hasMarker(error40) && symbol72 in error40;
|
|
185713
185616
|
}
|
|
185714
185617
|
};
|
|
185715
|
-
var
|
|
185618
|
+
var import_provider_utils28 = require_dist6();
|
|
185716
185619
|
async function createGatewayErrorFromResponse({
|
|
185717
185620
|
response,
|
|
185718
185621
|
statusCode,
|
|
@@ -185721,7 +185624,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185721
185624
|
authMethod
|
|
185722
185625
|
}) {
|
|
185723
185626
|
var _a92;
|
|
185724
|
-
const parseResult = await (0,
|
|
185627
|
+
const parseResult = await (0, import_provider_utils28.safeValidateTypes)({
|
|
185725
185628
|
value: response,
|
|
185726
185629
|
schema: gatewayErrorResponseSchema
|
|
185727
185630
|
});
|
|
@@ -185764,7 +185667,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185764
185667
|
generationId
|
|
185765
185668
|
});
|
|
185766
185669
|
case "model_not_found": {
|
|
185767
|
-
const modelResult = await (0,
|
|
185670
|
+
const modelResult = await (0, import_provider_utils28.safeValidateTypes)({
|
|
185768
185671
|
value: validatedResponse.error.param,
|
|
185769
185672
|
schema: modelNotFoundParamSchema
|
|
185770
185673
|
});
|
|
@@ -185792,16 +185695,16 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
185792
185695
|
});
|
|
185793
185696
|
}
|
|
185794
185697
|
}
|
|
185795
|
-
var gatewayErrorResponseSchema = (0,
|
|
185796
|
-
() => (0,
|
|
185797
|
-
|
|
185798
|
-
error:
|
|
185799
|
-
message:
|
|
185800
|
-
type:
|
|
185801
|
-
param:
|
|
185802
|
-
code:
|
|
185698
|
+
var gatewayErrorResponseSchema = (0, import_provider_utils28.lazySchema)(
|
|
185699
|
+
() => (0, import_provider_utils28.zodSchema)(
|
|
185700
|
+
import_v422.z.object({
|
|
185701
|
+
error: import_v422.z.object({
|
|
185702
|
+
message: import_v422.z.string(),
|
|
185703
|
+
type: import_v422.z.string().nullish(),
|
|
185704
|
+
param: import_v422.z.unknown().nullish(),
|
|
185705
|
+
code: import_v422.z.union([import_v422.z.string(), import_v422.z.number()]).nullish()
|
|
185803
185706
|
}),
|
|
185804
|
-
generationId:
|
|
185707
|
+
generationId: import_v422.z.string().nullish()
|
|
185805
185708
|
})
|
|
185806
185709
|
)
|
|
185807
185710
|
);
|
|
@@ -186567,37 +186470,37 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
186567
186470
|
})
|
|
186568
186471
|
]);
|
|
186569
186472
|
var import_provider_utils92 = require_dist6();
|
|
186570
|
-
var
|
|
186473
|
+
var import_zod54 = require_zod();
|
|
186571
186474
|
var parallelSearchInputSchema = (0, import_provider_utils92.lazySchema)(
|
|
186572
186475
|
() => (0, import_provider_utils92.zodSchema)(
|
|
186573
|
-
|
|
186574
|
-
objective:
|
|
186476
|
+
import_zod54.z.object({
|
|
186477
|
+
objective: import_zod54.z.string().describe(
|
|
186575
186478
|
"Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."
|
|
186576
186479
|
),
|
|
186577
|
-
search_queries:
|
|
186480
|
+
search_queries: import_zod54.z.array(import_zod54.z.string()).optional().describe(
|
|
186578
186481
|
"Optional search queries to supplement the objective. Maximum 200 characters per query."
|
|
186579
186482
|
),
|
|
186580
|
-
mode:
|
|
186483
|
+
mode: import_zod54.z.enum(["one-shot", "agentic"]).optional().describe(
|
|
186581
186484
|
'Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'
|
|
186582
186485
|
),
|
|
186583
|
-
max_results:
|
|
186486
|
+
max_results: import_zod54.z.number().optional().describe(
|
|
186584
186487
|
"Maximum number of results to return (1-20). Defaults to 10 if not specified."
|
|
186585
186488
|
),
|
|
186586
|
-
source_policy:
|
|
186587
|
-
include_domains:
|
|
186588
|
-
exclude_domains:
|
|
186589
|
-
after_date:
|
|
186489
|
+
source_policy: import_zod54.z.object({
|
|
186490
|
+
include_domains: import_zod54.z.array(import_zod54.z.string()).optional().describe("List of domains to include in search results."),
|
|
186491
|
+
exclude_domains: import_zod54.z.array(import_zod54.z.string()).optional().describe("List of domains to exclude from search results."),
|
|
186492
|
+
after_date: import_zod54.z.string().optional().describe(
|
|
186590
186493
|
"Only include results published after this date (ISO 8601 format)."
|
|
186591
186494
|
)
|
|
186592
186495
|
}).optional().describe(
|
|
186593
186496
|
"Source policy for controlling which domains to include/exclude and freshness."
|
|
186594
186497
|
),
|
|
186595
|
-
excerpts:
|
|
186596
|
-
max_chars_per_result:
|
|
186597
|
-
max_chars_total:
|
|
186498
|
+
excerpts: import_zod54.z.object({
|
|
186499
|
+
max_chars_per_result: import_zod54.z.number().optional().describe("Maximum characters per result."),
|
|
186500
|
+
max_chars_total: import_zod54.z.number().optional().describe("Maximum total characters across all results.")
|
|
186598
186501
|
}).optional().describe("Excerpt configuration for controlling result length."),
|
|
186599
|
-
fetch_policy:
|
|
186600
|
-
max_age_seconds:
|
|
186502
|
+
fetch_policy: import_zod54.z.object({
|
|
186503
|
+
max_age_seconds: import_zod54.z.number().optional().describe(
|
|
186601
186504
|
"Maximum age in seconds for cached content. Set to 0 to always fetch fresh content."
|
|
186602
186505
|
)
|
|
186603
186506
|
}).optional().describe("Fetch policy for controlling content freshness.")
|
|
@@ -186606,23 +186509,23 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
186606
186509
|
);
|
|
186607
186510
|
var parallelSearchOutputSchema = (0, import_provider_utils92.lazySchema)(
|
|
186608
186511
|
() => (0, import_provider_utils92.zodSchema)(
|
|
186609
|
-
|
|
186512
|
+
import_zod54.z.union([
|
|
186610
186513
|
// Success response
|
|
186611
|
-
|
|
186612
|
-
searchId:
|
|
186613
|
-
results:
|
|
186614
|
-
|
|
186615
|
-
url:
|
|
186616
|
-
title:
|
|
186617
|
-
excerpt:
|
|
186618
|
-
publishDate:
|
|
186619
|
-
relevanceScore:
|
|
186514
|
+
import_zod54.z.object({
|
|
186515
|
+
searchId: import_zod54.z.string(),
|
|
186516
|
+
results: import_zod54.z.array(
|
|
186517
|
+
import_zod54.z.object({
|
|
186518
|
+
url: import_zod54.z.string(),
|
|
186519
|
+
title: import_zod54.z.string(),
|
|
186520
|
+
excerpt: import_zod54.z.string(),
|
|
186521
|
+
publishDate: import_zod54.z.string().nullable().optional(),
|
|
186522
|
+
relevanceScore: import_zod54.z.number().optional()
|
|
186620
186523
|
})
|
|
186621
186524
|
)
|
|
186622
186525
|
}),
|
|
186623
186526
|
// Error response
|
|
186624
|
-
|
|
186625
|
-
error:
|
|
186527
|
+
import_zod54.z.object({
|
|
186528
|
+
error: import_zod54.z.enum([
|
|
186626
186529
|
"api_error",
|
|
186627
186530
|
"rate_limit",
|
|
186628
186531
|
"timeout",
|
|
@@ -186630,8 +186533,8 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
186630
186533
|
"configuration_error",
|
|
186631
186534
|
"unknown"
|
|
186632
186535
|
]),
|
|
186633
|
-
statusCode:
|
|
186634
|
-
message:
|
|
186536
|
+
statusCode: import_zod54.z.number().optional(),
|
|
186537
|
+
message: import_zod54.z.string()
|
|
186635
186538
|
})
|
|
186636
186539
|
])
|
|
186637
186540
|
)
|
|
@@ -186944,7 +186847,7 @@ var require_dist9 = __commonJS({
|
|
|
186944
186847
|
DefaultChatTransport: () => DefaultChatTransport,
|
|
186945
186848
|
DefaultGeneratedFile: () => DefaultGeneratedFile,
|
|
186946
186849
|
DirectChatTransport: () => DirectChatTransport,
|
|
186947
|
-
DownloadError: () =>
|
|
186850
|
+
DownloadError: () => import_provider_utils27.DownloadError,
|
|
186948
186851
|
EmptyResponseBodyError: () => import_provider212.EmptyResponseBodyError,
|
|
186949
186852
|
Experimental_Agent: () => ToolLoopAgent,
|
|
186950
186853
|
HttpChatTransport: () => HttpChatTransport,
|
|
@@ -187019,7 +186922,7 @@ var require_dist9 = __commonJS({
|
|
|
187019
186922
|
gateway: () => import_gateway3.gateway,
|
|
187020
186923
|
generateId: () => import_provider_utils39.generateId,
|
|
187021
186924
|
generateImage: () => generateImage,
|
|
187022
|
-
generateObject: () =>
|
|
186925
|
+
generateObject: () => generateObject6,
|
|
187023
186926
|
generateText: () => generateText2,
|
|
187024
186927
|
getStaticToolName: () => getStaticToolName,
|
|
187025
186928
|
getTextFromDataUrl: () => getTextFromDataUrl,
|
|
@@ -187471,7 +187374,7 @@ var require_dist9 = __commonJS({
|
|
|
187471
187374
|
}
|
|
187472
187375
|
};
|
|
187473
187376
|
_a182 = symbol182;
|
|
187474
|
-
var
|
|
187377
|
+
var import_provider_utils27 = require_dist6();
|
|
187475
187378
|
var import_provider202 = require_dist4();
|
|
187476
187379
|
var name19 = "AI_RetryError";
|
|
187477
187380
|
var marker19 = `vercel.ai.error.${name19}`;
|
|
@@ -187828,7 +187731,7 @@ var require_dist9 = __commonJS({
|
|
|
187828
187731
|
return timeout.chunkMs;
|
|
187829
187732
|
}
|
|
187830
187733
|
var import_provider_utils62 = require_dist6();
|
|
187831
|
-
var
|
|
187734
|
+
var import_provider_utils28 = require_dist6();
|
|
187832
187735
|
var imageMediaTypeSignatures = [
|
|
187833
187736
|
{
|
|
187834
187737
|
mediaType: "image/gif",
|
|
@@ -188026,7 +187929,7 @@ var require_dist9 = __commonJS({
|
|
|
188026
187929
|
}
|
|
188027
187930
|
];
|
|
188028
187931
|
var stripID3 = (data3) => {
|
|
188029
|
-
const bytes = typeof data3 === "string" ? (0,
|
|
187932
|
+
const bytes = typeof data3 === "string" ? (0, import_provider_utils28.convertBase64ToUint8Array)(data3) : data3;
|
|
188030
187933
|
const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;
|
|
188031
187934
|
return bytes.slice(id3Size + 10);
|
|
188032
187935
|
};
|
|
@@ -188041,7 +187944,7 @@ var require_dist9 = __commonJS({
|
|
|
188041
187944
|
signatures
|
|
188042
187945
|
}) {
|
|
188043
187946
|
const processedData = stripID3TagsIfPresent(data3);
|
|
188044
|
-
const bytes = typeof processedData === "string" ? (0,
|
|
187947
|
+
const bytes = typeof processedData === "string" ? (0, import_provider_utils28.convertBase64ToUint8Array)(
|
|
188045
187948
|
processedData.substring(0, Math.min(processedData.length, 24))
|
|
188046
187949
|
) : processedData;
|
|
188047
187950
|
for (const signature of signatures) {
|
|
@@ -188102,7 +188005,7 @@ var require_dist9 = __commonJS({
|
|
|
188102
188005
|
);
|
|
188103
188006
|
var import_provider222 = require_dist4();
|
|
188104
188007
|
var import_provider_utils52 = require_dist6();
|
|
188105
|
-
var
|
|
188008
|
+
var import_v422 = require_v4();
|
|
188106
188009
|
function splitDataUrl(dataUrl) {
|
|
188107
188010
|
try {
|
|
188108
188011
|
const [header, base64Content] = dataUrl.split(",");
|
|
@@ -188117,11 +188020,11 @@ var require_dist9 = __commonJS({
|
|
|
188117
188020
|
};
|
|
188118
188021
|
}
|
|
188119
188022
|
}
|
|
188120
|
-
var dataContentSchema =
|
|
188121
|
-
|
|
188122
|
-
|
|
188123
|
-
|
|
188124
|
-
|
|
188023
|
+
var dataContentSchema = import_v422.z.union([
|
|
188024
|
+
import_v422.z.string(),
|
|
188025
|
+
import_v422.z.instanceof(Uint8Array),
|
|
188026
|
+
import_v422.z.instanceof(ArrayBuffer),
|
|
188027
|
+
import_v422.z.custom(
|
|
188125
188028
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
188126
188029
|
(value2) => {
|
|
188127
188030
|
var _a212, _b17;
|
|
@@ -188716,15 +188619,15 @@ var require_dist9 = __commonJS({
|
|
|
188716
188619
|
var import_v462 = require_v4();
|
|
188717
188620
|
var import_v452 = require_v4();
|
|
188718
188621
|
var import_v432 = require_v4();
|
|
188719
|
-
var
|
|
188720
|
-
var jsonValueSchema =
|
|
188721
|
-
() =>
|
|
188722
|
-
|
|
188723
|
-
|
|
188724
|
-
|
|
188725
|
-
|
|
188726
|
-
|
|
188727
|
-
|
|
188622
|
+
var import_v423 = require_v4();
|
|
188623
|
+
var jsonValueSchema = import_v423.z.lazy(
|
|
188624
|
+
() => import_v423.z.union([
|
|
188625
|
+
import_v423.z.null(),
|
|
188626
|
+
import_v423.z.string(),
|
|
188627
|
+
import_v423.z.number(),
|
|
188628
|
+
import_v423.z.boolean(),
|
|
188629
|
+
import_v423.z.record(import_v423.z.string(), jsonValueSchema.optional()),
|
|
188630
|
+
import_v423.z.array(jsonValueSchema)
|
|
188728
188631
|
])
|
|
188729
188632
|
);
|
|
188730
188633
|
var providerMetadataSchema = import_v432.z.record(
|
|
@@ -196618,7 +196521,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196618
196521
|
}
|
|
196619
196522
|
}
|
|
196620
196523
|
var originalGenerateId3 = (0, import_provider_utils282.createIdGenerator)({ prefix: "aiobj", size: 24 });
|
|
196621
|
-
async function
|
|
196524
|
+
async function generateObject6(options8) {
|
|
196622
196525
|
const {
|
|
196623
196526
|
model: modelArg,
|
|
196624
196527
|
output = "object",
|
|
@@ -196886,7 +196789,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196886
196789
|
});
|
|
196887
196790
|
}
|
|
196888
196791
|
};
|
|
196889
|
-
var
|
|
196792
|
+
var import_provider_utils30 = require_dist6();
|
|
196890
196793
|
function cosineSimilarity(vector1, vector2) {
|
|
196891
196794
|
if (vector1.length !== vector2.length) {
|
|
196892
196795
|
throw new InvalidArgumentError2({
|
|
@@ -196989,7 +196892,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196989
196892
|
});
|
|
196990
196893
|
}
|
|
196991
196894
|
};
|
|
196992
|
-
var
|
|
196895
|
+
var import_provider_utils29 = require_dist6();
|
|
196993
196896
|
function simulateReadableStream({
|
|
196994
196897
|
chunks,
|
|
196995
196898
|
initialDelayInMs = 0,
|
|
@@ -196997,7 +196900,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
196997
196900
|
_internal
|
|
196998
196901
|
}) {
|
|
196999
196902
|
var _a212;
|
|
197000
|
-
const delay22 = (_a212 = _internal == null ? void 0 : _internal.delay) != null ? _a212 :
|
|
196903
|
+
const delay22 = (_a212 = _internal == null ? void 0 : _internal.delay) != null ? _a212 : import_provider_utils29.delay;
|
|
197001
196904
|
let index2 = 0;
|
|
197002
196905
|
return new ReadableStream({
|
|
197003
196906
|
async pull(controller) {
|
|
@@ -197010,7 +196913,7 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
197010
196913
|
}
|
|
197011
196914
|
});
|
|
197012
196915
|
}
|
|
197013
|
-
var originalGenerateId4 = (0,
|
|
196916
|
+
var originalGenerateId4 = (0, import_provider_utils30.createIdGenerator)({ prefix: "aiobj", size: 24 });
|
|
197014
196917
|
function streamObject(options8) {
|
|
197015
196918
|
const {
|
|
197016
196919
|
model,
|
|
@@ -197100,13 +197003,13 @@ Learn more: \x1B[34m${moreInfoURL}\x1B[0m
|
|
|
197100
197003
|
currentDate,
|
|
197101
197004
|
now: now2
|
|
197102
197005
|
}) {
|
|
197103
|
-
this._object = new
|
|
197104
|
-
this._usage = new
|
|
197105
|
-
this._providerMetadata = new
|
|
197106
|
-
this._warnings = new
|
|
197107
|
-
this._request = new
|
|
197108
|
-
this._response = new
|
|
197109
|
-
this._finishReason = new
|
|
197006
|
+
this._object = new import_provider_utils30.DelayedPromise();
|
|
197007
|
+
this._usage = new import_provider_utils30.DelayedPromise();
|
|
197008
|
+
this._providerMetadata = new import_provider_utils30.DelayedPromise();
|
|
197009
|
+
this._warnings = new import_provider_utils30.DelayedPromise();
|
|
197010
|
+
this._request = new import_provider_utils30.DelayedPromise();
|
|
197011
|
+
this._response = new import_provider_utils30.DelayedPromise();
|
|
197012
|
+
this._finishReason = new import_provider_utils30.DelayedPromise();
|
|
197110
197013
|
const model = resolveLanguageModel(modelArg);
|
|
197111
197014
|
const { maxRetries, retry } = prepareRetries({
|
|
197112
197015
|
maxRetries: maxRetriesArg,
|
|
@@ -234077,15 +233980,15 @@ var require_lib9 = __commonJS({
|
|
|
234077
233980
|
var require_esprima = __commonJS({
|
|
234078
233981
|
"../../../../node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js"(exports2, module2) {
|
|
234079
233982
|
init_cjs_shims();
|
|
234080
|
-
(function webpackUniversalModuleDefinition(root3,
|
|
233983
|
+
(function webpackUniversalModuleDefinition(root3, factory9) {
|
|
234081
233984
|
if (typeof exports2 === "object" && typeof module2 === "object")
|
|
234082
|
-
module2.exports =
|
|
233985
|
+
module2.exports = factory9();
|
|
234083
233986
|
else if (typeof define === "function" && define.amd)
|
|
234084
|
-
define([],
|
|
233987
|
+
define([], factory9);
|
|
234085
233988
|
else if (typeof exports2 === "object")
|
|
234086
|
-
exports2["esprima"] =
|
|
233989
|
+
exports2["esprima"] = factory9();
|
|
234087
233990
|
else
|
|
234088
|
-
root3["esprima"] =
|
|
233991
|
+
root3["esprima"] = factory9();
|
|
234089
233992
|
})(exports2, function() {
|
|
234090
233993
|
return (
|
|
234091
233994
|
/******/
|
|
@@ -255843,18 +255746,18 @@ var require_scope2 = __commonJS({
|
|
|
255843
255746
|
var require_sourcemap_codec_umd = __commonJS({
|
|
255844
255747
|
"../../../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports2, module2) {
|
|
255845
255748
|
init_cjs_shims();
|
|
255846
|
-
(function(global2,
|
|
255749
|
+
(function(global2, factory9) {
|
|
255847
255750
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
255848
|
-
|
|
255751
|
+
factory9(module2);
|
|
255849
255752
|
module2.exports = def(module2);
|
|
255850
255753
|
} else if (typeof define === "function" && define.amd) {
|
|
255851
255754
|
define(["module"], function(mod2) {
|
|
255852
|
-
|
|
255755
|
+
factory9.apply(this, arguments);
|
|
255853
255756
|
mod2.exports = def(mod2);
|
|
255854
255757
|
});
|
|
255855
255758
|
} else {
|
|
255856
255759
|
const mod2 = { exports: {} };
|
|
255857
|
-
|
|
255760
|
+
factory9(mod2);
|
|
255858
255761
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
255859
255762
|
global2.sourcemapCodec = def(mod2);
|
|
255860
255763
|
}
|
|
@@ -256305,8 +256208,8 @@ var require_sourcemap_codec_umd = __commonJS({
|
|
|
256305
256208
|
var require_resolve_uri_umd = __commonJS({
|
|
256306
256209
|
"../../../../node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"(exports2, module2) {
|
|
256307
256210
|
init_cjs_shims();
|
|
256308
|
-
(function(global2,
|
|
256309
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports =
|
|
256211
|
+
(function(global2, factory9) {
|
|
256212
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory9() : typeof define === "function" && define.amd ? define(factory9) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.resolveURI = factory9());
|
|
256310
256213
|
})(exports2, (function() {
|
|
256311
256214
|
"use strict";
|
|
256312
256215
|
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
@@ -256485,18 +256388,18 @@ var require_resolve_uri_umd = __commonJS({
|
|
|
256485
256388
|
var require_trace_mapping_umd = __commonJS({
|
|
256486
256389
|
"../../../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports2, module2) {
|
|
256487
256390
|
init_cjs_shims();
|
|
256488
|
-
(function(global2,
|
|
256391
|
+
(function(global2, factory9) {
|
|
256489
256392
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
256490
|
-
|
|
256393
|
+
factory9(module2, require_resolve_uri_umd(), require_sourcemap_codec_umd());
|
|
256491
256394
|
module2.exports = def(module2);
|
|
256492
256395
|
} else if (typeof define === "function" && define.amd) {
|
|
256493
256396
|
define(["module", "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec"], function(mod2) {
|
|
256494
|
-
|
|
256397
|
+
factory9.apply(this, arguments);
|
|
256495
256398
|
mod2.exports = def(mod2);
|
|
256496
256399
|
});
|
|
256497
256400
|
} else {
|
|
256498
256401
|
const mod2 = { exports: {} };
|
|
256499
|
-
|
|
256402
|
+
factory9(mod2, global2.resolveURI, global2.sourcemapCodec);
|
|
256500
256403
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
256501
256404
|
global2.traceMapping = def(mod2);
|
|
256502
256405
|
}
|
|
@@ -257026,18 +256929,18 @@ var require_trace_mapping_umd = __commonJS({
|
|
|
257026
256929
|
var require_gen_mapping_umd = __commonJS({
|
|
257027
256930
|
"../../../../node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"(exports2, module2) {
|
|
257028
256931
|
init_cjs_shims();
|
|
257029
|
-
(function(global2,
|
|
256932
|
+
(function(global2, factory9) {
|
|
257030
256933
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
257031
|
-
|
|
256934
|
+
factory9(module2, require_sourcemap_codec_umd(), require_trace_mapping_umd());
|
|
257032
256935
|
module2.exports = def(module2);
|
|
257033
256936
|
} else if (typeof define === "function" && define.amd) {
|
|
257034
256937
|
define(["module", "@jridgewell/sourcemap-codec", "@jridgewell/trace-mapping"], function(mod2) {
|
|
257035
|
-
|
|
256938
|
+
factory9.apply(this, arguments);
|
|
257036
256939
|
mod2.exports = def(mod2);
|
|
257037
256940
|
});
|
|
257038
256941
|
} else {
|
|
257039
256942
|
const mod2 = { exports: {} };
|
|
257040
|
-
|
|
256943
|
+
factory9(mod2, global2.sourcemapCodec, global2.traceMapping);
|
|
257041
256944
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
257042
256945
|
global2.genMapping = def(mod2);
|
|
257043
256946
|
}
|
|
@@ -257378,18 +257281,18 @@ var require_gen_mapping_umd = __commonJS({
|
|
|
257378
257281
|
var require_trace_mapping_umd2 = __commonJS({
|
|
257379
257282
|
"../../../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.30/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"(exports2, module2) {
|
|
257380
257283
|
init_cjs_shims();
|
|
257381
|
-
(function(global2,
|
|
257284
|
+
(function(global2, factory9) {
|
|
257382
257285
|
if (typeof exports2 === "object" && typeof module2 !== "undefined") {
|
|
257383
|
-
|
|
257286
|
+
factory9(module2, require_resolve_uri_umd(), require_sourcemap_codec_umd());
|
|
257384
257287
|
module2.exports = def(module2);
|
|
257385
257288
|
} else if (typeof define === "function" && define.amd) {
|
|
257386
257289
|
define(["module", "@jridgewell/resolve-uri", "@jridgewell/sourcemap-codec"], function(mod2) {
|
|
257387
|
-
|
|
257290
|
+
factory9.apply(this, arguments);
|
|
257388
257291
|
mod2.exports = def(mod2);
|
|
257389
257292
|
});
|
|
257390
257293
|
} else {
|
|
257391
257294
|
const mod2 = { exports: {} };
|
|
257392
|
-
|
|
257295
|
+
factory9(mod2, global2.resolveURI, global2.sourcemapCodec);
|
|
257393
257296
|
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
257394
257297
|
global2.traceMapping = def(mod2);
|
|
257395
257298
|
}
|
|
@@ -292572,8 +292475,8 @@ var require_utils24 = __commonJS({
|
|
|
292572
292475
|
var require_acorn = __commonJS({
|
|
292573
292476
|
"../../../../node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.js"(exports2, module2) {
|
|
292574
292477
|
init_cjs_shims();
|
|
292575
|
-
(function(global2,
|
|
292576
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
292478
|
+
(function(global2, factory9) {
|
|
292479
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory9(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory9) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory9(global2.acorn = {}));
|
|
292577
292480
|
})(exports2, (function(exports3) {
|
|
292578
292481
|
"use strict";
|
|
292579
292482
|
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];
|
|
@@ -332729,11 +332632,11 @@ var require_ignore = __commonJS({
|
|
|
332729
332632
|
return this._test(path77, this._testCache, true);
|
|
332730
332633
|
}
|
|
332731
332634
|
};
|
|
332732
|
-
var
|
|
332635
|
+
var factory9 = (options8) => new Ignore2(options8);
|
|
332733
332636
|
var isPathValid = (path77) => checkPath(path77 && checkPath.convert(path77), path77, RETURN_FALSE);
|
|
332734
|
-
|
|
332735
|
-
|
|
332736
|
-
module2.exports =
|
|
332637
|
+
factory9.isPathValid = isPathValid;
|
|
332638
|
+
factory9.default = factory9;
|
|
332639
|
+
module2.exports = factory9;
|
|
332737
332640
|
if (
|
|
332738
332641
|
// Detect `process` so that it can run in browsers.
|
|
332739
332642
|
typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
|
|
@@ -351682,7 +351585,7 @@ var require_token_store = __commonJS({
|
|
|
351682
351585
|
}
|
|
351683
351586
|
return map3;
|
|
351684
351587
|
}
|
|
351685
|
-
function createCursorWithSkip(
|
|
351588
|
+
function createCursorWithSkip(factory9, tokens, comments, indexMap, startLoc, endLoc, opts) {
|
|
351686
351589
|
let includeComments = false;
|
|
351687
351590
|
let skip2 = 0;
|
|
351688
351591
|
let filter9 = null;
|
|
@@ -351700,7 +351603,7 @@ var require_token_store = __commonJS({
|
|
|
351700
351603
|
!filter9 || typeof filter9 === "function",
|
|
351701
351604
|
"options.filter should be a function."
|
|
351702
351605
|
);
|
|
351703
|
-
return
|
|
351606
|
+
return factory9.createCursor(
|
|
351704
351607
|
tokens,
|
|
351705
351608
|
comments,
|
|
351706
351609
|
indexMap,
|
|
@@ -351712,7 +351615,7 @@ var require_token_store = __commonJS({
|
|
|
351712
351615
|
-1
|
|
351713
351616
|
);
|
|
351714
351617
|
}
|
|
351715
|
-
function createCursorWithCount(
|
|
351618
|
+
function createCursorWithCount(factory9, tokens, comments, indexMap, startLoc, endLoc, opts) {
|
|
351716
351619
|
let includeComments = false;
|
|
351717
351620
|
let count = 0;
|
|
351718
351621
|
let countExists = false;
|
|
@@ -351733,7 +351636,7 @@ var require_token_store = __commonJS({
|
|
|
351733
351636
|
!filter9 || typeof filter9 === "function",
|
|
351734
351637
|
"options.filter should be a function."
|
|
351735
351638
|
);
|
|
351736
|
-
return
|
|
351639
|
+
return factory9.createCursor(
|
|
351737
351640
|
tokens,
|
|
351738
351641
|
comments,
|
|
351739
351642
|
indexMap,
|
|
@@ -355813,7 +355716,7 @@ var require_Num = __commonJS({
|
|
|
355813
355716
|
var acos;
|
|
355814
355717
|
var atan;
|
|
355815
355718
|
var atan2;
|
|
355816
|
-
var
|
|
355719
|
+
var truncate;
|
|
355817
355720
|
var round;
|
|
355818
355721
|
var ceiling;
|
|
355819
355722
|
var floor;
|
|
@@ -355874,7 +355777,7 @@ var require_Num = __commonJS({
|
|
|
355874
355777
|
atan2 = curry$(function(x, y) {
|
|
355875
355778
|
return Math.atan2(x, y);
|
|
355876
355779
|
});
|
|
355877
|
-
|
|
355780
|
+
truncate = function(x) {
|
|
355878
355781
|
return ~~x;
|
|
355879
355782
|
};
|
|
355880
355783
|
round = Math.round;
|
|
@@ -355927,7 +355830,7 @@ var require_Num = __commonJS({
|
|
|
355927
355830
|
asin,
|
|
355928
355831
|
atan,
|
|
355929
355832
|
atan2,
|
|
355930
|
-
truncate
|
|
355833
|
+
truncate,
|
|
355931
355834
|
round,
|
|
355932
355835
|
ceiling,
|
|
355933
355836
|
floor,
|
|
@@ -381279,7 +381182,7 @@ var require_config_loader = __commonJS({
|
|
|
381279
381182
|
* @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
|
|
381280
381183
|
*/
|
|
381281
381184
|
static async loadJiti() {
|
|
381282
|
-
const { createJiti } = await import("./jiti-
|
|
381185
|
+
const { createJiti } = await import("./jiti-EJ36EOMK.js");
|
|
381283
381186
|
const version5 = require_package6().version;
|
|
381284
381187
|
return { createJiti, version: version5 };
|
|
381285
381188
|
}
|
|
@@ -381608,7 +381511,7 @@ var require_eslint_helpers = __commonJS({
|
|
|
381608
381511
|
}
|
|
381609
381512
|
async function globMatch({ basePath, pattern }) {
|
|
381610
381513
|
let found = false;
|
|
381611
|
-
const { hfs } = await import("./src-
|
|
381514
|
+
const { hfs } = await import("./src-DWCFAABS.js");
|
|
381612
381515
|
const patternToUse = normalizeToPosix(path77.relative(basePath, pattern));
|
|
381613
381516
|
const matcher = new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
|
|
381614
381517
|
const walkSettings = {
|
|
@@ -381648,7 +381551,7 @@ var require_eslint_helpers = __commonJS({
|
|
|
381648
381551
|
return new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
|
|
381649
381552
|
});
|
|
381650
381553
|
const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
|
|
381651
|
-
const { hfs } = await import("./src-
|
|
381554
|
+
const { hfs } = await import("./src-DWCFAABS.js");
|
|
381652
381555
|
const walk2 = hfs.walk(basePath, {
|
|
381653
381556
|
async directoryFilter(entry) {
|
|
381654
381557
|
if (!matchers.some((matcher) => matcher.match(entry.path, true))) {
|
|
@@ -382671,7 +382574,7 @@ var require_eslint = __commonJS({
|
|
|
382671
382574
|
"../../../../node_modules/.pnpm/eslint@9.39.2_jiti@2.6.1/node_modules/eslint/lib/eslint/eslint.js"(exports2, module2) {
|
|
382672
382575
|
"use strict";
|
|
382673
382576
|
init_cjs_shims();
|
|
382674
|
-
var { existsSync:
|
|
382577
|
+
var { existsSync: existsSync5 } = __require("node:fs");
|
|
382675
382578
|
var fs44 = __require("node:fs/promises");
|
|
382676
382579
|
var os8 = __require("node:os");
|
|
382677
382580
|
var path77 = __require("node:path");
|
|
@@ -383079,7 +382982,7 @@ var require_eslint = __commonJS({
|
|
|
383079
382982
|
configLoader: this.#configLoader,
|
|
383080
382983
|
warningService
|
|
383081
382984
|
});
|
|
383082
|
-
if (
|
|
382985
|
+
if (existsSync5(path77.resolve(processedOptions.cwd, ".eslintignore"))) {
|
|
383083
382986
|
warningService.emitESLintIgnoreWarning();
|
|
383084
382987
|
}
|
|
383085
382988
|
}
|
|
@@ -383247,11 +383150,11 @@ var require_eslint = __commonJS({
|
|
|
383247
383150
|
if (!lintResultCache && cacheFilePath) {
|
|
383248
383151
|
debug3(`Deleting cache file at ${cacheFilePath}`);
|
|
383249
383152
|
try {
|
|
383250
|
-
if (
|
|
383153
|
+
if (existsSync5(cacheFilePath)) {
|
|
383251
383154
|
await fs44.unlink(cacheFilePath);
|
|
383252
383155
|
}
|
|
383253
383156
|
} catch (error40) {
|
|
383254
|
-
if (
|
|
383157
|
+
if (existsSync5(cacheFilePath)) {
|
|
383255
383158
|
throw error40;
|
|
383256
383159
|
}
|
|
383257
383160
|
}
|
|
@@ -390627,8 +390530,8 @@ var require_readdir_glob = __commonJS({
|
|
|
390627
390530
|
var require_async9 = __commonJS({
|
|
390628
390531
|
"../../../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js"(exports2, module2) {
|
|
390629
390532
|
init_cjs_shims();
|
|
390630
|
-
(function(global2,
|
|
390631
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ?
|
|
390533
|
+
(function(global2, factory9) {
|
|
390534
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? factory9(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory9) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory9(global2.async = {}));
|
|
390632
390535
|
})(exports2, (function(exports3) {
|
|
390633
390536
|
"use strict";
|
|
390634
390537
|
function apply(fn, ...args) {
|
|
@@ -408960,21 +408863,21 @@ var require_crc32 = __commonJS({
|
|
|
408960
408863
|
"../../../../node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js"(exports2) {
|
|
408961
408864
|
init_cjs_shims();
|
|
408962
408865
|
var CRC32;
|
|
408963
|
-
(function(
|
|
408866
|
+
(function(factory9) {
|
|
408964
408867
|
if (typeof DO_NOT_EXPORT_CRC === "undefined") {
|
|
408965
408868
|
if ("object" === typeof exports2) {
|
|
408966
|
-
|
|
408869
|
+
factory9(exports2);
|
|
408967
408870
|
} else if ("function" === typeof define && define.amd) {
|
|
408968
408871
|
define(function() {
|
|
408969
408872
|
var module3 = {};
|
|
408970
|
-
|
|
408873
|
+
factory9(module3);
|
|
408971
408874
|
return module3;
|
|
408972
408875
|
});
|
|
408973
408876
|
} else {
|
|
408974
|
-
|
|
408877
|
+
factory9(CRC32 = {});
|
|
408975
408878
|
}
|
|
408976
408879
|
} else {
|
|
408977
|
-
|
|
408880
|
+
factory9(CRC32 = {});
|
|
408978
408881
|
}
|
|
408979
408882
|
})(function(CRC322) {
|
|
408980
408883
|
CRC322.version = "1.2.2";
|
|
@@ -444702,7 +444605,7 @@ var require_pool2 = __commonJS({
|
|
|
444702
444605
|
var Pool = class extends PoolBase {
|
|
444703
444606
|
constructor(origin2, {
|
|
444704
444607
|
connections,
|
|
444705
|
-
factory:
|
|
444608
|
+
factory: factory9 = defaultFactory,
|
|
444706
444609
|
connect,
|
|
444707
444610
|
connectTimeout,
|
|
444708
444611
|
tls,
|
|
@@ -444717,7 +444620,7 @@ var require_pool2 = __commonJS({
|
|
|
444717
444620
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
|
444718
444621
|
throw new InvalidArgumentError2("invalid connections");
|
|
444719
444622
|
}
|
|
444720
|
-
if (typeof
|
|
444623
|
+
if (typeof factory9 !== "function") {
|
|
444721
444624
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444722
444625
|
}
|
|
444723
444626
|
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
@@ -444739,7 +444642,7 @@ var require_pool2 = __commonJS({
|
|
|
444739
444642
|
this[kUrl] = util5.parseOrigin(origin2);
|
|
444740
444643
|
this[kOptions] = { ...util5.deepClone(options8), connect, allowH2, clientTtl };
|
|
444741
444644
|
this[kOptions].interceptors = options8.interceptors ? { ...options8.interceptors } : void 0;
|
|
444742
|
-
this[kFactory] =
|
|
444645
|
+
this[kFactory] = factory9;
|
|
444743
444646
|
this.on("connect", (origin3, targets) => {
|
|
444744
444647
|
if (clientTtl != null && clientTtl > 0) {
|
|
444745
444648
|
for (const target of targets) {
|
|
@@ -444817,8 +444720,8 @@ var require_balanced_pool = __commonJS({
|
|
|
444817
444720
|
return new Pool(origin2, opts);
|
|
444818
444721
|
}
|
|
444819
444722
|
var BalancedPool = class extends PoolBase {
|
|
444820
|
-
constructor(upstreams = [], { factory:
|
|
444821
|
-
if (typeof
|
|
444723
|
+
constructor(upstreams = [], { factory: factory9 = defaultFactory, ...opts } = {}) {
|
|
444724
|
+
if (typeof factory9 !== "function") {
|
|
444822
444725
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444823
444726
|
}
|
|
444824
444727
|
super();
|
|
@@ -444830,7 +444733,7 @@ var require_balanced_pool = __commonJS({
|
|
|
444830
444733
|
if (!Array.isArray(upstreams)) {
|
|
444831
444734
|
upstreams = [upstreams];
|
|
444832
444735
|
}
|
|
444833
|
-
this[kFactory] =
|
|
444736
|
+
this[kFactory] = factory9;
|
|
444834
444737
|
for (const upstream of upstreams) {
|
|
444835
444738
|
this.addUpstream(upstream);
|
|
444836
444739
|
}
|
|
@@ -444954,7 +444857,7 @@ var require_round_robin_pool = __commonJS({
|
|
|
444954
444857
|
var RoundRobinPool = class extends PoolBase {
|
|
444955
444858
|
constructor(origin2, {
|
|
444956
444859
|
connections,
|
|
444957
|
-
factory:
|
|
444860
|
+
factory: factory9 = defaultFactory,
|
|
444958
444861
|
connect,
|
|
444959
444862
|
connectTimeout,
|
|
444960
444863
|
tls,
|
|
@@ -444969,7 +444872,7 @@ var require_round_robin_pool = __commonJS({
|
|
|
444969
444872
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
|
444970
444873
|
throw new InvalidArgumentError2("invalid connections");
|
|
444971
444874
|
}
|
|
444972
|
-
if (typeof
|
|
444875
|
+
if (typeof factory9 !== "function") {
|
|
444973
444876
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
444974
444877
|
}
|
|
444975
444878
|
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
@@ -444991,7 +444894,7 @@ var require_round_robin_pool = __commonJS({
|
|
|
444991
444894
|
this[kUrl] = util5.parseOrigin(origin2);
|
|
444992
444895
|
this[kOptions] = { ...util5.deepClone(options8), connect, allowH2, clientTtl };
|
|
444993
444896
|
this[kOptions].interceptors = options8.interceptors ? { ...options8.interceptors } : void 0;
|
|
444994
|
-
this[kFactory] =
|
|
444897
|
+
this[kFactory] = factory9;
|
|
444995
444898
|
this[kIndex] = -1;
|
|
444996
444899
|
this.on("connect", (origin3, targets) => {
|
|
444997
444900
|
if (clientTtl != null && clientTtl > 0) {
|
|
@@ -445064,8 +444967,8 @@ var require_agent4 = __commonJS({
|
|
|
445064
444967
|
return opts && opts.connections === 1 ? new Client2(origin2, opts) : new Pool(origin2, opts);
|
|
445065
444968
|
}
|
|
445066
444969
|
var Agent3 = class extends DispatcherBase {
|
|
445067
|
-
constructor({ factory:
|
|
445068
|
-
if (typeof
|
|
444970
|
+
constructor({ factory: factory9 = defaultFactory, maxOrigins = Infinity, connect, ...options8 } = {}) {
|
|
444971
|
+
if (typeof factory9 !== "function") {
|
|
445069
444972
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
445070
444973
|
}
|
|
445071
444974
|
if (connect != null && typeof connect !== "function" && typeof connect !== "object") {
|
|
@@ -445079,7 +444982,7 @@ var require_agent4 = __commonJS({
|
|
|
445079
444982
|
connect = { ...connect };
|
|
445080
444983
|
}
|
|
445081
444984
|
this[kOptions] = { ...util5.deepClone(options8), maxOrigins, connect };
|
|
445082
|
-
this[kFactory] =
|
|
444985
|
+
this[kFactory] = factory9;
|
|
445083
444986
|
this[kClients] = /* @__PURE__ */ new Map();
|
|
445084
444987
|
this[kOrigins] = /* @__PURE__ */ new Set();
|
|
445085
444988
|
this[kOnDrain] = (origin2, targets) => {
|
|
@@ -445210,14 +445113,14 @@ var require_proxy_agent = __commonJS({
|
|
|
445210
445113
|
}
|
|
445211
445114
|
var Http1ProxyWrapper = class extends DispatcherBase {
|
|
445212
445115
|
#client;
|
|
445213
|
-
constructor(proxyUrl, { headers = {}, connect, factory:
|
|
445116
|
+
constructor(proxyUrl, { headers = {}, connect, factory: factory9 }) {
|
|
445214
445117
|
if (!proxyUrl) {
|
|
445215
445118
|
throw new InvalidArgumentError2("Proxy URL is mandatory");
|
|
445216
445119
|
}
|
|
445217
445120
|
super();
|
|
445218
445121
|
this[kProxyHeaders] = headers;
|
|
445219
|
-
if (
|
|
445220
|
-
this.#client =
|
|
445122
|
+
if (factory9) {
|
|
445123
|
+
this.#client = factory9(proxyUrl, { connect });
|
|
445221
445124
|
} else {
|
|
445222
445125
|
this.#client = new Client2(proxyUrl, { connect });
|
|
445223
445126
|
}
|
|
@@ -445283,7 +445186,7 @@ var require_proxy_agent = __commonJS({
|
|
|
445283
445186
|
const connect = buildConnector({ ...opts.proxyTls });
|
|
445284
445187
|
this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
|
|
445285
445188
|
const agentFactory = opts.factory || defaultAgentFactory;
|
|
445286
|
-
const
|
|
445189
|
+
const factory9 = (origin3, options8) => {
|
|
445287
445190
|
const { protocol: protocol2 } = new URL(origin3);
|
|
445288
445191
|
if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") {
|
|
445289
445192
|
return new Http1ProxyWrapper(this[kProxy].uri, {
|
|
@@ -445297,7 +445200,7 @@ var require_proxy_agent = __commonJS({
|
|
|
445297
445200
|
this[kClient] = clientFactory(url4, { connect });
|
|
445298
445201
|
this[kAgent] = new Agent3({
|
|
445299
445202
|
...opts,
|
|
445300
|
-
factory:
|
|
445203
|
+
factory: factory9,
|
|
445301
445204
|
connect: async (opts2, callback) => {
|
|
445302
445205
|
let requestedPath = opts2.host;
|
|
445303
445206
|
if (!opts2.port) {
|
|
@@ -446574,7 +446477,7 @@ var require_api_stream = __commonJS({
|
|
|
446574
446477
|
function noop7() {
|
|
446575
446478
|
}
|
|
446576
446479
|
var StreamHandler = class extends AsyncResource {
|
|
446577
|
-
constructor(opts,
|
|
446480
|
+
constructor(opts, factory9, callback) {
|
|
446578
446481
|
if (!opts || typeof opts !== "object") {
|
|
446579
446482
|
throw new InvalidArgumentError2("invalid opts");
|
|
446580
446483
|
}
|
|
@@ -446583,7 +446486,7 @@ var require_api_stream = __commonJS({
|
|
|
446583
446486
|
if (typeof callback !== "function") {
|
|
446584
446487
|
throw new InvalidArgumentError2("invalid callback");
|
|
446585
446488
|
}
|
|
446586
|
-
if (typeof
|
|
446489
|
+
if (typeof factory9 !== "function") {
|
|
446587
446490
|
throw new InvalidArgumentError2("invalid factory");
|
|
446588
446491
|
}
|
|
446589
446492
|
if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
|
|
@@ -446604,7 +446507,7 @@ var require_api_stream = __commonJS({
|
|
|
446604
446507
|
}
|
|
446605
446508
|
this.responseHeaders = responseHeaders || null;
|
|
446606
446509
|
this.opaque = opaque || null;
|
|
446607
|
-
this.factory =
|
|
446510
|
+
this.factory = factory9;
|
|
446608
446511
|
this.callback = callback;
|
|
446609
446512
|
this.res = null;
|
|
446610
446513
|
this.abort = null;
|
|
@@ -446629,7 +446532,7 @@ var require_api_stream = __commonJS({
|
|
|
446629
446532
|
this.context = context;
|
|
446630
446533
|
}
|
|
446631
446534
|
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
|
446632
|
-
const { factory:
|
|
446535
|
+
const { factory: factory9, opaque, context, responseHeaders } = this;
|
|
446633
446536
|
const headers = responseHeaders === "raw" ? util5.parseRawHeaders(rawHeaders) : util5.parseHeaders(rawHeaders);
|
|
446634
446537
|
if (statusCode < 200) {
|
|
446635
446538
|
if (this.onInfo) {
|
|
@@ -446638,10 +446541,10 @@ var require_api_stream = __commonJS({
|
|
|
446638
446541
|
return;
|
|
446639
446542
|
}
|
|
446640
446543
|
this.factory = null;
|
|
446641
|
-
if (
|
|
446544
|
+
if (factory9 === null) {
|
|
446642
446545
|
return;
|
|
446643
446546
|
}
|
|
446644
|
-
const res = this.runInAsyncScope(
|
|
446547
|
+
const res = this.runInAsyncScope(factory9, null, {
|
|
446645
446548
|
statusCode,
|
|
446646
446549
|
headers,
|
|
446647
446550
|
opaque,
|
|
@@ -446699,16 +446602,16 @@ var require_api_stream = __commonJS({
|
|
|
446699
446602
|
}
|
|
446700
446603
|
}
|
|
446701
446604
|
};
|
|
446702
|
-
function stream5(opts,
|
|
446605
|
+
function stream5(opts, factory9, callback) {
|
|
446703
446606
|
if (callback === void 0) {
|
|
446704
446607
|
return new Promise((resolve9, reject) => {
|
|
446705
|
-
stream5.call(this, opts,
|
|
446608
|
+
stream5.call(this, opts, factory9, (err, data3) => {
|
|
446706
446609
|
return err ? reject(err) : resolve9(data3);
|
|
446707
446610
|
});
|
|
446708
446611
|
});
|
|
446709
446612
|
}
|
|
446710
446613
|
try {
|
|
446711
|
-
const handler = new StreamHandler(opts,
|
|
446614
|
+
const handler = new StreamHandler(opts, factory9, callback);
|
|
446712
446615
|
this.dispatch(opts, handler);
|
|
446713
446616
|
} catch (err) {
|
|
446714
446617
|
if (typeof callback !== "function") {
|
|
@@ -484066,10 +483969,10 @@ var require_full = __commonJS({
|
|
|
484066
483969
|
const externalDependencies = [];
|
|
484067
483970
|
let item = value2;
|
|
484068
483971
|
if (typeof value2 === "function") {
|
|
484069
|
-
const
|
|
483972
|
+
const factory9 = (0, _async.maybeAsync)(value2, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
|
|
484070
483973
|
const api = Object.assign({}, context, apiFactory(cache3, externalDependencies));
|
|
484071
483974
|
try {
|
|
484072
|
-
item = yield*
|
|
483975
|
+
item = yield* factory9(api, options8, dirname19);
|
|
484073
483976
|
} catch (e) {
|
|
484074
483977
|
if (alias) {
|
|
484075
483978
|
e.message += ` (While processing: ${JSON.stringify(alias)})`;
|
|
@@ -485285,8 +485188,8 @@ var require_normalize_file = __commonJS({
|
|
|
485285
485188
|
var require_remapping_umd = __commonJS({
|
|
485286
485189
|
"../../../../node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping/dist/remapping.umd.js"(exports2, module2) {
|
|
485287
485190
|
init_cjs_shims();
|
|
485288
|
-
(function(global2,
|
|
485289
|
-
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports =
|
|
485191
|
+
(function(global2, factory9) {
|
|
485192
|
+
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory9(require_trace_mapping_umd(), require_gen_mapping_umd()) : typeof define === "function" && define.amd ? define(["@jridgewell/trace-mapping", "@jridgewell/gen-mapping"], factory9) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.remapping = factory9(global2.traceMapping, global2.genMapping));
|
|
485290
485193
|
})(exports2, (function(traceMapping, genMapping) {
|
|
485291
485194
|
"use strict";
|
|
485292
485195
|
const SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
|
|
@@ -511790,7 +511693,7 @@ var require_axios = __commonJS({
|
|
|
511790
511693
|
return false;
|
|
511791
511694
|
}
|
|
511792
511695
|
};
|
|
511793
|
-
var
|
|
511696
|
+
var factory9 = (env2) => {
|
|
511794
511697
|
env2 = utils$1.merge.call({
|
|
511795
511698
|
skipUndefined: true
|
|
511796
511699
|
}, globalFetchAPI2, env2);
|
|
@@ -511974,7 +511877,7 @@ var require_axios = __commonJS({
|
|
|
511974
511877
|
while (i--) {
|
|
511975
511878
|
seed = seeds[i];
|
|
511976
511879
|
target = map3.get(seed);
|
|
511977
|
-
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() :
|
|
511880
|
+
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() : factory9(env2));
|
|
511978
511881
|
map3 = target;
|
|
511979
511882
|
}
|
|
511980
511883
|
return target;
|
|
@@ -520621,7 +520524,7 @@ init_cjs_shims();
|
|
|
520621
520524
|
// ../sdk/package.json
|
|
520622
520525
|
var package_default = {
|
|
520623
520526
|
name: "@superblocksteam/sdk",
|
|
520624
|
-
version: "2.0.110-next.
|
|
520527
|
+
version: "2.0.110-next.14",
|
|
520625
520528
|
description: "Superblocks JS SDK",
|
|
520626
520529
|
homepage: "https://www.superblocks.com",
|
|
520627
520530
|
license: "Superblocks Community Software License",
|
|
@@ -520975,7 +520878,7 @@ var config = void 0;
|
|
|
520975
520878
|
var configured = false;
|
|
520976
520879
|
var ddTracePromise = void 0;
|
|
520977
520880
|
async function getDdTrace() {
|
|
520978
|
-
ddTracePromise ??= import("./dd-trace-
|
|
520881
|
+
ddTracePromise ??= import("./dd-trace-TMWNM5TU.js").then((module2) => module2.default);
|
|
520979
520882
|
return await ddTracePromise;
|
|
520980
520883
|
}
|
|
520981
520884
|
var deploymentType = (() => {
|
|
@@ -525016,7 +524919,7 @@ init_cjs_shims();
|
|
|
525016
524919
|
|
|
525017
524920
|
// ../../../vite-plugin-file-sync/dist/ai-service/index.js
|
|
525018
524921
|
init_cjs_shims();
|
|
525019
|
-
var
|
|
524922
|
+
var import_ai16 = __toESM(require_dist9(), 1);
|
|
525020
524923
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
525021
524924
|
import os5 from "node:os";
|
|
525022
524925
|
import path51 from "node:path";
|
|
@@ -529111,12 +529014,11 @@ var AiEntityType;
|
|
|
529111
529014
|
AiEntityType2["BLOCK"] = "block";
|
|
529112
529015
|
})(AiEntityType || (AiEntityType = {}));
|
|
529113
529016
|
var MODEL_CAPABILITIES = {
|
|
529114
|
-
"claude-
|
|
529017
|
+
"claude-sonnet-4-5": { maxOutputTokens: 64e3 },
|
|
529018
|
+
"claude-sonnet-4-6": { maxOutputTokens: 128e3 },
|
|
529115
529019
|
"claude-opus-4-5": { maxOutputTokens: 64e3 },
|
|
529116
529020
|
"claude-opus-4-6": { maxOutputTokens: 128e3 },
|
|
529117
|
-
"claude-
|
|
529118
|
-
"claude-sonnet-4-5": { maxOutputTokens: 64e3 },
|
|
529119
|
-
"claude-sonnet-4-6": { maxOutputTokens: 128e3 }
|
|
529021
|
+
"claude-haiku-4-5": { maxOutputTokens: 64e3 }
|
|
529120
529022
|
};
|
|
529121
529023
|
var MAX_OUTPUT_TOKENS = 48e3;
|
|
529122
529024
|
var DEFAULT_CONTEXT_OPTIONS_V2 = {
|
|
@@ -529146,83 +529048,6 @@ var EXCLUDED_MESSAGE_TYPES = [
|
|
|
529146
529048
|
"commitRestoring",
|
|
529147
529049
|
"git_setup_required"
|
|
529148
529050
|
];
|
|
529149
|
-
var NEXT_STEPS_ICON_NAMES = [
|
|
529150
|
-
"alert-triangle",
|
|
529151
|
-
"arrow-right-left",
|
|
529152
|
-
"arrow-up-down",
|
|
529153
|
-
"bar-chart-3",
|
|
529154
|
-
"bell",
|
|
529155
|
-
"bookmark",
|
|
529156
|
-
"calendar",
|
|
529157
|
-
"check",
|
|
529158
|
-
"check-circle",
|
|
529159
|
-
"circle-user",
|
|
529160
|
-
"clipboard",
|
|
529161
|
-
"clock",
|
|
529162
|
-
"cloud",
|
|
529163
|
-
"code",
|
|
529164
|
-
"copy",
|
|
529165
|
-
"database",
|
|
529166
|
-
"download",
|
|
529167
|
-
"external-link",
|
|
529168
|
-
"eye",
|
|
529169
|
-
"file-down",
|
|
529170
|
-
"file-plus",
|
|
529171
|
-
"file-text",
|
|
529172
|
-
"filter",
|
|
529173
|
-
"folder",
|
|
529174
|
-
"git-branch",
|
|
529175
|
-
"globe",
|
|
529176
|
-
"grip-vertical",
|
|
529177
|
-
"hard-drive",
|
|
529178
|
-
"heart",
|
|
529179
|
-
"home",
|
|
529180
|
-
"image",
|
|
529181
|
-
"info",
|
|
529182
|
-
"key",
|
|
529183
|
-
"layers",
|
|
529184
|
-
"layout-grid",
|
|
529185
|
-
"line-chart",
|
|
529186
|
-
"link",
|
|
529187
|
-
"list",
|
|
529188
|
-
"lock",
|
|
529189
|
-
"log-out",
|
|
529190
|
-
"mail",
|
|
529191
|
-
"map",
|
|
529192
|
-
"message-square",
|
|
529193
|
-
"monitor",
|
|
529194
|
-
"moon",
|
|
529195
|
-
"package",
|
|
529196
|
-
"palette",
|
|
529197
|
-
"pencil",
|
|
529198
|
-
"pie-chart",
|
|
529199
|
-
"plus",
|
|
529200
|
-
"printer",
|
|
529201
|
-
"puzzle",
|
|
529202
|
-
"refresh-cw",
|
|
529203
|
-
"repeat",
|
|
529204
|
-
"rocket",
|
|
529205
|
-
"save",
|
|
529206
|
-
"search",
|
|
529207
|
-
"server",
|
|
529208
|
-
"settings",
|
|
529209
|
-
"share-2",
|
|
529210
|
-
"shield",
|
|
529211
|
-
"sliders",
|
|
529212
|
-
"smartphone",
|
|
529213
|
-
"sparkles",
|
|
529214
|
-
"star",
|
|
529215
|
-
"table",
|
|
529216
|
-
"tag",
|
|
529217
|
-
"thumbs-up",
|
|
529218
|
-
"toggle-left",
|
|
529219
|
-
"trash-2",
|
|
529220
|
-
"upload",
|
|
529221
|
-
"user-plus",
|
|
529222
|
-
"users",
|
|
529223
|
-
"wand-2",
|
|
529224
|
-
"zap"
|
|
529225
|
-
];
|
|
529226
529051
|
var DEFAULT_ATTACHMENT_FILE_NAME = "Attachment";
|
|
529227
529052
|
function fallbackFileNameForImageMime(mtLower) {
|
|
529228
529053
|
const match2 = /^image\/([^;\s]+)/i.exec(mtLower);
|
|
@@ -529448,10 +529273,10 @@ var PermissionLevel;
|
|
|
529448
529273
|
PermissionLevel2["PROMPT"] = "prompt";
|
|
529449
529274
|
PermissionLevel2["BLOCK"] = "block";
|
|
529450
529275
|
})(PermissionLevel || (PermissionLevel = {}));
|
|
529451
|
-
function createToolFactory(name17,
|
|
529276
|
+
function createToolFactory(name17, factory9) {
|
|
529452
529277
|
return {
|
|
529453
529278
|
name: name17,
|
|
529454
|
-
create: (deps) => ({ ...
|
|
529279
|
+
create: (deps) => ({ ...factory9(deps), name: name17 })
|
|
529455
529280
|
};
|
|
529456
529281
|
}
|
|
529457
529282
|
var ToolExecutionError = class _ToolExecutionError extends Error {
|
|
@@ -529937,9 +529762,6 @@ function getTotalInputTokens(usage) {
|
|
|
529937
529762
|
}
|
|
529938
529763
|
return usage.inputTokens ?? nonCached;
|
|
529939
529764
|
}
|
|
529940
|
-
function computeContextUsed(usage) {
|
|
529941
|
-
return getTotalInputTokens(usage);
|
|
529942
|
-
}
|
|
529943
529765
|
function getTotalTokens(usage) {
|
|
529944
529766
|
const recomputedTotal = getTotalInputTokens(usage) + (usage.outputTokens ?? 0);
|
|
529945
529767
|
const hasDetailedBreakdown = usage.inputTokenDetails?.noCacheTokens !== void 0 || usage.inputTokenDetails?.cacheReadTokens !== void 0 || usage.inputTokenDetails?.cacheWriteTokens !== void 0;
|
|
@@ -530001,59 +529823,15 @@ function getActiveContext(clark, services) {
|
|
|
530001
529823
|
|
|
530002
529824
|
// ../../../vite-plugin-file-sync/dist/ai-service/util/llm-config-utils.js
|
|
530003
529825
|
init_cjs_shims();
|
|
530004
|
-
var INTERLEAVED_THINKING_BETA = "interleaved-thinking-2025-05-14";
|
|
530005
|
-
var EFFORT_BETA = "effort-2025-11-24";
|
|
530006
|
-
var ADAPTIVE_EFFORT_MODELS = /* @__PURE__ */ new Set(["claude-opus-4-7"]);
|
|
530007
|
-
var HARDCODED_EFFORT = "high";
|
|
530008
|
-
function usesAdaptiveEffort(coreModel) {
|
|
530009
|
-
return coreModel !== void 0 && ADAPTIVE_EFFORT_MODELS.has(coreModel);
|
|
530010
|
-
}
|
|
530011
|
-
function buildThinkingProviderOptions(coreModel, params) {
|
|
530012
|
-
const { thinkingEnabled, thinkingBudgetTokens, interleavedThinking } = params;
|
|
530013
|
-
if (usesAdaptiveEffort(coreModel)) {
|
|
530014
|
-
const anthropic3 = {
|
|
530015
|
-
thinking: { type: "adaptive", display: "summarized" },
|
|
530016
|
-
effort: HARDCODED_EFFORT
|
|
530017
|
-
};
|
|
530018
|
-
const bedrockBetas = [EFFORT_BETA];
|
|
530019
|
-
if (interleavedThinking) {
|
|
530020
|
-
bedrockBetas.push(INTERLEAVED_THINKING_BETA);
|
|
530021
|
-
}
|
|
530022
|
-
const bedrock2 = {
|
|
530023
|
-
additionalModelRequestFields: {
|
|
530024
|
-
thinking: { type: "adaptive", display: "summarized" },
|
|
530025
|
-
output_config: { effort: HARDCODED_EFFORT },
|
|
530026
|
-
anthropic_beta: bedrockBetas
|
|
530027
|
-
}
|
|
530028
|
-
};
|
|
530029
|
-
const headers2 = interleavedThinking ? { "anthropic-beta": INTERLEAVED_THINKING_BETA } : {};
|
|
530030
|
-
return { anthropic: anthropic3, bedrock: bedrock2, headers: headers2 };
|
|
530031
|
-
}
|
|
530032
|
-
if (!thinkingEnabled) {
|
|
530033
|
-
return { headers: {} };
|
|
530034
|
-
}
|
|
530035
|
-
const anthropic2 = {
|
|
530036
|
-
thinking: { type: "enabled", budgetTokens: thinkingBudgetTokens }
|
|
530037
|
-
};
|
|
530038
|
-
const bedrock = {
|
|
530039
|
-
additionalModelRequestFields: {
|
|
530040
|
-
thinking: { type: "enabled", budget_tokens: thinkingBudgetTokens },
|
|
530041
|
-
anthropic_beta: [INTERLEAVED_THINKING_BETA]
|
|
530042
|
-
}
|
|
530043
|
-
};
|
|
530044
|
-
const headers = interleavedThinking ? { "anthropic-beta": INTERLEAVED_THINKING_BETA } : {};
|
|
530045
|
-
return { anthropic: anthropic2, bedrock, headers };
|
|
530046
|
-
}
|
|
530047
529826
|
function processLLMConfig(llmConfig, defaultBudgetTokens = 5e3, logContext) {
|
|
530048
529827
|
const logger15 = getLogger3();
|
|
530049
529828
|
const thinkingEnabled = llmConfig?.thinkingEnabled ?? true;
|
|
530050
529829
|
let thinkingBudgetTokens = llmConfig?.thinkingBudgetTokens ? parseInt(llmConfig.thinkingBudgetTokens) : defaultBudgetTokens;
|
|
530051
529830
|
const interleavedThinking = llmConfig?.interleavedThinking ?? true;
|
|
530052
529831
|
const maxOutputTokens = MAX_OUTPUT_TOKENS;
|
|
530053
|
-
|
|
530054
|
-
|
|
530055
|
-
const
|
|
530056
|
-
const modelCaps = MODEL_CAPABILITIES[modelKey];
|
|
529832
|
+
if (thinkingEnabled) {
|
|
529833
|
+
const coreModel = llmConfig?.coreModel ?? "claude-sonnet-4-5";
|
|
529834
|
+
const modelCaps = MODEL_CAPABILITIES[coreModel];
|
|
530057
529835
|
const modelMaxOutput = modelCaps?.maxOutputTokens ?? 64e3;
|
|
530058
529836
|
const total = maxOutputTokens + thinkingBudgetTokens;
|
|
530059
529837
|
if (total > modelMaxOutput) {
|
|
@@ -530063,24 +529841,29 @@ function processLLMConfig(llmConfig, defaultBudgetTokens = 5e3, logContext) {
|
|
|
530063
529841
|
}
|
|
530064
529842
|
}
|
|
530065
529843
|
if (logContext) {
|
|
530066
|
-
getLogger3().info(`${logContext} LLM Provider Config: provider=${llmConfig?.provider || "bedrock (default)"},
|
|
529844
|
+
getLogger3().info(`${logContext} LLM Provider Config: provider=${llmConfig?.provider || "bedrock (default)"}, thinking=${thinkingEnabled}, budget=${thinkingBudgetTokens}, interleaved=${interleavedThinking}`);
|
|
530067
529845
|
}
|
|
530068
|
-
const
|
|
530069
|
-
|
|
530070
|
-
|
|
530071
|
-
|
|
530072
|
-
|
|
530073
|
-
|
|
530074
|
-
|
|
530075
|
-
|
|
529846
|
+
const providerOptions = thinkingEnabled ? {
|
|
529847
|
+
anthropic: {
|
|
529848
|
+
thinking: { type: "enabled", budgetTokens: thinkingBudgetTokens }
|
|
529849
|
+
},
|
|
529850
|
+
bedrock: {
|
|
529851
|
+
additionalModelRequestFields: {
|
|
529852
|
+
thinking: { type: "enabled", budget_tokens: thinkingBudgetTokens },
|
|
529853
|
+
anthropic_beta: ["interleaved-thinking-2025-05-14"]
|
|
529854
|
+
}
|
|
529855
|
+
}
|
|
530076
529856
|
} : void 0;
|
|
529857
|
+
const headers = thinkingEnabled && interleavedThinking ? {
|
|
529858
|
+
"anthropic-beta": "interleaved-thinking-2025-05-14"
|
|
529859
|
+
} : {};
|
|
530077
529860
|
return {
|
|
530078
529861
|
thinkingEnabled,
|
|
530079
529862
|
thinkingBudgetTokens,
|
|
530080
529863
|
interleavedThinking,
|
|
530081
529864
|
maxOutputTokens,
|
|
530082
529865
|
providerOptions,
|
|
530083
|
-
headers
|
|
529866
|
+
headers
|
|
530084
529867
|
};
|
|
530085
529868
|
}
|
|
530086
529869
|
|
|
@@ -530151,7 +529934,7 @@ var sendInteractiveMessageChannel = (clark, chatSessionStore) => {
|
|
|
530151
529934
|
};
|
|
530152
529935
|
var sendUserMessageChannel = (clark, chatSessionStore) => {
|
|
530153
529936
|
const queue = peerQueue(clark);
|
|
530154
|
-
return async (payload, delay3 = 0, immediate = false
|
|
529937
|
+
return async (payload, delay3 = 0, immediate = false) => {
|
|
530155
529938
|
const messageId = payload.id ?? crypto.randomUUID();
|
|
530156
529939
|
const payloadWithId = { ...payload, id: messageId };
|
|
530157
529940
|
if (immediate) {
|
|
@@ -530163,15 +529946,7 @@ var sendUserMessageChannel = (clark, chatSessionStore) => {
|
|
|
530163
529946
|
return clark.context.peer.call.aiPushMessage(payloadWithId);
|
|
530164
529947
|
}
|
|
530165
529948
|
return queue(async () => {
|
|
530166
|
-
|
|
530167
|
-
try {
|
|
530168
|
-
await chatSessionStore.recordAssistant(payloadWithId);
|
|
530169
|
-
} catch (err) {
|
|
530170
|
-
getLogger3().warn(`[ai-service] recordAssistant failed; continuing with peer delivery. type=${payloadWithId.type}`, err);
|
|
530171
|
-
}
|
|
530172
|
-
} else {
|
|
530173
|
-
void chatSessionStore.recordAssistant(payloadWithId);
|
|
530174
|
-
}
|
|
529949
|
+
void chatSessionStore.recordAssistant(payloadWithId);
|
|
530175
529950
|
if (!clark.context.peer) {
|
|
530176
529951
|
getLogger3().warn(`[ai-service] Cannot send message: no peer. type=${payloadWithId.type}, state=${clark.state}`);
|
|
530177
529952
|
return;
|
|
@@ -530251,7 +530026,7 @@ var MAX_ATTRIBUTE_LENGTH = 64e3;
|
|
|
530251
530026
|
var LLMObsSpanWriter = null;
|
|
530252
530027
|
async function loadLLMObsSpanWriter() {
|
|
530253
530028
|
if (!LLMObsSpanWriter) {
|
|
530254
|
-
const module2 = await import("./spans-
|
|
530029
|
+
const module2 = await import("./spans-3EJDY2PZ.js");
|
|
530255
530030
|
LLMObsSpanWriter = module2.default;
|
|
530256
530031
|
}
|
|
530257
530032
|
return LLMObsSpanWriter;
|
|
@@ -531505,7 +531280,7 @@ var Clark = class _Clark extends TracedFSM {
|
|
|
531505
531280
|
async streamText(services, options8) {
|
|
531506
531281
|
const { model: providedModel, context: contextConfig, logging: loggingConfig, enableFallback: enableFallbackOverride, ...streamOptions } = options8;
|
|
531507
531282
|
const model = providedModel ?? services.llmProvider.modelForTask("generateBroadEdit");
|
|
531508
|
-
const { thinkingEnabled, thinkingBudgetTokens,
|
|
531283
|
+
const { thinkingEnabled, thinkingBudgetTokens, maxOutputTokens, headers, providerOptions } = processLLMConfig(this.context.llmConfig);
|
|
531509
531284
|
const logging = loggingConfig !== false ? {
|
|
531510
531285
|
conversationId: loggingConfig?.conversationId ?? String(Date.now()),
|
|
531511
531286
|
runTimestamp: this.context.runTimestamp || (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -531577,11 +531352,6 @@ var Clark = class _Clark extends TracedFSM {
|
|
|
531577
531352
|
logging,
|
|
531578
531353
|
retry: streamOptions.retry,
|
|
531579
531354
|
providerConfig,
|
|
531580
|
-
thinking: {
|
|
531581
|
-
enabled: thinkingEnabled,
|
|
531582
|
-
budgetTokens: thinkingBudgetTokens,
|
|
531583
|
-
interleaved: interleavedThinking
|
|
531584
|
-
},
|
|
531585
531355
|
enableFallback,
|
|
531586
531356
|
fallbackStrategy,
|
|
531587
531357
|
peer: this.context.peer,
|
|
@@ -531642,7 +531412,8 @@ var Clark = class _Clark extends TracedFSM {
|
|
|
531642
531412
|
}
|
|
531643
531413
|
}
|
|
531644
531414
|
pushContextUsed(usage) {
|
|
531645
|
-
const
|
|
531415
|
+
const normalizedInputTokens = getTotalInputTokens(usage);
|
|
531416
|
+
const contextUsed = normalizedInputTokens + (usage.reasoningTokens ?? 0) + (usage.outputTokens ?? 0);
|
|
531646
531417
|
const formatTokens = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : `${n}`;
|
|
531647
531418
|
this.logger.info(`Context used: ${formatTokens(contextUsed)} tokens`);
|
|
531648
531419
|
void this.context.peer?.call.aiPushContextUsed({ contextUsed }).catch((err) => {
|
|
@@ -562207,17 +561978,17 @@ var ToolRegistry = class {
|
|
|
562207
561978
|
* @param deps - Optional dependencies to instantiate the tool immediately
|
|
562208
561979
|
* @throws Error if tool with same name already registered
|
|
562209
561980
|
*/
|
|
562210
|
-
register(
|
|
562211
|
-
if (this.factories.has(
|
|
562212
|
-
throw new Error(`Tool "${
|
|
561981
|
+
register(factory9, deps) {
|
|
561982
|
+
if (this.factories.has(factory9.name) || this.instances.has(factory9.name)) {
|
|
561983
|
+
throw new Error(`Tool "${factory9.name}" already registered`);
|
|
562213
561984
|
}
|
|
562214
|
-
this.factories.set(
|
|
561985
|
+
this.factories.set(factory9.name, factory9);
|
|
562215
561986
|
if (deps !== void 0) {
|
|
562216
|
-
const instance3 =
|
|
562217
|
-
if (instance3.name !==
|
|
562218
|
-
throw new Error(`Tool name mismatch: factory.name="${
|
|
561987
|
+
const instance3 = factory9.create(deps);
|
|
561988
|
+
if (instance3.name !== factory9.name) {
|
|
561989
|
+
throw new Error(`Tool name mismatch: factory.name="${factory9.name}" but tool.name="${instance3.name}"`);
|
|
562219
561990
|
}
|
|
562220
|
-
this.instances.set(
|
|
561991
|
+
this.instances.set(factory9.name, instance3);
|
|
562221
561992
|
}
|
|
562222
561993
|
}
|
|
562223
561994
|
/**
|
|
@@ -562249,8 +562020,8 @@ var ToolRegistry = class {
|
|
|
562249
562020
|
* @param factories - Array of tool factories to register
|
|
562250
562021
|
*/
|
|
562251
562022
|
registerAll(factories) {
|
|
562252
|
-
for (const
|
|
562253
|
-
this.register(
|
|
562023
|
+
for (const factory9 of factories) {
|
|
562024
|
+
this.register(factory9);
|
|
562254
562025
|
}
|
|
562255
562026
|
}
|
|
562256
562027
|
/**
|
|
@@ -566075,63 +565846,43 @@ const ProductsPage = () => {
|
|
|
566075
565846
|
|
|
566076
565847
|
### Loading States
|
|
566077
565848
|
|
|
566078
|
-
|
|
566079
|
-
|
|
566080
|
-
**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.
|
|
565849
|
+
**Always represent initial loading with skeletons (shimmers), not spinners or empty screens.**
|
|
566081
565850
|
|
|
566082
|
-
**
|
|
566083
|
-
|
|
566084
|
-
Use \`loading\` and \`fetching\` from \`useApiData\` to distinguish these states:
|
|
565851
|
+
**Always show a loading indicator when refetching data** (e.g. after filter/search changes). Use \`fetching\` from \`useApiData\` to visually indicate that fresh data is being fetched while keeping the current data visible.
|
|
566085
565852
|
|
|
566086
565853
|
\`\`\`tsx
|
|
565854
|
+
// \u2705 CORRECT \u2014 skeleton for first load, overlay for refetch
|
|
566087
565855
|
const { data, loading, fetching, isError, error } = useApiData("GetOrders", {
|
|
566088
565856
|
status: statusFilter,
|
|
566089
565857
|
search,
|
|
566090
565858
|
});
|
|
566091
565859
|
|
|
566092
|
-
|
|
566093
|
-
if (loading) {
|
|
566094
|
-
return <OrderTableSkeleton />;
|
|
566095
|
-
}
|
|
566096
|
-
|
|
565860
|
+
if (loading) return <Skeleton />;
|
|
566097
565861
|
if (isError) return <ErrorBanner error={error} />;
|
|
566098
|
-
|
|
566099
|
-
// Refetch \u2014 data exists \u2192 subtle opacity + indicator, table stays interactive
|
|
566100
565862
|
return (
|
|
566101
|
-
<div>
|
|
566102
|
-
|
|
566103
|
-
<div className={fetching ? "opacity-70" : ""}>
|
|
566104
|
-
<OrderTable orders={data.orders} />
|
|
566105
|
-
</div>
|
|
565863
|
+
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
565864
|
+
<OrderTable orders={data.orders} />
|
|
566106
565865
|
</div>
|
|
566107
565866
|
);
|
|
566108
565867
|
\`\`\`
|
|
566109
565868
|
|
|
566110
565869
|
\`\`\`tsx
|
|
566111
|
-
// \u274C WRONG \u2014 pointer-events-none disables the table, making it feel broken
|
|
566112
|
-
return (
|
|
566113
|
-
<div className={fetching ? "pointer-events-none" : ""}>
|
|
566114
|
-
<OrderTable orders={data.orders} />
|
|
566115
|
-
</div>
|
|
566116
|
-
);
|
|
566117
|
-
|
|
566118
565870
|
// \u274C WRONG \u2014 no loading feedback when filters change
|
|
565871
|
+
const { data, loading } = useApiData("GetOrders", {
|
|
565872
|
+
status: statusFilter,
|
|
565873
|
+
search,
|
|
565874
|
+
});
|
|
565875
|
+
|
|
566119
565876
|
if (loading) return <Skeleton />;
|
|
566120
565877
|
return <OrderTable orders={data.orders} />;
|
|
566121
565878
|
\`\`\`
|
|
566122
565879
|
|
|
566123
|
-
#### Table Loading Rules
|
|
566124
|
-
|
|
566125
|
-
- **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.
|
|
566126
|
-
- **Do not** replace a populated table with a full skeleton on refetch \u2014 this causes disorienting content flashes.
|
|
566127
|
-
- **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).
|
|
566128
|
-
|
|
566129
565880
|
### Efficient Loading Patterns
|
|
566130
565881
|
|
|
566131
|
-
1. **Always show loading indicators on refetch**: When inputs change (e.g. filters, search), show a
|
|
565882
|
+
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.
|
|
566132
565883
|
2. **Loading State Hierarchy**:
|
|
566133
565884
|
- No data yet (\`loading\`) \u2192 Full skeleton placeholder
|
|
566134
|
-
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a
|
|
565885
|
+
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a loading overlay (e.g. reduced opacity, inline spinner)
|
|
566135
565886
|
- Error state (\`isError\`) \u2192 Show error with retry option, optionally keep stale data visible
|
|
566136
565887
|
3. **Debounce Rapid Requests**: Prevent multiple API calls in short succession
|
|
566137
565888
|
4. **Use useApiData for automatic refetching**: \`useApiData\` auto-refetches when inputs change and supports \`staleTime\`, \`refetchOnWindowFocus\`, \`refetchOnReconnect\`, \`refetchInterval\`, and \`retry\` options.
|
|
@@ -569341,15 +569092,6 @@ var ChatSessionStore = (() => {
|
|
|
569341
569092
|
responseToMessageId: typeof msg.responseToMessageId === "string" ? msg.responseToMessageId : void 0,
|
|
569342
569093
|
savedFacts: Array.isArray(msg.savedFacts) ? msg.savedFacts : void 0
|
|
569343
569094
|
};
|
|
569344
|
-
} else if (msg.type === "next_steps") {
|
|
569345
|
-
return {
|
|
569346
|
-
role: msg.role,
|
|
569347
|
-
content: msg.content,
|
|
569348
|
-
type: "next_steps",
|
|
569349
|
-
id: typeof msg.id === "string" ? msg.id : void 0,
|
|
569350
|
-
timestamp,
|
|
569351
|
-
nextSteps: Array.isArray(msg.nextSteps) ? msg.nextSteps : []
|
|
569352
|
-
};
|
|
569353
569095
|
}
|
|
569354
569096
|
const baseMessage = {
|
|
569355
569097
|
role: msg.role,
|
|
@@ -569779,15 +569521,6 @@ var ChatSessionStore = (() => {
|
|
|
569779
569521
|
responseToMessageId: payload.responseToMessageId,
|
|
569780
569522
|
savedFacts: payload.savedFacts
|
|
569781
569523
|
};
|
|
569782
|
-
} else if (payload.type === "next_steps") {
|
|
569783
|
-
message = {
|
|
569784
|
-
role: "assistant",
|
|
569785
|
-
content: payload.text,
|
|
569786
|
-
type: "next_steps",
|
|
569787
|
-
id: messageId,
|
|
569788
|
-
timestamp: Date.now(),
|
|
569789
|
-
nextSteps: payload.nextSteps ?? []
|
|
569790
|
-
};
|
|
569791
569524
|
} else {
|
|
569792
569525
|
message = {
|
|
569793
569526
|
role: "assistant",
|
|
@@ -584324,13 +584057,6 @@ var ClarkChatLanguageModel = class {
|
|
|
584324
584057
|
});
|
|
584325
584058
|
break;
|
|
584326
584059
|
}
|
|
584327
|
-
case "raw": {
|
|
584328
|
-
controller.enqueue({
|
|
584329
|
-
type: "raw",
|
|
584330
|
-
rawValue: value2.rawValue ?? value2
|
|
584331
|
-
});
|
|
584332
|
-
break;
|
|
584333
|
-
}
|
|
584334
584060
|
case "object": {
|
|
584335
584061
|
const id2 = asString(value2.id);
|
|
584336
584062
|
if (id2 == null) {
|
|
@@ -589088,13 +588814,11 @@ var StreamConfig = class _StreamConfig {
|
|
|
589088
588814
|
_provider;
|
|
589089
588815
|
_fallback;
|
|
589090
588816
|
_logging;
|
|
589091
|
-
|
|
589092
|
-
constructor(retry, provider, fallback, logging, thinking) {
|
|
588817
|
+
constructor(retry, provider, fallback, logging) {
|
|
589093
588818
|
this._retry = Object.freeze(retry);
|
|
589094
588819
|
this._provider = Object.freeze(provider);
|
|
589095
588820
|
this._fallback = Object.freeze(fallback);
|
|
589096
588821
|
this._logging = Object.freeze(logging);
|
|
589097
|
-
this._thinking = thinking ? Object.freeze({ ...thinking }) : void 0;
|
|
589098
588822
|
}
|
|
589099
588823
|
static create(options8) {
|
|
589100
588824
|
if (!options8.provider || !options8.model) {
|
|
@@ -589124,7 +588848,7 @@ var StreamConfig = class _StreamConfig {
|
|
|
589124
588848
|
saveArtifact: options8.logging?.saveArtifact,
|
|
589125
588849
|
metadata: options8.logging?.metadata ?? {}
|
|
589126
588850
|
};
|
|
589127
|
-
return new _StreamConfig(retry, provider, fallback, logging
|
|
588851
|
+
return new _StreamConfig(retry, provider, fallback, logging);
|
|
589128
588852
|
}
|
|
589129
588853
|
get retry() {
|
|
589130
588854
|
return this._retry;
|
|
@@ -589138,9 +588862,6 @@ var StreamConfig = class _StreamConfig {
|
|
|
589138
588862
|
get logging() {
|
|
589139
588863
|
return this._logging;
|
|
589140
588864
|
}
|
|
589141
|
-
get thinking() {
|
|
589142
|
-
return this._thinking;
|
|
589143
|
-
}
|
|
589144
588865
|
};
|
|
589145
588866
|
|
|
589146
588867
|
// ../../../vite-plugin-file-sync/dist/ai-service/llm/stream/orchestrator.js
|
|
@@ -589916,15 +589637,10 @@ var StreamOrchestrator = class {
|
|
|
589916
589637
|
}
|
|
589917
589638
|
}
|
|
589918
589639
|
} : options8;
|
|
589919
|
-
const thinkingRebuilt = this.rebuildThinkingOptions(baseOptions, provider);
|
|
589920
589640
|
return {
|
|
589921
|
-
...
|
|
589922
|
-
headers: {
|
|
589923
|
-
...options8.headers,
|
|
589924
|
-
...thinkingRebuilt.headers
|
|
589925
|
-
},
|
|
589641
|
+
...baseOptions,
|
|
589926
589642
|
providerOptions: {
|
|
589927
|
-
...
|
|
589643
|
+
...baseOptions.providerOptions,
|
|
589928
589644
|
billing: {
|
|
589929
589645
|
retry_count: session.metrics.retryCount,
|
|
589930
589646
|
workflow_failed: session.outcome === "error"
|
|
@@ -589932,50 +589648,6 @@ var StreamOrchestrator = class {
|
|
|
589932
589648
|
}
|
|
589933
589649
|
};
|
|
589934
589650
|
}
|
|
589935
|
-
/**
|
|
589936
|
-
* Replaces the thinking-related fields on `providerOptions.anthropic` and
|
|
589937
|
-
* `providerOptions.bedrock.additionalModelRequestFields` with the shape
|
|
589938
|
-
* the given model accepts. Any stale thinking keys (e.g. `budgetTokens`
|
|
589939
|
-
* from a previous opus-4-6 attempt, or `effort` from a previous 4-7
|
|
589940
|
-
* attempt) are dropped so the new shape isn't polluted.
|
|
589941
|
-
*/
|
|
589942
|
-
rebuildThinkingOptions(options8, provider) {
|
|
589943
|
-
const thinkingConfig = this.config.thinking;
|
|
589944
|
-
if (!thinkingConfig) {
|
|
589945
|
-
return options8;
|
|
589946
|
-
}
|
|
589947
|
-
const fresh = buildThinkingProviderOptions(provider.model, {
|
|
589948
|
-
thinkingEnabled: thinkingConfig.enabled,
|
|
589949
|
-
thinkingBudgetTokens: thinkingConfig.budgetTokens,
|
|
589950
|
-
interleavedThinking: thinkingConfig.interleaved
|
|
589951
|
-
});
|
|
589952
|
-
const existing = options8.providerOptions ?? {};
|
|
589953
|
-
const existingAnthropic = existing.anthropic ?? {};
|
|
589954
|
-
const existingBedrock = existing.bedrock ?? {};
|
|
589955
|
-
const existingBedrockFields = existingBedrock.additionalModelRequestFields ?? {};
|
|
589956
|
-
const { thinking: _a21, effort: _b17, ...anthropicRest } = existingAnthropic;
|
|
589957
|
-
const { thinking: _c, output_config: _d, anthropic_beta: _e, budget_tokens: _f, ...bedrockFieldsRest } = existingBedrockFields;
|
|
589958
|
-
const anthropic2 = fresh.anthropic ? { ...anthropicRest, ...fresh.anthropic } : anthropicRest;
|
|
589959
|
-
const bedrock = fresh.bedrock ? {
|
|
589960
|
-
...existingBedrock,
|
|
589961
|
-
additionalModelRequestFields: {
|
|
589962
|
-
...bedrockFieldsRest,
|
|
589963
|
-
...fresh.bedrock.additionalModelRequestFields
|
|
589964
|
-
}
|
|
589965
|
-
} : Object.keys(bedrockFieldsRest).length > 0 ? {
|
|
589966
|
-
...existingBedrock,
|
|
589967
|
-
additionalModelRequestFields: bedrockFieldsRest
|
|
589968
|
-
} : { ...existingBedrock, additionalModelRequestFields: {} };
|
|
589969
|
-
return {
|
|
589970
|
-
...options8,
|
|
589971
|
-
headers: { ...options8.headers, ...fresh.headers },
|
|
589972
|
-
providerOptions: {
|
|
589973
|
-
...existing,
|
|
589974
|
-
anthropic: anthropic2,
|
|
589975
|
-
bedrock
|
|
589976
|
-
}
|
|
589977
|
-
};
|
|
589978
|
-
}
|
|
589979
589651
|
getFallbackReason(error40) {
|
|
589980
589652
|
if (error40 && typeof error40 === "object" && "type" in error40) {
|
|
589981
589653
|
const errorType = error40.type;
|
|
@@ -591438,7 +591110,7 @@ var LLMClient = class {
|
|
|
591438
591110
|
}
|
|
591439
591111
|
}
|
|
591440
591112
|
async streamText(options8, logger15 = getLogger3(), tracer4 = LLMObsTracer.instance) {
|
|
591441
|
-
const { model, user, system, context: contextConfig, logging: loggingConfig, retry: retryConfig, providerConfig,
|
|
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;
|
|
591442
591114
|
if (!user) {
|
|
591443
591115
|
throw new Error("user message is required");
|
|
591444
591116
|
}
|
|
@@ -591535,15 +591207,11 @@ var LLMClient = class {
|
|
|
591535
591207
|
try {
|
|
591536
591208
|
const fallbackEnabled = this.unifiedProviderEnabled && (enableFallback ?? false);
|
|
591537
591209
|
logger15.info(`[llm-client] provider=${providerConfig.provider} model=${providerConfig.model} unifiedProvider=${this.unifiedProviderEnabled} fallback=${fallbackEnabled} retry=${safeJsonStringify(retryConfig)}`);
|
|
591538
|
-
const adaptiveEffortCapable = usesAdaptiveEffort(providerConfig.model);
|
|
591539
|
-
const defaultMaxTotalTimeMs = adaptiveEffortCapable ? 5 * 60 * 1e3 : 2 * 60 * 1e3;
|
|
591540
|
-
const defaultIdleTimeoutMs = adaptiveEffortCapable ? 18e4 : 9e4;
|
|
591541
591210
|
const config4 = StreamConfig.create({
|
|
591542
591211
|
retry: {
|
|
591543
591212
|
...this.retryOptions,
|
|
591544
591213
|
...retryConfig,
|
|
591545
|
-
maxTotalTimeMs: retryConfig?.maxTotalTimeMs ?? this.retryOptions?.maxTotalTimeMs ??
|
|
591546
|
-
idleTimeoutMs: retryConfig?.idleTimeoutMs ?? this.retryOptions?.idleTimeoutMs ?? defaultIdleTimeoutMs
|
|
591214
|
+
maxTotalTimeMs: retryConfig?.maxTotalTimeMs ?? this.retryOptions?.maxTotalTimeMs ?? 2 * 60 * 1e3
|
|
591547
591215
|
},
|
|
591548
591216
|
provider: providerConfig.provider,
|
|
591549
591217
|
model: providerConfig.model,
|
|
@@ -591551,7 +591219,6 @@ var LLMClient = class {
|
|
|
591551
591219
|
enabled: fallbackEnabled,
|
|
591552
591220
|
strategy: fallbackStrategy
|
|
591553
591221
|
},
|
|
591554
|
-
thinking: thinkingConfig,
|
|
591555
591222
|
logging: loggingConfig !== false ? {
|
|
591556
591223
|
enabled: true,
|
|
591557
591224
|
conversationId: loggingConfig?.conversationId,
|
|
@@ -591730,10 +591397,10 @@ init_cjs_shims();
|
|
|
591730
591397
|
// ../../../vite-plugin-file-sync/dist/ai-service/llm/impl/anthropic.js
|
|
591731
591398
|
init_cjs_shims();
|
|
591732
591399
|
|
|
591733
|
-
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.
|
|
591400
|
+
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.46_zod@3.25.76/node_modules/@ai-sdk/anthropic/dist/index.mjs
|
|
591734
591401
|
init_cjs_shims();
|
|
591735
591402
|
|
|
591736
|
-
// ../../../../node_modules/.pnpm/@ai-sdk+provider-utils@4.0.
|
|
591403
|
+
// ../../../../node_modules/.pnpm/@ai-sdk+provider-utils@4.0.15_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs
|
|
591737
591404
|
init_cjs_shims();
|
|
591738
591405
|
function combineHeaders2(...headers) {
|
|
591739
591406
|
return headers.reduce(
|
|
@@ -591746,30 +591413,25 @@ function combineHeaders2(...headers) {
|
|
|
591746
591413
|
}
|
|
591747
591414
|
function createToolNameMapping({
|
|
591748
591415
|
tools = [],
|
|
591749
|
-
providerToolNames
|
|
591750
|
-
resolveProviderToolName
|
|
591416
|
+
providerToolNames
|
|
591751
591417
|
}) {
|
|
591752
|
-
var _a22;
|
|
591753
591418
|
const customToolNameToProviderToolName = {};
|
|
591754
591419
|
const providerToolNameToCustomToolName = {};
|
|
591755
591420
|
for (const tool22 of tools) {
|
|
591756
|
-
if (tool22.type === "provider") {
|
|
591757
|
-
const providerToolName =
|
|
591758
|
-
if (providerToolName == null) {
|
|
591759
|
-
continue;
|
|
591760
|
-
}
|
|
591421
|
+
if (tool22.type === "provider" && tool22.id in providerToolNames) {
|
|
591422
|
+
const providerToolName = providerToolNames[tool22.id];
|
|
591761
591423
|
customToolNameToProviderToolName[tool22.name] = providerToolName;
|
|
591762
591424
|
providerToolNameToCustomToolName[providerToolName] = tool22.name;
|
|
591763
591425
|
}
|
|
591764
591426
|
}
|
|
591765
591427
|
return {
|
|
591766
591428
|
toProviderToolName: (customToolName) => {
|
|
591767
|
-
var
|
|
591768
|
-
return (
|
|
591429
|
+
var _a22;
|
|
591430
|
+
return (_a22 = customToolNameToProviderToolName[customToolName]) != null ? _a22 : customToolName;
|
|
591769
591431
|
},
|
|
591770
591432
|
toCustomToolName: (providerToolName) => {
|
|
591771
|
-
var
|
|
591772
|
-
return (
|
|
591433
|
+
var _a22;
|
|
591434
|
+
return (_a22 = providerToolNameToCustomToolName[providerToolName]) != null ? _a22 : providerToolName;
|
|
591773
591435
|
}
|
|
591774
591436
|
};
|
|
591775
591437
|
}
|
|
@@ -591777,11 +591439,6 @@ function extractResponseHeaders2(response) {
|
|
|
591777
591439
|
return Object.fromEntries([...response.headers]);
|
|
591778
591440
|
}
|
|
591779
591441
|
var { btoa: btoa3, atob: atob3 } = globalThis;
|
|
591780
|
-
function convertBase64ToUint8Array(base64String) {
|
|
591781
|
-
const base64Url = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
|
591782
|
-
const latin1string = atob3(base64Url);
|
|
591783
|
-
return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));
|
|
591784
|
-
}
|
|
591785
591442
|
function convertUint8ArrayToBase64(array3) {
|
|
591786
591443
|
let latin1string = "";
|
|
591787
591444
|
for (let i = 0; i < array3.length; i++) {
|
|
@@ -591944,7 +591601,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
|
|
|
591944
591601
|
);
|
|
591945
591602
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
591946
591603
|
}
|
|
591947
|
-
var VERSION2 = true ? "4.0.
|
|
591604
|
+
var VERSION2 = true ? "4.0.15" : "0.0.0-test";
|
|
591948
591605
|
function isNonNullable(value2) {
|
|
591949
591606
|
return value2 != null;
|
|
591950
591607
|
}
|
|
@@ -591964,7 +591621,7 @@ function loadApiKey({
|
|
|
591964
591621
|
}
|
|
591965
591622
|
if (typeof process === "undefined") {
|
|
591966
591623
|
throw new LoadAPIKeyError2({
|
|
591967
|
-
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables
|
|
591624
|
+
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables is not supported in this environment.`
|
|
591968
591625
|
});
|
|
591969
591626
|
}
|
|
591970
591627
|
apiKey = process.env[environmentVariableName];
|
|
@@ -591996,8 +591653,8 @@ function loadOptionalSetting({
|
|
|
591996
591653
|
}
|
|
591997
591654
|
return settingValue;
|
|
591998
591655
|
}
|
|
591999
|
-
var suspectProtoRx2 = /"
|
|
592000
|
-
var suspectConstructorRx2 = /"
|
|
591656
|
+
var suspectProtoRx2 = /"__proto__"\s*:/;
|
|
591657
|
+
var suspectConstructorRx2 = /"constructor"\s*:/;
|
|
592001
591658
|
function _parse3(text3) {
|
|
592002
591659
|
const obj = JSON.parse(text3);
|
|
592003
591660
|
if (obj === null || typeof obj !== "object") {
|
|
@@ -592017,7 +591674,7 @@ function filter3(obj) {
|
|
|
592017
591674
|
if (Object.prototype.hasOwnProperty.call(node, "__proto__")) {
|
|
592018
591675
|
throw new SyntaxError("Object contains forbidden prototype property");
|
|
592019
591676
|
}
|
|
592020
|
-
if (Object.prototype.hasOwnProperty.call(node, "constructor") &&
|
|
591677
|
+
if (Object.prototype.hasOwnProperty.call(node, "constructor") && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
|
|
592021
591678
|
throw new SyntaxError("Object contains forbidden prototype property");
|
|
592022
591679
|
}
|
|
592023
591680
|
for (const key2 in node) {
|
|
@@ -592077,7 +591734,7 @@ function visit2(def) {
|
|
|
592077
591734
|
if (typeof def === "boolean") return def;
|
|
592078
591735
|
return addAdditionalPropertiesToJsonSchema2(def);
|
|
592079
591736
|
}
|
|
592080
|
-
var ignoreOverride2 =
|
|
591737
|
+
var ignoreOverride2 = Symbol(
|
|
592081
591738
|
"Let zodToJsonSchema decide on which parser to use"
|
|
592082
591739
|
);
|
|
592083
591740
|
var defaultOptions3 = {
|
|
@@ -593176,7 +592833,7 @@ var zod3ToJsonSchema2 = (schema, options8) => {
|
|
|
593176
592833
|
combined.$schema = "http://json-schema.org/draft-07/schema#";
|
|
593177
592834
|
return combined;
|
|
593178
592835
|
};
|
|
593179
|
-
var schemaSymbol2 =
|
|
592836
|
+
var schemaSymbol2 = Symbol.for("vercel.ai.schema");
|
|
593180
592837
|
function lazySchema(createSchema2) {
|
|
593181
592838
|
let schema;
|
|
593182
592839
|
return () => {
|
|
@@ -593637,8 +593294,8 @@ function withoutTrailingSlash2(url4) {
|
|
|
593637
593294
|
return url4 == null ? void 0 : url4.replace(/\/$/, "");
|
|
593638
593295
|
}
|
|
593639
593296
|
|
|
593640
|
-
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.
|
|
593641
|
-
var VERSION3 = true ? "3.0.
|
|
593297
|
+
// ../../../../node_modules/.pnpm/@ai-sdk+anthropic@3.0.46_zod@3.25.76/node_modules/@ai-sdk/anthropic/dist/index.mjs
|
|
593298
|
+
var VERSION3 = true ? "3.0.46" : "0.0.0-test";
|
|
593642
593299
|
var anthropicErrorDataSchema = lazySchema(
|
|
593643
593300
|
() => zodSchema3(
|
|
593644
593301
|
external_exports2.object({
|
|
@@ -593717,10 +593374,6 @@ var anthropicMessagesResponseSchema = lazySchema(
|
|
|
593717
593374
|
type: external_exports2.literal("code_execution_20250825"),
|
|
593718
593375
|
tool_id: external_exports2.string()
|
|
593719
593376
|
}),
|
|
593720
|
-
external_exports2.object({
|
|
593721
|
-
type: external_exports2.literal("code_execution_20260120"),
|
|
593722
|
-
tool_id: external_exports2.string()
|
|
593723
|
-
}),
|
|
593724
593377
|
external_exports2.object({
|
|
593725
593378
|
type: external_exports2.literal("direct")
|
|
593726
593379
|
})
|
|
@@ -593730,16 +593383,7 @@ var anthropicMessagesResponseSchema = lazySchema(
|
|
|
593730
593383
|
type: external_exports2.literal("server_tool_use"),
|
|
593731
593384
|
id: external_exports2.string(),
|
|
593732
593385
|
name: external_exports2.string(),
|
|
593733
|
-
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish()
|
|
593734
|
-
caller: external_exports2.union([
|
|
593735
|
-
external_exports2.object({
|
|
593736
|
-
type: external_exports2.literal("code_execution_20260120"),
|
|
593737
|
-
tool_id: external_exports2.string()
|
|
593738
|
-
}),
|
|
593739
|
-
external_exports2.object({
|
|
593740
|
-
type: external_exports2.literal("direct")
|
|
593741
|
-
})
|
|
593742
|
-
]).optional()
|
|
593386
|
+
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish()
|
|
593743
593387
|
}),
|
|
593744
593388
|
external_exports2.object({
|
|
593745
593389
|
type: external_exports2.literal("mcp_tool_use"),
|
|
@@ -593827,18 +593471,6 @@ var anthropicMessagesResponseSchema = lazySchema(
|
|
|
593827
593471
|
})
|
|
593828
593472
|
).optional().default([])
|
|
593829
593473
|
}),
|
|
593830
|
-
external_exports2.object({
|
|
593831
|
-
type: external_exports2.literal("encrypted_code_execution_result"),
|
|
593832
|
-
encrypted_stdout: external_exports2.string(),
|
|
593833
|
-
stderr: external_exports2.string(),
|
|
593834
|
-
return_code: external_exports2.number(),
|
|
593835
|
-
content: external_exports2.array(
|
|
593836
|
-
external_exports2.object({
|
|
593837
|
-
type: external_exports2.literal("code_execution_output"),
|
|
593838
|
-
file_id: external_exports2.string()
|
|
593839
|
-
})
|
|
593840
|
-
).optional().default([])
|
|
593841
|
-
}),
|
|
593842
593474
|
external_exports2.object({
|
|
593843
593475
|
type: external_exports2.literal("code_execution_tool_result_error"),
|
|
593844
593476
|
error_code: external_exports2.string()
|
|
@@ -593998,10 +593630,6 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
593998
593630
|
type: external_exports2.literal("code_execution_20250825"),
|
|
593999
593631
|
tool_id: external_exports2.string()
|
|
594000
593632
|
}),
|
|
594001
|
-
external_exports2.object({
|
|
594002
|
-
type: external_exports2.literal("code_execution_20260120"),
|
|
594003
|
-
tool_id: external_exports2.string()
|
|
594004
|
-
}),
|
|
594005
593633
|
external_exports2.object({
|
|
594006
593634
|
type: external_exports2.literal("direct")
|
|
594007
593635
|
})
|
|
@@ -594040,10 +593668,6 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
594040
593668
|
type: external_exports2.literal("code_execution_20250825"),
|
|
594041
593669
|
tool_id: external_exports2.string()
|
|
594042
593670
|
}),
|
|
594043
|
-
external_exports2.object({
|
|
594044
|
-
type: external_exports2.literal("code_execution_20260120"),
|
|
594045
|
-
tool_id: external_exports2.string()
|
|
594046
|
-
}),
|
|
594047
593671
|
external_exports2.object({
|
|
594048
593672
|
type: external_exports2.literal("direct")
|
|
594049
593673
|
})
|
|
@@ -594061,16 +593685,7 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
594061
593685
|
type: external_exports2.literal("server_tool_use"),
|
|
594062
593686
|
id: external_exports2.string(),
|
|
594063
593687
|
name: external_exports2.string(),
|
|
594064
|
-
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish()
|
|
594065
|
-
caller: external_exports2.union([
|
|
594066
|
-
external_exports2.object({
|
|
594067
|
-
type: external_exports2.literal("code_execution_20260120"),
|
|
594068
|
-
tool_id: external_exports2.string()
|
|
594069
|
-
}),
|
|
594070
|
-
external_exports2.object({
|
|
594071
|
-
type: external_exports2.literal("direct")
|
|
594072
|
-
})
|
|
594073
|
-
]).optional()
|
|
593688
|
+
input: external_exports2.record(external_exports2.string(), external_exports2.unknown()).nullish()
|
|
594074
593689
|
}),
|
|
594075
593690
|
external_exports2.object({
|
|
594076
593691
|
type: external_exports2.literal("mcp_tool_use"),
|
|
@@ -594158,18 +593773,6 @@ var anthropicMessagesChunkSchema = lazySchema(
|
|
|
594158
593773
|
})
|
|
594159
593774
|
).optional().default([])
|
|
594160
593775
|
}),
|
|
594161
|
-
external_exports2.object({
|
|
594162
|
-
type: external_exports2.literal("encrypted_code_execution_result"),
|
|
594163
|
-
encrypted_stdout: external_exports2.string(),
|
|
594164
|
-
stderr: external_exports2.string(),
|
|
594165
|
-
return_code: external_exports2.number(),
|
|
594166
|
-
content: external_exports2.array(
|
|
594167
|
-
external_exports2.object({
|
|
594168
|
-
type: external_exports2.literal("code_execution_output"),
|
|
594169
|
-
file_id: external_exports2.string()
|
|
594170
|
-
})
|
|
594171
|
-
).optional().default([])
|
|
594172
|
-
}),
|
|
594173
593776
|
external_exports2.object({
|
|
594174
593777
|
type: external_exports2.literal("code_execution_tool_result_error"),
|
|
594175
593778
|
error_code: external_exports2.string()
|
|
@@ -594422,7 +594025,7 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594422
594025
|
/**
|
|
594423
594026
|
* Determines how structured outputs are generated.
|
|
594424
594027
|
*
|
|
594425
|
-
* - `outputFormat`: Use the `
|
|
594028
|
+
* - `outputFormat`: Use the `output_format` parameter to specify the structured output format.
|
|
594426
594029
|
* - `jsonTool`: Use a special 'json' tool to specify the structured output format.
|
|
594427
594030
|
* - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
|
|
594428
594031
|
*/
|
|
@@ -594436,13 +594039,7 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594436
594039
|
thinking: external_exports2.discriminatedUnion("type", [
|
|
594437
594040
|
external_exports2.object({
|
|
594438
594041
|
/** for Sonnet 4.6, Opus 4.6, and newer models */
|
|
594439
|
-
type: external_exports2.literal("adaptive")
|
|
594440
|
-
/**
|
|
594441
|
-
* Controls whether thinking content is included in the response.
|
|
594442
|
-
* - `"omitted"`: Thinking blocks are present but text is empty (default for Opus 4.7+).
|
|
594443
|
-
* - `"summarized"`: Thinking content is returned. Required to see reasoning output.
|
|
594444
|
-
*/
|
|
594445
|
-
display: external_exports2.enum(["omitted", "summarized"]).optional()
|
|
594042
|
+
type: external_exports2.literal("adaptive")
|
|
594446
594043
|
}),
|
|
594447
594044
|
external_exports2.object({
|
|
594448
594045
|
/** for models before Opus 4.6, except Sonnet 4.6 still supports it */
|
|
@@ -594466,20 +594063,6 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594466
594063
|
type: external_exports2.literal("ephemeral"),
|
|
594467
594064
|
ttl: external_exports2.union([external_exports2.literal("5m"), external_exports2.literal("1h")]).optional()
|
|
594468
594065
|
}).optional(),
|
|
594469
|
-
/**
|
|
594470
|
-
* Metadata to include with the request.
|
|
594471
|
-
*
|
|
594472
|
-
* See https://platform.claude.com/docs/en/api/messages/create for details.
|
|
594473
|
-
*/
|
|
594474
|
-
metadata: external_exports2.object({
|
|
594475
|
-
/**
|
|
594476
|
-
* An external identifier for the user associated with the request.
|
|
594477
|
-
*
|
|
594478
|
-
* Should be a UUID, hash value, or other opaque identifier.
|
|
594479
|
-
* Must not contain PII (name, email, phone number, etc.).
|
|
594480
|
-
*/
|
|
594481
|
-
userId: external_exports2.string().optional()
|
|
594482
|
-
}).optional(),
|
|
594483
594066
|
/**
|
|
594484
594067
|
* MCP servers to be utilized in this request.
|
|
594485
594068
|
*/
|
|
@@ -594511,11 +594094,10 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594511
594094
|
).optional()
|
|
594512
594095
|
}).optional(),
|
|
594513
594096
|
/**
|
|
594514
|
-
* Whether to enable
|
|
594515
|
-
*
|
|
594516
|
-
*
|
|
594517
|
-
*
|
|
594518
|
-
* `providerOptions.anthropic.eagerInputStreaming`.
|
|
594097
|
+
* Whether to enable tool streaming (and structured output streaming).
|
|
594098
|
+
*
|
|
594099
|
+
* When set to false, the model will return all tool calls and results
|
|
594100
|
+
* at once after a delay.
|
|
594519
594101
|
*
|
|
594520
594102
|
* @default true
|
|
594521
594103
|
*/
|
|
@@ -594523,38 +594105,12 @@ var anthropicLanguageModelOptions = external_exports2.object({
|
|
|
594523
594105
|
/**
|
|
594524
594106
|
* @default 'high'
|
|
594525
594107
|
*/
|
|
594526
|
-
effort: external_exports2.enum(["low", "medium", "high", "
|
|
594527
|
-
/**
|
|
594528
|
-
* Task budget for agentic turns. Informs the model of the total token budget
|
|
594529
|
-
* available for the current task, allowing it to prioritize work and wind down
|
|
594530
|
-
* gracefully as the budget is consumed.
|
|
594531
|
-
*
|
|
594532
|
-
* Advisory only — does not enforce a hard token limit.
|
|
594533
|
-
*/
|
|
594534
|
-
taskBudget: external_exports2.object({
|
|
594535
|
-
type: external_exports2.literal("tokens"),
|
|
594536
|
-
total: external_exports2.number().int().min(2e4),
|
|
594537
|
-
remaining: external_exports2.number().int().min(0).optional()
|
|
594538
|
-
}).optional(),
|
|
594108
|
+
effort: external_exports2.enum(["low", "medium", "high", "max"]).optional(),
|
|
594539
594109
|
/**
|
|
594540
594110
|
* Enable fast mode for faster inference (2.5x faster output token speeds).
|
|
594541
594111
|
* Only supported with claude-opus-4-6.
|
|
594542
594112
|
*/
|
|
594543
594113
|
speed: external_exports2.enum(["fast", "standard"]).optional(),
|
|
594544
|
-
/**
|
|
594545
|
-
* Controls where model inference runs for this request.
|
|
594546
|
-
*
|
|
594547
|
-
* - `"global"`: Inference may run in any available geography (default).
|
|
594548
|
-
* - `"us"`: Inference runs only in US-based infrastructure.
|
|
594549
|
-
*
|
|
594550
|
-
* See https://platform.claude.com/docs/en/build-with-claude/data-residency
|
|
594551
|
-
*/
|
|
594552
|
-
inferenceGeo: external_exports2.enum(["us", "global"]).optional(),
|
|
594553
|
-
/**
|
|
594554
|
-
* A set of beta features to enable.
|
|
594555
|
-
* Allow a provider to receive the full `betas` set if it needs it.
|
|
594556
|
-
*/
|
|
594557
|
-
anthropicBeta: external_exports2.array(external_exports2.string()).optional(),
|
|
594558
594114
|
contextManagement: external_exports2.object({
|
|
594559
594115
|
edits: external_exports2.array(
|
|
594560
594116
|
external_exports2.discriminatedUnion("type", [
|
|
@@ -594672,51 +594228,6 @@ var factory = createProviderToolFactory({
|
|
|
594672
594228
|
var textEditor_20250728 = (args = {}) => {
|
|
594673
594229
|
return factory(args);
|
|
594674
594230
|
};
|
|
594675
|
-
var webSearch_20260209ArgsSchema = lazySchema(
|
|
594676
|
-
() => zodSchema3(
|
|
594677
|
-
external_exports2.object({
|
|
594678
|
-
maxUses: external_exports2.number().optional(),
|
|
594679
|
-
allowedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594680
|
-
blockedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594681
|
-
userLocation: external_exports2.object({
|
|
594682
|
-
type: external_exports2.literal("approximate"),
|
|
594683
|
-
city: external_exports2.string().optional(),
|
|
594684
|
-
region: external_exports2.string().optional(),
|
|
594685
|
-
country: external_exports2.string().optional(),
|
|
594686
|
-
timezone: external_exports2.string().optional()
|
|
594687
|
-
}).optional()
|
|
594688
|
-
})
|
|
594689
|
-
)
|
|
594690
|
-
);
|
|
594691
|
-
var webSearch_20260209OutputSchema = lazySchema(
|
|
594692
|
-
() => zodSchema3(
|
|
594693
|
-
external_exports2.array(
|
|
594694
|
-
external_exports2.object({
|
|
594695
|
-
url: external_exports2.string(),
|
|
594696
|
-
title: external_exports2.string().nullable(),
|
|
594697
|
-
pageAge: external_exports2.string().nullable(),
|
|
594698
|
-
encryptedContent: external_exports2.string(),
|
|
594699
|
-
type: external_exports2.literal("web_search_result")
|
|
594700
|
-
})
|
|
594701
|
-
)
|
|
594702
|
-
)
|
|
594703
|
-
);
|
|
594704
|
-
var webSearch_20260209InputSchema = lazySchema(
|
|
594705
|
-
() => zodSchema3(
|
|
594706
|
-
external_exports2.object({
|
|
594707
|
-
query: external_exports2.string()
|
|
594708
|
-
})
|
|
594709
|
-
)
|
|
594710
|
-
);
|
|
594711
|
-
var factory2 = createProviderToolFactoryWithOutputSchema({
|
|
594712
|
-
id: "anthropic.web_search_20260209",
|
|
594713
|
-
inputSchema: webSearch_20260209InputSchema,
|
|
594714
|
-
outputSchema: webSearch_20260209OutputSchema,
|
|
594715
|
-
supportsDeferredResults: true
|
|
594716
|
-
});
|
|
594717
|
-
var webSearch_20260209 = (args = {}) => {
|
|
594718
|
-
return factory2(args);
|
|
594719
|
-
};
|
|
594720
594231
|
var webSearch_20250305ArgsSchema = lazySchema(
|
|
594721
594232
|
() => zodSchema3(
|
|
594722
594233
|
external_exports2.object({
|
|
@@ -594753,67 +594264,14 @@ var webSearch_20250305InputSchema = lazySchema(
|
|
|
594753
594264
|
})
|
|
594754
594265
|
)
|
|
594755
594266
|
);
|
|
594756
|
-
var
|
|
594267
|
+
var factory2 = createProviderToolFactoryWithOutputSchema({
|
|
594757
594268
|
id: "anthropic.web_search_20250305",
|
|
594758
594269
|
inputSchema: webSearch_20250305InputSchema,
|
|
594759
594270
|
outputSchema: webSearch_20250305OutputSchema,
|
|
594760
594271
|
supportsDeferredResults: true
|
|
594761
594272
|
});
|
|
594762
594273
|
var webSearch_20250305 = (args = {}) => {
|
|
594763
|
-
return
|
|
594764
|
-
};
|
|
594765
|
-
var webFetch_20260209ArgsSchema = lazySchema(
|
|
594766
|
-
() => zodSchema3(
|
|
594767
|
-
external_exports2.object({
|
|
594768
|
-
maxUses: external_exports2.number().optional(),
|
|
594769
|
-
allowedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594770
|
-
blockedDomains: external_exports2.array(external_exports2.string()).optional(),
|
|
594771
|
-
citations: external_exports2.object({ enabled: external_exports2.boolean() }).optional(),
|
|
594772
|
-
maxContentTokens: external_exports2.number().optional()
|
|
594773
|
-
})
|
|
594774
|
-
)
|
|
594775
|
-
);
|
|
594776
|
-
var webFetch_20260209OutputSchema = lazySchema(
|
|
594777
|
-
() => zodSchema3(
|
|
594778
|
-
external_exports2.object({
|
|
594779
|
-
type: external_exports2.literal("web_fetch_result"),
|
|
594780
|
-
url: external_exports2.string(),
|
|
594781
|
-
content: external_exports2.object({
|
|
594782
|
-
type: external_exports2.literal("document"),
|
|
594783
|
-
title: external_exports2.string().nullable(),
|
|
594784
|
-
citations: external_exports2.object({ enabled: external_exports2.boolean() }).optional(),
|
|
594785
|
-
source: external_exports2.union([
|
|
594786
|
-
external_exports2.object({
|
|
594787
|
-
type: external_exports2.literal("base64"),
|
|
594788
|
-
mediaType: external_exports2.literal("application/pdf"),
|
|
594789
|
-
data: external_exports2.string()
|
|
594790
|
-
}),
|
|
594791
|
-
external_exports2.object({
|
|
594792
|
-
type: external_exports2.literal("text"),
|
|
594793
|
-
mediaType: external_exports2.literal("text/plain"),
|
|
594794
|
-
data: external_exports2.string()
|
|
594795
|
-
})
|
|
594796
|
-
])
|
|
594797
|
-
}),
|
|
594798
|
-
retrievedAt: external_exports2.string().nullable()
|
|
594799
|
-
})
|
|
594800
|
-
)
|
|
594801
|
-
);
|
|
594802
|
-
var webFetch_20260209InputSchema = lazySchema(
|
|
594803
|
-
() => zodSchema3(
|
|
594804
|
-
external_exports2.object({
|
|
594805
|
-
url: external_exports2.string()
|
|
594806
|
-
})
|
|
594807
|
-
)
|
|
594808
|
-
);
|
|
594809
|
-
var factory4 = createProviderToolFactoryWithOutputSchema({
|
|
594810
|
-
id: "anthropic.web_fetch_20260209",
|
|
594811
|
-
inputSchema: webFetch_20260209InputSchema,
|
|
594812
|
-
outputSchema: webFetch_20260209OutputSchema,
|
|
594813
|
-
supportsDeferredResults: true
|
|
594814
|
-
});
|
|
594815
|
-
var webFetch_20260209 = (args = {}) => {
|
|
594816
|
-
return factory4(args);
|
|
594274
|
+
return factory2(args);
|
|
594817
594275
|
};
|
|
594818
594276
|
var webFetch_20250910ArgsSchema = lazySchema(
|
|
594819
594277
|
() => zodSchema3(
|
|
@@ -594859,25 +594317,23 @@ var webFetch_20250910InputSchema = lazySchema(
|
|
|
594859
594317
|
})
|
|
594860
594318
|
)
|
|
594861
594319
|
);
|
|
594862
|
-
var
|
|
594320
|
+
var factory3 = createProviderToolFactoryWithOutputSchema({
|
|
594863
594321
|
id: "anthropic.web_fetch_20250910",
|
|
594864
594322
|
inputSchema: webFetch_20250910InputSchema,
|
|
594865
594323
|
outputSchema: webFetch_20250910OutputSchema,
|
|
594866
594324
|
supportsDeferredResults: true
|
|
594867
594325
|
});
|
|
594868
594326
|
var webFetch_20250910 = (args = {}) => {
|
|
594869
|
-
return
|
|
594327
|
+
return factory3(args);
|
|
594870
594328
|
};
|
|
594871
594329
|
async function prepareTools({
|
|
594872
594330
|
tools,
|
|
594873
594331
|
toolChoice,
|
|
594874
594332
|
disableParallelToolUse,
|
|
594875
594333
|
cacheControlValidator,
|
|
594876
|
-
supportsStructuredOutput
|
|
594877
|
-
supportsStrictTools,
|
|
594878
|
-
defaultEagerInputStreaming = false
|
|
594334
|
+
supportsStructuredOutput
|
|
594879
594335
|
}) {
|
|
594880
|
-
var _a21
|
|
594336
|
+
var _a21;
|
|
594881
594337
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
594882
594338
|
const toolWarnings = [];
|
|
594883
594339
|
const betas = /* @__PURE__ */ new Set();
|
|
@@ -594894,23 +594350,14 @@ async function prepareTools({
|
|
|
594894
594350
|
canCache: true
|
|
594895
594351
|
});
|
|
594896
594352
|
const anthropicOptions = (_a21 = tool3.providerOptions) == null ? void 0 : _a21.anthropic;
|
|
594897
|
-
const eagerInputStreaming = (_b17 = anthropicOptions == null ? void 0 : anthropicOptions.eagerInputStreaming) != null ? _b17 : defaultEagerInputStreaming;
|
|
594898
594353
|
const deferLoading = anthropicOptions == null ? void 0 : anthropicOptions.deferLoading;
|
|
594899
594354
|
const allowedCallers = anthropicOptions == null ? void 0 : anthropicOptions.allowedCallers;
|
|
594900
|
-
if (!supportsStrictTools && tool3.strict != null) {
|
|
594901
|
-
toolWarnings.push({
|
|
594902
|
-
type: "unsupported",
|
|
594903
|
-
feature: "strict",
|
|
594904
|
-
details: `Tool '${tool3.name}' has strict: ${tool3.strict}, but strict mode is not supported by this provider. The strict property will be ignored.`
|
|
594905
|
-
});
|
|
594906
|
-
}
|
|
594907
594355
|
anthropicTools2.push({
|
|
594908
594356
|
name: tool3.name,
|
|
594909
594357
|
description: tool3.description,
|
|
594910
594358
|
input_schema: tool3.inputSchema,
|
|
594911
594359
|
cache_control: cacheControl,
|
|
594912
|
-
...
|
|
594913
|
-
...supportsStrictTools === true && tool3.strict != null ? { strict: tool3.strict } : {},
|
|
594360
|
+
...supportsStructuredOutput === true && tool3.strict != null ? { strict: tool3.strict } : {},
|
|
594914
594361
|
...deferLoading != null ? { defer_loading: deferLoading } : {},
|
|
594915
594362
|
...allowedCallers != null ? { allowed_callers: allowedCallers } : {},
|
|
594916
594363
|
...tool3.inputExamples != null ? {
|
|
@@ -594946,13 +594393,6 @@ async function prepareTools({
|
|
|
594946
594393
|
});
|
|
594947
594394
|
break;
|
|
594948
594395
|
}
|
|
594949
|
-
case "anthropic.code_execution_20260120": {
|
|
594950
|
-
anthropicTools2.push({
|
|
594951
|
-
type: "code_execution_20260120",
|
|
594952
|
-
name: "code_execution"
|
|
594953
|
-
});
|
|
594954
|
-
break;
|
|
594955
|
-
}
|
|
594956
594396
|
case "anthropic.computer_20250124": {
|
|
594957
594397
|
betas.add("computer-use-2025-01-24");
|
|
594958
594398
|
anthropicTools2.push({
|
|
@@ -595074,24 +594514,6 @@ async function prepareTools({
|
|
|
595074
594514
|
});
|
|
595075
594515
|
break;
|
|
595076
594516
|
}
|
|
595077
|
-
case "anthropic.web_fetch_20260209": {
|
|
595078
|
-
betas.add("code-execution-web-tools-2026-02-09");
|
|
595079
|
-
const args = await validateTypes2({
|
|
595080
|
-
value: tool3.args,
|
|
595081
|
-
schema: webFetch_20260209ArgsSchema
|
|
595082
|
-
});
|
|
595083
|
-
anthropicTools2.push({
|
|
595084
|
-
type: "web_fetch_20260209",
|
|
595085
|
-
name: "web_fetch",
|
|
595086
|
-
max_uses: args.maxUses,
|
|
595087
|
-
allowed_domains: args.allowedDomains,
|
|
595088
|
-
blocked_domains: args.blockedDomains,
|
|
595089
|
-
citations: args.citations,
|
|
595090
|
-
max_content_tokens: args.maxContentTokens,
|
|
595091
|
-
cache_control: void 0
|
|
595092
|
-
});
|
|
595093
|
-
break;
|
|
595094
|
-
}
|
|
595095
594517
|
case "anthropic.web_search_20250305": {
|
|
595096
594518
|
const args = await validateTypes2({
|
|
595097
594519
|
value: tool3.args,
|
|
@@ -595108,24 +594530,8 @@ async function prepareTools({
|
|
|
595108
594530
|
});
|
|
595109
594531
|
break;
|
|
595110
594532
|
}
|
|
595111
|
-
case "anthropic.web_search_20260209": {
|
|
595112
|
-
betas.add("code-execution-web-tools-2026-02-09");
|
|
595113
|
-
const args = await validateTypes2({
|
|
595114
|
-
value: tool3.args,
|
|
595115
|
-
schema: webSearch_20260209ArgsSchema
|
|
595116
|
-
});
|
|
595117
|
-
anthropicTools2.push({
|
|
595118
|
-
type: "web_search_20260209",
|
|
595119
|
-
name: "web_search",
|
|
595120
|
-
max_uses: args.maxUses,
|
|
595121
|
-
allowed_domains: args.allowedDomains,
|
|
595122
|
-
blocked_domains: args.blockedDomains,
|
|
595123
|
-
user_location: args.userLocation,
|
|
595124
|
-
cache_control: void 0
|
|
595125
|
-
});
|
|
595126
|
-
break;
|
|
595127
|
-
}
|
|
595128
594533
|
case "anthropic.tool_search_regex_20251119": {
|
|
594534
|
+
betas.add("advanced-tool-use-2025-11-20");
|
|
595129
594535
|
anthropicTools2.push({
|
|
595130
594536
|
type: "tool_search_tool_regex_20251119",
|
|
595131
594537
|
name: "tool_search_tool_regex"
|
|
@@ -595133,6 +594539,7 @@ async function prepareTools({
|
|
|
595133
594539
|
break;
|
|
595134
594540
|
}
|
|
595135
594541
|
case "anthropic.tool_search_bm25_20251119": {
|
|
594542
|
+
betas.add("advanced-tool-use-2025-11-20");
|
|
595136
594543
|
anthropicTools2.push({
|
|
595137
594544
|
type: "tool_search_tool_bm25_20251119",
|
|
595138
594545
|
name: "tool_search_tool_bm25"
|
|
@@ -595270,13 +594677,13 @@ var codeExecution_20250522InputSchema = lazySchema(
|
|
|
595270
594677
|
})
|
|
595271
594678
|
)
|
|
595272
594679
|
);
|
|
595273
|
-
var
|
|
594680
|
+
var factory4 = createProviderToolFactoryWithOutputSchema({
|
|
595274
594681
|
id: "anthropic.code_execution_20250522",
|
|
595275
594682
|
inputSchema: codeExecution_20250522InputSchema,
|
|
595276
594683
|
outputSchema: codeExecution_20250522OutputSchema
|
|
595277
594684
|
});
|
|
595278
594685
|
var codeExecution_20250522 = (args = {}) => {
|
|
595279
|
-
return
|
|
594686
|
+
return factory4(args);
|
|
595280
594687
|
};
|
|
595281
594688
|
var codeExecution_20250825OutputSchema = lazySchema(
|
|
595282
594689
|
() => zodSchema3(
|
|
@@ -595371,7 +594778,7 @@ var codeExecution_20250825InputSchema = lazySchema(
|
|
|
595371
594778
|
])
|
|
595372
594779
|
)
|
|
595373
594780
|
);
|
|
595374
|
-
var
|
|
594781
|
+
var factory5 = createProviderToolFactoryWithOutputSchema({
|
|
595375
594782
|
id: "anthropic.code_execution_20250825",
|
|
595376
594783
|
inputSchema: codeExecution_20250825InputSchema,
|
|
595377
594784
|
outputSchema: codeExecution_20250825OutputSchema,
|
|
@@ -595381,120 +594788,7 @@ var factory7 = createProviderToolFactoryWithOutputSchema({
|
|
|
595381
594788
|
supportsDeferredResults: true
|
|
595382
594789
|
});
|
|
595383
594790
|
var codeExecution_20250825 = (args = {}) => {
|
|
595384
|
-
return
|
|
595385
|
-
};
|
|
595386
|
-
var codeExecution_20260120OutputSchema = lazySchema(
|
|
595387
|
-
() => zodSchema3(
|
|
595388
|
-
external_exports2.discriminatedUnion("type", [
|
|
595389
|
-
external_exports2.object({
|
|
595390
|
-
type: external_exports2.literal("code_execution_result"),
|
|
595391
|
-
stdout: external_exports2.string(),
|
|
595392
|
-
stderr: external_exports2.string(),
|
|
595393
|
-
return_code: external_exports2.number(),
|
|
595394
|
-
content: external_exports2.array(
|
|
595395
|
-
external_exports2.object({
|
|
595396
|
-
type: external_exports2.literal("code_execution_output"),
|
|
595397
|
-
file_id: external_exports2.string()
|
|
595398
|
-
})
|
|
595399
|
-
).optional().default([])
|
|
595400
|
-
}),
|
|
595401
|
-
external_exports2.object({
|
|
595402
|
-
type: external_exports2.literal("encrypted_code_execution_result"),
|
|
595403
|
-
encrypted_stdout: external_exports2.string(),
|
|
595404
|
-
stderr: external_exports2.string(),
|
|
595405
|
-
return_code: external_exports2.number(),
|
|
595406
|
-
content: external_exports2.array(
|
|
595407
|
-
external_exports2.object({
|
|
595408
|
-
type: external_exports2.literal("code_execution_output"),
|
|
595409
|
-
file_id: external_exports2.string()
|
|
595410
|
-
})
|
|
595411
|
-
).optional().default([])
|
|
595412
|
-
}),
|
|
595413
|
-
external_exports2.object({
|
|
595414
|
-
type: external_exports2.literal("bash_code_execution_result"),
|
|
595415
|
-
content: external_exports2.array(
|
|
595416
|
-
external_exports2.object({
|
|
595417
|
-
type: external_exports2.literal("bash_code_execution_output"),
|
|
595418
|
-
file_id: external_exports2.string()
|
|
595419
|
-
})
|
|
595420
|
-
),
|
|
595421
|
-
stdout: external_exports2.string(),
|
|
595422
|
-
stderr: external_exports2.string(),
|
|
595423
|
-
return_code: external_exports2.number()
|
|
595424
|
-
}),
|
|
595425
|
-
external_exports2.object({
|
|
595426
|
-
type: external_exports2.literal("bash_code_execution_tool_result_error"),
|
|
595427
|
-
error_code: external_exports2.string()
|
|
595428
|
-
}),
|
|
595429
|
-
external_exports2.object({
|
|
595430
|
-
type: external_exports2.literal("text_editor_code_execution_tool_result_error"),
|
|
595431
|
-
error_code: external_exports2.string()
|
|
595432
|
-
}),
|
|
595433
|
-
external_exports2.object({
|
|
595434
|
-
type: external_exports2.literal("text_editor_code_execution_view_result"),
|
|
595435
|
-
content: external_exports2.string(),
|
|
595436
|
-
file_type: external_exports2.string(),
|
|
595437
|
-
num_lines: external_exports2.number().nullable(),
|
|
595438
|
-
start_line: external_exports2.number().nullable(),
|
|
595439
|
-
total_lines: external_exports2.number().nullable()
|
|
595440
|
-
}),
|
|
595441
|
-
external_exports2.object({
|
|
595442
|
-
type: external_exports2.literal("text_editor_code_execution_create_result"),
|
|
595443
|
-
is_file_update: external_exports2.boolean()
|
|
595444
|
-
}),
|
|
595445
|
-
external_exports2.object({
|
|
595446
|
-
type: external_exports2.literal("text_editor_code_execution_str_replace_result"),
|
|
595447
|
-
lines: external_exports2.array(external_exports2.string()).nullable(),
|
|
595448
|
-
new_lines: external_exports2.number().nullable(),
|
|
595449
|
-
new_start: external_exports2.number().nullable(),
|
|
595450
|
-
old_lines: external_exports2.number().nullable(),
|
|
595451
|
-
old_start: external_exports2.number().nullable()
|
|
595452
|
-
})
|
|
595453
|
-
])
|
|
595454
|
-
)
|
|
595455
|
-
);
|
|
595456
|
-
var codeExecution_20260120InputSchema = lazySchema(
|
|
595457
|
-
() => zodSchema3(
|
|
595458
|
-
external_exports2.discriminatedUnion("type", [
|
|
595459
|
-
external_exports2.object({
|
|
595460
|
-
type: external_exports2.literal("programmatic-tool-call"),
|
|
595461
|
-
code: external_exports2.string()
|
|
595462
|
-
}),
|
|
595463
|
-
external_exports2.object({
|
|
595464
|
-
type: external_exports2.literal("bash_code_execution"),
|
|
595465
|
-
command: external_exports2.string()
|
|
595466
|
-
}),
|
|
595467
|
-
external_exports2.discriminatedUnion("command", [
|
|
595468
|
-
external_exports2.object({
|
|
595469
|
-
type: external_exports2.literal("text_editor_code_execution"),
|
|
595470
|
-
command: external_exports2.literal("view"),
|
|
595471
|
-
path: external_exports2.string()
|
|
595472
|
-
}),
|
|
595473
|
-
external_exports2.object({
|
|
595474
|
-
type: external_exports2.literal("text_editor_code_execution"),
|
|
595475
|
-
command: external_exports2.literal("create"),
|
|
595476
|
-
path: external_exports2.string(),
|
|
595477
|
-
file_text: external_exports2.string().nullish()
|
|
595478
|
-
}),
|
|
595479
|
-
external_exports2.object({
|
|
595480
|
-
type: external_exports2.literal("text_editor_code_execution"),
|
|
595481
|
-
command: external_exports2.literal("str_replace"),
|
|
595482
|
-
path: external_exports2.string(),
|
|
595483
|
-
old_str: external_exports2.string(),
|
|
595484
|
-
new_str: external_exports2.string()
|
|
595485
|
-
})
|
|
595486
|
-
])
|
|
595487
|
-
])
|
|
595488
|
-
)
|
|
595489
|
-
);
|
|
595490
|
-
var factory8 = createProviderToolFactoryWithOutputSchema({
|
|
595491
|
-
id: "anthropic.code_execution_20260120",
|
|
595492
|
-
inputSchema: codeExecution_20260120InputSchema,
|
|
595493
|
-
outputSchema: codeExecution_20260120OutputSchema,
|
|
595494
|
-
supportsDeferredResults: true
|
|
595495
|
-
});
|
|
595496
|
-
var codeExecution_20260120 = (args = {}) => {
|
|
595497
|
-
return factory8(args);
|
|
594791
|
+
return factory5(args);
|
|
595498
594792
|
};
|
|
595499
594793
|
var toolSearchRegex_20251119OutputSchema = lazySchema(
|
|
595500
594794
|
() => zodSchema3(
|
|
@@ -595527,18 +594821,18 @@ var toolSearchRegex_20251119InputSchema = lazySchema(
|
|
|
595527
594821
|
})
|
|
595528
594822
|
)
|
|
595529
594823
|
);
|
|
595530
|
-
var
|
|
594824
|
+
var factory6 = createProviderToolFactoryWithOutputSchema({
|
|
595531
594825
|
id: "anthropic.tool_search_regex_20251119",
|
|
595532
594826
|
inputSchema: toolSearchRegex_20251119InputSchema,
|
|
595533
594827
|
outputSchema: toolSearchRegex_20251119OutputSchema,
|
|
595534
594828
|
supportsDeferredResults: true
|
|
595535
594829
|
});
|
|
595536
594830
|
var toolSearchRegex_20251119 = (args = {}) => {
|
|
595537
|
-
return
|
|
594831
|
+
return factory6(args);
|
|
595538
594832
|
};
|
|
595539
594833
|
function convertToString(data3) {
|
|
595540
594834
|
if (typeof data3 === "string") {
|
|
595541
|
-
return
|
|
594835
|
+
return Buffer.from(data3, "base64").toString("utf-8");
|
|
595542
594836
|
}
|
|
595543
594837
|
if (data3 instanceof Uint8Array) {
|
|
595544
594838
|
return new TextDecoder().decode(data3);
|
|
@@ -595568,7 +594862,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
595568
594862
|
cacheControlValidator,
|
|
595569
594863
|
toolNameMapping
|
|
595570
594864
|
}) {
|
|
595571
|
-
var _a21, _b17, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r
|
|
594865
|
+
var _a21, _b17, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
595572
594866
|
const betas = /* @__PURE__ */ new Set();
|
|
595573
594867
|
const blocks = groupIntoBlocks(prompt);
|
|
595574
594868
|
const validator = cacheControlValidator || new CacheControlValidator();
|
|
@@ -596006,8 +595300,8 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
596006
595300
|
break;
|
|
596007
595301
|
}
|
|
596008
595302
|
const callerOptions = (_l = part.providerOptions) == null ? void 0 : _l.anthropic;
|
|
596009
|
-
const caller = (callerOptions == null ? void 0 : callerOptions.caller) ?
|
|
596010
|
-
type:
|
|
595303
|
+
const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? callerOptions.caller.type === "code_execution_20250825" && callerOptions.caller.toolId ? {
|
|
595304
|
+
type: "code_execution_20250825",
|
|
596011
595305
|
tool_id: callerOptions.caller.toolId
|
|
596012
595306
|
} : callerOptions.caller.type === "direct" ? { type: "direct" } : void 0 : void 0;
|
|
596013
595307
|
anthropicContent.push({
|
|
@@ -596106,25 +595400,6 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
596106
595400
|
},
|
|
596107
595401
|
cache_control: cacheControl
|
|
596108
595402
|
});
|
|
596109
|
-
} else if (output.value.type === "encrypted_code_execution_result") {
|
|
596110
|
-
const codeExecutionOutput = await validateTypes2({
|
|
596111
|
-
value: output.value,
|
|
596112
|
-
schema: codeExecution_20260120OutputSchema
|
|
596113
|
-
});
|
|
596114
|
-
if (codeExecutionOutput.type === "encrypted_code_execution_result") {
|
|
596115
|
-
anthropicContent.push({
|
|
596116
|
-
type: "code_execution_tool_result",
|
|
596117
|
-
tool_use_id: part.toolCallId,
|
|
596118
|
-
content: {
|
|
596119
|
-
type: codeExecutionOutput.type,
|
|
596120
|
-
encrypted_stdout: codeExecutionOutput.encrypted_stdout,
|
|
596121
|
-
stderr: codeExecutionOutput.stderr,
|
|
596122
|
-
return_code: codeExecutionOutput.return_code,
|
|
596123
|
-
content: (_p = codeExecutionOutput.content) != null ? _p : []
|
|
596124
|
-
},
|
|
596125
|
-
cache_control: cacheControl
|
|
596126
|
-
});
|
|
596127
|
-
}
|
|
596128
595403
|
} else {
|
|
596129
595404
|
const codeExecutionOutput = await validateTypes2({
|
|
596130
595405
|
value: output.value,
|
|
@@ -596139,7 +595414,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
596139
595414
|
stdout: codeExecutionOutput.stdout,
|
|
596140
595415
|
stderr: codeExecutionOutput.stderr,
|
|
596141
595416
|
return_code: codeExecutionOutput.return_code,
|
|
596142
|
-
content: (
|
|
595417
|
+
content: (_p = codeExecutionOutput.content) != null ? _p : []
|
|
596143
595418
|
},
|
|
596144
595419
|
cache_control: cacheControl
|
|
596145
595420
|
});
|
|
@@ -596172,9 +595447,9 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
596172
595447
|
errorValue = output.value;
|
|
596173
595448
|
}
|
|
596174
595449
|
} catch (e) {
|
|
596175
|
-
const extractedErrorCode = (
|
|
595450
|
+
const extractedErrorCode = (_q = output.value) == null ? void 0 : _q.errorCode;
|
|
596176
595451
|
errorValue = {
|
|
596177
|
-
errorCode: typeof extractedErrorCode === "string" ? extractedErrorCode : "
|
|
595452
|
+
errorCode: typeof extractedErrorCode === "string" ? extractedErrorCode : "unknown"
|
|
596178
595453
|
};
|
|
596179
595454
|
}
|
|
596180
595455
|
anthropicContent.push({
|
|
@@ -596182,7 +595457,7 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
596182
595457
|
tool_use_id: part.toolCallId,
|
|
596183
595458
|
content: {
|
|
596184
595459
|
type: "web_fetch_tool_result_error",
|
|
596185
|
-
error_code: (
|
|
595460
|
+
error_code: (_r = errorValue.errorCode) != null ? _r : "unknown"
|
|
596186
595461
|
},
|
|
596187
595462
|
cache_control: cacheControl
|
|
596188
595463
|
});
|
|
@@ -596455,7 +595730,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596455
595730
|
providerOptions,
|
|
596456
595731
|
stream: stream5
|
|
596457
595732
|
}) {
|
|
596458
|
-
var _a21, _b17, _c, _d, _e, _f
|
|
595733
|
+
var _a21, _b17, _c, _d, _e, _f;
|
|
596459
595734
|
const warnings = [];
|
|
596460
595735
|
if (frequencyPenalty != null) {
|
|
596461
595736
|
warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
|
|
@@ -596510,39 +595785,10 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596510
595785
|
const {
|
|
596511
595786
|
maxOutputTokens: maxOutputTokensForModel,
|
|
596512
595787
|
supportsStructuredOutput: modelSupportsStructuredOutput,
|
|
596513
|
-
rejectsSamplingParameters,
|
|
596514
595788
|
isKnownModel
|
|
596515
595789
|
} = getModelCapabilities(this.modelId);
|
|
596516
|
-
if (rejectsSamplingParameters) {
|
|
596517
|
-
if (temperature != null) {
|
|
596518
|
-
warnings.push({
|
|
596519
|
-
type: "unsupported",
|
|
596520
|
-
feature: "temperature",
|
|
596521
|
-
details: `temperature is not supported by ${this.modelId} and will be ignored`
|
|
596522
|
-
});
|
|
596523
|
-
temperature = void 0;
|
|
596524
|
-
}
|
|
596525
|
-
if (topK != null) {
|
|
596526
|
-
warnings.push({
|
|
596527
|
-
type: "unsupported",
|
|
596528
|
-
feature: "topK",
|
|
596529
|
-
details: `topK is not supported by ${this.modelId} and will be ignored`
|
|
596530
|
-
});
|
|
596531
|
-
topK = void 0;
|
|
596532
|
-
}
|
|
596533
|
-
if (topP != null) {
|
|
596534
|
-
warnings.push({
|
|
596535
|
-
type: "unsupported",
|
|
596536
|
-
feature: "topP",
|
|
596537
|
-
details: `topP is not supported by ${this.modelId} and will be ignored`
|
|
596538
|
-
});
|
|
596539
|
-
topP = void 0;
|
|
596540
|
-
}
|
|
596541
|
-
}
|
|
596542
|
-
const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
|
|
596543
595790
|
const supportsStructuredOutput = ((_a21 = this.config.supportsNativeStructuredOutput) != null ? _a21 : true) && modelSupportsStructuredOutput;
|
|
596544
|
-
const
|
|
596545
|
-
const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
|
|
595791
|
+
const structureOutputMode = (_b17 = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _b17 : "auto";
|
|
596546
595792
|
const useStructuredOutput = structureOutputMode === "outputFormat" || structureOutputMode === "auto" && supportsStructuredOutput;
|
|
596547
595793
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useStructuredOutput ? {
|
|
596548
595794
|
type: "function",
|
|
@@ -596557,7 +595803,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596557
595803
|
providerToolNames: {
|
|
596558
595804
|
"anthropic.code_execution_20250522": "code_execution",
|
|
596559
595805
|
"anthropic.code_execution_20250825": "code_execution",
|
|
596560
|
-
"anthropic.code_execution_20260120": "code_execution",
|
|
596561
595806
|
"anthropic.computer_20241022": "computer",
|
|
596562
595807
|
"anthropic.computer_20250124": "computer",
|
|
596563
595808
|
"anthropic.text_editor_20241022": "str_replace_editor",
|
|
@@ -596568,24 +595813,21 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596568
595813
|
"anthropic.bash_20250124": "bash",
|
|
596569
595814
|
"anthropic.memory_20250818": "memory",
|
|
596570
595815
|
"anthropic.web_search_20250305": "web_search",
|
|
596571
|
-
"anthropic.web_search_20260209": "web_search",
|
|
596572
595816
|
"anthropic.web_fetch_20250910": "web_fetch",
|
|
596573
|
-
"anthropic.web_fetch_20260209": "web_fetch",
|
|
596574
595817
|
"anthropic.tool_search_regex_20251119": "tool_search_tool_regex",
|
|
596575
595818
|
"anthropic.tool_search_bm25_20251119": "tool_search_tool_bm25"
|
|
596576
595819
|
}
|
|
596577
595820
|
});
|
|
596578
595821
|
const { prompt: messagesPrompt, betas } = await convertToAnthropicMessagesPrompt({
|
|
596579
595822
|
prompt,
|
|
596580
|
-
sendReasoning: (
|
|
595823
|
+
sendReasoning: (_c = anthropicOptions == null ? void 0 : anthropicOptions.sendReasoning) != null ? _c : true,
|
|
596581
595824
|
warnings,
|
|
596582
595825
|
cacheControlValidator,
|
|
596583
595826
|
toolNameMapping
|
|
596584
595827
|
});
|
|
596585
|
-
const thinkingType = (
|
|
595828
|
+
const thinkingType = (_d = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _d.type;
|
|
596586
595829
|
const isThinking = thinkingType === "enabled" || thinkingType === "adaptive";
|
|
596587
|
-
let thinkingBudget = thinkingType === "enabled" ? (
|
|
596588
|
-
const thinkingDisplay = thinkingType === "adaptive" ? (_g = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _g.display : void 0;
|
|
595830
|
+
let thinkingBudget = thinkingType === "enabled" ? (_e = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _e.budgetTokens : void 0;
|
|
596589
595831
|
const maxTokens = maxOutputTokens != null ? maxOutputTokens : maxOutputTokensForModel;
|
|
596590
595832
|
const baseArgs = {
|
|
596591
595833
|
// model id:
|
|
@@ -596600,43 +595842,21 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596600
595842
|
...isThinking && {
|
|
596601
595843
|
thinking: {
|
|
596602
595844
|
type: thinkingType,
|
|
596603
|
-
...thinkingBudget != null && { budget_tokens: thinkingBudget }
|
|
596604
|
-
...thinkingDisplay != null && { display: thinkingDisplay }
|
|
595845
|
+
...thinkingBudget != null && { budget_tokens: thinkingBudget }
|
|
596605
595846
|
}
|
|
596606
595847
|
},
|
|
596607
|
-
...(
|
|
596608
|
-
output_config: {
|
|
596609
|
-
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
596610
|
-
effort: anthropicOptions.effort
|
|
596611
|
-
},
|
|
596612
|
-
...(anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) && {
|
|
596613
|
-
task_budget: {
|
|
596614
|
-
type: anthropicOptions.taskBudget.type,
|
|
596615
|
-
total: anthropicOptions.taskBudget.total,
|
|
596616
|
-
...anthropicOptions.taskBudget.remaining != null && {
|
|
596617
|
-
remaining: anthropicOptions.taskBudget.remaining
|
|
596618
|
-
}
|
|
596619
|
-
}
|
|
596620
|
-
},
|
|
596621
|
-
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
596622
|
-
format: {
|
|
596623
|
-
type: "json_schema",
|
|
596624
|
-
schema: responseFormat.schema
|
|
596625
|
-
}
|
|
596626
|
-
}
|
|
596627
|
-
}
|
|
595848
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
595849
|
+
output_config: { effort: anthropicOptions.effort }
|
|
596628
595850
|
},
|
|
596629
595851
|
...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
|
|
596630
595852
|
speed: anthropicOptions.speed
|
|
596631
595853
|
},
|
|
596632
|
-
|
|
596633
|
-
|
|
596634
|
-
|
|
596635
|
-
|
|
596636
|
-
|
|
596637
|
-
|
|
596638
|
-
...((_h = anthropicOptions == null ? void 0 : anthropicOptions.metadata) == null ? void 0 : _h.userId) != null && {
|
|
596639
|
-
metadata: { user_id: anthropicOptions.metadata.userId }
|
|
595854
|
+
// structured output:
|
|
595855
|
+
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
595856
|
+
output_format: {
|
|
595857
|
+
type: "json_schema",
|
|
595858
|
+
schema: responseFormat.schema
|
|
595859
|
+
}
|
|
596640
595860
|
},
|
|
596641
595861
|
// mcp servers:
|
|
596642
595862
|
...(anthropicOptions == null ? void 0 : anthropicOptions.mcpServers) && anthropicOptions.mcpServers.length > 0 && {
|
|
@@ -596761,7 +595981,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596761
595981
|
}
|
|
596762
595982
|
baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
|
|
596763
595983
|
} else {
|
|
596764
|
-
if (
|
|
595984
|
+
if (topP != null && temperature != null) {
|
|
596765
595985
|
warnings.push({
|
|
596766
595986
|
type: "unsupported",
|
|
596767
595987
|
feature: "topP",
|
|
@@ -596794,7 +596014,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596794
596014
|
betas.add("skills-2025-10-02");
|
|
596795
596015
|
betas.add("files-api-2025-04-14");
|
|
596796
596016
|
if (!(tools == null ? void 0 : tools.some(
|
|
596797
|
-
(tool3) => tool3.type === "provider" &&
|
|
596017
|
+
(tool3) => tool3.type === "provider" && tool3.id === "anthropic.code_execution_20250825"
|
|
596798
596018
|
))) {
|
|
596799
596019
|
warnings.push({
|
|
596800
596020
|
type: "other",
|
|
@@ -596805,13 +596025,16 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596805
596025
|
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
596806
596026
|
betas.add("effort-2025-11-24");
|
|
596807
596027
|
}
|
|
596808
|
-
if (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) {
|
|
596809
|
-
betas.add("task-budgets-2026-03-13");
|
|
596810
|
-
}
|
|
596811
596028
|
if ((anthropicOptions == null ? void 0 : anthropicOptions.speed) === "fast") {
|
|
596812
596029
|
betas.add("fast-mode-2026-02-01");
|
|
596813
596030
|
}
|
|
596814
|
-
|
|
596031
|
+
if (stream5 && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
|
|
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
|
+
}
|
|
596815
596038
|
const {
|
|
596816
596039
|
tools: anthropicTools2,
|
|
596817
596040
|
toolChoice: anthropicToolChoice,
|
|
@@ -596823,17 +596046,13 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596823
596046
|
toolChoice: { type: "required" },
|
|
596824
596047
|
disableParallelToolUse: true,
|
|
596825
596048
|
cacheControlValidator,
|
|
596826
|
-
supportsStructuredOutput: false
|
|
596827
|
-
supportsStrictTools,
|
|
596828
|
-
defaultEagerInputStreaming
|
|
596049
|
+
supportsStructuredOutput: false
|
|
596829
596050
|
} : {
|
|
596830
596051
|
tools: tools != null ? tools : [],
|
|
596831
596052
|
toolChoice,
|
|
596832
596053
|
disableParallelToolUse: anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse,
|
|
596833
596054
|
cacheControlValidator,
|
|
596834
|
-
supportsStructuredOutput
|
|
596835
|
-
supportsStrictTools,
|
|
596836
|
-
defaultEagerInputStreaming
|
|
596055
|
+
supportsStructuredOutput
|
|
596837
596056
|
}
|
|
596838
596057
|
);
|
|
596839
596058
|
const cacheWarnings = cacheControlValidator.getWarnings();
|
|
@@ -596846,12 +596065,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596846
596065
|
// do not send when not streaming
|
|
596847
596066
|
},
|
|
596848
596067
|
warnings: [...warnings, ...toolWarnings, ...cacheWarnings],
|
|
596849
|
-
betas: /* @__PURE__ */ new Set([
|
|
596850
|
-
...betas,
|
|
596851
|
-
...toolsBetas,
|
|
596852
|
-
...userSuppliedBetas,
|
|
596853
|
-
...(_j = anthropicOptions == null ? void 0 : anthropicOptions.anthropicBeta) != null ? _j : []
|
|
596854
|
-
]),
|
|
596068
|
+
betas: /* @__PURE__ */ new Set([...betas, ...toolsBetas, ...userSuppliedBetas]),
|
|
596855
596069
|
usesJsonResponseTool: jsonResponseTool != null,
|
|
596856
596070
|
toolNameMapping,
|
|
596857
596071
|
providerOptionsName,
|
|
@@ -596884,9 +596098,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596884
596098
|
var _a21, _b17, _c;
|
|
596885
596099
|
return (_c = (_b17 = (_a21 = this.config).buildRequestUrl) == null ? void 0 : _b17.call(_a21, this.config.baseURL, isStreaming)) != null ? _c : `${this.config.baseURL}/messages`;
|
|
596886
596100
|
}
|
|
596887
|
-
transformRequestBody(args
|
|
596101
|
+
transformRequestBody(args) {
|
|
596888
596102
|
var _a21, _b17, _c;
|
|
596889
|
-
return (_c = (_b17 = (_a21 = this.config).transformRequestBody) == null ? void 0 : _b17.call(_a21, args
|
|
596103
|
+
return (_c = (_b17 = (_a21 = this.config).transformRequestBody) == null ? void 0 : _b17.call(_a21, args)) != null ? _c : args;
|
|
596890
596104
|
}
|
|
596891
596105
|
extractCitationDocuments(prompt) {
|
|
596892
596106
|
const isCitationPart = (part) => {
|
|
@@ -596912,7 +596126,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596912
596126
|
});
|
|
596913
596127
|
}
|
|
596914
596128
|
async doGenerate(options8) {
|
|
596915
|
-
var _a21, _b17, _c, _d, _e, _f
|
|
596129
|
+
var _a21, _b17, _c, _d, _e, _f;
|
|
596916
596130
|
const {
|
|
596917
596131
|
args,
|
|
596918
596132
|
warnings,
|
|
@@ -596929,9 +596143,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596929
596143
|
const citationDocuments = [
|
|
596930
596144
|
...this.extractCitationDocuments(options8.prompt)
|
|
596931
596145
|
];
|
|
596932
|
-
const markCodeExecutionDynamic = hasWebTool20260209WithoutCodeExecution(
|
|
596933
|
-
args.tools
|
|
596934
|
-
);
|
|
596935
596146
|
const {
|
|
596936
596147
|
responseHeaders,
|
|
596937
596148
|
value: response,
|
|
@@ -596939,7 +596150,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
596939
596150
|
} = await postJsonToApi2({
|
|
596940
596151
|
url: this.buildRequestUrl(false),
|
|
596941
596152
|
headers: await this.getHeaders({ betas, headers: options8.headers }),
|
|
596942
|
-
body: this.transformRequestBody(args
|
|
596153
|
+
body: this.transformRequestBody(args),
|
|
596943
596154
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
596944
596155
|
successfulResponseHandler: createJsonResponseHandler(
|
|
596945
596156
|
anthropicMessagesResponseSchema
|
|
@@ -597053,10 +596264,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597053
596264
|
toolCallId: part.id,
|
|
597054
596265
|
toolName: toolNameMapping.toCustomToolName(part.name),
|
|
597055
596266
|
input: JSON.stringify(inputToSerialize),
|
|
597056
|
-
providerExecuted: true
|
|
597057
|
-
// We want this 'code_execution' tool call to be allowed even if the tool is not explicitly provided.
|
|
597058
|
-
// Since the validation generally bypasses dynamic tools, we mark this specific tool as dynamic.
|
|
597059
|
-
...markCodeExecutionDynamic && part.name === "code_execution" ? { dynamic: true } : {}
|
|
596267
|
+
providerExecuted: true
|
|
597060
596268
|
});
|
|
597061
596269
|
} else if (part.name === "tool_search_tool_regex" || part.name === "tool_search_tool_bm25") {
|
|
597062
596270
|
serverToolCalls[part.id] = part.name;
|
|
@@ -597200,19 +596408,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597200
596408
|
content: (_c = part.content.content) != null ? _c : []
|
|
597201
596409
|
}
|
|
597202
596410
|
});
|
|
597203
|
-
} else if (part.content.type === "encrypted_code_execution_result") {
|
|
597204
|
-
content9.push({
|
|
597205
|
-
type: "tool-result",
|
|
597206
|
-
toolCallId: part.tool_use_id,
|
|
597207
|
-
toolName: toolNameMapping.toCustomToolName("code_execution"),
|
|
597208
|
-
result: {
|
|
597209
|
-
type: part.content.type,
|
|
597210
|
-
encrypted_stdout: part.content.encrypted_stdout,
|
|
597211
|
-
stderr: part.content.stderr,
|
|
597212
|
-
return_code: part.content.return_code,
|
|
597213
|
-
content: (_d = part.content.content) != null ? _d : []
|
|
597214
|
-
}
|
|
597215
|
-
});
|
|
597216
596411
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
597217
596412
|
content9.push({
|
|
597218
596413
|
type: "tool-result",
|
|
@@ -597289,13 +596484,13 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597289
596484
|
finishReason: response.stop_reason,
|
|
597290
596485
|
isJsonResponseFromTool
|
|
597291
596486
|
}),
|
|
597292
|
-
raw: (
|
|
596487
|
+
raw: (_d = response.stop_reason) != null ? _d : void 0
|
|
597293
596488
|
},
|
|
597294
596489
|
usage: convertAnthropicMessagesUsage({ usage: response.usage }),
|
|
597295
596490
|
request: { body: args },
|
|
597296
596491
|
response: {
|
|
597297
|
-
id: (
|
|
597298
|
-
modelId: (
|
|
596492
|
+
id: (_e = response.id) != null ? _e : void 0,
|
|
596493
|
+
modelId: (_f = response.model) != null ? _f : void 0,
|
|
597299
596494
|
headers: responseHeaders,
|
|
597300
596495
|
body: rawResponse
|
|
597301
596496
|
},
|
|
@@ -597352,14 +596547,11 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597352
596547
|
const citationDocuments = [
|
|
597353
596548
|
...this.extractCitationDocuments(options8.prompt)
|
|
597354
596549
|
];
|
|
597355
|
-
const markCodeExecutionDynamic = hasWebTool20260209WithoutCodeExecution(
|
|
597356
|
-
body.tools
|
|
597357
|
-
);
|
|
597358
596550
|
const url4 = this.buildRequestUrl(true);
|
|
597359
596551
|
const { responseHeaders, value: response } = await postJsonToApi2({
|
|
597360
596552
|
url: url4,
|
|
597361
596553
|
headers: await this.getHeaders({ betas, headers: options8.headers }),
|
|
597362
|
-
body: this.transformRequestBody(body
|
|
596554
|
+
body: this.transformRequestBody(body),
|
|
597363
596555
|
failedResponseHandler: anthropicFailedResponseHandler,
|
|
597364
596556
|
successfulResponseHandler: createEventSourceResponseHandler(
|
|
597365
596557
|
anthropicMessagesChunkSchema
|
|
@@ -597395,7 +596587,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597395
596587
|
controller.enqueue({ type: "stream-start", warnings });
|
|
597396
596588
|
},
|
|
597397
596589
|
transform(chunk, controller) {
|
|
597398
|
-
var _a22, _b22, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m
|
|
596590
|
+
var _a22, _b22, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
597399
596591
|
if (options8.includeRawChunks) {
|
|
597400
596592
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
597401
596593
|
}
|
|
@@ -597504,14 +596696,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597504
596696
|
].includes(part.name)) {
|
|
597505
596697
|
const providerToolName = part.name === "text_editor_code_execution" || part.name === "bash_code_execution" ? "code_execution" : part.name;
|
|
597506
596698
|
const customToolName = toolNameMapping.toCustomToolName(providerToolName);
|
|
597507
|
-
const finalInput = part.input != null && typeof part.input === "object" && Object.keys(part.input).length > 0 ? JSON.stringify(part.input) : "";
|
|
597508
596699
|
contentBlocks[value2.index] = {
|
|
597509
596700
|
type: "tool-call",
|
|
597510
596701
|
toolCallId: part.id,
|
|
597511
596702
|
toolName: customToolName,
|
|
597512
|
-
input:
|
|
596703
|
+
input: "",
|
|
597513
596704
|
providerExecuted: true,
|
|
597514
|
-
...markCodeExecutionDynamic && providerToolName === "code_execution" ? { dynamic: true } : {},
|
|
597515
596705
|
firstDelta: true,
|
|
597516
596706
|
providerToolName: part.name
|
|
597517
596707
|
};
|
|
@@ -597519,8 +596709,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597519
596709
|
type: "tool-input-start",
|
|
597520
596710
|
id: part.id,
|
|
597521
596711
|
toolName: customToolName,
|
|
597522
|
-
providerExecuted: true
|
|
597523
|
-
...markCodeExecutionDynamic && providerToolName === "code_execution" ? { dynamic: true } : {}
|
|
596712
|
+
providerExecuted: true
|
|
597524
596713
|
});
|
|
597525
596714
|
} else if (part.name === "tool_search_tool_regex" || part.name === "tool_search_tool_bm25") {
|
|
597526
596715
|
serverToolCalls[part.id] = part.name;
|
|
@@ -597645,19 +596834,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597645
596834
|
content: (_c = part.content.content) != null ? _c : []
|
|
597646
596835
|
}
|
|
597647
596836
|
});
|
|
597648
|
-
} else if (part.content.type === "encrypted_code_execution_result") {
|
|
597649
|
-
controller.enqueue({
|
|
597650
|
-
type: "tool-result",
|
|
597651
|
-
toolCallId: part.tool_use_id,
|
|
597652
|
-
toolName: toolNameMapping.toCustomToolName("code_execution"),
|
|
597653
|
-
result: {
|
|
597654
|
-
type: part.content.type,
|
|
597655
|
-
encrypted_stdout: part.content.encrypted_stdout,
|
|
597656
|
-
stderr: part.content.stderr,
|
|
597657
|
-
return_code: part.content.return_code,
|
|
597658
|
-
content: (_d = part.content.content) != null ? _d : []
|
|
597659
|
-
}
|
|
597660
|
-
});
|
|
597661
596837
|
} else if (part.content.type === "code_execution_tool_result_error") {
|
|
597662
596838
|
controller.enqueue({
|
|
597663
596839
|
type: "tool-result",
|
|
@@ -597807,7 +596983,6 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597807
596983
|
toolName: contentBlock.toolName,
|
|
597808
596984
|
input: finalInput,
|
|
597809
596985
|
providerExecuted: contentBlock.providerExecuted,
|
|
597810
|
-
...markCodeExecutionDynamic && contentBlock.providerToolName === "code_execution" ? { dynamic: true } : {},
|
|
597811
596986
|
...contentBlock.caller && {
|
|
597812
596987
|
providerMetadata: {
|
|
597813
596988
|
anthropic: {
|
|
@@ -597925,12 +597100,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597925
597100
|
}
|
|
597926
597101
|
case "message_start": {
|
|
597927
597102
|
usage.input_tokens = value2.message.usage.input_tokens;
|
|
597928
|
-
usage.cache_read_input_tokens = (
|
|
597929
|
-
usage.cache_creation_input_tokens = (
|
|
597103
|
+
usage.cache_read_input_tokens = (_d = value2.message.usage.cache_read_input_tokens) != null ? _d : 0;
|
|
597104
|
+
usage.cache_creation_input_tokens = (_e = value2.message.usage.cache_creation_input_tokens) != null ? _e : 0;
|
|
597930
597105
|
rawUsage = {
|
|
597931
597106
|
...value2.message.usage
|
|
597932
597107
|
};
|
|
597933
|
-
cacheCreationInputTokens = (
|
|
597108
|
+
cacheCreationInputTokens = (_f = value2.message.usage.cache_creation_input_tokens) != null ? _f : null;
|
|
597934
597109
|
if (value2.message.container != null) {
|
|
597935
597110
|
container = {
|
|
597936
597111
|
expiresAt: value2.message.container.expires_at,
|
|
@@ -597949,8 +597124,8 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597949
597124
|
}
|
|
597950
597125
|
controller.enqueue({
|
|
597951
597126
|
type: "response-metadata",
|
|
597952
|
-
id: (
|
|
597953
|
-
modelId: (
|
|
597127
|
+
id: (_g = value2.message.id) != null ? _g : void 0,
|
|
597128
|
+
modelId: (_h = value2.message.model) != null ? _h : void 0
|
|
597954
597129
|
});
|
|
597955
597130
|
if (value2.message.content != null) {
|
|
597956
597131
|
for (let contentIndex = 0; contentIndex < value2.message.content.length; contentIndex++) {
|
|
@@ -597966,7 +597141,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
597966
597141
|
id: part.id,
|
|
597967
597142
|
toolName: part.name
|
|
597968
597143
|
});
|
|
597969
|
-
const inputStr = JSON.stringify((
|
|
597144
|
+
const inputStr = JSON.stringify((_i = part.input) != null ? _i : {});
|
|
597970
597145
|
controller.enqueue({
|
|
597971
597146
|
type: "tool-input-delta",
|
|
597972
597147
|
id: part.id,
|
|
@@ -598014,17 +597189,17 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
598014
597189
|
finishReason: value2.delta.stop_reason,
|
|
598015
597190
|
isJsonResponseFromTool
|
|
598016
597191
|
}),
|
|
598017
|
-
raw: (
|
|
597192
|
+
raw: (_j = value2.delta.stop_reason) != null ? _j : void 0
|
|
598018
597193
|
};
|
|
598019
|
-
stopSequence = (
|
|
597194
|
+
stopSequence = (_k = value2.delta.stop_sequence) != null ? _k : null;
|
|
598020
597195
|
container = value2.delta.container != null ? {
|
|
598021
597196
|
expiresAt: value2.delta.container.expires_at,
|
|
598022
597197
|
id: value2.delta.container.id,
|
|
598023
|
-
skills: (
|
|
597198
|
+
skills: (_m = (_l = value2.delta.container.skills) == null ? void 0 : _l.map((skill) => ({
|
|
598024
597199
|
type: skill.type,
|
|
598025
597200
|
skillId: skill.skill_id,
|
|
598026
597201
|
version: skill.version
|
|
598027
|
-
}))) != null ?
|
|
597202
|
+
}))) != null ? _m : null
|
|
598028
597203
|
} : null;
|
|
598029
597204
|
if (value2.context_management) {
|
|
598030
597205
|
contextManagement = mapAnthropicResponseContextManagement(
|
|
@@ -598109,82 +597284,56 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
598109
597284
|
}
|
|
598110
597285
|
};
|
|
598111
597286
|
function getModelCapabilities(modelId) {
|
|
598112
|
-
if (modelId.includes("claude-opus-4-
|
|
598113
|
-
return {
|
|
598114
|
-
maxOutputTokens: 128e3,
|
|
598115
|
-
supportsStructuredOutput: true,
|
|
598116
|
-
rejectsSamplingParameters: true,
|
|
598117
|
-
isKnownModel: true
|
|
598118
|
-
};
|
|
598119
|
-
} else if (modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-opus-4-6")) {
|
|
597287
|
+
if (modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-opus-4-6")) {
|
|
598120
597288
|
return {
|
|
598121
597289
|
maxOutputTokens: 128e3,
|
|
598122
597290
|
supportsStructuredOutput: true,
|
|
598123
|
-
rejectsSamplingParameters: false,
|
|
598124
597291
|
isKnownModel: true
|
|
598125
597292
|
};
|
|
598126
597293
|
} else if (modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5") || modelId.includes("claude-haiku-4-5")) {
|
|
598127
597294
|
return {
|
|
598128
597295
|
maxOutputTokens: 64e3,
|
|
598129
597296
|
supportsStructuredOutput: true,
|
|
598130
|
-
rejectsSamplingParameters: false,
|
|
598131
597297
|
isKnownModel: true
|
|
598132
597298
|
};
|
|
598133
597299
|
} else if (modelId.includes("claude-opus-4-1")) {
|
|
598134
597300
|
return {
|
|
598135
597301
|
maxOutputTokens: 32e3,
|
|
598136
597302
|
supportsStructuredOutput: true,
|
|
598137
|
-
rejectsSamplingParameters: false,
|
|
598138
597303
|
isKnownModel: true
|
|
598139
597304
|
};
|
|
598140
|
-
} else if (modelId.includes("claude-sonnet-4-")) {
|
|
597305
|
+
} else if (modelId.includes("claude-sonnet-4-") || modelId.includes("claude-3-7-sonnet")) {
|
|
598141
597306
|
return {
|
|
598142
597307
|
maxOutputTokens: 64e3,
|
|
598143
597308
|
supportsStructuredOutput: false,
|
|
598144
|
-
rejectsSamplingParameters: false,
|
|
598145
597309
|
isKnownModel: true
|
|
598146
597310
|
};
|
|
598147
597311
|
} else if (modelId.includes("claude-opus-4-")) {
|
|
598148
597312
|
return {
|
|
598149
597313
|
maxOutputTokens: 32e3,
|
|
598150
597314
|
supportsStructuredOutput: false,
|
|
598151
|
-
|
|
597315
|
+
isKnownModel: true
|
|
597316
|
+
};
|
|
597317
|
+
} else if (modelId.includes("claude-3-5-haiku")) {
|
|
597318
|
+
return {
|
|
597319
|
+
maxOutputTokens: 8192,
|
|
597320
|
+
supportsStructuredOutput: false,
|
|
598152
597321
|
isKnownModel: true
|
|
598153
597322
|
};
|
|
598154
597323
|
} else if (modelId.includes("claude-3-haiku")) {
|
|
598155
597324
|
return {
|
|
598156
597325
|
maxOutputTokens: 4096,
|
|
598157
597326
|
supportsStructuredOutput: false,
|
|
598158
|
-
rejectsSamplingParameters: false,
|
|
598159
597327
|
isKnownModel: true
|
|
598160
597328
|
};
|
|
598161
597329
|
} else {
|
|
598162
597330
|
return {
|
|
598163
597331
|
maxOutputTokens: 4096,
|
|
598164
597332
|
supportsStructuredOutput: false,
|
|
598165
|
-
rejectsSamplingParameters: false,
|
|
598166
597333
|
isKnownModel: false
|
|
598167
597334
|
};
|
|
598168
597335
|
}
|
|
598169
597336
|
}
|
|
598170
|
-
function hasWebTool20260209WithoutCodeExecution(tools) {
|
|
598171
|
-
if (!tools) {
|
|
598172
|
-
return false;
|
|
598173
|
-
}
|
|
598174
|
-
let hasWebTool20260209 = false;
|
|
598175
|
-
let hasCodeExecutionTool = false;
|
|
598176
|
-
for (const tool3 of tools) {
|
|
598177
|
-
if ("type" in tool3 && (tool3.type === "web_fetch_20260209" || tool3.type === "web_search_20260209")) {
|
|
598178
|
-
hasWebTool20260209 = true;
|
|
598179
|
-
continue;
|
|
598180
|
-
}
|
|
598181
|
-
if (tool3.name === "code_execution") {
|
|
598182
|
-
hasCodeExecutionTool = true;
|
|
598183
|
-
break;
|
|
598184
|
-
}
|
|
598185
|
-
}
|
|
598186
|
-
return hasWebTool20260209 && !hasCodeExecutionTool;
|
|
598187
|
-
}
|
|
598188
597337
|
function mapAnthropicResponseContextManagement(contextManagement) {
|
|
598189
597338
|
return contextManagement ? {
|
|
598190
597339
|
appliedEdits: contextManagement.applied_edits.map((edit) => {
|
|
@@ -598453,14 +597602,14 @@ var toolSearchBm25_20251119InputSchema = lazySchema(
|
|
|
598453
597602
|
})
|
|
598454
597603
|
)
|
|
598455
597604
|
);
|
|
598456
|
-
var
|
|
597605
|
+
var factory7 = createProviderToolFactoryWithOutputSchema({
|
|
598457
597606
|
id: "anthropic.tool_search_bm25_20251119",
|
|
598458
597607
|
inputSchema: toolSearchBm25_20251119InputSchema,
|
|
598459
597608
|
outputSchema: toolSearchBm25_20251119OutputSchema,
|
|
598460
597609
|
supportsDeferredResults: true
|
|
598461
597610
|
});
|
|
598462
597611
|
var toolSearchBm25_20251119 = (args = {}) => {
|
|
598463
|
-
return
|
|
597612
|
+
return factory7(args);
|
|
598464
597613
|
};
|
|
598465
597614
|
var anthropicTools = {
|
|
598466
597615
|
/**
|
|
@@ -598497,19 +597646,6 @@ var anthropicTools = {
|
|
|
598497
597646
|
* This is the latest version with enhanced Bash support and file operations.
|
|
598498
597647
|
*/
|
|
598499
597648
|
codeExecution_20250825,
|
|
598500
|
-
/**
|
|
598501
|
-
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
598502
|
-
* run system commands, create and edit files, and process uploaded files directly within
|
|
598503
|
-
* the API conversation.
|
|
598504
|
-
*
|
|
598505
|
-
* The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
|
|
598506
|
-
* including writing code, in a secure, sandboxed environment.
|
|
598507
|
-
*
|
|
598508
|
-
* This is the recommended version. Does not require a beta header.
|
|
598509
|
-
*
|
|
598510
|
-
* Supported models: Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, Opus 4.5
|
|
598511
|
-
*/
|
|
598512
|
-
codeExecution_20260120,
|
|
598513
597649
|
/**
|
|
598514
597650
|
* Claude can interact with computer environments through the computer use tool, which
|
|
598515
597651
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -598605,16 +597741,6 @@ var anthropicTools = {
|
|
|
598605
597741
|
* @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
|
|
598606
597742
|
*/
|
|
598607
597743
|
webFetch_20250910,
|
|
598608
|
-
/**
|
|
598609
|
-
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
598610
|
-
*
|
|
598611
|
-
* @param maxUses - The max_uses parameter limits the number of web fetches performed
|
|
598612
|
-
* @param allowedDomains - Only fetch from these domains
|
|
598613
|
-
* @param blockedDomains - Never fetch from these domains
|
|
598614
|
-
* @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.
|
|
598615
|
-
* @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
|
|
598616
|
-
*/
|
|
598617
|
-
webFetch_20260209,
|
|
598618
597744
|
/**
|
|
598619
597745
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
598620
597746
|
*
|
|
@@ -598624,15 +597750,6 @@ var anthropicTools = {
|
|
|
598624
597750
|
* @param userLocation - Optional user location information to provide geographically relevant search results.
|
|
598625
597751
|
*/
|
|
598626
597752
|
webSearch_20250305,
|
|
598627
|
-
/**
|
|
598628
|
-
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
598629
|
-
*
|
|
598630
|
-
* @param maxUses - Maximum number of web searches Claude can perform during the conversation.
|
|
598631
|
-
* @param allowedDomains - Optional list of domains that Claude is allowed to search.
|
|
598632
|
-
* @param blockedDomains - Optional list of domains that Claude should avoid when searching.
|
|
598633
|
-
* @param userLocation - Optional user location information to provide geographically relevant search results.
|
|
598634
|
-
*/
|
|
598635
|
-
webSearch_20260209,
|
|
598636
597753
|
/**
|
|
598637
597754
|
* Creates a tool search tool that uses regex patterns to find tools.
|
|
598638
597755
|
*
|
|
@@ -598735,13 +597852,12 @@ var anthropic = createAnthropic();
|
|
|
598735
597852
|
// ../../../vite-plugin-file-sync/dist/ai-service/llm/impl/anthropic.js
|
|
598736
597853
|
var anthropicImpl = (settings) => {
|
|
598737
597854
|
const anthropic2 = createAnthropic(settings.anthropic);
|
|
598738
|
-
const generateBroadEditModelId = process.env.SUPERBLOCKS_EVAL_ANTHROPIC_MODEL_ID ?? "claude-sonnet-4-6";
|
|
598739
597855
|
return {
|
|
598740
|
-
explain: anthropic2("claude-
|
|
598741
|
-
classifyPrompt: anthropic2("claude-
|
|
597856
|
+
explain: anthropic2("claude-3-5-haiku-20241022"),
|
|
597857
|
+
classifyPrompt: anthropic2("claude-3-5-haiku-20241022"),
|
|
598742
597858
|
summarizeMessages: anthropic2("claude-sonnet-4-6"),
|
|
598743
597859
|
fast: anthropic2("claude-haiku-4-5-20251001"),
|
|
598744
|
-
generateBroadEdit: anthropic2(
|
|
597860
|
+
generateBroadEdit: anthropic2("claude-sonnet-4-5-20250929")
|
|
598745
597861
|
};
|
|
598746
597862
|
};
|
|
598747
597863
|
|
|
@@ -598856,7 +597972,7 @@ var PlaywrightMcpServerManager = class {
|
|
|
598856
597972
|
this.logger.info(`Starting embedded Playwright MCP server: browser=${options8?.browser || "chromium"}, headless=${options8?.headless !== false}`);
|
|
598857
597973
|
}
|
|
598858
597974
|
try {
|
|
598859
|
-
const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-
|
|
597975
|
+
const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-6GY37WOF.js");
|
|
598860
597976
|
this.server = await startEmbeddedPlaywrightMcpServer({
|
|
598861
597977
|
storageStatePath: options8?.storageStatePath,
|
|
598862
597978
|
jwt: options8?.jwt,
|
|
@@ -607160,69 +606276,7 @@ ${error40.stack ?? error40.message}
|
|
|
607160
606276
|
|
|
607161
606277
|
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/awaiting-user.js
|
|
607162
606278
|
init_cjs_shims();
|
|
607163
|
-
var import_ai15 = __toESM(require_dist9());
|
|
607164
|
-
|
|
607165
|
-
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/next-steps.js
|
|
607166
|
-
init_cjs_shims();
|
|
607167
606279
|
var import_ai14 = __toESM(require_dist9());
|
|
607168
|
-
var MAX_NEXT_STEPS = 3;
|
|
607169
|
-
var ICON_LIST = NEXT_STEPS_ICON_NAMES.join(", ");
|
|
607170
|
-
var SUMMARY_CHAR_CAP = 4e3;
|
|
607171
|
-
var truncate = (s) => s.length <= SUMMARY_CHAR_CAP ? s : `${s.slice(0, SUMMARY_CHAR_CAP)}\u2026[truncated]`;
|
|
607172
|
-
var NextStepSchema = external_exports.object({
|
|
607173
|
-
label: external_exports.string().describe("Short action title, max 6 words, starts with a verb (e.g. 'Add search and filtering')"),
|
|
607174
|
-
prompt: external_exports.string().describe("Detailed 1-2 sentence prompt that Clark would receive to build this enhancement"),
|
|
607175
|
-
icon: external_exports.enum([...NEXT_STEPS_ICON_NAMES]).optional().describe(`Lucide icon name in kebab-case from: ${ICON_LIST}`)
|
|
607176
|
-
});
|
|
607177
|
-
var NextStepsSchema = external_exports.object({
|
|
607178
|
-
nextSteps: external_exports.array(NextStepSchema).describe("3 follow-up next steps for what the user should build next")
|
|
607179
|
-
});
|
|
607180
|
-
async function getNextSteps({ model, chatSessionStore, logger: logger15, abortSignal }) {
|
|
607181
|
-
const summary = await chatSessionStore.getLatestSummary();
|
|
607182
|
-
if (!summary) {
|
|
607183
|
-
logger15?.info("[next-steps] No build summary found; skipping generation");
|
|
607184
|
-
return [];
|
|
607185
|
-
}
|
|
607186
|
-
const systemPrompt = `You are helping suggest what a user should build next with Clark (an AI app builder) after they just finished building something.
|
|
607187
|
-
|
|
607188
|
-
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.
|
|
607189
|
-
|
|
607190
|
-
Focus on:
|
|
607191
|
-
- New features that complement what was built (e.g. "Add search and filtering", "Add an export to CSV button")
|
|
607192
|
-
- Performance and UX improvements (e.g. "Add loading states and pagination", "Add dark mode support")
|
|
607193
|
-
- Data and workflow enhancements (e.g. "Add edit and delete functionality", "Add role-based access control")
|
|
607194
|
-
|
|
607195
|
-
Do NOT suggest generic improvements \u2014 be specific to the app that was built.
|
|
607196
|
-
Every suggestion must be different from each other. Vary the categories.
|
|
607197
|
-
|
|
607198
|
-
For each suggestion, pick ONE icon from this list: ${ICON_LIST}`;
|
|
607199
|
-
const prompt = `WHAT CLARK JUST BUILT:
|
|
607200
|
-
${truncate(summary.summary)}`;
|
|
607201
|
-
logger15?.info("[next-steps] Starting next-steps LLM generation");
|
|
607202
|
-
let nextSteps = [];
|
|
607203
|
-
try {
|
|
607204
|
-
const { object: result } = await llmobs_default.trace({ name: "nextSteps.generate", kind: "llm" }, async () => {
|
|
607205
|
-
return await (0, import_ai14.generateObject)({
|
|
607206
|
-
model,
|
|
607207
|
-
schema: NextStepsSchema,
|
|
607208
|
-
system: systemPrompt,
|
|
607209
|
-
prompt,
|
|
607210
|
-
abortSignal
|
|
607211
|
-
});
|
|
607212
|
-
});
|
|
607213
|
-
nextSteps = result.nextSteps;
|
|
607214
|
-
logger15?.info("[next-steps] Next-steps LLM generation succeeded", {
|
|
607215
|
-
count: nextSteps.length
|
|
607216
|
-
});
|
|
607217
|
-
} catch (error40) {
|
|
607218
|
-
logger15?.warn("[next-steps] Next-steps LLM generation failed; returning empty", {
|
|
607219
|
-
error: error40 instanceof Error ? error40.message : String(error40)
|
|
607220
|
-
});
|
|
607221
|
-
}
|
|
607222
|
-
return nextSteps.slice(0, MAX_NEXT_STEPS);
|
|
607223
|
-
}
|
|
607224
|
-
|
|
607225
|
-
// ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/awaiting-user.js
|
|
607226
606280
|
function createWorkflowSummary(promptId, workflowMetrics) {
|
|
607227
606281
|
const completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
607228
606282
|
const startedAt = workflowMetrics.workflowStartedAt;
|
|
@@ -607265,53 +606319,6 @@ async function checkPromptCost(promptId, workflowMetrics, chatSessionStore, prom
|
|
|
607265
606319
|
var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProfiler, features }) => {
|
|
607266
606320
|
const sendUsergenerationState = sendUserGenerationStateChannel(clark);
|
|
607267
606321
|
const sendUserMessage = sendUserMessageChannel(clark, chatSessionStore);
|
|
607268
|
-
const emitNextSteps = async () => {
|
|
607269
|
-
const abortSignal = clark.context.abortController?.signal;
|
|
607270
|
-
const startedAt = performance.now();
|
|
607271
|
-
let stepCount = 0;
|
|
607272
|
-
let caughtError;
|
|
607273
|
-
try {
|
|
607274
|
-
if (abortSignal?.aborted)
|
|
607275
|
-
return;
|
|
607276
|
-
clark.logger.info("[awaiting-user] emitNextSteps starting");
|
|
607277
|
-
const model = llmProvider.modelForTask("summarizeMessages");
|
|
607278
|
-
const nextSteps = await getNextSteps({
|
|
607279
|
-
model,
|
|
607280
|
-
chatSessionStore,
|
|
607281
|
-
logger: clark.logger,
|
|
607282
|
-
abortSignal
|
|
607283
|
-
});
|
|
607284
|
-
stepCount = nextSteps.length;
|
|
607285
|
-
if (abortSignal?.aborted)
|
|
607286
|
-
return;
|
|
607287
|
-
if (nextSteps.length > 0) {
|
|
607288
|
-
await sendUserMessage({
|
|
607289
|
-
type: "next_steps",
|
|
607290
|
-
text: "",
|
|
607291
|
-
nextSteps
|
|
607292
|
-
}, 0, false, { persistBeforeDeliver: true });
|
|
607293
|
-
}
|
|
607294
|
-
} catch (err) {
|
|
607295
|
-
caughtError = err;
|
|
607296
|
-
} finally {
|
|
607297
|
-
const durationMs = Math.round((performance.now() - startedAt) * 100) / 100;
|
|
607298
|
-
const aborted2 = abortSignal?.aborted === true;
|
|
607299
|
-
if (caughtError) {
|
|
607300
|
-
clark.logger.warn("[awaiting-user] Next steps generation failed; skipping", {
|
|
607301
|
-
durationMs,
|
|
607302
|
-
stepCount,
|
|
607303
|
-
aborted: aborted2,
|
|
607304
|
-
error: caughtError instanceof Error ? { name: caughtError.name, message: caughtError.message } : String(caughtError)
|
|
607305
|
-
});
|
|
607306
|
-
} else {
|
|
607307
|
-
clark.logger.info("[awaiting-user] emitNextSteps completed", {
|
|
607308
|
-
durationMs,
|
|
607309
|
-
stepCount,
|
|
607310
|
-
aborted: aborted2
|
|
607311
|
-
});
|
|
607312
|
-
}
|
|
607313
|
-
}
|
|
607314
|
-
};
|
|
607315
606322
|
return async ({ event }) => {
|
|
607316
606323
|
switch (event.type) {
|
|
607317
606324
|
case AGENT_NEEDS_USER_INPUT: {
|
|
@@ -607365,16 +606372,13 @@ var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProf
|
|
|
607365
606372
|
willTriggerUpload: hasSuggestions,
|
|
607366
606373
|
currentMode: clark.context.currentMode
|
|
607367
606374
|
});
|
|
606375
|
+
signals.emit("generationCompleted", hasSuggestions);
|
|
607368
606376
|
await clarkProfiler?.endSession();
|
|
607369
606377
|
const { promptId, workflowMetrics } = clark.context;
|
|
607370
606378
|
if (promptId && workflowMetrics) {
|
|
607371
606379
|
await checkPromptCost(promptId, workflowMetrics, chatSessionStore, features.promptUsageAlarmThreshold, clark.logger);
|
|
607372
606380
|
await chatSessionStore.submitWorkflowSummary(createWorkflowSummary(promptId, workflowMetrics));
|
|
607373
606381
|
}
|
|
607374
|
-
if (features.suggestWhatsNext) {
|
|
607375
|
-
await emitNextSteps();
|
|
607376
|
-
}
|
|
607377
|
-
signals.emit("generationCompleted", hasSuggestions);
|
|
607378
606382
|
void sendUsergenerationState({
|
|
607379
606383
|
state: AiGenerationState.COMPLETED,
|
|
607380
606384
|
hasSuggestions: true
|
|
@@ -607387,6 +606391,7 @@ var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProf
|
|
|
607387
606391
|
hasSuggestions,
|
|
607388
606392
|
willTriggerUpload: hasSuggestions
|
|
607389
606393
|
});
|
|
606394
|
+
signals.emit("generationCompleted", hasSuggestions);
|
|
607390
606395
|
await clarkProfiler?.endSession();
|
|
607391
606396
|
const { promptId, workflowMetrics } = clark.context;
|
|
607392
606397
|
if (promptId && workflowMetrics) {
|
|
@@ -607425,10 +606430,6 @@ var doAwaitingUser = (clark, { signals, chatSessionStore, llmProvider, clarkProf
|
|
|
607425
606430
|
}
|
|
607426
606431
|
}
|
|
607427
606432
|
}
|
|
607428
|
-
if (features.suggestWhatsNext) {
|
|
607429
|
-
await emitNextSteps();
|
|
607430
|
-
}
|
|
607431
|
-
signals.emit("generationCompleted", hasSuggestions);
|
|
607432
606433
|
void sendUsergenerationState({
|
|
607433
606434
|
state: AiGenerationState.COMPLETED,
|
|
607434
606435
|
hasSuggestions
|
|
@@ -607473,7 +606474,7 @@ Please create a BRIEF summary that:
|
|
|
607473
606474
|
Create a summary of what was accomplished:`;
|
|
607474
606475
|
const model = llmProvider.modelForTask("summarizeMessages");
|
|
607475
606476
|
const summary = await traceLLM("getFinalSummary", model.modelId, model.provider, async () => {
|
|
607476
|
-
return (0,
|
|
606477
|
+
return (0, import_ai14.generateText)({
|
|
607477
606478
|
model,
|
|
607478
606479
|
prompt,
|
|
607479
606480
|
abortSignal
|
|
@@ -607757,35 +606758,25 @@ Here are some examples (not exhaustive) that you should consider when building a
|
|
|
607757
606758
|
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.
|
|
607758
606759
|
2. **Loading State Hierarchy**:
|
|
607759
606760
|
- No data yet (\`loading\`) \u2192 Full skeleton placeholder
|
|
607760
|
-
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a
|
|
606761
|
+
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a loading overlay (e.g. reduced opacity, inline spinner)
|
|
607761
606762
|
- Error state (\`isError\`) \u2192 Show error with retry option, optionally keep stale data visible
|
|
607762
606763
|
3. **Debounce Rapid Requests**: Prevent multiple API calls in short succession
|
|
607763
606764
|
4. **Use useApiData for automatic refetching**: \`useApiData\` auto-refetches when inputs change and supports \`staleTime\`, \`refetchOnWindowFocus\`, and \`refetchOnReconnect\` options.
|
|
607764
606765
|
|
|
607765
606766
|
\`\`\`tsx
|
|
607766
|
-
// \u2705 CORRECT \u2014
|
|
606767
|
+
// \u2705 CORRECT \u2014 loading indicator when filters change
|
|
607767
606768
|
const { data, loading, fetching, isError, error } = useApiData("GetOrders", { status: statusFilter, search });
|
|
607768
606769
|
|
|
607769
606770
|
if (loading) return <Skeleton />; // First load: full skeleton
|
|
607770
606771
|
if (isError) return <ErrorBanner error={error} />;
|
|
607771
606772
|
return (
|
|
607772
|
-
<div>
|
|
607773
|
-
{
|
|
607774
|
-
<div className={fetching ? "opacity-70" : ""}>
|
|
607775
|
-
<OrderTable orders={data.orders} /> {/* Dimmed but still interactive */}
|
|
607776
|
-
</div>
|
|
606773
|
+
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
606774
|
+
<OrderTable orders={data.orders} /> {/* Keep showing data during refetch */}
|
|
607777
606775
|
</div>
|
|
607778
606776
|
);
|
|
607779
606777
|
\`\`\`
|
|
607780
606778
|
|
|
607781
606779
|
\`\`\`tsx
|
|
607782
|
-
// \u274C WRONG \u2014 pointer-events-none disables the table, making it feel broken
|
|
607783
|
-
return (
|
|
607784
|
-
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
607785
|
-
<OrderTable orders={data.orders} />
|
|
607786
|
-
</div>
|
|
607787
|
-
);
|
|
607788
|
-
|
|
607789
606780
|
// \u274C WRONG \u2014 no loading indicator when filters change. User sees stale data with no feedback.
|
|
607790
606781
|
const { data, loading } = useApiData("GetOrders", { status: statusFilter, search });
|
|
607791
606782
|
|
|
@@ -608254,35 +607245,25 @@ Here are some examples (not exhaustive) that you should consider when building a
|
|
|
608254
607245
|
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.
|
|
608255
607246
|
2. **Loading State Hierarchy**:
|
|
608256
607247
|
- No data yet (\`loading\`) \u2192 Full skeleton placeholder
|
|
608257
|
-
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a
|
|
607248
|
+
- Has data, refetching (\`fetching\` && !\`loading\`) \u2192 Keep showing current data with a loading overlay (e.g. reduced opacity, inline spinner)
|
|
608258
607249
|
- Error state (\`isError\`) \u2192 Show error with retry option, optionally keep stale data visible
|
|
608259
607250
|
3. **Debounce Rapid Requests**: Prevent multiple API calls in short succession
|
|
608260
607251
|
4. **Use useApiData for automatic refetching**: \`useApiData\` auto-refetches when inputs change and supports \`staleTime\`, \`refetchOnWindowFocus\`, and \`refetchOnReconnect\` options.
|
|
608261
607252
|
|
|
608262
607253
|
\`\`\`tsx
|
|
608263
|
-
// \u2705 CORRECT \u2014
|
|
607254
|
+
// \u2705 CORRECT \u2014 loading indicator when filters change
|
|
608264
607255
|
const { data, loading, fetching, isError, error } = useApiData("GetOrders", { status: statusFilter, search });
|
|
608265
607256
|
|
|
608266
607257
|
if (loading) return <Skeleton />; // First load: full skeleton
|
|
608267
607258
|
if (isError) return <ErrorBanner error={error} />;
|
|
608268
607259
|
return (
|
|
608269
|
-
<div>
|
|
608270
|
-
{
|
|
608271
|
-
<div className={fetching ? "opacity-70" : ""}>
|
|
608272
|
-
<OrderTable orders={data.orders} /> {/* Dimmed but still interactive */}
|
|
608273
|
-
</div>
|
|
607260
|
+
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
607261
|
+
<OrderTable orders={data.orders} /> {/* Keep showing data during refetch */}
|
|
608274
607262
|
</div>
|
|
608275
607263
|
);
|
|
608276
607264
|
\`\`\`
|
|
608277
607265
|
|
|
608278
607266
|
\`\`\`tsx
|
|
608279
|
-
// \u274C WRONG \u2014 pointer-events-none disables the table, making it feel broken
|
|
608280
|
-
return (
|
|
608281
|
-
<div className={fetching ? "opacity-50 pointer-events-none" : ""}>
|
|
608282
|
-
<OrderTable orders={data.orders} />
|
|
608283
|
-
</div>
|
|
608284
|
-
);
|
|
608285
|
-
|
|
608286
607267
|
// \u274C WRONG \u2014 no loading indicator when filters change. User sees stale data with no feedback.
|
|
608287
607268
|
const { data, loading } = useApiData("GetOrders", { status: statusFilter, search });
|
|
608288
607269
|
|
|
@@ -611354,7 +610335,7 @@ ${diagnostics.join("\n")}`);
|
|
|
611354
610335
|
|
|
611355
610336
|
// ../../../vite-plugin-file-sync/dist/ai-service/agent/tools2/tools/web-fetch.js
|
|
611356
610337
|
init_cjs_shims();
|
|
611357
|
-
var
|
|
610338
|
+
var import_ai15 = __toESM(require_dist9());
|
|
611358
610339
|
var import_turndown = __toESM(require_turndown_cjs());
|
|
611359
610340
|
var WebFetchResponseSchema = external_exports.object({
|
|
611360
610341
|
content: external_exports.string().describe("The extracted information as plain markdown text (NOT JSON). Use markdown formatting for headers, lists, bold, etc.")
|
|
@@ -611505,7 +610486,7 @@ Examples:
|
|
|
611505
610486
|
}
|
|
611506
610487
|
const truncatedContent = truncateContent(markdown, MAX_CONTENT_LENGTH);
|
|
611507
610488
|
const model = llmProvider.modelForTask("fast");
|
|
611508
|
-
const { object: result } = await (0,
|
|
610489
|
+
const { object: result } = await (0, import_ai15.generateObject)({
|
|
611509
610490
|
model,
|
|
611510
610491
|
schema: WebFetchResponseSchema,
|
|
611511
610492
|
system: WEB_FETCH_SYSTEM_PROMPT,
|
|
@@ -632828,7 +631809,7 @@ var buildTools = async (clark, services) => {
|
|
|
632828
631809
|
init_cjs_shims();
|
|
632829
631810
|
function hasToolSuccess(toolName, maxAttempts = 5) {
|
|
632830
631811
|
return ({ steps }) => {
|
|
632831
|
-
const hasSuccess = steps[steps.length - 1]?.toolResults?.some((toolResult) => toolResult.toolName === toolName
|
|
631812
|
+
const hasSuccess = steps[steps.length - 1]?.toolResults?.some((toolResult) => toolResult.toolName === toolName) ?? false;
|
|
632832
631813
|
if (hasSuccess) {
|
|
632833
631814
|
return true;
|
|
632834
631815
|
}
|
|
@@ -633424,14 +632405,13 @@ var doLLMGenerating = (clark, services) => {
|
|
|
633424
632405
|
if (chunk.type === "tool-result") {
|
|
633425
632406
|
const isOpenIntegrationTool = chunk.toolName === "openExistingIntegration" || chunk.toolName === "openIntegrationSetup";
|
|
633426
632407
|
const isUpdateIntegrationTool = chunk.toolName === "updateIntegrationFields";
|
|
633427
|
-
if (chunk.toolName === "askMultiChoice" || chunk.toolName === "askSearchableDropdown") {
|
|
632408
|
+
if (chunk.toolName === "askMultiChoice" || chunk.toolName === "askSearchableDropdown" || isOpenIntegrationTool || isUpdateIntegrationTool) {
|
|
633428
632409
|
shouldTransitionToAwaitingUser = true;
|
|
633429
632410
|
}
|
|
633430
632411
|
if (isOpenIntegrationTool || isUpdateIntegrationTool) {
|
|
633431
632412
|
const output = getToolResultOutputObject(chunk.output);
|
|
633432
632413
|
const success2 = output?.success === true;
|
|
633433
632414
|
if (success2) {
|
|
633434
|
-
shouldTransitionToAwaitingUser = true;
|
|
633435
632415
|
const sendInteractiveMessage = sendInteractiveMessageChannel(clark, services.chatSessionStore);
|
|
633436
632416
|
const payload = {
|
|
633437
632417
|
type: "multi_choice",
|
|
@@ -636160,10 +635140,6 @@ var FLAG_DEFINITIONS = {
|
|
|
636160
635140
|
key: "ai.clark-delete-package-lock.enabled",
|
|
636161
635141
|
schema: zod_default.boolean()
|
|
636162
635142
|
},
|
|
636163
|
-
suggestWhatsNext: {
|
|
636164
|
-
key: "ai.suggest-whats-next",
|
|
636165
|
-
schema: zod_default.boolean()
|
|
636166
|
-
},
|
|
636167
635143
|
integrationSetupEnabled: {
|
|
636168
635144
|
key: "clark.integration-setup.enabled",
|
|
636169
635145
|
schema: zod_default.boolean()
|
|
@@ -636815,7 +635791,7 @@ var AiService = class extends import_shared40.TracedEventEmitter {
|
|
|
636815
635791
|
try {
|
|
636816
635792
|
const streamResult = await this.llmClient.streamText({
|
|
636817
635793
|
model,
|
|
636818
|
-
stopWhen: (0,
|
|
635794
|
+
stopWhen: (0, import_ai16.hasToolCall)(explainCodeFinalize.name),
|
|
636819
635795
|
tools: {
|
|
636820
635796
|
build_readFile,
|
|
636821
635797
|
explainCodeFinalize
|
|
@@ -637133,7 +636109,7 @@ ${apiSourceCode.slice(0, 2e3)}
|
|
|
637133
636109
|
const timeoutId = setTimeout(() => timeoutController.abort(), timeout);
|
|
637134
636110
|
try {
|
|
637135
636111
|
const contentPart = this.attachmentToContentPart(attachment);
|
|
637136
|
-
const { object: result } = await (0,
|
|
636112
|
+
const { object: result } = await (0, import_ai16.generateObject)({
|
|
637137
636113
|
model,
|
|
637138
636114
|
schema: LabelAttachmentSchema,
|
|
637139
636115
|
messages: [
|
|
@@ -640542,26 +639518,6 @@ function createSocketRecordingMiddleware(recorder) {
|
|
|
640542
639518
|
};
|
|
640543
639519
|
}
|
|
640544
639520
|
|
|
640545
|
-
// ../../../vite-plugin-file-sync/dist/git-log.js
|
|
640546
|
-
init_cjs_shims();
|
|
640547
|
-
var SEP = "<<SEP>>";
|
|
640548
|
-
var GIT_LOG_FORMAT = ["%H", "%P", "%s", "%an", "%aI"].join(SEP);
|
|
640549
|
-
function parseGitLog(raw2) {
|
|
640550
|
-
if (!raw2.trim())
|
|
640551
|
-
return [];
|
|
640552
|
-
return raw2.trimEnd().split("\n").map((line3) => {
|
|
640553
|
-
const parts = line3.split(SEP);
|
|
640554
|
-
const parents2 = (parts[1] ?? "").split(" ").filter((sha) => sha.length > 0);
|
|
640555
|
-
return {
|
|
640556
|
-
sha: parts[0] ?? "",
|
|
640557
|
-
parents: parents2,
|
|
640558
|
-
message: parts[2] ?? "",
|
|
640559
|
-
author: parts[3] ?? "",
|
|
640560
|
-
date: parts[4] ?? ""
|
|
640561
|
-
};
|
|
640562
|
-
});
|
|
640563
|
-
}
|
|
640564
|
-
|
|
640565
639521
|
// ../../../vite-plugin-file-sync/dist/git-service/azure-devops-workflow.js
|
|
640566
639522
|
init_cjs_shims();
|
|
640567
639523
|
var import_shared53 = __toESM(require_dist2());
|
|
@@ -640678,21 +639634,6 @@ async function ensureLiveBranchCheckedOut(gitService) {
|
|
|
640678
639634
|
currentBranch: currentBranch || "(detached)",
|
|
640679
639635
|
targetBranch: import_shared57.SUPERBLOCKS_LIVE_GIT_BRANCH
|
|
640680
639636
|
});
|
|
640681
|
-
try {
|
|
640682
|
-
await gitService.fetch("origin", import_shared57.SUPERBLOCKS_LIVE_GIT_BRANCH);
|
|
640683
|
-
} catch (fetchErr) {
|
|
640684
|
-
const classified = classifyGitError(fetchErr);
|
|
640685
|
-
if (classified instanceof GitAuthError || classified instanceof GitPermissionError) {
|
|
640686
|
-
throw classified;
|
|
640687
|
-
}
|
|
640688
|
-
logger15.warn("[git] live branch fetch failed, proceeding with local ref", {
|
|
640689
|
-
gitCategory: "branch",
|
|
640690
|
-
gitOperation: "checkout-live-branch",
|
|
640691
|
-
gitOutcome: "fetch_failed",
|
|
640692
|
-
branch: import_shared57.SUPERBLOCKS_LIVE_GIT_BRANCH,
|
|
640693
|
-
...getErrorMeta2(fetchErr)
|
|
640694
|
-
});
|
|
640695
|
-
}
|
|
640696
639637
|
try {
|
|
640697
639638
|
await gitService.revparse(`origin/${import_shared57.SUPERBLOCKS_LIVE_GIT_BRANCH}`);
|
|
640698
639639
|
await gitService.checkoutOrCreate(import_shared57.SUPERBLOCKS_LIVE_GIT_BRANCH, `origin/${import_shared57.SUPERBLOCKS_LIVE_GIT_BRANCH}`);
|
|
@@ -641052,7 +639993,6 @@ var SocketManager = class extends import_shared58.TracedEventEmitter {
|
|
|
641052
639993
|
aiCancel: [
|
|
641053
639994
|
async () => {
|
|
641054
639995
|
await aiService?.handleUserCanceled();
|
|
641055
|
-
await syncService?.reportDraftStateToServer(false);
|
|
641056
639996
|
}
|
|
641057
639997
|
],
|
|
641058
639998
|
aiNotifyIntegrationSetupClosed: [
|
|
@@ -641580,14 +640520,26 @@ var SocketManager = class extends import_shared58.TracedEventEmitter {
|
|
|
641580
640520
|
});
|
|
641581
640521
|
}
|
|
641582
640522
|
}
|
|
640523
|
+
const SEP = "<<SEP>>";
|
|
640524
|
+
const format4 = ["%H", "%s", "%an", "%aI"].join(SEP);
|
|
641583
640525
|
const raw2 = await readyGitService.raw([
|
|
641584
640526
|
"log",
|
|
641585
640527
|
logRef,
|
|
641586
|
-
`--format=${
|
|
640528
|
+
`--format=${format4}`,
|
|
641587
640529
|
`-n`,
|
|
641588
640530
|
String(limit)
|
|
641589
640531
|
]);
|
|
641590
|
-
|
|
640532
|
+
if (!raw2.trim())
|
|
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
|
+
});
|
|
641591
640543
|
}
|
|
641592
640544
|
],
|
|
641593
640545
|
gitPrepareMainCommit: [
|
|
@@ -659802,7 +658754,7 @@ var require_ignore3 = __commonJS3({
|
|
|
659802
658754
|
return this._test(path152, this._testCache, true);
|
|
659803
658755
|
}
|
|
659804
658756
|
};
|
|
659805
|
-
var
|
|
658757
|
+
var factory9 = (options8) => new Ignore2(options8);
|
|
659806
658758
|
var isPathValid = (path152) => checkPath(path152 && checkPath.convert(path152), path152, RETURN_FALSE);
|
|
659807
658759
|
var setupWindows = () => {
|
|
659808
658760
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
@@ -659816,8 +658768,8 @@ var require_ignore3 = __commonJS3({
|
|
|
659816
658768
|
) {
|
|
659817
658769
|
setupWindows();
|
|
659818
658770
|
}
|
|
659819
|
-
module2.exports =
|
|
659820
|
-
|
|
658771
|
+
module2.exports = factory9;
|
|
658772
|
+
factory9.default = factory9;
|
|
659821
658773
|
module2.exports.isPathValid = isPathValid;
|
|
659822
658774
|
define2(module2.exports, Symbol.for("setupWindows"), setupWindows);
|
|
659823
658775
|
}
|
|
@@ -663211,7 +662163,7 @@ var parseYaml3;
|
|
|
663211
662163
|
async function loadYaml(file2) {
|
|
663212
662164
|
const content9 = await read_file_default(file2);
|
|
663213
662165
|
if (!parseYaml3) {
|
|
663214
|
-
({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-
|
|
662166
|
+
({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-P2AMYUL3.js"));
|
|
663215
662167
|
}
|
|
663216
662168
|
try {
|
|
663217
662169
|
return parseYaml3(content9);
|
|
@@ -668605,7 +667557,7 @@ function createParsersAndPrinters(modules) {
|
|
|
668605
667557
|
}
|
|
668606
667558
|
var estreePlugin = createParsersAndPrinters([
|
|
668607
667559
|
{
|
|
668608
|
-
importPlugin: () => import("./estree-
|
|
667560
|
+
importPlugin: () => import("./estree-M5XOW65K.js"),
|
|
668609
667561
|
printers: ["estree", "estree-json"]
|
|
668610
667562
|
}
|
|
668611
667563
|
]);
|
|
@@ -668629,11 +667581,11 @@ var languages = [
|
|
|
668629
667581
|
];
|
|
668630
667582
|
var { parsers: parsers12, printers } = createParsersAndPrinters([
|
|
668631
667583
|
{
|
|
668632
|
-
importPlugin: () => import("./acorn-
|
|
667584
|
+
importPlugin: () => import("./acorn-QRHEJZ4Y.js"),
|
|
668633
667585
|
parsers: ["acorn", "espree"]
|
|
668634
667586
|
},
|
|
668635
667587
|
{
|
|
668636
|
-
importPlugin: () => import("./angular-
|
|
667588
|
+
importPlugin: () => import("./angular-E7FCGLEO.js"),
|
|
668637
667589
|
parsers: [
|
|
668638
667590
|
"__ng_action",
|
|
668639
667591
|
"__ng_binding",
|
|
@@ -668642,7 +667594,7 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
|
|
|
668642
667594
|
]
|
|
668643
667595
|
},
|
|
668644
667596
|
{
|
|
668645
|
-
importPlugin: () => import("./babel-
|
|
667597
|
+
importPlugin: () => import("./babel-XU2VNNSQ.js"),
|
|
668646
667598
|
parsers: [
|
|
668647
667599
|
"babel",
|
|
668648
667600
|
"babel-flow",
|
|
@@ -668661,44 +667613,44 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
|
|
|
668661
667613
|
]
|
|
668662
667614
|
},
|
|
668663
667615
|
{
|
|
668664
|
-
importPlugin: () => import("./flow-
|
|
667616
|
+
importPlugin: () => import("./flow-L3D4WX3Z.js"),
|
|
668665
667617
|
parsers: ["flow"]
|
|
668666
667618
|
},
|
|
668667
667619
|
{
|
|
668668
|
-
importPlugin: () => import("./glimmer-
|
|
667620
|
+
importPlugin: () => import("./glimmer-LUDC5QNV.js"),
|
|
668669
667621
|
parsers: ["glimmer"],
|
|
668670
667622
|
printers: ["glimmer"]
|
|
668671
667623
|
},
|
|
668672
667624
|
{
|
|
668673
|
-
importPlugin: () => import("./graphql-
|
|
667625
|
+
importPlugin: () => import("./graphql-VIZ3REIC.js"),
|
|
668674
667626
|
parsers: ["graphql"],
|
|
668675
667627
|
printers: ["graphql"]
|
|
668676
667628
|
},
|
|
668677
667629
|
{
|
|
668678
|
-
importPlugin: () => import("./html-
|
|
667630
|
+
importPlugin: () => import("./html-I6EAKISS.js"),
|
|
668679
667631
|
parsers: ["html", "angular", "vue", "lwc", "mjml"],
|
|
668680
667632
|
printers: ["html"]
|
|
668681
667633
|
},
|
|
668682
667634
|
{
|
|
668683
|
-
importPlugin: () => import("./markdown-
|
|
667635
|
+
importPlugin: () => import("./markdown-STBGDZM6.js"),
|
|
668684
667636
|
parsers: ["markdown", "mdx", "remark"],
|
|
668685
667637
|
printers: ["mdast"]
|
|
668686
667638
|
},
|
|
668687
667639
|
{
|
|
668688
|
-
importPlugin: () => import("./meriyah-
|
|
667640
|
+
importPlugin: () => import("./meriyah-65T7PG5O.js"),
|
|
668689
667641
|
parsers: ["meriyah"]
|
|
668690
667642
|
},
|
|
668691
667643
|
{
|
|
668692
|
-
importPlugin: () => import("./postcss-
|
|
667644
|
+
importPlugin: () => import("./postcss-ASIVSSN2.js"),
|
|
668693
667645
|
parsers: ["css", "less", "scss"],
|
|
668694
667646
|
printers: ["postcss"]
|
|
668695
667647
|
},
|
|
668696
667648
|
{
|
|
668697
|
-
importPlugin: () => import("./typescript-
|
|
667649
|
+
importPlugin: () => import("./typescript-ZZIEC5OF.js"),
|
|
668698
667650
|
parsers: ["typescript"]
|
|
668699
667651
|
},
|
|
668700
667652
|
{
|
|
668701
|
-
importPlugin: () => import("./yaml-
|
|
667653
|
+
importPlugin: () => import("./yaml-P2AMYUL3.js"),
|
|
668702
667654
|
parsers: ["yaml"],
|
|
668703
667655
|
printers: ["yaml"]
|
|
668704
667656
|
}
|
|
@@ -676103,7 +675055,7 @@ var test = (fn, ...args) => {
|
|
|
676103
675055
|
return false;
|
|
676104
675056
|
}
|
|
676105
675057
|
};
|
|
676106
|
-
var
|
|
675058
|
+
var factory8 = (env2) => {
|
|
676107
675059
|
env2 = utils_default.merge.call({
|
|
676108
675060
|
skipUndefined: true
|
|
676109
675061
|
}, globalFetchAPI, env2);
|
|
@@ -676287,7 +675239,7 @@ var getFetch = (config4) => {
|
|
|
676287
675239
|
while (i--) {
|
|
676288
675240
|
seed = seeds[i];
|
|
676289
675241
|
target = map3.get(seed);
|
|
676290
|
-
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() :
|
|
675242
|
+
target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() : factory8(env2));
|
|
676291
675243
|
map3 = target;
|
|
676292
675244
|
}
|
|
676293
675245
|
return target;
|
|
@@ -680528,7 +679480,7 @@ async function upgradeCliWithPackageManager(pm, targetVersion, alias) {
|
|
|
680528
679480
|
clearCliVersionCache({ version: targetVersion, alias });
|
|
680529
679481
|
logger14.info(`Successfully upgraded packages to ${targetVersion}`);
|
|
680530
679482
|
}
|
|
680531
|
-
async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgrade = false
|
|
679483
|
+
async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgrade = false) {
|
|
680532
679484
|
let cliUpdated = false;
|
|
680533
679485
|
let hasFailedToUpgrade = false;
|
|
680534
679486
|
const upgradePromises = [];
|
|
@@ -680590,7 +679542,7 @@ async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgra
|
|
|
680590
679542
|
return;
|
|
680591
679543
|
}
|
|
680592
679544
|
try {
|
|
680593
|
-
if (
|
|
679545
|
+
if ((cliNeedsUpgrade || forceUpgrade) && currentCliInfo) {
|
|
680594
679546
|
const cliUpgradePromise = (0, import_shared70.traceFunction)({
|
|
680595
679547
|
name: "upgradeCli",
|
|
680596
679548
|
tracer: tracer2,
|
|
@@ -680650,8 +679602,6 @@ async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgra
|
|
|
680650
679602
|
init_cjs_shims();
|
|
680651
679603
|
var import_cors = __toESM(require_lib51(), 1);
|
|
680652
679604
|
var import_express = __toESM(require_express2(), 1);
|
|
680653
|
-
import * as child_process3 from "node:child_process";
|
|
680654
|
-
import { existsSync as existsSync4 } from "node:fs";
|
|
680655
679605
|
import net from "node:net";
|
|
680656
679606
|
import os6 from "node:os";
|
|
680657
679607
|
import path73 from "node:path";
|
|
@@ -680720,7 +679670,7 @@ function getJwksUriWithBaseUrl(superblocksBaseUrl) {
|
|
|
680720
679670
|
return jwksUri;
|
|
680721
679671
|
}
|
|
680722
679672
|
var httpServer;
|
|
680723
|
-
async function createDevServer({ root: root3, mode, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, logger: loggerOverride, port, sdk, superblocksBaseUrl: explicitBaseUrl
|
|
679673
|
+
async function createDevServer({ root: root3, mode, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, logger: loggerOverride, port, sdk, superblocksBaseUrl: explicitBaseUrl }) {
|
|
680724
679674
|
const logger15 = getLogger2(loggerOverride);
|
|
680725
679675
|
if (httpServer) {
|
|
680726
679676
|
logger15.debug("Dev server already running");
|
|
@@ -680747,8 +679697,6 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
680747
679697
|
viteResolve = resolve9;
|
|
680748
679698
|
viteReject = reject;
|
|
680749
679699
|
});
|
|
680750
|
-
vitePromise.catch(() => {
|
|
680751
|
-
});
|
|
680752
679700
|
async function gracefulShutdown({ logger: logger16, serverInitiated, switchingTo, initiatedByEmail }) {
|
|
680753
679701
|
try {
|
|
680754
679702
|
await lockService?.shutdown({
|
|
@@ -680895,14 +679843,43 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
680895
679843
|
return;
|
|
680896
679844
|
}
|
|
680897
679845
|
}
|
|
680898
|
-
logger15.info("
|
|
680899
|
-
|
|
680900
|
-
|
|
679846
|
+
logger15.info("Initializing dev server...");
|
|
679847
|
+
if (isViteServerInitialized) {
|
|
679848
|
+
logger15.info("Dev server already initialized");
|
|
680901
679849
|
res.send(JSON.stringify(healthResponse));
|
|
680902
|
-
|
|
680903
|
-
logger15.error("Vite server failed to initialize", getErrorMeta(e));
|
|
680904
|
-
res.status(500).send(JSON.stringify({ error: "Dev server failed to initialize" }));
|
|
679850
|
+
return;
|
|
680905
679851
|
}
|
|
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
|
+
});
|
|
680906
679883
|
});
|
|
680907
679884
|
app.post("/_sb_disconnect", authHandler, async (req, res) => {
|
|
680908
679885
|
logger15.info("Disconnecting dev server...");
|
|
@@ -680925,8 +679902,6 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
680925
679902
|
viteResolve = resolve9;
|
|
680926
679903
|
viteReject = reject;
|
|
680927
679904
|
});
|
|
680928
|
-
vitePromise.catch(() => {
|
|
680929
|
-
});
|
|
680930
679905
|
isViteServerInitialized = false;
|
|
680931
679906
|
}
|
|
680932
679907
|
res.send("ok");
|
|
@@ -680967,95 +679942,8 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
680967
679942
|
timeSinceLastActivityMs: lockService.timeSinceLastActivity
|
|
680968
679943
|
});
|
|
680969
679944
|
} else {
|
|
680970
|
-
|
|
680971
|
-
|
|
680972
|
-
connectedUsers: [],
|
|
680973
|
-
timeSinceLastActivityMs: Number.MAX_SAFE_INTEGER
|
|
680974
|
-
});
|
|
680975
|
-
}
|
|
680976
|
-
});
|
|
680977
|
-
let persistInProgress = false;
|
|
680978
|
-
app.post("/_sb_persist", authHandler, async (req, res) => {
|
|
680979
|
-
if (persistInProgress) {
|
|
680980
|
-
res.status(409).json({ error: "persist already in progress" });
|
|
680981
|
-
return;
|
|
680982
|
-
}
|
|
680983
|
-
persistInProgress = true;
|
|
680984
|
-
const persistStart = Date.now();
|
|
680985
|
-
try {
|
|
680986
|
-
const { uploadURL } = req.body;
|
|
680987
|
-
if (!uploadURL) {
|
|
680988
|
-
res.status(400).json({ error: "uploadURL required" });
|
|
680989
|
-
return;
|
|
680990
|
-
}
|
|
680991
|
-
logger15.info("/_sb_persist: archiving and uploading workspace to S3...");
|
|
680992
|
-
const archive = await new Promise((resolveArchive, rejectArchive) => {
|
|
680993
|
-
const tarProc = child_process3.spawn("tar", [
|
|
680994
|
-
"cf",
|
|
680995
|
-
"-",
|
|
680996
|
-
"--exclude",
|
|
680997
|
-
".git",
|
|
680998
|
-
"--exclude",
|
|
680999
|
-
"node_modules/.cache",
|
|
681000
|
-
"--exclude",
|
|
681001
|
-
".superblocks",
|
|
681002
|
-
"-C",
|
|
681003
|
-
process.cwd(),
|
|
681004
|
-
"."
|
|
681005
|
-
], { stdio: ["ignore", "pipe", "pipe"] });
|
|
681006
|
-
const zstdProc = child_process3.spawn("zstd", ["-1", "--no-progress"], {
|
|
681007
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
681008
|
-
});
|
|
681009
|
-
tarProc.stdout.pipe(zstdProc.stdin);
|
|
681010
|
-
zstdProc.stdin.on("error", (err) => {
|
|
681011
|
-
rejectArchive(new Error(`zstd stdin stream error: ${err.message}`));
|
|
681012
|
-
});
|
|
681013
|
-
const chunks = [];
|
|
681014
|
-
zstdProc.stdout.on("data", (chunk) => chunks.push(chunk));
|
|
681015
|
-
let stderr = "";
|
|
681016
|
-
tarProc.stderr.on("data", (chunk) => {
|
|
681017
|
-
stderr += chunk.toString();
|
|
681018
|
-
});
|
|
681019
|
-
zstdProc.stderr.on("data", (chunk) => {
|
|
681020
|
-
stderr += chunk.toString();
|
|
681021
|
-
});
|
|
681022
|
-
let tarExitCode = null;
|
|
681023
|
-
tarProc.on("close", (code2) => {
|
|
681024
|
-
tarExitCode = code2;
|
|
681025
|
-
});
|
|
681026
|
-
zstdProc.on("close", (code2) => {
|
|
681027
|
-
if (code2 !== 0) {
|
|
681028
|
-
rejectArchive(new Error(`zstd compression failed (code ${code2}): ${stderr}`));
|
|
681029
|
-
} else if (tarExitCode !== null && tarExitCode !== 0) {
|
|
681030
|
-
rejectArchive(new Error(`tar archival failed (code ${tarExitCode}): ${stderr}`));
|
|
681031
|
-
} else {
|
|
681032
|
-
resolveArchive(Buffer.concat(chunks));
|
|
681033
|
-
}
|
|
681034
|
-
});
|
|
681035
|
-
tarProc.on("error", rejectArchive);
|
|
681036
|
-
zstdProc.on("error", rejectArchive);
|
|
681037
|
-
});
|
|
681038
|
-
logger15.info(`/_sb_persist: archive created (${(archive.length / 1024 / 1024).toFixed(1)}MB) in ${Date.now() - persistStart}ms, uploading...`);
|
|
681039
|
-
const uploadStart = Date.now();
|
|
681040
|
-
const uploadResp = await fetch(uploadURL, {
|
|
681041
|
-
method: "PUT",
|
|
681042
|
-
body: archive,
|
|
681043
|
-
headers: {
|
|
681044
|
-
"Content-Type": "application/zstd",
|
|
681045
|
-
"Content-Length": String(archive.length)
|
|
681046
|
-
},
|
|
681047
|
-
signal: AbortSignal.timeout(3e4)
|
|
681048
|
-
});
|
|
681049
|
-
if (!uploadResp.ok) {
|
|
681050
|
-
throw new Error(`S3 upload failed: ${uploadResp.status} ${uploadResp.statusText}`);
|
|
681051
|
-
}
|
|
681052
|
-
logger15.info(`/_sb_persist: uploaded in ${Date.now() - uploadStart}ms (total ${Date.now() - persistStart}ms)`);
|
|
681053
|
-
res.status(200).json({ status: "uploaded" });
|
|
681054
|
-
} catch (error40) {
|
|
681055
|
-
logger15.error(`/_sb_persist failed: ${error40}`);
|
|
681056
|
-
res.status(500).json({ error: String(error40) });
|
|
681057
|
-
} finally {
|
|
681058
|
-
persistInProgress = false;
|
|
679945
|
+
logger15.error("Lock service not found, rejecting request");
|
|
679946
|
+
viteReject(new Error("Lock service not found, rejecting request"));
|
|
681059
679947
|
}
|
|
681060
679948
|
});
|
|
681061
679949
|
process.on("SIGINT", async () => {
|
|
@@ -681077,52 +679965,9 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
|
|
|
681077
679965
|
process.exit(1);
|
|
681078
679966
|
});
|
|
681079
679967
|
});
|
|
681080
|
-
|
|
681081
|
-
|
|
681082
|
-
|
|
681083
|
-
httpServer = existingServer;
|
|
681084
|
-
logger15.info(`Attached full dev server to existing HTTP server on port ${port}`);
|
|
681085
|
-
} else {
|
|
681086
|
-
logger15.info(`Starting HTTP server on port ${port}`);
|
|
681087
|
-
httpServer = await app.listen(port);
|
|
681088
|
-
logger15.info(`HTTP server started successfully on port ${port}`);
|
|
681089
|
-
}
|
|
681090
|
-
if (!isViteServerInitialized) {
|
|
681091
|
-
isViteServerInitialized = true;
|
|
681092
|
-
logger15.info("Eagerly starting vite server...");
|
|
681093
|
-
const featureFlags = await sdk?.getFeatureFlagsForCurrentUser().catch((err) => {
|
|
681094
|
-
logger15.warn(`Failed to fetch feature flags, using defaults: ${err}`);
|
|
681095
|
-
return void 0;
|
|
681096
|
-
});
|
|
681097
|
-
const viteStartPromise = startVite({
|
|
681098
|
-
port,
|
|
681099
|
-
app,
|
|
681100
|
-
root: root3,
|
|
681101
|
-
mode,
|
|
681102
|
-
fsOperationQueue,
|
|
681103
|
-
syncService,
|
|
681104
|
-
lockService,
|
|
681105
|
-
aiService,
|
|
681106
|
-
gitService,
|
|
681107
|
-
activateGitService,
|
|
681108
|
-
snapshotManager,
|
|
681109
|
-
checkAuthorization,
|
|
681110
|
-
logger: loggerOverride,
|
|
681111
|
-
httpServer,
|
|
681112
|
-
superblocksBaseUrl: explicitBaseUrl || localToken?.superblocksBaseUrl,
|
|
681113
|
-
features: {
|
|
681114
|
-
enableSessionRecording: featureFlags?.enableSessionRecording() ?? false
|
|
681115
|
-
}
|
|
681116
|
-
});
|
|
681117
|
-
viteStartPromise.then((result) => {
|
|
681118
|
-
logger15.info("Vite server initialized eagerly");
|
|
681119
|
-
viteResolve();
|
|
681120
|
-
viteCreationResults = result;
|
|
681121
|
-
}, (e) => {
|
|
681122
|
-
logger15.error("Error initializing vite server", getErrorMeta(e));
|
|
681123
|
-
viteReject(e);
|
|
681124
|
-
});
|
|
681125
|
-
}
|
|
679968
|
+
logger15.info(`Starting HTTP server on port ${port}`);
|
|
679969
|
+
httpServer = await app.listen(port);
|
|
679970
|
+
logger15.info(`HTTP server started successfully on port ${port}`);
|
|
681126
679971
|
return httpServer;
|
|
681127
679972
|
}
|
|
681128
679973
|
async function startVite({ app, httpServer: httpServer2, root: root3, mode, port, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, checkAuthorization, logger: loggerOverride, superblocksBaseUrl, features }) {
|
|
@@ -681271,32 +680116,6 @@ async function startVite({ app, httpServer: httpServer2, root: root3, mode, port
|
|
|
681271
680116
|
}
|
|
681272
680117
|
});
|
|
681273
680118
|
}
|
|
681274
|
-
async function preWarmViteCache(root3) {
|
|
681275
|
-
const start = Date.now();
|
|
681276
|
-
console.log("[warm] Pre-warming Vite dependency cache...");
|
|
681277
|
-
try {
|
|
681278
|
-
const server = await createServer({
|
|
681279
|
-
root: root3,
|
|
681280
|
-
mode: "development",
|
|
681281
|
-
server: { middlewareMode: true, hmr: false },
|
|
681282
|
-
plugins: [src_default()],
|
|
681283
|
-
logLevel: "warn",
|
|
681284
|
-
optimizeDeps: { noDiscovery: true }
|
|
681285
|
-
});
|
|
681286
|
-
const depsDir = path73.join(root3, "node_modules", ".vite", "deps");
|
|
681287
|
-
const maxWaitMs = 5e3;
|
|
681288
|
-
const pollMs = 50;
|
|
681289
|
-
const deadline = Date.now() + maxWaitMs;
|
|
681290
|
-
while (!existsSync4(depsDir) && Date.now() < deadline) {
|
|
681291
|
-
await new Promise((r2) => setTimeout(r2, pollMs));
|
|
681292
|
-
}
|
|
681293
|
-
await server.close();
|
|
681294
|
-
const cached2 = existsSync4(depsDir);
|
|
681295
|
-
console.log(`[warm] Vite cache ${cached2 ? "warmed" : "not committed (timed out)"} in ${Date.now() - start}ms`);
|
|
681296
|
-
} catch (error40) {
|
|
681297
|
-
console.warn(`[warm] Vite cache pre-warm failed (non-fatal, ${Date.now() - start}ms):`, error40);
|
|
681298
|
-
}
|
|
681299
|
-
}
|
|
681300
680119
|
var DEFAULT_HMR_PORT = 24678;
|
|
681301
680120
|
function getFreePort() {
|
|
681302
680121
|
return new Promise((resolve9) => {
|
|
@@ -681436,7 +680255,7 @@ async function fetchAndWriteApplication({ resourceId, viewMode, featureFlags, pr
|
|
|
681436
680255
|
|
|
681437
680256
|
// ../sdk/dist/cli-replacement/socket-utils.mjs
|
|
681438
680257
|
init_cjs_shims();
|
|
681439
|
-
import { existsSync as
|
|
680258
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
681440
680259
|
import * as fs41 from "node:fs/promises";
|
|
681441
680260
|
import * as net2 from "node:net";
|
|
681442
680261
|
import * as os7 from "node:os";
|
|
@@ -681484,7 +680303,7 @@ async function getAllSocketFiles() {
|
|
|
681484
680303
|
}
|
|
681485
680304
|
async function getSocketFileForPid(pid) {
|
|
681486
680305
|
const socketPath = path74.join(getSocketDirectory(), `superblocks-auth-${pid}.sock`);
|
|
681487
|
-
return
|
|
680306
|
+
return existsSync4(socketPath) ? socketPath : null;
|
|
681488
680307
|
}
|
|
681489
680308
|
async function cleanupSocketFile(socketPath) {
|
|
681490
680309
|
try {
|
|
@@ -681527,7 +680346,7 @@ async function isSocketAlive(socketPath) {
|
|
|
681527
680346
|
// ../sdk/dist/cli-replacement/dev.mjs
|
|
681528
680347
|
init_cjs_shims();
|
|
681529
680348
|
init_esm();
|
|
681530
|
-
import * as
|
|
680349
|
+
import * as child_process3 from "node:child_process";
|
|
681531
680350
|
import * as nodeFs from "node:fs/promises";
|
|
681532
680351
|
import path76 from "node:path";
|
|
681533
680352
|
import * as readline2 from "node:readline";
|
|
@@ -681723,7 +680542,7 @@ async function ensureRemoteHasDefaultBranch(git, remoteUrl) {
|
|
|
681723
680542
|
}
|
|
681724
680543
|
|
|
681725
680544
|
// ../sdk/dist/cli-replacement/dev.mjs
|
|
681726
|
-
var exec10 = promisify7(
|
|
680545
|
+
var exec10 = promisify7(child_process3.exec);
|
|
681727
680546
|
var passErrorToVSCode = (message, logger15) => {
|
|
681728
680547
|
if (message && process.env.SUPERBLOCKS_VSCODE === "true") {
|
|
681729
680548
|
logger15.error(`clierr: ${JSON.stringify({ message })}`);
|
|
@@ -681813,7 +680632,7 @@ async function handleLockConflict(error40, lockSvc, span, logger15) {
|
|
|
681813
680632
|
}
|
|
681814
680633
|
async function readPkgJson(cwd) {
|
|
681815
680634
|
try {
|
|
681816
|
-
const { readPackage } = await import("./read-pkg-
|
|
680635
|
+
const { readPackage } = await import("./read-pkg-MWZA3RU5.js");
|
|
681817
680636
|
return await readPackage({ cwd });
|
|
681818
680637
|
} catch {
|
|
681819
680638
|
return null;
|
|
@@ -681855,7 +680674,6 @@ var DevServerAutoUpgradeMode;
|
|
|
681855
680674
|
(function(DevServerAutoUpgradeMode2) {
|
|
681856
680675
|
DevServerAutoUpgradeMode2["SKIP"] = "skip-upgrade";
|
|
681857
680676
|
DevServerAutoUpgradeMode2["FORCE"] = "force-upgrade";
|
|
681858
|
-
DevServerAutoUpgradeMode2["SKIP_CLI_ONLY"] = "skip-cli-only";
|
|
681859
680677
|
})(DevServerAutoUpgradeMode || (DevServerAutoUpgradeMode = {}));
|
|
681860
680678
|
async function dev(options8) {
|
|
681861
680679
|
const { cwd, tokenConfig, devServerPort, skipSync, applicationConfig, autoUpgradeMode, tokenManager, authHotReloadServer, sdk } = options8;
|
|
@@ -681870,7 +680688,6 @@ async function dev(options8) {
|
|
|
681870
680688
|
const tracer4 = getTracer();
|
|
681871
680689
|
const logger15 = getLogger2(options8.logger);
|
|
681872
680690
|
const skipAutoUpgrade = autoUpgradeMode === DevServerAutoUpgradeMode.SKIP;
|
|
681873
|
-
const skipCliUpgrade = skipAutoUpgrade || autoUpgradeMode === DevServerAutoUpgradeMode.SKIP_CLI_ONLY;
|
|
681874
680691
|
await tracer4.startActiveSpan("devServerStartup", async (startupSpan) => {
|
|
681875
680692
|
try {
|
|
681876
680693
|
if (!import_fs_extra5.default.existsSync(path76.join(cwd, "node_modules"))) {
|
|
@@ -682088,8 +680905,7 @@ async function dev(options8) {
|
|
|
682088
680905
|
let hasCliUpdated = false;
|
|
682089
680906
|
let upgradePromises = [];
|
|
682090
680907
|
const forceUpgrade = options8.autoUpgradeMode === DevServerAutoUpgradeMode.FORCE;
|
|
682091
|
-
|
|
682092
|
-
if (!skipAutoUpgrade || forceUpgrade || skipCliOnly) {
|
|
680908
|
+
if (!skipAutoUpgrade || forceUpgrade) {
|
|
682093
680909
|
await tracer4.startActiveSpan("versionCheckAndUpgrade", async (span) => {
|
|
682094
680910
|
if (lockService) {
|
|
682095
680911
|
const applicationConfigWithTokenConfigAndUserInfo = {
|
|
@@ -682101,7 +680917,7 @@ async function dev(options8) {
|
|
|
682101
680917
|
organizationId: currentUser.user.currentOrganizationId,
|
|
682102
680918
|
featureFlags: sdk.getFeatureFlagsForUser(currentUser)
|
|
682103
680919
|
};
|
|
682104
|
-
const result = await checkVersionsAndWritePackageJson(lockService, applicationConfigWithTokenConfigAndUserInfo, forceUpgrade
|
|
680920
|
+
const result = await checkVersionsAndWritePackageJson(lockService, applicationConfigWithTokenConfigAndUserInfo, forceUpgrade);
|
|
682105
680921
|
hasCliUpdated = result.cliUpdated;
|
|
682106
680922
|
upgradePromises = result.upgradePromises;
|
|
682107
680923
|
} else {
|
|
@@ -682258,11 +681074,7 @@ async function dev(options8) {
|
|
|
682258
681074
|
snapshotManager,
|
|
682259
681075
|
logger: options8.logger,
|
|
682260
681076
|
sdk,
|
|
682261
|
-
superblocksBaseUrl: tokenConfig.superblocksBaseUrl
|
|
682262
|
-
existingServer: options8.existingServer
|
|
682263
|
-
// TODO: Remove this cast — build the options object to match
|
|
682264
|
-
// CreateDevServerOptions directly so new required fields cause a
|
|
682265
|
-
// compile error instead of silently passing undefined.
|
|
681077
|
+
superblocksBaseUrl: tokenConfig.superblocksBaseUrl
|
|
682266
681078
|
};
|
|
682267
681079
|
const result = await createDevServer(createDevServerOptions);
|
|
682268
681080
|
span.end();
|
|
@@ -682609,7 +681421,6 @@ export {
|
|
|
682609
681421
|
SuperblocksSdk,
|
|
682610
681422
|
AUTO_UPGRADE_EXIT_CODE,
|
|
682611
681423
|
RESTART_EXIT_CODE,
|
|
682612
|
-
preWarmViteCache,
|
|
682613
681424
|
TokenManager,
|
|
682614
681425
|
tryDecodeJwtToken,
|
|
682615
681426
|
fetchAndWriteApplication,
|
|
@@ -683161,4 +681972,4 @@ serve-static/index.js:
|
|
|
683161
681972
|
chokidar/esm/index.js:
|
|
683162
681973
|
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
683163
681974
|
*/
|
|
683164
|
-
//# sourceMappingURL=chunk-
|
|
681975
|
+
//# sourceMappingURL=chunk-6L5GMSF2.js.map
|