@indigoai-us/hq-cli 5.345.8 → 5.345.10

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/commands/lanes-message.js +100 -75
  3. package/dist/commands/lanes.js +52 -4
  4. package/dist/lib/bot/coding-tool-activity.d.ts +2 -8
  5. package/dist/lib/bot/coding-tool-activity.js +1 -5
  6. package/dist/lib/bot/setup-tool-offer.d.ts +0 -4
  7. package/dist/lib/bot/setup-tool-offer.js +2 -2
  8. package/dist/lib/checkpoint-ontology/tree.d.ts +0 -1
  9. package/dist/lib/checkpoint-ontology/tree.js +1 -1
  10. package/dist/lib/core-utils/qmd-reindex-after-sync.d.ts +0 -2
  11. package/dist/lib/core-utils/qmd-reindex-after-sync.js +2 -2
  12. package/dist/lib/daemon/convergence.d.ts +0 -2
  13. package/dist/lib/daemon/convergence.js +2 -2
  14. package/dist/lib/daemon/flag-monitor.d.ts +0 -2
  15. package/dist/lib/daemon/flag-monitor.js +2 -2
  16. package/dist/lib/daemon/heartbeat.d.ts +0 -4
  17. package/dist/lib/daemon/heartbeat.js +3 -3
  18. package/dist/lib/daemon/legacy-sync-env.d.ts +0 -1
  19. package/dist/lib/daemon/legacy-sync-env.js +1 -1
  20. package/dist/lib/daemon/ops/memory.d.ts +0 -2
  21. package/dist/lib/daemon/ops/memory.js +2 -2
  22. package/dist/lib/daemon/run.d.ts +1 -1
  23. package/dist/lib/daemon/run.js +11 -2
  24. package/dist/lib/daemon/supervisor.d.ts +0 -1
  25. package/dist/lib/daemon/supervisor.js +1 -1
  26. package/dist/lib/daemon/sync-runner-bundle.d.ts +2 -1
  27. package/dist/lib/daemon/sync-runner-bundle.js +1 -1
  28. package/dist/lib/daemon/sync-runner.d.ts +2 -1
  29. package/dist/lib/doctor/checks/anywhere.d.ts +3 -4
  30. package/dist/lib/doctor/checks/anywhere.js +2 -2
  31. package/dist/lib/doctor/checks/runtime-probe.d.ts +2 -16
  32. package/dist/lib/doctor/checks/runtime-probe.js +2 -2
  33. package/dist/lib/doctor/fix/json-output.d.ts +0 -1
  34. package/dist/lib/doctor/fix/json-output.js +1 -1
  35. package/dist/lib/doctor/platform.d.ts +5 -4
  36. package/dist/lib/install/claude-targets.d.ts +0 -4
  37. package/dist/lib/install/claude-targets.js +3 -3
  38. package/dist/lib/install/codex-targets.d.ts +0 -9
  39. package/dist/lib/install/codex-targets.js +4 -4
  40. package/dist/lib/lanes/blocker-freshness.d.ts +0 -2
  41. package/dist/lib/lanes/blocker-freshness.js +2 -2
  42. package/dist/lib/lanes/config.d.ts +1 -5
  43. package/dist/lib/lanes/config.js +4 -4
  44. package/dist/lib/lanes/keep-alive.d.ts +0 -4
  45. package/dist/lib/lanes/keep-alive.js +3 -3
  46. package/dist/lib/lanes/kr-freshness.d.ts +2 -4
  47. package/dist/lib/lanes/kr-freshness.js +4 -4
  48. package/dist/lib/lanes/outpost-pruner-install.d.ts +0 -3
  49. package/dist/lib/lanes/outpost-pruner-install.js +3 -3
  50. package/dist/lib/lanes/reviews.d.ts +3 -4
  51. package/dist/lib/lanes/reviews.js +3 -3
  52. package/dist/lib/lanes/store.js +1 -1
  53. package/dist/lib/lanes/types.d.ts +1 -1
  54. package/dist/lib/mesh/live/report-summary.d.ts +0 -10
  55. package/dist/lib/mesh/live/report-summary.js +5 -5
  56. package/dist/lib/work-context/bind-best.d.ts +0 -19
  57. package/dist/lib/work-context/bind-best.js +3 -3
  58. package/dist/lib/work-context/organize.d.ts +3 -11
  59. package/dist/lib/work-context/organize.js +3 -3
  60. package/dist/utils/pack-contributions.d.ts +1 -3
  61. package/dist/utils/pack-contributions.js +0 -5
  62. package/dist/utils/package-use-lease.d.ts +0 -7
  63. package/dist/utils/package-use-lease.js +1 -1
  64. package/dist/utils/resolve-executable.d.ts +0 -1
  65. package/dist/utils/resolve-executable.js +1 -1
  66. package/dist/utils/version-gate.d.ts +2 -2
  67. package/dist/utils/version-gate.js +2 -2
  68. package/package.json +1 -1
@@ -8,7 +8,7 @@ import { ensurePrivateDir } from "./paths.js";
8
8
  export const SYNC_RUNNER_BUNDLE_RUNNER_FILE = "bin/sync-runner.js";
9
9
  export const SYNC_RUNNER_BUNDLE_METADATA_FILE = "package.json";
10
10
  export const SYNC_RUNNER_BUNDLE_DIRECTORY = "hq-cloud-sync-runner";
11
- export const SYNC_RUNNER_BUNDLE_FORMAT_VERSION = 1;
11
+ const SYNC_RUNNER_BUNDLE_FORMAT_VERSION = 1;
12
12
  /** Root directory where validated sync-runner bundles are selected. */
13
13
  export function syncRunnerBundleStageRoot(daemonRoot) {
14
14
  return path.join(daemonRoot, "bundles", "sync-runner");
@@ -24,7 +24,7 @@ export type SyncRunnerProcessList = {
24
24
  ok: false;
25
25
  error: string;
26
26
  };
27
- export interface ProcessListCommandResult {
27
+ interface ProcessListCommandResult {
28
28
  status: number | null;
29
29
  stdout: string;
30
30
  stderr: string;
@@ -57,4 +57,5 @@ export declare function syncPassResult(event: Record<string, unknown>, completed
57
57
  export declare function syncHeartbeatTimeoutMs(env: NodeJS.ProcessEnv): number;
58
58
  /** Preserve an explicit NODE_OPTIONS heap setting; otherwise apply the desktop runner's default/override. */
59
59
  export declare function syncRunnerNodeOptions(env: NodeJS.ProcessEnv): string | undefined;
60
+ export {};
60
61
  //# sourceMappingURL=sync-runner.d.ts.map
@@ -9,8 +9,7 @@
9
9
  * on this machine the family reports a single NA line.
10
10
  */
11
11
  import { type HqdHealthResult } from "../../daemon/protocol.js";
12
- import type { CheckContext, CheckFamily, CheckResult } from "../types.js";
13
- export declare const ANYWHERE_FAMILY_ID = "anywhere";
12
+ import type { CheckFamily } from "../types.js";
14
13
  export declare const REMEDIATION: {
15
14
  readonly installClaude: "hq install --global --runtime claude";
16
15
  readonly installCodex: "hq install --global --runtime codex";
@@ -18,7 +17,7 @@ export declare const REMEDIATION: {
18
17
  readonly daemonRestart: "hq daemon restart --daemon";
19
18
  readonly link: "hq link <repo-dir> <company>";
20
19
  };
21
- export interface DaemonServiceState {
20
+ interface DaemonServiceState {
22
21
  installed: boolean;
23
22
  loaded: boolean;
24
23
  detail: string;
@@ -39,5 +38,5 @@ export interface AnywhereDeps {
39
38
  }
40
39
  export declare function createAnywhereFamily(deps?: AnywhereDeps): CheckFamily;
41
40
  export declare const anywhereFamily: CheckFamily;
42
- export declare function runAnywhereChecks(context: CheckContext, deps?: AnywhereDeps): Promise<CheckResult[]>;
41
+ export {};
43
42
  //# sourceMappingURL=anywhere.d.ts.map
@@ -24,7 +24,7 @@ import { DAEMON_LAUNCHD_LABEL, DAEMON_SYSTEMD_UNIT, DAEMON_WINDOWS_TASK } from "
24
24
  import { hqdSocketPath } from "../../daemon/protocol.js";
25
25
  import { readRegistry, registryDir, registryFile } from "../../registry/registry.js";
26
26
  import { anywhereRuntimeEnabled } from "../../../commands/anywhere-runtime-flag.js";
27
- export const ANYWHERE_FAMILY_ID = "anywhere";
27
+ const ANYWHERE_FAMILY_ID = "anywhere";
28
28
  export const REMEDIATION = {
29
29
  installClaude: "hq install --global --runtime claude",
30
30
  installCodex: "hq install --global --runtime codex",
@@ -39,7 +39,7 @@ export const anywhereFamily = createAnywhereFamily();
39
39
  function result(status, checkId, message, remediation, target) {
40
40
  return { status, checkId: `anywhere.${checkId}`, message, ...(remediation ? { remediation } : {}), ...(target ? { target } : {}) };
41
41
  }
42
- export async function runAnywhereChecks(context, deps = {}) {
42
+ async function runAnywhereChecks(context, deps = {}) {
43
43
  const home = deps.home ?? os.homedir();
44
44
  const env = deps.env ?? process.env;
45
45
  const socketPath = hqdSocketPath(home, env);
@@ -48,7 +48,7 @@ export declare const RUNTIME_PROBE_PREFIX = "hooks.runtime";
48
48
  */
49
49
  export declare const POLICY_TRIGGER_LEDGER_RELPATH = "workspace/orchestrator/policy-trigger-state";
50
50
  /** Whether the ledger was found. Mirrors the script's `present`/`missing`. */
51
- export type LedgerState = "present" | "missing";
51
+ type LedgerState = "present" | "missing";
52
52
  /** Options for {@link reproduceCheckHqHooks}. */
53
53
  export interface ReproduceOptions {
54
54
  /** Absolute HQ tree root to inspect. */
@@ -113,13 +113,6 @@ export declare function isAgentsV2Runtime(hqRoot: string, env?: NodeJS.ProcessEn
113
113
  * `HQ_FLEET_CONFIG_FILE`.
114
114
  */
115
115
  export declare const HQ_FLEET_CONFIG_ENV = "HQ_FLEET_CONFIG_FILE";
116
- /**
117
- * The agents-v2 runtime (hq-fleet) config whose `hooks:` block wires the on-box
118
- * adapter into every lifecycle event — the env override, else `~/.hq-fleet/config.yaml`
119
- * (where `provision/render-config.sh` renders it). Mirrors the shell's
120
- * `HQ_FLEET_CONFIG_FILE="${HQ_FLEET_CONFIG_FILE:-$HOME/.hq-fleet/config.yaml}"`.
121
- */
122
- export declare function resolveHqFleetConfigPath(env?: NodeJS.ProcessEnv): string;
123
116
  /**
124
117
  * Whether the agents-v2 runtime actually wires the on-box hook adapter.
125
118
  *
@@ -138,14 +131,6 @@ export declare function resolveHqFleetConfigPath(env?: NodeJS.ProcessEnv): strin
138
131
  * `hq_runtime_config_wires_v2_adapter` in `check-hq-hooks.sh`.
139
132
  */
140
133
  export declare function runtimeConfigWiresV2Adapter(hqRoot: string, env?: NodeJS.ProcessEnv): boolean;
141
- /**
142
- * Whether a policy-trigger ledger evidencing a live agents-v2 turn is present:
143
- * the exact session's ledger when a session id is given (session identity
144
- * implies freshness), otherwise any ledger modified within the freshness window
145
- * so a long-dead tree cannot self-attest off a stale file. Mirrors
146
- * `hq_v2_ledger_present`.
147
- */
148
- export declare function v2LedgerPresent(opts: AgentsV2AttestationOptions): boolean;
149
134
  /**
150
135
  * All three agents-v2 self-attestation conditions. Used only to GRANT PASS to a
151
136
  * hq-fleet box that host detection leaves platform-unknown; never to withhold it.
@@ -158,4 +143,5 @@ export declare function agentsV2Attested(opts: AgentsV2AttestationOptions): bool
158
143
  * the per-platform status rationale.
159
144
  */
160
145
  export declare function checkRuntimeProbe(context: CheckContext): CheckResult[];
146
+ export {};
161
147
  //# sourceMappingURL=runtime-probe.d.ts.map
@@ -172,7 +172,7 @@ export const HQ_FLEET_CONFIG_ENV = "HQ_FLEET_CONFIG_FILE";
172
172
  * (where `provision/render-config.sh` renders it). Mirrors the shell's
173
173
  * `HQ_FLEET_CONFIG_FILE="${HQ_FLEET_CONFIG_FILE:-$HOME/.hq-fleet/config.yaml}"`.
174
174
  */
175
- export function resolveHqFleetConfigPath(env = process.env) {
175
+ function resolveHqFleetConfigPath(env = process.env) {
176
176
  const override = env[HQ_FLEET_CONFIG_ENV]?.trim();
177
177
  if (override)
178
178
  return override;
@@ -215,7 +215,7 @@ export function runtimeConfigWiresV2Adapter(hqRoot, env = process.env) {
215
215
  * so a long-dead tree cannot self-attest off a stale file. Mirrors
216
216
  * `hq_v2_ledger_present`.
217
217
  */
218
- export function v2LedgerPresent(opts) {
218
+ function v2LedgerPresent(opts) {
219
219
  const env = opts.env ?? process.env;
220
220
  const dir = path.join(opts.hqRoot, ...POLICY_TRIGGER_LEDGER_RELPATH.split("/"));
221
221
  if (!isDir(dir))
@@ -1,5 +1,4 @@
1
1
  import type { AppliedFix, AppliedFixBackup, ApplyFixesResult } from "./apply.js";
2
- export declare const DOCTOR_FIX_JSON_SCHEMA_VERSION = 1;
3
2
  export interface DoctorFixJsonResult {
4
3
  schemaVersion: number;
5
4
  exitCode: number;
@@ -1,4 +1,4 @@
1
- export const DOCTOR_FIX_JSON_SCHEMA_VERSION = 1;
1
+ const DOCTOR_FIX_JSON_SCHEMA_VERSION = 1;
2
2
  /** Build the intentionally narrow JSON surface for `hq doctor --fix --json`. */
3
3
  export function buildDoctorFixJson(input) {
4
4
  return {
@@ -58,7 +58,7 @@ export type Platform = (typeof PLATFORMS)[number];
58
58
  * The platforms a signal can positively point at. `unknown` is never the target
59
59
  * of a signal — it is the verdict when no platform is positively established.
60
60
  */
61
- export type DetectablePlatform = Exclude<Platform, "unknown">;
61
+ type DetectablePlatform = Exclude<Platform, "unknown">;
62
62
  /**
63
63
  * How dispositive a signal is:
64
64
  * - `strong`: on its own, identifies a specific platform (e.g.
@@ -66,7 +66,7 @@ export type DetectablePlatform = Exclude<Platform, "unknown">;
66
66
  * - `weak`: corroborating but not variant-specific (e.g. `CLAUDECODE=1`, which
67
67
  * is shared by the CLI, app, and SDK).
68
68
  */
69
- export type SignalStrength = "strong" | "weak";
69
+ type SignalStrength = "strong" | "weak";
70
70
  /** One observed signal and the platform it points at. */
71
71
  export interface PlatformEvidence {
72
72
  /** Stable machine key for the signal, e.g. `env.CLAUDE_CODE_ENTRYPOINT`. */
@@ -97,7 +97,7 @@ export interface AncestorProcess {
97
97
  command: string;
98
98
  }
99
99
  /** Reads this process's ancestor chain, nearest parent first. Injectable. */
100
- export type AncestryReader = () => AncestorProcess[];
100
+ type AncestryReader = () => AncestorProcess[];
101
101
  /** Options for {@link detectPlatform}. All are injectable so runs are testable. */
102
102
  export interface DetectPlatformOptions {
103
103
  /** Environment to read. Default: `process.env`. */
@@ -147,7 +147,7 @@ export declare function ancestryEvidence(ancestors: AncestorProcess[]): Platform
147
147
  * spawned, so a test can both feed a synthetic table and assert that the only
148
148
  * command ever requested is `ps` — never an agent binary.
149
149
  */
150
- export type ProcessSpawner = (command: string, args: readonly string[]) => string | null;
150
+ type ProcessSpawner = (command: string, args: readonly string[]) => string | null;
151
151
  /** Options for {@link readProcessAncestry}. */
152
152
  export interface ReadAncestryOptions {
153
153
  /** Process to start from. Default: `process.pid`. */
@@ -215,4 +215,5 @@ export declare function unknownPlatformCheckStatus(): DoctorStatus;
215
215
  * can drop in.
216
216
  */
217
217
  export declare function formatPlatformLines(detection: PlatformDetection): string[];
218
+ export {};
218
219
  //# sourceMappingURL=platform.d.ts.map
@@ -1,5 +1,3 @@
1
- /** Events master-hook.sh is registered for at user scope. */
2
- export declare const GLOBAL_HOOK_EVENTS: readonly ["SessionStart", "UserPromptSubmit", "PreToolUse", "PostToolUse", "Stop"];
3
1
  /** Name of the HQ MCP server entry in ~/.claude.json. */
4
2
  export declare const HQ_MCP_SERVER_NAME = "hq";
5
3
  /** `_hqPack` provenance stamped on the HQ MCP server entry. */
@@ -9,7 +7,6 @@ export declare const MCP_SUBPROCESS_PATH = "/opt/homebrew/bin:/usr/local/bin:/us
9
7
  /** Prefix for skill symlinks under ~/.claude/skills. */
10
8
  export declare const SKILL_LINK_PREFIX = "hq-";
11
9
  export declare const CLAUDE_MD_BEGIN = "<!-- hq-anywhere:begin (managed by `hq install --global`; remove with `hq uninstall --global`) -->";
12
- export declare const CLAUDE_MD_END = "<!-- hq-anywhere:end -->";
13
10
  export interface ClaudeTargets {
14
11
  hqPointer: string;
15
12
  claudeMd: string;
@@ -29,7 +26,6 @@ export declare function charterPath(hqRoot: string): string;
29
26
  export declare function hqSkillsSource(hqRoot: string): string;
30
27
  /** The exact hook command registered for one event (absolute path, quoted). */
31
28
  export declare function hookCommand(hqRoot: string, event: string, target?: HookTarget): string;
32
- export declare function claudeMdBlock(hqRoot: string): string;
33
29
  /** Append the block (replacing any prior HQ block). `null` input = file absent. */
34
30
  export declare function addClaudeMdBlock(current: string | null, hqRoot: string): string;
35
31
  /** Strip the HQ block, plus the separator `addClaudeMdBlock` put before it. */
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import * as path from 'path';
8
8
  /** Events master-hook.sh is registered for at user scope. */
9
- export const GLOBAL_HOOK_EVENTS = [
9
+ const GLOBAL_HOOK_EVENTS = [
10
10
  'SessionStart',
11
11
  'UserPromptSubmit',
12
12
  'PreToolUse',
@@ -22,7 +22,7 @@ export const MCP_SUBPROCESS_PATH = '/opt/homebrew/bin:/usr/local/bin:/usr/bin:/b
22
22
  /** Prefix for skill symlinks under ~/.claude/skills. */
23
23
  export const SKILL_LINK_PREFIX = 'hq-';
24
24
  export const CLAUDE_MD_BEGIN = '<!-- hq-anywhere:begin (managed by `hq install --global`; remove with `hq uninstall --global`) -->';
25
- export const CLAUDE_MD_END = '<!-- hq-anywhere:end -->';
25
+ const CLAUDE_MD_END = '<!-- hq-anywhere:end -->';
26
26
  export function claudeTargets(home) {
27
27
  return {
28
28
  hqPointer: path.join(home, '.hq', 'root'),
@@ -61,7 +61,7 @@ function shellQuote(value) {
61
61
  // ---------------------------------------------------------------------------
62
62
  // CLAUDE.md block.
63
63
  // ---------------------------------------------------------------------------
64
- export function claudeMdBlock(hqRoot) {
64
+ function claudeMdBlock(hqRoot) {
65
65
  return `${CLAUDE_MD_BEGIN}\n@${charterPath(hqRoot)}\n${CLAUDE_MD_END}\n`;
66
66
  }
67
67
  /** Append the block (replacing any prior HQ block). `null` input = file absent. */
@@ -1,8 +1,5 @@
1
1
  import { type HookTarget } from './claude-targets.js';
2
- /** Events the Codex hook adapter is registered for at user scope. */
3
- export declare const CODEX_HOOK_EVENTS: readonly ["SessionStart", "UserPromptSubmit", "PreToolUse", "PostToolUse", "Stop", "SessionEnd"];
4
2
  export declare const AGENTS_MD_BEGIN = "<!-- hq-anywhere:begin (managed by `hq install --global --runtime codex`; remove with `hq uninstall --global --runtime codex`) -->";
5
- export declare const AGENTS_MD_END = "<!-- hq-anywhere:end -->";
6
3
  /** Name of the legacy ad-hoc skills mirror (~/.codex/skills/hq). */
7
4
  export declare const LEGACY_SKILLS_NAME = "hq";
8
5
  /** A directory carrying this file is HQ-owned and may be replaced. */
@@ -21,12 +18,6 @@ export declare function codexTargets(home: string): CodexTargets;
21
18
  export declare function codexAdapterPath(hqRoot: string): string;
22
19
  /** HQ's Codex charter: AGENTS.md at the HQ root, else the Claude charter. */
23
20
  export declare function codexCharterSource(hqRoot: string): string;
24
- /**
25
- * Hook command for every event. The adapter reads the event from
26
- * `hook_event_name` and falls back to its own $PWD when Codex sends no `cwd`.
27
- */
28
- export declare function codexHookCommand(hqRoot: string, target?: HookTarget): string;
29
- export declare function agentsMdBlock(charter: string): string;
30
21
  /** Append the block (replacing any prior HQ block). `null` input = file absent. */
31
22
  export declare function addAgentsMdBlock(current: string | null, charter: string): string;
32
23
  /** Strip the HQ block, plus the separator `addAgentsMdBlock` put before it. */
@@ -13,7 +13,7 @@ import * as fs from 'fs';
13
13
  import * as path from 'path';
14
14
  import { shimPath } from './claude-targets.js';
15
15
  /** Events the Codex hook adapter is registered for at user scope. */
16
- export const CODEX_HOOK_EVENTS = [
16
+ const CODEX_HOOK_EVENTS = [
17
17
  'SessionStart',
18
18
  'UserPromptSubmit',
19
19
  'PreToolUse',
@@ -22,7 +22,7 @@ export const CODEX_HOOK_EVENTS = [
22
22
  'SessionEnd',
23
23
  ];
24
24
  export const AGENTS_MD_BEGIN = '<!-- hq-anywhere:begin (managed by `hq install --global --runtime codex`; remove with `hq uninstall --global --runtime codex`) -->';
25
- export const AGENTS_MD_END = '<!-- hq-anywhere:end -->';
25
+ const AGENTS_MD_END = '<!-- hq-anywhere:end -->';
26
26
  /** Name of the legacy ad-hoc skills mirror (~/.codex/skills/hq). */
27
27
  export const LEGACY_SKILLS_NAME = 'hq';
28
28
  /** A directory carrying this file is HQ-owned and may be replaced. */
@@ -52,7 +52,7 @@ export function codexCharterSource(hqRoot) {
52
52
  * Hook command for every event. The adapter reads the event from
53
53
  * `hook_event_name` and falls back to its own $PWD when Codex sends no `cwd`.
54
54
  */
55
- export function codexHookCommand(hqRoot, target = 'master') {
55
+ function codexHookCommand(hqRoot, target = 'master') {
56
56
  if (target === 'shim')
57
57
  return `/bin/sh ${JSON.stringify(shimPath(hqRoot))} --runtime codex`;
58
58
  return `/bin/bash ${JSON.stringify(codexAdapterPath(hqRoot))}`;
@@ -60,7 +60,7 @@ export function codexHookCommand(hqRoot, target = 'master') {
60
60
  // ---------------------------------------------------------------------------
61
61
  // AGENTS.md block.
62
62
  // ---------------------------------------------------------------------------
63
- export function agentsMdBlock(charter) {
63
+ function agentsMdBlock(charter) {
64
64
  const body = charter.endsWith('\n') ? charter : `${charter}\n`;
65
65
  return `${AGENTS_MD_BEGIN}\n${body}${AGENTS_MD_END}\n`;
66
66
  }
@@ -2,8 +2,6 @@ import { type ManagerStatusTarget } from "./manager-status-gate.js";
2
2
  import { readLanesRegistryFlag } from "./registry-flag.js";
3
3
  import type { LaneRecord } from "./types.js";
4
4
  export declare const BLOCKER_FRESHNESS_FLAG = "lanes.blocker-freshness";
5
- export declare const BLOCKER_FRESHNESS_DEFAULT_HOURS = 4;
6
- export declare const BLOCKER_FRESHNESS_FUTURE_GRACE_MS: number;
7
5
  export interface StaleBlocker {
8
6
  key: string;
9
7
  label: string;
@@ -7,8 +7,8 @@ import { readLanesRegistryFlag } from "./registry-flag.js";
7
7
  import { resolveLaneCompany } from "./lane-company.js";
8
8
  import { assertNoSecretText } from "./text-scan.js";
9
9
  export const BLOCKER_FRESHNESS_FLAG = "lanes.blocker-freshness";
10
- export const BLOCKER_FRESHNESS_DEFAULT_HOURS = DEFAULT_BLOCKER_FRESHNESS_HOURS;
11
- export const BLOCKER_FRESHNESS_FUTURE_GRACE_MS = 5 * 60 * 1000;
10
+ const BLOCKER_FRESHNESS_DEFAULT_HOURS = DEFAULT_BLOCKER_FRESHNESS_HOURS;
11
+ const BLOCKER_FRESHNESS_FUTURE_GRACE_MS = 5 * 60 * 1000;
12
12
  const TERMINAL_BLOCKER_STATUSES = new Set([
13
13
  "closed",
14
14
  "resolved",
@@ -7,7 +7,7 @@
7
7
  * that resolve to the same home are refused (identity-keyed-cap rule).
8
8
  */
9
9
  import * as fs from "node:fs";
10
- import { type AccountConfig, type LaneProvider, type LanesConfig, type RunawaySearchGuardConfig, type LivenessWindows, type ProviderConfig, type TrackerChecksConfig } from "./types.js";
10
+ import { type AccountConfig, type LaneProvider, type LanesConfig, type RunawaySearchGuardConfig, type LivenessWindows, type ProviderConfig } from "./types.js";
11
11
  export declare const LANES_CONFIG_REL: string;
12
12
  export declare const DEFAULT_MAX_QUEUED = 3;
13
13
  export declare const DEFAULT_CPU_BUSY_PAUSE = 0.85;
@@ -43,10 +43,6 @@ export declare const DEFAULT_SESSION_QUESTION_TIMEOUT_SECS: number;
43
43
  export declare const DEFAULT_BLOCKER_FRESHNESS_HOURS = 4;
44
44
  /** Manager key results must be re-measured within six hours by default. */
45
45
  export declare const DEFAULT_KR_FRESHNESS_HOURS = 6;
46
- export declare const DEFAULT_LOW_DISK_MIN_FREE_BYTES: number;
47
- export declare const DEFAULT_CODEX_ROLLOUT_COMPRESS_AFTER_HOURS = 24;
48
- export declare const DEFAULT_CODEX_ROLLOUT_DELETE_AFTER_DAYS = 7;
49
- export declare const DEFAULT_TRACKER_CHECKS: TrackerChecksConfig;
50
46
  export declare const DEFAULT_RUNAWAY_SEARCH_GUARD_CONFIG: RunawaySearchGuardConfig;
51
47
  export declare const DEFAULT_LIVENESS_WINDOWS: LivenessWindows;
52
48
  export declare const DEFAULT_PROVIDER_MAX_RUNNING: Record<LaneProvider, number>;
@@ -47,10 +47,10 @@ export const DEFAULT_SESSION_QUESTION_TIMEOUT_SECS = 10 * 60;
47
47
  export const DEFAULT_BLOCKER_FRESHNESS_HOURS = 4;
48
48
  /** Manager key results must be re-measured within six hours by default. */
49
49
  export const DEFAULT_KR_FRESHNESS_HOURS = 6;
50
- export const DEFAULT_LOW_DISK_MIN_FREE_BYTES = 5 * 1024 ** 3;
51
- export const DEFAULT_CODEX_ROLLOUT_COMPRESS_AFTER_HOURS = 24;
52
- export const DEFAULT_CODEX_ROLLOUT_DELETE_AFTER_DAYS = 7;
53
- export const DEFAULT_TRACKER_CHECKS = {
50
+ const DEFAULT_LOW_DISK_MIN_FREE_BYTES = 5 * 1024 ** 3;
51
+ const DEFAULT_CODEX_ROLLOUT_COMPRESS_AFTER_HOURS = 24;
52
+ const DEFAULT_CODEX_ROLLOUT_DELETE_AFTER_DAYS = 7;
53
+ const DEFAULT_TRACKER_CHECKS = {
54
54
  owner_question_surface_ms: 10 * 60 * 1000,
55
55
  open_question_age_ms: 2 * 60 * 60 * 1000,
56
56
  status_stale_ms: 90 * 60 * 1000,
@@ -16,7 +16,6 @@ export declare const LANE_SUPERSESSION_LINEAGE_AWARE_DEFAULT_ENABLED = false;
16
16
  export declare const LANE_RUNNING_SUPERSEDED_MESSAGE_DELIVERY_FLAG = "lanes.running-superseded-message-delivery";
17
17
  export declare const LEAD_LANE_KEEP_ALIVE_MAX_RESUMES = 24;
18
18
  export declare const LEAD_LANE_KEEP_ALIVE_BASE_BACKOFF_MS: number;
19
- export declare const LEAD_LANE_KEEP_ALIVE_MAX_BACKOFF_MS: number;
20
19
  export type KeepAliveLane = Pick<LaneRecord, "lane_id" | "created_at" | "senior" | "company" | "project_id"> & Partial<Pick<LaneRecord, "mesh_company" | "worker_profile" | "hire_grant" | "provider_session_id" | "last_resume" | "state">>;
21
20
  export interface LaneTerminalResumeResult {
22
21
  lane: LaneRecord;
@@ -57,11 +56,8 @@ export declare function canResumeDoneKeepAliveLane(lane: Pick<LaneRecord, "keep_
57
56
  export declare function hasPendingKeepAliveWork(hqRoot: string, lane: Pick<LaneRecord, "lane_id" | "company" | "pending_resume">, questionRecords?: readonly QuestionRecord[]): boolean;
58
57
  /** Undelivered answers that belong to this lane and company. */
59
58
  export declare function undeliveredAnsweredQuestions(lane: Pick<LaneRecord, "lane_id" | "company">, questions: readonly QuestionRecord[]): QuestionRecord[];
60
- export declare function retiredLaneRegistryPath(hqRoot: string): string;
61
59
  /** Missing registry means no retired lanes; every present invalid file fails closed. */
62
60
  export declare function loadRetiredLaneIds(hqRoot: string): ReadonlySet<string>;
63
- /** IDs may be stored bare or with an owner-host suffix after an underscore. */
64
- export declare function isRetiredLaneId(laneId: string, retiredLaneIds: ReadonlySet<string>): boolean;
65
61
  export declare function keepAliveSupersededBy<T extends KeepAliveLane>(lane: T, lanes: readonly T[], lineageAware?: boolean, companyForLane?: (lane: T) => T["company"]): T | undefined;
66
62
  export declare function keepAliveExclusion<T extends KeepAliveLane>(lane: T, lanes: readonly T[], retiredLaneIds: ReadonlySet<string>, lineageAware?: boolean, companyForLane?: (lane: T) => T["company"]): "retired" | "superseded" | undefined;
67
63
  export declare function leadLaneKeepAliveBackoffMs(attempt: number): number;
@@ -21,7 +21,7 @@ export const LANE_SUPERSESSION_LINEAGE_AWARE_DEFAULT_ENABLED = false;
21
21
  export const LANE_RUNNING_SUPERSEDED_MESSAGE_DELIVERY_FLAG = "lanes.running-superseded-message-delivery";
22
22
  export const LEAD_LANE_KEEP_ALIVE_MAX_RESUMES = 24;
23
23
  export const LEAD_LANE_KEEP_ALIVE_BASE_BACKOFF_MS = 5 * 60 * 1000;
24
- export const LEAD_LANE_KEEP_ALIVE_MAX_BACKOFF_MS = 60 * 60 * 1000;
24
+ const LEAD_LANE_KEEP_ALIVE_MAX_BACKOFF_MS = 60 * 60 * 1000;
25
25
  /** Shared resume transition for terminal gate follow-ups. */
26
26
  export function queueLaneTerminalResume(current, at, resumeText, options = {}) {
27
27
  if (options.mergeExisting && current.pending_resume !== undefined) {
@@ -182,7 +182,7 @@ function readKeepAliveQuestionRecords(hqRoot) {
182
182
  }
183
183
  return questions;
184
184
  }
185
- export function retiredLaneRegistryPath(hqRoot) {
185
+ function retiredLaneRegistryPath(hqRoot) {
186
186
  return path.join(hqRoot, "workspace", "lane-briefs", "juniors.json");
187
187
  }
188
188
  /** Missing registry means no retired lanes; every present invalid file fails closed. */
@@ -233,7 +233,7 @@ function invalidRetiredList(filePath, message) {
233
233
  return new LanesError("keep_alive_retired_list_invalid", `Invalid retired lane list ${filePath}: ${message}`, { path: filePath });
234
234
  }
235
235
  /** IDs may be stored bare or with an owner-host suffix after an underscore. */
236
- export function isRetiredLaneId(laneId, retiredLaneIds) {
236
+ function isRetiredLaneId(laneId, retiredLaneIds) {
237
237
  for (const retiredId of retiredLaneIds) {
238
238
  if (retiredId === laneId ||
239
239
  retiredId.startsWith(`${laneId}_`) ||
@@ -2,9 +2,7 @@ import { type ManagerStatusTarget } from "./manager-status-gate.js";
2
2
  import { readLanesRegistryFlag } from "./registry-flag.js";
3
3
  import type { LaneRecord } from "./types.js";
4
4
  export declare const KR_FRESHNESS_FLAG = "lanes.kr-freshness";
5
- export declare const KR_FRESHNESS_DEFAULT_HOURS = 6;
6
- export declare const KR_FRESHNESS_LEDGER_REL: string;
7
- export declare const KR_FRESHNESS_LEDGER_SCHEMA = "kr-freshness-ledger.v1";
5
+ declare const KR_FRESHNESS_LEDGER_SCHEMA = "kr-freshness-ledger.v1";
8
6
  export type KrFreshnessVerdict = "moving" | "flat" | "stalled";
9
7
  export interface KrFreshnessKpi {
10
8
  name: string;
@@ -52,7 +50,6 @@ export interface KrFreshnessStatusKpi {
52
50
  entryMeasuredAt: string | null;
53
51
  }
54
52
  export declare function readKrFreshnessStatus(statusPath: string): KrFreshnessStatusKpi[];
55
- export declare function krFreshnessLedgerPath(root: string, laneId: string): string;
56
53
  export declare function readKrFreshnessLedger(root: string, laneId: string): KrFreshnessLedger | null;
57
54
  export declare function writeKrFreshnessLedger(root: string, ledger: KrFreshnessLedger): void;
58
55
  export declare function updateKrFreshnessLedger(laneId: string, prior: KrFreshnessLedger | null, statusKpis: readonly KrFreshnessStatusKpi[], now: number): KrFreshnessLedger;
@@ -72,4 +69,5 @@ export declare function readKrFreshnessReport(root: string, laneId: string, now:
72
69
  kr_freshness_hours: number;
73
70
  kpis: KrFreshnessView[];
74
71
  };
72
+ export {};
75
73
  //# sourceMappingURL=kr-freshness.d.ts.map
@@ -8,9 +8,9 @@ import { readLanesRegistryFlag } from "./registry-flag.js";
8
8
  import { resolveLaneCompany } from "./lane-company.js";
9
9
  import { assertNoSecretText } from "./text-scan.js";
10
10
  export const KR_FRESHNESS_FLAG = "lanes.kr-freshness";
11
- export const KR_FRESHNESS_DEFAULT_HOURS = DEFAULT_KR_FRESHNESS_HOURS;
12
- export const KR_FRESHNESS_LEDGER_REL = path.join("workspace", "lanes", "kpi-ledger");
13
- export const KR_FRESHNESS_LEDGER_SCHEMA = "kr-freshness-ledger.v1";
11
+ const KR_FRESHNESS_DEFAULT_HOURS = DEFAULT_KR_FRESHNESS_HOURS;
12
+ const KR_FRESHNESS_LEDGER_REL = path.join("workspace", "lanes", "kpi-ledger");
13
+ const KR_FRESHNESS_LEDGER_SCHEMA = "kr-freshness-ledger.v1";
14
14
  const MAX_STATUS_BYTES = 1024 * 1024;
15
15
  const MAX_LEDGER_BYTES = 1024 * 1024;
16
16
  const MAX_KPIS = 1000;
@@ -190,7 +190,7 @@ export function readKrFreshnessStatus(statusPath) {
190
190
  }
191
191
  return [...found.values()];
192
192
  }
193
- export function krFreshnessLedgerPath(root, laneId) {
193
+ function krFreshnessLedgerPath(root, laneId) {
194
194
  return ledgerFilePath(root, laneId);
195
195
  }
196
196
  export function readKrFreshnessLedger(root, laneId) {
@@ -1,8 +1,5 @@
1
- export declare const OUTPOST_PRUNER_PRESSURE_SERVICE = "hq-outpost-worktree-pruner-pressure.service";
2
1
  export declare const OUTPOST_PRUNER_PRESSURE_TIMER = "hq-outpost-worktree-pruner-pressure.timer";
3
- export declare const OUTPOST_PRUNER_DAILY_SERVICE = "hq-outpost-worktree-pruner-daily.service";
4
2
  export declare const OUTPOST_PRUNER_DAILY_TIMER = "hq-outpost-worktree-pruner-daily.timer";
5
- export declare const OUTPOST_PRUNER_MIN_AGE_DAYS = 14;
6
3
  export interface OutpostPrunerInstallOptions {
7
4
  systemdRoot: string;
8
5
  hqRoot: string;
@@ -4,11 +4,11 @@ import * as path from "node:path";
4
4
  import { resolveHqBinary, resolveNodeBinary } from "../mesh/live/daemon/install.js";
5
5
  import { SYSTEMD_PATH_ENV } from "../service-manager/systemd.js";
6
6
  import { resolveFlagRegistryEndpoint } from "../flag-registry-endpoint.js";
7
- export const OUTPOST_PRUNER_PRESSURE_SERVICE = "hq-outpost-worktree-pruner-pressure.service";
7
+ const OUTPOST_PRUNER_PRESSURE_SERVICE = "hq-outpost-worktree-pruner-pressure.service";
8
8
  export const OUTPOST_PRUNER_PRESSURE_TIMER = "hq-outpost-worktree-pruner-pressure.timer";
9
- export const OUTPOST_PRUNER_DAILY_SERVICE = "hq-outpost-worktree-pruner-daily.service";
9
+ const OUTPOST_PRUNER_DAILY_SERVICE = "hq-outpost-worktree-pruner-daily.service";
10
10
  export const OUTPOST_PRUNER_DAILY_TIMER = "hq-outpost-worktree-pruner-daily.timer";
11
- export const OUTPOST_PRUNER_MIN_AGE_DAYS = 14;
11
+ const OUTPOST_PRUNER_MIN_AGE_DAYS = 14;
12
12
  function shellQuote(value) {
13
13
  return /^[A-Za-z0-9_./:-]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
14
14
  }
@@ -1,7 +1,5 @@
1
- export declare const LANE_REVIEWS_REL: string;
2
- export declare const LANE_REVIEW_SCHEMA_VERSION = "hq-lanes-review.v1";
3
- export declare const LANE_REVIEW_HISTORY_CAP = 50;
4
- export interface LaneReviewHistoryEntry {
1
+ declare const LANE_REVIEW_SCHEMA_VERSION = "hq-lanes-review.v1";
2
+ interface LaneReviewHistoryEntry {
5
3
  repo: string;
6
4
  pr: number;
7
5
  head_sha: string;
@@ -34,4 +32,5 @@ export declare function parseLaneReviewPr(raw: string | number): number;
34
32
  export declare function readLaneReview(hqRoot: string, repo: string, pr: number): LaneReview | null;
35
33
  export declare function listLaneReviews(hqRoot: string, reviewerLane?: string): LaneReviewListing;
36
34
  export declare function recordLaneReview(hqRoot: string, input: RecordLaneReviewInput): Promise<LaneReview>;
35
+ export {};
37
36
  //# sourceMappingURL=reviews.d.ts.map
@@ -3,9 +3,9 @@ import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
4
  import { assertNoSecretText } from "./text-scan.js";
5
5
  import { LanesError } from "./errors.js";
6
- export const LANE_REVIEWS_REL = path.join("workspace", "lanes", "reviews");
7
- export const LANE_REVIEW_SCHEMA_VERSION = "hq-lanes-review.v1";
8
- export const LANE_REVIEW_HISTORY_CAP = 50;
6
+ const LANE_REVIEWS_REL = path.join("workspace", "lanes", "reviews");
7
+ const LANE_REVIEW_SCHEMA_VERSION = "hq-lanes-review.v1";
8
+ const LANE_REVIEW_HISTORY_CAP = 50;
9
9
  const REVIEW_LOCK_WAIT_MS = 5_000;
10
10
  const REVIEW_LOCK_STALE_MS = 5 * 60_000;
11
11
  function fail(error, message, details = {}) {
@@ -987,7 +987,7 @@ function parseLaneAccountSelection(value, filePath) {
987
987
  throw failure("account");
988
988
  if (selection.signal !== "usage" && selection.signal !== "recent_usage" && selection.signal !== "lane_count" && selection.signal !== "explicit")
989
989
  throw failure("signal");
990
- if (selection.reason !== "least_loaded" && selection.reason !== "explicit")
990
+ if (selection.reason !== "least_loaded" && selection.reason !== "explicit" && selection.reason !== "profile_pin_unavailable")
991
991
  throw failure("reason");
992
992
  if (typeof selection.selected_at !== "string" || !Number.isFinite(Date.parse(selection.selected_at)))
993
993
  throw failure("selected_at");
@@ -284,7 +284,7 @@ export interface LaneAccountSelectionConsidered {
284
284
  export interface LaneAccountSelection {
285
285
  account: string;
286
286
  signal: "usage" | "recent_usage" | "lane_count" | "explicit";
287
- reason: "least_loaded" | "explicit";
287
+ reason: "least_loaded" | "explicit" | "profile_pin_unavailable";
288
288
  target_host: LaneHost;
289
289
  selected_at: string;
290
290
  considered: LaneAccountSelectionConsidered[];
@@ -4,9 +4,6 @@
4
4
  * Built locally at the quiet trigger / SessionEnd flush. Never includes file
5
5
  * contents. Tokens, secret-looking strings, and secrets-file paths are redacted.
6
6
  */
7
- export declare const REPORT_SUMMARY_MAX_CHARS = 140;
8
- export declare const REPORT_SUMMARY_SCHEMA_MAX = 280;
9
- export declare const REPORT_TRANSCRIPT_TAIL_BYTES: number;
10
7
  export interface SessionEndReportFields {
11
8
  summary?: string;
12
9
  repo?: string;
@@ -26,19 +23,12 @@ export interface BuildSessionEndReportFieldsInput {
26
23
  export declare function redactReportSummary(text: string): string;
27
24
  export declare function firstSentence(text: string, max?: number): string;
28
25
  export declare function extractLastAssistantText(jsonl: string): string | undefined;
29
- export declare function readTranscriptTail(transcriptPath: string, maxBytes?: number): string | undefined;
30
26
  export declare function collectGitContext(cwd: string, git?: (cwd: string, args: string[]) => string | undefined): {
31
27
  repo?: string;
32
28
  gitBranch?: string;
33
29
  };
34
30
  export declare function extractPrUrls(text: string, max?: number): string[];
35
31
  export declare function claudeTranscriptPathFor(sessionId: string, cwd: string, home?: string): string;
36
- export declare function resolveTranscriptPath(input: {
37
- transcriptPath?: string;
38
- sessionId?: string;
39
- cwd?: string;
40
- home?: string;
41
- }): string | undefined;
42
32
  export declare function buildSessionEndReportFields(input: BuildSessionEndReportFieldsInput): SessionEndReportFields;
43
33
  /** Merge report fields onto a session_end event object (no-op for other kinds). */
44
34
  export declare function enrichSessionEndEvent(event: Record<string, unknown>, extra?: Pick<BuildSessionEndReportFieldsInput, "transcriptPath" | "home" | "git" | "readTranscript">): Record<string, unknown>;
@@ -9,9 +9,9 @@ import * as fs from "node:fs";
9
9
  import * as os from "node:os";
10
10
  import * as path from "node:path";
11
11
  import { SECRET_RE, SECRETS_PATH_RE } from "../../lanes/text-scan.js";
12
- export const REPORT_SUMMARY_MAX_CHARS = 140;
13
- export const REPORT_SUMMARY_SCHEMA_MAX = 280;
14
- export const REPORT_TRANSCRIPT_TAIL_BYTES = 256 * 1024;
12
+ const REPORT_SUMMARY_MAX_CHARS = 140;
13
+ const REPORT_SUMMARY_SCHEMA_MAX = 280;
14
+ const REPORT_TRANSCRIPT_TAIL_BYTES = 256 * 1024;
15
15
  const PR_URL_RE = /https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/\d+/g;
16
16
  export function redactReportSummary(text) {
17
17
  let out = text.replace(SECRET_RE, "[redacted]");
@@ -101,7 +101,7 @@ export function extractLastAssistantText(jsonl) {
101
101
  }
102
102
  return last;
103
103
  }
104
- export function readTranscriptTail(transcriptPath, maxBytes = REPORT_TRANSCRIPT_TAIL_BYTES) {
104
+ function readTranscriptTail(transcriptPath, maxBytes = REPORT_TRANSCRIPT_TAIL_BYTES) {
105
105
  try {
106
106
  const st = fs.statSync(transcriptPath);
107
107
  if (!st.isFile() || st.size <= 0)
@@ -171,7 +171,7 @@ export function claudeTranscriptPathFor(sessionId, cwd, home = os.homedir()) {
171
171
  const encoded = cwd.startsWith("/") ? cwd.replace(/\//g, "-") : `-${cwd.replace(/\//g, "-")}`;
172
172
  return path.join(home, ".claude", "projects", encoded, `${sessionId}.jsonl`);
173
173
  }
174
- export function resolveTranscriptPath(input) {
174
+ function resolveTranscriptPath(input) {
175
175
  const explicit = input.transcriptPath?.trim();
176
176
  if (explicit)
177
177
  return explicit;
@@ -8,15 +8,6 @@ export interface BindCandidate {
8
8
  title?: string;
9
9
  score: number;
10
10
  }
11
- export interface CatalogProject {
12
- projectId: string;
13
- title?: string;
14
- repos: string[];
15
- journalMtimeMs?: number;
16
- hasPrd: boolean;
17
- hasBoard: boolean;
18
- prdPath?: string;
19
- }
20
11
  export type RefineAction = {
21
12
  action: "keep";
22
13
  } | {
@@ -33,16 +24,6 @@ export type RefineAction = {
33
24
  reason: string;
34
25
  candidates: BindCandidate[];
35
26
  };
36
- export declare function scoreProject(hint: string, row: CatalogProject, repoPath: string | undefined, nowMs: number): number;
37
- export declare function discoverProjects(input: {
38
- hqRoot?: string;
39
- companySlug?: string;
40
- companyUid?: string;
41
- env?: NodeJS.ProcessEnv;
42
- home?: string;
43
- }): CatalogProject[];
44
- /** discoverProjects memoized by source directory and mtime. A hit does not rescan. */
45
- export declare function discoverProjectsCached(input: Parameters<typeof discoverProjects>[0], nowMs?: number): CatalogProject[];
46
27
  export declare function refineProjectBinding(input: {
47
28
  hint?: string;
48
29
  hqRoot?: string;