@indigoai-us/hq-cli 5.345.272 → 5.345.273
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,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.345.273] — 2026-12-01
|
|
6
|
+
- Fixed: hosted agents (`agents-v2`) on the v2.71 release-line hook adapter that carries the `hq-agents-v2` #364 PreToolUse payload fix (`b6db50be`) keep native hook registration. `hq-hook` now answers `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `SessionStart`, `SessionEnd` and `SubagentStop` natively for that adapter, as it already does for the main-line #364 adapter (`15fa77e8`), and still hands `Stop` to the adapter. An adapter revision `hq-hook` does not know still runs every event through the adapter, and the reason it gives no longer names only #332.
|
|
7
|
+
- Updated `contracts/host-canary-release.json` with the Claude Code host canary records for hq-cli 5.345.273.
|
|
8
|
+
- CI: the hq-hook macOS native tests on a pull request now start after the Linux hq-hook tests pass on the same commit, and do not run again on a commit they already passed on.
|
|
9
|
+
- Fixed: `gh pr merge` no longer stops with "merge state unreadable" only because the daemon's merge state is a little over a minute old. In that case the merge gate asks `hq runners hold check` directly and follows its answer. The daemon now keeps flag values fresh in the background, so building that state no longer waits on slow flag reads.
|
|
10
|
+
- Speed up npm releases by building native `hq-hook` packages in parallel with the tag parity check (while still gating all npm publication on parity) and inheriting verified green `hq-hook` CI across commits that only update `contracts/host-canary-release.json`.
|
|
11
|
+
- Use Windows PowerShell (`shell: powershell`) for the self-hosted Windows `verify-published` signature check in `.github/workflows/hq-hook-packages.yml`, matching the shell shipped on `hq-windows` runners.
|
|
12
|
+
|
|
5
13
|
## [5.345.272] — 2026-11-30
|
|
6
14
|
- Set explicit file timestamps in auto-checkpoint tests to remove fixture sleeps.
|
|
7
15
|
- Fix a flaky `hq core checkpoint` test that failed when a real process held the PID its spawn mock reported.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "hq.host-canary-release.v1",
|
|
3
|
-
"cliVersion": "5.345.
|
|
3
|
+
"cliVersion": "5.345.273",
|
|
4
4
|
"hosts": {
|
|
5
5
|
"claude": [
|
|
6
6
|
{
|
|
7
7
|
"passed": true,
|
|
8
|
-
"at": "2026-
|
|
9
|
-
"engineVersion": "0.3.1+hq.5.345.
|
|
8
|
+
"at": "2026-12-01T00:04:49.430Z",
|
|
9
|
+
"engineVersion": "0.3.1+hq.5.345.273.src.90e7e4db1b4b524b040871dd904084a635a22579d519d48cdb7b4b8b2ef5dc04",
|
|
10
10
|
"gateSha256": "a2879dfe692233f5953bac86672947bbd82f3c5247292f3efcb80f16c3d2c6b1"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"passed": true,
|
|
14
|
-
"at": "2026-
|
|
15
|
-
"engineVersion": "0.3.1+hq.5.345.
|
|
14
|
+
"at": "2026-12-01T00:05:09.860Z",
|
|
15
|
+
"engineVersion": "0.3.1+hq.5.345.273.src.90e7e4db1b4b524b040871dd904084a635a22579d519d48cdb7b4b8b2ef5dc04",
|
|
16
16
|
"gateSha256": "ca58a94859eae0a345c11c8d9c59303eb76350dc1cf223391037d21979c28718"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"passed": true,
|
|
20
|
-
"at": "2026-
|
|
21
|
-
"engineVersion": "0.3.1+hq.5.345.
|
|
20
|
+
"at": "2026-12-01T00:05:44.343Z",
|
|
21
|
+
"engineVersion": "0.3.1+hq.5.345.273.src.90e7e4db1b4b524b040871dd904084a635a22579d519d48cdb7b4b8b2ef5dc04",
|
|
22
22
|
"gateSha256": "ecdbab7c2e0a1d94eb9c98f15e760390f215bc7115a217ded24b4275322722d2"
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -65,8 +65,18 @@ export declare const MERGE_SECTION_MAX_AGE_SECONDS = 60;
|
|
|
65
65
|
export declare const MERGE_SECTION_REFRESH_INTERVAL_MS = 15000;
|
|
66
66
|
/** A flag value is asked of the registry again after this long. */
|
|
67
67
|
export declare const MERGE_FLAG_TTL_MS = 30000;
|
|
68
|
+
/**
|
|
69
|
+
* The daemon's reader re-reads a kept flag value in the background once it is
|
|
70
|
+
* this old, and keeps answering with it until MERGE_FLAG_TTL_MS, so a build
|
|
71
|
+
* does not wait on the registry while a value is kept. On 2026-11-30 the
|
|
72
|
+
* state file was written 4 to 52 s after the build that stamped its sections
|
|
73
|
+
* started, and the native merge gate refuses a section past 60 s.
|
|
74
|
+
*/
|
|
75
|
+
export declare const MERGE_FLAG_REFRESH_AHEAD_MS = 15000;
|
|
68
76
|
/** A flag read that takes longer than this counts as unreadable. */
|
|
69
77
|
export declare const MERGE_FLAG_READ_TIMEOUT_MS = 12000;
|
|
78
|
+
/** A section build that takes longer than this is logged with its time. */
|
|
79
|
+
export declare const MERGE_SECTION_SLOW_BUILD_MS = 5000;
|
|
70
80
|
export interface MergeHoldEntry {
|
|
71
81
|
repo: string;
|
|
72
82
|
reason: string;
|
|
@@ -169,11 +179,24 @@ export declare function foldDecisionQueue(text: string): FoldedQueue;
|
|
|
169
179
|
export declare function mergeApprovalsSectionBytes(section: MergeApprovalsSection): number;
|
|
170
180
|
/** The merge_approvals section, or null to leave it out of the state file. */
|
|
171
181
|
export declare function buildMergeApprovalsSection(input: MergeSectionInput): Promise<MergeApprovalsSection | null>;
|
|
172
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* Both sections, read at `input.now`. A builder that throws leaves its section
|
|
184
|
+
* out. A builder slower than MERGE_SECTION_SLOW_BUILD_MS is logged with its
|
|
185
|
+
* time: its section's refreshed_at is the build's start, so that time comes
|
|
186
|
+
* off the section's 60 s life before the state file is even written.
|
|
187
|
+
*/
|
|
173
188
|
export declare function buildMergeSections(input: MergeSectionInput): Promise<MergeSections>;
|
|
174
189
|
export interface RegistryMergeFlagReaderOptions {
|
|
175
190
|
env: NodeJS.ProcessEnv;
|
|
176
191
|
ttlMs?: number;
|
|
192
|
+
/**
|
|
193
|
+
* When set, a kept value at least this old (and younger than `ttlMs`) is
|
|
194
|
+
* answered at once and read again in the background, one read per flag and
|
|
195
|
+
* company at a time. A background read that fails leaves the kept value to
|
|
196
|
+
* expire at `ttlMs`, as it would have without the read. Unset: a kept value
|
|
197
|
+
* is answered until `ttlMs` and never read early.
|
|
198
|
+
*/
|
|
199
|
+
refreshAheadMs?: number;
|
|
177
200
|
timeoutMs?: number;
|
|
178
201
|
now?: () => number;
|
|
179
202
|
/** Test seam: one registry read; null when it could not be read. */
|
|
@@ -75,8 +75,18 @@ export const MERGE_SECTION_MAX_AGE_SECONDS = 60;
|
|
|
75
75
|
export const MERGE_SECTION_REFRESH_INTERVAL_MS = 15_000;
|
|
76
76
|
/** A flag value is asked of the registry again after this long. */
|
|
77
77
|
export const MERGE_FLAG_TTL_MS = 30_000;
|
|
78
|
+
/**
|
|
79
|
+
* The daemon's reader re-reads a kept flag value in the background once it is
|
|
80
|
+
* this old, and keeps answering with it until MERGE_FLAG_TTL_MS, so a build
|
|
81
|
+
* does not wait on the registry while a value is kept. On 2026-11-30 the
|
|
82
|
+
* state file was written 4 to 52 s after the build that stamped its sections
|
|
83
|
+
* started, and the native merge gate refuses a section past 60 s.
|
|
84
|
+
*/
|
|
85
|
+
export const MERGE_FLAG_REFRESH_AHEAD_MS = 15_000;
|
|
78
86
|
/** A flag read that takes longer than this counts as unreadable. */
|
|
79
87
|
export const MERGE_FLAG_READ_TIMEOUT_MS = 12_000;
|
|
88
|
+
/** A section build that takes longer than this is logged with its time. */
|
|
89
|
+
export const MERGE_SECTION_SLOW_BUILD_MS = 5_000;
|
|
80
90
|
const LINK_ID_RE = /^[A-Za-z0-9._-]{1,200}$/;
|
|
81
91
|
const REPO_RE = /^[a-z0-9_.-]+\/[a-z0-9_.-]+$/;
|
|
82
92
|
const HEAD_SHA_RE = /^[0-9a-f]{40}$/;
|
|
@@ -633,11 +643,28 @@ export async function buildMergeApprovalsSection(input) {
|
|
|
633
643
|
conduct.close();
|
|
634
644
|
}
|
|
635
645
|
}
|
|
636
|
-
/**
|
|
646
|
+
/**
|
|
647
|
+
* Both sections, read at `input.now`. A builder that throws leaves its section
|
|
648
|
+
* out. A builder slower than MERGE_SECTION_SLOW_BUILD_MS is logged with its
|
|
649
|
+
* time: its section's refreshed_at is the build's start, so that time comes
|
|
650
|
+
* off the section's 60 s life before the state file is even written.
|
|
651
|
+
*/
|
|
637
652
|
export async function buildMergeSections(input) {
|
|
653
|
+
const timed = async (name, build) => {
|
|
654
|
+
const started = performance.now();
|
|
655
|
+
try {
|
|
656
|
+
return await build().catch(() => null);
|
|
657
|
+
}
|
|
658
|
+
finally {
|
|
659
|
+
const ms = Math.round(performance.now() - started);
|
|
660
|
+
if (ms > MERGE_SECTION_SLOW_BUILD_MS) {
|
|
661
|
+
input.log?.("info", `merge section ${name} took ${ms} ms to build; its refreshed_at is the build's start`);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
};
|
|
638
665
|
const [holds, approvals] = await Promise.all([
|
|
639
|
-
|
|
640
|
-
|
|
666
|
+
timed("merge_holds", () => buildMergeHoldsSection(input)),
|
|
667
|
+
timed("merge_approvals", () => buildMergeApprovalsSection(input)),
|
|
641
668
|
]);
|
|
642
669
|
return { merge_holds: holds, merge_approvals: approvals };
|
|
643
670
|
}
|
|
@@ -676,12 +703,10 @@ export function createRegistryMergeFlagReader(options) {
|
|
|
676
703
|
const timeoutMs = options.timeoutMs ?? MERGE_FLAG_READ_TIMEOUT_MS;
|
|
677
704
|
const now = options.now ?? (() => performance.now());
|
|
678
705
|
const read = options.read ?? registryRead;
|
|
706
|
+
const refreshAheadMs = options.refreshAheadMs;
|
|
679
707
|
const held = new Map();
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
const kept = held.get(key);
|
|
683
|
-
if (kept && now() - kept.at < ttlMs)
|
|
684
|
-
return kept.value;
|
|
708
|
+
const reading = new Map();
|
|
709
|
+
const readNow = async (flag, company) => {
|
|
685
710
|
const startedAt = now();
|
|
686
711
|
let timer;
|
|
687
712
|
const timeout = new Promise((resolve) => {
|
|
@@ -705,12 +730,35 @@ export function createRegistryMergeFlagReader(options) {
|
|
|
705
730
|
finally {
|
|
706
731
|
clearTimeout(timer);
|
|
707
732
|
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
else
|
|
733
|
+
const key = JSON.stringify([flag, company.uid, company.slug]);
|
|
734
|
+
if (value !== null)
|
|
711
735
|
held.set(key, { at: startedAt, value });
|
|
736
|
+
// A failed read is never kept. A kept value it would replace expires at
|
|
737
|
+
// ttlMs as before: drop it only once it has.
|
|
738
|
+
else if (!(held.get(key) && now() - held.get(key).at < ttlMs))
|
|
739
|
+
held.delete(key);
|
|
712
740
|
return value;
|
|
713
741
|
};
|
|
742
|
+
// One read per flag and company at a time.
|
|
743
|
+
const readOnce = (key, flag, company) => {
|
|
744
|
+
let pending = reading.get(key);
|
|
745
|
+
if (!pending) {
|
|
746
|
+
pending = readNow(flag, company).finally(() => reading.delete(key));
|
|
747
|
+
reading.set(key, pending);
|
|
748
|
+
}
|
|
749
|
+
return pending;
|
|
750
|
+
};
|
|
751
|
+
return async (flag, company) => {
|
|
752
|
+
const key = JSON.stringify([flag, company.uid, company.slug]);
|
|
753
|
+
const kept = held.get(key);
|
|
754
|
+
if (kept && now() - kept.at < ttlMs) {
|
|
755
|
+
if (refreshAheadMs !== undefined && now() - kept.at >= refreshAheadMs) {
|
|
756
|
+
void readOnce(key, flag, company).catch(() => { });
|
|
757
|
+
}
|
|
758
|
+
return kept.value;
|
|
759
|
+
}
|
|
760
|
+
return readOnce(key, flag, company);
|
|
761
|
+
};
|
|
714
762
|
}
|
|
715
763
|
/**
|
|
716
764
|
* Rebuild both sections now and then every `intervalMs` after the previous
|
package/dist/lib/daemon/run.js
CHANGED
|
@@ -69,7 +69,7 @@ import { needsWindowsTaskRelaunch, scheduleWindowsTaskRelaunch } from "./windows
|
|
|
69
69
|
import { detectMachineType } from "./machine-type.js";
|
|
70
70
|
import { appendPrivate, daemonPaths, ensurePrivateDir, openPrivateAppend } from "./paths.js";
|
|
71
71
|
import { SELF_CHECK_RESULT_FILE, readSelfCheckResult } from "./selfcheck.js";
|
|
72
|
-
import { createRegistryMergeFlagReader, startMergeSectionRefresh } from "./merge-sections.js";
|
|
72
|
+
import { createRegistryMergeFlagReader, MERGE_FLAG_REFRESH_AHEAD_MS, startMergeSectionRefresh } from "./merge-sections.js";
|
|
73
73
|
import { createDaemonStateWriter, daemonStateFilePath, defaultDaemonStateFilePath, readVaultAccessManifest, selfCheckMachineChecks, } from "./state-file.js";
|
|
74
74
|
import { hqdSocketPath } from "./protocol.js";
|
|
75
75
|
import { startHqdServer, syncHqdEnabledMarker } from "./server.js";
|
|
@@ -1245,7 +1245,7 @@ export async function runDaemon(opts) {
|
|
|
1245
1245
|
// between the 30-second registry requests (merge-sections.ts).
|
|
1246
1246
|
const mergeSections = startMergeSectionRefresh({
|
|
1247
1247
|
hqRoot: () => readDaemonConfig(paths.configPath).hqRoot ?? (env.HQ_ROOT?.trim() || undefined),
|
|
1248
|
-
readFlag: createRegistryMergeFlagReader({ env }),
|
|
1248
|
+
readFlag: createRegistryMergeFlagReader({ env, refreshAheadMs: MERGE_FLAG_REFRESH_AHEAD_MS }),
|
|
1249
1249
|
onRefresh: () => stateWriter.refresh(),
|
|
1250
1250
|
log,
|
|
1251
1251
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cli",
|
|
3
|
-
"version": "5.345.
|
|
3
|
+
"version": "5.345.273",
|
|
4
4
|
"description": "HQ by Indigo management CLI — modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
"*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}": "eslint --cache --no-error-on-unmatched-pattern"
|
|
129
129
|
},
|
|
130
130
|
"optionalDependencies": {
|
|
131
|
-
"@indigoai-us/hq-hook-win32-x64": "5.345.
|
|
132
|
-
"@indigoai-us/hq-hook-win32-arm64": "5.345.
|
|
133
|
-
"@indigoai-us/hq-hook-darwin-x64": "5.345.
|
|
134
|
-
"@indigoai-us/hq-hook-darwin-arm64": "5.345.
|
|
135
|
-
"@indigoai-us/hq-hook-linux-x64": "5.345.
|
|
136
|
-
"@indigoai-us/hq-hook-linux-arm64": "5.345.
|
|
131
|
+
"@indigoai-us/hq-hook-win32-x64": "5.345.273",
|
|
132
|
+
"@indigoai-us/hq-hook-win32-arm64": "5.345.273",
|
|
133
|
+
"@indigoai-us/hq-hook-darwin-x64": "5.345.273",
|
|
134
|
+
"@indigoai-us/hq-hook-darwin-arm64": "5.345.273",
|
|
135
|
+
"@indigoai-us/hq-hook-linux-x64": "5.345.273",
|
|
136
|
+
"@indigoai-us/hq-hook-linux-arm64": "5.345.273"
|
|
137
137
|
}
|
|
138
138
|
}
|