@indigoai-us/hq-cloud 6.11.4 → 6.11.6
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.d.ts +16 -16
- package/dist/bin/sync-runner.d.ts.map +1 -1
- package/dist/bin/sync-runner.js +50 -41
- package/dist/bin/sync-runner.js.map +1 -1
- package/dist/bin/sync-runner.test.js +107 -33
- package/dist/bin/sync-runner.test.js.map +1 -1
- package/dist/context.d.ts +6 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +57 -17
- package/dist/context.js.map +1 -1
- package/dist/context.test.js +113 -1
- package/dist/context.test.js.map +1 -1
- package/dist/entity-resolver.test.js +3 -3
- package/dist/entity-resolver.test.js.map +1 -1
- package/dist/object-io.d.ts.map +1 -1
- package/dist/object-io.js +10 -0
- package/dist/object-io.js.map +1 -1
- package/dist/personal-vault-exclusions.d.ts.map +1 -1
- package/dist/personal-vault-exclusions.js +11 -0
- package/dist/personal-vault-exclusions.js.map +1 -1
- package/dist/personal-vault-exclusions.test.js +5 -0
- package/dist/personal-vault-exclusions.test.js.map +1 -1
- package/dist/signals/get.d.ts.map +1 -1
- package/dist/signals/get.js +7 -11
- package/dist/signals/get.js.map +1 -1
- package/dist/signals/get.test.js +65 -1
- package/dist/signals/get.test.js.map +1 -1
- package/dist/signals/internals.d.ts +47 -3
- package/dist/signals/internals.d.ts.map +1 -1
- package/dist/signals/internals.js +110 -4
- package/dist/signals/internals.js.map +1 -1
- package/dist/signals/list.d.ts.map +1 -1
- package/dist/signals/list.js +16 -23
- package/dist/signals/list.js.map +1 -1
- package/dist/signals/list.test.js +84 -1
- package/dist/signals/list.test.js.map +1 -1
- package/dist/signals/types.d.ts +18 -1
- package/dist/signals/types.d.ts.map +1 -1
- package/dist/sources/get.d.ts.map +1 -1
- package/dist/sources/get.js +10 -22
- package/dist/sources/get.js.map +1 -1
- package/dist/sources/get.test.js +85 -1
- package/dist/sources/get.test.js.map +1 -1
- package/dist/sources/internals.d.ts +50 -3
- package/dist/sources/internals.d.ts.map +1 -1
- package/dist/sources/internals.js +113 -4
- package/dist/sources/internals.js.map +1 -1
- package/dist/sources/list.d.ts.map +1 -1
- package/dist/sources/list.js +16 -23
- package/dist/sources/list.js.map +1 -1
- package/dist/sources/list.test.js +101 -1
- package/dist/sources/list.test.js.map +1 -1
- package/dist/sources/types.d.ts +18 -1
- package/dist/sources/types.d.ts.map +1 -1
- package/dist/sync/event-sync.d.ts +6 -7
- package/dist/sync/event-sync.d.ts.map +1 -1
- package/dist/sync/event-sync.js +6 -7
- package/dist/sync/event-sync.js.map +1 -1
- package/dist/types.d.ts +33 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +20 -0
- package/dist/version.js.map +1 -0
- package/package.json +1 -1
- package/src/bin/sync-runner.test.ts +130 -41
- package/src/bin/sync-runner.ts +55 -48
- package/src/context.test.ts +139 -1
- package/src/context.ts +59 -17
- package/src/entity-resolver.test.ts +3 -3
- package/src/object-io.ts +12 -0
- package/src/personal-vault-exclusions.test.ts +5 -0
- package/src/personal-vault-exclusions.ts +11 -0
- package/src/signals/get.test.ts +83 -1
- package/src/signals/get.ts +9 -13
- package/src/signals/internals.ts +153 -4
- package/src/signals/list.test.ts +114 -1
- package/src/signals/list.ts +16 -29
- package/src/signals/types.ts +18 -1
- package/src/sources/get.test.ts +104 -1
- package/src/sources/get.ts +12 -24
- package/src/sources/internals.ts +156 -4
- package/src/sources/list.test.ts +132 -1
- package/src/sources/list.ts +16 -29
- package/src/sources/types.ts +18 -1
- package/src/sync/event-sync.ts +6 -7
- package/src/types.ts +33 -3
- package/src/version.ts +24 -0
package/src/types.ts
CHANGED
|
@@ -155,9 +155,26 @@ export interface EntityContext {
|
|
|
155
155
|
bucketName: string;
|
|
156
156
|
/** AWS region */
|
|
157
157
|
region: string;
|
|
158
|
-
/**
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
/**
|
|
159
|
+
* STS-scoped credentials.
|
|
160
|
+
*
|
|
161
|
+
* Absent for presign-only COMPANY contexts (HQ-59): when a run uses the
|
|
162
|
+
* presigned-URL transport for company vaults (`companyVaultUsesPresign`),
|
|
163
|
+
* `resolveEntityContext` skips the `POST /sts/vend` call entirely — the
|
|
164
|
+
* presign transport authorizes each object server-side and never reads these
|
|
165
|
+
* creds, and a compliant sync-runner must NOT hit the company vend route
|
|
166
|
+
* (the route-presence signal the hq-pro min-version gate keys on). The only
|
|
167
|
+
* reader of these creds is the direct-S3 (`S3SdkObjectIO`) path, which is
|
|
168
|
+
* used for personal vaults (`prs_*`, still vended) and pre-presign clients —
|
|
169
|
+
* never for a `cmp_*` context built on the presign path. That path throws
|
|
170
|
+
* loudly if it ever receives a credential-less context.
|
|
171
|
+
*/
|
|
172
|
+
credentials?: VaultCredentials;
|
|
173
|
+
/**
|
|
174
|
+
* When the credentials expire (ISO 8601). For a presign-only company context
|
|
175
|
+
* (no STS vend) this is a far-future sentinel so `isExpiringSoon` is always
|
|
176
|
+
* false and no auto-refresh ever re-vends the skipped company route.
|
|
177
|
+
*/
|
|
161
178
|
expiresAt: string;
|
|
162
179
|
}
|
|
163
180
|
|
|
@@ -209,6 +226,19 @@ export interface VaultServiceConfig {
|
|
|
209
226
|
* Optional for back-compat, but all first-party clients should pass it.
|
|
210
227
|
*/
|
|
211
228
|
clientInfo?: ClientInfo;
|
|
229
|
+
/**
|
|
230
|
+
* When true, COMPANY vaults (`cmp_*`) use the presigned-URL transport, so
|
|
231
|
+
* `resolveEntityContext` SKIPS `POST /sts/vend` for them and returns a
|
|
232
|
+
* credential-less context with a far-future `expiresAt` (HQ-59). Set by the
|
|
233
|
+
* sync-runner exactly when it installs the presign transport factory, so the
|
|
234
|
+
* vend-skip and the transport choice can never diverge. Personal vaults
|
|
235
|
+
* (`prs_*`) are unaffected — they always vend self via `/sts/vend-self`.
|
|
236
|
+
*
|
|
237
|
+
* Leaving this unset (the default) preserves the historical behavior: every
|
|
238
|
+
* context vends STS creds. Non-runner callers (standalone `hq sync`, hq-cli)
|
|
239
|
+
* that keep the direct-S3 path for company vaults must NOT set this.
|
|
240
|
+
*/
|
|
241
|
+
companyVaultUsesPresign?: boolean;
|
|
212
242
|
}
|
|
213
243
|
|
|
214
244
|
// ── Conflict index (consumed by /resolve-conflicts) ─────────────────────────
|
package/src/version.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hq-cloud package version, read once at module load.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors hq-cli's `cli-version.ts` pattern: resolve the version from the
|
|
5
|
+
* package.json at runtime via `import.meta.url` (rootDir-safe — no JSON import
|
|
6
|
+
* that would trip `tsc`'s rootDir, and resolves correctly from both `src/`
|
|
7
|
+
* during tests and `dist/` at runtime). Used to stamp `clientInfo.version` on
|
|
8
|
+
* the sync-runner's vault requests so the company-vend min-version gate (HQ-59,
|
|
9
|
+
* hq-pro) can tell a compliant (>= 6.11.6) sync-runner from a pre-6.11.6
|
|
10
|
+
* straggler. This is the hq-cloud package version — the version the gate
|
|
11
|
+
* compares against its floor — NOT the hq-sync desktop app version.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { readFileSync } from "node:fs";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
16
|
+
import path from "node:path";
|
|
17
|
+
|
|
18
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
// src/version.ts → dist/version.js; one level up from either is the package root.
|
|
20
|
+
const pkg = JSON.parse(
|
|
21
|
+
readFileSync(path.resolve(here, "..", "package.json"), "utf-8"),
|
|
22
|
+
) as { name: string; version: string };
|
|
23
|
+
|
|
24
|
+
export const HQ_CLOUD_VERSION: string = pkg.version;
|