@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.
- package/dist/bin/sync-runner.test.js +19 -0
- package/dist/bin/sync-runner.test.js.map +1 -1
- package/dist/cli/rescue-core.js +108 -8
- package/dist/cli/rescue-core.js.map +1 -1
- package/dist/cli/sync-scope.test.js +31 -0
- package/dist/cli/sync-scope.test.js.map +1 -1
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +17 -1
- package/dist/cli/sync.js.map +1 -1
- package/dist/sync/pull-scope.d.ts.map +1 -1
- package/dist/sync/pull-scope.js +15 -0
- package/dist/sync/pull-scope.js.map +1 -1
- package/package.json +1 -1
- package/src/bin/sync-runner.test.ts +24 -0
- package/src/cli/rescue-core.ts +120 -8
- package/src/cli/sync-scope.test.ts +37 -0
- package/src/cli/sync.ts +18 -1
- package/src/sync/pull-scope.ts +14 -0
|
@@ -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")],
|