@indigoai-us/hq-cloud 5.46.0 → 5.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/bin/sync-runner.d.ts +12 -0
  2. package/dist/bin/sync-runner.d.ts.map +1 -1
  3. package/dist/bin/sync-runner.js +39 -0
  4. package/dist/bin/sync-runner.js.map +1 -1
  5. package/dist/bin/sync-runner.test.js +27 -1
  6. package/dist/bin/sync-runner.test.js.map +1 -1
  7. package/dist/cli/share.d.ts.map +1 -1
  8. package/dist/cli/share.js +17 -2
  9. package/dist/cli/share.js.map +1 -1
  10. package/dist/cli/share.test.js +2 -0
  11. package/dist/cli/share.test.js.map +1 -1
  12. package/dist/cli/sync-scope.test.js +1 -0
  13. package/dist/cli/sync-scope.test.js.map +1 -1
  14. package/dist/cli/sync.d.ts.map +1 -1
  15. package/dist/cli/sync.js +11 -1
  16. package/dist/cli/sync.js.map +1 -1
  17. package/dist/cli/sync.test.js +1 -0
  18. package/dist/cli/sync.test.js.map +1 -1
  19. package/dist/object-io.d.ts +218 -0
  20. package/dist/object-io.d.ts.map +1 -0
  21. package/dist/object-io.js +588 -0
  22. package/dist/object-io.js.map +1 -0
  23. package/dist/object-io.test.d.ts +11 -0
  24. package/dist/object-io.test.d.ts.map +1 -0
  25. package/dist/object-io.test.js +568 -0
  26. package/dist/object-io.test.js.map +1 -0
  27. package/dist/s3.d.ts +37 -0
  28. package/dist/s3.d.ts.map +1 -1
  29. package/dist/s3.js +225 -201
  30. package/dist/s3.js.map +1 -1
  31. package/dist/s3.test.js +21 -0
  32. package/dist/s3.test.js.map +1 -1
  33. package/dist/vault-client.d.ts +68 -0
  34. package/dist/vault-client.d.ts.map +1 -1
  35. package/dist/vault-client.js +35 -0
  36. package/dist/vault-client.js.map +1 -1
  37. package/package.json +1 -1
  38. package/scripts/presign-transport-e2e.mjs +203 -0
  39. package/scripts/vault-rebaseline.sh +275 -0
  40. package/scripts/vault-rescue.sh +8 -0
  41. package/src/bin/sync-runner.test.ts +41 -0
  42. package/src/bin/sync-runner.ts +52 -0
  43. package/src/cli/share.test.ts +2 -0
  44. package/src/cli/share.ts +29 -2
  45. package/src/cli/sync-scope.test.ts +1 -0
  46. package/src/cli/sync.test.ts +1 -0
  47. package/src/cli/sync.ts +22 -1
  48. package/src/object-io.test.ts +663 -0
  49. package/src/object-io.ts +782 -0
  50. package/src/s3.test.ts +24 -0
  51. package/src/s3.ts +277 -237
  52. package/src/vault-client.ts +101 -0
package/src/s3.test.ts CHANGED
@@ -682,6 +682,30 @@ describe("downloadFile", () => {
682
682
  expect(fs.readFileSync(localPath, "utf-8")).toBe("hi");
683
683
  });
684
684
 
685
+ it("recovers a symlink from the body prefix when the metadata marker is lost (header-loss fallback)", async () => {
686
+ // Regression: a transport/replication/console-copy that drops user
687
+ // metadata — or a poisoned regular-file re-upload of a sentinel —
688
+ // leaves an object with NO hq-symlink-target marker but a body of
689
+ // `hq-symlink:<target>`. The read path must honor the body prefix as
690
+ // a fallback discriminator and rematerialize a real link, NOT write
691
+ // out the `hq-symlink:` text as a regular file (which poisons the key
692
+ // on the next push). See s3.ts downloadFile + SYMLINK_BODY_PREFIX doc.
693
+ const target = "../../../some/real/target.md";
694
+ nextGetObjectResponse = {
695
+ Body: (async function* () {
696
+ yield new TextEncoder().encode(SYMLINK_BODY_PREFIX + target);
697
+ })(),
698
+ Metadata: {}, // marker stripped / never set
699
+ };
700
+
701
+ const localPath = path.join(tmpRoot, "marker-lost-link.md");
702
+ await downloadFile(makeCtx(), "marker-lost-link.md", localPath);
703
+
704
+ const lstat = fs.lstatSync(localPath);
705
+ expect(lstat.isSymbolicLink()).toBe(true);
706
+ expect(fs.readlinkSync(localPath)).toBe(target);
707
+ });
708
+
685
709
  it("replaces a stale local symlink with a regular file when remote transitions symlink → regular", async () => {
686
710
  // Codex P2 follow-up: pre-fix, the regular-file branch went
687
711
  // straight to writeFileSync. If localPath was a stale symlink from