@indigoai-us/hq-cli 5.82.0 → 5.83.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.83.0]
6
+
7
+ ### Added
8
+
9
+ - Checkpoint Stop-gate eligibility now also accepts outpost machine
10
+ identities whose `custom:delegatedEmail` claim carries an eligible
11
+ domain (default `getindigo.ai`, plus `HQ_CHECKPOINT_GATE_DOMAINS`),
12
+ so outposts provisioned by eligible users enforce the gate; other
13
+ orgs' outposts remain ineligible. Output/verdict stay `1`/`0` with
14
+ no claim values ever printed. (#291)
15
+
5
16
  ## [5.82.0]
6
17
 
7
18
  ### Added
@@ -318,17 +318,21 @@ function gateEligibility() {
318
318
  const tokens = JSON.parse(fs.readFileSync(tokenPath, "utf8"));
319
319
  if (typeof tokens.idToken !== "string")
320
320
  return false;
321
- const email = peekIdToken(tokens.idToken).email;
322
- if (typeof email !== "string")
323
- return false;
324
- const domain = email.split("@").at(-1)?.toLowerCase();
325
- if (!domain)
326
- return false;
321
+ const claims = peekIdToken(tokens.idToken);
322
+ const candidateEmails = [claims.email, claims["custom:delegatedEmail"]];
327
323
  const configured = (process.env.HQ_CHECKPOINT_GATE_DOMAINS ?? "")
328
324
  .split(",")
329
325
  .map((candidate) => candidate.trim().toLowerCase())
330
326
  .filter(Boolean);
331
- return domain === "getindigo.ai" || configured.includes(domain);
327
+ const hasEligibleDomain = (candidate) => {
328
+ if (typeof candidate !== "string")
329
+ return false;
330
+ const domain = candidate.split("@").at(-1)?.toLowerCase();
331
+ if (!domain)
332
+ return false;
333
+ return domain === "getindigo.ai" || configured.includes(domain);
334
+ };
335
+ return candidateEmails.some(hasEligibleDomain);
332
336
  }
333
337
  catch {
334
338
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.82.0",
3
+ "version": "5.83.0",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {