@indigoai-us/hq-cli 5.345.159 → 5.345.160

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 (54) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/command-catalog.generated.d.ts +4 -4
  3. package/dist/command-catalog.generated.js +4 -4
  4. package/dist/commands/access.d.ts +6 -0
  5. package/dist/commands/access.js +18 -1
  6. package/dist/commands/acl-lock.d.ts +41 -0
  7. package/dist/commands/acl-lock.js +28 -0
  8. package/dist/commands/agent-enroll.d.ts +2 -0
  9. package/dist/commands/agent-enroll.js +9 -4
  10. package/dist/commands/agents.js +5 -11
  11. package/dist/commands/billing-sponsor.d.ts +4 -4
  12. package/dist/commands/billing-sponsor.js +11 -11
  13. package/dist/commands/billing-usage.d.ts +22 -8
  14. package/dist/commands/billing-usage.js +57 -22
  15. package/dist/commands/billing.d.ts +7 -7
  16. package/dist/commands/billing.js +13 -13
  17. package/dist/commands/cloud-provision.js +2 -2
  18. package/dist/commands/cloud.js +7 -7
  19. package/dist/commands/db-remote-deps.js +12 -1
  20. package/dist/commands/files.js +19 -7
  21. package/dist/commands/meetings.d.ts +4 -4
  22. package/dist/commands/meetings.js +17 -8
  23. package/dist/commands/skill.js +6 -6
  24. package/dist/commands/whoami.js +1 -1
  25. package/dist/hook-engine-path.js +13 -2
  26. package/dist/hq-cloud-sync-runner/bin/sync-runner.js +982 -426
  27. package/dist/hq-cloud-sync-runner/package.json +1 -1
  28. package/dist/lib/billing/plan-limit-refusals.d.ts +13 -3
  29. package/dist/lib/billing/plan-limit-refusals.js +26 -3
  30. package/dist/lib/billing/plan-limit-upgrade-url.d.ts +8 -0
  31. package/dist/lib/billing/plan-limit-upgrade-url.js +18 -0
  32. package/dist/lib/billing/plan-lock.d.ts +22 -6
  33. package/dist/lib/billing/plan-lock.js +58 -30
  34. package/dist/lib/billing/usage-cost.d.ts +24 -2
  35. package/dist/lib/billing/usage-cost.js +103 -3
  36. package/dist/lib/billing/usage-only.d.ts +37 -1
  37. package/dist/lib/billing/usage-only.js +89 -4
  38. package/dist/lib/billing/usage-pause.d.ts +27 -0
  39. package/dist/lib/billing/usage-pause.js +50 -0
  40. package/dist/lib/db/control-plane.d.ts +5 -0
  41. package/dist/lib/db/control-plane.js +10 -0
  42. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  43. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  44. package/dist/lib/hook-engine/resolve.d.ts +14 -0
  45. package/dist/lib/hook-engine/resolve.js +55 -1
  46. package/dist/lib/plan-limit-nag.d.ts +0 -16
  47. package/dist/lib/plan-limit-nag.js +17 -18
  48. package/dist/main.d.ts +0 -2
  49. package/dist/main.js +19 -57
  50. package/dist/utils/plan-gate-error.d.ts +30 -14
  51. package/dist/utils/plan-gate-error.js +60 -46
  52. package/dist/utils/team-upgrade.d.ts +19 -6
  53. package/dist/utils/team-upgrade.js +37 -39
  54. package/package.json +8 -8
@@ -1000,9 +1000,9 @@ var init_isValidHostLabel = __esm({
1000
1000
  });
1001
1001
 
1002
1002
  // node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js
1003
- function isValidHostname(hostname3) {
1003
+ function isValidHostname(hostname4) {
1004
1004
  const hostPattern = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/;
1005
- return hostPattern.test(hostname3);
1005
+ return hostPattern.test(hostname4);
1006
1006
  }
1007
1007
  var init_isValidHostname = __esm({
1008
1008
  "node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js"() {
@@ -1058,13 +1058,13 @@ var init_parseUrl = __esm({
1058
1058
  if (typeof url2 === "string") {
1059
1059
  return parseUrl(new URL(url2));
1060
1060
  }
1061
- const { hostname: hostname3, pathname, port, protocol, search } = url2;
1061
+ const { hostname: hostname4, pathname, port, protocol, search } = url2;
1062
1062
  let query;
1063
1063
  if (search) {
1064
1064
  query = parseQueryString(search);
1065
1065
  }
1066
1066
  return {
1067
- hostname: hostname3,
1067
+ hostname: hostname4,
1068
1068
  port: port ? parseInt(port) : void 0,
1069
1069
  protocol,
1070
1070
  path: pathname,
@@ -4670,11 +4670,11 @@ var init_getEndpointFromRegion = __esm({
4670
4670
  }
4671
4671
  const useDualstackEndpoint = await input2.useDualstackEndpoint();
4672
4672
  const useFipsEndpoint = await input2.useFipsEndpoint();
4673
- const { hostname: hostname3 } = await input2.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
4674
- if (!hostname3) {
4673
+ const { hostname: hostname4 } = await input2.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
4674
+ if (!hostname4) {
4675
4675
  throw new Error("Cannot resolve hostname from client config");
4676
4676
  }
4677
- return input2.urlParser(`${tls ? "https:" : "http:"}//${hostname3}`);
4677
+ return input2.urlParser(`${tls ? "https:" : "http:"}//${hostname4}`);
4678
4678
  };
4679
4679
  }
4680
4680
  });
@@ -4930,12 +4930,12 @@ var init_getResolvedPartition = __esm({
4930
4930
  var getResolvedSigningRegion;
4931
4931
  var init_getResolvedSigningRegion = __esm({
4932
4932
  "node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js"() {
4933
- getResolvedSigningRegion = (hostname3, { signingRegion, regionRegex, useFipsEndpoint }) => {
4933
+ getResolvedSigningRegion = (hostname4, { signingRegion, regionRegex, useFipsEndpoint }) => {
4934
4934
  if (signingRegion) {
4935
4935
  return signingRegion;
4936
4936
  } else if (useFipsEndpoint) {
4937
4937
  const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
4938
- const regionRegexmatchArray = hostname3.match(regionRegexJs);
4938
+ const regionRegexmatchArray = hostname4.match(regionRegexJs);
4939
4939
  if (regionRegexmatchArray) {
4940
4940
  return regionRegexmatchArray[0].slice(1, -1);
4941
4941
  }
@@ -4958,11 +4958,11 @@ var init_getRegionInfo = __esm({
4958
4958
  const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
4959
4959
  const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
4960
4960
  const partitionHostname = getHostnameFromVariants(partitionHash[partition4]?.variants, hostnameOptions);
4961
- const hostname3 = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
4962
- if (hostname3 === void 0) {
4961
+ const hostname4 = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
4962
+ if (hostname4 === void 0) {
4963
4963
  throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
4964
4964
  }
4965
- const signingRegion = getResolvedSigningRegion(hostname3, {
4965
+ const signingRegion = getResolvedSigningRegion(hostname4, {
4966
4966
  signingRegion: regionHash[resolvedRegion]?.signingRegion,
4967
4967
  regionRegex: partitionHash[partition4].regionRegex,
4968
4968
  useFipsEndpoint
@@ -4970,7 +4970,7 @@ var init_getRegionInfo = __esm({
4970
4970
  return {
4971
4971
  partition: partition4,
4972
4972
  signingService,
4973
- hostname: hostname3,
4973
+ hostname: hostname4,
4974
4974
  ...signingRegion && { signingRegion },
4975
4975
  ...regionHash[resolvedRegion]?.signingService && {
4976
4976
  signingService: regionHash[resolvedRegion].signingService
@@ -5290,8 +5290,8 @@ var init_createConfigValueProvider = __esm({
5290
5290
  return endpoint.url.href;
5291
5291
  }
5292
5292
  if ("hostname" in endpoint) {
5293
- const { protocol, hostname: hostname3, port, path: path73 } = endpoint;
5294
- return `${protocol}//${hostname3}${port ? ":" + port : ""}${path73}`;
5293
+ const { protocol, hostname: hostname4, port, path: path73 } = endpoint;
5294
+ return `${protocol}//${hostname4}${port ? ":" + port : ""}${path73}`;
5295
5295
  }
5296
5296
  }
5297
5297
  return endpoint;
@@ -5682,8 +5682,8 @@ var init_parseURL = __esm({
5682
5682
  return value;
5683
5683
  }
5684
5684
  if (typeof value === "object" && "hostname" in value) {
5685
- const { hostname: hostname4, port, protocol: protocol2 = "", path: path73 = "", query = {} } = value;
5686
- const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path73}`);
5685
+ const { hostname: hostname5, port, protocol: protocol2 = "", path: path73 = "", query = {} } = value;
5686
+ const url2 = new URL(`${protocol2}//${hostname5}${port ? `:${port}` : ""}${path73}`);
5687
5687
  url2.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&");
5688
5688
  return url2;
5689
5689
  }
@@ -5697,7 +5697,7 @@ var init_parseURL = __esm({
5697
5697
  return null;
5698
5698
  }
5699
5699
  const urlString = whatwgURL.href;
5700
- const { host, hostname: hostname3, pathname, protocol, search } = whatwgURL;
5700
+ const { host, hostname: hostname4, pathname, protocol, search } = whatwgURL;
5701
5701
  if (search) {
5702
5702
  return null;
5703
5703
  }
@@ -5705,7 +5705,7 @@ var init_parseURL = __esm({
5705
5705
  if (!Object.values(import_types12.EndpointURLScheme).includes(scheme)) {
5706
5706
  return null;
5707
5707
  }
5708
- const isIp = isIpAddress(hostname3);
5708
+ const isIp = isIpAddress(hostname4);
5709
5709
  const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
5710
5710
  const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
5711
5711
  return {
@@ -8973,14 +8973,14 @@ var init_requestBuilder = __esm({
8973
8973
  this.context = context;
8974
8974
  }
8975
8975
  async build() {
8976
- const { hostname: hostname3, protocol = "https", port, path: basePath } = await this.context.endpoint();
8976
+ const { hostname: hostname4, protocol = "https", port, path: basePath } = await this.context.endpoint();
8977
8977
  this.path = basePath;
8978
8978
  for (const resolvePath of this.resolvePathStack) {
8979
8979
  resolvePath(this.path);
8980
8980
  }
8981
8981
  return new HttpRequest({
8982
8982
  protocol,
8983
- hostname: this.hostname || hostname3,
8983
+ hostname: this.hostname || hostname4,
8984
8984
  port,
8985
8985
  method: this.method,
8986
8986
  path: this.path,
@@ -8989,8 +8989,8 @@ var init_requestBuilder = __esm({
8989
8989
  headers: this.headers
8990
8990
  });
8991
8991
  }
8992
- hn(hostname3) {
8993
- this.hostname = hostname3;
8992
+ hn(hostname4) {
8993
+ this.hostname = hostname4;
8994
8994
  return this;
8995
8995
  }
8996
8996
  bp(uriLabel) {
@@ -12762,9 +12762,9 @@ var init_isValidHostLabel2 = __esm({
12762
12762
  });
12763
12763
 
12764
12764
  // node_modules/.pnpm/@smithy+core@3.35.1/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js
12765
- function isValidHostname2(hostname3) {
12765
+ function isValidHostname2(hostname4) {
12766
12766
  const hostPattern = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/;
12767
- return hostPattern.test(hostname3);
12767
+ return hostPattern.test(hostname4);
12768
12768
  }
12769
12769
  var init_isValidHostname2 = __esm({
12770
12770
  "node_modules/.pnpm/@smithy+core@3.35.1/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js"() {
@@ -12820,13 +12820,13 @@ var init_parseUrl2 = __esm({
12820
12820
  if (typeof url2 === "string") {
12821
12821
  return parseUrl2(new URL(url2));
12822
12822
  }
12823
- const { hostname: hostname3, pathname, port, protocol, search } = url2;
12823
+ const { hostname: hostname4, pathname, port, protocol, search } = url2;
12824
12824
  let query;
12825
12825
  if (search) {
12826
12826
  query = parseQueryString2(search);
12827
12827
  }
12828
12828
  return {
12829
- hostname: hostname3,
12829
+ hostname: hostname4,
12830
12830
  port: port ? parseInt(port) : void 0,
12831
12831
  protocol,
12832
12832
  path: pathname,
@@ -16480,11 +16480,11 @@ var init_getEndpointFromRegion2 = __esm({
16480
16480
  }
16481
16481
  const useDualstackEndpoint = await input2.useDualstackEndpoint();
16482
16482
  const useFipsEndpoint = await input2.useFipsEndpoint();
16483
- const { hostname: hostname3 } = await input2.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
16484
- if (!hostname3) {
16483
+ const { hostname: hostname4 } = await input2.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
16484
+ if (!hostname4) {
16485
16485
  throw new Error("Cannot resolve hostname from client config");
16486
16486
  }
16487
- return input2.urlParser(`${tls ? "https:" : "http:"}//${hostname3}`);
16487
+ return input2.urlParser(`${tls ? "https:" : "http:"}//${hostname4}`);
16488
16488
  };
16489
16489
  }
16490
16490
  });
@@ -16740,12 +16740,12 @@ var init_getResolvedPartition2 = __esm({
16740
16740
  var getResolvedSigningRegion2;
16741
16741
  var init_getResolvedSigningRegion2 = __esm({
16742
16742
  "node_modules/.pnpm/@smithy+core@3.35.1/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js"() {
16743
- getResolvedSigningRegion2 = (hostname3, { signingRegion, regionRegex, useFipsEndpoint }) => {
16743
+ getResolvedSigningRegion2 = (hostname4, { signingRegion, regionRegex, useFipsEndpoint }) => {
16744
16744
  if (signingRegion) {
16745
16745
  return signingRegion;
16746
16746
  } else if (useFipsEndpoint) {
16747
16747
  const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
16748
- const regionRegexmatchArray = hostname3.match(regionRegexJs);
16748
+ const regionRegexmatchArray = hostname4.match(regionRegexJs);
16749
16749
  if (regionRegexmatchArray) {
16750
16750
  return regionRegexmatchArray[0].slice(1, -1);
16751
16751
  }
@@ -16768,11 +16768,11 @@ var init_getRegionInfo2 = __esm({
16768
16768
  const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
16769
16769
  const regionHostname = getHostnameFromVariants2(regionHash[resolvedRegion]?.variants, hostnameOptions);
16770
16770
  const partitionHostname = getHostnameFromVariants2(partitionHash[partition4]?.variants, hostnameOptions);
16771
- const hostname3 = getResolvedHostname2(resolvedRegion, { regionHostname, partitionHostname });
16772
- if (hostname3 === void 0) {
16771
+ const hostname4 = getResolvedHostname2(resolvedRegion, { regionHostname, partitionHostname });
16772
+ if (hostname4 === void 0) {
16773
16773
  throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
16774
16774
  }
16775
- const signingRegion = getResolvedSigningRegion2(hostname3, {
16775
+ const signingRegion = getResolvedSigningRegion2(hostname4, {
16776
16776
  signingRegion: regionHash[resolvedRegion]?.signingRegion,
16777
16777
  regionRegex: partitionHash[partition4].regionRegex,
16778
16778
  useFipsEndpoint
@@ -16780,7 +16780,7 @@ var init_getRegionInfo2 = __esm({
16780
16780
  return {
16781
16781
  partition: partition4,
16782
16782
  signingService,
16783
- hostname: hostname3,
16783
+ hostname: hostname4,
16784
16784
  ...signingRegion && { signingRegion },
16785
16785
  ...regionHash[resolvedRegion]?.signingService && {
16786
16786
  signingService: regionHash[resolvedRegion].signingService
@@ -17100,8 +17100,8 @@ var init_createConfigValueProvider2 = __esm({
17100
17100
  return endpoint.url.href;
17101
17101
  }
17102
17102
  if ("hostname" in endpoint) {
17103
- const { protocol, hostname: hostname3, port, path: path73 } = endpoint;
17104
- return `${protocol}//${hostname3}${port ? ":" + port : ""}${path73}`;
17103
+ const { protocol, hostname: hostname4, port, path: path73 } = endpoint;
17104
+ return `${protocol}//${hostname4}${port ? ":" + port : ""}${path73}`;
17105
17105
  }
17106
17106
  }
17107
17107
  return endpoint;
@@ -17571,8 +17571,8 @@ var init_parseURL2 = __esm({
17571
17571
  return value;
17572
17572
  }
17573
17573
  if (typeof value === "object" && "hostname" in value) {
17574
- const { hostname: hostname4, port, protocol: protocol2 = "", path: path73 = "", query = {} } = value;
17575
- const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path73}`);
17574
+ const { hostname: hostname5, port, protocol: protocol2 = "", path: path73 = "", query = {} } = value;
17575
+ const url2 = new URL(`${protocol2}//${hostname5}${port ? `:${port}` : ""}${path73}`);
17576
17576
  url2.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&");
17577
17577
  return url2;
17578
17578
  }
@@ -17586,7 +17586,7 @@ var init_parseURL2 = __esm({
17586
17586
  return null;
17587
17587
  }
17588
17588
  const urlString = whatwgURL.href;
17589
- const { host, hostname: hostname3, pathname, protocol, search } = whatwgURL;
17589
+ const { host, hostname: hostname4, pathname, protocol, search } = whatwgURL;
17590
17590
  if (search) {
17591
17591
  return null;
17592
17592
  }
@@ -17594,7 +17594,7 @@ var init_parseURL2 = __esm({
17594
17594
  if (!Object.values(import_types35.EndpointURLScheme).includes(scheme)) {
17595
17595
  return null;
17596
17596
  }
17597
- const isIp = isIpAddress2(hostname3);
17597
+ const isIp = isIpAddress2(hostname4);
17598
17598
  const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS2[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS2[scheme]}`);
17599
17599
  const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS2[scheme]}` : ``}`;
17600
17600
  return {
@@ -21654,14 +21654,14 @@ var init_requestBuilder2 = __esm({
21654
21654
  this.context = context;
21655
21655
  }
21656
21656
  async build() {
21657
- const { hostname: hostname3, protocol = "https", port, path: basePath } = await this.context.endpoint();
21657
+ const { hostname: hostname4, protocol = "https", port, path: basePath } = await this.context.endpoint();
21658
21658
  this.path = basePath;
21659
21659
  for (const resolvePath of this.resolvePathStack) {
21660
21660
  resolvePath(this.path);
21661
21661
  }
21662
21662
  return new HttpRequest2({
21663
21663
  protocol,
21664
- hostname: this.hostname || hostname3,
21664
+ hostname: this.hostname || hostname4,
21665
21665
  port,
21666
21666
  method: this.method,
21667
21667
  path: this.path,
@@ -21670,8 +21670,8 @@ var init_requestBuilder2 = __esm({
21670
21670
  headers: this.headers
21671
21671
  });
21672
21672
  }
21673
- hn(hostname3) {
21674
- this.hostname = hostname3;
21673
+ hn(hostname4) {
21674
+ this.hostname = hostname4;
21675
21675
  return this;
21676
21676
  }
21677
21677
  bp(uriLabel) {
@@ -27029,12 +27029,12 @@ var init_arn = __esm({
27029
27029
  // node_modules/.pnpm/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-es/submodules/util/util-format-url/format-url.js
27030
27030
  function formatUrl(request5) {
27031
27031
  const { port, query } = request5;
27032
- let { protocol, path: path73, hostname: hostname3 } = request5;
27032
+ let { protocol, path: path73, hostname: hostname4 } = request5;
27033
27033
  if (protocol && protocol.slice(-1) !== ":") {
27034
27034
  protocol += ":";
27035
27035
  }
27036
27036
  if (port) {
27037
- hostname3 += `:${port}`;
27037
+ hostname4 += `:${port}`;
27038
27038
  }
27039
27039
  if (path73 && path73.charAt(0) !== "/") {
27040
27040
  path73 = `/${path73}`;
@@ -27053,7 +27053,7 @@ function formatUrl(request5) {
27053
27053
  if (request5.fragment) {
27054
27054
  fragment = `#${request5.fragment}`;
27055
27055
  }
27056
- return `${protocol}//${auth}${hostname3}${path73}${queryString}${fragment}`;
27056
+ return `${protocol}//${auth}${hostname4}${path73}${queryString}${fragment}`;
27057
27057
  }
27058
27058
  var init_format_url = __esm({
27059
27059
  "node_modules/.pnpm/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-es/submodules/util/util-format-url/format-url.js"() {
@@ -35590,11 +35590,11 @@ var init_getEndpointFromRegion3 = __esm({
35590
35590
  }
35591
35591
  const useDualstackEndpoint = await input2.useDualstackEndpoint();
35592
35592
  const useFipsEndpoint = await input2.useFipsEndpoint();
35593
- const { hostname: hostname3 } = await input2.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
35594
- if (!hostname3) {
35593
+ const { hostname: hostname4 } = await input2.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
35594
+ if (!hostname4) {
35595
35595
  throw new Error("Cannot resolve hostname from client config");
35596
35596
  }
35597
- return input2.urlParser(`${tls ? "https:" : "http:"}//${hostname3}`);
35597
+ return input2.urlParser(`${tls ? "https:" : "http:"}//${hostname4}`);
35598
35598
  };
35599
35599
  }
35600
35600
  });
@@ -35733,12 +35733,12 @@ var init_getResolvedPartition3 = __esm({
35733
35733
  var getResolvedSigningRegion3;
35734
35734
  var init_getResolvedSigningRegion3 = __esm({
35735
35735
  "node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js"() {
35736
- getResolvedSigningRegion3 = (hostname3, { signingRegion, regionRegex, useFipsEndpoint }) => {
35736
+ getResolvedSigningRegion3 = (hostname4, { signingRegion, regionRegex, useFipsEndpoint }) => {
35737
35737
  if (signingRegion) {
35738
35738
  return signingRegion;
35739
35739
  } else if (useFipsEndpoint) {
35740
35740
  const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
35741
- const regionRegexmatchArray = hostname3.match(regionRegexJs);
35741
+ const regionRegexmatchArray = hostname4.match(regionRegexJs);
35742
35742
  if (regionRegexmatchArray) {
35743
35743
  return regionRegexmatchArray[0].slice(1, -1);
35744
35744
  }
@@ -35761,11 +35761,11 @@ var init_getRegionInfo3 = __esm({
35761
35761
  const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
35762
35762
  const regionHostname = getHostnameFromVariants3(regionHash[resolvedRegion]?.variants, hostnameOptions);
35763
35763
  const partitionHostname = getHostnameFromVariants3(partitionHash[partition4]?.variants, hostnameOptions);
35764
- const hostname3 = getResolvedHostname3(resolvedRegion, { regionHostname, partitionHostname });
35765
- if (hostname3 === void 0) {
35764
+ const hostname4 = getResolvedHostname3(resolvedRegion, { regionHostname, partitionHostname });
35765
+ if (hostname4 === void 0) {
35766
35766
  throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
35767
35767
  }
35768
- const signingRegion = getResolvedSigningRegion3(hostname3, {
35768
+ const signingRegion = getResolvedSigningRegion3(hostname4, {
35769
35769
  signingRegion: regionHash[resolvedRegion]?.signingRegion,
35770
35770
  regionRegex: partitionHash[partition4].regionRegex,
35771
35771
  useFipsEndpoint
@@ -35773,7 +35773,7 @@ var init_getRegionInfo3 = __esm({
35773
35773
  return {
35774
35774
  partition: partition4,
35775
35775
  signingService,
35776
- hostname: hostname3,
35776
+ hostname: hostname4,
35777
35777
  ...signingRegion && { signingRegion },
35778
35778
  ...regionHash[resolvedRegion]?.signingService && {
35779
35779
  signingService: regionHash[resolvedRegion].signingService
@@ -35879,12 +35879,12 @@ var init_resolveDefaultsModeConfig3 = __esm({
35879
35879
  }
35880
35880
  return { hostname: "169.254.169.254", path: "/" };
35881
35881
  };
35882
- imdsHttpGet = async ({ hostname: hostname3, path: path73 }) => {
35882
+ imdsHttpGet = async ({ hostname: hostname4, path: path73 }) => {
35883
35883
  const { request: request5 } = await import("node:http");
35884
35884
  return new Promise((resolve35, reject) => {
35885
35885
  const req = request5({
35886
35886
  method: "GET",
35887
- hostname: hostname3.replace(/^\[(.+)]$/, "$1"),
35887
+ hostname: hostname4.replace(/^\[(.+)]$/, "$1"),
35888
35888
  path: path73,
35889
35889
  timeout: 1e3,
35890
35890
  signal: AbortSignal.timeout(1e3)
@@ -36134,8 +36134,8 @@ var init_createConfigValueProvider3 = __esm({
36134
36134
  return endpoint.url.href;
36135
36135
  }
36136
36136
  if ("hostname" in endpoint) {
36137
- const { protocol, hostname: hostname3, port, path: path73 } = endpoint;
36138
- return `${protocol}//${hostname3}${port ? ":" + port : ""}${path73}`;
36137
+ const { protocol, hostname: hostname4, port, path: path73 } = endpoint;
36138
+ return `${protocol}//${hostname4}${port ? ":" + port : ""}${path73}`;
36139
36139
  }
36140
36140
  }
36141
36141
  return endpoint;
@@ -36689,8 +36689,8 @@ var init_parseURL3 = __esm({
36689
36689
  return value;
36690
36690
  }
36691
36691
  if (typeof value === "object" && "hostname" in value) {
36692
- const { hostname: hostname4, port, protocol: protocol2 = "", path: path73 = "", query = {} } = value;
36693
- const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path73}`);
36692
+ const { hostname: hostname5, port, protocol: protocol2 = "", path: path73 = "", query = {} } = value;
36693
+ const url2 = new URL(`${protocol2}//${hostname5}${port ? `:${port}` : ""}${path73}`);
36694
36694
  url2.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&");
36695
36695
  return url2;
36696
36696
  }
@@ -36704,7 +36704,7 @@ var init_parseURL3 = __esm({
36704
36704
  return null;
36705
36705
  }
36706
36706
  const urlString = whatwgURL.href;
36707
- const { host, hostname: hostname3, pathname, protocol, search } = whatwgURL;
36707
+ const { host, hostname: hostname4, pathname, protocol, search } = whatwgURL;
36708
36708
  if (search) {
36709
36709
  return null;
36710
36710
  }
@@ -36712,7 +36712,7 @@ var init_parseURL3 = __esm({
36712
36712
  if (!Object.values(import_types58.EndpointURLScheme).includes(scheme)) {
36713
36713
  return null;
36714
36714
  }
36715
- const isIp = isIpAddress3(hostname3);
36715
+ const isIp = isIpAddress3(hostname4);
36716
36716
  const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS3[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS3[scheme]}`);
36717
36717
  const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS3[scheme]}` : ``}`;
36718
36718
  return {
@@ -40079,14 +40079,14 @@ var init_requestBuilder3 = __esm({
40079
40079
  this.context = context;
40080
40080
  }
40081
40081
  async build() {
40082
- const { hostname: hostname3, protocol = "https", port, path: basePath } = await this.context.endpoint();
40082
+ const { hostname: hostname4, protocol = "https", port, path: basePath } = await this.context.endpoint();
40083
40083
  this.path = basePath;
40084
40084
  for (const resolvePath of this.resolvePathStack) {
40085
40085
  resolvePath(this.path);
40086
40086
  }
40087
40087
  return new HttpRequest3({
40088
40088
  protocol,
40089
- hostname: this.hostname || hostname3,
40089
+ hostname: this.hostname || hostname4,
40090
40090
  port,
40091
40091
  method: this.method,
40092
40092
  path: this.path,
@@ -40095,8 +40095,8 @@ var init_requestBuilder3 = __esm({
40095
40095
  headers: this.headers
40096
40096
  });
40097
40097
  }
40098
- hn(hostname3) {
40099
- this.hostname = hostname3;
40098
+ hn(hostname4) {
40099
+ this.hostname = hostname4;
40100
40100
  return this;
40101
40101
  }
40102
40102
  bp(uriLabel) {
@@ -40463,9 +40463,9 @@ var init_Fields3 = __esm({
40463
40463
  });
40464
40464
 
40465
40465
  // node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/isValidHostname.js
40466
- function isValidHostname3(hostname3) {
40466
+ function isValidHostname3(hostname4) {
40467
40467
  const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
40468
- return hostPattern.test(hostname3);
40468
+ return hostPattern.test(hostname4);
40469
40469
  }
40470
40470
  var init_isValidHostname3 = __esm({
40471
40471
  "node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/isValidHostname.js"() {
@@ -40622,13 +40622,13 @@ var init_parseUrl3 = __esm({
40622
40622
  if (typeof url2 === "string") {
40623
40623
  return parseUrl3(new URL(url2));
40624
40624
  }
40625
- const { hostname: hostname3, pathname, port, protocol, search } = url2;
40625
+ const { hostname: hostname4, pathname, port, protocol, search } = url2;
40626
40626
  let query;
40627
40627
  if (search) {
40628
40628
  query = parseQueryString3(search);
40629
40629
  }
40630
40630
  return {
40631
- hostname: hostname3,
40631
+ hostname: hostname4,
40632
40632
  port: port ? parseInt(port) : void 0,
40633
40633
  protocol,
40634
40634
  path: pathname,
@@ -53685,15 +53685,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
53685
53685
  if (request5.fragment) {
53686
53686
  path73 += `#${request5.fragment}`;
53687
53687
  }
53688
- let hostname3 = request5.hostname ?? "";
53689
- if (hostname3[0] === "[" && hostname3.endsWith("]")) {
53690
- hostname3 = request5.hostname.slice(1, -1);
53688
+ let hostname4 = request5.hostname ?? "";
53689
+ if (hostname4[0] === "[" && hostname4.endsWith("]")) {
53690
+ hostname4 = request5.hostname.slice(1, -1);
53691
53691
  } else {
53692
- hostname3 = request5.hostname;
53692
+ hostname4 = request5.hostname;
53693
53693
  }
53694
53694
  const nodeHttpsOptions = {
53695
53695
  headers: request5.headers,
53696
- host: hostname3,
53696
+ host: hostname4,
53697
53697
  method: request5.method,
53698
53698
  path: path73,
53699
53699
  port: request5.port,
@@ -54081,14 +54081,14 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
54081
54081
  reject(abortError);
54082
54082
  return;
54083
54083
  }
54084
- const { hostname: hostname3, method, port, protocol, query } = request5;
54084
+ const { hostname: hostname4, method, port, protocol, query } = request5;
54085
54085
  let auth = "";
54086
54086
  if (request5.username != null || request5.password != null) {
54087
54087
  const username = request5.username ?? "";
54088
54088
  const password = request5.password ?? "";
54089
54089
  auth = `${username}:${password}@`;
54090
54090
  }
54091
- const authority = `${protocol}//${auth}${hostname3}${port ? `:${port}` : ""}`;
54091
+ const authority = `${protocol}//${auth}${hostname4}${port ? `:${port}` : ""}`;
54092
54092
  const requestContext = { destination: new URL(authority) };
54093
54093
  const connectConfig = {
54094
54094
  requestTimeout: this.config?.sessionTimeout,
@@ -62870,7 +62870,7 @@ var require_dist_cjs23 = __commonJS({
62870
62870
  var { setCredentialFeature: setCredentialFeature4 } = (init_client9(), __toCommonJS(client_exports6));
62871
62871
  var { CredentialsProviderError: CredentialsProviderError4, parseKnownFiles: parseKnownFiles4, getProfileName: getProfileName4 } = (init_config5(), __toCommonJS(config_exports2));
62872
62872
  var { HttpRequest: HttpRequest4 } = (init_protocols2(), __toCommonJS(protocols_exports2));
62873
- var { createHash: createHash42, createPrivateKey: createPrivateKey2, createPublicKey, sign: sign3 } = __require("node:crypto");
62873
+ var { createHash: createHash44, createPrivateKey: createPrivateKey2, createPublicKey, sign: sign3 } = __require("node:crypto");
62874
62874
  var { promises: promises7 } = __require("node:fs");
62875
62875
  var { homedir: homedir21 } = __require("node:os");
62876
62876
  var { dirname: dirname39, join: join72 } = __require("node:path");
@@ -63039,7 +63039,7 @@ var require_dist_cjs23 = __commonJS({
63039
63039
  getTokenFilePath() {
63040
63040
  const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join72(homedir21(), ".aws", "login", "cache");
63041
63041
  const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
63042
- const loginSessionSha256 = createHash42("sha256").update(loginSessionBytes).digest("hex");
63042
+ const loginSessionSha256 = createHash44("sha256").update(loginSessionBytes).digest("hex");
63043
63043
  return join72(directory, `${loginSessionSha256}.json`);
63044
63044
  }
63045
63045
  derToRawSignature(derSignature) {
@@ -64128,12 +64128,12 @@ var require_dist_cjs32 = __commonJS({
64128
64128
  var AWS_PARTITION_SUFFIX = "amazonaws.com";
64129
64129
  var isBucketNameOptions = (options) => typeof options.bucketName === "string";
64130
64130
  var isDnsCompatibleBucketName4 = (bucketName) => DOMAIN_PATTERN4.test(bucketName) && !IP_ADDRESS_PATTERN4.test(bucketName) && !DOTS_PATTERN4.test(bucketName);
64131
- var getRegionalSuffix = (hostname3) => {
64132
- const parts = hostname3.match(S3_HOSTNAME_PATTERN3);
64133
- return [parts[4], hostname3.replace(new RegExp(`^${parts[0]}`), "")];
64131
+ var getRegionalSuffix = (hostname4) => {
64132
+ const parts = hostname4.match(S3_HOSTNAME_PATTERN3);
64133
+ return [parts[4], hostname4.replace(new RegExp(`^${parts[0]}`), "")];
64134
64134
  };
64135
- var getSuffix = (hostname3) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname3) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname3);
64136
- var getSuffixForArnEndpoint = (hostname3) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname3) ? [hostname3.replace(`.${AWS_PARTITION_SUFFIX}`, ""), AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname3);
64135
+ var getSuffix = (hostname4) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname4) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname4);
64136
+ var getSuffixForArnEndpoint = (hostname4) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname4) ? [hostname4.replace(`.${AWS_PARTITION_SUFFIX}`, ""), AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname4);
64137
64137
  var validateArnEndpointOptions = (options) => {
64138
64138
  if (options.pathStyleEndpoint) {
64139
64139
  throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");
@@ -64335,7 +64335,7 @@ var require_dist_cjs32 = __commonJS({
64335
64335
  const useFipsEndpoint = await options.useFipsEndpoint();
64336
64336
  const { partition: partition4, signingRegion = clientRegion } = await options.regionInfoProvider(clientRegion, { useDualstackEndpoint, useFipsEndpoint }) || {};
64337
64337
  const useArnRegion = await options.useArnRegion();
64338
- const { hostname: hostname3, bucketEndpoint, signingRegion: modifiedSigningRegion, signingService } = bucketHostname({
64338
+ const { hostname: hostname4, bucketEndpoint, signingRegion: modifiedSigningRegion, signingService } = bucketHostname({
64339
64339
  bucketName: bucketArn,
64340
64340
  baseHostname: request5.hostname,
64341
64341
  accelerateEndpoint: options.useAccelerateEndpoint,
@@ -64356,13 +64356,13 @@ var require_dist_cjs32 = __commonJS({
64356
64356
  if (signingService && signingService !== "s3") {
64357
64357
  context["signing_service"] = signingService;
64358
64358
  }
64359
- request5.hostname = hostname3;
64359
+ request5.hostname = hostname4;
64360
64360
  replaceBucketInPath = bucketEndpoint;
64361
64361
  } else {
64362
64362
  const clientRegion = await options.region();
64363
64363
  const dualstackEndpoint = await options.useDualstackEndpoint();
64364
64364
  const fipsEndpoint = await options.useFipsEndpoint();
64365
- const { hostname: hostname3, bucketEndpoint } = bucketHostname({
64365
+ const { hostname: hostname4, bucketEndpoint } = bucketHostname({
64366
64366
  bucketName,
64367
64367
  clientRegion,
64368
64368
  baseHostname: request5.hostname,
@@ -64373,7 +64373,7 @@ var require_dist_cjs32 = __commonJS({
64373
64373
  tlsCompatible: request5.protocol === "https:",
64374
64374
  isCustomEndpoint: options.isCustomEndpoint
64375
64375
  });
64376
- request5.hostname = hostname3;
64376
+ request5.hostname = hostname4;
64377
64377
  replaceBucketInPath = bucketEndpoint;
64378
64378
  }
64379
64379
  if (replaceBucketInPath) {
@@ -65049,15 +65049,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
65049
65049
  if (request5.fragment) {
65050
65050
  path73 += `#${request5.fragment}`;
65051
65051
  }
65052
- let hostname3 = request5.hostname ?? "";
65053
- if (hostname3[0] === "[" && hostname3.endsWith("]")) {
65054
- hostname3 = request5.hostname.slice(1, -1);
65052
+ let hostname4 = request5.hostname ?? "";
65053
+ if (hostname4[0] === "[" && hostname4.endsWith("]")) {
65054
+ hostname4 = request5.hostname.slice(1, -1);
65055
65055
  } else {
65056
- hostname3 = request5.hostname;
65056
+ hostname4 = request5.hostname;
65057
65057
  }
65058
65058
  const nodeHttpsOptions = {
65059
65059
  headers: request5.headers,
65060
- host: hostname3,
65060
+ host: hostname4,
65061
65061
  method: request5.method,
65062
65062
  path: path73,
65063
65063
  port: request5.port,
@@ -65437,14 +65437,14 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
65437
65437
  reject(abortError);
65438
65438
  return;
65439
65439
  }
65440
- const { hostname: hostname3, method, port, protocol, query } = request5;
65440
+ const { hostname: hostname4, method, port, protocol, query } = request5;
65441
65441
  let auth = "";
65442
65442
  if (request5.username != null || request5.password != null) {
65443
65443
  const username = request5.username ?? "";
65444
65444
  const password = request5.password ?? "";
65445
65445
  auth = `${username}:${password}@`;
65446
65446
  }
65447
- const authority = `${protocol}//${auth}${hostname3}${port ? `:${port}` : ""}`;
65447
+ const authority = `${protocol}//${auth}${hostname4}${port ? `:${port}` : ""}`;
65448
65448
  const requestContext = { destination: new URL(authority) };
65449
65449
  const connectConfig = {
65450
65450
  requestTimeout: this.config?.sessionTimeout,
@@ -76826,7 +76826,7 @@ var require_multistream = __commonJS({
76826
76826
  var require_pino = __commonJS({
76827
76827
  "node_modules/.pnpm/pino@10.3.1/node_modules/pino/pino.js"(exports, module) {
76828
76828
  "use strict";
76829
- var os24 = __require("node:os");
76829
+ var os25 = __require("node:os");
76830
76830
  var stdSerializers = require_pino_std_serializers();
76831
76831
  var caller = require_caller();
76832
76832
  var redaction = require_redaction();
@@ -76873,7 +76873,7 @@ var require_pino = __commonJS({
76873
76873
  } = symbols;
76874
76874
  var { epochTime, nullTime } = time6;
76875
76875
  var { pid } = process;
76876
- var hostname3 = os24.hostname();
76876
+ var hostname4 = os25.hostname();
76877
76877
  var defaultErrorSerializer = stdSerializers.err;
76878
76878
  var defaultOptions2 = {
76879
76879
  level: "info",
@@ -76883,7 +76883,7 @@ var require_pino = __commonJS({
76883
76883
  errorKey: "err",
76884
76884
  nestedKey: null,
76885
76885
  enabled: true,
76886
- base: { pid, hostname: hostname3 },
76886
+ base: { pid, hostname: hostname4 },
76887
76887
  serializers: Object.assign(/* @__PURE__ */ Object.create(null), {
76888
76888
  err: defaultErrorSerializer
76889
76889
  }),
@@ -79366,14 +79366,14 @@ var require_dist_cjs42 = __commonJS({
79366
79366
  }
79367
79367
  });
79368
79368
 
79369
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-self-profile.js
79369
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-self-profile.js
79370
79370
  import * as fs26 from "node:fs";
79371
79371
  import * as os6 from "node:os";
79372
79372
  import * as path22 from "node:path";
79373
79373
  import { Session } from "node:inspector";
79374
79374
  import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
79375
79375
 
79376
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/watcher.js
79376
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/watcher.js
79377
79377
  import * as fs25 from "fs";
79378
79378
  import { createHash as createHash18 } from "node:crypto";
79379
79379
  import { readFile as readFile8, stat as stat4 } from "node:fs/promises";
@@ -81069,7 +81069,7 @@ function watch(paths, options = {}) {
81069
81069
  return watcher;
81070
81070
  }
81071
81071
 
81072
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cloud-placeholder.js
81072
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cloud-placeholder.js
81073
81073
  import * as fs from "fs";
81074
81074
  import * as path from "path";
81075
81075
  var CLOUD_PLACEHOLDER_SUFFIX = ".hqcloud";
@@ -81507,18 +81507,18 @@ function writeCloudPlaceholder(placeholderPath, placeholder) {
81507
81507
  }
81508
81508
  }
81509
81509
 
81510
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/ignore.js
81510
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/ignore.js
81511
81511
  var import_ignore = __toESM(require_ignore(), 1);
81512
81512
  import * as fs2 from "fs";
81513
81513
  import * as path2 from "path";
81514
81514
 
81515
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/restore-staging.js
81515
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/restore-staging.js
81516
81516
  var RESTORE_STAGING_SUFFIX = /\.hq-restore-(?:\d+(?:-\d+)?|probe-\d+-[0-9a-z]+)$/i;
81517
81517
  function isRestoreStagingPath(relativePath) {
81518
81518
  return relativePath.split(/[\\/]/).some((segment) => RESTORE_STAGING_SUFFIX.test(segment));
81519
81519
  }
81520
81520
 
81521
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/best-effort-error.js
81521
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/best-effort-error.js
81522
81522
  var EXPECTED_ABSENCE_CODES = /* @__PURE__ */ new Set([
81523
81523
  "ENOENT",
81524
81524
  "NoSuchKey",
@@ -81560,7 +81560,7 @@ function noteSwallowedError(log, event, error64, options = {}) {
81560
81560
  `);
81561
81561
  }
81562
81562
 
81563
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/ignore.js
81563
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/ignore.js
81564
81564
  function logSwallowed(line) {
81565
81565
  process.stderr.write(line);
81566
81566
  }
@@ -82273,7 +82273,7 @@ function isWithinSizeLimit(filePath, maxBytes = SYNC_MAX_FILE_BYTES) {
82273
82273
  }
82274
82274
  }
82275
82275
 
82276
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/watch-roots.js
82276
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/watch-roots.js
82277
82277
  import * as fs3 from "fs";
82278
82278
  import * as path3 from "path";
82279
82279
  function defaultListChildDirs(dir, onSymlinkEntry) {
@@ -82347,7 +82347,7 @@ function isCoveredByRecursiveRoot(absolutePath, recursiveRoots) {
82347
82347
  }
82348
82348
  }
82349
82349
 
82350
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/watch-coverage.js
82350
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/watch-coverage.js
82351
82351
  import * as fs4 from "fs";
82352
82352
  function directoryIdentityAt(absolutePath) {
82353
82353
  try {
@@ -82384,7 +82384,7 @@ function probeScopedWatchCoverage(input2) {
82384
82384
  return { ok: true };
82385
82385
  }
82386
82386
 
82387
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/local-path-codec.js
82387
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/local-path-codec.js
82388
82388
  import * as path4 from "path";
82389
82389
  var WIN32_RESERVED_CHARS = /[<>:"/\\|?*]/;
82390
82390
  var WIN32_DEVICE_NAME = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i;
@@ -82442,7 +82442,7 @@ function canonicalVaultKeySpelling(key) {
82442
82442
  return segments.join("/");
82443
82443
  }
82444
82444
 
82445
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/personal-vault-exclusions.js
82445
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/personal-vault-exclusions.js
82446
82446
  import * as path5 from "path";
82447
82447
  import * as fs5 from "fs";
82448
82448
  function hasSegment(relPath, segment) {
@@ -82739,7 +82739,7 @@ function wrapFilterWithPersonalVaultDefaults(underlying, syncRoot, onExcluded, o
82739
82739
  };
82740
82740
  }
82741
82741
 
82742
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/state-store.js
82742
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/state-store.js
82743
82743
  import * as crypto2 from "node:crypto";
82744
82744
  import * as fs6 from "node:fs";
82745
82745
  import * as path6 from "node:path";
@@ -85795,11 +85795,11 @@ function crc32c(bytes) {
85795
85795
  return (crc ^ 4294967295) >>> 0;
85796
85796
  }
85797
85797
 
85798
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/personal-vault.js
85798
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/personal-vault.js
85799
85799
  import * as fs13 from "fs";
85800
85800
  import * as path11 from "path";
85801
85801
 
85802
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal.js
85802
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal.js
85803
85803
  import * as fs12 from "fs";
85804
85804
  import * as os2 from "os";
85805
85805
  import * as path10 from "path";
@@ -85807,7 +85807,7 @@ import * as crypto7 from "crypto";
85807
85807
  import { spawn } from "node:child_process";
85808
85808
  import { fileURLToPath } from "node:url";
85809
85809
 
85810
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-decode-window.js
85810
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-decode-window.js
85811
85811
  var JOURNAL_DECODE_WINDOW = 1e4;
85812
85812
  var rowsInFlight = 0;
85813
85813
  var peakRowsInFlight = 0;
@@ -85866,7 +85866,7 @@ function journalFingerprintMatchesStat(fingerprint, lstat3) {
85866
85866
  return lstat3.size === fingerprint.size && lstat3.mtimeMs === fingerprint.mtimeMs && lstat3.ctimeMs === fingerprint.ctimeMs;
85867
85867
  }
85868
85868
 
85869
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-row-store.js
85869
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-row-store.js
85870
85870
  var HASH_BYTES = 32;
85871
85871
  var ETAG_BYTES = 16;
85872
85872
  var INITIAL_ROW_CAPACITY = 16;
@@ -86496,18 +86496,18 @@ var JournalRowStore = class _JournalRowStore {
86496
86496
  prefixIds.set(prefix, prefixIds.size);
86497
86497
  }
86498
86498
  }
86499
- const counts = new Uint32Array(prefixIds.size);
86499
+ const counts2 = new Uint32Array(prefixIds.size);
86500
86500
  for (const rowId of this.rowIds()) {
86501
86501
  const path73 = this.pathForRowForPrefixIndex(rowId);
86502
86502
  const ownPrefixId = prefixIds.get(path73);
86503
86503
  if (ownPrefixId !== void 0)
86504
- counts[ownPrefixId] += 1;
86504
+ counts2[ownPrefixId] += 1;
86505
86505
  for (const prefix of this.prefixesForPath(path73))
86506
- counts[prefixIds.get(prefix)] += 1;
86506
+ counts2[prefixIds.get(prefix)] += 1;
86507
86507
  }
86508
86508
  const offsets = new Uint32Array(prefixIds.size + 1);
86509
- for (let prefixId = 0; prefixId < counts.length; prefixId += 1) {
86510
- offsets[prefixId + 1] = offsets[prefixId] + counts[prefixId];
86509
+ for (let prefixId = 0; prefixId < counts2.length; prefixId += 1) {
86510
+ offsets[prefixId + 1] = offsets[prefixId] + counts2[prefixId];
86511
86511
  }
86512
86512
  const nextOffsets = new Uint32Array(offsets);
86513
86513
  const rowIds = new Uint32Array(offsets[offsets.length - 1]);
@@ -87376,7 +87376,7 @@ function readOptionalBoolean(entry, key, flags, presentBit, valueBit) {
87376
87376
  entry[key] = Boolean(flags & valueBit);
87377
87377
  }
87378
87378
 
87379
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-record-proxy.js
87379
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-record-proxy.js
87380
87380
  var rowsByRecordProxy = /* @__PURE__ */ new WeakMap();
87381
87381
  function journalRecordRows(files) {
87382
87382
  return rowsByRecordProxy.get(files);
@@ -87442,7 +87442,7 @@ function createJournalRecordProxy(store) {
87442
87442
  return proxy;
87443
87443
  }
87444
87444
 
87445
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/fsync-compat.js
87445
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/fsync-compat.js
87446
87446
  import * as fs7 from "node:fs";
87447
87447
  var UNSUPPORTED_DIRECTORY_FSYNC_CODES = /* @__PURE__ */ new Set(["EINVAL", "ENOTSUP", "EOPNOTSUPP", "EPERM"]);
87448
87448
  var loggedSkips = /* @__PURE__ */ new Set();
@@ -87466,13 +87466,13 @@ function fsyncWithCompatibility(fd, options) {
87466
87466
  }
87467
87467
  }
87468
87468
 
87469
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-decoder.js
87469
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-decoder.js
87470
87470
  import { StringDecoder } from "node:string_decoder";
87471
87471
 
87472
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-v4.js
87472
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-v4.js
87473
87473
  import * as crypto3 from "node:crypto";
87474
87474
 
87475
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-rows.js
87475
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-rows.js
87476
87476
  var packedJournalRows = /* @__PURE__ */ new WeakMap();
87477
87477
  var sharedAreaJournalRowStores = /* @__PURE__ */ new Map();
87478
87478
  function areaJournalRowsCacheKey(rootDir, slug) {
@@ -87495,7 +87495,7 @@ function forgetSharedAreaJournalRows(cacheKey) {
87495
87495
  sharedAreaJournalRowStores.delete(cacheKey);
87496
87496
  }
87497
87497
 
87498
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-v4.js
87498
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-v4.js
87499
87499
  var JOURNAL_SNAPSHOT_V4_MAGIC = SNAPSHOT_V4_MAGIC;
87500
87500
  var SNAPSHOT_FIXED_HEADER_BYTES2 = 52;
87501
87501
  var SECTION_ALIGNMENT_BYTES = 8;
@@ -88027,7 +88027,7 @@ function assertLittleEndian() {
88027
88027
  throw new Error("HQSNAP4 requires a little-endian host");
88028
88028
  }
88029
88029
 
88030
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-decoder.js
88030
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-decoder.js
88031
88031
  function decodeJournalSnapshot(chunks, magic) {
88032
88032
  if (magic.equals(SNAPSHOT_V3_MAGIC))
88033
88033
  return decodeV3JournalSnapshot(chunks);
@@ -88379,12 +88379,12 @@ function isPunctuation(value) {
88379
88379
  return value === "{" || value === "}" || value === "[" || value === "]" || value === ":" || value === ",";
88380
88380
  }
88381
88381
 
88382
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/posix-key.js
88382
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/posix-key.js
88383
88383
  function toPosixKey(key) {
88384
88384
  return key.split("\\").join("/");
88385
88385
  }
88386
88386
 
88387
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/path-ancestors.js
88387
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/path-ancestors.js
88388
88388
  function isUnderAnyRoot(key, roots) {
88389
88389
  if (roots.has(key))
88390
88390
  return true;
@@ -88397,7 +88397,7 @@ function isUnderAnyRoot(key, roots) {
88397
88397
  return false;
88398
88398
  }
88399
88399
 
88400
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/journal-ledger-stream.js
88400
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/journal-ledger-stream.js
88401
88401
  import * as fs8 from "node:fs";
88402
88402
  import { StringDecoder as StringDecoder2 } from "node:string_decoder";
88403
88403
  var CHUNK_BYTES = 1 << 18;
@@ -88511,7 +88511,7 @@ function streamJournalLedgerRows(filePath, onRow) {
88511
88511
  }
88512
88512
  }
88513
88513
 
88514
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/area-resolver.js
88514
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/area-resolver.js
88515
88515
  import * as fs9 from "fs";
88516
88516
  import * as path7 from "path";
88517
88517
  var AREA_LAYOUT_FORMAT = 1;
@@ -88822,12 +88822,12 @@ function compareText(left, right) {
88822
88822
  return left < right ? -1 : left > right ? 1 : 0;
88823
88823
  }
88824
88824
 
88825
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-migration.js
88825
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-migration.js
88826
88826
  import * as crypto6 from "node:crypto";
88827
88827
  import * as fs11 from "node:fs";
88828
88828
  import * as path9 from "node:path";
88829
88829
 
88830
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/operation-lock.js
88830
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/operation-lock.js
88831
88831
  import * as crypto4 from "crypto";
88832
88832
  import * as fs10 from "fs";
88833
88833
  import * as os from "os";
@@ -89457,7 +89457,7 @@ function withOperationLockSync(hqRoot, command5, fn, opts = {}) {
89457
89457
  }
89458
89458
  }
89459
89459
 
89460
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger.js
89460
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger.js
89461
89461
  import * as crypto5 from "node:crypto";
89462
89462
  var DIRECT_DELTA = 1;
89463
89463
  var PREPARED_TRANSACTION = 2;
@@ -90886,7 +90886,7 @@ function cloneMetadata(metadata) {
90886
90886
  return result;
90887
90887
  }
90888
90888
 
90889
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-migration.js
90889
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-migration.js
90890
90890
  function logSwallowed2(line) {
90891
90891
  process.stderr.write(line);
90892
90892
  }
@@ -91646,7 +91646,7 @@ function canonicalJsonOrUndefined(value) {
91646
91646
  return value === void 0 ? void 0 : canonicalJson2(value);
91647
91647
  }
91648
91648
 
91649
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/per-area-maintenance.js
91649
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/per-area-maintenance.js
91650
91650
  var AREA_MAINTENANCE_CURSOR_FORMAT = 1;
91651
91651
  var CURSOR_SET = 1;
91652
91652
  var AreaMaintenanceCursorStore = class _AreaMaintenanceCursorStore {
@@ -91748,7 +91748,7 @@ function sameAreas(left, right) {
91748
91748
  return left.length === right.length && left.every((areaId, index) => areaId === right[index]);
91749
91749
  }
91750
91750
 
91751
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/journal.js
91751
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/journal.js
91752
91752
  var TOMBSTONE_TTL_MS = 30 * 24 * 60 * 60 * 1e3;
91753
91753
  var JOURNAL_VERSION_CURRENT = "2";
91754
91754
  var MAX_PULLS_PER_COMPANY = 50;
@@ -93901,7 +93901,7 @@ function gcTombstones(journal, now = Date.now()) {
93901
93901
  return removed;
93902
93902
  }
93903
93903
 
93904
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/personal-vault.js
93904
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/personal-vault.js
93905
93905
  function logSwallowed3(line) {
93906
93906
  process.stderr.write(line);
93907
93907
  }
@@ -94279,7 +94279,7 @@ function purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, syncRoot, sho
94279
94279
  return { removed, byReason };
94280
94280
  }
94281
94281
 
94282
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/local-link-warning.js
94282
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/local-link-warning.js
94283
94283
  import fs14 from "node:fs";
94284
94284
  import path12 from "node:path";
94285
94285
  var LOCAL_LINK_REMEDY = "Repair or remove the link, then sync again. For release-shipped links, run hq rescue. On Windows, enable Developer Mode before repairing symlinks.";
@@ -94396,12 +94396,12 @@ function linkWarningMessage(warning6) {
94396
94396
  return `Skipped symbolic link (${warning6.reason}). ${warning6.remedy}`;
94397
94397
  }
94398
94398
 
94399
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/s3.js
94399
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/s3.js
94400
94400
  import * as fs23 from "fs";
94401
94401
  import * as path18 from "path";
94402
94402
  import * as crypto10 from "crypto";
94403
94403
 
94404
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/local-replacement.js
94404
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/local-replacement.js
94405
94405
  import * as crypto8 from "crypto";
94406
94406
  import * as fs15 from "fs";
94407
94407
  import * as os3 from "os";
@@ -94457,11 +94457,11 @@ function shouldRecordLocalDeleteIntent(localPath, absent) {
94457
94457
  return absent && !isLocalPathBeingReplaced(localPath);
94458
94458
  }
94459
94459
 
94460
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/s3.js
94460
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/s3.js
94461
94461
  import { Readable as Readable20, Transform as Transform3 } from "stream";
94462
94462
  import { pipeline } from "stream/promises";
94463
94463
 
94464
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/net-errors.js
94464
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/net-errors.js
94465
94465
  var TRANSIENT_NETWORK_EXIT = 75;
94466
94466
  var TRANSIENT_CODES = /* @__PURE__ */ new Set([
94467
94467
  "ECONNREFUSED",
@@ -94571,7 +94571,7 @@ function hasDeniedConnect(err, depth) {
94571
94571
  return false;
94572
94572
  }
94573
94573
 
94574
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-entity-meta.js
94574
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-entity-meta.js
94575
94575
  var ONTOLOGY_ENTITY_KEY = /^ontology\/entities\/[a-z][a-z0-9-]*\/[^/]+\.md$/;
94576
94576
  var ENTITY_LAST_UPDATED_META_KEY = "hq-entity-last-updated";
94577
94577
  function ontologyVaultKey(relPath) {
@@ -94603,13 +94603,13 @@ function buildEntityMetadata(key, body) {
94603
94603
  return stamp === null ? {} : { [ENTITY_LAST_UPDATED_META_KEY]: stamp };
94604
94604
  }
94605
94605
 
94606
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/object-io.js
94606
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/object-io.js
94607
94607
  var import_client_s3 = __toESM(require_dist_cjs36(), 1);
94608
94608
  import * as http3 from "node:http";
94609
94609
  import * as https2 from "node:https";
94610
94610
  import { Transform as Transform2 } from "node:stream";
94611
94611
 
94612
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/s3-content-checksum.js
94612
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/s3-content-checksum.js
94613
94613
  import { createHash as createHash15 } from "node:crypto";
94614
94614
  var CHECKSUM_HEADER_NAMES = [
94615
94615
  "content-md5",
@@ -94680,7 +94680,7 @@ function headersForObjectLockPut(url2, headers, body) {
94680
94680
  return out;
94681
94681
  }
94682
94682
 
94683
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bandwidth.js
94683
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bandwidth.js
94684
94684
  import { Transform } from "node:stream";
94685
94685
  var MAX_BYTES_PER_SEC_ENV = "HQ_SYNC_MAX_BYTES_PER_SEC";
94686
94686
  var MAX_CONCURRENCY_ENV = "HQ_SYNC_MAX_CONCURRENCY";
@@ -95081,7 +95081,7 @@ function getBandwidthGovernor() {
95081
95081
  return singleton;
95082
95082
  }
95083
95083
 
95084
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/client-info.js
95084
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/client-info.js
95085
95085
  var HEADER_CLIENT_NAME = "x-hq-client-name";
95086
95086
  var HEADER_CLIENT_VERSION = "x-hq-client-version";
95087
95087
  var HEADER_HQ_CORE_VERSION = "x-hq-core-version";
@@ -95104,7 +95104,7 @@ function buildClientHeaders(info) {
95104
95104
  return headers;
95105
95105
  }
95106
95106
 
95107
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/telemetry-events.js
95107
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/telemetry-events.js
95108
95108
  var MAX_EVENTS_PER_BATCH = 50;
95109
95109
  var DEFAULT_TIMEOUT_MS = 1500;
95110
95110
  var MAX_PROPERTIES = 40;
@@ -95248,12 +95248,12 @@ function describeError(err) {
95248
95248
  return err instanceof Error ? err.name : typeof err;
95249
95249
  }
95250
95250
 
95251
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/http-keepalive.js
95251
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/http-keepalive.js
95252
95252
  import * as http from "node:http";
95253
95253
  import * as https from "node:https";
95254
95254
  import { Readable as Readable19 } from "node:stream";
95255
95255
 
95256
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/realtime-telemetry.js
95256
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/realtime-telemetry.js
95257
95257
  import { AsyncLocalStorage } from "node:async_hooks";
95258
95258
  import { monitorEventLoopDelay } from "node:perf_hooks";
95259
95259
  var REALTIME_TELEMETRY_EVENT = "sync.realtime.timing";
@@ -95443,7 +95443,7 @@ function writeRealtimeTelemetryToStderr(record2) {
95443
95443
  `);
95444
95444
  }
95445
95445
 
95446
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/http-keepalive.js
95446
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/http-keepalive.js
95447
95447
  var HTTP_AGENT = new http.Agent({ keepAlive: true, maxSockets: 8 });
95448
95448
  var HTTPS_AGENT = new https.Agent({ keepAlive: true, maxSockets: 8 });
95449
95449
  function getKeepAliveAgent(secure) {
@@ -95503,6 +95503,31 @@ function requestWithKeepAlive(url2, init) {
95503
95503
  });
95504
95504
  }
95505
95505
 
95506
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-request-counter.js
95507
+ var counts = { vault: 0, list: 0, object: 0 };
95508
+ var UNCOUNTED_VAULT_PATH_PREFIX = "/v1/telemetry/";
95509
+ function syncRequestKindForVaultPath(path73) {
95510
+ if (path73.startsWith(UNCOUNTED_VAULT_PATH_PREFIX))
95511
+ return null;
95512
+ return path73.startsWith("/v1/files/list") ? "list" : "vault";
95513
+ }
95514
+ function recordSyncRequest(kind) {
95515
+ counts[kind] += 1;
95516
+ }
95517
+ function snapshotSyncRequestCounts() {
95518
+ return { ...counts };
95519
+ }
95520
+ function syncRequestCountsSince(start, end2 = snapshotSyncRequestCounts()) {
95521
+ return {
95522
+ vault: end2.vault - start.vault,
95523
+ list: end2.list - start.list,
95524
+ object: end2.object - start.object
95525
+ };
95526
+ }
95527
+ function totalSyncRequests(delta) {
95528
+ return delta.vault + delta.list + delta.object;
95529
+ }
95530
+
95506
95531
  // node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/external.js
95507
95532
  var external_exports = {};
95508
95533
  __export(external_exports, {
@@ -98312,9 +98337,9 @@ var asciiTabOrNewline = /[\t\n\r]/g;
98312
98337
  function stripTabAndNewline(value) {
98313
98338
  return value.replace(asciiTabOrNewline, "");
98314
98339
  }
98315
- function urlHostnameOk(url2, hostname3) {
98316
- hostname3.lastIndex = 0;
98317
- return hostname3.test(url2.hostname);
98340
+ function urlHostnameOk(url2, hostname4) {
98341
+ hostname4.lastIndex = 0;
98342
+ return hostname4.test(url2.hostname);
98318
98343
  }
98319
98344
  function urlProtocolOk(url2, protocol) {
98320
98345
  protocol.lastIndex = 0;
@@ -114369,7 +114394,7 @@ function date7(params) {
114369
114394
  return _coercedDate(ZodDate, params);
114370
114395
  }
114371
114396
 
114372
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cognito-auth.js
114397
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cognito-auth.js
114373
114398
  import { spawnSync } from "child_process";
114374
114399
  import * as crypto9 from "crypto";
114375
114400
  import * as fs21 from "fs";
@@ -114891,7 +114916,7 @@ defineLazyProperty(apps, "browser", () => "browser");
114891
114916
  defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
114892
114917
  var open_default = open4;
114893
114918
 
114894
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cognito-auth.js
114919
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cognito-auth.js
114895
114920
  var CognitoAuthError = class extends Error {
114896
114921
  constructor(message) {
114897
114922
  super(message);
@@ -116149,7 +116174,7 @@ function pickNewerSession(fromKeychain, other) {
116149
116174
  return expiresAtMs(other) > expiresAtMs(fromKeychain) ? other : fromKeychain;
116150
116175
  }
116151
116176
 
116152
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/credential-scope-error.js
116177
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/credential-scope-error.js
116153
116178
  var POLICY_WRITE_SCOPE_TRUNCATED = "POLICY_WRITE_SCOPE_TRUNCATED";
116154
116179
  var VaultCredentialScopeError = class extends Error {
116155
116180
  droppedWriteGrantPrefixes;
@@ -116191,12 +116216,18 @@ function assertCredentialScopeUsable(diagnostic) {
116191
116216
  }
116192
116217
  }
116193
116218
 
116194
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/plan-limit.js
116219
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/plan-limit.js
116195
116220
  var PLAN_LIMIT_REACHED_ERROR = "plan_limit_reached";
116196
116221
  var PLAN_LIMIT_CODES = /* @__PURE__ */ new Set([
116197
116222
  "PLAN_LIMIT_EXCEEDED",
116198
116223
  "PLAN_LIMIT_REACHED"
116199
116224
  ]);
116225
+ var USAGE_PAUSE_CODE = "usage_paused";
116226
+ var USAGE_PAUSE_REASONS = /* @__PURE__ */ new Set([
116227
+ "usage_trial_cap",
116228
+ "usage_card_required",
116229
+ "usage_spend_limit"
116230
+ ]);
116200
116231
  function isRecord2(value) {
116201
116232
  return typeof value === "object" && value !== null && !Array.isArray(value);
116202
116233
  }
@@ -116252,9 +116283,45 @@ function parseFixOptions(value) {
116252
116283
  }
116253
116284
  return Object.keys(out).length > 0 ? out : void 0;
116254
116285
  }
116286
+ function parseUsagePause(value) {
116287
+ if (!isRecord2(value) || value.code !== USAGE_PAUSE_CODE)
116288
+ return null;
116289
+ const reason = value.reason;
116290
+ if (typeof reason !== "string" || !USAGE_PAUSE_REASONS.has(reason))
116291
+ return null;
116292
+ const message = nonEmptyString(value.message);
116293
+ if (message === void 0 || !isHttpsUpgradeUrl(value.actionUrl))
116294
+ return null;
116295
+ const url2 = new URL(value.actionUrl);
116296
+ if (url2.username || url2.password)
116297
+ return null;
116298
+ return {
116299
+ code: USAGE_PAUSE_CODE,
116300
+ reason,
116301
+ message,
116302
+ actionUrl: value.actionUrl
116303
+ };
116304
+ }
116255
116305
  function parsePlanLimitRefusal(body) {
116256
116306
  if (!isRecord2(body))
116257
116307
  return null;
116308
+ const usagePause = parseUsagePause(body.usagePause);
116309
+ if (usagePause) {
116310
+ const refusal4 = {
116311
+ usagePause,
116312
+ upgradeUrl: usagePause.actionUrl,
116313
+ message: usagePause.message
116314
+ };
116315
+ const code2 = nonEmptyString(body.code);
116316
+ if (code2 !== void 0 && PLAN_LIMIT_CODES.has(code2))
116317
+ refusal4.code = code2;
116318
+ if (body.error === PLAN_LIMIT_REACHED_ERROR)
116319
+ refusal4.error = PLAN_LIMIT_REACHED_ERROR;
116320
+ const blocked2 = nonEmptyString(body.blocked);
116321
+ if (blocked2 !== void 0)
116322
+ refusal4.blocked = blocked2;
116323
+ return refusal4;
116324
+ }
116258
116325
  if (!hasPlanLimitMarker(body))
116259
116326
  return null;
116260
116327
  const upgradeUrl = body.upgradeUrl;
@@ -116284,12 +116351,15 @@ function parsePlanLimitRefusal(body) {
116284
116351
  return refusal3;
116285
116352
  }
116286
116353
  function formatPlanLimitNotice(event) {
116354
+ const usagePause = parseUsagePause(event.usagePause);
116355
+ if (usagePause)
116356
+ return ` ! ${usagePause.message} ${usagePause.actionUrl}`;
116287
116357
  const files = event.count === void 0 ? "New files are" : `${event.count} file${event.count === 1 ? " is" : "s are"}`;
116288
116358
  const reason = event.message ? ` ${event.message}` : "";
116289
116359
  return ` ! ${files} paused by your plan limit.${reason} Upgrade: ${event.upgradeUrl}`;
116290
116360
  }
116291
116361
 
116292
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/vault-client.js
116362
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/vault-client.js
116293
116363
  var DEFAULT_GLOBAL_FETCH = globalThis.fetch;
116294
116364
  var VaultClientError = class extends Error {
116295
116365
  statusCode;
@@ -117142,6 +117212,9 @@ var VaultClient = class {
117142
117212
  let res;
117143
117213
  try {
117144
117214
  const requestUrl = `${this.apiUrl}${path73}`;
117215
+ const requestKind = syncRequestKindForVaultPath(path73);
117216
+ if (requestKind)
117217
+ recordSyncRequest(requestKind);
117145
117218
  res = path73 === "/v1/files/presign" && globalThis.fetch === DEFAULT_GLOBAL_FETCH ? await requestWithKeepAlive(requestUrl, init) : await fetch(requestUrl, init);
117146
117219
  } catch (err) {
117147
117220
  lastError = err instanceof Error ? err : new Error(String(err));
@@ -117237,7 +117310,7 @@ function parseVaultErrorBody(body) {
117237
117310
  }
117238
117311
  }
117239
117312
 
117240
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/object-io.js
117313
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/object-io.js
117241
117314
  var OBJECT_IO_REQUEST_TIMEOUT_MS = 6e4;
117242
117315
  var OBJECT_IO_REQUEST_TIMEOUT_PER_MIB_MS = 8e3;
117243
117316
  var OBJECT_IO_BODY_IDLE_TIMEOUT_MS = 15e3;
@@ -117459,14 +117532,16 @@ var S3SdkObjectIO = class {
117459
117532
  })();
117460
117533
  await this.refreshInFlight;
117461
117534
  }
117462
- async sendWithCredentialRetry(send, timeoutPayloadBytes = 0) {
117535
+ async sendWithCredentialRetry(send, timeoutPayloadBytes = 0, requestKind = "object") {
117463
117536
  const generation = this.clientGeneration;
117464
117537
  try {
117538
+ recordSyncRequest(requestKind);
117465
117539
  return await measureRealtimeNetworkPhase("s3Request", () => send(this.client, objectIOAbortSignal(timeoutPayloadBytes)));
117466
117540
  } catch (err) {
117467
117541
  if (!this.forceRefresh || !isRetryableS3CredentialError(err))
117468
117542
  throw err;
117469
117543
  await this.refreshRejectedGeneration(generation);
117544
+ recordSyncRequest(requestKind);
117470
117545
  return measureRealtimeNetworkPhase("s3Request", () => send(this.client, objectIOAbortSignal(timeoutPayloadBytes)));
117471
117546
  }
117472
117547
  }
@@ -117497,7 +117572,10 @@ var S3SdkObjectIO = class {
117497
117572
  ...input2.ifNoneMatch ? { IfNoneMatch: input2.ifNoneMatch } : {}
117498
117573
  }), { abortSignal }), input2.body.byteLength);
117499
117574
  const res = input2.bypassBandwidthGovernor ? await send() : await governor.measureRawTransfer(input2.body.byteLength, send);
117500
- return { etag: res.ETag || "" };
117575
+ return {
117576
+ etag: res.ETag || "",
117577
+ ...res.VersionId ? { versionId: res.VersionId } : {}
117578
+ };
117501
117579
  } catch (err) {
117502
117580
  if (isObjectLockChecksumRequiredError(err)) {
117503
117581
  throw new ObjectLockChecksumRequiredError(input2.key, err instanceof Error ? err.message : String(err));
@@ -117549,7 +117627,7 @@ var S3SdkObjectIO = class {
117549
117627
  Bucket: this.bucket,
117550
117628
  Prefix: input2.prefix,
117551
117629
  ContinuationToken: input2.continuationToken
117552
- }), { abortSignal }));
117630
+ }), { abortSignal }), 0, "list");
117553
117631
  const objects = [];
117554
117632
  for (const obj of res.Contents || []) {
117555
117633
  if (!obj.Key)
@@ -118220,7 +118298,11 @@ var PresignObjectIO = class {
118220
118298
  }
118221
118299
  throw new Error(`presigned PUT failed for ${input2.key}: ${res.status} ${detail}`);
118222
118300
  }
118223
- return { etag: stripQuotes(res.headers.get("etag") ?? void 0) };
118301
+ const versionId = res.headers.get("x-amz-version-id");
118302
+ return {
118303
+ etag: stripQuotes(res.headers.get("etag") ?? void 0),
118304
+ ...versionId ? { versionId } : {}
118305
+ };
118224
118306
  };
118225
118307
  return input2.bypassBandwidthGovernor ? send() : governor.measureRawTransfer(input2.body.byteLength, send);
118226
118308
  };
@@ -118571,6 +118653,7 @@ async function fetchWithRetry(url2, init, what, timeoutPayloadBytes = 0) {
118571
118653
  let res;
118572
118654
  try {
118573
118655
  const signal = init.signal ?? objectIOAbortSignal(timeoutPayloadBytes);
118656
+ recordSyncRequest("object");
118574
118657
  res = await measureRealtimeNetworkPhase("s3Request", () => globalThis.fetch === DEFAULT_GLOBAL_FETCH2 ? requestWithKeepAlive(url2, { ...init, signal }) : globalThis.fetch(url2, { ...init, signal }));
118575
118658
  } catch (err) {
118576
118659
  lastError = err;
@@ -118639,7 +118722,7 @@ function presignObjectIOFactory(vault, refresherFor, forceRefresherFor, options
118639
118722
  };
118640
118723
  }
118641
118724
 
118642
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/file-mode-portability.js
118725
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/file-mode-portability.js
118643
118726
  var WIN32_SYNTHETIC_MODES = /* @__PURE__ */ new Set([438, 292]);
118644
118727
  function portableModeStamp(mode, platform5 = process.platform) {
118645
118728
  if (platform5 === "win32")
@@ -118650,7 +118733,7 @@ function isPortableModeSignal(mode) {
118650
118733
  return !WIN32_SYNTHETIC_MODES.has(mode & 511);
118651
118734
  }
118652
118735
 
118653
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/script-eol.js
118736
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/script-eol.js
118654
118737
  import * as path16 from "path";
118655
118738
  var SCRIPT_EXTENSIONS = /* @__PURE__ */ new Set([".sh", ".bash", ".zsh"]);
118656
118739
  var SHEBANG = Buffer.from("#!");
@@ -118681,7 +118764,7 @@ function normalizeScriptLineEndings(body) {
118681
118764
  return changed ? out.subarray(0, n3) : null;
118682
118765
  }
118683
118766
 
118684
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/symlink-target-policy.js
118767
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/symlink-target-policy.js
118685
118768
  import path17 from "node:path";
118686
118769
  import fs22 from "node:fs";
118687
118770
  function personalSymlinkTargetLinkPath(relativePath) {
@@ -118904,7 +118987,7 @@ function redactShape(target, classification) {
118904
118987
  return parents > 0 ? `relative-parent-${Math.min(parents, 8)}` : "relative-path";
118905
118988
  }
118906
118989
 
118907
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/s3.js
118990
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/s3.js
118908
118991
  var DOWNLOAD_STREAM_MAX_RETRIES = 3;
118909
118992
  var DOWNLOAD_STREAM_BASE_DELAY_MS = 400;
118910
118993
  function sleepMs(ms) {
@@ -119594,7 +119677,8 @@ function uploadScopeFor(ctx) {
119594
119677
  return ctx.uid.startsWith("cmp_") ? "company" : "personal";
119595
119678
  }
119596
119679
  function putResult(result) {
119597
- return result.alreadyCurrent ? { etag: result.etag, alreadyCurrent: true } : { etag: result.etag };
119680
+ const versionId = result.versionId ? { versionId: result.versionId } : {};
119681
+ return result.alreadyCurrent ? { etag: result.etag, alreadyCurrent: true, ...versionId } : { etag: result.etag, ...versionId };
119598
119682
  }
119599
119683
  async function uploadFile(ctx, localPath, key, author, precondition, transferOptions, uploadBody, ioOverride) {
119600
119684
  key = toPosixKey(key);
@@ -120051,6 +120135,7 @@ async function downloadFileAttempt(io, key, localPath, options, allowResume = tr
120051
120135
  metadata,
120052
120136
  contentHash: streamed.hash,
120053
120137
  contentSize: streamed.size,
120138
+ ...streamResult?.versionId ? { versionId: streamResult.versionId } : {},
120054
120139
  ...modeWarnings.length > 0 ? { modeWarnings } : {}
120055
120140
  };
120056
120141
  }
@@ -120126,7 +120211,7 @@ function getMimeType(filePath) {
120126
120211
  return mimeTypes[ext] || "application/octet-stream";
120127
120212
  }
120128
120213
 
120129
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/push-event.js
120214
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/push-event.js
120130
120215
  var CONTENT_HASH_PATTERN = /^sha256:[0-9a-f]{64}$/;
120131
120216
  var ISO8601_DATETIME_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;
120132
120217
  function nativeSeparatorsToPosix(relativePath, sep26) {
@@ -120221,7 +120306,7 @@ function decodePushEvent(input2) {
120221
120306
  return parsed.data;
120222
120307
  }
120223
120308
 
120224
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-routes.js
120309
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-routes.js
120225
120310
  import * as path19 from "path";
120226
120311
  function routeChangeToTarget(relPath, kind) {
120227
120312
  const norm = relPath.split(path19.sep).join("/").replace(/^\.\//, "");
@@ -120390,7 +120475,7 @@ function carriedFlags(baseArgv) {
120390
120475
  return carried;
120391
120476
  }
120392
120477
 
120393
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/push-transport.js
120478
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/push-transport.js
120394
120479
  var moduleLoadFetch = globalThis.fetch;
120395
120480
  var moduleLoadAbortController = globalThis.AbortController;
120396
120481
  var successOutcomes = /* @__PURE__ */ new WeakMap();
@@ -120612,7 +120697,7 @@ var HttpPushTransport = class {
120612
120697
  }
120613
120698
  };
120614
120699
 
120615
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/case-alias.js
120700
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/case-alias.js
120616
120701
  import * as fs24 from "fs";
120617
120702
  import * as path20 from "path";
120618
120703
  function foldVaultKey(key) {
@@ -120760,7 +120845,7 @@ function directoryFoldsCase(dir) {
120760
120845
  return false;
120761
120846
  }
120762
120847
 
120763
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/watcher.js
120848
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/watcher.js
120764
120849
  var DEBOUNCE_MS = 2e3;
120765
120850
  var DEFAULT_EVENT_DEBOUNCE_MS = 6e4;
120766
120851
  var DEFAULT_EVENT_MAX_WAIT_MS = 12e4;
@@ -123923,7 +124008,7 @@ var PushEventEmitter = class _PushEventEmitter {
123923
124008
  }
123924
124009
  };
123925
124010
 
123926
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-self-profile.js
124011
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-self-profile.js
123927
124012
  var SELF_PROFILE_ENV = "HQ_SYNC_SELF_PROFILE";
123928
124013
  var SELF_PROFILE_CPU_CORES_ENV = "HQ_SYNC_SELF_PROFILE_CPU_CORES";
123929
124014
  var SELF_PROFILE_RSS_MB_ENV = "HQ_SYNC_SELF_PROFILE_RSS_MB";
@@ -124538,15 +124623,15 @@ function readRunnerVersion() {
124538
124623
  }
124539
124624
  }
124540
124625
 
124541
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
124542
- import * as os23 from "os";
124626
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
124627
+ import * as os24 from "os";
124543
124628
  import * as path72 from "path";
124544
124629
  import * as fs76 from "fs";
124545
124630
  import { randomUUID as randomUUID14 } from "node:crypto";
124546
124631
  import { monitorEventLoopDelay as monitorEventLoopDelay2, performance as performance4 } from "node:perf_hooks";
124547
124632
  import { fileURLToPath as fileURLToPath6 } from "url";
124548
124633
 
124549
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/context.js
124634
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/context.js
124550
124635
  import { createHash as createHash19 } from "node:crypto";
124551
124636
  var REFRESH_THRESHOLD_MS = 2 * 60 * 1e3;
124552
124637
  var DEFAULT_SESSION_DURATION_SECONDS = 900;
@@ -124777,13 +124862,13 @@ async function vendSelfCredentials(personUid, config2) {
124777
124862
  return postVend(route, { personUid }, config2);
124778
124863
  }
124779
124864
 
124780
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/realtime-rollout.js
124865
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/realtime-rollout.js
124781
124866
  var DEFAULT_REALTIME_AUTHORIZATION_TIMEOUT_MS = 15e3;
124782
124867
 
124783
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/candidate-uploader.js
124868
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/candidate-uploader.js
124784
124869
  var MAX_SMALL_CANDIDATE_BYTES = 8 * 1024 * 1024;
124785
124870
 
124786
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/multipart-uploader.js
124871
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/multipart-uploader.js
124787
124872
  var DEFAULT_GLOBAL_FETCH3 = globalThis.fetch;
124788
124873
  var MULTIPART_PART_SIZE_BYTES = 8 * 1024 * 1024;
124789
124874
  var MAX_MULTIPART_BYTES_IN_FLIGHT = 64 * 1024 * 1024;
@@ -124833,7 +124918,7 @@ var MultipartByteBudget = class {
124833
124918
  };
124834
124919
  var processByteBudget = new MultipartByteBudget();
124835
124920
 
124836
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/cloud-authoritative.js
124921
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/cloud-authoritative.js
124837
124922
  var CLOUD_AUTHORITATIVE_PATTERNS = [
124838
124923
  /^company-brief\.md$/,
124839
124924
  /^board\.json$/,
@@ -124881,7 +124966,7 @@ function isPullReconciledServerOwned(relPath) {
124881
124966
  return isCloudAuthoritative(vaultRel);
124882
124967
  }
124883
124968
 
124884
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/server-owned-skips.js
124969
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/server-owned-skips.js
124885
124970
  var SERVER_OWNED_FOLDERS = [
124886
124971
  {
124887
124972
  folder: "sources/slack-dm/",
@@ -124944,13 +125029,13 @@ function groupServerOwnedSkips(paths, options = {}) {
124944
125029
  return groups;
124945
125030
  }
124946
125031
 
124947
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync-progress.js
125032
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-progress.js
124948
125033
  import { randomUUID as randomUUID3 } from "node:crypto";
124949
125034
  import * as fs28 from "fs";
124950
125035
  import * as os8 from "os";
124951
125036
  import * as path24 from "path";
124952
125037
 
124953
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/conflict-notices.js
125038
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/conflict-notices.js
124954
125039
  import { createHash as createHash20 } from "node:crypto";
124955
125040
  import * as fs27 from "node:fs";
124956
125041
  import * as os7 from "node:os";
@@ -125099,7 +125184,7 @@ function readPendingConflictNotices() {
125099
125184
  return readNotices().filter((notice) => !acknowledged.has(notice.id)).slice(-MAX_PENDING_CONFLICT_NOTICES);
125100
125185
  }
125101
125186
 
125102
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync-progress.js
125187
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-progress.js
125103
125188
  function logSwallowed5(line) {
125104
125189
  process.stderr.write(line);
125105
125190
  }
@@ -125386,7 +125471,7 @@ function createPassSummaryRecorder() {
125386
125471
  };
125387
125472
  }
125388
125473
 
125389
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/prefix-coalesce.js
125474
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/prefix-coalesce.js
125390
125475
  var SCOPE_PREFIX_MARKER = "\0hq-scope:";
125391
125476
  var SCOPE_PREFIX_MARKER_PREFIX = `${SCOPE_PREFIX_MARKER}prefix`;
125392
125477
  var SCOPE_PREFIX_MARKER_EXACT = `${SCOPE_PREFIX_MARKER}exact`;
@@ -125586,7 +125671,7 @@ function grantPathToScopePrefix(grantPath, slug) {
125586
125671
  return pathToScopePrefix(p3);
125587
125672
  }
125588
125673
 
125589
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/scope-shrink.js
125674
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/scope-shrink.js
125590
125675
  import * as fs29 from "fs";
125591
125676
  import * as path25 from "path";
125592
125677
  function buildScopeShrinkPlan(input2) {
@@ -125882,18 +125967,18 @@ function applyScopeShrink(input2) {
125882
125967
  };
125883
125968
  }
125884
125969
 
125885
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/secret-path-policy.js
125970
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/secret-path-policy.js
125886
125971
  init_dist();
125887
125972
  import * as fs30 from "fs";
125888
125973
  import * as path26 from "path";
125889
125974
 
125890
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/flag-company-uid.js
125975
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/flag-company-uid.js
125891
125976
  var FLAG_COMPANY_UID_PATTERN = /^cmp_[A-Za-z0-9]{3,128}$/;
125892
125977
  function flagCompanyUid(uid) {
125893
125978
  return FLAG_COMPANY_UID_PATTERN.test(uid) ? uid : void 0;
125894
125979
  }
125895
125980
 
125896
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/secret-path-policy.js
125981
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/secret-path-policy.js
125897
125982
  var SKIP_SECRET_PATHS_FLAG = "sync.skip-secret-paths";
125898
125983
  var WAL_REJECTED_DELTA_RECOVERY_FLAG = "sync.wal-rejected-delta-recovery";
125899
125984
  var FLAG_REFRESH_INTERVAL_MS = 5 * 6e4;
@@ -126043,7 +126128,7 @@ function isSkipSecretPathsEnabled(config2, companyUid, failClosed = false) {
126043
126128
  return defaultSkipSecretPathsGate(config2, companyUid, failClosed);
126044
126129
  }
126045
126130
 
126046
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/remote-pull.js
126131
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/remote-pull.js
126047
126132
  var VEND_PATH_CAP = 10;
126048
126133
  var POST_FILTER_THRESHOLD = 50;
126049
126134
  var VEND_FANOUT_CONCURRENCY = 5;
@@ -126130,11 +126215,11 @@ function dedupByKey(files) {
126130
126215
  return out;
126131
126216
  }
126132
126217
 
126133
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/multipart-upload.js
126218
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/multipart-upload.js
126134
126219
  var MULTIPART_DEFAULT_PART_SIZE = 16 * 1024 * 1024;
126135
126220
  var MIB = 1024 * 1024;
126136
126221
 
126137
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/pull-scope.js
126222
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/pull-scope.js
126138
126223
  import * as fs31 from "fs";
126139
126224
  import * as path27 from "path";
126140
126225
  var SESSIONS_SCOPE_PREFIX = "sessions/";
@@ -126205,13 +126290,16 @@ function readPinnedPrefixes(hqRoot, slug) {
126205
126290
  return [];
126206
126291
  }
126207
126292
 
126208
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/plan-limit-pause.js
126293
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/plan-limit-pause.js
126209
126294
  import * as fs32 from "fs";
126210
126295
  import * as path28 from "path";
126211
126296
  var PLAN_LIMIT_PAUSE_RETRY_MS = 60 * 60 * 1e3;
126212
126297
  var FILE_PREFIX = "plan-limit-pause.";
126213
126298
  var FILE_SUFFIX = ".json";
126214
126299
  var SCHEMA_VERSION = 1;
126300
+ function canPauseVault(scope, refusal3) {
126301
+ return scope.startsWith("cmp_") && refusal3?.usagePause !== void 0;
126302
+ }
126215
126303
  var clock = () => Date.now();
126216
126304
  function planLimitPauseNow() {
126217
126305
  return clock();
@@ -126251,7 +126339,11 @@ function readPauseFile(file2, scope) {
126251
126339
  paths[key] = { pausedAt: entry.pausedAt };
126252
126340
  }
126253
126341
  }
126254
- return { version: SCHEMA_VERSION, scope, refusal: refusal3, paths };
126342
+ const data = { version: SCHEMA_VERSION, scope, refusal: refusal3, paths };
126343
+ if (canPauseVault(scope, refusal3) && typeof parsed.vaultPausedAt === "string" && !Number.isNaN(Date.parse(parsed.vaultPausedAt))) {
126344
+ data.vaultPausedAt = parsed.vaultPausedAt;
126345
+ }
126346
+ return data;
126255
126347
  } catch {
126256
126348
  return empty;
126257
126349
  }
@@ -126302,9 +126394,27 @@ var PlanLimitPauseStore = class _PlanLimitPauseStore {
126302
126394
  */
126303
126395
  pausedUntil(relativePath, now = planLimitPauseNow()) {
126304
126396
  const entry = this.data.paths[relativePath];
126305
- if (!entry)
126397
+ const fileUntil = entry ? activeUntil(entry, now) : void 0;
126398
+ const vaultUntil = this.vaultPausedUntil(now);
126399
+ if (fileUntil === void 0)
126400
+ return vaultUntil;
126401
+ if (vaultUntil === void 0)
126402
+ return fileUntil;
126403
+ return Math.max(fileUntil, vaultUntil);
126404
+ }
126405
+ /**
126406
+ * End of the whole-company usage pause if it is in effect at `now`, else
126407
+ * undefined. While it is in effect every path in the vault is paused.
126408
+ */
126409
+ vaultPausedUntil(now = planLimitPauseNow()) {
126410
+ const pausedAt = this.data.vaultPausedAt;
126411
+ if (pausedAt === void 0)
126306
126412
  return void 0;
126307
- return activeUntil(entry, now);
126413
+ return activeUntil({ pausedAt }, now);
126414
+ }
126415
+ /** True while the whole company vault is paused for usage at `now`. */
126416
+ isVaultPaused(now = planLimitPauseNow()) {
126417
+ return this.vaultPausedUntil(now) !== void 0;
126308
126418
  }
126309
126419
  /** True while `relativePath` is inside its pause window at `now`. */
126310
126420
  isPaused(relativePath, now = planLimitPauseNow()) {
@@ -126312,18 +126422,39 @@ var PlanLimitPauseStore = class _PlanLimitPauseStore {
126312
126422
  }
126313
126423
  /** True when any recorded path is paused at `now`. */
126314
126424
  hasActivePauses(now = planLimitPauseNow()) {
126315
- return Object.values(this.data.paths).some((entry) => activeUntil(entry, now) !== void 0);
126425
+ return this.isVaultPaused(now) || Object.values(this.data.paths).some((entry) => activeUntil(entry, now) !== void 0);
126316
126426
  }
126317
126427
  /**
126318
126428
  * Replace the stored refusal details (for example with a fresh 402 from an
126319
- * admission check) without restarting any pause window.
126429
+ * admission check) without restarting any pause window. A fresh usage
126430
+ * refusal for a company vault with paused files pauses the whole vault from
126431
+ * `now`; a fresh refusal without a usage pause ends the whole-vault pause
126432
+ * (the server no longer reports one), leaving the per-file pauses.
126320
126433
  */
126321
- refreshRefusal(refusal3) {
126322
- if (this.size === 0)
126434
+ refreshRefusal(refusal3, now = planLimitPauseNow()) {
126435
+ if (this.size === 0 && this.data.vaultPausedAt === void 0)
126323
126436
  return;
126324
126437
  this.data.refusal = refusal3;
126438
+ if (!canPauseVault(this.data.scope, refusal3)) {
126439
+ delete this.data.vaultPausedAt;
126440
+ } else if (this.vaultPausedUntil(now) === void 0) {
126441
+ this.data.vaultPausedAt = new Date(now).toISOString();
126442
+ }
126325
126443
  this.dirty = true;
126326
126444
  }
126445
+ /**
126446
+ * Pause every upload to this company vault at `now`, because the server
126447
+ * refused with a usage pause (`refusal.usagePause`). No-op, returning false,
126448
+ * for a personal vault or a refusal without a usage pause.
126449
+ */
126450
+ pauseVault(refusal3, now) {
126451
+ if (!canPauseVault(this.data.scope, refusal3))
126452
+ return false;
126453
+ this.data.vaultPausedAt = new Date(now).toISOString();
126454
+ this.data.refusal = refusal3;
126455
+ this.dirty = true;
126456
+ return true;
126457
+ }
126327
126458
  /** Record `paths` as refused at `now`, restarting their pause window. */
126328
126459
  pause(paths, refusal3, now) {
126329
126460
  if (paths.length === 0)
@@ -126334,10 +126465,11 @@ var PlanLimitPauseStore = class _PlanLimitPauseStore {
126334
126465
  this.data.refusal = refusal3;
126335
126466
  this.dirty = true;
126336
126467
  }
126337
- /** Drop every pause: the plan state changed. */
126468
+ /** Drop every pause, the whole-vault one included: the plan state changed. */
126338
126469
  clear() {
126339
- if (this.size === 0 && this.data.refusal === void 0)
126470
+ if (this.size === 0 && this.data.refusal === void 0 && this.data.vaultPausedAt === void 0) {
126340
126471
  return;
126472
+ }
126341
126473
  this.data = { version: SCHEMA_VERSION, scope: this.data.scope, paths: {} };
126342
126474
  this.dirty = true;
126343
126475
  }
@@ -126353,11 +126485,15 @@ var PlanLimitPauseStore = class _PlanLimitPauseStore {
126353
126485
  this.dirty = true;
126354
126486
  }
126355
126487
  }
126488
+ if (this.data.vaultPausedAt !== void 0 && this.vaultPausedUntil(now) === void 0) {
126489
+ delete this.data.vaultPausedAt;
126490
+ this.dirty = true;
126491
+ }
126356
126492
  if (!this.dirty || this.file === null)
126357
126493
  return;
126358
126494
  this.dirty = false;
126359
126495
  try {
126360
- if (this.size === 0) {
126496
+ if (this.size === 0 && this.data.vaultPausedAt === void 0) {
126361
126497
  fs32.rmSync(this.file, { force: true });
126362
126498
  return;
126363
126499
  }
@@ -126371,13 +126507,13 @@ var PlanLimitPauseStore = class _PlanLimitPauseStore {
126371
126507
  }
126372
126508
  };
126373
126509
 
126374
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/telemetry.js
126510
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/telemetry.js
126375
126511
  import { createHash as createHash21 } from "node:crypto";
126376
126512
  import { promises as fs36 } from "node:fs";
126377
126513
  import * as os9 from "node:os";
126378
126514
  import * as path31 from "node:path";
126379
126515
 
126380
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/telemetry-scan-cap.js
126516
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/telemetry-scan-cap.js
126381
126517
  import { promises as fs33 } from "node:fs";
126382
126518
  async function hasUnreadBytes(filePath, stored) {
126383
126519
  let stat5;
@@ -126395,7 +126531,7 @@ async function hasUnreadBytes(filePath, stored) {
126395
126531
  return stat5.size > offset;
126396
126532
  }
126397
126533
 
126398
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/company-resolver.js
126534
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/company-resolver.js
126399
126535
  import { promises as fs34 } from "node:fs";
126400
126536
  import * as path29 from "node:path";
126401
126537
 
@@ -129023,7 +129159,7 @@ var jsYaml = {
129023
129159
  safeDump
129024
129160
  };
129025
129161
 
129026
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/company-resolver.js
129162
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/company-resolver.js
129027
129163
  function logSwallowed6(line) {
129028
129164
  process.stderr.write(line);
129029
129165
  }
@@ -129234,7 +129370,7 @@ function resolveCompanyForCwd(cwd, map9) {
129234
129370
  return collapsed !== c5 ? match(collapsed) : void 0;
129235
129371
  }
129236
129372
 
129237
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/usage-company-fallback.js
129373
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/usage-company-fallback.js
129238
129374
  import { promises as fs35 } from "node:fs";
129239
129375
  import * as path30 from "node:path";
129240
129376
  var TRUSTED_META_SOURCES = /* @__PURE__ */ new Set(["session"]);
@@ -129681,7 +129817,7 @@ function createUsageCompanyFallback(options) {
129681
129817
  };
129682
129818
  }
129683
129819
 
129684
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/telemetry.js
129820
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/telemetry.js
129685
129821
  function emptyCursor() {
129686
129822
  return { version: "1", files: {} };
129687
129823
  }
@@ -129779,7 +129915,7 @@ function extractServices(message) {
129779
129915
  const content = message.content;
129780
129916
  if (!Array.isArray(content))
129781
129917
  return void 0;
129782
- const counts = /* @__PURE__ */ Object.create(null);
129918
+ const counts2 = /* @__PURE__ */ Object.create(null);
129783
129919
  for (const blk of content) {
129784
129920
  if (!blk || typeof blk !== "object" || Array.isArray(blk))
129785
129921
  continue;
@@ -129789,9 +129925,9 @@ function extractServices(message) {
129789
129925
  const server = mcpServerName(b5.name);
129790
129926
  if (!server)
129791
129927
  continue;
129792
- counts[server] = (counts[server] ?? 0) + 1;
129928
+ counts2[server] = (counts2[server] ?? 0) + 1;
129793
129929
  }
129794
- return Object.keys(counts).length > 0 ? counts : void 0;
129930
+ return Object.keys(counts2).length > 0 ? counts2 : void 0;
129795
129931
  }
129796
129932
  function sanitizeRow(row, companyUid) {
129797
129933
  if (!row || typeof row !== "object" || Array.isArray(row))
@@ -130571,7 +130707,7 @@ async function collectAndSendTelemetry(opts) {
130571
130707
  };
130572
130708
  }
130573
130709
 
130574
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/skill-telemetry.js
130710
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/skill-telemetry.js
130575
130711
  import { createHash as createHash22 } from "node:crypto";
130576
130712
  import { promises as fs37 } from "node:fs";
130577
130713
  import * as os10 from "node:os";
@@ -131375,12 +131511,242 @@ async function collectAndSendSkillTelemetry(opts) {
131375
131511
  };
131376
131512
  }
131377
131513
 
131378
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
131514
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
131379
131515
  import * as fs48 from "fs";
131380
- import * as os14 from "os";
131516
+ import * as os15 from "os";
131381
131517
  import * as path43 from "path";
131382
131518
 
131383
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/symlink-target-refusal-flag.js
131519
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-pass-event.js
131520
+ import { createHash as createHash23 } from "node:crypto";
131521
+ import * as os11 from "node:os";
131522
+ var SYNC_PASS_EVENT_NAME = "sync_pass";
131523
+ var SYNC_PASS_EVENT_SOURCE = "sync-runner-watch-loop";
131524
+ function syncPassStatus(outcome) {
131525
+ const exitCode = typeof outcome === "number" ? outcome : outcome.exitCode;
131526
+ if (exitCode !== 0)
131527
+ return "failed";
131528
+ if (typeof outcome !== "number" && outcome.result?.partial)
131529
+ return "partial";
131530
+ return "completed";
131531
+ }
131532
+ var IDLE_SYNC_PASS_FLUSH_MS = 6 * 60 * 60 * 1e3;
131533
+ var defaultIdentityReaders = {
131534
+ hostname: () => os11.hostname(),
131535
+ username: () => os11.userInfo().username
131536
+ };
131537
+ function readOrFallback(read, fallback4) {
131538
+ try {
131539
+ const value = read();
131540
+ return value.length > 0 ? value : fallback4();
131541
+ } catch {
131542
+ return fallback4();
131543
+ }
131544
+ }
131545
+ function resolveSyncDeviceId(readers) {
131546
+ const hostname4 = readOrFallback(readers.hostname, () => "unknown-host");
131547
+ const username = readOrFallback(readers.username, () => process.getuid ? `uid:${process.getuid()}` : "unknown-user");
131548
+ return createHash23("sha256").update(`${hostname4}\0${username}`).digest("hex").slice(0, 16);
131549
+ }
131550
+ var processDeviceId;
131551
+ function syncDeviceId(hostname4, username) {
131552
+ if (hostname4 !== void 0 || username !== void 0) {
131553
+ return resolveSyncDeviceId({
131554
+ hostname: () => hostname4 ?? defaultIdentityReaders.hostname(),
131555
+ username: () => username ?? defaultIdentityReaders.username()
131556
+ });
131557
+ }
131558
+ processDeviceId ??= resolveSyncDeviceId(defaultIdentityReaders);
131559
+ return processDeviceId;
131560
+ }
131561
+ function isIdleSyncPass(event) {
131562
+ const properties = event.properties ?? {};
131563
+ return properties.status === "completed" && properties.requestCount === 0 && properties.uploadedCount === 0 && properties.downloadedCount === 0 && properties.deletedCount === 0 && properties.conflictCount === 0;
131564
+ }
131565
+ function startSyncPassObservation(context, deps = {}) {
131566
+ const now = deps.now ?? Date.now;
131567
+ const memoryUsage = deps.memoryUsage ?? (() => process.memoryUsage());
131568
+ const requestCounts = deps.requestCounts ?? snapshotSyncRequestCounts;
131569
+ const deviceId = deps.deviceId ?? syncDeviceId();
131570
+ const startedAt = now();
131571
+ const requestsAtStart = requestCounts();
131572
+ const build2 = (status, exitCode, result, errorKind) => {
131573
+ const requests = syncRequestCountsSince(requestsAtStart, requestCounts());
131574
+ const memory = memoryUsage();
131575
+ return {
131576
+ eventName: SYNC_PASS_EVENT_NAME,
131577
+ source: SYNC_PASS_EVENT_SOURCE,
131578
+ properties: {
131579
+ status,
131580
+ exitCode,
131581
+ durationMs: Math.max(0, now() - startedAt),
131582
+ lane: context.lane,
131583
+ workClass: context.workClass,
131584
+ uploadedCount: result?.uploadedPaths?.length ?? 0,
131585
+ downloadedCount: result?.appliedUpserts?.length ?? 0,
131586
+ deletedCount: result?.appliedDeletes?.length ?? 0,
131587
+ conflictCount: result?.conflictCount ?? 0,
131588
+ requestCount: totalSyncRequests(requests),
131589
+ vaultRequestCount: requests.vault,
131590
+ listRequestCount: requests.list,
131591
+ objectRequestCount: requests.object,
131592
+ rssBytes: memory.rss,
131593
+ heapUsedBytes: memory.heapUsed,
131594
+ deviceId,
131595
+ appVersion: deps.version,
131596
+ errorKind
131597
+ }
131598
+ };
131599
+ };
131600
+ return {
131601
+ finish(outcome) {
131602
+ const exitCode = typeof outcome === "number" ? outcome : outcome.exitCode;
131603
+ const result = typeof outcome === "number" ? void 0 : outcome.result;
131604
+ return build2(syncPassStatus(outcome), exitCode, result);
131605
+ },
131606
+ fail() {
131607
+ return build2("failed", 1, void 0, "thrown");
131608
+ }
131609
+ };
131610
+ }
131611
+
131612
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-object-events.js
131613
+ import { createHash as createHash24 } from "node:crypto";
131614
+ var SYNC_CONFLICT_EVENT_NAME = "sync_conflict";
131615
+ var SYNC_OVERWRITE_EVENT_NAME = "sync_overwrite";
131616
+ var SYNC_OBJECT_EVENT_SOURCE = "hq-sync";
131617
+ var CONTENT_SHA256_METADATA_KEY = "hq-content-sha256";
131618
+ function syncKeyDigest(key) {
131619
+ return createHash24("sha256").update(key, "utf8").digest("hex");
131620
+ }
131621
+ function telemetryVersionId(versionId) {
131622
+ if (!versionId)
131623
+ return null;
131624
+ return versionId.replaceAll("+", "-").replaceAll("/", "_");
131625
+ }
131626
+ function overwriteBaseMatch(baseSha256, previousSha256) {
131627
+ if (!baseSha256 || !previousSha256)
131628
+ return "unknown";
131629
+ return baseSha256 === previousSha256 ? "match" : "mismatch";
131630
+ }
131631
+ function buildSyncConflictEvent(input2, context) {
131632
+ return {
131633
+ eventName: SYNC_CONFLICT_EVENT_NAME,
131634
+ source: SYNC_OBJECT_EVENT_SOURCE,
131635
+ ...context.companyUid ? { companyUid: context.companyUid } : {},
131636
+ properties: {
131637
+ leg: input2.leg,
131638
+ keyDigest: syncKeyDigest(input2.key),
131639
+ baseSha256: input2.baseSha256 ?? null,
131640
+ localSha256: input2.localSha256 ?? null,
131641
+ remoteSha256: input2.remoteSha256 ?? null,
131642
+ remoteEtag: input2.remoteEtag || null,
131643
+ winner: input2.winner,
131644
+ reason: input2.reason,
131645
+ loserVersionId: input2.winner === "local" ? telemetryVersionId(input2.remoteVersionId) : null,
131646
+ conflictCopy: input2.conflictCopyCreated ? "created" : "none",
131647
+ deviceId: context.deviceId,
131648
+ callerSub: context.callerSub
131649
+ }
131650
+ };
131651
+ }
131652
+ function buildSyncOverwriteEvent(input2, context) {
131653
+ const previousSha256 = input2.previousMetadata?.[CONTENT_SHA256_METADATA_KEY] ?? null;
131654
+ return {
131655
+ eventName: SYNC_OVERWRITE_EVENT_NAME,
131656
+ source: SYNC_OBJECT_EVENT_SOURCE,
131657
+ ...context.companyUid ? { companyUid: context.companyUid } : {},
131658
+ properties: {
131659
+ keyDigest: syncKeyDigest(input2.key),
131660
+ previousVersionId: telemetryVersionId(input2.previousVersionId),
131661
+ previousSha256,
131662
+ previousEtag: input2.previousEtag || null,
131663
+ newSha256: input2.newSha256,
131664
+ newVersionId: telemetryVersionId(input2.newVersionId),
131665
+ baseSha256: input2.baseSha256 ?? null,
131666
+ baseEtag: input2.baseEtag ?? null,
131667
+ baseMatch: overwriteBaseMatch(input2.baseSha256, previousSha256),
131668
+ fence: input2.fence,
131669
+ deviceId: context.deviceId,
131670
+ callerSub: context.callerSub
131671
+ }
131672
+ };
131673
+ }
131674
+ var SYNC_OBJECT_EVENTS_DROPPED_EVENT_NAME = "sync_object_events_dropped";
131675
+ var SYNC_OBJECT_EVENT_BATCH_SIZE = 50;
131676
+ var SYNC_OBJECT_EVENT_RUN_LIMIT = 500;
131677
+ function isLostUpdateOverwrite(input2) {
131678
+ const previousSha256 = input2.previousMetadata?.[CONTENT_SHA256_METADATA_KEY] ?? null;
131679
+ return input2.fence === "none" || overwriteBaseMatch(input2.baseSha256, previousSha256) !== "match";
131680
+ }
131681
+ function createSyncObjectEventSink(deps) {
131682
+ const runLimit = deps.runLimit ?? SYNC_OBJECT_EVENT_RUN_LIMIT;
131683
+ const log = deps.log ?? ((message) => process.stderr.write(`hq-sync: ${message}
131684
+ `));
131685
+ let buffered = [];
131686
+ let accepted = 0;
131687
+ let dropped = 0;
131688
+ let droppedReported = 0;
131689
+ let sending = Promise.resolve();
131690
+ const enqueue = (event) => {
131691
+ if (!deps.client?.postTelemetryEvents)
131692
+ return;
131693
+ if (accepted >= runLimit) {
131694
+ dropped += 1;
131695
+ return;
131696
+ }
131697
+ accepted += 1;
131698
+ buffered.push(event);
131699
+ };
131700
+ const droppedSummary = () => {
131701
+ if (dropped === droppedReported)
131702
+ return void 0;
131703
+ const count = dropped - droppedReported;
131704
+ droppedReported = dropped;
131705
+ return {
131706
+ eventName: SYNC_OBJECT_EVENTS_DROPPED_EVENT_NAME,
131707
+ source: SYNC_OBJECT_EVENT_SOURCE,
131708
+ ...deps.context.companyUid ? { companyUid: deps.context.companyUid } : {},
131709
+ properties: {
131710
+ droppedCount: count,
131711
+ runLimit,
131712
+ deviceId: deps.context.deviceId,
131713
+ callerSub: deps.context.callerSub
131714
+ }
131715
+ };
131716
+ };
131717
+ const sendBatches = async (events) => {
131718
+ for (let i6 = 0; i6 < events.length; i6 += SYNC_OBJECT_EVENT_BATCH_SIZE) {
131719
+ try {
131720
+ await emitCloudTelemetry(deps.client, events.slice(i6, i6 + SYNC_OBJECT_EVENT_BATCH_SIZE), { claims: deps.claims, log });
131721
+ } catch (err) {
131722
+ log(`sync object events flush failed (${err instanceof Error ? err.name : "error"})`);
131723
+ }
131724
+ }
131725
+ };
131726
+ return {
131727
+ conflict(input2) {
131728
+ enqueue(buildSyncConflictEvent(input2, deps.context));
131729
+ },
131730
+ overwrite(input2) {
131731
+ if (!isLostUpdateOverwrite(input2))
131732
+ return;
131733
+ enqueue(buildSyncOverwriteEvent(input2, deps.context));
131734
+ },
131735
+ flush() {
131736
+ const summary = droppedSummary();
131737
+ const events = summary ? [...buffered, summary] : buffered;
131738
+ buffered = [];
131739
+ if (events.length > 0)
131740
+ sending = sending.then(() => sendBatches(events));
131741
+ return sending;
131742
+ },
131743
+ droppedCount() {
131744
+ return dropped;
131745
+ }
131746
+ };
131747
+ }
131748
+
131749
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/symlink-target-refusal-flag.js
131384
131750
  init_dist();
131385
131751
  var SYMLINK_TARGET_REFUSAL_FLAG = "sync.symlink-target-refusal";
131386
131752
  var FLAG_READ_TIMEOUT_MS = 2e3;
@@ -131429,7 +131795,7 @@ async function resolveSymlinkTargetRefusalFlag(input2) {
131429
131795
  }
131430
131796
  }
131431
131797
 
131432
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/company-vault-transport.js
131798
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/company-vault-transport.js
131433
131799
  function selectObjectIOFactory(client, refresherFor, forceRefresherFor) {
131434
131800
  if (typeof client.presign === "function" && typeof client.listFiles === "function") {
131435
131801
  return presignObjectIOFactory(client, refresherFor, forceRefresherFor);
@@ -131447,7 +131813,7 @@ function ensureCompanyVaultTransport(vaultConfig, deps = {}) {
131447
131813
  vaultConfig.companyVaultUsesPresign = objectIOFactory !== null;
131448
131814
  }
131449
131815
 
131450
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync-decision-log.js
131816
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-decision-log.js
131451
131817
  import * as fs38 from "node:fs";
131452
131818
  import * as path33 from "node:path";
131453
131819
  import { randomUUID as randomUUID4 } from "node:crypto";
@@ -131492,10 +131858,10 @@ function appendSyncDecision(input2, options = {}) {
131492
131858
  }
131493
131859
  }
131494
131860
 
131495
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
131861
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
131496
131862
  import * as crypto14 from "crypto";
131497
131863
 
131498
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/private-folder-transport.js
131864
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/private-folder-transport.js
131499
131865
  import * as fs39 from "fs";
131500
131866
  import * as path34 from "path";
131501
131867
  var CONTENT_SHA256_RE2 = /^[a-f0-9]{64}$/;
@@ -131587,7 +131953,7 @@ async function primePrivateFolderUpload(input2) {
131587
131953
  }]);
131588
131954
  }
131589
131955
 
131590
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/full-pass-caps.js
131956
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/full-pass-caps.js
131591
131957
  var FULL_PASS_CPU_CAP_FLAG = "sync.full-pass.cpu-cap-pct";
131592
131958
  var FULL_PASS_HEAP_CAP_FLAG = "sync.full-pass.heap-cap-mb";
131593
131959
  var FULL_PASS_DURABLE_PROGRESS_FLAG = "sync.full-pass-durable-progress";
@@ -132164,7 +132530,7 @@ var FullPassCapController = class {
132164
132530
  }
132165
132531
  };
132166
132532
 
132167
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/conflict.js
132533
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/conflict.js
132168
132534
  import * as readline from "readline";
132169
132535
  function parseFrontmatterVersion(body) {
132170
132536
  if (!body || body.length === 0)
@@ -132292,7 +132658,7 @@ async function promptConflict(conflict) {
132292
132658
  }
132293
132659
  }
132294
132660
 
132295
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/reconcile-skip-reason.js
132661
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/reconcile-skip-reason.js
132296
132662
  var HUMAN_UP_TO_DATE_LINE_CAP = 20;
132297
132663
  function isUpToDateSkipReason(reason) {
132298
132664
  return reason === "already_up_to_date" || reason === "already_landed";
@@ -132350,10 +132716,10 @@ function createHumanSkipLineLog() {
132350
132716
  };
132351
132717
  }
132352
132718
 
132353
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/tombstones.js
132719
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/tombstones.js
132354
132720
  import * as crypto11 from "node:crypto";
132355
132721
  import * as fs40 from "node:fs";
132356
- import * as os11 from "node:os";
132722
+ import * as os12 from "node:os";
132357
132723
  import * as path35 from "node:path";
132358
132724
  var FETCH_TOMBSTONES_TIMEOUT_MS = 6e4;
132359
132725
  var FETCH_TOMBSTONES_BODY_IDLE_TIMEOUT_MS = 6e4;
@@ -132415,7 +132781,7 @@ function tombstoneScopeKey(base, scope, token) {
132415
132781
  }
132416
132782
  function tombstoneCheckpointPath(scopeKey) {
132417
132783
  const digest3 = crypto11.createHash("sha256").update(scopeKey).digest("hex").slice(0, 24);
132418
- const stateDir5 = process.env.HQ_STATE_DIR || path35.join(os11.homedir(), ".hq");
132784
+ const stateDir5 = process.env.HQ_STATE_DIR || path35.join(os12.homedir(), ".hq");
132419
132785
  return path35.join(stateDir5, `${TOMBSTONE_CHECKPOINT_PREFIX}${digest3}.json`);
132420
132786
  }
132421
132787
  function isCheckpoint(value) {
@@ -132744,10 +133110,10 @@ async function fetchTombstonePage(url2, token) {
132744
133110
  throw new TombstoneFetchError(`FILE_TOMBSTONE fetch failed after ${attemptsMade} attempts; refusing to sync without delete suppression`, attemptsMade, lastError);
132745
133111
  }
132746
133112
 
132747
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync-core.js
133113
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync-core.js
132748
133114
  import { execSync } from "child_process";
132749
133115
  import * as fs41 from "fs";
132750
- import * as os12 from "os";
133116
+ import * as os13 from "os";
132751
133117
  import * as path36 from "path";
132752
133118
  function logSwallowed7(line) {
132753
133119
  process.stderr.write(line);
@@ -132772,7 +133138,7 @@ var MIN_AVAILABLE_MEM_FRACTION = 0.25;
132772
133138
  var UPLOAD_BYTE_BUDGET_CAP = 1024 * 1024 * 1024;
132773
133139
  var UPLOAD_BYTE_BUDGET_AVAIL_FRACTION = 0.25;
132774
133140
  function readAvailableMemoryFraction() {
132775
- const total = os12.totalmem();
133141
+ const total = os13.totalmem();
132776
133142
  if (total <= 0)
132777
133143
  return 1;
132778
133144
  try {
@@ -132781,7 +133147,7 @@ function readAvailableMemoryFraction() {
132781
133147
  const m3 = meminfo.match(/^MemAvailable:\s+(\d+)\s*kB/m);
132782
133148
  if (m3)
132783
133149
  return Math.min(1, Number(m3[1]) * 1024 / total);
132784
- return os12.freemem() / total;
133150
+ return os13.freemem() / total;
132785
133151
  }
132786
133152
  if (process.platform === "darwin") {
132787
133153
  const out = execSync("vm_stat", { encoding: "utf8", timeout: 2e3 });
@@ -132789,16 +133155,16 @@ function readAvailableMemoryFraction() {
132789
133155
  const pagesOf = (label) => Number(out.match(new RegExp(`${label}:\\s+(\\d+)\\.`))?.[1] ?? 0);
132790
133156
  const availablePages = pagesOf("Pages free") + pagesOf("Pages inactive") + pagesOf("Pages speculative") + pagesOf("Pages purgeable");
132791
133157
  const avail = availablePages * pageSize;
132792
- return avail > 0 ? Math.min(1, avail / total) : os12.freemem() / total;
133158
+ return avail > 0 ? Math.min(1, avail / total) : os13.freemem() / total;
132793
133159
  }
132794
- return os12.freemem() / total;
133160
+ return os13.freemem() / total;
132795
133161
  } catch {
132796
133162
  return 1;
132797
133163
  }
132798
133164
  }
132799
133165
  function readHostLoad() {
132800
- const cores = os12.cpus()?.length ?? 0;
132801
- const load1 = os12.loadavg()?.[0] ?? 0;
133166
+ const cores = os13.cpus()?.length ?? 0;
133167
+ const load1 = os13.loadavg()?.[0] ?? 0;
132802
133168
  return { cores, load1, availableMemFraction: readAvailableMemoryFraction() };
132803
133169
  }
132804
133170
  function machineAlreadyBusy(probe) {
@@ -132854,7 +133220,7 @@ var TransferSemaphore = class {
132854
133220
  }
132855
133221
  }
132856
133222
  };
132857
- function resolveUploadByteBudget(availableMemFraction = readAvailableMemoryFraction(), totalMemBytes = os12.totalmem()) {
133223
+ function resolveUploadByteBudget(availableMemFraction = readAvailableMemoryFraction(), totalMemBytes = os13.totalmem()) {
132858
133224
  const raw = process.env.HQ_SYNC_UPLOAD_BYTE_BUDGET_MB;
132859
133225
  if (raw !== void 0 && raw !== "") {
132860
133226
  const parsed = Number.parseFloat(raw);
@@ -132891,17 +133257,17 @@ function hasRemoteChanged(remote, entry) {
132891
133257
  return remote.lastModified.getTime() > syncedAt;
132892
133258
  }
132893
133259
 
132894
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-file.js
133260
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-file.js
132895
133261
  import * as crypto12 from "crypto";
132896
133262
  import * as path38 from "path";
132897
133263
 
132898
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/machine-id.js
132899
- import { createHash as createHash24, randomUUID as randomUUID6 } from "node:crypto";
133264
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/machine-id.js
133265
+ import { createHash as createHash26, randomUUID as randomUUID6 } from "node:crypto";
132900
133266
  import * as fs42 from "node:fs";
132901
- import * as os13 from "node:os";
133267
+ import * as os14 from "node:os";
132902
133268
  import * as path37 from "node:path";
132903
133269
  function menubarJsonPath() {
132904
- return path37.join(os13.homedir(), ".hq", "menubar.json");
133270
+ return path37.join(os14.homedir(), ".hq", "menubar.json");
132905
133271
  }
132906
133272
  function hqRootMachineIdPath(hqRoot) {
132907
133273
  return path37.join(hqRoot, ".hq", "machine-id");
@@ -133012,10 +133378,10 @@ function readShortMachineId(hqRoot) {
133012
133378
  const head = full.slice(0, 6);
133013
133379
  if (/^[a-f0-9]{6}$/.test(head))
133014
133380
  return head;
133015
- return createHash24("sha1").update(full).digest("hex").slice(0, 6);
133381
+ return createHash26("sha1").update(full).digest("hex").slice(0, 6);
133016
133382
  }
133017
133383
 
133018
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-file.js
133384
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-file.js
133019
133385
  var CONFLICT_BACKUPS_DIR = ".hq/conflict-backups";
133020
133386
  var CONFLICT_PROBE_DIR = ".hq/tmp";
133021
133387
  function safeTimestamp(detectedAt) {
@@ -133033,7 +133399,7 @@ function buildConflictId(originalRelative, detectedAt) {
133033
133399
  return `${safePath}-${safeTimestamp(detectedAt)}`;
133034
133400
  }
133035
133401
 
133036
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-index.js
133402
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-index.js
133037
133403
  import * as crypto13 from "crypto";
133038
133404
  import * as fs43 from "fs";
133039
133405
  import * as path39 from "path";
@@ -133187,7 +133553,7 @@ function pruneConflictIndex(hqRoot) {
133187
133553
  return result;
133188
133554
  }
133189
133555
 
133190
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/append-only-merge.js
133556
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/append-only-merge.js
133191
133557
  import * as fs44 from "node:fs";
133192
133558
  function isAppendOnlyPath(relativePath) {
133193
133559
  const base = relativePath.split(/[\\/]/).pop() ?? "";
@@ -133259,7 +133625,7 @@ function appendIfUnchanged(file2, expected, merged) {
133259
133625
  return "appended";
133260
133626
  }
133261
133627
 
133262
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/board-merge.js
133628
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/board-merge.js
133263
133629
  import * as fs45 from "node:fs";
133264
133630
  import * as path40 from "node:path";
133265
133631
  function isBoardJsonPath(relativePath) {
@@ -133405,7 +133771,7 @@ function replaceIfUnchanged(file2, expected, merged) {
133405
133771
  return "appended";
133406
133772
  }
133407
133773
 
133408
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/same-path-upload-lock.js
133774
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/same-path-upload-lock.js
133409
133775
  var SAME_PATH_UPLOAD_WAIT_MS = 6e4;
133410
133776
  var SAME_PATH_LANDED_KEY_CAP = 4096;
133411
133777
  var SAME_PATH_LANDED_PER_KEY_CAP = 8;
@@ -133595,9 +133961,9 @@ var SamePathUploadSupersededError = class extends Error {
133595
133961
  }
133596
133962
  };
133597
133963
 
133598
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-entity-push.js
133964
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-entity-push.js
133599
133965
  init_dist();
133600
- import { createHash as createHash25 } from "node:crypto";
133966
+ import { createHash as createHash27 } from "node:crypto";
133601
133967
  var ONTOLOGY_ENTITY_PUSH_FLAG = "checkpoint.ontology";
133602
133968
  var ONTOLOGY_MULTI_WRITER_FLAG = "checkpoint.ontology.multi-writer";
133603
133969
  var FLAG_READ_TIMEOUT_MS2 = 5e3;
@@ -133638,7 +134004,7 @@ async function resolveOntologyEntityPush(input2) {
133638
134004
  return false;
133639
134005
  }
133640
134006
  const now = input2.now ?? Date.now;
133641
- const caller = createHash25("sha256").update(token).digest("hex").slice(0, 32);
134007
+ const caller = createHash27("sha256").update(token).digest("hex").slice(0, 32);
133642
134008
  const cacheKey = `${flag}
133643
134009
  ${endpoint}
133644
134010
  ${input2.companyUid}
@@ -133676,7 +134042,7 @@ ${caller}`;
133676
134042
  return failed ? false : value;
133677
134043
  }
133678
134044
 
133679
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-outbox.js
134045
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-outbox.js
133680
134046
  import fs46 from "node:fs";
133681
134047
  import path41 from "node:path";
133682
134048
  var ONTOLOGY_OUTBOX_SCHEMA = "hq-ontology-outbox.v1";
@@ -133742,9 +134108,9 @@ function entityIsFreshForCreate(body, nowMs) {
133742
134108
  return age >= -ENTITY_CREATE_FUTURE_SKEW_MS && age <= ENTITY_CREATE_WINDOW_MS;
133743
134109
  }
133744
134110
 
133745
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/skill-register-landed-bytes.js
134111
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/skill-register-landed-bytes.js
133746
134112
  init_dist();
133747
- import { createHash as createHash26 } from "node:crypto";
134113
+ import { createHash as createHash28 } from "node:crypto";
133748
134114
  var SKILL_REGISTER_LANDED_BYTES_FLAG = "sync.skill-register-landed-bytes";
133749
134115
  var FLAG_READ_TIMEOUT_MS3 = 5e3;
133750
134116
  var FLAG_CACHE_TTL_MS2 = 5 * 6e4;
@@ -133778,7 +134144,7 @@ async function resolveSkillRegisterLandedBytes(input2) {
133778
134144
  return false;
133779
134145
  }
133780
134146
  const now = input2.now ?? Date.now;
133781
- const caller = createHash26("sha256").update(token).digest("hex").slice(0, 32);
134147
+ const caller = createHash28("sha256").update(token).digest("hex").slice(0, 32);
133782
134148
  const cacheKey = `${endpoint}
133783
134149
  ${input2.companyUid}
133784
134150
  ${input2.companySlug ?? ""}
@@ -133816,9 +134182,9 @@ ${caller}`;
133816
134182
  return failed ? false : value;
133817
134183
  }
133818
134184
 
133819
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/personal-connector-settings-sync.js
134185
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/personal-connector-settings-sync.js
133820
134186
  init_dist();
133821
- import { createHash as createHash27 } from "node:crypto";
134187
+ import { createHash as createHash29 } from "node:crypto";
133822
134188
  var PERSONAL_CONNECTOR_SETTINGS_SYNC_FLAG = "personal.connector-settings-sync";
133823
134189
  var FLAG_READ_TIMEOUT_MS4 = 5e3;
133824
134190
  var FLAG_CACHE_TTL_MS3 = 5 * 6e4;
@@ -133839,7 +134205,7 @@ async function resolvePersonalConnectorSettingsSync(input2) {
133839
134205
  return false;
133840
134206
  }
133841
134207
  const now = input2.now ?? Date.now;
133842
- const caller = createHash27("sha256").update(token).digest("hex").slice(0, 32);
134208
+ const caller = createHash29("sha256").update(token).digest("hex").slice(0, 32);
133843
134209
  const cacheKey = `${PERSONAL_CONNECTOR_SETTINGS_SYNC_FLAG}
133844
134210
  ${endpoint}
133845
134211
  ${caller}`;
@@ -133879,7 +134245,7 @@ ${caller}`;
133879
134245
  return failed ? false : value;
133880
134246
  }
133881
134247
 
133882
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/describe-error.js
134248
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/describe-error.js
133883
134249
  import * as path42 from "node:path";
133884
134250
  var MAX_DIAGNOSTIC_LENGTH = 1024;
133885
134251
  function sanitizeDiagnostic(value) {
@@ -134012,7 +134378,7 @@ function pushFailureTelemetryLabel(value) {
134012
134378
  return safe.slice(0, 128) || "unknown";
134013
134379
  }
134014
134380
 
134015
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/readlink-safe.js
134381
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/readlink-safe.js
134016
134382
  import * as fs47 from "fs";
134017
134383
  function toPortableSymlinkTarget(target, platform5 = process.platform) {
134018
134384
  return platform5 === "win32" ? target.replaceAll("\\", "/") : target;
@@ -134031,16 +134397,16 @@ function readlinkOrNull(linkPath, readlink = (path73) => fs47.readlinkSync(path7
134031
134397
  }
134032
134398
  }
134033
134399
 
134034
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/reconcile-cursor.js
134400
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/reconcile-cursor.js
134035
134401
  function checkpointReconcileApply(checkpoint, paths) {
134036
134402
  if (!checkpoint)
134037
134403
  return;
134038
134404
  checkpoint.store.checkpointApply(checkpoint.cursor, [...new Set(paths)].map((path73) => ({ path: path73, durable: true })));
134039
134405
  }
134040
134406
 
134041
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/mass-delete-guards.js
134407
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/mass-delete-guards.js
134042
134408
  init_dist();
134043
- import { createHash as createHash28 } from "node:crypto";
134409
+ import { createHash as createHash30 } from "node:crypto";
134044
134410
  var MASS_DELETE_GUARDS_FLAG = "sync.delete-absolute-volume-and-release-root-guards";
134045
134411
  var MASS_DELETE_ABSOLUTE_CEILING = 100;
134046
134412
  var MASS_DELETE_SAMPLE_CAP = 10;
@@ -134102,7 +134468,7 @@ async function resolveMassDeleteGuards(input2, dependencies = {}) {
134102
134468
  return false;
134103
134469
  }
134104
134470
  const now = dependencies.now ?? Date.now;
134105
- const tokenHash = createHash28("sha256").update(token).digest("hex");
134471
+ const tokenHash = createHash30("sha256").update(token).digest("hex");
134106
134472
  const cacheKey = `${endpoint}\0${input2.contextUid}\0${tokenHash}`;
134107
134473
  const hit = cache8.get(cacheKey);
134108
134474
  if (hit && hit.expiresAt > now())
@@ -134183,10 +134549,10 @@ function warnFlagReadFailure(write) {
134183
134549
  `)))(line);
134184
134550
  }
134185
134551
 
134186
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
134552
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
134187
134553
  async function remoteContentDiffers(ctx, relativePath, localHash, hqRoot, symlinkOptions) {
134188
134554
  const probeKey = crypto14.createHash("sha256").update(relativePath).digest("hex").slice(0, 16);
134189
- const probePath = path43.join(os14.tmpdir(), `hq-conflict-probe-${readShortMachineId(hqRoot)}-${probeKey}.tmp`);
134555
+ const probePath = path43.join(os15.tmpdir(), `hq-conflict-probe-${readShortMachineId(hqRoot)}-${probeKey}.tmp`);
134190
134556
  try {
134191
134557
  await downloadFile(ctx, relativePath, probePath, symlinkOptions);
134192
134558
  const remoteHash = fs48.lstatSync(probePath).isSymbolicLink() ? hashSymlinkTarget(readlinkPortableSync(probePath)) : hashFile(probePath);
@@ -134826,6 +135192,7 @@ async function shareOnce(options) {
134826
135192
  return await runShareOnce(options, run);
134827
135193
  } finally {
134828
135194
  run.humanSkipLines?.flush();
135195
+ await run.objectEvents.flush();
134829
135196
  }
134830
135197
  }
134831
135198
  async function runShareOnce(options, run) {
@@ -135080,6 +135447,15 @@ async function createPushRunContext(options) {
135080
135447
  propagateDeletes,
135081
135448
  propagateDeletePolicy,
135082
135449
  emit,
135450
+ objectEvents: createSyncObjectEventSink({
135451
+ client: options.telemetryClient ?? (vaultConfig ? new VaultClient(vaultConfig) : null),
135452
+ claims: options.telemetryClaims,
135453
+ context: {
135454
+ companyUid: ctx.uid,
135455
+ deviceId: syncDeviceId(),
135456
+ ...options.author?.userSub ? { callerSub: options.author.userSub } : {}
135457
+ }
135458
+ }),
135083
135459
  humanSkipLines,
135084
135460
  companyRef,
135085
135461
  ctx,
@@ -135408,7 +135784,7 @@ async function reconcileOnePendingCompanySkill(run, entry) {
135408
135784
  if (!journalEntry?.remoteEtag || normalizeEtag(remote.etag) !== normalizeEtag(journalEntry.remoteEtag)) {
135409
135785
  journalRows(run.journal).delete(entry.relativePath);
135410
135786
  flushShareJournal(run);
135411
- const tempDir = fs48.mkdtempSync(path43.join(os14.tmpdir(), "hq-skill-metadata-"));
135787
+ const tempDir = fs48.mkdtempSync(path43.join(os15.tmpdir(), "hq-skill-metadata-"));
135412
135788
  const tempFile = path43.join(tempDir, "SKILL.md");
135413
135789
  try {
135414
135790
  await downloadFile(run.ctx, entry.relativePath, tempFile, {
@@ -135836,7 +136212,8 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
135836
136212
  counters.planLimitedPaths.push(relativePath);
135837
136213
  }
135838
136214
  };
135839
- const planLimitPausedUntil = (item) => honorPlanLimitPauses ? planLimitPauses.pausedUntil(item.relativePath, planLimitPassStartedAt) : void 0;
136215
+ let planLimitVaultPausedInPassUntil;
136216
+ const planLimitPausedUntil = (item) => honorPlanLimitPauses ? planLimitVaultPausedInPassUntil ?? planLimitPauses.pausedUntil(item.relativePath, planLimitPassStartedAt) : void 0;
135840
136217
  const isPlanLimitPaused = (item) => planLimitPausedUntil(item) !== void 0;
135841
136218
  const plannedUploadCandidates = [];
135842
136219
  for (const previewItem of pushPlan.items) {
@@ -135887,6 +136264,9 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
135887
136264
  return false;
135888
136265
  counters.filesSkipped++;
135889
136266
  planLimitRefusal ??= refusal3;
136267
+ if (honorPlanLimitPauses && refusal3.usagePause !== void 0 && run.ctx.uid.startsWith("cmp_") && planLimitVaultPausedInPassUntil === void 0) {
136268
+ planLimitVaultPausedInPassUntil = planLimitPauseNow() + PLAN_LIMIT_PAUSE_RETRY_MS;
136269
+ }
135890
136270
  if (!planLimitRefusedPaths.has(relativePath)) {
135891
136271
  planLimitRefusedPaths.add(relativePath);
135892
136272
  notePlanLimitedPath(relativePath);
@@ -135902,6 +136282,8 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
135902
136282
  const refused = [...planLimitRefusedPaths];
135903
136283
  if (planLimitRefusal && refused.length > 0) {
135904
136284
  planLimitPauses.pause(refused, planLimitRefusal, now);
136285
+ if (planLimitRefusal.usagePause)
136286
+ planLimitPauses.pauseVault(planLimitRefusal, now);
135905
136287
  }
135906
136288
  const pausedSkips = [...planLimitPausedSkips.keys()].filter((p3) => !planLimitRefusedPaths.has(p3));
135907
136289
  const refusal3 = planLimitRefusal ?? storedRefusal;
@@ -135911,6 +136293,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
135911
136293
  for (const p3 of pausedSkips) {
135912
136294
  retryAt = Math.min(retryAt, pausesCleared ? now : planLimitPausedSkips.get(p3));
135913
136295
  }
136296
+ const vaultPaused = refusal3.usagePause !== void 0 && (planLimitPauses.isVaultPaused(now) || planLimitVaultPausedInPassUntil !== void 0);
135914
136297
  run.emit({
135915
136298
  type: "plan-limit",
135916
136299
  ...refusal3,
@@ -135918,7 +136301,8 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
135918
136301
  count: refused.length + pausedSkips.length,
135919
136302
  paths: [...refused, ...pausedSkips].slice(0, PLAN_LIMITED_PATHS_CAP),
135920
136303
  pausedUntil: new Date(retryAt).toISOString(),
135921
- fromPause: refused.length === 0
136304
+ fromPause: refused.length === 0,
136305
+ ...vaultPaused ? { vaultPaused: true } : {}
135922
136306
  });
135923
136307
  }
135924
136308
  planLimitPauses.save(now);
@@ -136265,6 +136649,11 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136265
136649
  }
136266
136650
  const outcome = mergeAppendOnlyPushConflict(run, item, boardProbe, normalizeEtag(remoteMeta.etag), mergeBoardJson, replaceIfUnchanged);
136267
136651
  boardProbe.discard();
136652
+ recordPushMerge(run, item, outcome, {
136653
+ remoteEtag: normalizeEtag(remoteMeta.etag),
136654
+ remoteSha256: boardProbe.remoteContentHash() ?? null,
136655
+ remoteVersionId: remoteMeta.versionId ?? null
136656
+ });
136268
136657
  if (outcome === "publish-local") {
136269
136658
  fenceOnObservedRemote = true;
136270
136659
  } else if (outcome !== "not-mergeable") {
@@ -136303,6 +136692,11 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136303
136692
  let appendOnlyPublish = false;
136304
136693
  if (versionAware && decision && winnerProbe && item.kind === "file" && (isAppendOnlyPath(relativePath) || isBoardJsonPath(relativePath))) {
136305
136694
  const outcome = isBoardJsonPath(relativePath) ? mergeAppendOnlyPushConflict(run, item, winnerProbe, normalizeEtag(remoteMeta.etag), mergeBoardJson, replaceIfUnchanged) : mergeAppendOnlyPushConflict(run, item, winnerProbe, normalizeEtag(remoteMeta.etag));
136695
+ recordPushMerge(run, item, outcome, {
136696
+ remoteEtag: normalizeEtag(remoteMeta.etag),
136697
+ remoteSha256: winnerProbe.remoteContentHash() ?? null,
136698
+ remoteVersionId: remoteMeta.versionId ?? null
136699
+ });
136306
136700
  if (outcome !== "not-mergeable") {
136307
136701
  const conflictIndex = conflictPaths.lastIndexOf(relativePath);
136308
136702
  if (conflictIndex >= 0)
@@ -136352,7 +136746,9 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136352
136746
  conflictPath,
136353
136747
  remoteHash: normalizeEtag(remoteMeta.etag),
136354
136748
  preserved: "remote",
136355
- decision
136749
+ decision,
136750
+ remoteSha256: winnerProbe?.remoteContentHash() ?? null,
136751
+ remoteVersionId: remoteMeta.versionId ?? null
136356
136752
  });
136357
136753
  recordPushConflictNotice(run, item, conflictPath, "local", decision, remoteChangedSinceJournal, normalizeEtag(remoteMeta.etag));
136358
136754
  const journalEntry2 = journalRows(run.journal).get(relativePath);
@@ -136397,7 +136793,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136397
136793
  return;
136398
136794
  }
136399
136795
  const precondition = remoteMeta ? fenceOnObservedRemote ? { ifMatch: normalizeEtag(remoteMeta.etag) } : journalEntry?.remoteEtag ? { ifMatch: journalEntry.remoteEtag } : { ifMatch: remoteMeta.etag } : { ifNoneMatch: "*" };
136400
- const performUpload = async (pc) => {
136796
+ const performUpload = async (pc, observedRemote = remoteMeta) => {
136401
136797
  const isSymlinkUpload = item.kind === "symlink";
136402
136798
  const lstat3 = fs48.lstatSync(absolutePath);
136403
136799
  const size = isSymlinkUpload ? 0 : lstat3.size;
@@ -136514,8 +136910,22 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136514
136910
  } else {
136515
136911
  transfer = { value: await sendAndRecordLanded(), realtimeRan: false, complete: () => void 0 };
136516
136912
  }
136517
- const { etag, alreadyCurrent } = transfer.value;
136913
+ const { etag, alreadyCurrent, versionId } = transfer.value;
136518
136914
  uploadCompleted = true;
136915
+ const previous = observedRemote === "unknown" ? null : observedRemote;
136916
+ if (!alreadyCurrent && (previous || pc === void 0)) {
136917
+ run.objectEvents.overwrite({
136918
+ key: relativePath,
136919
+ previousVersionId: previous?.versionId ?? null,
136920
+ previousMetadata: previous?.metadata,
136921
+ previousEtag: previous ? normalizeEtag(previous.etag) : null,
136922
+ newSha256: localHash,
136923
+ newVersionId: versionId ?? null,
136924
+ baseSha256: rowBeforePut?.hash ?? null,
136925
+ baseEtag: rowBeforePut?.remoteEtag ? normalizeEtag(rowBeforePut.remoteEtag) : null,
136926
+ fence: pc?.ifMatch ? "if-match" : pc?.ifNoneMatch ? "if-none-match" : "none"
136927
+ });
136928
+ }
136519
136929
  if (alreadyCurrent) {
136520
136930
  counters.filesSkipped++;
136521
136931
  } else {
@@ -136683,7 +137093,9 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136683
137093
  conflictPath,
136684
137094
  remoteHash: normalizeEtag(latest.etag),
136685
137095
  preserved: "remote",
136686
- decision
137096
+ decision,
137097
+ remoteSha256: probe.remoteContentHash() ?? null,
137098
+ remoteVersionId: latest.versionId ?? null
136687
137099
  });
136688
137100
  recordPushConflictNotice(run, item, conflictPath, "local", decision, true, normalizeEtag(latest.etag));
136689
137101
  const journalEntry2 = journalRows(run.journal).get(relativePath);
@@ -136703,7 +137115,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136703
137115
  });
136704
137116
  probe.discard();
136705
137117
  try {
136706
- await performUpload({ ifMatch: normalizeEtag(latest.etag) });
137118
+ await performUpload({ ifMatch: normalizeEtag(latest.etag) }, latest);
136707
137119
  } catch (retryErr) {
136708
137120
  if (retryErr instanceof SamePathUploadSupersededError) {
136709
137121
  await restartAfterSupersede();
@@ -136749,7 +137161,9 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136749
137161
  conflictPath,
136750
137162
  remoteHash: remoteMeta ? normalizeEtag(remoteMeta.etag) : "",
136751
137163
  preserved: "remote",
136752
- decision
137164
+ decision,
137165
+ remoteSha256: probe.remoteContentHash() ?? null,
137166
+ remoteVersionId: remoteMeta?.versionId ?? null
136753
137167
  });
136754
137168
  recordPushConflictNotice(run, item, conflictPath, "local", decision, true, remoteMeta ? normalizeEtag(remoteMeta.etag) : void 0);
136755
137169
  probe.discard();
@@ -136785,7 +137199,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
136785
137199
  }
136786
137200
  if (resolution === "overwrite") {
136787
137201
  try {
136788
- await performUpload(void 0);
137202
+ await performUpload(void 0, "unknown");
136789
137203
  } catch (retryErr) {
136790
137204
  if (retryErr instanceof SamePathUploadSupersededError) {
136791
137205
  await restartAfterSupersede();
@@ -137007,15 +137421,30 @@ async function probeRemoteForWinner(run, item, remoteMtime, remoteChangedSinceJo
137007
137421
  const probeAbs = buildConflictProbePath(run.hqRoot);
137008
137422
  let parked = false;
137009
137423
  let fetched;
137424
+ let fetchedHash;
137425
+ const remoteContentHash = () => {
137426
+ if (fetchedHash !== void 0)
137427
+ return fetchedHash;
137428
+ if (!fetched || parked)
137429
+ return void 0;
137430
+ try {
137431
+ fetchedHash = hashProbeEntry(probeAbs);
137432
+ } catch {
137433
+ return void 0;
137434
+ }
137435
+ return fetchedHash;
137436
+ };
137010
137437
  const discard = () => {
137011
137438
  if (parked)
137012
137439
  return;
137440
+ remoteContentHash();
137013
137441
  try {
137014
137442
  fs48.rmSync(probeAbs, { force: true });
137015
137443
  } catch {
137016
137444
  }
137017
137445
  };
137018
137446
  const park = (detectedAt, machineId) => {
137447
+ remoteContentHash();
137019
137448
  const originalRelative = vaultKeyForLocalPath(run.hqRoot, item.absolutePath);
137020
137449
  const journalEntry = journalRows(run.journal).get(item.relativePath);
137021
137450
  const remoteEtagForDivergence = observedRemoteEtag ? normalizeEtag(observedRemoteEtag) : "";
@@ -137152,15 +137581,7 @@ async function probeRemoteForWinner(run, item, remoteMtime, remoteChangedSinceJo
137152
137581
  decision,
137153
137582
  park,
137154
137583
  discard,
137155
- remoteContentHash: () => {
137156
- if (!fetched || parked)
137157
- return void 0;
137158
- try {
137159
- return hashProbeEntry(probeAbs);
137160
- } catch {
137161
- return void 0;
137162
- }
137163
- },
137584
+ remoteContentHash,
137164
137585
  peekBody: () => {
137165
137586
  if (!fetched || parked)
137166
137587
  return void 0;
@@ -137221,6 +137642,39 @@ function recordPushConflict(run, item, fields) {
137221
137642
  message: "conflict index write failed: " + describeError2(indexErr)
137222
137643
  });
137223
137644
  }
137645
+ run.objectEvents.conflict({
137646
+ leg: "push",
137647
+ key: item.relativePath,
137648
+ baseSha256: fields.baseSha256 !== void 0 ? fields.baseSha256 : journalRows(run.journal).get(item.relativePath)?.hash ?? null,
137649
+ localSha256: item.localHash,
137650
+ remoteSha256: fields.remoteSha256 ?? null,
137651
+ remoteEtag: fields.remoteHash,
137652
+ winner: fields.preserved === "remote" ? "local" : "remote",
137653
+ reason: fields.decision?.reason ?? "strategy",
137654
+ remoteVersionId: fields.remoteVersionId ?? null,
137655
+ conflictCopyCreated: fields.conflictPath !== void 0
137656
+ });
137657
+ }
137658
+ var MERGED_PUSH_OUTCOMES = /* @__PURE__ */ new Set([
137659
+ "publish-local",
137660
+ "took-remote",
137661
+ "merged-locally"
137662
+ ]);
137663
+ function recordPushMerge(run, item, outcome, remote) {
137664
+ if (!MERGED_PUSH_OUTCOMES.has(outcome))
137665
+ return;
137666
+ run.objectEvents.conflict({
137667
+ leg: "push",
137668
+ key: item.relativePath,
137669
+ baseSha256: journalRows(run.journal).get(item.relativePath)?.hash ?? null,
137670
+ localSha256: item.localHash,
137671
+ remoteSha256: remote.remoteSha256,
137672
+ remoteEtag: remote.remoteEtag,
137673
+ winner: "merged",
137674
+ reason: "merged",
137675
+ remoteVersionId: remote.remoteVersionId,
137676
+ conflictCopyCreated: false
137677
+ });
137224
137678
  }
137225
137679
  function recordPushConflictNotice(run, item, backupPath, sideKept, decision, remoteChangedSinceJournal = false, remoteEtag) {
137226
137680
  try {
@@ -137384,7 +137838,9 @@ async function adoptRemoteOnPush(run, item, remoteHash, decision, probe) {
137384
137838
  conflictPath: backupKey,
137385
137839
  remoteHash: effectiveRemoteHash,
137386
137840
  preserved: "local",
137387
- decision
137841
+ decision,
137842
+ baseSha256: journalEntryBefore?.hash ?? null,
137843
+ remoteSha256: remoteBodyHash
137388
137844
  });
137389
137845
  recordPushConflictNotice(run, item, backupKey, "remote", decision, false, effectiveRemoteHash);
137390
137846
  checkpointShareJournal(run);
@@ -137707,6 +138163,7 @@ function flushShareJournal(run, now = Date.now()) {
137707
138163
  }
137708
138164
  run.checkpoint.appliedSinceFlush = 0;
137709
138165
  run.checkpoint.lastFlushAt = now;
138166
+ void run.objectEvents.flush();
137710
138167
  run.checkpoint.threshold = checkpointThresholdFor(run.journal, run.options.durableFullPassProgress === true);
137711
138168
  }
137712
138169
  function finalizeShareJournal(run) {
@@ -138811,13 +139268,13 @@ function computeDecommissionPlan(journal, prefixes, policy, alreadyPlanned, skip
138811
139268
  return out;
138812
139269
  }
138813
139270
 
138814
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
139271
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
138815
139272
  import * as fs56 from "fs";
138816
139273
  import * as path51 from "path";
138817
139274
 
138818
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/remote-file-spool.js
139275
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/remote-file-spool.js
138819
139276
  import * as fs49 from "node:fs";
138820
- import * as os15 from "node:os";
139277
+ import * as os16 from "node:os";
138821
139278
  import * as path44 from "node:path";
138822
139279
  import { StringDecoder as StringDecoder3 } from "node:string_decoder";
138823
139280
  var CHUNK_BYTES2 = 64 * 1024;
@@ -138834,7 +139291,7 @@ function collectRemoteAncestors(files) {
138834
139291
  return keys;
138835
139292
  }
138836
139293
  async function spoolRemoteFiles(source) {
138837
- const directory = fs49.mkdtempSync(path44.join(os15.tmpdir(), "hq-pull-list-"));
139294
+ const directory = fs49.mkdtempSync(path44.join(os16.tmpdir(), "hq-pull-list-"));
138838
139295
  const filename = path44.join(directory, "rows.jsonl");
138839
139296
  const remoteKeysWithChildren = /* @__PURE__ */ new Set();
138840
139297
  let writer;
@@ -138894,15 +139351,15 @@ function* readRows(filename) {
138894
139351
  }
138895
139352
  }
138896
139353
 
138897
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/hq-root-recovery.js
139354
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/hq-root-recovery.js
138898
139355
  import { execFile as execFile6 } from "child_process";
138899
139356
  import { randomBytes as randomBytes10 } from "crypto";
138900
139357
  import * as fs51 from "fs";
138901
- import * as os16 from "os";
139358
+ import * as os17 from "os";
138902
139359
  import * as path46 from "path";
138903
139360
  import { promisify as promisify6 } from "util";
138904
139361
 
138905
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/backup-prune.js
139362
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/backup-prune.js
138906
139363
  import * as crypto15 from "crypto";
138907
139364
  import * as fs50 from "fs";
138908
139365
  import * as path45 from "path";
@@ -139088,10 +139545,10 @@ function inventoryManagedSnapshots(backupRoot, canonicalRoot3, isCopyingOwnerLiv
139088
139545
  return { entries: entries3, ...plan, unmanaged: [...unmanaged, ...plan.unmanaged] };
139089
139546
  }
139090
139547
 
139091
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/hq-root-recovery.js
139548
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/hq-root-recovery.js
139092
139549
  var execFileAsync5 = promisify6(execFile6);
139093
139550
  var HQ_LAYOUT_DIRS = ["repos", "repos/public", "repos/private"];
139094
- function gitSidecarDir(hqRoot, homeDir = os16.homedir()) {
139551
+ function gitSidecarDir(hqRoot, homeDir = os17.homedir()) {
139095
139552
  return path46.join(homeDir, ".hq", "hq-root-git", canonicalRootHash(path46.resolve(hqRoot)));
139096
139553
  }
139097
139554
  function isGitLockName(name) {
@@ -139382,7 +139839,7 @@ async function snapshotHqGitAsync(hqRoot, dest, opts, nowMs) {
139382
139839
  }
139383
139840
  }
139384
139841
  function snapshotHqGitInBackground(hqRoot, opts = {}) {
139385
- const dest = gitSidecarDir(hqRoot, opts.homeDir ?? os16.homedir());
139842
+ const dest = gitSidecarDir(hqRoot, opts.homeDir ?? os17.homedir());
139386
139843
  const existing = inFlightSnapshots.get(dest);
139387
139844
  if (existing)
139388
139845
  return existing;
@@ -139417,7 +139874,7 @@ function restoreHqGitIfMissing(hqRoot, opts = {}) {
139417
139874
  } catch {
139418
139875
  return "absent";
139419
139876
  }
139420
- const dest = gitSidecarDir(hqRoot, opts.homeDir ?? os16.homedir());
139877
+ const dest = gitSidecarDir(hqRoot, opts.homeDir ?? os17.homedir());
139421
139878
  if (!isGitDirectory(dest))
139422
139879
  return "absent";
139423
139880
  try {
@@ -139461,10 +139918,10 @@ function recoverHqRootLocalState(hqRoot, opts = {}) {
139461
139918
  };
139462
139919
  }
139463
139920
 
139464
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/doctor.js
139921
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/doctor.js
139465
139922
  var SKILLS_KEY_PREFIX = ".claude/skills/";
139466
139923
 
139467
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/content-hash.js
139924
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/content-hash.js
139468
139925
  var SHA256_CONTENT_HASH = /^sha256:([a-f0-9]{64})$/;
139469
139926
  function rawSha256FromContentHash(contentHash) {
139470
139927
  if (contentHash === void 0)
@@ -139475,12 +139932,12 @@ function contentHashMatchesRawSha256(contentHash, rawHash) {
139475
139932
  return rawSha256FromContentHash(contentHash) === rawHash;
139476
139933
  }
139477
139934
 
139478
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/kms10-etag-safe-pull.js
139479
- import { createHash as createHash31 } from "node:crypto";
139935
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/kms10-etag-safe-pull.js
139936
+ import { createHash as createHash33 } from "node:crypto";
139480
139937
  var KMS10_COPY_MARKER_META_KEY = "hq-kms10-reencrypt-current";
139481
139938
  var KMS10_COPY_ORIGINAL_KEY_HASH_META_KEY = "hq-kms10-original-key-sha256";
139482
139939
  function kms10OriginalKeyHash(key) {
139483
- return createHash31("sha256").update(key, "utf8").digest("hex");
139940
+ return createHash33("sha256").update(key, "utf8").digest("hex");
139484
139941
  }
139485
139942
  function isKms10CopyOfJournalBase(listed, head, journalHash, journalEtag, expectedKey) {
139486
139943
  if (!head || !journalHash)
@@ -139500,9 +139957,9 @@ function isKms10CopyOfJournalBase(listed, head, journalHash, journalEtag, expect
139500
139957
  return normalizeEtag(head.metadata?.["hq-kms10-original-etag"] ?? "") === normalizeEtag(journalEtag);
139501
139958
  }
139502
139959
 
139503
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/targeted-upsert-exact-list.js
139960
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/targeted-upsert-exact-list.js
139504
139961
  init_dist();
139505
- import { createHash as createHash32 } from "node:crypto";
139962
+ import { createHash as createHash34 } from "node:crypto";
139506
139963
  function logSwallowed8(line) {
139507
139964
  process.stderr.write(line);
139508
139965
  }
@@ -139528,7 +139985,7 @@ function createTargetedUpsertExactListGate(dependencies = {}) {
139528
139985
  }
139529
139986
  if (!token)
139530
139987
  return false;
139531
- const tokenFingerprint = createHash32("sha256").update(token).digest("hex");
139988
+ const tokenFingerprint = createHash34("sha256").update(token).digest("hex");
139532
139989
  const cacheKey = `${endpoint}\0${companyUid}\0${tokenFingerprint}`;
139533
139990
  const scopedCompanyUid = flagCompanyUid(companyUid);
139534
139991
  let entry = clients.get(cacheKey);
@@ -139617,7 +140074,7 @@ function isTargetedUpsertExactListEnabled(config2, companyUid) {
139617
140074
  return defaultTargetedUpsertExactListGate(config2, companyUid);
139618
140075
  }
139619
140076
 
139620
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/targeted-pull-prefixes.js
140077
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/targeted-pull-prefixes.js
139621
140078
  var TARGETED_PULL_PREFIX_GROUP_MIN_PATHS = 16;
139622
140079
  function coalesceDenseTargetedPullPaths(paths) {
139623
140080
  const normalized = paths.map((path73) => path73.replace(/\\/g, "/"));
@@ -139655,15 +140112,15 @@ function coalesceDenseTargetedPullPaths(paths) {
139655
140112
  return result;
139656
140113
  }
139657
140114
 
139658
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
139659
- import { createHash as createHash35 } from "node:crypto";
140115
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
140116
+ import { createHash as createHash37 } from "node:crypto";
139660
140117
 
139661
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex.js
140118
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex.js
139662
140119
  import { spawnSync as spawnSync3 } from "child_process";
139663
140120
  import * as fs55 from "fs";
139664
140121
  import * as path50 from "path";
139665
140122
 
139666
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex-knowledge.js
140123
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex-knowledge.js
139667
140124
  import { spawnSync as spawnSync2 } from "child_process";
139668
140125
  import * as fs52 from "fs";
139669
140126
  import * as path47 from "path";
@@ -139926,10 +140383,10 @@ function materializeLegacyKnowledgeRepos(root5) {
139926
140383
  }
139927
140384
  }
139928
140385
 
139929
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/session-log-capture.js
140386
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/session-log-capture.js
139930
140387
  import * as crypto16 from "node:crypto";
139931
140388
  import * as fs53 from "node:fs";
139932
- import * as os17 from "node:os";
140389
+ import * as os18 from "node:os";
139933
140390
  import * as path48 from "node:path";
139934
140391
  var SESSION_LOG_DEST_PREFIX = "workspace/.session-logs/";
139935
140392
  var SESSION_LOG_SCOPE_PREFIX = "session-log-capture:v1:";
@@ -140662,7 +141119,7 @@ function resolveDestinationKey(store, harness, canonicalSource, machine, relativ
140662
141119
  return evidence.captured(legacyKey) ? legacyKey : machineKey;
140663
141120
  }
140664
141121
  function captureClaude(root5, store, summary, machine, candidateRoots, quietForMs, maxStalenessMs, now, evidence) {
140665
- const projects = path48.join(process.env.CLAUDE_CONFIG_DIR || path48.join(os17.homedir(), ".claude"), "projects");
141122
+ const projects = path48.join(process.env.CLAUDE_CONFIG_DIR || path48.join(os18.homedir(), ".claude"), "projects");
140666
141123
  if (!isDirectory(projects))
140667
141124
  return;
140668
141125
  const slugs = new Set(candidateRoots.map((candidate) => candidate.replace(/[^a-zA-Z0-9]/g, "-")));
@@ -140685,7 +141142,7 @@ function captureClaude(root5, store, summary, machine, candidateRoots, quietForM
140685
141142
  }
140686
141143
  }
140687
141144
  function captureGrok(root5, store, summary, machine, candidateRoots, quietForMs, maxStalenessMs, now, evidence) {
140688
- const sessions = path48.join(process.env.GROK_HOME || path48.join(os17.homedir(), ".grok"), "sessions");
141145
+ const sessions = path48.join(process.env.GROK_HOME || path48.join(os18.homedir(), ".grok"), "sessions");
140689
141146
  if (!isDirectory(sessions))
140690
141147
  return;
140691
141148
  const keys = new Set(candidateRoots.map((candidate) => encodeURIComponent(candidate)));
@@ -140710,7 +141167,7 @@ function captureGrok(root5, store, summary, machine, candidateRoots, quietForMs,
140710
141167
  }
140711
141168
  }
140712
141169
  function captureCodex(root5, store, summary, machine, candidates, quietForMs, maxStalenessMs, now, evidence) {
140713
- const sessions = path48.join(process.env.CODEX_HOME || path48.join(os17.homedir(), ".codex"), "sessions");
141170
+ const sessions = path48.join(process.env.CODEX_HOME || path48.join(os18.homedir(), ".codex"), "sessions");
140714
141171
  if (!isDirectory(sessions))
140715
141172
  return;
140716
141173
  const prefixes = candidates.map((candidate) => candidate.endsWith(path48.sep) ? candidate : `${candidate}${path48.sep}`);
@@ -140870,10 +141327,10 @@ function captureSessionLogs(root5, options = {}) {
140870
141327
  }
140871
141328
  }
140872
141329
 
140873
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/session-log-retention.js
141330
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/session-log-retention.js
140874
141331
  import * as crypto17 from "node:crypto";
140875
141332
  import * as fs54 from "node:fs";
140876
- import * as os18 from "node:os";
141333
+ import * as os19 from "node:os";
140877
141334
  import * as path49 from "node:path";
140878
141335
  function logSwallowed9(line) {
140879
141336
  process.stderr.write(line);
@@ -140936,7 +141393,7 @@ function resolveSessionLogSweepIntervalHours(rawEnv = process.env.HQ_SESSION_LOG
140936
141393
  }
140937
141394
  function stateDir4() {
140938
141395
  const override = process.env.HQ_STATE_DIR?.trim();
140939
- return override ? override : path49.join(os18.homedir(), ".hq");
141396
+ return override ? override : path49.join(os19.homedir(), ".hq");
140940
141397
  }
140941
141398
  function sessionLogSweepMarkerPath(root5) {
140942
141399
  const digest3 = crypto17.createHash("sha256").update(path49.resolve(root5)).digest("hex");
@@ -141131,7 +141588,7 @@ function pruneSyncedSessionLogs(root5) {
141131
141588
  }
141132
141589
  }
141133
141590
 
141134
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex.js
141591
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex.js
141135
141592
  function isDir2(p3) {
141136
141593
  try {
141137
141594
  return fs55.statSync(p3).isDirectory();
@@ -141685,7 +142142,7 @@ function emitReindexTelemetry(opts, result, lockResult) {
141685
142142
  }, { claims: opts.telemetryClaims });
141686
142143
  }
141687
142144
 
141688
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
142145
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
141689
142146
  async function yieldToCooperativeCheckpoint2(work, cooperativeCheckpoint, force, resumedAt) {
141690
142147
  work.rowsSinceYield += 1;
141691
142148
  if (!force && work.rowsSinceYield < cooperativeUnitSize()) {
@@ -142106,6 +142563,7 @@ async function syncWithOperationLockHeld(options) {
142106
142563
  } finally {
142107
142564
  run.humanSkipLines?.flush();
142108
142565
  run.releaseKeyedJournal?.();
142566
+ await run.objectEvents.flush();
142109
142567
  }
142110
142568
  }
142111
142569
  async function buildPullContext(options) {
@@ -142217,6 +142675,15 @@ async function buildPullContext(options) {
142217
142675
  });
142218
142676
  return {
142219
142677
  options,
142678
+ objectEvents: createSyncObjectEventSink({
142679
+ client: options.telemetryClient ?? new VaultClient(vaultConfig),
142680
+ claims: options.telemetryClaims,
142681
+ context: {
142682
+ companyUid: ctx.uid,
142683
+ deviceId: syncDeviceId(),
142684
+ ...options.callerSub ? { callerSub: options.callerSub } : {}
142685
+ }
142686
+ }),
142220
142687
  hostLoadAtStart,
142221
142688
  linkWarnings,
142222
142689
  companyRef,
@@ -142694,7 +143161,7 @@ function executeFileTombstoneDelete(run, item, counters, caseAliasedKeys) {
142694
143161
  try {
142695
143162
  const lstat3 = fs56.lstatSync(tombstonePath);
142696
143163
  if (!matchesLocalSnapshot(tombstonePath, item.localSnapshot)) {
142697
- reportLocalSnapshotConflict(run, counters, tombstoneKey);
143164
+ reportLocalSnapshotConflict(run, counters, tombstoneKey, tombstonePath);
142698
143165
  return;
142699
143166
  }
142700
143167
  if (lstat3.isSymbolicLink() || lstat3.isFile()) {
@@ -143033,6 +143500,7 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
143033
143500
  const probeAbs = buildConflictProbePath(run.hqRoot);
143034
143501
  let probeParked = false;
143035
143502
  let remoteProbeHash = null;
143503
+ let remoteProbeVersionId = null;
143036
143504
  let remoteBackupKey = null;
143037
143505
  let remoteBackupHash = null;
143038
143506
  const discardProbe = () => {
@@ -143204,6 +143672,7 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
143204
143672
  }
143205
143673
  } else {
143206
143674
  remoteProbeHash = downloaded.contentHash ?? hashFile(probeAbs);
143675
+ remoteProbeVersionId = downloaded.versionId ?? null;
143207
143676
  converged = remoteProbeHash === executionLocal.hash;
143208
143677
  }
143209
143678
  } catch (probeErr) {
@@ -143312,7 +143781,7 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
143312
143781
  return null;
143313
143782
  }
143314
143783
  const mergedStat = fs56.lstatSync(localPath);
143315
- const mergedHash = createHash35("sha256").update(merged).digest("hex");
143784
+ const mergedHash = createHash37("sha256").update(merged).digest("hex");
143316
143785
  updateEntry(run.journal, remoteFile.key, mergedHash, merged.length, "down", localPath, {
143317
143786
  remoteEtag: remoteFile.etag,
143318
143787
  mtimeMs: mergedStat.mtimeMs,
@@ -143327,6 +143796,18 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
143327
143796
  }
143328
143797
  if (!merged.equals(localBody))
143329
143798
  counters.changedPaths.push(remoteFile.key);
143799
+ run.objectEvents.conflict({
143800
+ leg: "pull",
143801
+ key: remoteFile.key,
143802
+ baseSha256: journalEntryAtConflict?.hash ?? null,
143803
+ localSha256: executionLocal.hash,
143804
+ remoteSha256: remoteProbeHash,
143805
+ remoteEtag: remoteFile.etag ? normalizeEtag(remoteFile.etag) : null,
143806
+ winner: "merged",
143807
+ reason: "merged",
143808
+ remoteVersionId: remoteProbeVersionId,
143809
+ conflictCopyCreated: false
143810
+ });
143330
143811
  run.emit({
143331
143812
  type: "reconciled",
143332
143813
  path: remoteFile.key,
@@ -143402,6 +143883,18 @@ async function executeConflictItem(run, plan, scopeRun, counters, downloadItems,
143402
143883
  message: `conflict index write failed: ${describeError2(indexErr)}`
143403
143884
  });
143404
143885
  }
143886
+ run.objectEvents.conflict({
143887
+ leg: "pull",
143888
+ key: remoteFile.key,
143889
+ baseSha256: journalEntryAtConflict?.hash ?? null,
143890
+ localSha256: localHash ?? null,
143891
+ remoteSha256: remoteProbeHash,
143892
+ remoteEtag: remoteFile.etag ? normalizeEtag(remoteFile.etag) : null,
143893
+ winner: preserved === "remote" ? "local" : "remote",
143894
+ reason: decision?.reason ?? resolution,
143895
+ remoteVersionId: remoteProbeVersionId,
143896
+ conflictCopyCreated: conflictPath !== void 0
143897
+ });
143405
143898
  if (conflictPath) {
143406
143899
  try {
143407
143900
  emitConflictParkedAfterConfirmedBackup(conflictPath, preserved === "local" ? "remote" : "local");
@@ -143854,7 +144347,7 @@ async function downloadOne(run, downloadItem, counters, deferJournalCheckpoint =
143854
144347
  if (!(err instanceof DanglingSymlinkParentError))
143855
144348
  counters.hasRetryableOutcome = true;
143856
144349
  if (err instanceof LocalSnapshotChangedError) {
143857
- reportLocalSnapshotConflict(run, counters, remoteFile.key);
144350
+ reportLocalSnapshotConflict(run, counters, remoteFile.key, localPath, remoteFile.etag);
143858
144351
  } else if (isAccessDenied(err)) {
143859
144352
  counters.filesSkipped++;
143860
144353
  const reason = extractAccessDeniedReason(err, remoteFile.key);
@@ -143931,6 +144424,7 @@ function flushDownloadedJournalTail(run) {
143931
144424
  persistPullJournal(run);
143932
144425
  run.downloadsSinceJournalCheckpoint = 0;
143933
144426
  run.journalChangesSinceCheckpoint = 0;
144427
+ void run.objectEvents.flush();
143934
144428
  }
143935
144429
  function persistPullJournal(run) {
143936
144430
  const release5 = setJournalSnapshotQuarantineListener(run.journalSlug, (diagnostic) => run.emit({ type: "journal-quarantine", ...diagnostic }));
@@ -144101,7 +144595,7 @@ async function executeJournalTombstoneDeletes(run, plan, counters) {
144101
144595
  try {
144102
144596
  const lstat3 = fs56.lstatSync(localPath);
144103
144597
  if (!matchesLocalSnapshot(localPath, localSnapshot)) {
144104
- reportLocalSnapshotConflict(run, counters, key);
144598
+ reportLocalSnapshotConflict(run, counters, key, localPath);
144105
144599
  continue;
144106
144600
  }
144107
144601
  if (lstat3.isSymbolicLink() || lstat3.isFile()) {
@@ -144384,10 +144878,22 @@ function hasCurrentLocalDeleteIntent2(entry) {
144384
144878
  const intent = entry?.localDeleteIntent;
144385
144879
  return !!(intent && intent.version === 1 && entry.remoteEtag && entry.kind && intent.remoteEtag === entry.remoteEtag && intent.localHash === entry.hash && intent.localKind === entry.kind);
144386
144880
  }
144387
- function reportLocalSnapshotConflict(run, counters, key) {
144881
+ function reportLocalSnapshotConflict(run, counters, key, localPath, remoteEtag) {
144388
144882
  counters.conflicts++;
144389
144883
  counters.conflictPaths.push(key);
144390
144884
  run.emit({ type: "conflict", path: key, direction: "pull", resolution: "skip" });
144885
+ run.objectEvents.conflict({
144886
+ leg: "pull",
144887
+ key,
144888
+ baseSha256: getEntry(run.journal, key)?.hash ?? null,
144889
+ localSha256: localSnapshotHash(snapshotLocalState(localPath)),
144890
+ remoteSha256: null,
144891
+ remoteEtag: remoteEtag ? normalizeEtag(remoteEtag) : null,
144892
+ winner: "local",
144893
+ reason: "local_changed_during_apply",
144894
+ remoteVersionId: null,
144895
+ conflictCopyCreated: false
144896
+ });
144391
144897
  }
144392
144898
  function discardDownloadStage(stagePath) {
144393
144899
  try {
@@ -145296,7 +145802,7 @@ function defaultConsoleLogger2(event, humanSkipLines) {
145296
145802
  }
145297
145803
  }
145298
145804
 
145299
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/rescue-core.js
145805
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/rescue-core.js
145300
145806
  import { createRequire } from "node:module";
145301
145807
  var MAX_CLONE_BATCH_PATH_BYTES = 64 * 1024;
145302
145808
  var require2 = createRequire(import.meta.url);
@@ -145306,7 +145812,7 @@ var PRECLONE_FREE_SPACE_FLOOR_BYTES = 1024 ** 3;
145306
145812
  var CYGWIN_SYMLINK_COOKIE = Buffer.from("!<symlink>", "latin1");
145307
145813
  var PRESERVED_FILE_COMPARE_CHUNK_BYTES = 64 * 1024;
145308
145814
 
145309
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/schemas/source-channels.js
145815
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/schemas/source-channels.js
145310
145816
  var SOURCE_CHANNELS = Object.freeze([
145311
145817
  "meeting",
145312
145818
  "email",
@@ -145315,7 +145821,7 @@ var SOURCE_CHANNELS = Object.freeze([
145315
145821
  "notion"
145316
145822
  ]);
145317
145823
 
145318
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/schemas/signal-types.js
145824
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/schemas/signal-types.js
145319
145825
  var SIGNAL_TYPES = Object.freeze([
145320
145826
  "action_item",
145321
145827
  "commitment",
@@ -145325,7 +145831,7 @@ var SIGNAL_TYPES = Object.freeze([
145325
145831
  "summary"
145326
145832
  ]);
145327
145833
 
145328
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/feature-flags.js
145834
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/feature-flags.js
145329
145835
  var PARALLEL_COORDINATOR_ENV_VAR = "HQ_SYNC_PARALLEL_COORDINATOR";
145330
145836
  var AREA_STORAGE_ENV_VAR = "HQ_SYNC_AREA_STORAGE";
145331
145837
  function parseFeatureSwitch(value) {
@@ -145394,7 +145900,7 @@ function isEventSyncLocallyDisabled(value) {
145394
145900
  }
145395
145901
  }
145396
145902
 
145397
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/metrics.js
145903
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/metrics.js
145398
145904
  var import_client_cloudwatch = __toESM(require_dist_cjs40(), 1);
145399
145905
  var SYNC_METRIC_NAMESPACE = "HQPro/Sync";
145400
145906
  var SYNC_LATENCY_METRIC_NAME = "hq-cloud.sync.p95_latency_seconds";
@@ -145462,7 +145968,7 @@ async function publishSyncLatencyMetric(metric, opts = {}) {
145462
145968
  }
145463
145969
  }
145464
145970
 
145465
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/push-receiver.js
145971
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/push-receiver.js
145466
145972
  var DEFAULT_RECEIVER_DISPOSE_DRAIN_MS = 5e3;
145467
145973
  var RECEIVER_SHUTDOWN_RELEASE_BUDGET_MS = 1500;
145468
145974
  var DEFAULT_WAIT_TIME_SECONDS = 20;
@@ -146477,10 +146983,10 @@ var SqsPushReceiver = class {
146477
146983
  attempts += 1;
146478
146984
  let retryDelayMs = RECEIVER_ADMISSION_RETRY_INITIAL_MS;
146479
146985
  let admissionGiveupSuppressed = false;
146480
- const counts = events.flatMap((event) => approximateReceiveCountsByPath.get(event.relativePath) ?? []);
146481
- const knownCounts = counts.filter((count) => count !== void 0 && Number.isFinite(count));
146986
+ const counts2 = events.flatMap((event) => approximateReceiveCountsByPath.get(event.relativePath) ?? []);
146987
+ const knownCounts = counts2.filter((count) => count !== void 0 && Number.isFinite(count));
146482
146988
  const receiveCount = knownCounts.length > 0 ? Math.max(...knownCounts) : void 0;
146483
- const hasUnknownReceiveCount = counts.length === 0 || knownCounts.length !== counts.length;
146989
+ const hasUnknownReceiveCount = counts2.length === 0 || knownCounts.length !== counts2.length;
146484
146990
  const suppressGiveupForRedrive = hasUnknownReceiveCount || receiveCount !== void 0 && receiveCount >= DEFAULT_RECEIVER_REDRIVE_MAX_RECEIVE_COUNT - 1;
146485
146991
  const logSuppressedGiveup = (waitedMs, holder) => {
146486
146992
  this.logger.info({
@@ -146995,10 +147501,10 @@ function defaultSleep(ms, signal) {
146995
147501
  });
146996
147502
  }
146997
147503
 
146998
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/logger.js
147504
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/logger.js
146999
147505
  var import_pino = __toESM(require_pino(), 1);
147000
147506
 
147001
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/path-leases.js
147507
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/path-leases.js
147002
147508
  function assertCanonicalPath(path73) {
147003
147509
  if (path73.length === 0 || path73.startsWith("/") || path73.endsWith("/") || path73.includes("\\") || path73.split("/").some((part) => part.length === 0 || part === "." || part === "..")) {
147004
147510
  throw new Error(`path lease requires a canonical relative path: ${path73}`);
@@ -147061,7 +147567,7 @@ var PathLease = class {
147061
147567
  }
147062
147568
  };
147063
147569
 
147064
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/parallel-sync-coordinator.js
147570
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/parallel-sync-coordinator.js
147065
147571
  var MAX_REALTIME_PULL_YIELDS = 3;
147066
147572
  var MAX_REALTIME_PULL_YIELD_MS = 6e4;
147067
147573
  var REALTIME_PULL_YIELD_STATE_TTL_MS = 10 * 6e4;
@@ -147568,7 +148074,7 @@ var DefaultParallelSyncCoordinator = class {
147568
148074
  }
147569
148075
  };
147570
148076
 
147571
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/sync-work.js
148077
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/sync-work.js
147572
148078
  var InlineSyncWorkerAdapter = class {
147573
148079
  handler;
147574
148080
  constructor(handler) {
@@ -147579,11 +148085,11 @@ var InlineSyncWorkerAdapter = class {
147579
148085
  }
147580
148086
  };
147581
148087
 
147582
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/manifest/build-manifest.js
148088
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/manifest/build-manifest.js
147583
148089
  import * as fs58 from "node:fs";
147584
148090
  import * as path54 from "node:path";
147585
148091
 
147586
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/company-slug.js
148092
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/company-slug.js
147587
148093
  import * as path52 from "node:path";
147588
148094
  var UNSAFE_SLUG_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
147589
148095
  function isSafeCompanySlug(companiesDir, slug) {
@@ -147600,7 +148106,7 @@ function isSafeCompanySlug(companiesDir, slug) {
147600
148106
  return path52.dirname(companyDir) === resolvedCompaniesDir;
147601
148107
  }
147602
148108
 
147603
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/manifest/contract.js
148109
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/manifest/contract.js
147604
148110
  var SYNC_MANIFEST_CONTRACT_VERSION = 1;
147605
148111
  var SYNC_MANIFEST_SCOPE_KINDS = ["personal", "company"];
147606
148112
  var SYNC_MANIFEST_SOURCES = ["desktop", "cli"];
@@ -147769,7 +148275,7 @@ var SYNC_MANIFEST_CONTRACT_DESCRIPTOR = {
147769
148275
  }
147770
148276
  };
147771
148277
 
147772
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/manifest/snapshot-store.js
148278
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/manifest/snapshot-store.js
147773
148279
  import * as crypto18 from "node:crypto";
147774
148280
  import * as fs57 from "node:fs";
147775
148281
  import * as path53 from "node:path";
@@ -147944,7 +148450,7 @@ function writeSnapshotIncrementally(tmp, snapshot) {
147944
148450
  }
147945
148451
  var SNAPSHOT_WRITE_BATCH_CHARS = 256 * 1024;
147946
148452
 
147947
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/manifest/build-manifest.js
148453
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/manifest/build-manifest.js
147948
148454
  function logSwallowed11(line) {
147949
148455
  process.stderr.write(line);
147950
148456
  }
@@ -148553,7 +149059,7 @@ function buildChunk(input2, firstChunkRemovedPaths, chunkIndex, chunkCount, entr
148553
149059
  return upload;
148554
149060
  }
148555
149061
 
148556
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/manifest/upload-manifest.js
149062
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/manifest/upload-manifest.js
148557
149063
  import * as fs59 from "node:fs";
148558
149064
  var MANIFEST_UPLOAD_DISABLED_ENV = "HQ_SYNC_MANIFEST_DISABLED";
148559
149065
  var DEFAULT_MANIFEST_UPLOAD_MIN_INTERVAL_MS = 24 * 60 * 60 * 1e3;
@@ -149122,16 +149628,16 @@ async function runUploadPassBody(options, scopeKey, persisted) {
149122
149628
  };
149123
149629
  }
149124
149630
 
149125
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/watcher-catchup-skip-store.js
149631
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/watcher-catchup-skip-store.js
149126
149632
  import * as fs60 from "node:fs";
149127
149633
  import * as path55 from "node:path";
149128
- import { createHash as createHash37, randomUUID as randomUUID7 } from "node:crypto";
149634
+ import { createHash as createHash39, randomUUID as randomUUID7 } from "node:crypto";
149129
149635
  var WATCHER_CATCHUP_SKIP_MAX_RECORDS = 5e4;
149130
149636
  var WATCHER_CATCHUP_ACCESS_DENIED_TTL_MS = 24 * 60 * 60 * 1e3;
149131
149637
  var WATCHER_CATCHUP_REMOTE_SKIP_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
149132
149638
  var WATCHER_CATCHUP_UNRESOLVED_COMPANY_TTL_MS = 24 * 60 * 60 * 1e3;
149133
149639
  function watcherCatchupSkipStorePath(stateDir5, hqRoot) {
149134
- const rootId = createHash37("sha256").update(path55.resolve(hqRoot)).digest("hex").slice(0, 20);
149640
+ const rootId = createHash39("sha256").update(path55.resolve(hqRoot)).digest("hex").slice(0, 20);
149135
149641
  return path55.join(stateDir5, `watcher-catchup-skips-${rootId}.json`);
149136
149642
  }
149137
149643
  var recordKey = (record2) => `${record2.company}\0${record2.path}`;
@@ -149370,7 +149876,7 @@ function validUnresolvedCompanyRecord(value) {
149370
149876
  return typeof record2.company === "string" && record2.company.length > 0 && record2.reason === "unresolved-company" && typeof record2.recordedAt === "number" && Number.isFinite(record2.recordedAt);
149371
149877
  }
149372
149878
 
149373
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/version.js
149879
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/version.js
149374
149880
  import { readFileSync as readFileSync35 } from "node:fs";
149375
149881
  import { fileURLToPath as fileURLToPath4 } from "node:url";
149376
149882
  import path56 from "node:path";
@@ -149378,9 +149884,9 @@ var here = path56.dirname(fileURLToPath4(import.meta.url));
149378
149884
  var pkg = JSON.parse(readFileSync35(path56.resolve(here, "..", "package.json"), "utf-8"));
149379
149885
  var HQ_CLOUD_VERSION = pkg.version;
149380
149886
 
149381
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/outcome-telemetry.js
149887
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/outcome-telemetry.js
149382
149888
  import { promises as fs61 } from "node:fs";
149383
- import * as os19 from "node:os";
149889
+ import * as os20 from "node:os";
149384
149890
  import * as path57 from "node:path";
149385
149891
  var OUTCOME_STORY_DONE_STATE_FLAG = "cloud.outcome-story-done-state";
149386
149892
  var STORY_DONE_STATE_FLAG_PHASE_TIMEOUT_MS = 5e3;
@@ -149633,7 +150139,7 @@ function wireRowRejectReason(row) {
149633
150139
  }
149634
150140
  var MAX_BATCH_EVENTS3 = 200;
149635
150141
  async function collectAndSendOutcomeTelemetry(opts) {
149636
- const home = os19.homedir();
150142
+ const home = os20.homedir();
149637
150143
  const cursorPath = opts.cursorPath ?? path57.join(home, ".hq", "outcome-telemetry-cursor.json");
149638
150144
  const menubarPath = opts.menubarPath ?? path57.join(home, ".hq", "menubar.json");
149639
150145
  const repo = opts.repo ?? "hq";
@@ -149757,7 +150263,7 @@ async function collectAndSendOutcomeTelemetry(opts) {
149757
150263
  return { enabled: true, optInSource, filesScanned, eventsSent, batchesSent };
149758
150264
  }
149759
150265
 
149760
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/qmd-reindex.js
150266
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/qmd-reindex.js
149761
150267
  import * as fs62 from "fs";
149762
150268
  import * as path58 from "path";
149763
150269
  import { spawn as spawn2 } from "child_process";
@@ -150407,7 +150913,7 @@ function defaultHasIndexableProjectContent(projectsDir) {
150407
150913
  return false;
150408
150914
  }
150409
150915
 
150410
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/qmd-runner-admission.js
150916
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/qmd-runner-admission.js
150411
150917
  import fs63 from "node:fs";
150412
150918
  import path59 from "node:path";
150413
150919
  import { randomUUID as randomUUID8 } from "node:crypto";
@@ -150511,7 +151017,7 @@ nonce=${nonce}
150511
151017
  };
150512
151018
  }
150513
151019
 
150514
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/telemetry-admission.js
151020
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/telemetry-admission.js
150515
151021
  var DEFAULT_INTERVAL_MS = 10 * 60 * 1e3;
150516
151022
  var MAX_INTERVAL_SEC = 24 * 60 * 60;
150517
151023
  var STALE_IN_FLIGHT_TIMEOUT_MULTIPLE = 5;
@@ -150588,7 +151094,7 @@ function recordTelemetryRunStarted(store, nowMs, run) {
150588
151094
  store.inFlight = tracked;
150589
151095
  }
150590
151096
 
150591
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex-async.js
151097
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex-async.js
150592
151098
  import { Worker } from "node:worker_threads";
150593
151099
  function reindexAsync(options) {
150594
151100
  if (import.meta.url.endsWith(".ts"))
@@ -150647,10 +151153,10 @@ function reindexAsync(options) {
150647
151153
  });
150648
151154
  }
150649
151155
 
150650
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/agent-codex-instructions.js
151156
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/agent-codex-instructions.js
150651
151157
  import * as crypto19 from "crypto";
150652
151158
  import * as fs64 from "fs";
150653
- import * as os20 from "os";
151159
+ import * as os21 from "os";
150654
151160
  import * as path60 from "path";
150655
151161
  var AGENTS_PROFILE_REL = "personal/agents-profile.md";
150656
151162
  var AGENT_CAPABILITIES_REL = "personal/knowledge/public/agent-capabilities";
@@ -150722,7 +151228,7 @@ function codexHomeDir() {
150722
151228
  if (env4 && path60.isAbsolute(env4) && !env4.split(/[\\/]/).includes("..")) {
150723
151229
  return env4;
150724
151230
  }
150725
- return path60.join(os20.homedir(), ".codex");
151231
+ return path60.join(os21.homedir(), ".codex");
150726
151232
  }
150727
151233
  function materializeCodexAgents(opts) {
150728
151234
  const codexHome = opts.codexHome ?? codexHomeDir();
@@ -150807,7 +151313,7 @@ function materializeCodexAgents(opts) {
150807
151313
  }
150808
151314
  }
150809
151315
 
150810
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-post-sync-flags.js
151316
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-post-sync-flags.js
150811
151317
  var POST_SYNC_FLAG_KEYS = {
150812
151318
  qmdReindex: "sync.qmd-reindex",
150813
151319
  conflictPrune: "sync.conflict-prune",
@@ -150827,14 +151333,14 @@ function createPostSyncFlagEvaluator(options = {}) {
150827
151333
  };
150828
151334
  }
150829
151335
 
150830
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-manifest.js
150831
- import { createHash as createHash38, randomUUID as randomUUID9 } from "node:crypto";
151336
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-manifest.js
151337
+ import { createHash as createHash40, randomUUID as randomUUID9 } from "node:crypto";
150832
151338
  import * as fs66 from "node:fs/promises";
150833
151339
  import * as path62 from "node:path";
150834
151340
 
150835
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-installation-id.js
151341
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-installation-id.js
150836
151342
  import * as fs65 from "node:fs";
150837
- import * as os21 from "node:os";
151343
+ import * as os22 from "node:os";
150838
151344
  import * as path61 from "node:path";
150839
151345
  var DESKTOP_CLIENT_HEALTH_STATE_FILE = "client-health.json";
150840
151346
  var IDENTIFIER = /^[A-Za-z0-9][A-Za-z0-9_.:-]{1,63}$/;
@@ -150853,7 +151359,7 @@ function candidatePaths(stateDir5, homeDir) {
150853
151359
  function readDesktopInstallationId(options) {
150854
151360
  let homeDir;
150855
151361
  try {
150856
- homeDir = options.homeDir ?? os21.homedir();
151362
+ homeDir = options.homeDir ?? os22.homedir();
150857
151363
  } catch {
150858
151364
  homeDir = options.stateDir;
150859
151365
  }
@@ -150882,7 +151388,7 @@ function readDesktopInstallationId(options) {
150882
151388
  return void 0;
150883
151389
  }
150884
151390
 
150885
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-manifest.js
151391
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-manifest.js
150886
151392
  var RUNNER_MANIFEST_WALK_WALL_MS = 9e4;
150887
151393
  var RUNNER_MANIFEST_PHASE_WALL_MS = 24e4;
150888
151394
  var RUNNER_MANIFEST_REPAIR_POLL_SPACING_MS = 60 * 60 * 1e3;
@@ -150892,7 +151398,7 @@ var MANIFEST_REPAIR_COMMAND_ID = /^[A-Za-z0-9][A-Za-z0-9_-]{7,63}$/;
150892
151398
  var CLIENT_HEALTH_CONTRACT_VERSION = 1;
150893
151399
  var activeManifestRepairPollReservations = /* @__PURE__ */ new Set();
150894
151400
  async function reserveManifestRepairPoll(options) {
150895
- const installationHash = createHash38("sha256").update(options.installationId).digest("hex");
151401
+ const installationHash = createHash40("sha256").update(options.installationId).digest("hex");
150896
151402
  const pollStatePath = path62.join(options.stateDir, "manifest-repair-polls", `${installationHash}.json`);
150897
151403
  if (activeManifestRepairPollReservations.has(pollStatePath))
150898
151404
  return false;
@@ -151504,14 +152010,14 @@ async function runPostSyncManifestUploads(options) {
151504
152010
  return emitted;
151505
152011
  }
151506
152012
 
151507
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/lib/exit-codes.js
152013
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/lib/exit-codes.js
151508
152014
  var PARTIAL_SYNC_EXIT = 2;
151509
152015
  var UNRESOLVED_COMPANY_EXIT = 19;
151510
152016
  var WATCH_RUNNER_ALREADY_OWNED_EXIT = 20;
151511
152017
  var WATCH_OWNER_LEASE_LOST_EXIT = 21;
151512
152018
  var PREFLIGHT_HALT_EXIT = 22;
151513
152019
 
151514
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-audit.js
152020
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-audit.js
151515
152021
  import * as crypto20 from "node:crypto";
151516
152022
  import * as fs67 from "node:fs";
151517
152023
  import * as path63 from "node:path";
@@ -151560,7 +152066,7 @@ function hashNormalizedKey(key) {
151560
152066
  return crypto20.createHash("sha256").update(normalized, "utf8").digest("hex");
151561
152067
  }
151562
152068
 
151563
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/watch-owner-lease.js
152069
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/watch-owner-lease.js
151564
152070
  import { spawnSync as spawnSync4 } from "node:child_process";
151565
152071
  import { randomUUID as randomUUID10 } from "node:crypto";
151566
152072
  import * as fs68 from "node:fs";
@@ -151931,7 +152437,7 @@ function acquireWatchOwnerLease(hqRoot, owner = "unknown", options = {}) {
151931
152437
  };
151932
152438
  }
151933
152439
 
151934
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/watch-parent.js
152440
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/watch-parent.js
151935
152441
  var WATCH_PARENT_CHECK_INTERVAL_MS = 1e3;
151936
152442
  function processExists(pid) {
151937
152443
  try {
@@ -151982,7 +152488,7 @@ function startWatchParentExitMonitor(options) {
151982
152488
  };
151983
152489
  }
151984
152490
 
151985
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-events.js
152491
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-events.js
151986
152492
  var ERROR_TYPES = /* @__PURE__ */ new Set([
151987
152493
  "error",
151988
152494
  "auth-error"
@@ -152028,7 +152534,7 @@ function emitUncaughtRunnerError(err, streams) {
152028
152534
  }
152029
152535
  }
152030
152536
 
152031
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-stdout.js
152537
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-stdout.js
152032
152538
  import { format as format4 } from "node:util";
152033
152539
  function redirectRunnerConsoleToStderr(runnerConsole, stderr) {
152034
152540
  const writeDiagnostic = (...args) => {
@@ -152044,7 +152550,7 @@ function runWithRunnerConsoleStderr(startRunner, runnerConsole = console, stderr
152044
152550
  return startRunner();
152045
152551
  }
152046
152552
 
152047
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-planning.js
152553
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-planning.js
152048
152554
  function verifiedMemberCompanyUids(options) {
152049
152555
  if (!options.companies)
152050
152556
  return void 0;
@@ -152209,7 +152715,7 @@ function emitFanoutPlan(emit, plan) {
152209
152715
  emit({ type: "fanout-plan", companies: plan });
152210
152716
  }
152211
152717
 
152212
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-pass-request.js
152718
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-pass-request.js
152213
152719
  import * as fs69 from "node:fs";
152214
152720
  import * as path65 from "node:path";
152215
152721
  function buildPassRequestArgv(passArgv, company) {
@@ -152460,7 +152966,7 @@ var SyncPassRequestDirectory = class _SyncPassRequestDirectory {
152460
152966
  }
152461
152967
  };
152462
152968
 
152463
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/active-company.js
152969
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/active-company.js
152464
152970
  import { randomUUID as randomUUID11 } from "node:crypto";
152465
152971
  import * as fs70 from "node:fs";
152466
152972
  import * as path66 from "node:path";
@@ -152552,7 +153058,7 @@ function seedActiveCompany(options) {
152552
153058
  return { written: true, activeCompany };
152553
153059
  }
152554
153060
 
152555
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/manifest-reconcile.js
153061
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/manifest-reconcile.js
152556
153062
  import { randomUUID as randomUUID12 } from "node:crypto";
152557
153063
  import * as fs71 from "node:fs";
152558
153064
  import * as path67 from "node:path";
@@ -152774,17 +153280,17 @@ async function reconcileCompanyManifest(options) {
152774
153280
  return reconcileManifest(options.hqRoot, resolvedTargets);
152775
153281
  }
152776
153282
 
152777
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-company.js
153283
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-company.js
152778
153284
  import * as fs72 from "fs";
152779
153285
  import * as path68 from "path";
152780
- import { createHash as createHash40, randomUUID as randomUUID13 } from "node:crypto";
153286
+ import { createHash as createHash42, randomUUID as randomUUID13 } from "node:crypto";
152781
153287
 
152782
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/scope-inventory-client.js
153288
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/scope-inventory-client.js
152783
153289
  function allowsLegacyNetwork(decision) {
152784
153290
  return decision.network === "allow-legacy";
152785
153291
  }
152786
153292
 
152787
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-rollup.js
153293
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-rollup.js
152788
153294
  function createCompanyState(company) {
152789
153295
  return {
152790
153296
  company,
@@ -152846,7 +153352,7 @@ function rollupAllComplete(plan, stateByCompany) {
152846
153352
  };
152847
153353
  }
152848
153354
 
152849
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-company.js
153355
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-company.js
152850
153356
  var PRUNED_SAMPLE_PATHS = 5;
152851
153357
  function journalErrorClass(error64) {
152852
153358
  if (error64 instanceof JournalIncompleteUpsertError)
@@ -153286,7 +153792,7 @@ async function executeCompanyFanout(options) {
153286
153792
  // Offloaded large-file blobs are fetched on demand by the CLI only.
153287
153793
  { syncMode: "all", excludePrefixes: [SESSION_LOGS_PUSH_ONLY_PREFIX, HQ_OFFLOAD_PREFIX] }
153288
153794
  ) : await resolvePullScope(options.client, target.uid, target.slug, options.hqRoot);
153289
- const catchupGrantVersion = target.personalMode === true ? void 0 : createHash40("sha256").update(JSON.stringify({
153795
+ const catchupGrantVersion = target.personalMode === true ? void 0 : createHash42("sha256").update(JSON.stringify({
153290
153796
  uid: target.uid,
153291
153797
  syncMode: scope.syncMode,
153292
153798
  prefixes: scope.prefixSet ? [...scope.prefixSet].sort() : null
@@ -153338,6 +153844,7 @@ async function executeCompanyFanout(options) {
153338
153844
  vaultConfig: options.vaultConfig,
153339
153845
  hqRoot: options.hqRoot,
153340
153846
  onConflict: options.onConflict,
153847
+ ...options.telemetryClaims ? { telemetryClaims: options.telemetryClaims } : {},
153341
153848
  skipUnchanged: true,
153342
153849
  durableFullPassProgress: isFullPassDurableProgressEnabled(),
153343
153850
  propagateDeletes: true,
@@ -153383,21 +153890,21 @@ async function executeCompanyFanout(options) {
153383
153890
  } catch {
153384
153891
  preflightFailed = true;
153385
153892
  }
153386
- const counts = {
153893
+ const counts2 = {
153387
153894
  remoteDeletes: preflightShare?.preflightCounts?.remoteDeletes ?? Number.MAX_SAFE_INTEGER,
153388
153895
  localDeletes: preflightSync?.preflightCounts?.localDeletes ?? Number.MAX_SAFE_INTEGER,
153389
153896
  pushes: preflightShare?.preflightCounts?.pushes ?? Number.MAX_SAFE_INTEGER,
153390
153897
  pulls: preflightSync?.preflightCounts?.pulls ?? Number.MAX_SAFE_INTEGER
153391
153898
  };
153392
153899
  const hasValidCounts = [
153393
- counts.remoteDeletes,
153394
- counts.localDeletes,
153395
- counts.pushes,
153396
- counts.pulls
153900
+ counts2.remoteDeletes,
153901
+ counts2.localDeletes,
153902
+ counts2.pushes,
153903
+ counts2.pulls
153397
153904
  ].every((count) => Number.isSafeInteger(count) && count >= 0) && preflightShare?.preflightCounts !== void 0 && preflightSync?.preflightCounts !== void 0;
153398
153905
  const limits = options.preflightLimits;
153399
- if (preflightFailed || !hasValidCounts || counts.remoteDeletes > limits.maxRemoteDeletes || counts.localDeletes > limits.maxLocalDeletes || counts.pushes > limits.maxPushes || counts.pulls > limits.maxPulls) {
153400
- options.emit({ type: "preflight-halt", ...counts });
153906
+ if (preflightFailed || !hasValidCounts || counts2.remoteDeletes > limits.maxRemoteDeletes || counts2.localDeletes > limits.maxLocalDeletes || counts2.pushes > limits.maxPushes || counts2.pulls > limits.maxPulls) {
153907
+ options.emit({ type: "preflight-halt", ...counts2 });
153401
153908
  preflightHalted = true;
153402
153909
  fanoutProgress?.finishTarget(target.uid);
153403
153910
  return;
@@ -153432,6 +153939,8 @@ async function executeCompanyFanout(options) {
153432
153939
  vaultConfig: options.vaultConfig,
153433
153940
  hqRoot: options.hqRoot,
153434
153941
  onConflict: options.onConflict,
153942
+ ...options.telemetryClaims ? { telemetryClaims: options.telemetryClaims } : {},
153943
+ ...options.telemetryClient ? { telemetryClient: options.telemetryClient } : {},
153435
153944
  skipUnchanged: true,
153436
153945
  durableFullPassProgress: isFullPassDurableProgressEnabled(),
153437
153946
  propagateDeletes: true,
@@ -153513,6 +154022,7 @@ async function executeCompanyFanout(options) {
153513
154022
  scopeShrinkPolicy: "auto-recover",
153514
154023
  ...options.uploadAuthor?.userSub !== void 0 ? { callerSub: options.uploadAuthor.userSub } : {},
153515
154024
  ...options.telemetryClaims ? { telemetryClaims: options.telemetryClaims } : {},
154025
+ ...options.telemetryClient ? { telemetryClient: options.telemetryClient } : {},
153516
154026
  ...pullScope.prefixSet !== void 0 ? { prefixSet: pullScope.prefixSet } : {},
153517
154027
  ...pullScope.grantPrefixCount !== void 0 ? { scopeGrantPrefixCount: pullScope.grantPrefixCount } : {},
153518
154028
  // Push-only exclusions. Company legs carry `sessions/`; personal legs
@@ -153646,6 +154156,7 @@ async function executeCompanyFanout(options) {
153646
154156
  properties: {
153647
154157
  direction: options.direction,
153648
154158
  status: state4.status,
154159
+ deviceId: syncDeviceId(),
153649
154160
  filesDownloaded: pullResult.filesDownloaded,
153650
154161
  bytesDownloaded: pullResult.bytesDownloaded,
153651
154162
  filesUploaded: pushResult.filesUploaded,
@@ -153744,6 +154255,7 @@ async function executeCompanyFanout(options) {
153744
154255
  properties: {
153745
154256
  direction: options.direction,
153746
154257
  status: transientOnly ? "transient-network" : "errored",
154258
+ deviceId: syncDeviceId(),
153747
154259
  filesDownloaded: state4.filesDownloaded,
153748
154260
  bytesDownloaded: state4.bytesDownloaded,
153749
154261
  filesUploaded: state4.filesUploaded,
@@ -153909,7 +154421,7 @@ function normalizePullChangedPaths(target, changedPaths) {
153909
154421
  });
153910
154422
  }
153911
154423
 
153912
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-telemetry.js
154424
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-telemetry.js
153913
154425
  async function emitTelemetry(options) {
153914
154426
  const telemetryFn = options.collectTelemetry ?? options.defaultCollectTelemetry;
153915
154427
  return telemetryFn().catch((err) => {
@@ -153921,15 +154433,15 @@ async function emitTelemetry(options) {
153921
154433
  });
153922
154434
  }
153923
154435
 
153924
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-loop.js
153925
- import * as os22 from "os";
154436
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-loop.js
154437
+ import * as os23 from "os";
153926
154438
  import * as path71 from "path";
153927
154439
  import * as fs75 from "fs";
153928
- import { createHash as createHash41 } from "node:crypto";
154440
+ import { createHash as createHash43 } from "node:crypto";
153929
154441
  import * as v8 from "node:v8";
153930
154442
  import { performance as performance3 } from "node:perf_hooks";
153931
154443
 
153932
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/push-failure-backoff.js
154444
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/push-failure-backoff.js
153933
154445
  var PUSH_FAILURE_BACKOFF_BASE_MS = 5e3;
153934
154446
  var PUSH_FAILURE_BACKOFF_CAP_MS = 5 * 6e4;
153935
154447
  var RoutePushFailureBackoff = class {
@@ -153956,12 +154468,12 @@ var systemPushRetryScheduler = {
153956
154468
  clearTimeout: (handle) => clearTimeout(handle)
153957
154469
  };
153958
154470
 
153959
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/event-sync.js
154471
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/event-sync.js
153960
154472
  var import_client_sqs = __toESM(require_dist_cjs42(), 1);
153961
154473
  import { readFileSync as readFileSync42 } from "node:fs";
153962
154474
  import { join as join69 } from "node:path";
153963
154475
 
153964
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/inbound-event-admission.js
154476
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/inbound-event-admission.js
153965
154477
  import * as fs73 from "node:fs";
153966
154478
  import * as path69 from "node:path";
153967
154479
  function logSwallowed13(line) {
@@ -154027,7 +154539,7 @@ function isInboundEventPlaceable(hqRoot, event) {
154027
154539
  }
154028
154540
  }
154029
154541
 
154030
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/unchanged-push-events.js
154542
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/unchanged-push-events.js
154031
154543
  import fs74 from "node:fs";
154032
154544
  import path70 from "node:path";
154033
154545
  function journalCoordinatesForPushEvent(relativePath) {
@@ -154069,7 +154581,7 @@ function unchangedPushEventPaths(events, hqRoot, lookup) {
154069
154581
  return unchanged;
154070
154582
  }
154071
154583
 
154072
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/event-sync.js
154584
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/event-sync.js
154073
154585
  function resolveEventSync(override) {
154074
154586
  return !isEventSyncLocallyDisabled(override);
154075
154587
  }
@@ -154781,7 +155293,7 @@ async function startEventSync(opts) {
154781
155293
  };
154782
155294
  }
154783
155295
 
154784
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-auto-migration.js
155296
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-auto-migration.js
154785
155297
  var AREA_AUTO_MIGRATION_STARTED_EVENT = "area_migration_started";
154786
155298
  var AREA_AUTO_MIGRATION_COMPLETED_EVENT = "area_migration_completed";
154787
155299
  var AREA_AUTO_MIGRATION_SOURCE = "sync-runner";
@@ -154934,7 +155446,7 @@ function describe3(error64) {
154934
155446
  return error64 instanceof Error ? error64.message : String(error64);
154935
155447
  }
154936
155448
 
154937
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-heap-telemetry.js
155449
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-heap-telemetry.js
154938
155450
  import * as perfHooks from "node:perf_hooks";
154939
155451
  var CENSUS_TOKEN = /^[A-Za-z][A-Za-z0-9_]{0,48}$/;
154940
155452
  var HeapCensus = class {
@@ -155921,7 +156433,7 @@ function nodeHeapReaders(v82) {
155921
156433
  };
155922
156434
  }
155923
156435
 
155924
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/sync/idle-full-reconcile.js
156436
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/sync/idle-full-reconcile.js
155925
156437
  var MAX_UNOBSERVED_TICK_GAP_MS = 6e4;
155926
156438
  var MAX_CLOCK_DRIFT_MS = 5e3;
155927
156439
  var FullPassContinuity = class {
@@ -155976,7 +156488,7 @@ function canSkipScheduledFullReconcile(proof) {
155976
156488
  return true;
155977
156489
  }
155978
156490
 
155979
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-loop.js
156491
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-loop.js
155980
156492
  var FULL_RECONCILE_EVERY_TICKS = 10;
155981
156493
  var warnedUnresolvedReceiverCompanies = /* @__PURE__ */ new Set();
155982
156494
  var EVENT_SYNC_STARTUP_SHUTDOWN_WAIT_MS = 5e3;
@@ -157294,8 +157806,8 @@ function isChoreLocalPush(paths, largeUpload) {
157294
157806
  }
157295
157807
  return count > 0;
157296
157808
  }
157297
- function recordWarmupRoutePath(counts, prefixes, routeName, routePath) {
157298
- counts.set(routeName, (counts.get(routeName) ?? 0) + 1);
157809
+ function recordWarmupRoutePath(counts2, prefixes, routeName, routePath) {
157810
+ counts2.set(routeName, (counts2.get(routeName) ?? 0) + 1);
157299
157811
  const firstSlash = routePath.indexOf("/");
157300
157812
  const secondSlash = firstSlash < 0 ? -1 : routePath.indexOf("/", firstSlash + 1);
157301
157813
  const prefix = secondSlash < 0 ? routePath || "(root)" : routePath.slice(0, secondSlash);
@@ -157306,8 +157818,8 @@ function recordWarmupRoutePath(counts, prefixes, routeName, routePath) {
157306
157818
  }
157307
157819
  byPrefix.set(prefix, (byPrefix.get(prefix) ?? 0) + 1);
157308
157820
  }
157309
- function rankedWarmupCounts(counts) {
157310
- const ranked = [...counts.entries()].sort(([leftKey, leftCount], [rightKey, rightCount]) => rightCount - leftCount || leftKey.localeCompare(rightKey));
157821
+ function rankedWarmupCounts(counts2) {
157822
+ const ranked = [...counts2.entries()].sort(([leftKey, leftCount], [rightKey, rightCount]) => rightCount - leftCount || leftKey.localeCompare(rightKey));
157311
157823
  const result = {};
157312
157824
  for (const [key, count] of ranked.slice(0, 20))
157313
157825
  result[key] = count;
@@ -157317,8 +157829,8 @@ function rankedWarmupCounts(counts) {
157317
157829
  return result;
157318
157830
  }
157319
157831
  function rankedWarmupPrefixes(candidateCounts, candidatePrefixes, eligibleCounts, eligiblePrefixes) {
157320
- const topPrefixes = (counts) => {
157321
- const ranked = [...(counts ?? /* @__PURE__ */ new Map()).entries()].sort(([leftKey, leftCount], [rightKey, rightCount]) => rightCount - leftCount || leftKey.localeCompare(rightKey));
157832
+ const topPrefixes = (counts2) => {
157833
+ const ranked = [...(counts2 ?? /* @__PURE__ */ new Map()).entries()].sort(([leftKey, leftCount], [rightKey, rightCount]) => rightCount - leftCount || leftKey.localeCompare(rightKey));
157322
157834
  const top = {};
157323
157835
  for (const [prefix, count] of ranked.slice(0, 5))
157324
157836
  top[prefix] = count;
@@ -157444,7 +157956,7 @@ async function withScopeContentHashesFile(route, events, scopedPaths, run) {
157444
157956
  }
157445
157957
  if (Object.keys(contentHashes).length === 0)
157446
157958
  return run();
157447
- const temporaryDirectory = fs75.mkdtempSync(path71.join(os22.tmpdir(), "hq-sync-pull-content-hashes-"));
157959
+ const temporaryDirectory = fs75.mkdtempSync(path71.join(os23.tmpdir(), "hq-sync-pull-content-hashes-"));
157448
157960
  const contentHashesFile = path71.join(temporaryDirectory, "hashes.json");
157449
157961
  try {
157450
157962
  fs75.writeFileSync(contentHashesFile, JSON.stringify(contentHashes), { mode: 384 });
@@ -157568,8 +158080,8 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
157568
158080
  const runPassSupportsCooperativeCheckpoint = deps.runPass === void 0 || deps.runPassSupportsCooperativeCheckpoint === true;
157569
158081
  const pollIdx = argv.indexOf("--poll-remote-ms");
157570
158082
  const explicitPollMs = pollIdx >= 0 && argv[pollIdx + 1] ? Number(argv[pollIdx + 1]) : void 0;
157571
- const sampleLoadAvg = deps.sampleLoadAvg ?? (() => os22.loadavg()[0]);
157572
- const cpuCount = os22.cpus().length;
158083
+ const sampleLoadAvg = deps.sampleLoadAvg ?? (() => os23.loadavg()[0]);
158084
+ const cpuCount = os23.cpus().length;
157573
158085
  const eventPush = argv.includes("--event-push");
157574
158086
  const fullReconcileIntervalMs = resolveFullReconcileMs();
157575
158087
  const companiesMode = argv.includes("--companies");
@@ -157727,7 +158239,7 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
157727
158239
  if (stat5.isSymbolicLink()) {
157728
158240
  actualHash = `sha256:${hashSymlinkTarget(toPortableSymlinkTarget(await fs75.promises.readlink(absolutePath)))}`;
157729
158241
  } else if (stat5.isFile()) {
157730
- const digest3 = createHash41("sha256");
158242
+ const digest3 = createHash43("sha256");
157731
158243
  await new Promise((resolve35, reject) => {
157732
158244
  const input2 = fs75.createReadStream(absolutePath);
157733
158245
  input2.on("data", (chunk) => digest3.update(chunk));
@@ -157838,6 +158350,39 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
157838
158350
  `);
157839
158351
  }
157840
158352
  });
158353
+ const syncPassTelemetryClient = deps.syncPassTelemetryClient ?? new VaultClient({
158354
+ apiUrl: runtime.apiUrl,
158355
+ authToken: deps.getAccessToken ?? runtime.defaultGetAccessToken,
158356
+ region: runtime.region
158357
+ });
158358
+ const readSyncPassTelemetryClaims = deps.getIdTokenClaims ?? runtime.defaultGetIdTokenClaims;
158359
+ const syncPassDeviceId = syncDeviceId();
158360
+ const syncPassVersion = readRunnerVersion();
158361
+ let idleSyncPassesSkipped = 0;
158362
+ let lastSyncPassEmitAt = Date.now();
158363
+ const emitSyncPassEvent = (event) => {
158364
+ if (isIdleSyncPass(event) && Date.now() - lastSyncPassEmitAt < IDLE_SYNC_PASS_FLUSH_MS) {
158365
+ idleSyncPassesSkipped += 1;
158366
+ return;
158367
+ }
158368
+ const withIdlePasses = {
158369
+ ...event,
158370
+ properties: { ...event.properties, idlePassesSkipped: idleSyncPassesSkipped }
158371
+ };
158372
+ idleSyncPassesSkipped = 0;
158373
+ lastSyncPassEmitAt = Date.now();
158374
+ void emitCloudTelemetry(syncPassTelemetryClient, withIdlePasses, {
158375
+ claims: readSyncPassTelemetryClaims(),
158376
+ log: (message) => process.stderr.write(`hq-sync-runner: ${message}
158377
+ `)
158378
+ });
158379
+ };
158380
+ const emitSyncPassOutcome = (observation, outcome) => {
158381
+ if (passExitCode(outcome) === runtime.authRequiredPassExit)
158382
+ return;
158383
+ emitSyncPassEvent(observation.finish(outcome));
158384
+ };
158385
+ const isAuthRejection = (error64) => error64 instanceof VaultAuthError || isTerminalIdentityRefusal(error64) || isRetryableIdentityRefusal(error64);
157841
158386
  const runPassWithLock = async (passArgvForRun, prepare, lane = "slow", workClass = "chore", checkpoint, telemetry, pullSignal, receiverSignal, watcherPushStage, peerOfRunningHolder = false) => {
157842
158387
  const passCheckpoint = pullSignal || receiverSignal ? Object.assign(async () => checkpoint?.(), {
157843
158388
  shouldYieldToRealtime: checkpoint?.shouldYieldToRealtime,
@@ -157868,13 +158413,21 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
157868
158413
  activePassCount += 1;
157869
158414
  selfProfileActivity.recordPass();
157870
158415
  emitSyncWorkState(true);
158416
+ const passObservation = startSyncPassObservation({ lane, workClass }, { deviceId: syncPassDeviceId, version: syncPassVersion });
157871
158417
  const trackPass = (pass4) => {
157872
158418
  const complete = () => {
157873
158419
  watcherPushStage?.("pass return");
157874
158420
  activePassCount = Math.max(0, activePassCount - 1);
157875
158421
  emitSyncWorkState(true);
157876
158422
  };
157877
- void pass4.then(complete, complete);
158423
+ void pass4.then((outcome) => {
158424
+ complete();
158425
+ emitSyncPassOutcome(passObservation, outcome);
158426
+ }, (error64) => {
158427
+ complete();
158428
+ if (!isAuthRejection(error64))
158429
+ emitSyncPassEvent(passObservation.fail());
158430
+ });
157878
158431
  return pass4;
157879
158432
  };
157880
158433
  try {
@@ -157892,6 +158445,8 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
157892
158445
  watcherPushStage?.("pass return");
157893
158446
  activePassCount = Math.max(0, activePassCount - 1);
157894
158447
  emitSyncWorkState(true);
158448
+ if (!isAuthRejection(error64))
158449
+ emitSyncPassEvent(passObservation.fail());
157895
158450
  throw error64;
157896
158451
  }
157897
158452
  };
@@ -158482,7 +159037,7 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
158482
159037
  let durableWatcherPersistQueue = Promise.resolve();
158483
159038
  let durableWatcherPersistGeneration = 0;
158484
159039
  let durableWatcherPersistedGeneration = 0;
158485
- const watcherPushStatePath = path71.join(getStateDir(), "sync-runner", `watcher-push-${createHash41("sha256").update(hqRoot).digest("hex").slice(0, 20)}.json`);
159040
+ const watcherPushStatePath = path71.join(getStateDir(), "sync-runner", `watcher-push-${createHash43("sha256").update(hqRoot).digest("hex").slice(0, 20)}.json`);
158486
159041
  const persistDurableWatcherPaths = () => {
158487
159042
  const generation = durableWatcherPersistGeneration;
158488
159043
  if (generation === durableWatcherPersistedGeneration)
@@ -161315,7 +161870,7 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
161315
161870
  }
161316
161871
  }
161317
161872
 
161318
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-auth-wait.js
161873
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-auth-wait.js
161319
161874
  var AUTH_WAIT_INITIAL_RECHECK_MS = 6e4;
161320
161875
  var AUTH_WAIT_STEADY_RECHECK_MS = 5 * 6e4;
161321
161876
  var AUTH_WAIT_LIVENESS_INTERVAL_MS = 30 * 6e4;
@@ -161388,7 +161943,7 @@ async function waitForValidAuth(opts) {
161388
161943
  return "stopped";
161389
161944
  }
161390
161945
 
161391
- // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.97/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
161946
+ // node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.98/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
161392
161947
  var SESSION_LOG_CAPTURE_QUIET_FOR_MS = 10 * 6e4;
161393
161948
  var SESSION_LOG_CAPTURE_MAX_STALENESS_MS = 60 * 6e4;
161394
161949
  var DEFAULT_COGNITO = {
@@ -161398,7 +161953,7 @@ var DEFAULT_COGNITO = {
161398
161953
  port: process.env.HQ_COGNITO_CALLBACK_PORT ? Number(process.env.HQ_COGNITO_CALLBACK_PORT) : 8765
161399
161954
  };
161400
161955
  var DEFAULT_VAULT_API_URL = process.env.HQ_VAULT_API_URL ?? "https://hqapi.hq.computer";
161401
- var DEFAULT_HQ_ROOT = path72.join(os23.homedir(), "hq");
161956
+ var DEFAULT_HQ_ROOT = path72.join(os24.homedir(), "hq");
161402
161957
  var DEFAULT_TELEMETRY_TIMEOUT_MS = 12e4;
161403
161958
  function resolveTelemetryTimeoutMs(override) {
161404
161959
  if (override !== void 0 && Number.isFinite(override) && override >= 0) {
@@ -162401,7 +162956,8 @@ async function runRunner(argv, deps = {}) {
162401
162956
  appliedUpserts: fanout.appliedUpserts,
162402
162957
  appliedDeletes: fanout.appliedDeletes ?? [],
162403
162958
  uploadedPaths: fanout.uploadedPaths,
162404
- partial: rollup.partial
162959
+ partial: rollup.partial,
162960
+ conflictCount: allConflicts.length
162405
162961
  });
162406
162962
  if (parsed.companies && parsed.direction !== "push") {
162407
162963
  const completedCompanySlugs = new Set(Array.from(fanout.stateByCompany.entries()).filter(([, state4]) => state4.status === "complete").map(([slug]) => slug));
@@ -162629,7 +163185,7 @@ async function runRunner(argv, deps = {}) {
162629
163185
  const qmdNow = qmdAdmission?.now ?? Date.now;
162630
163186
  const qmdPlatform = qmdAdmission?.platform ?? process.platform;
162631
163187
  const qmdEnv = qmdAdmission?.env ?? process.env;
162632
- const qmdHome = qmdAdmission?.home ?? qmdEnv.HOME ?? os23.homedir();
163188
+ const qmdHome = qmdAdmission?.home ?? qmdEnv.HOME ?? os24.homedir();
162633
163189
  const qmdRunnerFinishedByRoot = deps.qmdRunnerFinishedByRoot ?? (deps.qmdRunnerFinishedByRoot = /* @__PURE__ */ new Map());
162634
163190
  const qmdLockHeld = isQmdBackgroundLockHeld(qmdHome, { nowMs: qmdNow() });
162635
163191
  if (qmdRunnerShouldSkip({
@@ -162977,19 +163533,19 @@ async function runRunnerWithLoop(argv, deps = {}) {
162977
163533
  unique.set(`${record2.company}\0${record2.path}`, record2);
162978
163534
  }
162979
163535
  watcherCatchupSkipStore.commit([...unique.values()].map((record2) => ({ ...record2, recordedAt })));
162980
- const counts = {
163536
+ const counts2 = {
162981
163537
  "archived-session-log": 0,
162982
163538
  "access-denied": 0,
162983
163539
  "cap-evicted": watcherCatchupSkipStore.takeCapEvictedCount()
162984
163540
  };
162985
163541
  for (const record2 of unique.values())
162986
- counts[record2.reason] += 1;
163542
+ counts2[record2.reason] += 1;
162987
163543
  process.stderr.write(`${JSON.stringify({
162988
163544
  type: "watcher-push-skip-summary",
162989
163545
  diagnostic: true,
162990
163546
  elapsedMs: Date.now() - passStartedAt,
162991
163547
  recordedPaths: unique.size,
162992
- countsByReason: counts
163548
+ countsByReason: counts2
162993
163549
  })}
162994
163550
  `);
162995
163551
  }