@superblocksteam/cli 2.0.122-next.0 → 2.0.123-next.0

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 (117) hide show
  1. package/README.md +1 -1
  2. package/dist/{acorn-USLJB3IM.js → acorn-M5FP7J25.js} +3 -3
  3. package/dist/{angular-GJLPQ7KA.js → angular-HHR5L5H5.js} +3 -3
  4. package/dist/{api-KCT244UC.js → api-QLJBZTD2.js} +4 -4
  5. package/dist/{babel-J32CE2A3.js → babel-L6M75FHR.js} +3 -3
  6. package/dist/{chunk-U5WQCFXP.js → chunk-2WYH2FMN.js} +4 -4
  7. package/dist/{chunk-UNZX4DXX.js → chunk-6L55QQT3.js} +4 -4
  8. package/dist/{chunk-K2MHY5O3.js → chunk-73WD7RU7.js} +6 -6
  9. package/dist/{chunk-EFJIK32J.js → chunk-C2AI3D2F.js} +3 -3
  10. package/dist/{chunk-V3E7VJVT.js → chunk-DHZ2JC6Z.js} +6 -6
  11. package/dist/{chunk-AFVIKAOB.js → chunk-EVJLJRXS.js} +3 -3
  12. package/dist/{chunk-MQWMAIMX.js → chunk-IHTQ3OOV.js} +3 -3
  13. package/dist/{chunk-63APBNGR.js → chunk-JIRFUWYD.js} +3 -3
  14. package/dist/{chunk-PWAO243U.js → chunk-MS4K723Q.js} +4 -4
  15. package/dist/{chunk-3ZUBF6ZX.js → chunk-N3TC2O36.js} +3 -3
  16. package/dist/{chunk-XGWSB2T7.js → chunk-N5DILNGF.js} +3 -3
  17. package/dist/{chunk-BGYYYR2Q.js → chunk-OYBYQSI4.js} +349 -306
  18. package/dist/{chunk-BGYYYR2Q.js.map → chunk-OYBYQSI4.js.map} +1 -1
  19. package/dist/{chunk-HV3DGTCB.js → chunk-RKR3K5JY.js} +3 -3
  20. package/dist/{chunk-G46N4WAE.js → chunk-SH7E6K44.js} +3 -3
  21. package/dist/{chunk-25RHCMLM.js → chunk-SZMAOIFE.js} +3 -3
  22. package/dist/{chunk-XHTVY44R.js → chunk-XVYDTYLW.js} +3 -3
  23. package/dist/{chunk-RI73I2MO.js → chunk-YZ5WSH65.js} +4 -4
  24. package/dist/{chunk-4K3YGVEI.js → chunk-ZGFK5NLR.js} +2 -2
  25. package/dist/{cli-truncate-RXTDTSBI.js → cli-truncate-EMCUWGWW.js} +5 -5
  26. package/dist/commands/dev-parent.js +2 -2
  27. package/dist/{dd-trace-TYLKNLQX.js → dd-trace-QTEYHOVI.js} +7 -7
  28. package/dist/{dist-APQNDXBD.js → dist-TGRWNWPA.js} +13 -13
  29. package/dist/{embedded-playwright-mcp-server-ECG3I2N7.js → embedded-playwright-mcp-server-TYDEIXB2.js} +3 -3
  30. package/dist/{enquirer-NKX5U5HT.js → enquirer-BXSN3TOL.js} +4 -4
  31. package/dist/{estree-ANINXIRG.js → estree-3CPHMYMA.js} +3 -3
  32. package/dist/{flow-EMTQE2BD.js → flow-Y3N7C5TL.js} +3 -3
  33. package/dist/{getMachineId-bsd-6CCD5HZG.js → getMachineId-bsd-IYQLSHTK.js} +5 -5
  34. package/dist/{getMachineId-bsd-3XWTXOWT.js → getMachineId-bsd-YHT6QL7B.js} +5 -5
  35. package/dist/{getMachineId-darwin-KGETADXZ.js → getMachineId-darwin-63W6WXGX.js} +5 -5
  36. package/dist/{getMachineId-darwin-WGS4WF3G.js → getMachineId-darwin-P7OJE45A.js} +5 -5
  37. package/dist/{getMachineId-linux-GILQFQU2.js → getMachineId-linux-4E3WKYYB.js} +4 -4
  38. package/dist/{getMachineId-linux-ZSN7MWU6.js → getMachineId-linux-AZC6T4X7.js} +4 -4
  39. package/dist/{getMachineId-unsupported-YQWBJ2DS.js → getMachineId-unsupported-5N4OMC4O.js} +4 -4
  40. package/dist/{getMachineId-unsupported-644UDN62.js → getMachineId-unsupported-WH44IPVC.js} +4 -4
  41. package/dist/{getMachineId-win-HPJTJHCV.js → getMachineId-win-HAGHUJ4Z.js} +5 -5
  42. package/dist/{getMachineId-win-WMTTQ57M.js → getMachineId-win-ZUOVTOQZ.js} +5 -5
  43. package/dist/{glimmer-BSEL2AQV.js → glimmer-GQD2WHVS.js} +3 -3
  44. package/dist/{graphql-36HQCHXW.js → graphql-GDLAVBFM.js} +3 -3
  45. package/dist/{html-ZDYRBBEB.js → html-QRIW74KP.js} +3 -3
  46. package/dist/{http-WL3MK7RZ.js → http-BOW4MY7C.js} +12 -12
  47. package/dist/index.js +18 -18
  48. package/dist/{jiti-N7R6RKZ2.js → jiti-ORNJSCH4.js} +3 -3
  49. package/dist/{log-update-I3BSCQH2.js → log-update-L2RCJMXQ.js} +6 -6
  50. package/dist/{markdown-IYFZYAUD.js → markdown-EO6R7XDP.js} +3 -3
  51. package/dist/{meriyah-CUTMHC6K.js → meriyah-KTJZKAFN.js} +3 -3
  52. package/dist/{postcss-SYGSWCPX.js → postcss-LHBB5VDF.js} +3 -3
  53. package/dist/{read-pkg-6JFB2K55.js → read-pkg-HW5J4MZ3.js} +5 -5
  54. package/dist/{spans-PIAEEXV3.js → spans-BL5W3XPJ.js} +4 -4
  55. package/dist/{src-D4PXCOWH.js → src-E2UMCTA7.js} +3 -3
  56. package/dist/{token-2S7KDJBH.js → token-XYTAZWV3.js} +5 -5
  57. package/dist/{token-util-AZ5A32CR.js → token-util-NS7KH42E.js} +5 -5
  58. package/dist/{typescript-ILFLYBIU.js → typescript-IIQSXSRM.js} +3 -3
  59. package/dist/{wrap-ansi-2JWCC3R4.js → wrap-ansi-JXVASG7T.js} +5 -5
  60. package/dist/{yaml-AH7ADMI6.js → yaml-DICNK7TI.js} +3 -3
  61. package/oclif.manifest.json +1 -1
  62. package/package.json +5 -5
  63. /package/dist/{acorn-USLJB3IM.js.map → acorn-M5FP7J25.js.map} +0 -0
  64. /package/dist/{angular-GJLPQ7KA.js.map → angular-HHR5L5H5.js.map} +0 -0
  65. /package/dist/{api-KCT244UC.js.map → api-QLJBZTD2.js.map} +0 -0
  66. /package/dist/{babel-J32CE2A3.js.map → babel-L6M75FHR.js.map} +0 -0
  67. /package/dist/{chunk-U5WQCFXP.js.map → chunk-2WYH2FMN.js.map} +0 -0
  68. /package/dist/{chunk-UNZX4DXX.js.map → chunk-6L55QQT3.js.map} +0 -0
  69. /package/dist/{chunk-K2MHY5O3.js.map → chunk-73WD7RU7.js.map} +0 -0
  70. /package/dist/{chunk-EFJIK32J.js.map → chunk-C2AI3D2F.js.map} +0 -0
  71. /package/dist/{chunk-V3E7VJVT.js.map → chunk-DHZ2JC6Z.js.map} +0 -0
  72. /package/dist/{chunk-AFVIKAOB.js.map → chunk-EVJLJRXS.js.map} +0 -0
  73. /package/dist/{chunk-MQWMAIMX.js.map → chunk-IHTQ3OOV.js.map} +0 -0
  74. /package/dist/{chunk-63APBNGR.js.map → chunk-JIRFUWYD.js.map} +0 -0
  75. /package/dist/{chunk-PWAO243U.js.map → chunk-MS4K723Q.js.map} +0 -0
  76. /package/dist/{chunk-3ZUBF6ZX.js.map → chunk-N3TC2O36.js.map} +0 -0
  77. /package/dist/{chunk-XGWSB2T7.js.map → chunk-N5DILNGF.js.map} +0 -0
  78. /package/dist/{chunk-HV3DGTCB.js.map → chunk-RKR3K5JY.js.map} +0 -0
  79. /package/dist/{chunk-G46N4WAE.js.map → chunk-SH7E6K44.js.map} +0 -0
  80. /package/dist/{chunk-25RHCMLM.js.map → chunk-SZMAOIFE.js.map} +0 -0
  81. /package/dist/{chunk-XHTVY44R.js.map → chunk-XVYDTYLW.js.map} +0 -0
  82. /package/dist/{chunk-RI73I2MO.js.map → chunk-YZ5WSH65.js.map} +0 -0
  83. /package/dist/{chunk-4K3YGVEI.js.map → chunk-ZGFK5NLR.js.map} +0 -0
  84. /package/dist/{cli-truncate-RXTDTSBI.js.map → cli-truncate-EMCUWGWW.js.map} +0 -0
  85. /package/dist/{dd-trace-TYLKNLQX.js.map → dd-trace-QTEYHOVI.js.map} +0 -0
  86. /package/dist/{dist-APQNDXBD.js.map → dist-TGRWNWPA.js.map} +0 -0
  87. /package/dist/{embedded-playwright-mcp-server-ECG3I2N7.js.map → embedded-playwright-mcp-server-TYDEIXB2.js.map} +0 -0
  88. /package/dist/{enquirer-NKX5U5HT.js.map → enquirer-BXSN3TOL.js.map} +0 -0
  89. /package/dist/{estree-ANINXIRG.js.map → estree-3CPHMYMA.js.map} +0 -0
  90. /package/dist/{flow-EMTQE2BD.js.map → flow-Y3N7C5TL.js.map} +0 -0
  91. /package/dist/{getMachineId-bsd-6CCD5HZG.js.map → getMachineId-bsd-IYQLSHTK.js.map} +0 -0
  92. /package/dist/{getMachineId-bsd-3XWTXOWT.js.map → getMachineId-bsd-YHT6QL7B.js.map} +0 -0
  93. /package/dist/{getMachineId-darwin-KGETADXZ.js.map → getMachineId-darwin-63W6WXGX.js.map} +0 -0
  94. /package/dist/{getMachineId-darwin-WGS4WF3G.js.map → getMachineId-darwin-P7OJE45A.js.map} +0 -0
  95. /package/dist/{getMachineId-linux-GILQFQU2.js.map → getMachineId-linux-4E3WKYYB.js.map} +0 -0
  96. /package/dist/{getMachineId-linux-ZSN7MWU6.js.map → getMachineId-linux-AZC6T4X7.js.map} +0 -0
  97. /package/dist/{getMachineId-unsupported-YQWBJ2DS.js.map → getMachineId-unsupported-5N4OMC4O.js.map} +0 -0
  98. /package/dist/{getMachineId-unsupported-644UDN62.js.map → getMachineId-unsupported-WH44IPVC.js.map} +0 -0
  99. /package/dist/{getMachineId-win-HPJTJHCV.js.map → getMachineId-win-HAGHUJ4Z.js.map} +0 -0
  100. /package/dist/{getMachineId-win-WMTTQ57M.js.map → getMachineId-win-ZUOVTOQZ.js.map} +0 -0
  101. /package/dist/{glimmer-BSEL2AQV.js.map → glimmer-GQD2WHVS.js.map} +0 -0
  102. /package/dist/{graphql-36HQCHXW.js.map → graphql-GDLAVBFM.js.map} +0 -0
  103. /package/dist/{html-ZDYRBBEB.js.map → html-QRIW74KP.js.map} +0 -0
  104. /package/dist/{http-WL3MK7RZ.js.map → http-BOW4MY7C.js.map} +0 -0
  105. /package/dist/{jiti-N7R6RKZ2.js.map → jiti-ORNJSCH4.js.map} +0 -0
  106. /package/dist/{log-update-I3BSCQH2.js.map → log-update-L2RCJMXQ.js.map} +0 -0
  107. /package/dist/{markdown-IYFZYAUD.js.map → markdown-EO6R7XDP.js.map} +0 -0
  108. /package/dist/{meriyah-CUTMHC6K.js.map → meriyah-KTJZKAFN.js.map} +0 -0
  109. /package/dist/{postcss-SYGSWCPX.js.map → postcss-LHBB5VDF.js.map} +0 -0
  110. /package/dist/{read-pkg-6JFB2K55.js.map → read-pkg-HW5J4MZ3.js.map} +0 -0
  111. /package/dist/{spans-PIAEEXV3.js.map → spans-BL5W3XPJ.js.map} +0 -0
  112. /package/dist/{src-D4PXCOWH.js.map → src-E2UMCTA7.js.map} +0 -0
  113. /package/dist/{token-2S7KDJBH.js.map → token-XYTAZWV3.js.map} +0 -0
  114. /package/dist/{token-util-AZ5A32CR.js.map → token-util-NS7KH42E.js.map} +0 -0
  115. /package/dist/{typescript-ILFLYBIU.js.map → typescript-IIQSXSRM.js.map} +0 -0
  116. /package/dist/{wrap-ansi-2JWCC3R4.js.map → wrap-ansi-JXVASG7T.js.map} +0 -0
  117. /package/dist/{yaml-AH7ADMI6.js.map → yaml-DICNK7TI.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 = '491727dcb28cc5fc41f31ae44e71364439e718cd';
4
+ process.env.DD_GIT_COMMIT_SHA = '7031386dd9f5f99dd90608dcd4a98e168e9f7260';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -15,17 +15,17 @@ import {
15
15
  require_lib as require_lib2,
16
16
  require_lib2 as require_lib3,
17
17
  require_picocolors
18
- } from "./chunk-AFVIKAOB.js";
18
+ } from "./chunk-EVJLJRXS.js";
19
19
  import {
20
20
  require_dd_trace,
21
21
  require_js_yaml,
22
22
  require_module_details_from_path,
23
23
  require_p_limit,
24
24
  require_path_to_regexp
25
- } from "./chunk-V3E7VJVT.js";
25
+ } from "./chunk-DHZ2JC6Z.js";
26
26
  import {
27
27
  require_commonjs
28
- } from "./chunk-25RHCMLM.js";
28
+ } from "./chunk-SZMAOIFE.js";
29
29
  import {
30
30
  debounce_default,
31
31
  get_default,
@@ -42,13 +42,13 @@ import {
42
42
  require_lib,
43
43
  require_slugify,
44
44
  throttle_default
45
- } from "./chunk-XHTVY44R.js";
45
+ } from "./chunk-XVYDTYLW.js";
46
46
  import {
47
47
  require_dc_polyfill
48
- } from "./chunk-MQWMAIMX.js";
48
+ } from "./chunk-IHTQ3OOV.js";
49
49
  import {
50
50
  require_token_error
51
- } from "./chunk-EFJIK32J.js";
51
+ } from "./chunk-C2AI3D2F.js";
52
52
  import {
53
53
  SpanKind,
54
54
  SpanStatusCode,
@@ -58,7 +58,7 @@ import {
58
58
  init_esm,
59
59
  metrics,
60
60
  trace
61
- } from "./chunk-HV3DGTCB.js";
61
+ } from "./chunk-RKR3K5JY.js";
62
62
  import {
63
63
  __commonJS,
64
64
  __esm,
@@ -67,7 +67,7 @@ import {
67
67
  __toCommonJS,
68
68
  __toESM,
69
69
  init_cjs_shims
70
- } from "./chunk-4K3YGVEI.js";
70
+ } from "./chunk-ZGFK5NLR.js";
71
71
 
72
72
  // ../../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
73
73
  var require_constants2 = __commonJS({
@@ -97019,15 +97019,15 @@ var require_api_files = __commonJS({
97019
97019
  exports2.readAppApiYamlFile = readAppApiYamlFile4;
97020
97020
  exports2.resolveLanguageSpecificStepContentFromBlocks = resolveLanguageSpecificStepContentFromBlocks2;
97021
97021
  async function writeApiFiles3(...args) {
97022
- const esmFunction = await import("./api-KCT244UC.js");
97022
+ const esmFunction = await import("./api-QLJBZTD2.js");
97023
97023
  return esmFunction.writeApiFiles(...args);
97024
97024
  }
97025
97025
  async function readAppApiYamlFile4(...args) {
97026
- const esmFunction = await import("./api-KCT244UC.js");
97026
+ const esmFunction = await import("./api-QLJBZTD2.js");
97027
97027
  return esmFunction.readAppApiYamlFile(...args);
97028
97028
  }
97029
97029
  async function resolveLanguageSpecificStepContentFromBlocks2(...args) {
97030
- const esmFunction = await import("./api-KCT244UC.js");
97030
+ const esmFunction = await import("./api-QLJBZTD2.js");
97031
97031
  return esmFunction.resolveLanguageSpecificStepContentFromBlocks(...args);
97032
97032
  }
97033
97033
  }
@@ -105083,19 +105083,19 @@ var require_getMachineId = __commonJS({
105083
105083
  if (!getMachineIdImpl) {
105084
105084
  switch (process5.platform) {
105085
105085
  case "darwin":
105086
- getMachineIdImpl = (await import("./getMachineId-darwin-WGS4WF3G.js")).getMachineId;
105086
+ getMachineIdImpl = (await import("./getMachineId-darwin-P7OJE45A.js")).getMachineId;
105087
105087
  break;
105088
105088
  case "linux":
105089
- getMachineIdImpl = (await import("./getMachineId-linux-ZSN7MWU6.js")).getMachineId;
105089
+ getMachineIdImpl = (await import("./getMachineId-linux-AZC6T4X7.js")).getMachineId;
105090
105090
  break;
105091
105091
  case "freebsd":
105092
- getMachineIdImpl = (await import("./getMachineId-bsd-3XWTXOWT.js")).getMachineId;
105092
+ getMachineIdImpl = (await import("./getMachineId-bsd-YHT6QL7B.js")).getMachineId;
105093
105093
  break;
105094
105094
  case "win32":
105095
- getMachineIdImpl = (await import("./getMachineId-win-HPJTJHCV.js")).getMachineId;
105095
+ getMachineIdImpl = (await import("./getMachineId-win-HAGHUJ4Z.js")).getMachineId;
105096
105096
  break;
105097
105097
  default:
105098
- getMachineIdImpl = (await import("./getMachineId-unsupported-644UDN62.js")).getMachineId;
105098
+ getMachineIdImpl = (await import("./getMachineId-unsupported-WH44IPVC.js")).getMachineId;
105099
105099
  break;
105100
105100
  }
105101
105101
  }
@@ -116719,19 +116719,19 @@ var require_getMachineId2 = __commonJS({
116719
116719
  if (!getMachineIdImpl) {
116720
116720
  switch (process5.platform) {
116721
116721
  case "darwin":
116722
- getMachineIdImpl = (await import("./getMachineId-darwin-KGETADXZ.js")).getMachineId;
116722
+ getMachineIdImpl = (await import("./getMachineId-darwin-63W6WXGX.js")).getMachineId;
116723
116723
  break;
116724
116724
  case "linux":
116725
- getMachineIdImpl = (await import("./getMachineId-linux-GILQFQU2.js")).getMachineId;
116725
+ getMachineIdImpl = (await import("./getMachineId-linux-4E3WKYYB.js")).getMachineId;
116726
116726
  break;
116727
116727
  case "freebsd":
116728
- getMachineIdImpl = (await import("./getMachineId-bsd-6CCD5HZG.js")).getMachineId;
116728
+ getMachineIdImpl = (await import("./getMachineId-bsd-IYQLSHTK.js")).getMachineId;
116729
116729
  break;
116730
116730
  case "win32":
116731
- getMachineIdImpl = (await import("./getMachineId-win-WMTTQ57M.js")).getMachineId;
116731
+ getMachineIdImpl = (await import("./getMachineId-win-ZUOVTOQZ.js")).getMachineId;
116732
116732
  break;
116733
116733
  default:
116734
- getMachineIdImpl = (await import("./getMachineId-unsupported-YQWBJ2DS.js")).getMachineId;
116734
+ getMachineIdImpl = (await import("./getMachineId-unsupported-5N4OMC4O.js")).getMachineId;
116735
116735
  break;
116736
116736
  }
116737
116737
  }
@@ -191999,8 +191999,8 @@ var require_get_vercel_oidc_token = __commonJS({
191999
191999
  }
192000
192000
  try {
192001
192001
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
192002
- await import("./token-util-AZ5A32CR.js"),
192003
- await import("./token-2S7KDJBH.js")
192002
+ await import("./token-util-NS7KH42E.js"),
192003
+ await import("./token-XYTAZWV3.js")
192004
192004
  ]);
192005
192005
  if (!token2 || isExpired(getTokenPayload(token2))) {
192006
192006
  await refreshToken();
@@ -389259,7 +389259,7 @@ var require_config_loader = __commonJS({
389259
389259
  * @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
389260
389260
  */
389261
389261
  static async loadJiti() {
389262
- const { createJiti } = await import("./jiti-N7R6RKZ2.js");
389262
+ const { createJiti } = await import("./jiti-ORNJSCH4.js");
389263
389263
  const version5 = require_package5().version;
389264
389264
  return { createJiti, version: version5 };
389265
389265
  }
@@ -389588,7 +389588,7 @@ var require_eslint_helpers = __commonJS({
389588
389588
  }
389589
389589
  async function globMatch({ basePath, pattern }) {
389590
389590
  let found = false;
389591
- const { hfs } = await import("./src-D4PXCOWH.js");
389591
+ const { hfs } = await import("./src-E2UMCTA7.js");
389592
389592
  const patternToUse = normalizeToPosix(path80.relative(basePath, pattern));
389593
389593
  const matcher = new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
389594
389594
  const walkSettings = {
@@ -389628,7 +389628,7 @@ var require_eslint_helpers = __commonJS({
389628
389628
  return new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
389629
389629
  });
389630
389630
  const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
389631
- const { hfs } = await import("./src-D4PXCOWH.js");
389631
+ const { hfs } = await import("./src-E2UMCTA7.js");
389632
389632
  const walk2 = hfs.walk(basePath, {
389633
389633
  async directoryFilter(entry) {
389634
389634
  if (!matchers.some((matcher) => matcher.match(entry.path, true))) {
@@ -528000,7 +528000,7 @@ init_cjs_shims();
528000
528000
  // ../sdk/package.json
528001
528001
  var package_default = {
528002
528002
  name: "@superblocksteam/sdk",
528003
- version: "2.0.122-next.0",
528003
+ version: "2.0.123-next.0",
528004
528004
  description: "Superblocks JS SDK",
528005
528005
  homepage: "https://www.superblocks.com",
528006
528006
  license: "Superblocks Community Software License",
@@ -528362,7 +528362,7 @@ var config = void 0;
528362
528362
  var configured = false;
528363
528363
  var ddTracePromise = void 0;
528364
528364
  async function getDdTrace() {
528365
- ddTracePromise ??= import("./dd-trace-TYLKNLQX.js").then((module2) => module2.default);
528365
+ ddTracePromise ??= import("./dd-trace-QTEYHOVI.js").then((module2) => module2.default);
528366
528366
  return await ddTracePromise;
528367
528367
  }
528368
528368
  var deploymentType = (() => {
@@ -532437,7 +532437,7 @@ init_cjs_shims();
532437
532437
  var import_ai17 = __toESM(require_dist10(), 1);
532438
532438
  import { randomUUID as randomUUID3 } from "node:crypto";
532439
532439
  import os5 from "node:os";
532440
- import path54 from "node:path";
532440
+ import path55 from "node:path";
532441
532441
 
532442
532442
  // ../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js
532443
532443
  init_cjs_shims();
@@ -538061,7 +538061,7 @@ var MAX_ATTRIBUTE_LENGTH = 64e3;
538061
538061
  var LLMObsSpanWriter = null;
538062
538062
  async function loadLLMObsSpanWriter() {
538063
538063
  if (!LLMObsSpanWriter) {
538064
- const module2 = await import("./spans-PIAEEXV3.js");
538064
+ const module2 = await import("./spans-BL5W3XPJ.js");
538065
538065
  LLMObsSpanWriter = module2.default;
538066
538066
  }
538067
538067
  return LLMObsSpanWriter;
@@ -586264,6 +586264,116 @@ async function restoreContextFromCheckpoint({ applicationId, commitId, branchNam
586264
586264
  };
586265
586265
  }
586266
586266
 
586267
+ // ../../../vite-plugin-file-sync/dist/ai-service/context-upload.js
586268
+ init_cjs_shims();
586269
+ var import_util17 = __toESM(require_dist3());
586270
+ import { readdir as readdir9, readFile as readFile8 } from "node:fs/promises";
586271
+ import * as path45 from "node:path";
586272
+ async function uploadContextToBucketeer({ applicationId, commitId, branchName, appRootDirPath, userId, useServerUpload = false, superblocksBaseUrl, logger: logger17, jwt: jwt2 }) {
586273
+ const contextDir = path45.join(appRootDirPath, ".superblocks", "context", userId);
586274
+ let contextFiles;
586275
+ try {
586276
+ const entries = await readdir9(contextDir, { withFileTypes: true });
586277
+ contextFiles = entries.filter((entry) => entry.isFile()).map((entry) => entry.name);
586278
+ } catch (err) {
586279
+ if (err.code === "ENOENT") {
586280
+ logger17.info(`[uploadContextToBucketeer] No context directory found for userId=${userId}, skipping upload`);
586281
+ return;
586282
+ }
586283
+ throw err;
586284
+ }
586285
+ if (contextFiles.length === 0) {
586286
+ logger17.info(`[uploadContextToBucketeer] No context files found for userId=${userId}, skipping upload`);
586287
+ return;
586288
+ }
586289
+ const contextFileData = [];
586290
+ const uploadedFiles = [];
586291
+ for (const fileName of contextFiles) {
586292
+ const filePath = path45.join(contextDir, fileName);
586293
+ try {
586294
+ const fileBuffer = await readFile8(filePath);
586295
+ contextFileData.push({ data: fileBuffer, fileName });
586296
+ uploadedFiles.push(fileName);
586297
+ } catch (err) {
586298
+ logger17.warn(`[uploadContextToBucketeer] Failed to read context file ${fileName}, skipping`, getErrorMeta2(err));
586299
+ }
586300
+ }
586301
+ if (uploadedFiles.length === 0) {
586302
+ logger17.warn(`[uploadContextToBucketeer] No files were successfully read for upload`);
586303
+ return;
586304
+ }
586305
+ const buildFormData = () => {
586306
+ const formData = new FormData();
586307
+ for (const contextFile of contextFileData) {
586308
+ formData.append("context", new Blob([new Uint8Array(contextFile.data)]), contextFile.fileName);
586309
+ }
586310
+ return formData;
586311
+ };
586312
+ const uploadViaServer = async () => {
586313
+ const url4 = new URL(`${superblocksBaseUrl}/api/v1/files/upload`);
586314
+ url4.searchParams.set("scopeType", "app");
586315
+ url4.searchParams.set("purpose", "context");
586316
+ url4.searchParams.set("applicationId", applicationId);
586317
+ url4.searchParams.set("branchName", branchName);
586318
+ url4.searchParams.set("commitId", commitId);
586319
+ const response = await fetch(url4.toString(), {
586320
+ method: "POST",
586321
+ body: buildFormData(),
586322
+ headers: {
586323
+ Authorization: `Bearer ${jwt2}`
586324
+ }
586325
+ });
586326
+ if (!response.ok) {
586327
+ const errorText = await response.text().catch(() => "Unable to read error response");
586328
+ throw new Error(`Server context upload failed: status=${response.status}, error=${errorText}`);
586329
+ }
586330
+ };
586331
+ const uploadViaBucketeer = async () => {
586332
+ let scopedToken;
586333
+ try {
586334
+ scopedToken = await getScopedToken({
586335
+ applicationId,
586336
+ superblocksBaseUrl,
586337
+ jwt: jwt2
586338
+ });
586339
+ } catch (error40) {
586340
+ logger17.error("[uploadContextToBucketeer] Failed to get scoped token", getErrorMeta2(error40));
586341
+ throw error40;
586342
+ }
586343
+ const bucketeerUrl = (0, import_util17.getBucketeerUrlFromSuperblocksUrl)(superblocksBaseUrl);
586344
+ const url4 = `${bucketeerUrl}/applications/${applicationId}/branches/${encodeURIComponent(branchName)}/commits/${encodeURIComponent(commitId)}/context`;
586345
+ const response = await fetch(url4, {
586346
+ method: "POST",
586347
+ body: buildFormData(),
586348
+ headers: {
586349
+ Authorization: `Bearer ${scopedToken}`
586350
+ // Content-Type will be set automatically by fetch with boundary
586351
+ }
586352
+ });
586353
+ if (!response.ok) {
586354
+ const errorText = await response.text().catch(() => "Unable to read error response");
586355
+ logger17.error(`[uploadContextToBucketeer] Upload failed: status=${response.status}, statusText=${response.statusText}, error=${errorText} for applicationId=${applicationId}, commitId=${commitId}`);
586356
+ throw new Error(`Context upload failed: ${response.statusText}`);
586357
+ }
586358
+ };
586359
+ try {
586360
+ if (useServerUpload) {
586361
+ try {
586362
+ await uploadViaServer();
586363
+ } catch (error40) {
586364
+ logger17.warn("[uploadContextToBucketeer] Server context upload failed, falling back to Bucketeer", getErrorMeta2(error40));
586365
+ await uploadViaBucketeer();
586366
+ }
586367
+ } else {
586368
+ await uploadViaBucketeer();
586369
+ }
586370
+ logger17.info(`[uploadContextToBucketeer] Successfully uploaded ${uploadedFiles.length} context file(s) (${uploadedFiles.join(", ")}) for applicationId=${applicationId}, commitId=${commitId}`);
586371
+ } catch (error40) {
586372
+ logger17.error("[uploadContextToBucketeer] Failed to upload context", getErrorMeta2(error40));
586373
+ throw error40;
586374
+ }
586375
+ }
586376
+
586267
586377
  // ../../../vite-plugin-file-sync/dist/ai-service/context/app-context.js
586268
586378
  init_cjs_shims();
586269
586379
  var __runInitializers9 = function(thisArg, initializers, value2) {
@@ -602001,7 +602111,7 @@ var JudgeService = class {
602001
602111
  // ../../../vite-plugin-file-sync/dist/ai-service/judge/storage/csv-storage.js
602002
602112
  init_cjs_shims();
602003
602113
  import { promises as fs27 } from "fs";
602004
- import path45 from "path";
602114
+ import path46 from "path";
602005
602115
  var DEFAULT_STORAGE_DIR = ".superblocks/judge-evaluations";
602006
602116
  var CSV_HEADER = "timestamp,promptId,branchName,commitSha,appId,prompt,passed,score,feedback\n";
602007
602117
  var CsvJudgeStorage = class {
@@ -602013,7 +602123,7 @@ var CsvJudgeStorage = class {
602013
602123
  * @param filename - CSV filename (default: evaluations.csv)
602014
602124
  */
602015
602125
  constructor(storageDir = DEFAULT_STORAGE_DIR, filename = "evaluations.csv") {
602016
- this.filePath = path45.join(storageDir, filename);
602126
+ this.filePath = path46.join(storageDir, filename);
602017
602127
  }
602018
602128
  /**
602019
602129
  * Ensures the storage directory and file exist.
@@ -602021,7 +602131,7 @@ var CsvJudgeStorage = class {
602021
602131
  * Creates directory if needed and initializes CSV with header row.
602022
602132
  */
602023
602133
  async ensureStorageExists() {
602024
- const dir = path45.dirname(this.filePath);
602134
+ const dir = path46.dirname(this.filePath);
602025
602135
  await fs27.mkdir(dir, { recursive: true });
602026
602136
  try {
602027
602137
  await fs27.access(this.filePath);
@@ -604235,7 +604345,7 @@ init_cjs_shims();
604235
604345
  // ../../../vite-plugin-file-sync/dist/ai-service/llm/context-v2/session-capture.js
604236
604346
  init_cjs_shims();
604237
604347
  import { writeFileSync as writeFileSync2, mkdirSync as mkdirSync4, existsSync as existsSync2 } from "node:fs";
604238
- import { join as join14 } from "node:path";
604348
+ import { join as join15 } from "node:path";
604239
604349
  var logger5 = getPrefixedLogger("[session-capture]");
604240
604350
  var CAPTURE_ENABLED = false;
604241
604351
  function isTestEnvironment() {
@@ -604248,7 +604358,7 @@ function isEnabled() {
604248
604358
  return CAPTURE_ENABLED;
604249
604359
  }
604250
604360
  function getCaptureDir(rootDir) {
604251
- return join14(rootDir, ".superblocks", "captured-sessions");
604361
+ return join15(rootDir, ".superblocks", "captured-sessions");
604252
604362
  }
604253
604363
  function ensureDir(captureDir) {
604254
604364
  if (!existsSync2(captureDir)) {
@@ -604271,7 +604381,7 @@ function captureSession(data3, rootDir) {
604271
604381
  usage: data3.usage
604272
604382
  };
604273
604383
  const filename = generateFilename();
604274
- const filepath = join14(captureDir, filename);
604384
+ const filepath = join15(captureDir, filename);
604275
604385
  writeFileSync2(filepath, JSON.stringify(session, null, 2));
604276
604386
  logger5.info(`Captured session to ${filepath}`);
604277
604387
  return filepath;
@@ -605258,6 +605368,16 @@ var ContextManagerV2 = class {
605258
605368
  this.contexts.clear();
605259
605369
  await this.storage.deleteAllContexts();
605260
605370
  }
605371
+ /**
605372
+ * Persists an empty context record to storage for the given id.
605373
+ * Used by handleNewChat() to overwrite the local (and later remote)
605374
+ * context so that the remote restore fallback downloads an empty
605375
+ * conversation instead of the previously cleared one.
605376
+ */
605377
+ async persistEmptyContext(id2) {
605378
+ const emptyRecord = { version: 2, messages: [] };
605379
+ await this.storage.saveContext(id2, emptyRecord);
605380
+ }
605261
605381
  /**
605262
605382
  * Loads context from persistent storage.
605263
605383
  * Handles version migration automatically.
@@ -615254,7 +615374,7 @@ var PlaywrightMcpServerManager = class {
615254
615374
  this.logger.info(`Starting embedded Playwright MCP server: browser=${options8?.browser || "chromium"}, headless=${options8?.headless !== false}`);
615255
615375
  }
615256
615376
  try {
615257
- const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-ECG3I2N7.js");
615377
+ const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-TYDEIXB2.js");
615258
615378
  this.server = await startEmbeddedPlaywrightMcpServer({
615259
615379
  storageStatePath: options8?.storageStatePath,
615260
615380
  jwt: options8?.jwt,
@@ -615866,7 +615986,7 @@ init_lodash();
615866
615986
  init_cjs_shims();
615867
615987
  var import_archiver = __toESM(require_archiver());
615868
615988
  import { createWriteStream as createWriteStream4, promises as fs28 } from "node:fs";
615869
- import path46 from "node:path";
615989
+ import path47 from "node:path";
615870
615990
  import { pipeline as pipeline3 } from "node:stream/promises";
615871
615991
  var RECORDING_FILENAME = "recording.jsonl";
615872
615992
  var SESSIONS_FILENAME = "sessions.json";
@@ -615906,19 +616026,19 @@ var SessionRecordingStorage = class {
615906
616026
  * Get the path to a session's directory.
615907
616027
  */
615908
616028
  getSessionDir(sessionId) {
615909
- return path46.join(this.recordingsDir, sessionId);
616029
+ return path47.join(this.recordingsDir, sessionId);
615910
616030
  }
615911
616031
  /**
615912
616032
  * Get the path to a session's recording file.
615913
616033
  */
615914
616034
  getSessionFilePath(sessionId) {
615915
- return path46.join(this.recordingsDir, sessionId, RECORDING_FILENAME);
616035
+ return path47.join(this.recordingsDir, sessionId, RECORDING_FILENAME);
615916
616036
  }
615917
616037
  /**
615918
616038
  * Get the path to the sessions index file.
615919
616039
  */
615920
616040
  getSessionsIndexPath() {
615921
- return path46.join(this.recordingsDir, SESSIONS_FILENAME);
616041
+ return path47.join(this.recordingsDir, SESSIONS_FILENAME);
615922
616042
  }
615923
616043
  /**
615924
616044
  * Ensures the storage directory exists for the current session.
@@ -616117,7 +616237,7 @@ var SessionRecordingStorage = class {
616117
616237
  */
616118
616238
  async createSnapshot(sessionId, appRootDirPath, maxFileSizeBytes = DEFAULT_SNAPSHOT_MAX_FILE_SIZE_BYTES) {
616119
616239
  await this.ensureStorageExists(sessionId);
616120
- const snapshotPath = path46.join(this.getSessionDir(sessionId), SNAPSHOT_FILENAME);
616240
+ const snapshotPath = path47.join(this.getSessionDir(sessionId), SNAPSHOT_FILENAME);
616121
616241
  const skippedFiles = [];
616122
616242
  const archive = (0, import_archiver.default)("zip", { zlib: { level: 9 } });
616123
616243
  archive.on("error", (err) => {
@@ -616148,8 +616268,8 @@ var SessionRecordingStorage = class {
616148
616268
  const results = [];
616149
616269
  const entries = await fs28.readdir(dir, { withFileTypes: true });
616150
616270
  for (const entry of entries) {
616151
- const absolutePath = path46.join(dir, entry.name);
616152
- const relativePath = path46.relative(rootDir, absolutePath);
616271
+ const absolutePath = path47.join(dir, entry.name);
616272
+ const relativePath = path47.relative(rootDir, absolutePath);
616153
616273
  if (entry.isDirectory()) {
616154
616274
  const pathParts = relativePath.split("/");
616155
616275
  if (!shouldIncludeInSnapshot(relativePath, pathParts)) {
@@ -616646,7 +616766,7 @@ import { createHash as createHash3 } from "node:crypto";
616646
616766
  import { createReadStream as createReadStream2, createWriteStream as createWriteStream5 } from "node:fs";
616647
616767
  import fs29 from "node:fs/promises";
616648
616768
  import os3 from "node:os";
616649
- import path47 from "node:path";
616769
+ import path48 from "node:path";
616650
616770
  import { Readable as Readable4 } from "node:stream";
616651
616771
  import { pipeline as pipeline4 } from "node:stream/promises";
616652
616772
  import { createGunzip as createGunzip2 } from "node:zlib";
@@ -616730,7 +616850,7 @@ function sanitizeBlockIntegrations(blocks, availableIntegrationIds) {
616730
616850
 
616731
616851
  // ../../../vite-plugin-file-sync/dist/ai-service/recording/snapshot-manager.js
616732
616852
  var MAX_UPLOAD_AGE_MS = 24 * 60 * 60 * 1e3;
616733
- var TRACKING_FILE_REL_PATH = path47.join(".superblocks", "snapshot-restore.json");
616853
+ var TRACKING_FILE_REL_PATH = path48.join(".superblocks", "snapshot-restore.json");
616734
616854
  async function getFileSize(filePath) {
616735
616855
  try {
616736
616856
  const stats = await fs29.stat(filePath);
@@ -616757,17 +616877,17 @@ function extractZip(input, destDir) {
616757
616877
  return reject(err ?? new Error("Failed to open zip"));
616758
616878
  zipfile.on("error", reject);
616759
616879
  zipfile.readEntry();
616760
- const resolvedDestDir = path47.resolve(destDir) + path47.sep;
616880
+ const resolvedDestDir = path48.resolve(destDir) + path48.sep;
616761
616881
  zipfile.on("entry", (entry) => {
616762
- const dest3 = path47.resolve(destDir, entry.fileName);
616763
- if (!dest3.startsWith(resolvedDestDir) && dest3 !== path47.resolve(destDir)) {
616882
+ const dest3 = path48.resolve(destDir, entry.fileName);
616883
+ if (!dest3.startsWith(resolvedDestDir) && dest3 !== path48.resolve(destDir)) {
616764
616884
  return reject(new Error(`Zip entry escapes target directory: ${entry.fileName}`));
616765
616885
  }
616766
616886
  if (/\/$/.test(entry.fileName)) {
616767
616887
  fs29.mkdir(dest3, { recursive: true }).then(() => zipfile.readEntry(), reject);
616768
616888
  return;
616769
616889
  }
616770
- fs29.mkdir(path47.dirname(dest3), { recursive: true }).then(() => {
616890
+ fs29.mkdir(path48.dirname(dest3), { recursive: true }).then(() => {
616771
616891
  zipfile.openReadStream(entry, (streamErr, readStream2) => {
616772
616892
  if (streamErr || !readStream2) {
616773
616893
  return reject(streamErr ?? new Error("Failed to open read stream"));
@@ -616800,14 +616920,14 @@ var SnapshotManager = class {
616800
616920
  */
616801
616921
  constructor(userId) {
616802
616922
  this.userId = userId;
616803
- this.baseDir = path47.join(os3.tmpdir(), "superblocks-replay", userId);
616923
+ this.baseDir = path48.join(os3.tmpdir(), "superblocks-replay", userId);
616804
616924
  }
616805
616925
  /**
616806
616926
  * Get the main extraction subdirectory within an upload directory.
616807
616927
  * The main tar is extracted here; session extractions are siblings.
616808
616928
  */
616809
616929
  mainDir(uploadDir) {
616810
- return path47.join(uploadDir, "main");
616930
+ return path48.join(uploadDir, "main");
616811
616931
  }
616812
616932
  /**
616813
616933
  * Scan the base directory for recent uploads.
@@ -616820,7 +616940,7 @@ var SnapshotManager = class {
616820
616940
  const now = Date.now();
616821
616941
  let mostRecent = null;
616822
616942
  for (const dir of directories) {
616823
- const dirPath = path47.join(this.baseDir, dir.name);
616943
+ const dirPath = path48.join(this.baseDir, dir.name);
616824
616944
  const stats = await fs29.stat(dirPath);
616825
616945
  const age = now - stats.mtime.getTime();
616826
616946
  if (age < MAX_UPLOAD_AGE_MS) {
@@ -616832,7 +616952,7 @@ var SnapshotManager = class {
616832
616952
  if (mostRecent) {
616833
616953
  return {
616834
616954
  uploadId: mostRecent.uploadId,
616835
- extractedDir: path47.join(this.baseDir, mostRecent.uploadId),
616955
+ extractedDir: path48.join(this.baseDir, mostRecent.uploadId),
616836
616956
  uploadedAt: mostRecent.mtime
616837
616957
  };
616838
616958
  }
@@ -616881,7 +617001,7 @@ var SnapshotManager = class {
616881
617001
  return null;
616882
617002
  }
616883
617003
  const mainContentDir = this.mainDir(upload.extractedDir);
616884
- const superblocksJsonPath = path47.join(mainContentDir, ".superblocks", "superblocks.json");
617004
+ const superblocksJsonPath = path48.join(mainContentDir, ".superblocks", "superblocks.json");
616885
617005
  let appId = null;
616886
617006
  try {
616887
617007
  const content17 = await fs29.readFile(superblocksJsonPath, "utf-8");
@@ -616889,15 +617009,15 @@ var SnapshotManager = class {
616889
617009
  appId = config4.id || null;
616890
617010
  } catch {
616891
617011
  }
616892
- const sessionsPath = path47.join(mainContentDir, ".superblocks", "recordings", "sessions.json");
617012
+ const sessionsPath = path48.join(mainContentDir, ".superblocks", "recordings", "sessions.json");
616893
617013
  let sessions = [];
616894
617014
  try {
616895
617015
  const content17 = await fs29.readFile(sessionsPath, "utf-8");
616896
617016
  const sessionsList = JSON.parse(content17);
616897
617017
  sessions = await Promise.all(sessionsList.map(async (session) => {
616898
- const sessionRecDir = path47.join(mainContentDir, ".superblocks", "recordings", session.id);
616899
- const recordingSize = await getFileSize(path47.join(sessionRecDir, "recording.jsonl"));
616900
- const snapshotSize = await getFileSize(path47.join(sessionRecDir, "snapshot.zip")) ?? await getFileSize(path47.join(sessionRecDir, "snapshot.tar.gz"));
617018
+ const sessionRecDir = path48.join(mainContentDir, ".superblocks", "recordings", session.id);
617019
+ const recordingSize = await getFileSize(path48.join(sessionRecDir, "recording.jsonl"));
617020
+ const snapshotSize = await getFileSize(path48.join(sessionRecDir, "snapshot.zip")) ?? await getFileSize(path48.join(sessionRecDir, "snapshot.tar.gz"));
616901
617021
  const { sessionDir: extractionDir } = await this.getSessionExtractionDir(upload.extractedDir, session.id);
616902
617022
  let meta3;
616903
617023
  try {
@@ -616938,7 +617058,7 @@ var SnapshotManager = class {
616938
617058
  }
616939
617059
  this.currentUpload = null;
616940
617060
  const uploadId = createHash3("md5").update(archiveBuffer).digest("hex");
616941
- const uploadDir = path47.join(this.baseDir, uploadId);
617061
+ const uploadDir = path48.join(this.baseDir, uploadId);
616942
617062
  const mainExtractDir = this.mainDir(uploadDir);
616943
617063
  logger17.info(`[snapshot-upload] Starting extraction to ${mainExtractDir}`, {
616944
617064
  uploadId,
@@ -617016,15 +617136,15 @@ var SnapshotManager = class {
617016
617136
  throw new SnapshotRestoreError("Upload not found or no longer available");
617017
617137
  }
617018
617138
  const writeSuperblocksJsonInto = async (targetDir) => {
617019
- const sjPath = path47.join(appRootDir, ".superblocks", "superblocks.json");
617139
+ const sjPath = path48.join(appRootDir, ".superblocks", "superblocks.json");
617020
617140
  let sjBuffer = null;
617021
617141
  try {
617022
617142
  sjBuffer = await fs29.readFile(sjPath);
617023
617143
  } catch {
617024
617144
  }
617025
617145
  if (sjBuffer) {
617026
- const destPath = path47.join(targetDir, ".superblocks", "superblocks.json");
617027
- await fs29.mkdir(path47.dirname(destPath), { recursive: true });
617146
+ const destPath = path48.join(targetDir, ".superblocks", "superblocks.json");
617147
+ await fs29.mkdir(path48.dirname(destPath), { recursive: true });
617028
617148
  await fs29.writeFile(destPath, new Uint8Array(sjBuffer));
617029
617149
  }
617030
617150
  };
@@ -617058,7 +617178,7 @@ var SnapshotManager = class {
617058
617178
  */
617059
617179
  async computeSnapshotMeta(dir) {
617060
617180
  const listSubdirs = async (subdir) => {
617061
- const fullPath = path47.join(dir, subdir);
617181
+ const fullPath = path48.join(dir, subdir);
617062
617182
  try {
617063
617183
  const entries = await fs29.readdir(fullPath, { withFileTypes: true });
617064
617184
  return entries.filter((e) => e.isDirectory()).map((e) => e.name).sort();
@@ -617099,19 +617219,19 @@ var SnapshotManager = class {
617099
617219
  * falling back to `snapshot.tar.gz` for older snapshots.
617100
617220
  */
617101
617221
  async getSessionExtractionDir(uploadDir, sessionId) {
617102
- const recDir = path47.join(this.mainDir(uploadDir), ".superblocks", "recordings", sessionId);
617103
- const zipPath = path47.join(recDir, "snapshot.zip");
617222
+ const recDir = path48.join(this.mainDir(uploadDir), ".superblocks", "recordings", sessionId);
617223
+ const zipPath = path48.join(recDir, "snapshot.zip");
617104
617224
  try {
617105
617225
  await fs29.access(zipPath);
617106
617226
  return {
617107
- sessionDir: path47.join(uploadDir, sessionId),
617227
+ sessionDir: path48.join(uploadDir, sessionId),
617108
617228
  snapshotPath: zipPath
617109
617229
  };
617110
617230
  } catch {
617111
617231
  }
617112
617232
  return {
617113
- sessionDir: path47.join(uploadDir, sessionId),
617114
- snapshotPath: path47.join(recDir, "snapshot.tar.gz")
617233
+ sessionDir: path48.join(uploadDir, sessionId),
617234
+ snapshotPath: path48.join(recDir, "snapshot.tar.gz")
617115
617235
  };
617116
617236
  }
617117
617237
  /**
@@ -617182,7 +617302,7 @@ var SnapshotManager = class {
617182
617302
  logger17.info("[snapshot-restore] sanitizeSourceIntegrations", {
617183
617303
  sourceDir
617184
617304
  });
617185
- const apisDir = path47.join(sourceDir, "apis");
617305
+ const apisDir = path48.join(sourceDir, "apis");
617186
617306
  let apiDirs = [];
617187
617307
  try {
617188
617308
  const entries = await fs29.readdir(apisDir, { withFileTypes: true });
@@ -617191,7 +617311,7 @@ var SnapshotManager = class {
617191
617311
  }
617192
617312
  const allSanitizedIds = /* @__PURE__ */ new Set();
617193
617313
  for (const apiName of apiDirs) {
617194
- const yamlPath = path47.join(apisDir, apiName, "api.yaml");
617314
+ const yamlPath = path48.join(apisDir, apiName, "api.yaml");
617195
617315
  try {
617196
617316
  const content17 = await fs29.readFile(yamlPath, "utf-8");
617197
617317
  const parsed = import_yaml6.default.parse(content17);
@@ -617228,7 +617348,7 @@ var SnapshotManager = class {
617228
617348
  for (const entry of entries) {
617229
617349
  if (SKIP_DIRS.has(entry.name))
617230
617350
  continue;
617231
- await fs29.rm(path47.join(appRootDir, entry.name), {
617351
+ await fs29.rm(path48.join(appRootDir, entry.name), {
617232
617352
  recursive: true,
617233
617353
  force: true
617234
617354
  });
@@ -617247,13 +617367,13 @@ var SnapshotManager = class {
617247
617367
  */
617248
617368
  async createPendingRestore(appRootDir, uploadId, sourceDir) {
617249
617369
  const logger17 = getLogger3();
617250
- const trackingFilePath = path47.join(appRootDir, TRACKING_FILE_REL_PATH);
617370
+ const trackingFilePath = path48.join(appRootDir, TRACKING_FILE_REL_PATH);
617251
617371
  const tracking = {
617252
617372
  uploadId,
617253
617373
  sourceDir,
617254
617374
  restoredAt: null
617255
617375
  };
617256
- await fs29.mkdir(path47.dirname(trackingFilePath), { recursive: true });
617376
+ await fs29.mkdir(path48.dirname(trackingFilePath), { recursive: true });
617257
617377
  await fs29.writeFile(trackingFilePath, JSON.stringify(tracking, null, 2));
617258
617378
  logger17.info("[snapshot-restore] Created pending restore tracking file", {
617259
617379
  uploadId,
@@ -617271,7 +617391,7 @@ var SnapshotManager = class {
617271
617391
  */
617272
617392
  async executePendingRestore(appRootDir) {
617273
617393
  const logger17 = getLogger3();
617274
- const trackingFilePath = path47.join(appRootDir, TRACKING_FILE_REL_PATH);
617394
+ const trackingFilePath = path48.join(appRootDir, TRACKING_FILE_REL_PATH);
617275
617395
  let tracking;
617276
617396
  try {
617277
617397
  const raw2 = await fs29.readFile(trackingFilePath, "utf-8");
@@ -617301,7 +617421,7 @@ var SnapshotManager = class {
617301
617421
  ...tracking,
617302
617422
  restoredAt
617303
617423
  };
617304
- await fs29.mkdir(path47.dirname(trackingFilePath), { recursive: true });
617424
+ await fs29.mkdir(path48.dirname(trackingFilePath), { recursive: true });
617305
617425
  await fs29.writeFile(trackingFilePath, JSON.stringify(updatedTracking, null, 2));
617306
617426
  logger17.info("[snapshot-restore] Restore complete", {
617307
617427
  uploadId: tracking.uploadId,
@@ -618859,7 +618979,7 @@ var doIdle = (clark, { chatSessionStore, clarkProfiler }) => {
618859
618979
 
618860
618980
  // ../../../vite-plugin-file-sync/dist/ai-service/state-machine/handlers/llm-generating.js
618861
618981
  init_cjs_shims();
618862
- import path51 from "node:path";
618982
+ import path52 from "node:path";
618863
618983
  var import_shared43 = __toESM(require_dist2());
618864
618984
 
618865
618985
  // ../../../vite-plugin-file-sync/dist/ai-service/agent/prompts/build-base-system-prompt.js
@@ -620481,14 +620601,14 @@ var DEFAULT_SAFETY_GUIDANCE = (
620481
620601
 
620482
620602
  // ../../../vite-plugin-file-sync/dist/ai-service/agent/tools.js
620483
620603
  init_cjs_shims();
620484
- import path50 from "node:path";
620604
+ import path51 from "node:path";
620485
620605
 
620486
620606
  // ../../../vite-plugin-file-sync/dist/migration/migration-verification.js
620487
620607
  init_cjs_shims();
620488
620608
  var import_yaml7 = __toESM(require_dist());
620489
620609
  import crypto6 from "node:crypto";
620490
- import { mkdir as mkdir14, readFile as readFile8, rename as rename2, rm as rm8, writeFile as writeFile10 } from "node:fs/promises";
620491
- import { join as join15 } from "node:path";
620610
+ import { mkdir as mkdir14, readFile as readFile9, rename as rename2, rm as rm8, writeFile as writeFile10 } from "node:fs/promises";
620611
+ import { join as join16 } from "node:path";
620492
620612
  var import_shared39 = __toESM(require_dist2());
620493
620613
 
620494
620614
  // ../../../vite-plugin-file-sync/dist/ai-service/agent/tools/apis/analysis.js
@@ -621995,10 +622115,10 @@ async function runMigrationVerification(params) {
621995
622115
  }
621996
622116
  async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pipeline, runV3Sdk, allowAskPolicy }) {
621997
622117
  const verificationInputs = inputs ?? {};
621998
- const apiTsPath = join15(appRootDir, "server", "apis", apiName, "api.ts");
622118
+ const apiTsPath = join16(appRootDir, "server", "apis", apiName, "api.ts");
621999
622119
  let source2;
622000
622120
  try {
622001
- source2 = await readFile8(apiTsPath, "utf-8");
622121
+ source2 = await readFile9(apiTsPath, "utf-8");
622002
622122
  } catch (error40) {
622003
622123
  return {
622004
622124
  kind: "error",
@@ -622024,7 +622144,7 @@ async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pi
622024
622144
  skipPolicy: "ask"
622025
622145
  };
622026
622146
  }
622027
- const v2BackupPath = join15(appRootDir, SCRATCH_DIR, V2_BACKUP_DIR, "apis", apiName, "api.yaml");
622147
+ const v2BackupPath = join16(appRootDir, SCRATCH_DIR, V2_BACKUP_DIR, "apis", apiName, "api.yaml");
622028
622148
  const v2Analysis = await analyzeV2BackupMutations(v2BackupPath);
622029
622149
  const mutationDetails = [
622030
622150
  ...mutations.map((m) => `v3 ${m.type} "${m.name}": ${m.details}`),
@@ -622117,9 +622237,9 @@ async function computeVerificationOutcome({ apiName, appRootDir, inputs, runV2Pi
622117
622237
  if (diff.empty) {
622118
622238
  return { kind: "passed" };
622119
622239
  }
622120
- const verificationDir = join15(appRootDir, SCRATCH_DIR, VERIFICATION_DIR);
622240
+ const verificationDir = join16(appRootDir, SCRATCH_DIR, VERIFICATION_DIR);
622121
622241
  await mkdir14(verificationDir, { recursive: true });
622122
- const diffPath2 = join15(verificationDir, `${apiName}.diff.json`);
622242
+ const diffPath2 = join16(verificationDir, `${apiName}.diff.json`);
622123
622243
  const diffJson = JSON.stringify({ valuesForUi: diff.valuesForUi }, null, 2);
622124
622244
  const payload = diffJson.length > DIFF_SIZE_CAP ? JSON.stringify({ valuesForUi: diff.valuesForUi.slice(0, 50), truncated: true }, null, 2) : diffJson;
622125
622245
  await writeFile10(diffPath2, payload, "utf-8");
@@ -622201,7 +622321,7 @@ var migrationVerificationToolFactory = createToolFactory("runMigrationVerificati
622201
622321
  inputs,
622202
622322
  allowAskPolicy: true,
622203
622323
  runV2Pipeline: async (sourcePath, pipelineInputs) => {
622204
- const yamlContent = await readFile8(sourcePath, "utf-8");
622324
+ const yamlContent = await readFile9(sourcePath, "utf-8");
622205
622325
  const apiDefinition = import_yaml7.default.parse(yamlContent);
622206
622326
  const editorClient = clark.context.peer;
622207
622327
  if (!editorClient)
@@ -622355,7 +622475,7 @@ function withTimeout(promise2, ms, label2) {
622355
622475
  async function analyzeV2BackupMutations(v2BackupPath) {
622356
622476
  let raw2;
622357
622477
  try {
622358
- raw2 = await readFile8(v2BackupPath, "utf-8");
622478
+ raw2 = await readFile9(v2BackupPath, "utf-8");
622359
622479
  } catch {
622360
622480
  return { mutationDetails: [], integrationIds: [] };
622361
622481
  }
@@ -622385,7 +622505,7 @@ async function analyzeV2BackupMutations(v2BackupPath) {
622385
622505
  }
622386
622506
  async function readIntegrationWritePolicy(appRootDir) {
622387
622507
  try {
622388
- const raw2 = await readFile8(join15(appRootDir, SCRATCH_DIR, "migration-state.json"), "utf-8");
622508
+ const raw2 = await readFile9(join16(appRootDir, SCRATCH_DIR, "migration-state.json"), "utf-8");
622389
622509
  const parsed = JSON.parse(raw2);
622390
622510
  const pol = parsed.integrationWritePolicy;
622391
622511
  if (pol !== null && typeof pol === "object" && !Array.isArray(pol)) {
@@ -622404,7 +622524,7 @@ function mostRestrictivePolicy(policies) {
622404
622524
  }
622405
622525
  async function getEffectiveMigrationWritePolicy({ appRootDir, apiName, integrationIds }) {
622406
622526
  const policy = await readIntegrationWritePolicy(appRootDir);
622407
- const v2BackupPath = join15(appRootDir, SCRATCH_DIR, V2_BACKUP_DIR, "apis", apiName, "api.yaml");
622527
+ const v2BackupPath = join16(appRootDir, SCRATCH_DIR, V2_BACKUP_DIR, "apis", apiName, "api.yaml");
622408
622528
  const v2Analysis = await analyzeV2BackupMutations(v2BackupPath);
622409
622529
  const sourceIds = Array.from(/* @__PURE__ */ new Set([...integrationIds ?? [], ...v2Analysis.integrationIds])).filter((id2) => !LANGUAGE_PLUGIN_IDS.has(id2));
622410
622530
  const effective = sourceIds.length > 0 ? mostRestrictivePolicy(sourceIds.map((id2) => policy[id2] ?? "ask")) : "ask";
@@ -622466,11 +622586,11 @@ function assertSafeApiName(apiName) {
622466
622586
  }
622467
622587
  function historyPath(appRootDir, apiName) {
622468
622588
  assertSafeApiName(apiName);
622469
- return join15(appRootDir, SCRATCH_DIR, VERIFICATION_DIR, `${apiName}.history.json`);
622589
+ return join16(appRootDir, SCRATCH_DIR, VERIFICATION_DIR, `${apiName}.history.json`);
622470
622590
  }
622471
622591
  function diffPath(appRootDir, apiName) {
622472
622592
  assertSafeApiName(apiName);
622473
- return join15(appRootDir, SCRATCH_DIR, VERIFICATION_DIR, `${apiName}.diff.json`);
622593
+ return join16(appRootDir, SCRATCH_DIR, VERIFICATION_DIR, `${apiName}.diff.json`);
622474
622594
  }
622475
622595
  async function clearVerificationHistory(appRootDir, apiName) {
622476
622596
  const histPath = historyPath(appRootDir, apiName);
@@ -622507,7 +622627,7 @@ function findLastDivergedShapeHash(history) {
622507
622627
  async function readHistory(appRootDir, apiName) {
622508
622628
  let raw2;
622509
622629
  try {
622510
- raw2 = await readFile8(historyPath(appRootDir, apiName), "utf-8");
622630
+ raw2 = await readFile9(historyPath(appRootDir, apiName), "utf-8");
622511
622631
  } catch {
622512
622632
  return { attempts: [] };
622513
622633
  }
@@ -622539,7 +622659,7 @@ async function writeHistoryEntry(appRootDir, apiName, entry) {
622539
622659
  try {
622540
622660
  const history = await readHistory(appRootDir, apiName);
622541
622661
  history.attempts.push(entry);
622542
- const dir = join15(appRootDir, SCRATCH_DIR, VERIFICATION_DIR);
622662
+ const dir = join16(appRootDir, SCRATCH_DIR, VERIFICATION_DIR);
622543
622663
  await mkdir14(dir, { recursive: true });
622544
622664
  const finalPath = historyPath(appRootDir, apiName);
622545
622665
  const tmpPath = `${finalPath}.tmp`;
@@ -622554,7 +622674,7 @@ async function writeHistoryEntry(appRootDir, apiName, entry) {
622554
622674
  }
622555
622675
  async function readLastDivergedDiff(appRootDir, apiName) {
622556
622676
  try {
622557
- const raw2 = await readFile8(diffPath(appRootDir, apiName), "utf-8");
622677
+ const raw2 = await readFile9(diffPath(appRootDir, apiName), "utf-8");
622558
622678
  const parsed = JSON.parse(raw2);
622559
622679
  if (parsed && typeof parsed === "object" && "valuesForUi" in parsed && Array.isArray(parsed.valuesForUi)) {
622560
622680
  return {
@@ -623111,13 +623231,13 @@ init_cjs_shims();
623111
623231
 
623112
623232
  // ../../../vite-plugin-file-sync/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js
623113
623233
  init_cjs_shims();
623114
- import { readFile as readFile10 } from "node:fs/promises";
623234
+ import { readFile as readFile11 } from "node:fs/promises";
623115
623235
  import { createRequire as createRequire2 } from "node:module";
623116
623236
  import { dirname as dirname16, resolve as resolve12 } from "node:path";
623117
623237
 
623118
623238
  // ../../../sdk-api/dist/integrations/documentation.js
623119
623239
  init_cjs_shims();
623120
- import { readFile as readFile9 } from "node:fs/promises";
623240
+ import { readFile as readFile10 } from "node:fs/promises";
623121
623241
  import { dirname as dirname15, resolve as resolve11 } from "node:path";
623122
623242
  import { fileURLToPath as fileURLToPath3 } from "node:url";
623123
623243
  var INTEGRATIONS_DIR = dirname15(fileURLToPath3(import.meta.url));
@@ -623136,7 +623256,7 @@ function getDocDirectoryForPlugin(pluginId) {
623136
623256
  async function parseDocumentationManifest(manifestPath) {
623137
623257
  let raw2;
623138
623258
  try {
623139
- raw2 = await readFile9(manifestPath, "utf8");
623259
+ raw2 = await readFile10(manifestPath, "utf8");
623140
623260
  } catch (error40) {
623141
623261
  if (error40 instanceof Error && "code" in error40 && error40.code === "ENOENT") {
623142
623262
  return null;
@@ -623388,7 +623508,7 @@ async function resolveIntegrationDocumentation(pluginId, options8 = {}) {
623388
623508
  const manifest = await parseDocumentationManifest(manifestPath);
623389
623509
  const baseFileName = manifest?.base ?? "README.md";
623390
623510
  const baseDocumentationPath = resolve11(pluginDirectory, baseFileName);
623391
- const baseDocumentation = await readFile9(baseDocumentationPath, "utf8");
623511
+ const baseDocumentation = await readFile10(baseDocumentationPath, "utf8");
623392
623512
  if (!manifest) {
623393
623513
  return baseDocumentation;
623394
623514
  }
@@ -623399,7 +623519,7 @@ async function resolveIntegrationDocumentation(pluginId, options8 = {}) {
623399
623519
  }
623400
623520
  const overlayPath = resolve11(pluginDirectory, overlay.file);
623401
623521
  ensureOverlayPathIsWithinPluginDir(pluginDirectory, overlayPath);
623402
- const overlayDocumentation = await readFile9(overlayPath, "utf8");
623522
+ const overlayDocumentation = await readFile10(overlayPath, "utf8");
623403
623523
  resolvedDocumentation = applyOverlay(resolvedDocumentation, overlayDocumentation);
623404
623524
  }
623405
623525
  return resolvedDocumentation;
@@ -623412,7 +623532,7 @@ var SDK_API_INTEGRATIONS_DIRECTORY = resolve12(SDK_API_PACKAGE_DIRECTORY, "src/i
623412
623532
  var SDK_API_ROOT_README_PATH = resolve12(SDK_API_PACKAGE_DIRECTORY, "README.md");
623413
623533
  async function getSdkRootReadmeDocumentation() {
623414
623534
  try {
623415
- return await readFile10(SDK_API_ROOT_README_PATH, "utf8");
623535
+ return await readFile11(SDK_API_ROOT_README_PATH, "utf8");
623416
623536
  } catch {
623417
623537
  return "";
623418
623538
  }
@@ -624000,7 +624120,7 @@ The description will be shown to the user in an approval prompt, so it must be c
624000
624120
  init_cjs_shims();
624001
624121
  import { exec as exec3 } from "node:child_process";
624002
624122
  import { existsSync as existsSync3 } from "node:fs";
624003
- import path48 from "node:path";
624123
+ import path49 from "node:path";
624004
624124
  import { promisify as promisify3 } from "node:util";
624005
624125
 
624006
624126
  // ../../../vite-plugin-file-sync/dist/ai-service/skills/system/tool-paths.js
@@ -624102,11 +624222,11 @@ Usage:
624102
624222
  }
624103
624223
  args.push(shellEscape(physicalSearchPath));
624104
624224
  }
624105
- const scratchPath = path48.resolve(process.cwd(), ".superblocks/scratch");
624225
+ const scratchPath = path49.resolve(process.cwd(), ".superblocks/scratch");
624106
624226
  if (existsSync3(scratchPath)) {
624107
624227
  args.push("'.superblocks/scratch/'");
624108
624228
  }
624109
- const systemSkillsPath = path48.resolve(process.cwd(), ".superblocks/system-skills");
624229
+ const systemSkillsPath = path49.resolve(process.cwd(), ".superblocks/system-skills");
624110
624230
  if (!searchPath && existsSync3(systemSkillsPath)) {
624111
624231
  args.push("'.superblocks/system-skills/'");
624112
624232
  }
@@ -624933,8 +625053,8 @@ var presets = {
624933
625053
  init_cjs_shims();
624934
625054
  import { cp, mkdir as mkdir15, mkdtemp, rm as rm9 } from "node:fs/promises";
624935
625055
  import { tmpdir } from "node:os";
624936
- import { join as join16 } from "node:path";
624937
- var SB_WORKTREE_SNAPSHOTS_DIR = join16(tmpdir(), "sb-worktree-snapshots");
625056
+ import { join as join17 } from "node:path";
625057
+ var SB_WORKTREE_SNAPSHOTS_DIR = join17(tmpdir(), "sb-worktree-snapshots");
624938
625058
  var BUILD_POLL_INTERVAL_MS = 5e3;
624939
625059
  var BUILD_POLL_TIMEOUT_MS = 5 * 60 * 1e3;
624940
625060
  var TERMINAL_BUILD_STATUSES = /* @__PURE__ */ new Set([
@@ -624982,8 +625102,8 @@ function createDeployService(deps) {
624982
625102
  }
624983
625103
  return {
624984
625104
  async prepareMainCommit(sha) {
624985
- const worktreeBase = await mkdtemp(join16(tmpdir(), "sb-main-deploy-"));
624986
- const worktreePath = join16(worktreeBase, "worktree");
625105
+ const worktreeBase = await mkdtemp(join17(tmpdir(), "sb-main-deploy-"));
625106
+ const worktreePath = join17(worktreeBase, "worktree");
624987
625107
  try {
624988
625108
  await gitService.raw([
624989
625109
  "worktree",
@@ -624992,12 +625112,12 @@ function createDeployService(deps) {
624992
625112
  worktreePath,
624993
625113
  sha
624994
625114
  ]);
624995
- await rm9(join16(worktreePath, ".git"), {
625115
+ await rm9(join17(worktreePath, ".git"), {
624996
625116
  force: true,
624997
625117
  recursive: true
624998
625118
  });
624999
625119
  const { directoryHash } = await snapshotUploader.uploadSnapshotToDbfs(worktreePath);
625000
- const snapshotPath = join16(SB_WORKTREE_SNAPSHOTS_DIR, encodeURIComponent(directoryHash));
625120
+ const snapshotPath = join17(SB_WORKTREE_SNAPSHOTS_DIR, encodeURIComponent(directoryHash));
625001
625121
  await mkdir15(SB_WORKTREE_SNAPSHOTS_DIR, { recursive: true });
625002
625122
  await rm9(snapshotPath, { recursive: true, force: true });
625003
625123
  await cp(worktreePath, snapshotPath, { recursive: true });
@@ -625258,7 +625378,7 @@ Returns matching file paths and count. Patterns use glob syntax.
625258
625378
 
625259
625379
  // ../../../vite-plugin-file-sync/dist/ai-service/agent/tools2/tools/ls.js
625260
625380
  init_cjs_shims();
625261
- import path49 from "node:path";
625381
+ import path50 from "node:path";
625262
625382
  function formatSize(bytes) {
625263
625383
  if (bytes < 1024)
625264
625384
  return `${bytes}`;
@@ -625294,7 +625414,7 @@ function formatMetadataLine(meta2) {
625294
625414
  const perms = "rw-r--r--";
625295
625415
  const size = formatSize(meta2.size);
625296
625416
  const date5 = formatDate(meta2.mtime);
625297
- const name16 = path49.basename(meta2.path);
625417
+ const name16 = path50.basename(meta2.path);
625298
625418
  return `${type}${perms} 1 user staff ${size.padStart(6)} ${date5} ${name16}`;
625299
625419
  }
625300
625420
  var lsToolFactory = createToolFactory("ls", (services) => ({
@@ -625319,11 +625439,11 @@ Returns formatted output similar to ls -lh. Call multiple times on subdirectorie
625319
625439
  readOnly: true,
625320
625440
  execute: async ({ path: dirPath = ".", includeHidden = false }) => {
625321
625441
  const appRoot = services.appShell.appRootDirPath;
625322
- const resolvedPath = path49.resolve(appRoot, dirPath);
625442
+ const resolvedPath = path50.resolve(appRoot, dirPath);
625323
625443
  if (!resolvedPath.startsWith(appRoot)) {
625324
625444
  throw new Error(`Access denied: path '${dirPath}' is outside the application directory`);
625325
625445
  }
625326
- const relativeDirPath = path49.relative(appRoot, resolvedPath);
625446
+ const relativeDirPath = path50.relative(appRoot, resolvedPath);
625327
625447
  const physicalRelativeDirPath = mapVirtualSystemSkillsPathToPhysical(relativeDirPath);
625328
625448
  const pattern = physicalRelativeDirPath ? `${physicalRelativeDirPath}/*` : "*";
625329
625449
  const fileEntries = await services.appShell.listFiles([pattern], {
@@ -625332,10 +625452,10 @@ Returns formatted output similar to ls -lh. Call multiple times on subdirectorie
625332
625452
  dot: includeHidden
625333
625453
  });
625334
625454
  const directChildren = fileEntries.filter((entry) => {
625335
- const entryDir = path49.dirname(entry.path);
625455
+ const entryDir = path50.dirname(entry.path);
625336
625456
  return entryDir === relativeDirPath || entryDir === "." && !relativeDirPath;
625337
625457
  });
625338
- const allEntries = directChildren.sort((a, b) => path49.basename(a.path).localeCompare(path49.basename(b.path)));
625458
+ const allEntries = directChildren.sort((a, b) => path50.basename(a.path).localeCompare(path50.basename(b.path)));
625339
625459
  if (allEntries.length === 0) {
625340
625460
  return { output: "" };
625341
625461
  }
@@ -645657,7 +645777,7 @@ var fileToolConfig2 = {
645657
645777
  extractDisplayName: (parameters) => {
645658
645778
  const params = parameters;
645659
645779
  if (params.filePath && typeof params.filePath === "string") {
645660
- const fileName = path50.basename(params.filePath);
645780
+ const fileName = path51.basename(params.filePath);
645661
645781
  return `:${fileName}`;
645662
645782
  }
645663
645783
  return "";
@@ -646328,15 +646448,15 @@ Do not rely on prior knowledge from skills that may have been summarized away.
646328
646448
  const changeDescriptions = userChanges.map((change) => {
646329
646449
  switch (change.type) {
646330
646450
  case "addPage":
646331
- return `- Created a new page at ${path51.relative(appRootDirPath, change.path)}`;
646451
+ return `- Created a new page at ${path52.relative(appRootDirPath, change.path)}`;
646332
646452
  case "deletePage":
646333
- return `- Deleted page at ${path51.relative(appRootDirPath, change.path)}`;
646453
+ return `- Deleted page at ${path52.relative(appRootDirPath, change.path)}`;
646334
646454
  case "apiUpdate":
646335
646455
  return `- Modified API "${change.apiName}"`;
646336
646456
  case "apiDelete":
646337
646457
  return `- Deleted API "${change.apiName}"`;
646338
646458
  case "fileChanged":
646339
- return `- Edited code in ${path51.relative(appRootDirPath, change.filePath)}`;
646459
+ return `- Edited code in ${path52.relative(appRootDirPath, change.filePath)}`;
646340
646460
  }
646341
646461
  });
646342
646462
  content17.push({
@@ -647437,12 +647557,12 @@ import { spawn as spawn6 } from "child_process";
647437
647557
  import { randomUUID as randomUUID2 } from "crypto";
647438
647558
  import * as fs31 from "node:fs/promises";
647439
647559
  import * as os4 from "node:os";
647440
- import * as path53 from "node:path";
647560
+ import * as path54 from "node:path";
647441
647561
 
647442
647562
  // ../../../ai-service-templates/reify-template.js
647443
647563
  init_cjs_shims();
647444
647564
  import fs30 from "fs";
647445
- import path52 from "path";
647565
+ import path53 from "path";
647446
647566
  function reifyTemplate(targetDirectoryPath, fileMap) {
647447
647567
  if (typeof targetDirectoryPath !== "string") {
647448
647568
  throw new Error("targetDirectoryPath must be a string.");
@@ -647450,17 +647570,17 @@ function reifyTemplate(targetDirectoryPath, fileMap) {
647450
647570
  if (typeof fileMap !== "object" || fileMap === null) {
647451
647571
  throw new Error("fileMap must be a non-null object.");
647452
647572
  }
647453
- const resolvedTargetDirectory = path52.resolve(targetDirectoryPath);
647573
+ const resolvedTargetDirectory = path53.resolve(targetDirectoryPath);
647454
647574
  console.log(`Recreating structure in: ${resolvedTargetDirectory}`);
647455
647575
  for (const relativeFilePath in fileMap) {
647456
647576
  if (Object.hasOwnProperty.call(fileMap, relativeFilePath)) {
647457
647577
  const content17 = fileMap[relativeFilePath];
647458
647578
  const fileContent = typeof content17 === "string" ? content17 : String(content17);
647459
- const absoluteFilePath = path52.join(
647579
+ const absoluteFilePath = path53.join(
647460
647580
  resolvedTargetDirectory,
647461
647581
  relativeFilePath
647462
647582
  );
647463
- const directoryForFile = path52.dirname(absoluteFilePath);
647583
+ const directoryForFile = path53.dirname(absoluteFilePath);
647464
647584
  try {
647465
647585
  if (!fs30.existsSync(directoryForFile)) {
647466
647586
  fs30.mkdirSync(directoryForFile, { recursive: true });
@@ -648372,7 +648492,7 @@ var TemplateRenderer = (() => {
648372
648492
  constructor({ prefetchNodeModules = false, workDirSeed, detectionCwd }) {
648373
648493
  const stableSeed = workDirSeed ?? process.cwd();
648374
648494
  const stableId = generatePredictableId2(stableSeed);
648375
- this.workDir = path53.join(os4.tmpdir(), `superblocks-ai-service-${stableId}`);
648495
+ this.workDir = path54.join(os4.tmpdir(), `superblocks-ai-service-${stableId}`);
648376
648496
  this.detectionCwd = detectionCwd;
648377
648497
  this.nodeModuleDirs = {};
648378
648498
  if (prefetchNodeModules) {
@@ -648393,11 +648513,11 @@ var TemplateRenderer = (() => {
648393
648513
  }
648394
648514
  const template = templates[templateName];
648395
648515
  const templateNodeModules = await this.templateModulesDir(templateName, template);
648396
- const templateDir = path53.join(this.workDir, templateName, `gen-${randomUUID2()}`);
648516
+ const templateDir = path54.join(this.workDir, templateName, `gen-${randomUUID2()}`);
648397
648517
  getLogger3().debug(`[ai-service] Rendering template ${templateName} to ${templateDir}`);
648398
648518
  reifyTemplate(templateDir, templates[templateName]);
648399
648519
  if (templateNodeModules) {
648400
- await fs31.cp(templateNodeModules, path53.join(templateDir, "node_modules"), {
648520
+ await fs31.cp(templateNodeModules, path54.join(templateDir, "node_modules"), {
648401
648521
  recursive: true
648402
648522
  });
648403
648523
  }
@@ -648415,10 +648535,10 @@ var TemplateRenderer = (() => {
648415
648535
  return nullPromise;
648416
648536
  }
648417
648537
  const packageJson = template["package.json"];
648418
- const dir = path53.join(this.workDir, templateName, SHARED_DIR);
648538
+ const dir = path54.join(this.workDir, templateName, SHARED_DIR);
648419
648539
  const installDfd = (async () => {
648420
648540
  await fs31.mkdir(dir, { recursive: true });
648421
- await fs31.writeFile(path53.join(dir, "package.json"), packageJson, "utf-8");
648541
+ await fs31.writeFile(path54.join(dir, "package.json"), packageJson, "utf-8");
648422
648542
  await maybeWriteNpmrcForDir(dir, {
648423
648543
  preserveScopeLines: PRESERVE_NPMRC_SCOPES
648424
648544
  });
@@ -648481,7 +648601,7 @@ ${stderrTail}` : void 0
648481
648601
  ].filter(Boolean).join("\n\n")));
648482
648602
  return;
648483
648603
  }
648484
- resolve15(path53.join(dir, "node_modules"));
648604
+ resolve15(path54.join(dir, "node_modules"));
648485
648605
  });
648486
648606
  });
648487
648607
  }
@@ -649058,7 +649178,7 @@ var AiService = class extends import_shared47.TracedEventEmitter {
649058
649178
  });
649059
649179
  this.mcpServerManager = new PlaywrightMcpServerManager(this.clark.logger);
649060
649180
  this.recordingManager = new RecordingManager({
649061
- recordingsDir: path54.join(config4.appRootDirPath, ".superblocks", "recordings"),
649181
+ recordingsDir: path55.join(config4.appRootDirPath, ".superblocks", "recordings"),
649062
649182
  appRootDirPath: config4.appRootDirPath
649063
649183
  });
649064
649184
  this.config.draftInterface.hasLocalDraftChanges().then((hasDraft) => {
@@ -649447,7 +649567,7 @@ var AiService = class extends import_shared47.TracedEventEmitter {
649447
649567
  return;
649448
649568
  }
649449
649569
  const absoluteFilePath = this.fileSystemInterface.getElementToFilePath(request.itemId);
649450
- const relativeFilePath = path54.relative(this.appShell.appRootDirPath, absoluteFilePath);
649570
+ const relativeFilePath = path55.relative(this.appShell.appRootDirPath, absoluteFilePath);
649451
649571
  const build_readFile = buildReadFileToolFactory.create({
649452
649572
  services: { appShell: this.appShell }
649453
649573
  });
@@ -650565,20 +650685,20 @@ ${request.prompt}`;
650565
650685
  let storageDir;
650566
650686
  let storageFilename;
650567
650687
  if (judgeStoragePath) {
650568
- const expandedPath = judgeStoragePath.startsWith("~/") ? path54.join(os5.homedir(), judgeStoragePath.slice(2)) : judgeStoragePath;
650688
+ const expandedPath = judgeStoragePath.startsWith("~/") ? path55.join(os5.homedir(), judgeStoragePath.slice(2)) : judgeStoragePath;
650569
650689
  if (expandedPath.endsWith(".csv")) {
650570
- storageDir = path54.dirname(expandedPath);
650571
- storageFilename = path54.basename(expandedPath);
650690
+ storageDir = path55.dirname(expandedPath);
650691
+ storageFilename = path55.basename(expandedPath);
650572
650692
  } else {
650573
650693
  storageDir = expandedPath;
650574
650694
  storageFilename = "evaluations.csv";
650575
650695
  }
650576
650696
  } else {
650577
- storageDir = path54.join(this.config.appRootDirPath, ".superblocks/judge-evaluations");
650697
+ storageDir = path55.join(this.config.appRootDirPath, ".superblocks/judge-evaluations");
650578
650698
  storageFilename = "evaluations.csv";
650579
650699
  }
650580
650700
  const judgeStorage = new CsvJudgeStorage(storageDir, storageFilename);
650581
- this.config.logger.info(`[ai-service] Judge storage configured: ${path54.join(storageDir, storageFilename)}`);
650701
+ this.config.logger.info(`[ai-service] Judge storage configured: ${path55.join(storageDir, storageFilename)}`);
650582
650702
  const judgeLlmProvider = createLLMProvider(this.getLLMProviderSettings(request.llmConfig), () => this.getJwt(), request.llmConfig, void 0);
650583
650703
  const judgeService = new JudgeService({
650584
650704
  llmClient: this.llmClient,
@@ -650622,9 +650742,15 @@ ${request.prompt}`;
650622
650742
  }));
650623
650743
  }
650624
650744
  async handleNewChat() {
650745
+ const contextId = this.getContextId();
650746
+ const commitIdForUpload = this._syncContextProvider?.getLastCommitId() ?? await this.chatSessionStore.getLatestCommitId();
650625
650747
  await this.chatSessionStore.newChat();
650626
650748
  try {
650627
650749
  await this.contextManagerV2.clearAllContexts();
650750
+ if (contextId) {
650751
+ await this.contextManagerV2.persistEmptyContext(contextId);
650752
+ await this.uploadEmptyContextToBucketeer(contextId.userId, commitIdForUpload);
650753
+ }
650628
650754
  } catch (error40) {
650629
650755
  this.getLogger().error("[ai-service] Failed to clear contexts on new chat", getErrorMeta2(error40));
650630
650756
  }
@@ -650634,6 +650760,33 @@ ${request.prompt}`;
650634
650760
  pendingToolPermissionRequest: void 0
650635
650761
  });
650636
650762
  }
650763
+ /**
650764
+ * Upload the (now-empty) context to Bucketeer.
650765
+ * commitId is captured before newChat() clears the session.
650766
+ * Failures are logged but do not fail clear chat.
650767
+ */
650768
+ async uploadEmptyContextToBucketeer(userId, commitId) {
650769
+ const jwt2 = this.getJwt();
650770
+ const branchName = this._syncContextProvider?.getBranchName();
650771
+ if (!jwt2 || !commitId || !branchName) {
650772
+ return;
650773
+ }
650774
+ try {
650775
+ await uploadContextToBucketeer({
650776
+ applicationId: this.config.applicationId,
650777
+ commitId,
650778
+ branchName,
650779
+ appRootDirPath: this.config.appRootDirPath,
650780
+ userId,
650781
+ useServerUpload: this.isAiFileUploadEnabled,
650782
+ superblocksBaseUrl: this.config.superblocksBaseUrl,
650783
+ logger: this.getLogger(),
650784
+ jwt: jwt2
650785
+ });
650786
+ } catch (error40) {
650787
+ this.getLogger().warn("[ai-service] Failed to upload empty context to Bucketeer on new chat (non-blocking)", getErrorMeta2(error40));
650788
+ }
650789
+ }
650637
650790
  /**
650638
650791
  * Returns all saved app skill facts for the current application.
650639
650792
  */
@@ -650906,12 +651059,12 @@ import * as fsp2 from "node:fs/promises";
650906
651059
  // ../../../vite-plugin-file-sync/dist/sync-service/hash-dir-tree.js
650907
651060
  init_cjs_shims();
650908
651061
  var import_shared48 = __toESM(require_dist2());
650909
- var import_util19 = __toESM(require_dist3());
651062
+ var import_util20 = __toESM(require_dist3());
650910
651063
 
650911
651064
  // ../../../vite-plugin-file-sync/dist/sync-service/list-dir.js
650912
651065
  init_cjs_shims();
650913
651066
  import * as fsp from "node:fs/promises";
650914
- import * as path55 from "node:path";
651067
+ import * as path56 from "node:path";
650915
651068
  function isNodeError(error40) {
650916
651069
  return error40 instanceof Error && "code" in error40;
650917
651070
  }
@@ -650929,8 +651082,8 @@ async function* listLocalDirectory(localDirectoryPath, rootDirectoryPath = local
650929
651082
  for await (const localDirEntry of localDirHandle) {
650930
651083
  const name16 = localDirEntry.name.normalize("NFC");
650931
651084
  const localFilePath = `${localDirectoryPath}/${name16}`;
650932
- const relativePath = path55.relative(rootDirectoryPath, localFilePath);
650933
- const normalizedRelativePath = relativePath.split(path55.sep).join("/");
651085
+ const relativePath = path56.relative(rootDirectoryPath, localFilePath);
651086
+ const normalizedRelativePath = relativePath.split(path56.sep).join("/");
650934
651087
  if (localDirEntry.isFile()) {
650935
651088
  if (normalizedRelativePath.startsWith(".superblocks/") && !isPersistedChecklistPath(normalizedRelativePath)) {
650936
651089
  continue;
@@ -650964,13 +651117,13 @@ async function* listLocalDirectory(localDirectoryPath, rootDirectoryPath = local
650964
651117
  continue;
650965
651118
  }
650966
651119
  if (normalizedRelativePath === ".superblocks") {
650967
- const checklistPath = path55.join(localFilePath, "ai", "checklist.json");
651120
+ const checklistPath = path56.join(localFilePath, "ai", "checklist.json");
650968
651121
  if (!await pathExists2(checklistPath)) {
650969
651122
  continue;
650970
651123
  }
650971
651124
  }
650972
651125
  if (normalizedRelativePath === ".superblocks/ai") {
650973
- const checklistPath = path55.join(localFilePath, "checklist.json");
651126
+ const checklistPath = path56.join(localFilePath, "checklist.json");
650974
651127
  if (!await pathExists2(checklistPath)) {
650975
651128
  continue;
650976
651129
  }
@@ -651038,7 +651191,7 @@ async function hashLocalDirectory(localDirectoryPath, rootDirectoryPath = localD
651038
651191
  break;
651039
651192
  }
651040
651193
  default:
651041
- (0, import_util19.unreachable)(localDirEntry);
651194
+ (0, import_util20.unreachable)(localDirEntry);
651042
651195
  }
651043
651196
  directoryContents.push(entry);
651044
651197
  }
@@ -651172,16 +651325,16 @@ async function getDraftOrLiveDirectoryHash(rpcClient, applicationId, branch) {
651172
651325
  // ../../../vite-plugin-file-sync/dist/sync-service/draft-helpers.js
651173
651326
  init_cjs_shims();
651174
651327
  import * as fsp3 from "node:fs/promises";
651175
- import * as path56 from "node:path";
651328
+ import * as path57 from "node:path";
651176
651329
  var EDIT_EXT = ".sbswap.edit";
651177
651330
  var ADD_EXT = ".sbswap.add";
651178
651331
  var DELETE_EXT = ".sbswap.delete";
651179
651332
  function getMarkerFilePath(filePath, appRootDirPath, markerType) {
651180
- const relativePath = path56.relative(appRootDirPath, filePath);
651181
- return path56.join(getDraftsDirectoryPath(appRootDirPath), `${relativePath}${markerType}`);
651333
+ const relativePath = path57.relative(appRootDirPath, filePath);
651334
+ return path57.join(getDraftsDirectoryPath(appRootDirPath), `${relativePath}${markerType}`);
651182
651335
  }
651183
651336
  function getDraftsDirectoryPath(appRootDirPath) {
651184
- return path56.join(appRootDirPath, ".superblocks", "drafts");
651337
+ return path57.join(appRootDirPath, ".superblocks", "drafts");
651185
651338
  }
651186
651339
  async function getMarkerState(filePath, appRootDirPath) {
651187
651340
  const editMarkerPath = getMarkerFilePath(filePath, appRootDirPath, EDIT_EXT);
@@ -651215,14 +651368,14 @@ async function createDraftMarkerOnly(filePath, appRootDirPath) {
651215
651368
  switch (state) {
651216
651369
  case "FILE_EXISTS": {
651217
651370
  const editMarkerPath = getMarkerFilePath(filePath, appRootDirPath, EDIT_EXT);
651218
- const editMarkerDir = path56.dirname(editMarkerPath);
651371
+ const editMarkerDir = path57.dirname(editMarkerPath);
651219
651372
  await fsp3.mkdir(editMarkerDir, { recursive: true });
651220
651373
  await fsp3.copyFile(filePath, editMarkerPath);
651221
651374
  return;
651222
651375
  }
651223
651376
  case "NEW": {
651224
651377
  const addMarkerPath = getMarkerFilePath(filePath, appRootDirPath, ADD_EXT);
651225
- const addMarkerDir = path56.dirname(addMarkerPath);
651378
+ const addMarkerDir = path57.dirname(addMarkerPath);
651226
651379
  await fsp3.mkdir(addMarkerDir, { recursive: true });
651227
651380
  await fsp3.writeFile(addMarkerPath, "");
651228
651381
  return;
@@ -651237,13 +651390,13 @@ async function createDraft(filePath, draftContent, appRootDirPath) {
651237
651390
  const state = await getMarkerState(filePath, appRootDirPath);
651238
651391
  switch (state) {
651239
651392
  case "ADD_MARKER": {
651240
- const dirPath = path56.dirname(filePath);
651393
+ const dirPath = path57.dirname(filePath);
651241
651394
  await fsp3.mkdir(dirPath, { recursive: true });
651242
651395
  await fsp3.writeFile(filePath, draftContent);
651243
651396
  return "add";
651244
651397
  }
651245
651398
  case "EDIT_MARKER": {
651246
- const dirPath = path56.dirname(filePath);
651399
+ const dirPath = path57.dirname(filePath);
651247
651400
  await fsp3.mkdir(dirPath, { recursive: true });
651248
651401
  await fsp3.writeFile(filePath, draftContent);
651249
651402
  return "edit";
@@ -651255,7 +651408,7 @@ async function createDraft(filePath, draftContent, appRootDirPath) {
651255
651408
  await fsp3.rename(deleteMarkerPath, editMarkerPath);
651256
651409
  } catch {
651257
651410
  }
651258
- const dirPath = path56.dirname(filePath);
651411
+ const dirPath = path57.dirname(filePath);
651259
651412
  await fsp3.mkdir(dirPath, { recursive: true });
651260
651413
  await fsp3.writeFile(filePath, draftContent);
651261
651414
  return "edit";
@@ -651283,7 +651436,7 @@ async function createDraftEdit(filePath, draftContent, appRootDirPath) {
651283
651436
  return;
651284
651437
  } catch {
651285
651438
  }
651286
- const editMarkerDir = path56.dirname(editMarkerPath);
651439
+ const editMarkerDir = path57.dirname(editMarkerPath);
651287
651440
  await fsp3.mkdir(editMarkerDir, { recursive: true });
651288
651441
  await fsp3.copyFile(filePath, editMarkerPath);
651289
651442
  await fsp3.writeFile(filePath, draftContent);
@@ -651292,7 +651445,7 @@ async function createDraftAdd(filePath, content17, appRootDirPath) {
651292
651445
  const addMarkerPath = getMarkerFilePath(filePath, appRootDirPath, ADD_EXT);
651293
651446
  try {
651294
651447
  await fsp3.access(addMarkerPath);
651295
- const dirPath2 = path56.dirname(filePath);
651448
+ const dirPath2 = path57.dirname(filePath);
651296
651449
  await fsp3.mkdir(dirPath2, { recursive: true });
651297
651450
  await fsp3.writeFile(filePath, content17);
651298
651451
  return;
@@ -651306,9 +651459,9 @@ async function createDraftAdd(filePath, content17, appRootDirPath) {
651306
651459
  throw accessError;
651307
651460
  }
651308
651461
  }
651309
- const dirPath = path56.dirname(filePath);
651462
+ const dirPath = path57.dirname(filePath);
651310
651463
  await fsp3.mkdir(dirPath, { recursive: true });
651311
- const addMarkerDir = path56.dirname(addMarkerPath);
651464
+ const addMarkerDir = path57.dirname(addMarkerPath);
651312
651465
  await fsp3.mkdir(addMarkerDir, { recursive: true });
651313
651466
  await fsp3.writeFile(filePath, content17);
651314
651467
  await fsp3.writeFile(addMarkerPath, "");
@@ -651325,7 +651478,7 @@ async function createDraftDelete(filePath, appRootDirPath) {
651325
651478
  return;
651326
651479
  } catch {
651327
651480
  }
651328
- const deleteMarkerDir = path56.dirname(deleteMarkerPath);
651481
+ const deleteMarkerDir = path57.dirname(deleteMarkerPath);
651329
651482
  await fsp3.mkdir(deleteMarkerDir, { recursive: true });
651330
651483
  await fsp3.copyFile(filePath, deleteMarkerPath);
651331
651484
  await fsp3.unlink(filePath);
@@ -651345,11 +651498,11 @@ async function hasSwapFilesInDirectory(directoryPath, appRootDirPath) {
651345
651498
  const draftsDir = getDraftsDirectoryPath(appRootDirPath);
651346
651499
  for (const entry of entries) {
651347
651500
  if (entry.isFile()) {
651348
- const swapFilePath = path56.join(directoryPath, entry.name);
651501
+ const swapFilePath = path57.join(directoryPath, entry.name);
651349
651502
  if (entry.name.endsWith(EDIT_EXT)) {
651350
- const markerRelativePath = path56.relative(draftsDir, swapFilePath);
651503
+ const markerRelativePath = path57.relative(draftsDir, swapFilePath);
651351
651504
  const originalRelativePath = markerRelativePath.slice(0, -EDIT_EXT.length);
651352
- const originalPath = path56.join(appRootDirPath, originalRelativePath);
651505
+ const originalPath = path57.join(appRootDirPath, originalRelativePath);
651353
651506
  try {
651354
651507
  const [draftContent, originalContent] = await Promise.all([
651355
651508
  fsp3.readFile(swapFilePath, "utf8"),
@@ -651368,7 +651521,7 @@ async function hasSwapFilesInDirectory(directoryPath, appRootDirPath) {
651368
651521
  }
651369
651522
  }
651370
651523
  if (entry.isDirectory()) {
651371
- const subdirPath = path56.join(directoryPath, entry.name);
651524
+ const subdirPath = path57.join(directoryPath, entry.name);
651372
651525
  if (await hasSwapFilesInDirectory(subdirPath, appRootDirPath)) {
651373
651526
  return true;
651374
651527
  }
@@ -651400,30 +651553,30 @@ async function discardDraftsInDirectory(directoryPath, appRootDirPath) {
651400
651553
  try {
651401
651554
  const entries = await fsp3.readdir(directoryPath, { withFileTypes: true });
651402
651555
  for (const entry of entries) {
651403
- const fullPath = path56.join(directoryPath, entry.name);
651556
+ const fullPath = path57.join(directoryPath, entry.name);
651404
651557
  if (entry.isFile()) {
651405
651558
  if (entry.name.endsWith(EDIT_EXT)) {
651406
- const markerRelativePath = path56.relative(getDraftsDirectoryPath(appRootDirPath), fullPath);
651559
+ const markerRelativePath = path57.relative(getDraftsDirectoryPath(appRootDirPath), fullPath);
651407
651560
  const originalRelativePath = markerRelativePath.slice(0, -EDIT_EXT.length);
651408
- const originalPath = path56.join(appRootDirPath, originalRelativePath);
651561
+ const originalPath = path57.join(appRootDirPath, originalRelativePath);
651409
651562
  try {
651410
651563
  await fsp3.unlink(originalPath);
651411
651564
  } catch {
651412
651565
  }
651413
651566
  await fsp3.copyFile(fullPath, originalPath);
651414
651567
  } else if (entry.name.endsWith(ADD_EXT)) {
651415
- const markerRelativePath = path56.relative(getDraftsDirectoryPath(appRootDirPath), fullPath);
651568
+ const markerRelativePath = path57.relative(getDraftsDirectoryPath(appRootDirPath), fullPath);
651416
651569
  const addedFileRelativePath = markerRelativePath.slice(0, -ADD_EXT.length);
651417
- const addedFilePath = path56.join(appRootDirPath, addedFileRelativePath);
651570
+ const addedFilePath = path57.join(appRootDirPath, addedFileRelativePath);
651418
651571
  try {
651419
651572
  await fsp3.unlink(addedFilePath);
651420
651573
  } catch {
651421
651574
  }
651422
651575
  } else if (entry.name.endsWith(DELETE_EXT)) {
651423
- const markerRelativePath = path56.relative(getDraftsDirectoryPath(appRootDirPath), fullPath);
651576
+ const markerRelativePath = path57.relative(getDraftsDirectoryPath(appRootDirPath), fullPath);
651424
651577
  const deletedFileRelativePath = markerRelativePath.slice(0, -DELETE_EXT.length);
651425
- const deletedFilePath = path56.join(appRootDirPath, deletedFileRelativePath);
651426
- const dirPath = path56.dirname(deletedFilePath);
651578
+ const deletedFilePath = path57.join(appRootDirPath, deletedFileRelativePath);
651579
+ const dirPath = path57.dirname(deletedFilePath);
651427
651580
  await fsp3.mkdir(dirPath, { recursive: true });
651428
651581
  await fsp3.copyFile(fullPath, deletedFilePath);
651429
651582
  }
@@ -651461,18 +651614,18 @@ async function getDraftInfo(appRootDirPath) {
651461
651614
  try {
651462
651615
  const entries = await fsp3.readdir(currentPath, { withFileTypes: true });
651463
651616
  for (const entry of entries) {
651464
- const fullPath = path56.join(currentPath, entry.name);
651617
+ const fullPath = path57.join(currentPath, entry.name);
651465
651618
  if (entry.isFile()) {
651466
651619
  if (entry.name.endsWith(EDIT_EXT)) {
651467
- const markerRelativePath = path56.relative(draftsDir, fullPath);
651620
+ const markerRelativePath = path57.relative(draftsDir, fullPath);
651468
651621
  const originalRelativePath = markerRelativePath.slice(0, -EDIT_EXT.length);
651469
651622
  edits.push(originalRelativePath);
651470
651623
  } else if (entry.name.endsWith(ADD_EXT)) {
651471
- const markerRelativePath = path56.relative(draftsDir, fullPath);
651624
+ const markerRelativePath = path57.relative(draftsDir, fullPath);
651472
651625
  const addedFileRelativePath = markerRelativePath.slice(0, -ADD_EXT.length);
651473
651626
  additions.push(addedFileRelativePath);
651474
651627
  } else if (entry.name.endsWith(DELETE_EXT)) {
651475
- const markerRelativePath = path56.relative(draftsDir, fullPath);
651628
+ const markerRelativePath = path57.relative(draftsDir, fullPath);
651476
651629
  const deletedFileRelativePath = markerRelativePath.slice(0, -DELETE_EXT.length);
651477
651630
  deletions.push(deletedFileRelativePath);
651478
651631
  }
@@ -651503,7 +651656,7 @@ async function generateDraftDiff(appRootDirPath, specificPaths = []) {
651503
651656
  return "No draft changes found.";
651504
651657
  }
651505
651658
  for (const editPath of edits) {
651506
- const originalPath = path56.join(appRootDirPath, editPath);
651659
+ const originalPath = path57.join(appRootDirPath, editPath);
651507
651660
  const markerPath = getMarkerFilePath(originalPath, appRootDirPath, EDIT_EXT);
651508
651661
  try {
651509
651662
  const currentContent = await fsp3.readFile(originalPath, "utf8");
@@ -651516,7 +651669,7 @@ async function generateDraftDiff(appRootDirPath, specificPaths = []) {
651516
651669
  }
651517
651670
  }
651518
651671
  for (const addPath of additions) {
651519
- const filePath = path56.join(appRootDirPath, addPath);
651672
+ const filePath = path57.join(appRootDirPath, addPath);
651520
651673
  try {
651521
651674
  const content17 = await fsp3.readFile(filePath, "utf8");
651522
651675
  const patch = createPatch(addPath, "", content17);
@@ -651527,7 +651680,7 @@ async function generateDraftDiff(appRootDirPath, specificPaths = []) {
651527
651680
  }
651528
651681
  }
651529
651682
  for (const deletePath of deletions) {
651530
- const markerPath = getMarkerFilePath(path56.join(appRootDirPath, deletePath), appRootDirPath, DELETE_EXT);
651683
+ const markerPath = getMarkerFilePath(path57.join(appRootDirPath, deletePath), appRootDirPath, DELETE_EXT);
651531
651684
  try {
651532
651685
  const originalContent = await fsp3.readFile(markerPath, "utf8");
651533
651686
  const patch = createPatch(deletePath, originalContent, "");
@@ -651601,7 +651754,7 @@ var HashCache = class {
651601
651754
  // ../../../vite-plugin-file-sync/dist/sync-service/snapshot/take-snapshot.js
651602
651755
  init_cjs_shims();
651603
651756
  var import_shared51 = __toESM(require_dist2());
651604
- var import_util20 = __toESM(require_dist3());
651757
+ var import_util21 = __toESM(require_dist3());
651605
651758
  async function snapshotLocalDirectory(localDirectoryPath, rootDirectoryPath = localDirectoryPath) {
651606
651759
  const directoryContents = [];
651607
651760
  const localDirListing = listLocalDirectory(localDirectoryPath, rootDirectoryPath);
@@ -651638,7 +651791,7 @@ async function snapshotLocalDirectory(localDirectoryPath, rootDirectoryPath = lo
651638
651791
  break;
651639
651792
  }
651640
651793
  default:
651641
- (0, import_util20.unreachable)(localDirEntry);
651794
+ (0, import_util21.unreachable)(localDirEntry);
651642
651795
  }
651643
651796
  directoryContents.push(entry);
651644
651797
  }
@@ -653263,116 +653416,6 @@ init_lodash();
653263
653416
  var import_shared71 = __toESM(require_dist2());
653264
653417
  import { normalizePath as normalizePath12 } from "vite";
653265
653418
 
653266
- // ../../../vite-plugin-file-sync/dist/ai-service/context-upload.js
653267
- init_cjs_shims();
653268
- var import_util21 = __toESM(require_dist3());
653269
- import { readdir as readdir10, readFile as readFile13 } from "node:fs/promises";
653270
- import * as path57 from "node:path";
653271
- async function uploadContextToBucketeer({ applicationId, commitId, branchName, appRootDirPath, userId, useServerUpload = false, superblocksBaseUrl, logger: logger17, jwt: jwt2 }) {
653272
- const contextDir = path57.join(appRootDirPath, ".superblocks", "context", userId);
653273
- let contextFiles;
653274
- try {
653275
- const entries = await readdir10(contextDir, { withFileTypes: true });
653276
- contextFiles = entries.filter((entry) => entry.isFile()).map((entry) => entry.name);
653277
- } catch (err) {
653278
- if (err.code === "ENOENT") {
653279
- logger17.info(`[uploadContextToBucketeer] No context directory found for userId=${userId}, skipping upload`);
653280
- return;
653281
- }
653282
- throw err;
653283
- }
653284
- if (contextFiles.length === 0) {
653285
- logger17.info(`[uploadContextToBucketeer] No context files found for userId=${userId}, skipping upload`);
653286
- return;
653287
- }
653288
- const contextFileData = [];
653289
- const uploadedFiles = [];
653290
- for (const fileName of contextFiles) {
653291
- const filePath = path57.join(contextDir, fileName);
653292
- try {
653293
- const fileBuffer = await readFile13(filePath);
653294
- contextFileData.push({ data: fileBuffer, fileName });
653295
- uploadedFiles.push(fileName);
653296
- } catch (err) {
653297
- logger17.warn(`[uploadContextToBucketeer] Failed to read context file ${fileName}, skipping`, getErrorMeta2(err));
653298
- }
653299
- }
653300
- if (uploadedFiles.length === 0) {
653301
- logger17.warn(`[uploadContextToBucketeer] No files were successfully read for upload`);
653302
- return;
653303
- }
653304
- const buildFormData = () => {
653305
- const formData = new FormData();
653306
- for (const contextFile of contextFileData) {
653307
- formData.append("context", new Blob([new Uint8Array(contextFile.data)]), contextFile.fileName);
653308
- }
653309
- return formData;
653310
- };
653311
- const uploadViaServer = async () => {
653312
- const url4 = new URL(`${superblocksBaseUrl}/api/v1/files/upload`);
653313
- url4.searchParams.set("scopeType", "app");
653314
- url4.searchParams.set("purpose", "context");
653315
- url4.searchParams.set("applicationId", applicationId);
653316
- url4.searchParams.set("branchName", branchName);
653317
- url4.searchParams.set("commitId", commitId);
653318
- const response = await fetch(url4.toString(), {
653319
- method: "POST",
653320
- body: buildFormData(),
653321
- headers: {
653322
- Authorization: `Bearer ${jwt2}`
653323
- }
653324
- });
653325
- if (!response.ok) {
653326
- const errorText = await response.text().catch(() => "Unable to read error response");
653327
- throw new Error(`Server context upload failed: status=${response.status}, error=${errorText}`);
653328
- }
653329
- };
653330
- const uploadViaBucketeer = async () => {
653331
- let scopedToken;
653332
- try {
653333
- scopedToken = await getScopedToken({
653334
- applicationId,
653335
- superblocksBaseUrl,
653336
- jwt: jwt2
653337
- });
653338
- } catch (error40) {
653339
- logger17.error("[uploadContextToBucketeer] Failed to get scoped token", getErrorMeta2(error40));
653340
- throw error40;
653341
- }
653342
- const bucketeerUrl = (0, import_util21.getBucketeerUrlFromSuperblocksUrl)(superblocksBaseUrl);
653343
- const url4 = `${bucketeerUrl}/applications/${applicationId}/branches/${encodeURIComponent(branchName)}/commits/${encodeURIComponent(commitId)}/context`;
653344
- const response = await fetch(url4, {
653345
- method: "POST",
653346
- body: buildFormData(),
653347
- headers: {
653348
- Authorization: `Bearer ${scopedToken}`
653349
- // Content-Type will be set automatically by fetch with boundary
653350
- }
653351
- });
653352
- if (!response.ok) {
653353
- const errorText = await response.text().catch(() => "Unable to read error response");
653354
- logger17.error(`[uploadContextToBucketeer] Upload failed: status=${response.status}, statusText=${response.statusText}, error=${errorText} for applicationId=${applicationId}, commitId=${commitId}`);
653355
- throw new Error(`Context upload failed: ${response.statusText}`);
653356
- }
653357
- };
653358
- try {
653359
- if (useServerUpload) {
653360
- try {
653361
- await uploadViaServer();
653362
- } catch (error40) {
653363
- logger17.warn("[uploadContextToBucketeer] Server context upload failed, falling back to Bucketeer", getErrorMeta2(error40));
653364
- await uploadViaBucketeer();
653365
- }
653366
- } else {
653367
- await uploadViaBucketeer();
653368
- }
653369
- logger17.info(`[uploadContextToBucketeer] Successfully uploaded ${uploadedFiles.length} context file(s) (${uploadedFiles.join(", ")}) for applicationId=${applicationId}, commitId=${commitId}`);
653370
- } catch (error40) {
653371
- logger17.error("[uploadContextToBucketeer] Failed to upload context", getErrorMeta2(error40));
653372
- throw error40;
653373
- }
653374
- }
653375
-
653376
653419
  // ../../../vite-plugin-file-sync/dist/build-errors.js
653377
653420
  init_cjs_shims();
653378
653421
  var ImportError = class extends Error {
@@ -676959,7 +677002,7 @@ var parseYaml3;
676959
677002
  async function loadYaml(file2) {
676960
677003
  const content17 = await read_file_default(file2);
676961
677004
  if (!parseYaml3) {
676962
- ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-AH7ADMI6.js"));
677005
+ ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-DICNK7TI.js"));
676963
677006
  }
676964
677007
  try {
676965
677008
  return parseYaml3(content17);
@@ -682353,7 +682396,7 @@ function createParsersAndPrinters(modules) {
682353
682396
  }
682354
682397
  var estreePlugin = createParsersAndPrinters([
682355
682398
  {
682356
- importPlugin: () => import("./estree-ANINXIRG.js"),
682399
+ importPlugin: () => import("./estree-3CPHMYMA.js"),
682357
682400
  printers: ["estree", "estree-json"]
682358
682401
  }
682359
682402
  ]);
@@ -682377,11 +682420,11 @@ var languages = [
682377
682420
  ];
682378
682421
  var { parsers: parsers12, printers } = createParsersAndPrinters([
682379
682422
  {
682380
- importPlugin: () => import("./acorn-USLJB3IM.js"),
682423
+ importPlugin: () => import("./acorn-M5FP7J25.js"),
682381
682424
  parsers: ["acorn", "espree"]
682382
682425
  },
682383
682426
  {
682384
- importPlugin: () => import("./angular-GJLPQ7KA.js"),
682427
+ importPlugin: () => import("./angular-HHR5L5H5.js"),
682385
682428
  parsers: [
682386
682429
  "__ng_action",
682387
682430
  "__ng_binding",
@@ -682390,7 +682433,7 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
682390
682433
  ]
682391
682434
  },
682392
682435
  {
682393
- importPlugin: () => import("./babel-J32CE2A3.js"),
682436
+ importPlugin: () => import("./babel-L6M75FHR.js"),
682394
682437
  parsers: [
682395
682438
  "babel",
682396
682439
  "babel-flow",
@@ -682409,44 +682452,44 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
682409
682452
  ]
682410
682453
  },
682411
682454
  {
682412
- importPlugin: () => import("./flow-EMTQE2BD.js"),
682455
+ importPlugin: () => import("./flow-Y3N7C5TL.js"),
682413
682456
  parsers: ["flow"]
682414
682457
  },
682415
682458
  {
682416
- importPlugin: () => import("./glimmer-BSEL2AQV.js"),
682459
+ importPlugin: () => import("./glimmer-GQD2WHVS.js"),
682417
682460
  parsers: ["glimmer"],
682418
682461
  printers: ["glimmer"]
682419
682462
  },
682420
682463
  {
682421
- importPlugin: () => import("./graphql-36HQCHXW.js"),
682464
+ importPlugin: () => import("./graphql-GDLAVBFM.js"),
682422
682465
  parsers: ["graphql"],
682423
682466
  printers: ["graphql"]
682424
682467
  },
682425
682468
  {
682426
- importPlugin: () => import("./html-ZDYRBBEB.js"),
682469
+ importPlugin: () => import("./html-QRIW74KP.js"),
682427
682470
  parsers: ["html", "angular", "vue", "lwc", "mjml"],
682428
682471
  printers: ["html"]
682429
682472
  },
682430
682473
  {
682431
- importPlugin: () => import("./markdown-IYFZYAUD.js"),
682474
+ importPlugin: () => import("./markdown-EO6R7XDP.js"),
682432
682475
  parsers: ["markdown", "mdx", "remark"],
682433
682476
  printers: ["mdast"]
682434
682477
  },
682435
682478
  {
682436
- importPlugin: () => import("./meriyah-CUTMHC6K.js"),
682479
+ importPlugin: () => import("./meriyah-KTJZKAFN.js"),
682437
682480
  parsers: ["meriyah"]
682438
682481
  },
682439
682482
  {
682440
- importPlugin: () => import("./postcss-SYGSWCPX.js"),
682483
+ importPlugin: () => import("./postcss-LHBB5VDF.js"),
682441
682484
  parsers: ["css", "less", "scss"],
682442
682485
  printers: ["postcss"]
682443
682486
  },
682444
682487
  {
682445
- importPlugin: () => import("./typescript-ILFLYBIU.js"),
682488
+ importPlugin: () => import("./typescript-IIQSXSRM.js"),
682446
682489
  parsers: ["typescript"]
682447
682490
  },
682448
682491
  {
682449
- importPlugin: () => import("./yaml-AH7ADMI6.js"),
682492
+ importPlugin: () => import("./yaml-DICNK7TI.js"),
682450
682493
  parsers: ["yaml"],
682451
682494
  printers: ["yaml"]
682452
682495
  }
@@ -698899,7 +698942,7 @@ async function handleLockConflict(error40, lockSvc, span, logger17) {
698899
698942
  }
698900
698943
  async function readPkgJson(cwd) {
698901
698944
  try {
698902
- const { readPackage } = await import("./read-pkg-6JFB2K55.js");
698945
+ const { readPackage } = await import("./read-pkg-HW5J4MZ3.js");
698903
698946
  return await readPackage({ cwd });
698904
698947
  } catch {
698905
698948
  return null;
@@ -700393,4 +700436,4 @@ serve-static/index.js:
700393
700436
  chokidar/esm/index.js:
700394
700437
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
700395
700438
  */
700396
- //# sourceMappingURL=chunk-BGYYYR2Q.js.map
700439
+ //# sourceMappingURL=chunk-OYBYQSI4.js.map