@indigoai-us/hq-cloud 6.11.1 → 6.11.3

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.
@@ -2657,6 +2657,25 @@ describe("resolvePullScope", () => {
2657
2657
  }), "cmp_a", "acme");
2658
2658
  expect(scope).toEqual({ syncMode: "all" });
2659
2659
  });
2660
+ it("returns all for an AGENT membership WITHOUT calling sync-config (HQ-1R: agents own no person entity → server 403s the person-gate)", async () => {
2661
+ let called = false;
2662
+ const scope = await resolvePullScope(stubClient({
2663
+ listMyMemberships: async () => [membership("cmp_a", "agt_007#cmp_a")],
2664
+ // Even if the server WOULD return a scoped config, the guard must
2665
+ // short-circuit BEFORE the call (the real endpoint 403s an agent).
2666
+ getMembershipSyncConfig: async () => {
2667
+ called = true;
2668
+ return {
2669
+ membershipId: "agt_007#cmp_a",
2670
+ syncMode: "custom",
2671
+ customPaths: ["secret/"],
2672
+ isDefault: false,
2673
+ };
2674
+ },
2675
+ }), "cmp_a", "acme");
2676
+ expect(called).toBe(false); // never hit the always-403 endpoint for an agent
2677
+ expect(scope).toEqual({ syncMode: "all" });
2678
+ });
2660
2679
  it("coalesces explicit grants for a shared-mode membership", async () => {
2661
2680
  const scope = await resolvePullScope(stubClient({
2662
2681
  listMyMemberships: async () => [membership("cmp_a", "mk_a")],