@superblocksteam/cli 2.0.106 → 2.0.107-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +1 -1
  2. package/dist/{acorn-OPZCSTYG.js → acorn-MEX5RFZT.js} +3 -3
  3. package/dist/{angular-JLP3RKZK.js → angular-D3S52ZE2.js} +3 -3
  4. package/dist/{api-JLDXTUFL.js → api-QBWRH33C.js} +4 -4
  5. package/dist/{babel-FVAYSPTK.js → babel-SFYZML4M.js} +3 -3
  6. package/dist/{chunk-HZD7ZWC6.js → chunk-4JP4Q3R6.js} +4 -4
  7. package/dist/{chunk-BWBZYXU5.js → chunk-A4ZHYPQ6.js} +3 -3
  8. package/dist/{chunk-5ZMFXRHW.js → chunk-E7IU53H4.js} +3 -3
  9. package/dist/{chunk-Y3GXLERD.js → chunk-FCN7IDG4.js} +3 -3
  10. package/dist/{chunk-2WWKACJ2.js → chunk-FHLMIXOO.js} +6 -6
  11. package/dist/{chunk-PXI2BMYM.js → chunk-LCBQJJ6F.js} +184 -72
  12. package/dist/{chunk-PXI2BMYM.js.map → chunk-LCBQJJ6F.js.map} +1 -1
  13. package/dist/{chunk-FHJT33HP.js → chunk-MITH3IVL.js} +4 -4
  14. package/dist/{chunk-Q56KYNGS.js → chunk-MJ7HVHUR.js} +3 -3
  15. package/dist/{chunk-T22YBSOZ.js → chunk-MYKLVW3H.js} +3 -3
  16. package/dist/{chunk-PY3OWIDM.js → chunk-OVABXDMI.js} +3 -3
  17. package/dist/{chunk-DSGY5JAH.js → chunk-PUN77SGG.js} +3 -3
  18. package/dist/{chunk-OBG4ZO73.js → chunk-QKUUHC4M.js} +6 -6
  19. package/dist/{chunk-UAG22FZS.js → chunk-S76Z4AKG.js} +2 -2
  20. package/dist/{chunk-BYANSVAG.js → chunk-SZXPAZLT.js} +3 -3
  21. package/dist/{chunk-VTXO4JDR.js → chunk-TAKNIQOZ.js} +4 -4
  22. package/dist/{chunk-AUV3WDOS.js → chunk-UNWWLO56.js} +4 -4
  23. package/dist/{chunk-KGR5DCN5.js → chunk-X75ME3UV.js} +3 -3
  24. package/dist/{cli-truncate-OGHPFNU6.js → cli-truncate-LDGEEDHB.js} +5 -5
  25. package/dist/commands/dev-parent.js +2 -2
  26. package/dist/{dd-trace-YXIIRXVV.js → dd-trace-BW7YSZGP.js} +7 -7
  27. package/dist/{dist-2YCVM3HN.js → dist-MVNBFVAB.js} +13 -13
  28. package/dist/{embedded-playwright-mcp-server-5DISRHEH.js → embedded-playwright-mcp-server-W2AUWU72.js} +3 -3
  29. package/dist/{enquirer-QINGXDWL.js → enquirer-7NFTVITU.js} +4 -4
  30. package/dist/{estree-M6BQF6KG.js → estree-MZ74RJPW.js} +3 -3
  31. package/dist/{flow-JLCLR675.js → flow-TCSSXUS7.js} +3 -3
  32. package/dist/{getMachineId-bsd-JVP7SDPZ.js → getMachineId-bsd-6NQILVZ5.js} +5 -5
  33. package/dist/{getMachineId-darwin-6MAOIEBB.js → getMachineId-darwin-FDFV57BC.js} +5 -5
  34. package/dist/{getMachineId-linux-FBW4JREJ.js → getMachineId-linux-WU5QE3OP.js} +4 -4
  35. package/dist/{getMachineId-unsupported-A3UAAG7R.js → getMachineId-unsupported-XBYUUBVF.js} +4 -4
  36. package/dist/{getMachineId-win-2QZJGUKI.js → getMachineId-win-IA7ZPEZX.js} +5 -5
  37. package/dist/{glimmer-226AW5SK.js → glimmer-W37AZRQA.js} +3 -3
  38. package/dist/{graphql-2XEFI5SS.js → graphql-565I5TP4.js} +3 -3
  39. package/dist/{html-CSEIJNCQ.js → html-P3XBYPJP.js} +3 -3
  40. package/dist/{http-B7ZPTSQF.js → http-UQLBK63O.js} +12 -12
  41. package/dist/index.js +18 -18
  42. package/dist/{jiti-YQX2EMDI.js → jiti-PY7AG5RU.js} +3 -3
  43. package/dist/{log-update-G3PGSVWS.js → log-update-A7CNAJW3.js} +6 -6
  44. package/dist/{markdown-2OWCHQBX.js → markdown-7QY7NHKZ.js} +3 -3
  45. package/dist/{meriyah-UYOZJRBS.js → meriyah-MFSR7WT7.js} +3 -3
  46. package/dist/{postcss-LTJAJ5HX.js → postcss-7A5DIHHF.js} +3 -3
  47. package/dist/{read-pkg-G5MAO2UG.js → read-pkg-6XSODIFQ.js} +5 -5
  48. package/dist/{spans-M7K5PCTJ.js → spans-A2T4F6Y7.js} +4 -4
  49. package/dist/{src-HIWNQ2ZK.js → src-DGNNL3J7.js} +3 -3
  50. package/dist/{token-2OMWY57H.js → token-IJDJPSLK.js} +5 -5
  51. package/dist/{token-util-JN27DL5B.js → token-util-RAEHXFKF.js} +5 -5
  52. package/dist/{typescript-AOTBQ4RS.js → typescript-VVR5MDVH.js} +3 -3
  53. package/dist/{wrap-ansi-N7NR2MFH.js → wrap-ansi-T5U5KRGL.js} +5 -5
  54. package/dist/{yaml-7T4RBYWN.js → yaml-F44FRQRK.js} +3 -3
  55. package/oclif.manifest.json +1 -1
  56. package/package.json +5 -5
  57. /package/dist/{acorn-OPZCSTYG.js.map → acorn-MEX5RFZT.js.map} +0 -0
  58. /package/dist/{angular-JLP3RKZK.js.map → angular-D3S52ZE2.js.map} +0 -0
  59. /package/dist/{api-JLDXTUFL.js.map → api-QBWRH33C.js.map} +0 -0
  60. /package/dist/{babel-FVAYSPTK.js.map → babel-SFYZML4M.js.map} +0 -0
  61. /package/dist/{chunk-HZD7ZWC6.js.map → chunk-4JP4Q3R6.js.map} +0 -0
  62. /package/dist/{chunk-BWBZYXU5.js.map → chunk-A4ZHYPQ6.js.map} +0 -0
  63. /package/dist/{chunk-5ZMFXRHW.js.map → chunk-E7IU53H4.js.map} +0 -0
  64. /package/dist/{chunk-Y3GXLERD.js.map → chunk-FCN7IDG4.js.map} +0 -0
  65. /package/dist/{chunk-2WWKACJ2.js.map → chunk-FHLMIXOO.js.map} +0 -0
  66. /package/dist/{chunk-FHJT33HP.js.map → chunk-MITH3IVL.js.map} +0 -0
  67. /package/dist/{chunk-Q56KYNGS.js.map → chunk-MJ7HVHUR.js.map} +0 -0
  68. /package/dist/{chunk-T22YBSOZ.js.map → chunk-MYKLVW3H.js.map} +0 -0
  69. /package/dist/{chunk-PY3OWIDM.js.map → chunk-OVABXDMI.js.map} +0 -0
  70. /package/dist/{chunk-DSGY5JAH.js.map → chunk-PUN77SGG.js.map} +0 -0
  71. /package/dist/{chunk-OBG4ZO73.js.map → chunk-QKUUHC4M.js.map} +0 -0
  72. /package/dist/{chunk-UAG22FZS.js.map → chunk-S76Z4AKG.js.map} +0 -0
  73. /package/dist/{chunk-BYANSVAG.js.map → chunk-SZXPAZLT.js.map} +0 -0
  74. /package/dist/{chunk-VTXO4JDR.js.map → chunk-TAKNIQOZ.js.map} +0 -0
  75. /package/dist/{chunk-AUV3WDOS.js.map → chunk-UNWWLO56.js.map} +0 -0
  76. /package/dist/{chunk-KGR5DCN5.js.map → chunk-X75ME3UV.js.map} +0 -0
  77. /package/dist/{cli-truncate-OGHPFNU6.js.map → cli-truncate-LDGEEDHB.js.map} +0 -0
  78. /package/dist/{dd-trace-YXIIRXVV.js.map → dd-trace-BW7YSZGP.js.map} +0 -0
  79. /package/dist/{dist-2YCVM3HN.js.map → dist-MVNBFVAB.js.map} +0 -0
  80. /package/dist/{embedded-playwright-mcp-server-5DISRHEH.js.map → embedded-playwright-mcp-server-W2AUWU72.js.map} +0 -0
  81. /package/dist/{enquirer-QINGXDWL.js.map → enquirer-7NFTVITU.js.map} +0 -0
  82. /package/dist/{estree-M6BQF6KG.js.map → estree-MZ74RJPW.js.map} +0 -0
  83. /package/dist/{flow-JLCLR675.js.map → flow-TCSSXUS7.js.map} +0 -0
  84. /package/dist/{getMachineId-bsd-JVP7SDPZ.js.map → getMachineId-bsd-6NQILVZ5.js.map} +0 -0
  85. /package/dist/{getMachineId-darwin-6MAOIEBB.js.map → getMachineId-darwin-FDFV57BC.js.map} +0 -0
  86. /package/dist/{getMachineId-linux-FBW4JREJ.js.map → getMachineId-linux-WU5QE3OP.js.map} +0 -0
  87. /package/dist/{getMachineId-unsupported-A3UAAG7R.js.map → getMachineId-unsupported-XBYUUBVF.js.map} +0 -0
  88. /package/dist/{getMachineId-win-2QZJGUKI.js.map → getMachineId-win-IA7ZPEZX.js.map} +0 -0
  89. /package/dist/{glimmer-226AW5SK.js.map → glimmer-W37AZRQA.js.map} +0 -0
  90. /package/dist/{graphql-2XEFI5SS.js.map → graphql-565I5TP4.js.map} +0 -0
  91. /package/dist/{html-CSEIJNCQ.js.map → html-P3XBYPJP.js.map} +0 -0
  92. /package/dist/{http-B7ZPTSQF.js.map → http-UQLBK63O.js.map} +0 -0
  93. /package/dist/{jiti-YQX2EMDI.js.map → jiti-PY7AG5RU.js.map} +0 -0
  94. /package/dist/{log-update-G3PGSVWS.js.map → log-update-A7CNAJW3.js.map} +0 -0
  95. /package/dist/{markdown-2OWCHQBX.js.map → markdown-7QY7NHKZ.js.map} +0 -0
  96. /package/dist/{meriyah-UYOZJRBS.js.map → meriyah-MFSR7WT7.js.map} +0 -0
  97. /package/dist/{postcss-LTJAJ5HX.js.map → postcss-7A5DIHHF.js.map} +0 -0
  98. /package/dist/{read-pkg-G5MAO2UG.js.map → read-pkg-6XSODIFQ.js.map} +0 -0
  99. /package/dist/{spans-M7K5PCTJ.js.map → spans-A2T4F6Y7.js.map} +0 -0
  100. /package/dist/{src-HIWNQ2ZK.js.map → src-DGNNL3J7.js.map} +0 -0
  101. /package/dist/{token-2OMWY57H.js.map → token-IJDJPSLK.js.map} +0 -0
  102. /package/dist/{token-util-JN27DL5B.js.map → token-util-RAEHXFKF.js.map} +0 -0
  103. /package/dist/{typescript-AOTBQ4RS.js.map → typescript-VVR5MDVH.js.map} +0 -0
  104. /package/dist/{wrap-ansi-N7NR2MFH.js.map → wrap-ansi-T5U5KRGL.js.map} +0 -0
  105. /package/dist/{yaml-7T4RBYWN.js.map → yaml-F44FRQRK.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 = '4e1c623f75f21674a09b339b795dfed9454cd72d';
4
+ process.env.DD_GIT_COMMIT_SHA = '804c4527d2afa816f41c9cc72925cecb683c4a2d';
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-T22YBSOZ.js";
27
+ } from "./chunk-MYKLVW3H.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-KGR5DCN5.js";
44
+ } from "./chunk-X75ME3UV.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-2WWKACJ2.js";
53
+ } from "./chunk-FHLMIXOO.js";
54
54
  import {
55
55
  require_commonjs
56
- } from "./chunk-5ZMFXRHW.js";
56
+ } from "./chunk-E7IU53H4.js";
57
57
  import {
58
58
  require_dc_polyfill
59
- } from "./chunk-Y3GXLERD.js";
59
+ } from "./chunk-FCN7IDG4.js";
60
60
  import {
61
61
  require_token_error
62
- } from "./chunk-BYANSVAG.js";
62
+ } from "./chunk-SZXPAZLT.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-PY3OWIDM.js";
71
+ } from "./chunk-OVABXDMI.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-UAG22FZS.js";
80
+ } from "./chunk-S76Z4AKG.js";
81
81
 
82
82
  // ../../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
83
83
  var require_constants3 = __commonJS({
@@ -96566,15 +96566,15 @@ var require_api_files = __commonJS({
96566
96566
  exports2.readAppApiYamlFile = readAppApiYamlFile4;
96567
96567
  exports2.resolveLanguageSpecificStepContentFromBlocks = resolveLanguageSpecificStepContentFromBlocks2;
96568
96568
  async function writeApiFiles3(...args) {
96569
- const esmFunction = await import("./api-JLDXTUFL.js");
96569
+ const esmFunction = await import("./api-QBWRH33C.js");
96570
96570
  return esmFunction.writeApiFiles(...args);
96571
96571
  }
96572
96572
  async function readAppApiYamlFile4(...args) {
96573
- const esmFunction = await import("./api-JLDXTUFL.js");
96573
+ const esmFunction = await import("./api-QBWRH33C.js");
96574
96574
  return esmFunction.readAppApiYamlFile(...args);
96575
96575
  }
96576
96576
  async function resolveLanguageSpecificStepContentFromBlocks2(...args) {
96577
- const esmFunction = await import("./api-JLDXTUFL.js");
96577
+ const esmFunction = await import("./api-QBWRH33C.js");
96578
96578
  return esmFunction.resolveLanguageSpecificStepContentFromBlocks(...args);
96579
96579
  }
96580
96580
  }
@@ -109366,19 +109366,19 @@ var require_getMachineId = __commonJS({
109366
109366
  if (!getMachineIdImpl) {
109367
109367
  switch (process5.platform) {
109368
109368
  case "darwin":
109369
- getMachineIdImpl = (await import("./getMachineId-darwin-6MAOIEBB.js")).getMachineId;
109369
+ getMachineIdImpl = (await import("./getMachineId-darwin-FDFV57BC.js")).getMachineId;
109370
109370
  break;
109371
109371
  case "linux":
109372
- getMachineIdImpl = (await import("./getMachineId-linux-FBW4JREJ.js")).getMachineId;
109372
+ getMachineIdImpl = (await import("./getMachineId-linux-WU5QE3OP.js")).getMachineId;
109373
109373
  break;
109374
109374
  case "freebsd":
109375
- getMachineIdImpl = (await import("./getMachineId-bsd-JVP7SDPZ.js")).getMachineId;
109375
+ getMachineIdImpl = (await import("./getMachineId-bsd-6NQILVZ5.js")).getMachineId;
109376
109376
  break;
109377
109377
  case "win32":
109378
- getMachineIdImpl = (await import("./getMachineId-win-2QZJGUKI.js")).getMachineId;
109378
+ getMachineIdImpl = (await import("./getMachineId-win-IA7ZPEZX.js")).getMachineId;
109379
109379
  break;
109380
109380
  default:
109381
- getMachineIdImpl = (await import("./getMachineId-unsupported-A3UAAG7R.js")).getMachineId;
109381
+ getMachineIdImpl = (await import("./getMachineId-unsupported-XBYUUBVF.js")).getMachineId;
109382
109382
  break;
109383
109383
  }
109384
109384
  }
@@ -185241,8 +185241,8 @@ var require_get_vercel_oidc_token = __commonJS({
185241
185241
  }
185242
185242
  try {
185243
185243
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
185244
- await import("./token-util-JN27DL5B.js"),
185245
- await import("./token-2OMWY57H.js")
185244
+ await import("./token-util-RAEHXFKF.js"),
185245
+ await import("./token-IJDJPSLK.js")
185246
185246
  ]);
185247
185247
  if (!token2 || isExpired(getTokenPayload(token2))) {
185248
185248
  await refreshToken();
@@ -367442,7 +367442,7 @@ var require_config_loader = __commonJS({
367442
367442
  * @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
367443
367443
  */
367444
367444
  static async loadJiti() {
367445
- const { createJiti } = await import("./jiti-YQX2EMDI.js");
367445
+ const { createJiti } = await import("./jiti-PY7AG5RU.js");
367446
367446
  const version5 = require_package6().version;
367447
367447
  return { createJiti, version: version5 };
367448
367448
  }
@@ -367771,7 +367771,7 @@ var require_eslint_helpers = __commonJS({
367771
367771
  }
367772
367772
  async function globMatch({ basePath, pattern }) {
367773
367773
  let found = false;
367774
- const { hfs } = await import("./src-HIWNQ2ZK.js");
367774
+ const { hfs } = await import("./src-DGNNL3J7.js");
367775
367775
  const patternToUse = normalizeToPosix(path77.relative(basePath, pattern));
367776
367776
  const matcher = new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
367777
367777
  const walkSettings = {
@@ -367811,7 +367811,7 @@ var require_eslint_helpers = __commonJS({
367811
367811
  return new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
367812
367812
  });
367813
367813
  const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
367814
- const { hfs } = await import("./src-HIWNQ2ZK.js");
367814
+ const { hfs } = await import("./src-DGNNL3J7.js");
367815
367815
  const walk2 = hfs.walk(basePath, {
367816
367816
  async directoryFilter(entry) {
367817
367817
  if (!matchers.some((matcher) => matcher.match(entry.path, true))) {
@@ -520466,7 +520466,7 @@ init_cjs_shims();
520466
520466
  // ../sdk/package.json
520467
520467
  var package_default = {
520468
520468
  name: "@superblocksteam/sdk",
520469
- version: "2.0.106",
520469
+ version: "2.0.107-next.1",
520470
520470
  description: "Superblocks JS SDK",
520471
520471
  homepage: "https://www.superblocks.com",
520472
520472
  license: "Superblocks Community Software License",
@@ -520820,7 +520820,7 @@ var config = void 0;
520820
520820
  var configured = false;
520821
520821
  var ddTracePromise = void 0;
520822
520822
  async function getDdTrace() {
520823
- ddTracePromise ??= import("./dd-trace-YXIIRXVV.js").then((module2) => module2.default);
520823
+ ddTracePromise ??= import("./dd-trace-BW7YSZGP.js").then((module2) => module2.default);
520824
520824
  return await ddTracePromise;
520825
520825
  }
520826
520826
  var deploymentType = (() => {
@@ -528990,6 +528990,63 @@ var EXCLUDED_MESSAGE_TYPES = [
528990
528990
  "commitRestoring",
528991
528991
  "git_setup_required"
528992
528992
  ];
528993
+ var DEFAULT_ATTACHMENT_FILE_NAME = "Attachment";
528994
+ function fallbackFileNameForImageMime(mtLower) {
528995
+ const match2 = /^image\/([^;\s]+)/i.exec(mtLower);
528996
+ const rawSub = match2?.[1]?.toLowerCase() ?? "png";
528997
+ if (rawSub === "svg+xml") {
528998
+ return "image.svg";
528999
+ }
529000
+ const sub = rawSub.split("+")[0] ?? rawSub;
529001
+ const extBySub = {
529002
+ bmp: "bmp",
529003
+ gif: "gif",
529004
+ ico: "ico",
529005
+ jpeg: "jpg",
529006
+ jpg: "jpg",
529007
+ png: "png",
529008
+ "svg+xml": "svg",
529009
+ webp: "webp",
529010
+ "x-icon": "ico"
529011
+ };
529012
+ const ext2 = extBySub[sub] ?? (/^[a-z0-9]{1,12}$/i.test(sub) ? sub : "img");
529013
+ return `image.${ext2}`;
529014
+ }
529015
+ function resolveAttachmentFileName(attachment) {
529016
+ const trimmed2 = attachment.fileName?.trim();
529017
+ if (trimmed2) {
529018
+ return trimmed2;
529019
+ }
529020
+ const rawMime = attachment.mediaType ?? attachment.mimeType;
529021
+ const mt = rawMime?.toLowerCase() ?? "";
529022
+ if (mt.startsWith("image/")) {
529023
+ return fallbackFileNameForImageMime(mt);
529024
+ }
529025
+ if (mt.includes("pdf")) {
529026
+ return "document.pdf";
529027
+ }
529028
+ if (attachment.type === "pdf") {
529029
+ return "document.pdf";
529030
+ }
529031
+ if (attachment.type === "image") {
529032
+ return "image.png";
529033
+ }
529034
+ switch (attachment.type) {
529035
+ case "csv":
529036
+ return "data.csv";
529037
+ case "json":
529038
+ return "data.json";
529039
+ case "yaml":
529040
+ return "config.yaml";
529041
+ case "css":
529042
+ return "styles.css";
529043
+ case "txt":
529044
+ return "file.txt";
529045
+ default:
529046
+ break;
529047
+ }
529048
+ return DEFAULT_ATTACHMENT_FILE_NAME;
529049
+ }
528993
529050
  var TEXT_ATTACHMENT_TYPES = [
528994
529051
  "csv",
528995
529052
  "json",
@@ -529911,7 +529968,7 @@ var MAX_ATTRIBUTE_LENGTH = 64e3;
529911
529968
  var LLMObsSpanWriter = null;
529912
529969
  async function loadLLMObsSpanWriter() {
529913
529970
  if (!LLMObsSpanWriter) {
529914
- const module2 = await import("./spans-M7K5PCTJ.js");
529971
+ const module2 = await import("./spans-A2T4F6Y7.js");
529915
529972
  LLMObsSpanWriter = module2.default;
529916
529973
  }
529917
529974
  return LLMObsSpanWriter;
@@ -544690,7 +544747,7 @@ init_cjs_shims();
544690
544747
  init_cjs_shims();
544691
544748
  var isUploadedAttachment = (attachment) => {
544692
544749
  const candidate = attachment;
544693
- return candidate.type === "uploaded" && typeof candidate.url === "string" && typeof candidate.mediaType === "string" && typeof candidate.fileName === "string";
544750
+ return candidate.type === "uploaded" && typeof candidate.url === "string" && typeof candidate.mediaType === "string";
544694
544751
  };
544695
544752
  var MAX_MESSAGE_LENGTH = 300;
544696
544753
  function truncateMessage(message) {
@@ -547483,7 +547540,12 @@ Note: This increases load on the orchestrator, so only use when truly needed.`)
547483
547540
  const header = services.integrationStore.getHeader(integrationId);
547484
547541
  const pluginId = header?.plugin.id;
547485
547542
  const isDatabricks = header ? isDatabricksIntegration(header) : false;
547486
- const metadata = await services.integrationStore.getMetadata(integrationId, clark.context.peer, { forceRefresh });
547543
+ const metadata = await withRpcTimeout(
547544
+ services.integrationStore.getMetadata(integrationId, clark.context.peer, { forceRefresh }),
547545
+ void 0,
547546
+ // use DEFAULT_RPC_TIMEOUT_MS (60s)
547547
+ `grepMetadata.getMetadata(${integrationId})`
547548
+ );
547487
547549
  if (!metadata) {
547488
547550
  logger15.warn(`[grepMetadata] No metadata found for integration ${integrationId}`);
547489
547551
  return {
@@ -568270,7 +568332,7 @@ init_cjs_shims();
568270
568332
  var ATTACHMENT_URL_BASE = "https://localhost/";
568271
568333
  var isUploadedAttachment2 = (attachment) => {
568272
568334
  const candidate = attachment;
568273
- return candidate.type === "uploaded" && typeof candidate.url === "string" && typeof candidate.mediaType === "string" && typeof candidate.fileName === "string";
568335
+ return candidate.type === "uploaded" && typeof candidate.url === "string" && typeof candidate.mediaType === "string";
568274
568336
  };
568275
568337
  function toAttachmentUrl(url4) {
568276
568338
  try {
@@ -568289,7 +568351,7 @@ function getAttachmentLeaseMetadata(attachment) {
568289
568351
  return {
568290
568352
  url: getCanonicalAttachmentUrl(attachment.url),
568291
568353
  mediaType: attachment.mediaType,
568292
- fileName: attachment.fileName,
568354
+ fileName: resolveAttachmentFileName(attachment),
568293
568355
  ...attachment.storageKey ? { storageKey: attachment.storageKey } : {},
568294
568356
  ...attachment.scopeType ? { scopeType: attachment.scopeType } : {},
568295
568357
  ...attachment.applicationId ? { applicationId: attachment.applicationId } : {}
@@ -568309,7 +568371,7 @@ function toUploadedAttachmentContentPart(attachment) {
568309
568371
  type: "file",
568310
568372
  data: url4,
568311
568373
  mediaType: attachment.mediaType,
568312
- filename: attachment.fileName,
568374
+ filename: resolveAttachmentFileName(attachment),
568313
568375
  superblocksAttachmentMetadata
568314
568376
  };
568315
568377
  }
@@ -568381,7 +568443,7 @@ var TEXT_LIKE_EXTENSIONS = [
568381
568443
  function inferTextAttachmentType(params) {
568382
568444
  const attachmentType = typeof params.attachmentType === "string" ? params.attachmentType.toLowerCase() : "";
568383
568445
  const mimeType = typeof params.mimeType === "string" ? params.mimeType.toLowerCase() : "";
568384
- const lowerFileName = params.fileName.toLowerCase();
568446
+ const lowerFileName = (params.fileName ?? "").toLowerCase();
568385
568447
  if (attachmentType === "csv" || mimeType === "text/csv") {
568386
568448
  return "csv";
568387
568449
  }
@@ -568417,26 +568479,35 @@ function inferTextAttachmentType(params) {
568417
568479
  function normalizeTextAttachmentForModel(attachment) {
568418
568480
  if (isTextAttachment(attachment)) {
568419
568481
  return {
568420
- fileName: attachment.fileName,
568482
+ fileName: resolveAttachmentFileName({
568483
+ fileName: attachment.fileName,
568484
+ mimeType: attachment.mimeType,
568485
+ type: attachment.type
568486
+ }),
568421
568487
  content: attachment.content,
568422
568488
  mimeType: attachment.mimeType,
568423
568489
  tagName: attachment.type
568424
568490
  };
568425
568491
  }
568426
568492
  const candidate = attachment;
568427
- if (typeof candidate.content !== "string" || typeof candidate.fileName !== "string") {
568493
+ if (typeof candidate.content !== "string") {
568428
568494
  return null;
568429
568495
  }
568496
+ const fileNameForInfer = typeof candidate.fileName === "string" ? candidate.fileName : "";
568430
568497
  const tagName = inferTextAttachmentType({
568431
568498
  attachmentType: candidate.type,
568432
568499
  mimeType: candidate.mimeType,
568433
- fileName: candidate.fileName
568500
+ fileName: fileNameForInfer
568434
568501
  });
568435
568502
  if (!tagName) {
568436
568503
  return null;
568437
568504
  }
568438
568505
  return {
568439
- fileName: candidate.fileName,
568506
+ fileName: resolveAttachmentFileName({
568507
+ fileName: typeof candidate.fileName === "string" ? candidate.fileName : void 0,
568508
+ mimeType: typeof candidate.mimeType === "string" ? candidate.mimeType : TEXT_ATTACHMENT_MIME_TYPES[tagName],
568509
+ type: tagName
568510
+ }),
568440
568511
  content: candidate.content,
568441
568512
  mimeType: typeof candidate.mimeType === "string" ? candidate.mimeType : TEXT_ATTACHMENT_MIME_TYPES[tagName],
568442
568513
  tagName
@@ -568563,39 +568634,39 @@ var ChatSessionStore = (() => {
568563
568634
  return {
568564
568635
  type: attachment.type,
568565
568636
  image: attachment.image,
568566
- fileName: attachment.fileName
568637
+ fileName: typeof attachment.fileName === "string" ? attachment.fileName : void 0
568567
568638
  };
568568
568639
  }
568569
568640
  if (attachment.type === "pdf") {
568570
- if (typeof attachment.data !== "string" || typeof attachment.fileName !== "string") {
568641
+ if (typeof attachment.data !== "string") {
568571
568642
  return void 0;
568572
568643
  }
568573
568644
  return {
568574
568645
  type: attachment.type,
568575
568646
  data: attachment.data,
568576
- fileName: attachment.fileName,
568647
+ fileName: typeof attachment.fileName === "string" ? attachment.fileName : void 0,
568577
568648
  size: attachment.size
568578
568649
  };
568579
568650
  }
568580
- const normalizedTextAttachmentType = typeof attachment.content === "string" && typeof attachment.fileName === "string" ? inferTextAttachmentType({
568651
+ const normalizedTextAttachmentType = typeof attachment.content === "string" ? inferTextAttachmentType({
568581
568652
  attachmentType: attachment.type,
568582
568653
  mimeType: attachment.mimeType,
568583
- fileName: attachment.fileName
568654
+ fileName: typeof attachment.fileName === "string" ? attachment.fileName : ""
568584
568655
  }) : null;
568585
568656
  if (normalizedTextAttachmentType) {
568586
- if (typeof attachment.content !== "string" || typeof attachment.fileName !== "string") {
568657
+ if (typeof attachment.content !== "string") {
568587
568658
  return void 0;
568588
568659
  }
568589
568660
  return {
568590
568661
  type: normalizedTextAttachmentType,
568591
568662
  content: attachment.content,
568592
- fileName: attachment.fileName,
568663
+ fileName: typeof attachment.fileName === "string" ? attachment.fileName : void 0,
568593
568664
  mimeType: typeof attachment.mimeType === "string" ? attachment.mimeType : TEXT_ATTACHMENT_MIME_TYPES[normalizedTextAttachmentType],
568594
568665
  size: attachment.size
568595
568666
  };
568596
568667
  }
568597
568668
  if (attachment.type === "uploaded") {
568598
- if (typeof attachment.url !== "string" || typeof attachment.mediaType !== "string" || typeof attachment.fileName !== "string") {
568669
+ if (typeof attachment.url !== "string" || typeof attachment.mediaType !== "string") {
568599
568670
  return void 0;
568600
568671
  }
568601
568672
  return {
@@ -568603,7 +568674,7 @@ var ChatSessionStore = (() => {
568603
568674
  url: attachment.url,
568604
568675
  signedUrl: typeof attachment.signedUrl === "string" ? attachment.signedUrl : void 0,
568605
568676
  mediaType: attachment.mediaType,
568606
- fileName: attachment.fileName,
568677
+ fileName: typeof attachment.fileName === "string" ? attachment.fileName : void 0,
568607
568678
  label: typeof attachment.label === "string" ? attachment.label : void 0,
568608
568679
  insight: typeof attachment.insight === "string" ? attachment.insight : void 0,
568609
568680
  storageKey: typeof attachment.storageKey === "string" ? attachment.storageKey : void 0,
@@ -586779,6 +586850,32 @@ function repairBrokenToolCalls(msg, index2, messages3) {
586779
586850
  }
586780
586851
  return { ...msg, content: content9 };
586781
586852
  }
586853
+ function repairOrphanedToolResults(msg, index2, messages3) {
586854
+ if (msg.role !== "tool" || !Array.isArray(msg.content)) {
586855
+ return msg;
586856
+ }
586857
+ const toolCallIds = /* @__PURE__ */ new Set();
586858
+ const prevMsg = messages3[index2 - 1];
586859
+ if (prevMsg && prevMsg.role === "assistant" && typeof prevMsg.content !== "string") {
586860
+ for (const part of prevMsg.content) {
586861
+ if (typeof part === "object" && part !== null && "type" in part && part.type === "tool-call" && "toolCallId" in part) {
586862
+ toolCallIds.add(part.toolCallId);
586863
+ }
586864
+ }
586865
+ }
586866
+ const before2 = msg.content.length;
586867
+ const content9 = msg.content.filter((part) => {
586868
+ if (typeof part === "object" && part !== null && "type" in part && part.type === "tool-result" && "toolCallId" in part) {
586869
+ return toolCallIds.has(part.toolCallId);
586870
+ }
586871
+ return true;
586872
+ });
586873
+ const removed = before2 - content9.length;
586874
+ if (removed > 0) {
586875
+ logger3.debug(`Removed ${removed} orphaned tool result(s) from tool message at index ${index2}`);
586876
+ }
586877
+ return { ...msg, content: content9 };
586878
+ }
586782
586879
  function stripUndefined(obj) {
586783
586880
  if (obj === null || typeof obj !== "object") {
586784
586881
  return obj;
@@ -587963,16 +588060,22 @@ var ContextV2 = class _ContextV2 {
587963
588060
  async getMessages() {
587964
588061
  return this.queue.enqueue(async () => {
587965
588062
  const allMessages = this.systemPrompt ? [this.systemPrompt, ...this.messages] : [...this.messages];
587966
- const breakpoints = findBreakpoints({
587967
- messages: allMessages,
587968
- hasSystemPrompt: this.systemPrompt !== void 0,
587969
- config: this.caching
587970
- });
587971
588063
  const sanitized = toSdkMessages(allMessages);
587972
588064
  const normalized = sanitized.map((msg) => normalizeToolMessage(stripUndefinedFromToolOutputs(msg)));
587973
- const repaired = normalized.map(repairBrokenToolCalls);
588065
+ const repaired = normalized.map(repairBrokenToolCalls).map(repairOrphanedToolResults).filter((msg) => {
588066
+ if (msg.role !== "user" && Array.isArray(msg.content) && msg.content.length === 0) {
588067
+ logger7.debug(`Filtered out empty ${msg.role} message after repair`);
588068
+ return false;
588069
+ }
588070
+ return true;
588071
+ });
587974
588072
  const deduped = uniquifyFilePartFilenames(repaired);
587975
- for (const idx of breakpoints) {
588073
+ const repairedBreakpoints = findBreakpoints({
588074
+ messages: deduped,
588075
+ hasSystemPrompt: this.systemPrompt !== void 0,
588076
+ config: this.caching
588077
+ });
588078
+ for (const idx of repairedBreakpoints) {
587976
588079
  if (deduped[idx]) {
587977
588080
  deduped[idx].providerOptions = CACHE_BREAKPOINT_PROVIDER_OPTIONS;
587978
588081
  }
@@ -597783,7 +597886,7 @@ var PlaywrightMcpServerManager = class {
597783
597886
  this.logger.info(`Starting embedded Playwright MCP server: browser=${options8?.browser || "chromium"}, headless=${options8?.headless !== false}`);
597784
597887
  }
597785
597888
  try {
597786
- const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-5DISRHEH.js");
597889
+ const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-W2AUWU72.js");
597787
597890
  this.server = await startEmbeddedPlaywrightMcpServer({
597788
597891
  storageStatePath: options8?.storageStatePath,
597789
597892
  jwt: options8?.jwt,
@@ -631685,11 +631788,16 @@ var mapAttachmentsToContentParts = (attachments) => {
631685
631788
  };
631686
631789
  } else if (attachment.type === "pdf") {
631687
631790
  const parsed = parseDataUrl(attachment.data);
631791
+ const mediaType = parsed?.mediaType ?? "application/pdf";
631688
631792
  return {
631689
631793
  type: "file",
631690
631794
  data: parsed?.data ?? attachment.data,
631691
- mediaType: parsed?.mediaType ?? "application/pdf",
631692
- filename: attachment.fileName
631795
+ mediaType,
631796
+ filename: resolveAttachmentFileName({
631797
+ fileName: attachment.fileName,
631798
+ mediaType,
631799
+ type: "pdf"
631800
+ })
631693
631801
  };
631694
631802
  } else if (isUploadedAttachment2(attachment)) {
631695
631803
  return toUploadedAttachmentContentPart(attachment);
@@ -635887,7 +635995,7 @@ ${apiSourceCode.slice(0, 2e3)}
635887
635995
  const timeout = 3e4;
635888
635996
  const attachment = request3.attachment;
635889
635997
  logger15.debug("[ai-service] Labeling attachment", {
635890
- fileName: attachment.fileName ?? "unnamed",
635998
+ fileName: attachment.fileName,
635891
635999
  type: attachment.type
635892
636000
  });
635893
636001
  const llmConfig = request3.llmConfig ? {
@@ -635962,7 +636070,11 @@ ${apiSourceCode.slice(0, 2e3)}
635962
636070
  type: "file",
635963
636071
  data: data3,
635964
636072
  mediaType,
635965
- filename: attachment.fileName
636073
+ filename: resolveAttachmentFileName({
636074
+ fileName: attachment.fileName,
636075
+ mediaType,
636076
+ type: "pdf"
636077
+ })
635966
636078
  };
635967
636079
  }
635968
636080
  if (isUploadedAttachment2(attachment)) {
@@ -661943,7 +662055,7 @@ var parseYaml3;
661943
662055
  async function loadYaml(file2) {
661944
662056
  const content9 = await read_file_default(file2);
661945
662057
  if (!parseYaml3) {
661946
- ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-7T4RBYWN.js"));
662058
+ ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-F44FRQRK.js"));
661947
662059
  }
661948
662060
  try {
661949
662061
  return parseYaml3(content9);
@@ -667337,7 +667449,7 @@ function createParsersAndPrinters(modules) {
667337
667449
  }
667338
667450
  var estreePlugin = createParsersAndPrinters([
667339
667451
  {
667340
- importPlugin: () => import("./estree-M6BQF6KG.js"),
667452
+ importPlugin: () => import("./estree-MZ74RJPW.js"),
667341
667453
  printers: ["estree", "estree-json"]
667342
667454
  }
667343
667455
  ]);
@@ -667361,11 +667473,11 @@ var languages = [
667361
667473
  ];
667362
667474
  var { parsers: parsers12, printers } = createParsersAndPrinters([
667363
667475
  {
667364
- importPlugin: () => import("./acorn-OPZCSTYG.js"),
667476
+ importPlugin: () => import("./acorn-MEX5RFZT.js"),
667365
667477
  parsers: ["acorn", "espree"]
667366
667478
  },
667367
667479
  {
667368
- importPlugin: () => import("./angular-JLP3RKZK.js"),
667480
+ importPlugin: () => import("./angular-D3S52ZE2.js"),
667369
667481
  parsers: [
667370
667482
  "__ng_action",
667371
667483
  "__ng_binding",
@@ -667374,7 +667486,7 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
667374
667486
  ]
667375
667487
  },
667376
667488
  {
667377
- importPlugin: () => import("./babel-FVAYSPTK.js"),
667489
+ importPlugin: () => import("./babel-SFYZML4M.js"),
667378
667490
  parsers: [
667379
667491
  "babel",
667380
667492
  "babel-flow",
@@ -667393,44 +667505,44 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
667393
667505
  ]
667394
667506
  },
667395
667507
  {
667396
- importPlugin: () => import("./flow-JLCLR675.js"),
667508
+ importPlugin: () => import("./flow-TCSSXUS7.js"),
667397
667509
  parsers: ["flow"]
667398
667510
  },
667399
667511
  {
667400
- importPlugin: () => import("./glimmer-226AW5SK.js"),
667512
+ importPlugin: () => import("./glimmer-W37AZRQA.js"),
667401
667513
  parsers: ["glimmer"],
667402
667514
  printers: ["glimmer"]
667403
667515
  },
667404
667516
  {
667405
- importPlugin: () => import("./graphql-2XEFI5SS.js"),
667517
+ importPlugin: () => import("./graphql-565I5TP4.js"),
667406
667518
  parsers: ["graphql"],
667407
667519
  printers: ["graphql"]
667408
667520
  },
667409
667521
  {
667410
- importPlugin: () => import("./html-CSEIJNCQ.js"),
667522
+ importPlugin: () => import("./html-P3XBYPJP.js"),
667411
667523
  parsers: ["html", "angular", "vue", "lwc", "mjml"],
667412
667524
  printers: ["html"]
667413
667525
  },
667414
667526
  {
667415
- importPlugin: () => import("./markdown-2OWCHQBX.js"),
667527
+ importPlugin: () => import("./markdown-7QY7NHKZ.js"),
667416
667528
  parsers: ["markdown", "mdx", "remark"],
667417
667529
  printers: ["mdast"]
667418
667530
  },
667419
667531
  {
667420
- importPlugin: () => import("./meriyah-UYOZJRBS.js"),
667532
+ importPlugin: () => import("./meriyah-MFSR7WT7.js"),
667421
667533
  parsers: ["meriyah"]
667422
667534
  },
667423
667535
  {
667424
- importPlugin: () => import("./postcss-LTJAJ5HX.js"),
667536
+ importPlugin: () => import("./postcss-7A5DIHHF.js"),
667425
667537
  parsers: ["css", "less", "scss"],
667426
667538
  printers: ["postcss"]
667427
667539
  },
667428
667540
  {
667429
- importPlugin: () => import("./typescript-AOTBQ4RS.js"),
667541
+ importPlugin: () => import("./typescript-VVR5MDVH.js"),
667430
667542
  parsers: ["typescript"]
667431
667543
  },
667432
667544
  {
667433
- importPlugin: () => import("./yaml-7T4RBYWN.js"),
667545
+ importPlugin: () => import("./yaml-F44FRQRK.js"),
667434
667546
  parsers: ["yaml"],
667435
667547
  printers: ["yaml"]
667436
667548
  }
@@ -680290,7 +680402,7 @@ async function handleLockConflict(error40, lockSvc, span, logger15) {
680290
680402
  }
680291
680403
  async function readPkgJson(cwd) {
680292
680404
  try {
680293
- const { readPackage } = await import("./read-pkg-G5MAO2UG.js");
680405
+ const { readPackage } = await import("./read-pkg-6XSODIFQ.js");
680294
680406
  return await readPackage({ cwd });
680295
680407
  } catch {
680296
680408
  return null;
@@ -681630,4 +681742,4 @@ serve-static/index.js:
681630
681742
  chokidar/esm/index.js:
681631
681743
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
681632
681744
  */
681633
- //# sourceMappingURL=chunk-PXI2BMYM.js.map
681745
+ //# sourceMappingURL=chunk-LCBQJJ6F.js.map