@indigoai-us/hq-cli 5.258.0 → 5.259.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,15 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.259.0] — 2026-09-28
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- The checkpoint stop gate now recognizes path-qualified `hq core checkpoint`
|
|
10
|
+
commands without treating lookalike text as a checkpoint.
|
|
11
|
+
- `hq doctor --live-runtimes` now invokes Windows npm shims through their `.cmd`
|
|
12
|
+
entry points.
|
|
13
|
+
|
|
5
14
|
## [5.258.0] — 2026-09-28
|
|
6
15
|
|
|
7
16
|
### Fixed
|
|
@@ -350,7 +350,11 @@ exec 3>&2
|
|
|
350
350
|
else ""
|
|
351
351
|
end;
|
|
352
352
|
def checkpoint_command:
|
|
353
|
-
|
|
353
|
+
# Match the actual command at a shell command boundary. A whitespace
|
|
354
|
+
# boundary alone would accept `echo hq core checkpoint`; allow only the
|
|
355
|
+
# shell wrappers and environment assignments that can invoke hq itself.
|
|
356
|
+
# Quoted assignment values and executable paths may contain spaces.
|
|
357
|
+
test("(^\\s*|[;&|()]\\s*|\\n\\s*)(?:(?:command|exec)\\s+)?(?:env\\s+)?([A-Za-z_][A-Za-z0-9_]*=(?:\"(?:\\\\.|[^\"\\\\])*\"|\\u0027[^\\u0027]*\\u0027|[^\\s;&|()]*)\\s+)*(?:(?:command|exec|env)\\s+)?(\"[^\"]*[/\\\\]hq\"|[^\\s;&|()]*[/\\\\]hq|hq)\\s+core\\s+checkpoint(\\s|$)");
|
|
354
358
|
def strip_quoted:
|
|
355
359
|
# Remove quoted spans so flag text inside a --summary value (e.g.
|
|
356
360
|
# --summary "investigated --gate-probe behavior") is never mistaken for
|
|
@@ -362,12 +366,21 @@ exec 3>&2
|
|
|
362
366
|
def checkpoint_flag($flag):
|
|
363
367
|
strip_quoted | test("(^|\\s)" + $flag + "(\\s|$)");
|
|
364
368
|
def pure_checkpoint:
|
|
365
|
-
# The command is ONLY a checkpoint invocation (
|
|
366
|
-
#
|
|
367
|
-
# `git status; hq core checkpoint
|
|
368
|
-
# tool call, so its exemptions
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
# The command is ONLY a checkpoint invocation (recognized wrappers and
|
|
370
|
+
# env assignments are allowed, but no other command may be joined by a
|
|
371
|
+
# separator). A compound call like `git status; hq core checkpoint
|
|
372
|
+
# --idle` did other work in the same tool call, so its exemptions do not
|
|
373
|
+
# apply.
|
|
374
|
+
# Normalize a quoted or path-qualified executable to hq before
|
|
375
|
+
# stripping quoted argument values, so a path with spaces still gets
|
|
376
|
+
# the same --idle exemptions.
|
|
377
|
+
(capture("^(?<prefix>\\s*(?:(?:command|exec)\\s+)?(?:env\\s+)?([A-Za-z_][A-Za-z0-9_]*=(?:\"(?:\\\\.|[^\"\\\\])*\"|\\u0027[^\\u0027]*\\u0027|[^\\s;&|()]*)\\s+)*(?:(?:command|exec|env)\\s+)?)(?<executable>\"[^\"]*[/\\\\]hq\"|[^\\s;&|()]*[/\\\\]hq|hq)(?<tail>\\s+core\\s+checkpoint(?:\\s+[^;&|\n]*)?)$")? // false) as $parts
|
|
378
|
+
| if $parts == false then false
|
|
379
|
+
else
|
|
380
|
+
($parts.prefix + "hq" + $parts.tail)
|
|
381
|
+
| strip_quoted
|
|
382
|
+
| test("^\\s*(?:(?:command|exec)\\s+)?(?:env\\s+)?([A-Za-z_][A-Za-z0-9_]*=(?:\"(?:\\\\.|[^\"\\\\])*\"|\\u0027[^\\u0027]*\\u0027|[^\\s;&|()]*)\\s+)*(?:(?:command|exec|env)\\s+)?hq\\s+core\\s+checkpoint([\\s][^;&|\n]*)?$")
|
|
383
|
+
end;
|
|
371
384
|
def gate_feedback_user:
|
|
372
385
|
# This gate surfaces its own Stop feedback as a synthetic user row. That
|
|
373
386
|
# row is a turn boundary for the checkpoint requirement, but NOT for
|
|
@@ -80,6 +80,8 @@ export interface RuntimeHealthDeps {
|
|
|
80
80
|
execProbe?: (file: string, args: string[], timeoutMs: number) => Promise<ProbeOutcome>;
|
|
81
81
|
/** Per-probe timeout. Default {@link DEFAULT_PROBE_TIMEOUT_MS}. */
|
|
82
82
|
probeTimeoutMs?: number;
|
|
83
|
+
/** Runtime platform override for the spawn plan (normally process.platform). */
|
|
84
|
+
platform?: NodeJS.Platform;
|
|
83
85
|
}
|
|
84
86
|
/**
|
|
85
87
|
* The AI-runtime-health check family entry. Presence checks always run; the
|
|
@@ -29,6 +29,7 @@ import { spawn } from "node:child_process";
|
|
|
29
29
|
import * as fs from "node:fs";
|
|
30
30
|
import * as os from "node:os";
|
|
31
31
|
import * as path from "node:path";
|
|
32
|
+
import { planCommandSpawn } from "../../../utils/windows-spawn.js";
|
|
32
33
|
/** The id of the AI-runtime-health family. */
|
|
33
34
|
export const RUNTIMES_FAMILY_ID = "runtimes";
|
|
34
35
|
/** Common id prefix for every result this family emits. */
|
|
@@ -101,7 +102,8 @@ export async function checkRuntimeHealth(context, deps = {}) {
|
|
|
101
102
|
async function runRuntimeChecks(context, deps) {
|
|
102
103
|
const resolved = {
|
|
103
104
|
resolveBinary: deps.resolveBinary ?? resolveOnPath,
|
|
104
|
-
execProbe: deps.execProbe ??
|
|
105
|
+
execProbe: deps.execProbe ??
|
|
106
|
+
((file, args, timeoutMs) => defaultExecProbe(file, args, timeoutMs, deps.platform ?? process.platform)),
|
|
105
107
|
timeoutMs: deps.probeTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS,
|
|
106
108
|
live: context.liveRuntimes === true,
|
|
107
109
|
};
|
|
@@ -268,11 +270,19 @@ export function resolveOnPath(binary) {
|
|
|
268
270
|
* CLI that reads piped stdin in non-TTY mode — blocks forever on a pipe that
|
|
269
271
|
* never reaches EOF, which turns every probe into a timeout.
|
|
270
272
|
*/
|
|
271
|
-
function defaultExecProbe(file, args, timeoutMs) {
|
|
273
|
+
function defaultExecProbe(file, args, timeoutMs, platform) {
|
|
272
274
|
return new Promise((resolve) => {
|
|
273
|
-
const
|
|
275
|
+
const command = platform === "win32" && !/\.(?:cmd|bat|exe|com)$/i.test(file)
|
|
276
|
+
? `${file}.cmd`
|
|
277
|
+
: file;
|
|
278
|
+
const plan = planCommandSpawn(command, args, platform);
|
|
279
|
+
const child = spawn(plan.cmd, plan.args, {
|
|
274
280
|
cwd: os.tmpdir(),
|
|
275
281
|
stdio: ["ignore", "pipe", "pipe"],
|
|
282
|
+
shell: plan.shell,
|
|
283
|
+
...(plan.windowsVerbatimArguments === undefined
|
|
284
|
+
? {}
|
|
285
|
+
: { windowsVerbatimArguments: plan.windowsVerbatimArguments }),
|
|
276
286
|
});
|
|
277
287
|
const cap = 1024 * 1024;
|
|
278
288
|
let stdout = "";
|