@superblocksteam/cli 2.0.105-next.3 → 2.0.105-next.5

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 (108) hide show
  1. package/README.md +1 -1
  2. package/bin/run.js +3 -1
  3. package/dist/{acorn-CN6JYU6C.js → acorn-6R47IUFK.js} +3 -3
  4. package/dist/{angular-2PNX3NJU.js → angular-LVNL3NNR.js} +3 -3
  5. package/dist/{api-WBVLJHKL.js → api-5LWZ2RJV.js} +4 -4
  6. package/dist/{babel-3RYFPIHU.js → babel-K6JZSYBV.js} +3 -3
  7. package/dist/{chunk-V6HYX527.js → chunk-3RV7M2PT.js} +3 -3
  8. package/dist/{chunk-BMTHQVNU.js → chunk-7M4YHJV2.js} +6 -6
  9. package/dist/{chunk-ZGIKM53K.js → chunk-AVKVXWKJ.js} +289 -140
  10. package/dist/{chunk-ZGIKM53K.js.map → chunk-AVKVXWKJ.js.map} +1 -1
  11. package/dist/{chunk-XBQQ5LE3.js → chunk-CIJ25SQK.js} +4 -4
  12. package/dist/{chunk-7F365BAF.js → chunk-DKXQ57WS.js} +3 -3
  13. package/dist/{chunk-OY2HJQMB.js → chunk-FJUIROKS.js} +221 -119
  14. package/dist/chunk-FJUIROKS.js.map +1 -0
  15. package/dist/{chunk-DBJL76JG.js → chunk-HIJJKWAX.js} +2 -2
  16. package/dist/{chunk-OXC4M25U.js → chunk-I63GF7VA.js} +3 -3
  17. package/dist/{chunk-6HO5XFAA.js → chunk-IV6FUXBH.js} +4 -4
  18. package/dist/{chunk-DJS34GDP.js → chunk-LUJ4CJWP.js} +3 -3
  19. package/dist/{chunk-UR32AWL5.js → chunk-LXPILG67.js} +3 -3
  20. package/dist/{chunk-73IQKEW6.js → chunk-OQDZI7FE.js} +3 -3
  21. package/dist/{chunk-SWTDPYKF.js → chunk-SF4XBYWH.js} +4 -4
  22. package/dist/{chunk-YHSSGIR6.js → chunk-TGWWMECZ.js} +4 -4
  23. package/dist/{chunk-FBRQ5GQY.js → chunk-W6XJS53S.js} +3 -3
  24. package/dist/{chunk-6GJILK2C.js → chunk-YBGPQSKP.js} +3 -3
  25. package/dist/{chunk-IZ6TQ7NB.js → chunk-YGT4VZZZ.js} +3 -3
  26. package/dist/{cli-truncate-KBCISWJV.js → cli-truncate-7FLT3OMT.js} +5 -5
  27. package/dist/commands/dev-parent.js +2 -2
  28. package/dist/{dd-trace-FGSZE4GX.js → dd-trace-KWF2WUPA.js} +7 -7
  29. package/dist/{dist-COYNEQ7T.js → dist-IL6GBI4J.js} +13 -13
  30. package/dist/{embedded-playwright-mcp-server-V35WE5T4.js → embedded-playwright-mcp-server-QS5LX4BK.js} +3 -3
  31. package/dist/{enquirer-IXV6MGEM.js → enquirer-ZX3MUWXX.js} +4 -4
  32. package/dist/{estree-XCEZDHRY.js → estree-PVMY34ZL.js} +3 -3
  33. package/dist/{flow-OGEDI4B4.js → flow-JYIJFJXK.js} +3 -3
  34. package/dist/{getMachineId-bsd-L2HGZSI6.js → getMachineId-bsd-TYV34NXZ.js} +5 -5
  35. package/dist/{getMachineId-darwin-E6XNMPMP.js → getMachineId-darwin-7SOYKEDM.js} +5 -5
  36. package/dist/{getMachineId-linux-2CTIDIMS.js → getMachineId-linux-VOAZGOQK.js} +4 -4
  37. package/dist/{getMachineId-unsupported-SK7LPXEI.js → getMachineId-unsupported-KYTYK754.js} +4 -4
  38. package/dist/{getMachineId-win-B5E2HZYV.js → getMachineId-win-ZDDTCX7C.js} +5 -5
  39. package/dist/{glimmer-OKVWSALA.js → glimmer-O2HVFRLS.js} +3 -3
  40. package/dist/{graphql-YKF6QG2X.js → graphql-6DTV46OU.js} +3 -3
  41. package/dist/{html-WIQCGFFQ.js → html-VJSOS5JX.js} +3 -3
  42. package/dist/{http-G444663C.js → http-4QAFVIXP.js} +12 -12
  43. package/dist/index.js +180 -25
  44. package/dist/index.js.map +1 -1
  45. package/dist/{jiti-EQEMGT6R.js → jiti-XX3MTTOH.js} +3 -3
  46. package/dist/{log-update-N5NNRYXM.js → log-update-GGROIXS7.js} +6 -6
  47. package/dist/{markdown-WVMNDMRR.js → markdown-573GJL7H.js} +3 -3
  48. package/dist/{meriyah-EWMMQMZU.js → meriyah-TN2VK6HX.js} +3 -3
  49. package/dist/{postcss-44ISHF3Y.js → postcss-3RNLSVAL.js} +3 -3
  50. package/dist/{read-pkg-2HVFBBQB.js → read-pkg-US2CH2JR.js} +5 -5
  51. package/dist/{spans-SYI7DLFQ.js → spans-UIF2GQWZ.js} +4 -4
  52. package/dist/{src-U5FIU7HU.js → src-S5UPWBUY.js} +3 -3
  53. package/dist/{token-FDI4WOAX.js → token-FLDOMOR4.js} +5 -5
  54. package/dist/{token-util-4NEFLWRZ.js → token-util-4CO5DF4C.js} +5 -5
  55. package/dist/{typescript-PW5Z5LOC.js → typescript-US5OJORY.js} +3 -3
  56. package/dist/{wrap-ansi-54ZJTV6S.js → wrap-ansi-YZ546A5J.js} +5 -5
  57. package/dist/{yaml-BRCVPHKB.js → yaml-3X6V5R6M.js} +3 -3
  58. package/oclif.manifest.json +8 -1
  59. package/package.json +5 -5
  60. package/dist/chunk-OY2HJQMB.js.map +0 -1
  61. /package/dist/{acorn-CN6JYU6C.js.map → acorn-6R47IUFK.js.map} +0 -0
  62. /package/dist/{angular-2PNX3NJU.js.map → angular-LVNL3NNR.js.map} +0 -0
  63. /package/dist/{api-WBVLJHKL.js.map → api-5LWZ2RJV.js.map} +0 -0
  64. /package/dist/{babel-3RYFPIHU.js.map → babel-K6JZSYBV.js.map} +0 -0
  65. /package/dist/{chunk-V6HYX527.js.map → chunk-3RV7M2PT.js.map} +0 -0
  66. /package/dist/{chunk-BMTHQVNU.js.map → chunk-7M4YHJV2.js.map} +0 -0
  67. /package/dist/{chunk-XBQQ5LE3.js.map → chunk-CIJ25SQK.js.map} +0 -0
  68. /package/dist/{chunk-7F365BAF.js.map → chunk-DKXQ57WS.js.map} +0 -0
  69. /package/dist/{chunk-DBJL76JG.js.map → chunk-HIJJKWAX.js.map} +0 -0
  70. /package/dist/{chunk-OXC4M25U.js.map → chunk-I63GF7VA.js.map} +0 -0
  71. /package/dist/{chunk-6HO5XFAA.js.map → chunk-IV6FUXBH.js.map} +0 -0
  72. /package/dist/{chunk-DJS34GDP.js.map → chunk-LUJ4CJWP.js.map} +0 -0
  73. /package/dist/{chunk-UR32AWL5.js.map → chunk-LXPILG67.js.map} +0 -0
  74. /package/dist/{chunk-73IQKEW6.js.map → chunk-OQDZI7FE.js.map} +0 -0
  75. /package/dist/{chunk-SWTDPYKF.js.map → chunk-SF4XBYWH.js.map} +0 -0
  76. /package/dist/{chunk-YHSSGIR6.js.map → chunk-TGWWMECZ.js.map} +0 -0
  77. /package/dist/{chunk-FBRQ5GQY.js.map → chunk-W6XJS53S.js.map} +0 -0
  78. /package/dist/{chunk-6GJILK2C.js.map → chunk-YBGPQSKP.js.map} +0 -0
  79. /package/dist/{chunk-IZ6TQ7NB.js.map → chunk-YGT4VZZZ.js.map} +0 -0
  80. /package/dist/{cli-truncate-KBCISWJV.js.map → cli-truncate-7FLT3OMT.js.map} +0 -0
  81. /package/dist/{dd-trace-FGSZE4GX.js.map → dd-trace-KWF2WUPA.js.map} +0 -0
  82. /package/dist/{dist-COYNEQ7T.js.map → dist-IL6GBI4J.js.map} +0 -0
  83. /package/dist/{embedded-playwright-mcp-server-V35WE5T4.js.map → embedded-playwright-mcp-server-QS5LX4BK.js.map} +0 -0
  84. /package/dist/{enquirer-IXV6MGEM.js.map → enquirer-ZX3MUWXX.js.map} +0 -0
  85. /package/dist/{estree-XCEZDHRY.js.map → estree-PVMY34ZL.js.map} +0 -0
  86. /package/dist/{flow-OGEDI4B4.js.map → flow-JYIJFJXK.js.map} +0 -0
  87. /package/dist/{getMachineId-bsd-L2HGZSI6.js.map → getMachineId-bsd-TYV34NXZ.js.map} +0 -0
  88. /package/dist/{getMachineId-darwin-E6XNMPMP.js.map → getMachineId-darwin-7SOYKEDM.js.map} +0 -0
  89. /package/dist/{getMachineId-linux-2CTIDIMS.js.map → getMachineId-linux-VOAZGOQK.js.map} +0 -0
  90. /package/dist/{getMachineId-unsupported-SK7LPXEI.js.map → getMachineId-unsupported-KYTYK754.js.map} +0 -0
  91. /package/dist/{getMachineId-win-B5E2HZYV.js.map → getMachineId-win-ZDDTCX7C.js.map} +0 -0
  92. /package/dist/{glimmer-OKVWSALA.js.map → glimmer-O2HVFRLS.js.map} +0 -0
  93. /package/dist/{graphql-YKF6QG2X.js.map → graphql-6DTV46OU.js.map} +0 -0
  94. /package/dist/{html-WIQCGFFQ.js.map → html-VJSOS5JX.js.map} +0 -0
  95. /package/dist/{http-G444663C.js.map → http-4QAFVIXP.js.map} +0 -0
  96. /package/dist/{jiti-EQEMGT6R.js.map → jiti-XX3MTTOH.js.map} +0 -0
  97. /package/dist/{log-update-N5NNRYXM.js.map → log-update-GGROIXS7.js.map} +0 -0
  98. /package/dist/{markdown-WVMNDMRR.js.map → markdown-573GJL7H.js.map} +0 -0
  99. /package/dist/{meriyah-EWMMQMZU.js.map → meriyah-TN2VK6HX.js.map} +0 -0
  100. /package/dist/{postcss-44ISHF3Y.js.map → postcss-3RNLSVAL.js.map} +0 -0
  101. /package/dist/{read-pkg-2HVFBBQB.js.map → read-pkg-US2CH2JR.js.map} +0 -0
  102. /package/dist/{spans-SYI7DLFQ.js.map → spans-UIF2GQWZ.js.map} +0 -0
  103. /package/dist/{src-U5FIU7HU.js.map → src-S5UPWBUY.js.map} +0 -0
  104. /package/dist/{token-FDI4WOAX.js.map → token-FLDOMOR4.js.map} +0 -0
  105. /package/dist/{token-util-4NEFLWRZ.js.map → token-util-4CO5DF4C.js.map} +0 -0
  106. /package/dist/{typescript-PW5Z5LOC.js.map → typescript-US5OJORY.js.map} +0 -0
  107. /package/dist/{wrap-ansi-54ZJTV6S.js.map → wrap-ansi-YZ546A5J.js.map} +0 -0
  108. /package/dist/{yaml-BRCVPHKB.js.map → yaml-3X6V5R6M.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 = 'de5c3e104e3ed96f50cc0f43a6c093c0132245f9';
4
+ process.env.DD_GIT_COMMIT_SHA = '8e1822386833b3e535aac72538348bb99b9da073';
5
5
  }
6
6
  import { createRequire as $dd_createRequire } from 'module';
7
7
  import { fileURLToPath as $dd_fileURLToPath } from 'url';
@@ -24,7 +24,7 @@ import {
24
24
  require_re,
25
25
  require_semver,
26
26
  require_valid
27
- } from "./chunk-7F365BAF.js";
27
+ } from "./chunk-DKXQ57WS.js";
28
28
  import {
29
29
  debounce_default,
30
30
  get_default,
@@ -41,7 +41,7 @@ import {
41
41
  require_lib,
42
42
  require_slugify,
43
43
  throttle_default
44
- } from "./chunk-UR32AWL5.js";
44
+ } from "./chunk-LXPILG67.js";
45
45
  import {
46
46
  require_dd_trace,
47
47
  require_import_in_the_middle,
@@ -50,16 +50,16 @@ import {
50
50
  require_p_limit,
51
51
  require_path_to_regexp,
52
52
  require_src
53
- } from "./chunk-BMTHQVNU.js";
53
+ } from "./chunk-7M4YHJV2.js";
54
54
  import {
55
55
  require_commonjs
56
- } from "./chunk-73IQKEW6.js";
56
+ } from "./chunk-OQDZI7FE.js";
57
57
  import {
58
58
  require_dc_polyfill
59
- } from "./chunk-OXC4M25U.js";
59
+ } from "./chunk-I63GF7VA.js";
60
60
  import {
61
61
  require_token_error
62
- } from "./chunk-DJS34GDP.js";
62
+ } from "./chunk-LUJ4CJWP.js";
63
63
  import {
64
64
  SpanKind,
65
65
  SpanStatusCode,
@@ -68,7 +68,7 @@ import {
68
68
  init_esm,
69
69
  metrics,
70
70
  trace
71
- } from "./chunk-V6HYX527.js";
71
+ } from "./chunk-3RV7M2PT.js";
72
72
  import {
73
73
  __commonJS,
74
74
  __esm,
@@ -77,7 +77,7 @@ import {
77
77
  __toCommonJS,
78
78
  __toESM,
79
79
  init_cjs_shims
80
- } from "./chunk-DBJL76JG.js";
80
+ } from "./chunk-HIJJKWAX.js";
81
81
 
82
82
  // ../../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js
83
83
  var require_constants3 = __commonJS({
@@ -38310,14 +38310,14 @@ var require_quota_paywall = __commonJS({
38310
38310
  subtitle: "Your organization has reached its deployed app limit. Add more deployed apps to continue."
38311
38311
  }
38312
38312
  };
38313
- exports2.AI_QUOTA_PAYWALL_PRICE_PER_SEAT_ANNUAL = 80;
38314
- exports2.AI_QUOTA_PAYWALL_PRICE_PER_SEAT_MONTHLY = 100;
38315
- exports2.AI_QUOTA_PAYWALL_CREDITS_PER_SEAT = 80;
38313
+ exports2.AI_QUOTA_PAYWALL_PRICE_PER_SEAT_ANNUAL = 100;
38314
+ exports2.AI_QUOTA_PAYWALL_PRICE_PER_SEAT_MONTHLY = 125;
38315
+ exports2.AI_QUOTA_PAYWALL_CREDITS_PER_SEAT = 100;
38316
38316
  exports2.AI_QUOTA_PAYWALL_APPS_PER_SEAT = 1;
38317
38317
  exports2.AI_QUOTA_PAYWALL_MIN_SEATS = 1;
38318
38318
  exports2.AI_QUOTA_PAYWALL_MAX_SEATS = 100;
38319
38319
  exports2.AI_QUOTA_PAYWALL_TEAMS_FEATURES = [
38320
- "80 AI Credits per AI Builder / month",
38320
+ "100 AI Credits per AI Builder / month",
38321
38321
  "Org-level credit top-ups, shared across team",
38322
38322
  "Clark AI agent for app building",
38323
38323
  "Clark User Memory",
@@ -40714,8 +40714,9 @@ var require_integration2 = __commonJS({
40714
40714
  configurations;
40715
40715
  slug;
40716
40716
  ownerEmail;
40717
+ creator;
40717
40718
  enabledForV2;
40718
- constructor({ id: id2, created, updated, name: name17, pluginId, organizationId, configurations, demoIntegrationId, isUserConfigured, ownerEmail, kind, slug, enabledForV2 }) {
40719
+ constructor({ id: id2, created, updated, name: name17, pluginId, organizationId, configurations, demoIntegrationId, isUserConfigured, ownerEmail, creator, kind, slug, enabledForV2 }) {
40719
40720
  super();
40720
40721
  this.id = id2;
40721
40722
  this.created = created;
@@ -40727,6 +40728,7 @@ var require_integration2 = __commonJS({
40727
40728
  this.configurations = configurations;
40728
40729
  this.isUserConfigured = isUserConfigured;
40729
40730
  this.ownerEmail = ownerEmail;
40731
+ this.creator = creator;
40730
40732
  this.kind = kind;
40731
40733
  this.slug = slug;
40732
40734
  this.enabledForV2 = enabledForV2;
@@ -96496,15 +96498,15 @@ var require_api_files = __commonJS({
96496
96498
  exports2.readAppApiYamlFile = readAppApiYamlFile4;
96497
96499
  exports2.resolveLanguageSpecificStepContentFromBlocks = resolveLanguageSpecificStepContentFromBlocks2;
96498
96500
  async function writeApiFiles3(...args) {
96499
- const esmFunction = await import("./api-WBVLJHKL.js");
96501
+ const esmFunction = await import("./api-5LWZ2RJV.js");
96500
96502
  return esmFunction.writeApiFiles(...args);
96501
96503
  }
96502
96504
  async function readAppApiYamlFile4(...args) {
96503
- const esmFunction = await import("./api-WBVLJHKL.js");
96505
+ const esmFunction = await import("./api-5LWZ2RJV.js");
96504
96506
  return esmFunction.readAppApiYamlFile(...args);
96505
96507
  }
96506
96508
  async function resolveLanguageSpecificStepContentFromBlocks2(...args) {
96507
- const esmFunction = await import("./api-WBVLJHKL.js");
96509
+ const esmFunction = await import("./api-5LWZ2RJV.js");
96508
96510
  return esmFunction.resolveLanguageSpecificStepContentFromBlocks(...args);
96509
96511
  }
96510
96512
  }
@@ -109296,19 +109298,19 @@ var require_getMachineId = __commonJS({
109296
109298
  if (!getMachineIdImpl) {
109297
109299
  switch (process5.platform) {
109298
109300
  case "darwin":
109299
- getMachineIdImpl = (await import("./getMachineId-darwin-E6XNMPMP.js")).getMachineId;
109301
+ getMachineIdImpl = (await import("./getMachineId-darwin-7SOYKEDM.js")).getMachineId;
109300
109302
  break;
109301
109303
  case "linux":
109302
- getMachineIdImpl = (await import("./getMachineId-linux-2CTIDIMS.js")).getMachineId;
109304
+ getMachineIdImpl = (await import("./getMachineId-linux-VOAZGOQK.js")).getMachineId;
109303
109305
  break;
109304
109306
  case "freebsd":
109305
- getMachineIdImpl = (await import("./getMachineId-bsd-L2HGZSI6.js")).getMachineId;
109307
+ getMachineIdImpl = (await import("./getMachineId-bsd-TYV34NXZ.js")).getMachineId;
109306
109308
  break;
109307
109309
  case "win32":
109308
- getMachineIdImpl = (await import("./getMachineId-win-B5E2HZYV.js")).getMachineId;
109310
+ getMachineIdImpl = (await import("./getMachineId-win-ZDDTCX7C.js")).getMachineId;
109309
109311
  break;
109310
109312
  default:
109311
- getMachineIdImpl = (await import("./getMachineId-unsupported-SK7LPXEI.js")).getMachineId;
109313
+ getMachineIdImpl = (await import("./getMachineId-unsupported-KYTYK754.js")).getMachineId;
109312
109314
  break;
109313
109315
  }
109314
109316
  }
@@ -185171,8 +185173,8 @@ var require_get_vercel_oidc_token = __commonJS({
185171
185173
  }
185172
185174
  try {
185173
185175
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
185174
- await import("./token-util-4NEFLWRZ.js"),
185175
- await import("./token-FDI4WOAX.js")
185176
+ await import("./token-util-4CO5DF4C.js"),
185177
+ await import("./token-FLDOMOR4.js")
185176
185178
  ]);
185177
185179
  if (!token2 || isExpired(getTokenPayload(token2))) {
185178
185180
  await refreshToken();
@@ -367372,7 +367374,7 @@ var require_config_loader = __commonJS({
367372
367374
  * @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
367373
367375
  */
367374
367376
  static async loadJiti() {
367375
- const { createJiti } = await import("./jiti-EQEMGT6R.js");
367377
+ const { createJiti } = await import("./jiti-XX3MTTOH.js");
367376
367378
  const version5 = require_package6().version;
367377
367379
  return { createJiti, version: version5 };
367378
367380
  }
@@ -367701,7 +367703,7 @@ var require_eslint_helpers = __commonJS({
367701
367703
  }
367702
367704
  async function globMatch({ basePath, pattern }) {
367703
367705
  let found = false;
367704
- const { hfs } = await import("./src-U5FIU7HU.js");
367706
+ const { hfs } = await import("./src-S5UPWBUY.js");
367705
367707
  const patternToUse = normalizeToPosix(path77.relative(basePath, pattern));
367706
367708
  const matcher = new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
367707
367709
  const walkSettings = {
@@ -367741,7 +367743,7 @@ var require_eslint_helpers = __commonJS({
367741
367743
  return new Minimatch2(patternToUse, MINIMATCH_OPTIONS);
367742
367744
  });
367743
367745
  const unmatchedPatterns = /* @__PURE__ */ new Set([...relativeToPatterns.keys()]);
367744
- const { hfs } = await import("./src-U5FIU7HU.js");
367746
+ const { hfs } = await import("./src-S5UPWBUY.js");
367745
367747
  const walk2 = hfs.walk(basePath, {
367746
367748
  async directoryFilter(entry) {
367747
367749
  if (!matchers.some((matcher) => matcher.match(entry.path, true))) {
@@ -368764,7 +368766,7 @@ var require_eslint = __commonJS({
368764
368766
  "../../../../node_modules/.pnpm/eslint@9.39.2_jiti@2.6.1/node_modules/eslint/lib/eslint/eslint.js"(exports2, module2) {
368765
368767
  "use strict";
368766
368768
  init_cjs_shims();
368767
- var { existsSync: existsSync5 } = __require("node:fs");
368769
+ var { existsSync: existsSync6 } = __require("node:fs");
368768
368770
  var fs44 = __require("node:fs/promises");
368769
368771
  var os8 = __require("node:os");
368770
368772
  var path77 = __require("node:path");
@@ -369172,7 +369174,7 @@ var require_eslint = __commonJS({
369172
369174
  configLoader: this.#configLoader,
369173
369175
  warningService
369174
369176
  });
369175
- if (existsSync5(path77.resolve(processedOptions.cwd, ".eslintignore"))) {
369177
+ if (existsSync6(path77.resolve(processedOptions.cwd, ".eslintignore"))) {
369176
369178
  warningService.emitESLintIgnoreWarning();
369177
369179
  }
369178
369180
  }
@@ -369340,11 +369342,11 @@ var require_eslint = __commonJS({
369340
369342
  if (!lintResultCache && cacheFilePath) {
369341
369343
  debug3(`Deleting cache file at ${cacheFilePath}`);
369342
369344
  try {
369343
- if (existsSync5(cacheFilePath)) {
369345
+ if (existsSync6(cacheFilePath)) {
369344
369346
  await fs44.unlink(cacheFilePath);
369345
369347
  }
369346
369348
  } catch (error40) {
369347
- if (existsSync5(cacheFilePath)) {
369349
+ if (existsSync6(cacheFilePath)) {
369348
369350
  throw error40;
369349
369351
  }
369350
369352
  }
@@ -520393,7 +520395,7 @@ init_cjs_shims();
520393
520395
  // ../sdk/package.json
520394
520396
  var package_default = {
520395
520397
  name: "@superblocksteam/sdk",
520396
- version: "2.0.105-next.3",
520398
+ version: "2.0.105-next.5",
520397
520399
  description: "Superblocks JS SDK",
520398
520400
  homepage: "https://www.superblocks.com",
520399
520401
  license: "Superblocks Community Software License",
@@ -520747,7 +520749,7 @@ var config = void 0;
520747
520749
  var configured = false;
520748
520750
  var ddTracePromise = void 0;
520749
520751
  async function getDdTrace() {
520750
- ddTracePromise ??= import("./dd-trace-FGSZE4GX.js").then((module2) => module2.default);
520752
+ ddTracePromise ??= import("./dd-trace-KWF2WUPA.js").then((module2) => module2.default);
520751
520753
  return await ddTracePromise;
520752
520754
  }
520753
520755
  var deploymentType = (() => {
@@ -529838,7 +529840,7 @@ var MAX_ATTRIBUTE_LENGTH = 64e3;
529838
529840
  var LLMObsSpanWriter = null;
529839
529841
  async function loadLLMObsSpanWriter() {
529840
529842
  if (!LLMObsSpanWriter) {
529841
- const module2 = await import("./spans-SYI7DLFQ.js");
529843
+ const module2 = await import("./spans-UIF2GQWZ.js");
529842
529844
  LLMObsSpanWriter = module2.default;
529843
529845
  }
529844
529846
  return LLMObsSpanWriter;
@@ -543857,7 +543859,7 @@ init_cjs_shims();
543857
543859
  var openIntegrationSetupToolFactory = createToolFactory("openIntegrationSetup", ({ clark }) => ({
543858
543860
  category: ToolCategory.INTERACTIVE,
543859
543861
  defaultPermission: PermissionLevel.ALLOW,
543860
- description: "Opens the integration setup tab so the user can configure a new connection to a data source. Use when the user needs to connect to a data source or set up a new integration. If unsure of the pluginId, call listAvailableIntegrationTypes first to get the correct ID. The tab will open in the UI and the user can fill in the required fields. The response includes a formState with the exact field names, types, and required flags for this plugin. You can pre-fill non-sensitive fields (host, port, database, region, etc.) by passing them in the fields parameter. Sensitive fields (passwords, API keys, tokens) will be ignored \u2014 the user must enter those directly in the form.",
543862
+ description: "Opens the integration setup tab so the user can configure a new connection to a data source. Use when the user needs to connect to a data source or set up a new integration. If unsure of the pluginId, call listAvailableIntegrationTypes first to get the correct ID. The tab will open in the UI and the user can fill in the required fields. The response includes a formState with the exact field names, types, and required flags for this plugin. IMPORTANT: If you already know any field values (host, port, database, name, region, etc.), you MUST pass them in the `fields` parameter of this call. You will not be able to call updateIntegrationFields in the same turn after opening. Sensitive fields (passwords, API keys, tokens) will be ignored \u2014 the user must enter those directly in the form.",
543861
543863
  inputSchema: zod_default.object({
543862
543864
  pluginId: zod_default.string().describe("The plugin identifier for the integration type to set up. Use listAvailableIntegrationTypes to discover valid IDs."),
543863
543865
  displayName: zod_default.string().optional().describe("Optional suggested display name for the new integration."),
@@ -543890,16 +543892,18 @@ var openIntegrationSetupToolFactory = createToolFactory("openIntegrationSetup",
543890
543892
  var openExistingIntegrationToolFactory = createToolFactory("openExistingIntegration", ({ clark }) => ({
543891
543893
  category: ToolCategory.INTERACTIVE,
543892
543894
  defaultPermission: PermissionLevel.ALLOW,
543893
- description: "Opens an existing integration for editing by its datasource ID. Use when the user wants to view or update the configuration of an integration they have already created. The integration setup tab will open with the existing field values pre-filled.",
543895
+ description: "Opens an existing integration for editing by its datasource ID. Use when the user wants to view or update the configuration of an integration they have already created. The integration setup tab will open with the existing field values pre-filled. IMPORTANT: If you need to update any fields, you MUST pass them in the `fields` parameter of this call. You will not be able to call updateIntegrationFields in the same turn after opening.",
543894
543896
  inputSchema: zod_default.object({
543895
- integrationId: zod_default.string().describe("The ID of the existing datasource/integration to open for editing.")
543897
+ integrationId: zod_default.string().describe("The ID of the existing datasource/integration to open for editing."),
543898
+ fields: zod_default.record(zod_default.union([zod_default.string(), zod_default.number(), zod_default.boolean()])).optional().describe("Optional map of non-sensitive field names to values to apply immediately after opening. Preferred over a separate updateIntegrationFields call when opening and updating together.")
543896
543899
  }),
543897
543900
  execute: async (input) => {
543898
543901
  if (!clark.context.peer) {
543899
543902
  return { success: false, error: "No peer connection available." };
543900
543903
  }
543901
543904
  return clark.context.peer.call.aiOpenExistingIntegration({
543902
- integrationId: input.integrationId
543905
+ integrationId: input.integrationId,
543906
+ fields: input.fields
543903
543907
  });
543904
543908
  },
543905
543909
  getActionName: () => ({
@@ -546221,7 +546225,6 @@ function extractParentPrefixes(matches) {
546221
546225
  columns: /* @__PURE__ */ new Map(),
546222
546226
  schemas: /* @__PURE__ */ new Set(),
546223
546227
  paths: /* @__PURE__ */ new Set(),
546224
- operations: /* @__PURE__ */ new Set(),
546225
546228
  types: /* @__PURE__ */ new Set(),
546226
546229
  fields: /* @__PURE__ */ new Map(),
546227
546230
  rawValues: []
@@ -546252,11 +546255,6 @@ function extractParentPrefixes(matches) {
546252
546255
  const pathKey2 = stripQuotes(pathMatch[1]);
546253
546256
  matched.paths.add(pathKey2);
546254
546257
  }
546255
- const opMatch = match2.match(/json\.openApiSpec\.operations\[((?:"(?:[^"\\]|\\.)+"|[0-9]+))\]/);
546256
- if (opMatch?.[1]) {
546257
- const opKey = stripQuotes(opMatch[1]);
546258
- matched.operations.add(opKey);
546259
- }
546260
546258
  const typeMatch = match2.match(/json\.graphql\.data\.__schema\.types\[(\d+)\]/);
546261
546259
  if (typeMatch?.[1]) {
546262
546260
  matched.types.add(parseInt(typeMatch[1], 10));
@@ -546729,7 +546727,7 @@ function extractResultsFromJSON(json2, matched, limit, includeDetails, startGlob
546729
546727
  }
546730
546728
  globalIndex++;
546731
546729
  }
546732
- const totalMatched = matched.tables.size + Array.from(matched.columns.values()).reduce((sum, cols) => sum + cols.size, 0) + matched.schemas.size + matched.paths.size + matched.operations.size + matched.types.size + Array.from(matched.fields.values()).reduce((sum, fields) => sum + fields.size, 0) + matched.rawValues.length;
546730
+ const totalMatched = matched.tables.size + Array.from(matched.columns.values()).reduce((sum, cols) => sum + cols.size, 0) + matched.schemas.size + matched.paths.size + matched.types.size + Array.from(matched.fields.values()).reduce((sum, fields) => sum + fields.size, 0) + matched.rawValues.length;
546733
546731
  const truncated = results.length >= limit && totalMatched > limit;
546734
546732
  logger15.debug(`[extract] Built ${results.length} results from ${totalMatched} total matched items (truncated: ${truncated})`);
546735
546733
  return {
@@ -546901,16 +546899,15 @@ Find OpenAPI paths (string keys, not arrays!):
546901
546899
  '\\.paths\\[".*repos.*"\\]'
546902
546900
  (Quotes constrain search to the path key, not descriptions)
546903
546901
 
546904
- Find OpenAPI operations:
546905
- '\\.operations\\[.*\\]\\.method = "GET"'
546902
+ Find OpenAPI operations by method:
546903
+ '\\.paths\\[.*\\]\\.get\\.operationId'
546906
546904
  \u2192 Returns: Operation with method, path, parameters array, requestBody, and responses
546907
546905
  \u2192 parameters array includes path/query/header/cookie parameters with types and descriptions
546908
546906
  \u2192 responses object shows response schemas by status code (200, 404, etc.)
546909
546907
 
546910
- Find OpenAPI by operation:
546911
- '\\.paths\\[.*\\]\\.get\\.operationId'
546912
- '\\.operationId.*keyword'
546913
- '\\.summary.*keyword'
546908
+ Find OpenAPI by operation ID or summary:
546909
+ '\\.operationId = ".*keyword.*"'
546910
+ '\\.summary = ".*keyword.*"'
546914
546911
 
546915
546912
  Find GraphQL types:
546916
546913
  '\\.graphql\\.data\\.__schema\\.types\\[\\d+\\]\\.name = ".*User.*"'
@@ -564999,24 +564996,57 @@ const { data } = useApiData("GetUsers", { email }, {
564999
564996
  });
565000
564997
  \`\`\`
565001
564998
 
565002
- ### Cache Invalidation and Optimistic Updates
564999
+ ### Cache invalidation and optimistic updates
565000
+
565001
+ **Same scope as the read**: After a mutation, prefer \`refetch()\` from the \`useApiData\` that loads the data (same component or wherever you can pass \`refetch\`).
565002
+
565003
+ \`\`\`typescript
565004
+ import { useApi, useApiData } from "@superblocksteam/library";
565005
+ import { toast } from "sonner";
565006
+
565007
+ const { data: orders, refetch } = useApiData("GetOrders", { status });
565008
+ const { run: createOrder } = useApi("CreateOrder");
565009
+
565010
+ const handleSubmit = useCallback(async () => {
565011
+ try {
565012
+ await createOrder({ item, qty });
565013
+ await refetch();
565014
+ } catch (error) {
565015
+ const message =
565016
+ error && typeof error === "object" && "message" in error
565017
+ ? String((error as { message: unknown }).message)
565018
+ : String(error);
565019
+ toast.error("Error creating order: " + message);
565020
+ }
565021
+ }, [item, qty, createOrder, refetch]);
565022
+ \`\`\`
565003
565023
 
565004
- Use \`queryClient\` to invalidate caches after mutations or set data optimistically:
565024
+ **Cross-scope or broad invalidation**: Use \`queryClient.invalidateQueries\` when you cannot call that \`refetch\` (mutation in a different place than the \`useApiData\`, or you need every cached variant of an API to refetch). For **\`queryClient.invalidateQueries\`, \`buildCacheKey\`, \`setQueryData\`, and any other \`queryClient\` usage, always import \`queryClient\` from \`@superblocksteam/library\`**.
565005
565025
 
565006
565026
  \`\`\`typescript
565007
565027
  import { queryClient, useApi } from "@superblocksteam/library";
565028
+ import { toast } from "sonner";
565008
565029
 
565009
565030
  const { run: createOrder } = useApi("CreateOrder");
565010
565031
 
565011
565032
  const handleSubmit = useCallback(async () => {
565012
- await createOrder({ item, qty });
565013
- // Invalidate all GetOrders queries so they refetch
565014
- await queryClient.invalidateQueries("GetOrders");
565033
+ try {
565034
+ await createOrder({ item, qty });
565035
+ await queryClient.invalidateQueries("GetOrders");
565036
+ } catch (error) {
565037
+ const message =
565038
+ error && typeof error === "object" && "message" in error
565039
+ ? String((error as { message: unknown }).message)
565040
+ : String(error);
565041
+ toast.error("Error creating order: " + message);
565042
+ }
565015
565043
  }, [item, qty, createOrder]);
565016
565044
  \`\`\`
565017
565045
 
565018
565046
  \`\`\`typescript
565019
565047
  // Optimistic update: set cached data without refetching
565048
+ import { queryClient } from "@superblocksteam/library";
565049
+
565020
565050
  const cacheKey = queryClient.buildCacheKey("GetOrders", { status: "active" });
565021
565051
  queryClient.setQueryData(cacheKey, (old) => ({
565022
565052
  ...old,
@@ -587270,6 +587300,66 @@ var OperationQueue2 = class {
587270
587300
  }
587271
587301
  };
587272
587302
 
587303
+ // ../../../vite-plugin-file-sync/dist/ai-service/llm/context-v2/uniquify-filenames.js
587304
+ init_cjs_shims();
587305
+ function uniquifySuffix(filename, counter) {
587306
+ const dotIndex = filename.lastIndexOf(".");
587307
+ if (dotIndex === -1) {
587308
+ return `${filename}_${counter}`;
587309
+ }
587310
+ return `${filename.slice(0, dotIndex)}_${counter}${filename.slice(dotIndex)}`;
587311
+ }
587312
+ function uniquifyFilePartFilenames(messages3) {
587313
+ const taken = /* @__PURE__ */ new Set();
587314
+ for (const msg of messages3) {
587315
+ if (typeof msg.content === "string" || !Array.isArray(msg.content)) {
587316
+ continue;
587317
+ }
587318
+ for (const part of msg.content) {
587319
+ if (typeof part === "object" && part !== null && "type" in part && part.type === "file" && "filename" in part && typeof part.filename === "string") {
587320
+ taken.add(part.filename);
587321
+ }
587322
+ }
587323
+ }
587324
+ const seen = /* @__PURE__ */ new Set();
587325
+ const counters = /* @__PURE__ */ new Map();
587326
+ let anyMutation = false;
587327
+ const result = messages3.map((msg) => {
587328
+ if (typeof msg.content === "string" || !Array.isArray(msg.content)) {
587329
+ return msg;
587330
+ }
587331
+ let contentMutated = false;
587332
+ const newContent = msg.content.map((part) => {
587333
+ if (typeof part === "object" && part !== null && "type" in part && part.type === "file" && "filename" in part && typeof part.filename === "string") {
587334
+ const filePart = part;
587335
+ const filename = filePart.filename;
587336
+ if (!seen.has(filename)) {
587337
+ seen.add(filename);
587338
+ return part;
587339
+ }
587340
+ let counter = (counters.get(filename) ?? 1) + 1;
587341
+ let candidate = uniquifySuffix(filename, counter);
587342
+ while (taken.has(candidate) || seen.has(candidate)) {
587343
+ counter++;
587344
+ candidate = uniquifySuffix(filename, counter);
587345
+ }
587346
+ counters.set(filename, counter);
587347
+ seen.add(candidate);
587348
+ taken.add(candidate);
587349
+ contentMutated = true;
587350
+ anyMutation = true;
587351
+ return { ...part, filename: candidate };
587352
+ }
587353
+ return part;
587354
+ });
587355
+ if (contentMutated) {
587356
+ return { ...msg, content: newContent };
587357
+ }
587358
+ return msg;
587359
+ });
587360
+ return anyMutation ? result : messages3;
587361
+ }
587362
+
587273
587363
  // ../../../vite-plugin-file-sync/dist/ai-service/llm/context-v2/context.js
587274
587364
  var logger7 = getPrefixedLogger("[context-v2]");
587275
587365
  function hasScreenshotMedia(msg) {
@@ -587512,12 +587602,13 @@ var ContextV2 = class _ContextV2 {
587512
587602
  const sanitized = toSdkMessages(allMessages);
587513
587603
  const normalized = sanitized.map((msg) => normalizeToolMessage(stripUndefinedFromToolOutputs(msg)));
587514
587604
  const repaired = normalized.map(repairBrokenToolCalls);
587605
+ const deduped = uniquifyFilePartFilenames(repaired);
587515
587606
  for (const idx of breakpoints) {
587516
- if (repaired[idx]) {
587517
- repaired[idx].providerOptions = CACHE_BREAKPOINT_PROVIDER_OPTIONS;
587607
+ if (deduped[idx]) {
587608
+ deduped[idx].providerOptions = CACHE_BREAKPOINT_PROVIDER_OPTIONS;
587518
587609
  }
587519
587610
  }
587520
- return repaired;
587611
+ return deduped;
587521
587612
  });
587522
587613
  }
587523
587614
  /**
@@ -597315,7 +597406,7 @@ var PlaywrightMcpServerManager = class {
597315
597406
  this.logger.info(`Starting embedded Playwright MCP server: browser=${options8?.browser || "chromium"}, headless=${options8?.headless !== false}`);
597316
597407
  }
597317
597408
  try {
597318
- const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-V35WE5T4.js");
597409
+ const { startEmbeddedPlaywrightMcpServer } = await import("./embedded-playwright-mcp-server-QS5LX4BK.js");
597319
597410
  this.server = await startEmbeddedPlaywrightMcpServer({
597320
597411
  storageStatePath: options8?.storageStatePath,
597321
597412
  jwt: options8?.jwt,
@@ -606722,7 +606813,9 @@ ${config4.features.nativeGitRawEnabled ? `
606722
606813
  - Do not run raw push commands. If you run \`git_raw\` commit, it will automatically push to \`origin/${import_shared34.SUPERBLOCKS_LIVE_GIT_BRANCH}\` after the commit succeeds.
606723
606814
  - Favor inspection commands first when debugging git state, and only use mutating git commands when they clearly preserve the single live-branch workflow.
606724
606815
  ` : ""}
606725
- ` : ""}Here are some additional guidelines to follow:
606816
+ ` : `**Version Control:**
606817
+ If the user asks about committing, deploying, publishing, or version-controlling their application, read the documentation at \`https://docs.superblocks.com/development-lifecycle/deploy/version-control\` using \`web_fetch\` and guide them based on its contents.
606818
+ `}Here are some additional guidelines to follow:
606726
606819
 
606727
606820
  `;
606728
606821
  }
@@ -631248,11 +631341,27 @@ The integration setup form is already open for ${pluginId}${nameLabel} in ${mode
631248
631341
  `
631249
631342
  });
631250
631343
  }
631251
- if (promptContext) {
631344
+ if (promptContext?.currentView) {
631345
+ const viewDescriptions = {
631346
+ preview: "the Preview, where the user sees a live preview of their application as it would appear in a browser.",
631347
+ "code-viewer": "the Code view. The Code view is a read-only file viewer \u2014 the user cannot edit files directly in this view. Do not suggest editing files through the Code view UI. To make code changes, use your own tools instead.",
631348
+ "integration-setup": "the Integration Setup view, where the user configures an integration (e.g. database credentials, API keys, or connection settings)."
631349
+ };
631350
+ const desc2 = viewDescriptions[promptContext.currentView];
631351
+ content9.push({
631352
+ type: "text",
631353
+ text: `<current_view>
631354
+ The user is currently in ${desc2}
631355
+ </current_view>
631356
+
631357
+ `
631358
+ });
631359
+ }
631360
+ if (promptContext && (!promptContext.currentView || promptContext.currentView === "preview")) {
631252
631361
  content9.push({
631253
631362
  type: "text",
631254
631363
  text: `<preview_device>
631255
- The user is currently viewing the app in ${promptContext?.previewDevice === "mobile" ? "mobile preview mode (viewport width: 375px)" : "desktop preview mode (full width)"}.
631364
+ The user is currently viewing the app in ${promptContext.previewDevice === "mobile" ? "mobile preview mode (viewport width: 375px)" : "desktop preview mode (full width)"}.
631256
631365
  </preview_device>
631257
631366
 
631258
631367
  `
@@ -636213,12 +636322,12 @@ ${request3.prompt}`;
636213
636322
  };
636214
636323
  }
636215
636324
  async handleRestoreToCommit(sinceTimestamp, commitId, applicationId, branchName) {
636216
- await this.chatSessionStore.truncateAfterTimestamp(sinceTimestamp);
636217
636325
  const jwt2 = this.clark?.context?.jwt;
636218
636326
  if (!jwt2) {
636219
636327
  this.getLogger().warn(`[handleRestoreToCommit] No JWT available, cannot restore or truncate context`);
636220
636328
  return;
636221
636329
  }
636330
+ let restored = false;
636222
636331
  try {
636223
636332
  const contextId = getContextId(this.clark, this.config);
636224
636333
  const result = await restoreContextFromCheckpoint({
@@ -636233,24 +636342,22 @@ ${request3.prompt}`;
636233
636342
  contextManagerV2: this.contextManagerV2
636234
636343
  });
636235
636344
  if (result.success) {
636236
- this.getLogger().info(`[handleRestoreToCommit] Successfully restored main.json from checkpoint commitId=${commitId}, skipping truncation`);
636237
- return;
636345
+ restored = true;
636238
636346
  } else {
636239
- const reason = result.savedFiles.length > 0 ? "main.json not found in checkpoint" : "no file saved from checkpoint";
636240
- this.getLogger().info(`[handleRestoreToCommit] Context restore failed: ${reason} for commitId=${commitId}, using truncation fallback`);
636347
+ const reason = result.savedFiles.length > 0 ? "main.json not found in checkpoint" : "no checkpoint found";
636348
+ this.getLogger().info(`[handleRestoreToCommit] Context restore failed: ${reason} for commitId=${commitId}, preserving chat messages`);
636241
636349
  }
636242
636350
  } catch (error40) {
636243
- this.getLogger().warn(`[handleRestoreToCommit] Error restoring context from checkpoint, using truncation fallback`, getErrorMeta2(error40));
636351
+ this.getLogger().warn(`[handleRestoreToCommit] Error restoring context from checkpoint, preserving chat messages`, getErrorMeta2(error40));
636244
636352
  }
636245
- const context = getActiveContext(this.clark, {
636246
- contextManagerV2: this.contextManagerV2,
636247
- applicationId: this.config.applicationId
636248
- });
636249
- if (context) {
636250
- context.truncateAfterTimestamp(sinceTimestamp);
636251
- this.getLogger().info(`[handleRestoreToCommit] Context truncated after timestamp ${sinceTimestamp}`);
636252
- } else {
636253
- this.getLogger().info(`[handleRestoreToCommit] No active context loaded, skipping truncation`);
636353
+ if (!restored) {
636354
+ return;
636355
+ }
636356
+ try {
636357
+ await this.chatSessionStore.truncateAfterTimestamp(sinceTimestamp);
636358
+ this.getLogger().info(`[handleRestoreToCommit] Successfully restored context and truncated chat for commitId=${commitId}`);
636359
+ } catch (error40) {
636360
+ this.getLogger().warn(`[handleRestoreToCommit] Context restored but failed to truncate chat for commitId=${commitId}`, getErrorMeta2(error40));
636254
636361
  }
636255
636362
  }
636256
636363
  async handleApiUpdate(update3) {
@@ -639080,11 +639187,11 @@ var SocketManager = class extends import_shared57.TracedEventEmitter {
639080
639187
  ws.close(1008, "No peerId found");
639081
639188
  return;
639082
639189
  }
639083
- if (url4.searchParams.get("applicationId") !== syncService?.applicationId) {
639190
+ if (syncService?.applicationId && url4.searchParams.get("applicationId") !== syncService.applicationId) {
639084
639191
  getLogger3().error("Application ID mismatch", {
639085
639192
  error: {
639086
639193
  kind: "ValidationError",
639087
- message: `Expected application ID ${syncService?.applicationId}, received ${url4.searchParams.get("applicationId")}`
639194
+ message: `Expected application ID ${syncService.applicationId}, received ${url4.searchParams.get("applicationId")}`
639088
639195
  }
639089
639196
  });
639090
639197
  ws.close(1008, "Application ID mismatch");
@@ -661363,7 +661470,7 @@ var parseYaml3;
661363
661470
  async function loadYaml(file2) {
661364
661471
  const content9 = await read_file_default(file2);
661365
661472
  if (!parseYaml3) {
661366
- ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-BRCVPHKB.js"));
661473
+ ({ __parsePrettierYamlConfig: parseYaml3 } = await import("./yaml-3X6V5R6M.js"));
661367
661474
  }
661368
661475
  try {
661369
661476
  return parseYaml3(content9);
@@ -666757,7 +666864,7 @@ function createParsersAndPrinters(modules) {
666757
666864
  }
666758
666865
  var estreePlugin = createParsersAndPrinters([
666759
666866
  {
666760
- importPlugin: () => import("./estree-XCEZDHRY.js"),
666867
+ importPlugin: () => import("./estree-PVMY34ZL.js"),
666761
666868
  printers: ["estree", "estree-json"]
666762
666869
  }
666763
666870
  ]);
@@ -666781,11 +666888,11 @@ var languages = [
666781
666888
  ];
666782
666889
  var { parsers: parsers12, printers } = createParsersAndPrinters([
666783
666890
  {
666784
- importPlugin: () => import("./acorn-CN6JYU6C.js"),
666891
+ importPlugin: () => import("./acorn-6R47IUFK.js"),
666785
666892
  parsers: ["acorn", "espree"]
666786
666893
  },
666787
666894
  {
666788
- importPlugin: () => import("./angular-2PNX3NJU.js"),
666895
+ importPlugin: () => import("./angular-LVNL3NNR.js"),
666789
666896
  parsers: [
666790
666897
  "__ng_action",
666791
666898
  "__ng_binding",
@@ -666794,7 +666901,7 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
666794
666901
  ]
666795
666902
  },
666796
666903
  {
666797
- importPlugin: () => import("./babel-3RYFPIHU.js"),
666904
+ importPlugin: () => import("./babel-K6JZSYBV.js"),
666798
666905
  parsers: [
666799
666906
  "babel",
666800
666907
  "babel-flow",
@@ -666813,44 +666920,44 @@ var { parsers: parsers12, printers } = createParsersAndPrinters([
666813
666920
  ]
666814
666921
  },
666815
666922
  {
666816
- importPlugin: () => import("./flow-OGEDI4B4.js"),
666923
+ importPlugin: () => import("./flow-JYIJFJXK.js"),
666817
666924
  parsers: ["flow"]
666818
666925
  },
666819
666926
  {
666820
- importPlugin: () => import("./glimmer-OKVWSALA.js"),
666927
+ importPlugin: () => import("./glimmer-O2HVFRLS.js"),
666821
666928
  parsers: ["glimmer"],
666822
666929
  printers: ["glimmer"]
666823
666930
  },
666824
666931
  {
666825
- importPlugin: () => import("./graphql-YKF6QG2X.js"),
666932
+ importPlugin: () => import("./graphql-6DTV46OU.js"),
666826
666933
  parsers: ["graphql"],
666827
666934
  printers: ["graphql"]
666828
666935
  },
666829
666936
  {
666830
- importPlugin: () => import("./html-WIQCGFFQ.js"),
666937
+ importPlugin: () => import("./html-VJSOS5JX.js"),
666831
666938
  parsers: ["html", "angular", "vue", "lwc", "mjml"],
666832
666939
  printers: ["html"]
666833
666940
  },
666834
666941
  {
666835
- importPlugin: () => import("./markdown-WVMNDMRR.js"),
666942
+ importPlugin: () => import("./markdown-573GJL7H.js"),
666836
666943
  parsers: ["markdown", "mdx", "remark"],
666837
666944
  printers: ["mdast"]
666838
666945
  },
666839
666946
  {
666840
- importPlugin: () => import("./meriyah-EWMMQMZU.js"),
666947
+ importPlugin: () => import("./meriyah-TN2VK6HX.js"),
666841
666948
  parsers: ["meriyah"]
666842
666949
  },
666843
666950
  {
666844
- importPlugin: () => import("./postcss-44ISHF3Y.js"),
666951
+ importPlugin: () => import("./postcss-3RNLSVAL.js"),
666845
666952
  parsers: ["css", "less", "scss"],
666846
666953
  printers: ["postcss"]
666847
666954
  },
666848
666955
  {
666849
- importPlugin: () => import("./typescript-PW5Z5LOC.js"),
666956
+ importPlugin: () => import("./typescript-US5OJORY.js"),
666850
666957
  parsers: ["typescript"]
666851
666958
  },
666852
666959
  {
666853
- importPlugin: () => import("./yaml-BRCVPHKB.js"),
666960
+ importPlugin: () => import("./yaml-3X6V5R6M.js"),
666854
666961
  parsers: ["yaml"],
666855
666962
  printers: ["yaml"]
666856
666963
  }
@@ -678677,6 +678784,7 @@ async function checkVersionsAndWritePackageJson(lockService, config4, forceUpgra
678677
678784
  init_cjs_shims();
678678
678785
  var import_cors = __toESM(require_lib51(), 1);
678679
678786
  var import_express = __toESM(require_express2(), 1);
678787
+ import { existsSync as existsSync4 } from "node:fs";
678680
678788
  import net from "node:net";
678681
678789
  import os6 from "node:os";
678682
678790
  import path73 from "node:path";
@@ -678745,7 +678853,7 @@ function getJwksUriWithBaseUrl(superblocksBaseUrl) {
678745
678853
  return jwksUri;
678746
678854
  }
678747
678855
  var httpServer;
678748
- async function createDevServer({ root: root3, mode, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, logger: loggerOverride, port, sdk, superblocksBaseUrl: explicitBaseUrl }) {
678856
+ async function createDevServer({ root: root3, mode, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, logger: loggerOverride, port, sdk, superblocksBaseUrl: explicitBaseUrl, existingServer }) {
678749
678857
  const logger15 = getLogger2(loggerOverride);
678750
678858
  if (httpServer) {
678751
678859
  logger15.debug("Dev server already running");
@@ -678918,43 +679026,14 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
678918
679026
  return;
678919
679027
  }
678920
679028
  }
678921
- logger15.info("Initializing dev server...");
678922
- if (isViteServerInitialized) {
678923
- logger15.info("Dev server already initialized");
679029
+ logger15.info("Received connect request, waiting for vite server...");
679030
+ try {
679031
+ await vitePromise;
678924
679032
  res.send(JSON.stringify(healthResponse));
678925
- return;
679033
+ } catch (e) {
679034
+ logger15.error("Vite server failed to initialize", getErrorMeta(e));
679035
+ res.status(500).send(JSON.stringify({ error: "Dev server failed to initialize" }));
678926
679036
  }
678927
- logger15.info("Starting dev server");
678928
- isViteServerInitialized = true;
678929
- const featureFlags = await sdk?.getFeatureFlagsForCurrentUser();
678930
- startVite({
678931
- port,
678932
- app,
678933
- root: root3,
678934
- mode,
678935
- fsOperationQueue,
678936
- syncService,
678937
- lockService,
678938
- aiService,
678939
- gitService,
678940
- activateGitService,
678941
- snapshotManager,
678942
- checkAuthorization,
678943
- logger: loggerOverride,
678944
- httpServer,
678945
- superblocksBaseUrl: explicitBaseUrl || localToken?.superblocksBaseUrl,
678946
- features: {
678947
- enableSessionRecording: featureFlags?.enableSessionRecording() ?? false
678948
- }
678949
- }).then((result) => {
678950
- logger15.info("Dev server initialized");
678951
- viteResolve();
678952
- viteCreationResults = result;
678953
- res.send(JSON.stringify(healthResponse));
678954
- }, (e) => {
678955
- logger15.error("Error initializing dev server", getErrorMeta(e));
678956
- viteReject(e);
678957
- });
678958
679037
  });
678959
679038
  app.post("/_sb_disconnect", authHandler, async (req, res) => {
678960
679039
  logger15.info("Disconnecting dev server...");
@@ -679017,8 +679096,11 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
679017
679096
  timeSinceLastActivityMs: lockService.timeSinceLastActivity
679018
679097
  });
679019
679098
  } else {
679020
- logger15.error("Lock service not found, rejecting request");
679021
- viteReject(new Error("Lock service not found, rejecting request"));
679099
+ res.send({
679100
+ isUserActive: false,
679101
+ connectedUsers: [],
679102
+ timeSinceLastActivityMs: 0
679103
+ });
679022
679104
  }
679023
679105
  });
679024
679106
  process.on("SIGINT", async () => {
@@ -679040,9 +679122,48 @@ async function createDevServer({ root: root3, mode, fsOperationQueue, syncServic
679040
679122
  process.exit(1);
679041
679123
  });
679042
679124
  });
679043
- logger15.info(`Starting HTTP server on port ${port}`);
679044
- httpServer = await app.listen(port);
679045
- logger15.info(`HTTP server started successfully on port ${port}`);
679125
+ if (existingServer) {
679126
+ existingServer.removeAllListeners("request");
679127
+ existingServer.on("request", app);
679128
+ httpServer = existingServer;
679129
+ logger15.info(`Attached full dev server to existing HTTP server on port ${port}`);
679130
+ } else {
679131
+ logger15.info(`Starting HTTP server on port ${port}`);
679132
+ httpServer = await app.listen(port);
679133
+ logger15.info(`HTTP server started successfully on port ${port}`);
679134
+ }
679135
+ if (!isViteServerInitialized) {
679136
+ isViteServerInitialized = true;
679137
+ logger15.info("Eagerly starting vite server...");
679138
+ const featureFlags = await sdk?.getFeatureFlagsForCurrentUser().catch(() => void 0);
679139
+ startVite({
679140
+ port,
679141
+ app,
679142
+ root: root3,
679143
+ mode,
679144
+ fsOperationQueue,
679145
+ syncService,
679146
+ lockService,
679147
+ aiService,
679148
+ gitService,
679149
+ activateGitService,
679150
+ snapshotManager,
679151
+ checkAuthorization,
679152
+ logger: loggerOverride,
679153
+ httpServer,
679154
+ superblocksBaseUrl: explicitBaseUrl || localToken?.superblocksBaseUrl,
679155
+ features: {
679156
+ enableSessionRecording: featureFlags?.enableSessionRecording() ?? false
679157
+ }
679158
+ }).then((result) => {
679159
+ logger15.info("Vite server initialized eagerly");
679160
+ viteResolve();
679161
+ viteCreationResults = result;
679162
+ }, (e) => {
679163
+ logger15.error("Error initializing vite server", getErrorMeta(e));
679164
+ viteReject(e);
679165
+ });
679166
+ }
679046
679167
  return httpServer;
679047
679168
  }
679048
679169
  async function startVite({ app, httpServer: httpServer2, root: root3, mode, port, fsOperationQueue, syncService, lockService, aiService, gitService, activateGitService, snapshotManager, checkAuthorization, logger: loggerOverride, superblocksBaseUrl, features }) {
@@ -679191,6 +679312,32 @@ async function startVite({ app, httpServer: httpServer2, root: root3, mode, port
679191
679312
  }
679192
679313
  });
679193
679314
  }
679315
+ async function preWarmViteCache(root3) {
679316
+ const start = Date.now();
679317
+ console.log("[warm] Pre-warming Vite dependency cache...");
679318
+ try {
679319
+ const server = await createServer({
679320
+ root: root3,
679321
+ mode: "development",
679322
+ server: { middlewareMode: true, hmr: false },
679323
+ plugins: [src_default()],
679324
+ logLevel: "warn",
679325
+ optimizeDeps: { noDiscovery: true }
679326
+ });
679327
+ const depsDir = path73.join(root3, "node_modules", ".vite", "deps");
679328
+ const maxWaitMs = 5e3;
679329
+ const pollMs = 50;
679330
+ const deadline = Date.now() + maxWaitMs;
679331
+ while (!existsSync4(depsDir) && Date.now() < deadline) {
679332
+ await new Promise((r2) => setTimeout(r2, pollMs));
679333
+ }
679334
+ await server.close();
679335
+ const cached2 = existsSync4(depsDir);
679336
+ console.log(`[warm] Vite cache ${cached2 ? "warmed" : "not committed (timed out)"} in ${Date.now() - start}ms`);
679337
+ } catch (error40) {
679338
+ console.warn(`[warm] Vite cache pre-warm failed (non-fatal, ${Date.now() - start}ms):`, error40);
679339
+ }
679340
+ }
679194
679341
  var DEFAULT_HMR_PORT = 24678;
679195
679342
  function getFreePort() {
679196
679343
  return new Promise((resolve9) => {
@@ -679330,7 +679477,7 @@ async function fetchAndWriteApplication({ resourceId, viewMode, featureFlags, pr
679330
679477
 
679331
679478
  // ../sdk/dist/cli-replacement/socket-utils.mjs
679332
679479
  init_cjs_shims();
679333
- import { existsSync as existsSync4 } from "node:fs";
679480
+ import { existsSync as existsSync5 } from "node:fs";
679334
679481
  import * as fs41 from "node:fs/promises";
679335
679482
  import * as net2 from "node:net";
679336
679483
  import * as os7 from "node:os";
@@ -679378,7 +679525,7 @@ async function getAllSocketFiles() {
679378
679525
  }
679379
679526
  async function getSocketFileForPid(pid) {
679380
679527
  const socketPath = path74.join(getSocketDirectory(), `superblocks-auth-${pid}.sock`);
679381
- return existsSync4(socketPath) ? socketPath : null;
679528
+ return existsSync5(socketPath) ? socketPath : null;
679382
679529
  }
679383
679530
  async function cleanupSocketFile(socketPath) {
679384
679531
  try {
@@ -679707,7 +679854,7 @@ async function handleLockConflict(error40, lockSvc, span, logger15) {
679707
679854
  }
679708
679855
  async function readPkgJson(cwd) {
679709
679856
  try {
679710
- const { readPackage } = await import("./read-pkg-2HVFBBQB.js");
679857
+ const { readPackage } = await import("./read-pkg-US2CH2JR.js");
679711
679858
  return await readPackage({ cwd });
679712
679859
  } catch {
679713
679860
  return null;
@@ -680149,7 +680296,8 @@ async function dev(options8) {
680149
680296
  snapshotManager,
680150
680297
  logger: options8.logger,
680151
680298
  sdk,
680152
- superblocksBaseUrl: tokenConfig.superblocksBaseUrl
680299
+ superblocksBaseUrl: tokenConfig.superblocksBaseUrl,
680300
+ existingServer: options8.existingServer
680153
680301
  };
680154
680302
  const result = await createDevServer(createDevServerOptions);
680155
680303
  span.end();
@@ -680496,6 +680644,7 @@ export {
680496
680644
  SuperblocksSdk,
680497
680645
  AUTO_UPGRADE_EXIT_CODE,
680498
680646
  RESTART_EXIT_CODE,
680647
+ preWarmViteCache,
680499
680648
  TokenManager,
680500
680649
  tryDecodeJwtToken,
680501
680650
  fetchAndWriteApplication,
@@ -681047,4 +681196,4 @@ serve-static/index.js:
681047
681196
  chokidar/esm/index.js:
681048
681197
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
681049
681198
  */
681050
- //# sourceMappingURL=chunk-ZGIKM53K.js.map
681199
+ //# sourceMappingURL=chunk-AVKVXWKJ.js.map