@indigoai-us/hq-cloud 6.18.87 → 6.18.89

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 (69) hide show
  1. package/dist/bin/sync-runner-company.d.ts.map +1 -1
  2. package/dist/bin/sync-runner-company.js +16 -0
  3. package/dist/bin/sync-runner-company.js.map +1 -1
  4. package/dist/bin/sync-runner.d.ts +5 -0
  5. package/dist/bin/sync-runner.d.ts.map +1 -1
  6. package/dist/bin/sync-runner.js.map +1 -1
  7. package/dist/cli/reconcile-skip-reason.d.ts +23 -0
  8. package/dist/cli/reconcile-skip-reason.d.ts.map +1 -0
  9. package/dist/cli/reconcile-skip-reason.js +60 -0
  10. package/dist/cli/reconcile-skip-reason.js.map +1 -0
  11. package/dist/cli/rescue-core.d.ts +16 -1
  12. package/dist/cli/rescue-core.d.ts.map +1 -1
  13. package/dist/cli/rescue-core.js +83 -27
  14. package/dist/cli/rescue-core.js.map +1 -1
  15. package/dist/cli/share.d.ts +31 -1
  16. package/dist/cli/share.d.ts.map +1 -1
  17. package/dist/cli/share.js +193 -28
  18. package/dist/cli/share.js.map +1 -1
  19. package/dist/cli/sync.d.ts +36 -2
  20. package/dist/cli/sync.d.ts.map +1 -1
  21. package/dist/cli/sync.js +135 -27
  22. package/dist/cli/sync.js.map +1 -1
  23. package/dist/local-link-warning.d.ts +48 -0
  24. package/dist/local-link-warning.d.ts.map +1 -0
  25. package/dist/local-link-warning.js +138 -0
  26. package/dist/local-link-warning.js.map +1 -0
  27. package/dist/object-io.d.ts +16 -1
  28. package/dist/object-io.d.ts.map +1 -1
  29. package/dist/object-io.js +25 -2
  30. package/dist/object-io.js.map +1 -1
  31. package/dist/outposts/cli-billing.d.ts +2 -0
  32. package/dist/outposts/cli-billing.d.ts.map +1 -1
  33. package/dist/outposts/cli-billing.js +13 -1
  34. package/dist/outposts/cli-billing.js.map +1 -1
  35. package/dist/outposts/client.d.ts +37 -6
  36. package/dist/outposts/client.d.ts.map +1 -1
  37. package/dist/outposts/client.js +100 -18
  38. package/dist/outposts/client.js.map +1 -1
  39. package/dist/outposts/command.d.ts +11 -5
  40. package/dist/outposts/command.d.ts.map +1 -1
  41. package/dist/outposts/command.js +945 -63
  42. package/dist/outposts/command.js.map +1 -1
  43. package/dist/outposts/company-outposts.d.ts +92 -0
  44. package/dist/outposts/company-outposts.d.ts.map +1 -0
  45. package/dist/outposts/company-outposts.js +194 -0
  46. package/dist/outposts/company-outposts.js.map +1 -0
  47. package/dist/outposts/company.d.ts +67 -9
  48. package/dist/outposts/company.d.ts.map +1 -1
  49. package/dist/outposts/company.js +211 -11
  50. package/dist/outposts/company.js.map +1 -1
  51. package/dist/outposts/errors.d.ts +7 -0
  52. package/dist/outposts/errors.d.ts.map +1 -1
  53. package/dist/outposts/errors.js +7 -0
  54. package/dist/outposts/errors.js.map +1 -1
  55. package/dist/outposts/host-deps.d.ts +2 -0
  56. package/dist/outposts/host-deps.d.ts.map +1 -1
  57. package/dist/outposts/host-deps.js +12 -0
  58. package/dist/outposts/host-deps.js.map +1 -1
  59. package/dist/s3.d.ts +7 -1
  60. package/dist/s3.d.ts.map +1 -1
  61. package/dist/s3.js +33 -12
  62. package/dist/s3.js.map +1 -1
  63. package/dist/sync-progress.d.ts.map +1 -1
  64. package/dist/sync-progress.js +3 -0
  65. package/dist/sync-progress.js.map +1 -1
  66. package/dist/vault-client.d.ts.map +1 -1
  67. package/dist/vault-client.js +5 -1
  68. package/dist/vault-client.js.map +1 -1
  69. package/package.json +1 -1
@@ -1822,6 +1822,40 @@ function rsyncFilterRuleMatches(rawPattern, rel, isDir) {
1822
1822
  const subject = !anchored && !hasSlash ? rel.slice(rel.lastIndexOf("/") + 1) : rel;
1823
1823
  return new RegExp(source).test(subject);
1824
1824
  }
1825
+ /**
1826
+ * The rsync filter list for the full (preserve-list) overlay.
1827
+ *
1828
+ * Root-only names are anchored with a leading `/`. rsync matches an
1829
+ * unanchored name at any depth, so `--exclude=workspace` also dropped
1830
+ * `companies/_template/workspace/` and `companies/_template/repos/`, and the
1831
+ * later `_template` include could not bring them back because the first
1832
+ * matching rule wins. `.git` stays unanchored: no nested git directory may be
1833
+ * copied from the release. `--preserve` entries are passed through as given.
1834
+ */
1835
+ export function fullOverlayRsyncFilters(extraPreserve = []) {
1836
+ const filters = [
1837
+ "--exclude=.git",
1838
+ "--exclude=/personal",
1839
+ "--exclude=/workspace",
1840
+ "--exclude=/repos",
1841
+ "--exclude=/.github",
1842
+ "--exclude=/.leak-scan",
1843
+ "--exclude=/.hq-sync-journal.json",
1844
+ "--exclude=/.hq",
1845
+ "--exclude=/.hq-conflicts",
1846
+ "--exclude=/.local",
1847
+ "--exclude=/worktrees",
1848
+ "--exclude=/.worktrees",
1849
+ "--exclude=/.sst-sandbox-home",
1850
+ "--exclude=/.tmp-codex-asar",
1851
+ "--include=/companies/",
1852
+ "--include=/companies/_template/***",
1853
+ "--exclude=/companies/*",
1854
+ ];
1855
+ for (const p of extraPreserve)
1856
+ filters.push(`--exclude=${p}`);
1857
+ return filters;
1858
+ }
1825
1859
  /**
1826
1860
  * True when rsync's overlay, run with `filters` (the rescue's `--include=` and
1827
1861
  * `--exclude=` list), would transfer `rel`. Every ancestor directory is
@@ -1919,10 +1953,31 @@ function windowsLinkIsUsable(destination, resolvedTarget, targetIsDir) {
1919
1953
  /**
1920
1954
  * Replace `destination` with a native link to the release target unless it
1921
1955
  * is already usable or holds user content. Returns false when left alone.
1956
+ *
1957
+ * Node on Windows returns EACCES from lstat/stat on a WSL LX_SYMLINK reparse
1958
+ * point (feedback_3e1a7445). Treat that as an opaque existing entry and
1959
+ * replace it; do not confuse it with a missing path, or the create step
1960
+ * fails with EEXIST and the broken link stays.
1922
1961
  */
1923
1962
  function replaceWithNativeLink(destination, linkText, resolved, targetIsDir, ops) {
1924
- const lst = lstatOrNull(destination);
1925
- if (lst) {
1963
+ let lst;
1964
+ let opaque = false;
1965
+ try {
1966
+ lst = ops.lstat ? ops.lstat(destination) : fs.lstatSync(destination);
1967
+ }
1968
+ catch (error) {
1969
+ const code = error.code;
1970
+ if (code === "ENOENT") {
1971
+ lst = undefined;
1972
+ }
1973
+ else {
1974
+ opaque = true;
1975
+ }
1976
+ }
1977
+ if (opaque) {
1978
+ removeLinkEntry(destination);
1979
+ }
1980
+ else if (lst) {
1926
1981
  if (lst.isDirectory() && !lst.isSymbolicLink())
1927
1982
  return false;
1928
1983
  if (windowsLinkIsUsable(destination, resolved, targetIsDir))
@@ -1971,13 +2026,15 @@ function replaceWithNativeLink(destination, linkText, resolved, targetIsDir, ops
1971
2026
  * links that already resolve to the release target, paths the overlay's
1972
2027
  * filters exclude, and targets that are missing or leave `hqRoot`.
1973
2028
  * Returns the repo-relative paths that were rewritten and any that could not
1974
- * be. No-op off Windows.
2029
+ * be. `fallbackCount` is how many of those used a junction or file copy
2030
+ * because the account cannot create a symlink. No-op off Windows.
1975
2031
  */
1976
2032
  export function normalizeWindowsGitSymlinks(srcDir, hqRoot, filters, env = process.env, platform = process.platform, ops = defaultWindowsLinkOps) {
1977
2033
  const repaired = [];
1978
2034
  const failed = [];
2035
+ let fallbackCount = 0;
1979
2036
  if (platform !== "win32")
1980
- return { repaired, failed };
2037
+ return { repaired, failed, fallbackCount };
1981
2038
  for (const { rel, sha } of gitSymlinkEntries(srcDir, env)) {
1982
2039
  if (!rsyncFiltersAdmit(filters, rel))
1983
2040
  continue;
@@ -1992,17 +2049,33 @@ export function normalizeWindowsGitSymlinks(srcDir, hqRoot, filters, env = proce
1992
2049
  if (!targetIsDir && !isFileFollow(resolved))
1993
2050
  continue;
1994
2051
  const destination = path.join(hqRoot, rel);
2052
+ const beforeCalls = {
2053
+ junction: 0,
2054
+ copyFile: 0,
2055
+ };
2056
+ const countingOps = {
2057
+ ...ops,
2058
+ junction(resolvedTarget, dest) {
2059
+ beforeCalls.junction += 1;
2060
+ ops.junction(resolvedTarget, dest);
2061
+ },
2062
+ copyFile(resolvedTarget, dest) {
2063
+ beforeCalls.copyFile += 1;
2064
+ ops.copyFile(resolvedTarget, dest);
2065
+ },
2066
+ };
1995
2067
  try {
1996
- if (!replaceWithNativeLink(destination, linkText, resolved, targetIsDir, ops))
2068
+ if (!replaceWithNativeLink(destination, linkText, resolved, targetIsDir, countingOps))
1997
2069
  continue;
1998
2070
  }
1999
2071
  catch (error) {
2000
2072
  failed.push({ rel, reason: error instanceof Error ? error.message : String(error) });
2001
2073
  continue;
2002
2074
  }
2075
+ fallbackCount += beforeCalls.junction + beforeCalls.copyFile;
2003
2076
  repaired.push(rel);
2004
2077
  }
2005
- return { repaired: repaired.sort(), failed };
2078
+ return { repaired: repaired.sort(), failed, fallbackCount };
2006
2079
  }
2007
2080
  function recoveryProof(unresolved, cfg, hqRoot, srcDir, srcSha, rsyncLauncher, rsyncExcludes, env) {
2008
2081
  const newest = [...unresolved].sort((left, right) => right.entry.completedMs - left.entry.completedMs ||
@@ -2330,27 +2403,7 @@ function doRescue(cfg, env, out, err, setTmp, retainTmp, gitReachabilityProbeTim
2330
2403
  pruneNames.push(...ALWAYS_PRESERVED_NAMES);
2331
2404
  for (const p of cfg.extraPreserve)
2332
2405
  pruneNames.push(p);
2333
- rsyncExcludes = [
2334
- "--exclude=.git",
2335
- "--exclude=personal",
2336
- "--exclude=workspace",
2337
- "--exclude=repos",
2338
- "--exclude=.github",
2339
- "--exclude=.leak-scan",
2340
- "--exclude=.hq-sync-journal.json",
2341
- "--exclude=.hq",
2342
- "--exclude=.hq-conflicts",
2343
- "--exclude=/.local",
2344
- "--exclude=/worktrees",
2345
- "--exclude=/.worktrees",
2346
- "--exclude=/.sst-sandbox-home",
2347
- "--exclude=/.tmp-codex-asar",
2348
- "--include=/companies/",
2349
- "--include=/companies/_template/***",
2350
- "--exclude=/companies/*",
2351
- ];
2352
- for (const p of cfg.extraPreserve)
2353
- rsyncExcludes.push(`--exclude=${p}`);
2406
+ rsyncExcludes = fullOverlayRsyncFilters(cfg.extraPreserve);
2354
2407
  }
2355
2408
  // --- Compute the wipe-set top-level roots ---
2356
2409
  const wipeToplevel = [];
@@ -2819,6 +2872,9 @@ function doRescue(cfg, env, out, err, setTmp, retainTmp, gitReachabilityProbeTim
2819
2872
  if (nativeLinks.repaired.length > 0) {
2820
2873
  out(`==> Rewrote ${nativeLinks.repaired.length} symlink(s) in native Windows form: ${nativeLinks.repaired.join(", ")}\n`);
2821
2874
  }
2875
+ if (nativeLinks.fallbackCount > 0) {
2876
+ err("warning: this Windows account cannot create symbolic links (Developer Mode is off, or HQ is not running elevated). Folder links were created as directory junctions, and file links as copies. Enable Developer Mode in Windows Settings so the next update can use normal links.\n");
2877
+ }
2822
2878
  for (const failure of nativeLinks.failed) {
2823
2879
  err(`warning: could not rewrite ${failure.rel} as a native Windows link: ${failure.reason}\n`);
2824
2880
  }