@indigoai-us/hq-cli 5.164.0 → 5.165.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,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.165.0] — 2026-09-24
6
+
7
+ ### Fixed
8
+
9
+ - Codex lane starts and resumes now pass the assigned worker policy directory to
10
+ policy hooks.
11
+
5
12
  ## [5.164.0] — 2026-09-24
6
13
 
7
14
  ### Fixed
@@ -222,6 +222,8 @@ export declare function buildProviderCommand(provider: LaneProvider, input: {
222
222
  fastMode?: boolean;
223
223
  /** Per-spawn worker profile instructions and materialized settings. */
224
224
  profile?: ProviderProfileLaunch;
225
+ /** Worker profile path, forwarded to Codex hook subprocesses when supported. */
226
+ workerPolicyDir?: string;
225
227
  /** Continue a recorded session. Only providers in PROVIDER_SESSION_RESUME accept this. */
226
228
  resume?: ProviderResumeInput;
227
229
  /**
@@ -522,6 +522,19 @@ function appendProviderProfileFlags(provider, args, profile) {
522
522
  }
523
523
  }
524
524
  }
525
+ /** Make the worker policy directory available to Codex hook subprocesses. */
526
+ function appendCodexWorkerPolicyDirFlag(provider, args, workerPolicyDir) {
527
+ if (provider !== "codex" || workerPolicyDir === undefined)
528
+ return args;
529
+ if (!workerPolicyDir.trim()) {
530
+ throw new LanesError("invalid_worker_policy_dir", "Worker policy directory must not be empty");
531
+ }
532
+ const setting = `shell_environment_policy.set.HQ_POLICY_WORKER_DIR=${JSON.stringify(workerPolicyDir)}`;
533
+ const separator = args.indexOf("--");
534
+ if (separator === -1)
535
+ return [...args, "-c", setting];
536
+ return [...args.slice(0, separator), "-c", setting, ...args.slice(separator)];
537
+ }
525
538
  export const PID_LIVENESS_DECISIONS = [
526
539
  "esrch",
527
540
  "starttime_mismatch",
@@ -1138,7 +1151,7 @@ export function buildProviderCommand(provider, input) {
1138
1151
  }
1139
1152
  return {
1140
1153
  command,
1141
- args: appendFastModeFlags(parsed, appendEffortFlag(parsed, appendModelFlag(parsed, appendProviderProfileFlags(parsed, args, input.profile), input.model), input.effort), input.fastMode),
1154
+ args: appendFastModeFlags(parsed, appendEffortFlag(parsed, appendModelFlag(parsed, appendCodexWorkerPolicyDirFlag(parsed, appendProviderProfileFlags(parsed, args, input.profile), input.workerPolicyDir), input.model), input.effort), input.fastMode),
1142
1155
  };
1143
1156
  }
1144
1157
  export function workerEnv(base, resolved, laneId, hqRoot, autoCompactTokens, meshCompany, workerPolicyDir) {
@@ -1757,6 +1770,7 @@ export function spawnLaneWorker(hqRoot, lane, deps = {}, launch = {}) {
1757
1770
  effort: effort.effort,
1758
1771
  fastMode,
1759
1772
  profile: profileLaunch,
1773
+ workerPolicyDir,
1760
1774
  resume,
1761
1775
  });
1762
1776
  // A systemd PATH mismatch is an environment defect, not a lane failure.
@@ -1806,6 +1820,7 @@ export function spawnLaneWorker(hqRoot, lane, deps = {}, launch = {}) {
1806
1820
  effort: effort.effort,
1807
1821
  fastMode,
1808
1822
  profile: profileLaunch,
1823
+ workerPolicyDir,
1809
1824
  resume: { session_id: resume.session_id, prompt: COMPACTION_PROMPT },
1810
1825
  });
1811
1826
  compaction = compactLaneSession({
@@ -2128,6 +2143,7 @@ export function spawnEnvelopeRepair(hqRoot, lane, input, deps = {}) {
2128
2143
  effort: effort.effort,
2129
2144
  fastMode,
2130
2145
  profile: profileLaunch,
2146
+ workerPolicyDir,
2131
2147
  ...(mode === "resume" && sessionId !== null
2132
2148
  ? { resume: { session_id: sessionId, prompt: repairPrompt } }
2133
2149
  : { freshTurnPrompt: repairPrompt }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.164.0",
3
+ "version": "5.165.0",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {