@indigoai-us/hq-cli 5.84.0 → 5.85.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,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.85.0]
6
+
7
+ ### Changed
8
+
9
+ - Checkpoint Stop-gate eligibility is now runtime-specific: Claude Code is
10
+ enabled for every HQ account, Codex is enabled only for the designated
11
+ operator account (including delegated identities), and other Codex accounts
12
+ and runtimes remain disabled. Runtime-specific verdict caches prevent one
13
+ host's eligibility from leaking into another. (#295)
14
+
5
15
  ## [5.84.0]
6
16
 
7
17
  ### Added
@@ -307,12 +307,23 @@ function writeStamps(liveRoot, sessionId) {
307
307
  fs.writeFileSync(stampPath, timestamp);
308
308
  return stampPaths;
309
309
  }
310
- function gateEligibility() {
310
+ const CODEX_CHECKPOINT_ACCOUNT = "hassaan@getindigo.ai";
311
+ function checkpointGateRuntime() {
312
+ const runtime = (process.env.HQ_CHECKPOINT_RUNTIME ?? "claude").trim().toLowerCase();
313
+ if (runtime === "claude" || runtime === "codex")
314
+ return runtime;
315
+ return "other";
316
+ }
317
+ function gateEligibility(runtime) {
311
318
  const forced = process.env.HQ_CHECKPOINT_GATE;
312
319
  if (forced === "0")
313
320
  return false;
314
321
  if (forced === "1")
315
322
  return true;
323
+ if (runtime === "claude")
324
+ return true;
325
+ if (runtime !== "codex")
326
+ return false;
316
327
  try {
317
328
  const tokenPath = path.join(homedir(), ".hq", "cognito-tokens.json");
318
329
  const tokens = JSON.parse(fs.readFileSync(tokenPath, "utf8"));
@@ -320,19 +331,7 @@ function gateEligibility() {
320
331
  return false;
321
332
  const claims = peekIdToken(tokens.idToken);
322
333
  const candidateEmails = [claims.email, claims["custom:delegatedEmail"]];
323
- const configured = (process.env.HQ_CHECKPOINT_GATE_DOMAINS ?? "")
324
- .split(",")
325
- .map((candidate) => candidate.trim().toLowerCase())
326
- .filter(Boolean);
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);
334
+ return candidateEmails.some((candidate) => typeof candidate === "string" && candidate.toLowerCase() === CODEX_CHECKPOINT_ACCOUNT);
336
335
  }
337
336
  catch {
338
337
  return false;
@@ -341,8 +340,9 @@ function gateEligibility() {
341
340
  function writeGateVerdict(liveRoot) {
342
341
  const stateDir = path.join(liveRoot, "workspace", "orchestrator", "hook-state");
343
342
  fs.mkdirSync(stateDir, { recursive: true });
344
- const eligible = gateEligibility();
345
- fs.writeFileSync(path.join(stateDir, "checkpoint-gate-eligible"), eligible ? "1" : "0");
343
+ const runtime = checkpointGateRuntime();
344
+ const eligible = gateEligibility(runtime);
345
+ fs.writeFileSync(path.join(stateDir, `checkpoint-gate-eligible-${runtime}`), eligible ? "1" : "0");
346
346
  printResult(eligible ? "eligible" : "ineligible");
347
347
  }
348
348
  function backendOnPath(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.84.0",
3
+ "version": "5.85.0",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {