@indigoai-us/hq-cli 5.345.233 → 5.345.235
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 +67 -0
- package/dist/command-catalog.generated.d.ts +240 -7
- package/dist/command-catalog.generated.js +296 -7
- package/dist/command-registration-plan.d.ts +24 -0
- package/dist/command-registration-plan.js +4 -0
- package/dist/commands/bot-companies.d.ts +4 -1
- package/dist/commands/bot-companies.js +5 -1
- package/dist/commands/bot.d.ts +10 -0
- package/dist/commands/bot.js +165 -36
- package/dist/commands/capacity.js +1 -1
- package/dist/commands/core-handoff.js +2 -2
- package/dist/commands/core-ontology-native.js +5 -4
- package/dist/commands/core-pipeline-workflow-runner-native.js +4 -9
- package/dist/commands/deploy-app-db.d.ts +3 -0
- package/dist/commands/deploy-app-db.js +79 -0
- package/dist/commands/deploy-app-upload.d.ts +3 -0
- package/dist/commands/deploy-app-upload.js +120 -0
- package/dist/commands/deploy-comments.js +46 -1
- package/dist/commands/deploy-mutations.js +71 -5
- package/dist/commands/deploy-ssr.d.ts +3 -0
- package/dist/commands/deploy-ssr.js +74 -0
- package/dist/commands/dm.d.ts +7 -1
- package/dist/commands/dm.js +39 -9
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/doctor.js +26 -10
- package/dist/commands/fingerprint.js +4 -9
- package/dist/commands/install-global.js +10 -0
- package/dist/commands/lanes-accounts.js +5 -5
- package/dist/commands/lanes-hold.js +1 -1
- package/dist/commands/lanes-message.js +3 -3
- package/dist/commands/lanes-move.js +1 -1
- package/dist/commands/lanes-resume.js +6 -6
- package/dist/commands/lanes-watch.js +2 -2
- package/dist/commands/lanes.js +21 -21
- package/dist/commands/work-env.d.ts +90 -0
- package/dist/commands/work-env.js +304 -0
- package/dist/lazy-commands.js +2 -10
- package/dist/lib/bot/api.d.ts +27 -0
- package/dist/lib/bot/api.js +28 -2
- package/dist/lib/bot/cloud-create.d.ts +46 -0
- package/dist/lib/bot/cloud-create.js +128 -0
- package/dist/lib/bot/fleet-daemon.js +4 -1
- package/dist/lib/bot/fleet-local.d.ts +7 -0
- package/dist/lib/bot/fleet-local.js +39 -3
- package/dist/lib/bot/fleet-owner-companies.js +2 -2
- package/dist/lib/bot/promote.d.ts +81 -2
- package/dist/lib/bot/promote.js +425 -51
- package/dist/lib/bot/promotion-hold.d.ts +9 -0
- package/dist/lib/bot/promotion-hold.js +29 -0
- package/dist/lib/bot/promotion-receipt.d.ts +10 -0
- package/dist/lib/bot/promotion-receipt.js +41 -1
- package/dist/lib/bot/promotion-upload.d.ts +6 -1
- package/dist/lib/bot/promotion-upload.js +3 -1
- package/dist/lib/bot/readiness.d.ts +9 -0
- package/dist/lib/bot/readiness.js +16 -0
- package/dist/lib/capacity/route.js +4 -4
- package/dist/lib/capacity/sign-in.js +1 -1
- package/dist/lib/checkpoint-ontology/entity-file.js +15 -17
- package/dist/lib/daemon/catalog.d.ts +2 -0
- package/dist/lib/daemon/catalog.js +2 -0
- package/dist/lib/daemon/hook-requests.js +23 -3
- package/dist/lib/daemon/run.d.ts +14 -0
- package/dist/lib/daemon/run.js +24 -14
- package/dist/lib/deploy-api.d.ts +2 -0
- package/dist/lib/deploy-api.js +9 -0
- package/dist/lib/environment/work-requirements.js +1 -1
- package/dist/lib/hook-engine/coverage.js +50 -0
- package/dist/lib/hot-channels/signals-pass.d.ts +0 -76
- package/dist/lib/hot-channels/signals-pass.js +81 -4
- package/dist/lib/lanes/account-company.js +1 -1
- package/dist/lib/lanes/account-ownership.js +1 -1
- package/dist/lib/lanes/accounts.js +1 -1
- package/dist/lib/lanes/delivery.js +7 -7
- package/dist/lib/lanes/dropbox.js +1 -1
- package/dist/lib/lanes/grants.js +3 -3
- package/dist/lib/lanes/hq-root.js +1 -1
- package/dist/lib/lanes/keep-alive-audit.js +2 -2
- package/dist/lib/lanes/links.js +4 -4
- package/dist/lib/lanes/monitor.js +3 -3
- package/dist/lib/lanes/quota-notice.js +1 -1
- package/dist/lib/lanes/reconcile.js +22 -12
- package/dist/lib/lanes/signal-brief-template.js +1 -1
- package/dist/lib/lanes/worker-continuity.js +1 -1
- package/dist/lib/mesh/live/direct-drain.d.ts +1 -0
- package/dist/lib/mesh/live/direct-drain.js +12 -1
- package/dist/lib/mesh/live/emit.d.ts +1 -1
- package/dist/lib/mesh/live/emit.js +10 -5
- package/dist/lib/mesh/live/flush.js +19 -4
- package/dist/lib/mesh/live/reporting-privacy.d.ts +9 -3
- package/dist/lib/mesh/live/reporting-privacy.js +27 -7
- package/dist/lib/mesh/live/spool.d.ts +2 -0
- package/dist/lib/mesh/live/spool.js +41 -0
- package/dist/lib/signals/sanitize.js +5 -4
- package/dist/lib/signals/steps/garden.js +5 -4
- package/dist/lib/windows/jq.d.ts +17 -0
- package/dist/lib/windows/jq.js +72 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.js +11 -2
- package/dist/utils/hq-roots-core.d.ts +5 -0
- package/dist/utils/hq-roots-core.js +18 -9
- package/dist/utils/owner-session.d.ts +13 -0
- package/dist/utils/owner-session.js +28 -0
- package/package.json +7 -7
- package/scripts/install-hook-engine.mjs +8 -15
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* Only exact slug or alias matches are merged, by ontology-garden.mjs itself;
|
|
15
15
|
* this step adds no merging of its own for the >= 0.95 band.
|
|
16
16
|
*/
|
|
17
|
+
import { splitFrontmatterBody } from "../../../utils/frontmatter.js";
|
|
17
18
|
import * as fs from "node:fs";
|
|
18
19
|
import * as path from "node:path";
|
|
19
20
|
import { localDate } from "../local-date.js";
|
|
@@ -44,11 +45,11 @@ export function isByaBook(company, ref) {
|
|
|
44
45
|
}
|
|
45
46
|
/** Same flat key: value reader as ontology-garden.mjs. */
|
|
46
47
|
export function readFrontmatter(text) {
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
48
|
+
const block = splitFrontmatterBody(text, "lf");
|
|
49
|
+
if (!block)
|
|
49
50
|
return { fm: {}, body: text.trim() };
|
|
50
51
|
const fm = {};
|
|
51
|
-
for (const line of
|
|
52
|
+
for (const line of block.yaml.split("\n")) {
|
|
52
53
|
const mm = line.match(/^([A-Za-z_]+):\s*(.*)$/);
|
|
53
54
|
if (!mm)
|
|
54
55
|
continue;
|
|
@@ -57,7 +58,7 @@ export function readFrontmatter(text) {
|
|
|
57
58
|
? v.slice(1, -1).split(",").map((s) => s.trim().replace(/^["']|["']$/g, "")).filter(Boolean)
|
|
58
59
|
: v.replace(/^["']|["']$/g, "");
|
|
59
60
|
}
|
|
60
|
-
return { fm, body:
|
|
61
|
+
return { fm, body: block.body.trim() };
|
|
61
62
|
}
|
|
62
63
|
const str = (v) => (Array.isArray(v) ? v.join(",") : v ?? "");
|
|
63
64
|
/** Pending candidate files (relative to hqRoot) under one _candidates dir. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const WINDOWS_JQ_REPAIR = "hq doctor --fix-jq";
|
|
2
|
+
interface JqAsset {
|
|
3
|
+
name: string;
|
|
4
|
+
sha256: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function windowsJqPath(home?: string): string;
|
|
7
|
+
interface InstallOptions {
|
|
8
|
+
platform?: NodeJS.Platform;
|
|
9
|
+
arch?: NodeJS.Architecture;
|
|
10
|
+
home?: string;
|
|
11
|
+
fetch?: typeof fetch;
|
|
12
|
+
asset?: JqAsset;
|
|
13
|
+
}
|
|
14
|
+
/** The npm lifecycle, global hook setup and doctor use the same Windows installer. */
|
|
15
|
+
export declare function installWindowsJq({ platform, arch, home, fetch: download, asset, }?: InstallOptions): Promise<string | undefined>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=jq.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { mkdir, mkdtemp, rename, rm, writeFile } from "node:fs/promises";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
const version = "1.8.2";
|
|
7
|
+
const release = `https://github.com/jqlang/jq/releases/download/jq-${version}`;
|
|
8
|
+
export const WINDOWS_JQ_REPAIR = "hq doctor --fix-jq";
|
|
9
|
+
// https://github.com/jqlang/jq/releases/tag/jq-1.8.2
|
|
10
|
+
const assets = {
|
|
11
|
+
x64: {
|
|
12
|
+
name: "jq-windows-amd64.exe",
|
|
13
|
+
sha256: "a6fc67fedaf9128a3309a1e2ebb8b986aeccf70122ee46d2cb4849e423f0c627",
|
|
14
|
+
},
|
|
15
|
+
arm64: {
|
|
16
|
+
name: "jq-windows-arm64.exe",
|
|
17
|
+
sha256: "083b5377392bc57cf27052b6d20a2d927770683bca844632901ff38b4b7b0ac7",
|
|
18
|
+
},
|
|
19
|
+
ia32: {
|
|
20
|
+
name: "jq-windows-i386.exe",
|
|
21
|
+
sha256: "a99cb668f95bdd788d9ee20529613b115e5d2a0d7f9127ee6976607e878558ba",
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export function windowsJqPath(home = homedir()) {
|
|
25
|
+
// hq-core-staging #2047 adds this directory to hook PATH when it holds jq.exe.
|
|
26
|
+
return join(home, ".local", "bin", "jq.exe");
|
|
27
|
+
}
|
|
28
|
+
function digest(bytes) {
|
|
29
|
+
return createHash("sha256").update(bytes).digest("hex");
|
|
30
|
+
}
|
|
31
|
+
function matchesAsset(file, asset) {
|
|
32
|
+
try {
|
|
33
|
+
return digest(readFileSync(file)) === asset.sha256;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (error.code === "ENOENT")
|
|
37
|
+
return false;
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** The npm lifecycle, global hook setup and doctor use the same Windows installer. */
|
|
42
|
+
export async function installWindowsJq({ platform = process.platform, arch = process.arch, home, fetch: download = fetch, asset = assets[arch], } = {}) {
|
|
43
|
+
if (platform !== "win32")
|
|
44
|
+
return undefined;
|
|
45
|
+
if (!asset)
|
|
46
|
+
throw new Error(`jq has no official Windows build for ${arch}.`);
|
|
47
|
+
const target = windowsJqPath(home);
|
|
48
|
+
if (matchesAsset(target, asset))
|
|
49
|
+
return target;
|
|
50
|
+
const response = await download(`${release}/${asset.name}`, {
|
|
51
|
+
signal: AbortSignal.timeout(20_000),
|
|
52
|
+
});
|
|
53
|
+
if (!response.ok)
|
|
54
|
+
throw new Error(`jq download failed (HTTP ${response.status}).`);
|
|
55
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
56
|
+
if (digest(bytes) !== asset.sha256) {
|
|
57
|
+
throw new Error(`The SHA-256 of ${asset.name} did not match the pinned release checksum.`);
|
|
58
|
+
}
|
|
59
|
+
const dir = dirname(target);
|
|
60
|
+
await mkdir(dir, { recursive: true });
|
|
61
|
+
const staged = await mkdtemp(join(dir, ".hq-jq-"));
|
|
62
|
+
try {
|
|
63
|
+
const file = join(staged, "jq.exe");
|
|
64
|
+
await writeFile(file, bytes, { flag: "wx", mode: 0o755 });
|
|
65
|
+
await rename(file, target);
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
await rm(staged, { recursive: true, force: true });
|
|
69
|
+
}
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=jq.js.map
|
|
@@ -24,4 +24,12 @@ export declare function splitFrontmatterBlock(text: string): {
|
|
|
24
24
|
frontmatter: string;
|
|
25
25
|
body: string;
|
|
26
26
|
} | null;
|
|
27
|
+
/**
|
|
28
|
+
* Read the YAML bytes and body of a block without parsing the YAML.
|
|
29
|
+
* Legacy LF readers can require LF at the opening and closing fences.
|
|
30
|
+
*/
|
|
31
|
+
export declare function splitFrontmatterBody(text: string, lineEndings?: "lf" | "lf-or-crlf"): {
|
|
32
|
+
yaml: string;
|
|
33
|
+
body: string;
|
|
34
|
+
} | null;
|
|
27
35
|
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
/** Closing fence must end its line or the text. Group 1 is the YAML text. */
|
|
13
13
|
const FENCE_RE = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/;
|
|
14
14
|
/** Closing fence may run straight into the body. Group 1 is the fenced block, group 2 the rest. */
|
|
15
|
-
const BLOCK_RE = /^(---\r?\n[\s\S]
|
|
15
|
+
const BLOCK_RE = /^(---\r?\n([\s\S]*?)\r?\n---\r?\n?)([\s\S]*)$/;
|
|
16
|
+
const LF_BLOCK_RE = /^(---\n([\s\S]*?)\n---\n?)([\s\S]*)$/;
|
|
16
17
|
/**
|
|
17
18
|
* Match a frontmatter fence at the very start of `text`. `[1]` is the YAML
|
|
18
19
|
* text between the fences, `[0]` runs through the closing fence's line ending.
|
|
@@ -28,6 +29,14 @@ export function matchFrontmatter(text) {
|
|
|
28
29
|
*/
|
|
29
30
|
export function splitFrontmatterBlock(text) {
|
|
30
31
|
const match = BLOCK_RE.exec(text);
|
|
31
|
-
return match ? { frontmatter: match[1], body: match[
|
|
32
|
+
return match ? { frontmatter: match[1], body: match[3] } : null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Read the YAML bytes and body of a block without parsing the YAML.
|
|
36
|
+
* Legacy LF readers can require LF at the opening and closing fences.
|
|
37
|
+
*/
|
|
38
|
+
export function splitFrontmatterBody(text, lineEndings = "lf-or-crlf") {
|
|
39
|
+
const match = (lineEndings === "lf" ? LF_BLOCK_RE : BLOCK_RE).exec(text);
|
|
40
|
+
return match ? { yaml: match[2], body: match[3] } : null;
|
|
32
41
|
}
|
|
33
42
|
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -36,6 +36,11 @@ export declare const BUNDLED_ASSET_DIR: string;
|
|
|
36
36
|
* checkout without a personal overlay, and a personal-only overlay.
|
|
37
37
|
*/
|
|
38
38
|
export declare function isHqRoot(dir: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Find the nearest matching ancestor, including the filesystem root.
|
|
41
|
+
* Callers supply their existing marker check when they use a different HQ layout.
|
|
42
|
+
*/
|
|
43
|
+
export declare function findHqRootAncestor(start: string, matches?: (dir: string) => boolean, parentOf?: (dir: string) => string): string | null;
|
|
39
44
|
export type PackageRootFs = Pick<typeof fs, "existsSync" | "readFileSync" | "realpathSync" | "statSync">;
|
|
40
45
|
export type PackageRootResolverOptions = {
|
|
41
46
|
/** Directory containing the currently-running compiled module. */
|
|
@@ -61,6 +61,21 @@ export function isHqRoot(dir) {
|
|
|
61
61
|
fs.existsSync(path.join(dir, "core")) ||
|
|
62
62
|
fs.existsSync(path.join(dir, "personal"))));
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Find the nearest matching ancestor, including the filesystem root.
|
|
66
|
+
* Callers supply their existing marker check when they use a different HQ layout.
|
|
67
|
+
*/
|
|
68
|
+
export function findHqRootAncestor(start, matches = isHqRoot, parentOf = path.dirname) {
|
|
69
|
+
let dir = start;
|
|
70
|
+
for (;;) {
|
|
71
|
+
if (matches(dir))
|
|
72
|
+
return dir;
|
|
73
|
+
const parent = parentOf(dir);
|
|
74
|
+
if (parent === dir)
|
|
75
|
+
return null;
|
|
76
|
+
dir = parent;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
64
79
|
function realpathOrResolve(p, fileSystem = fs) {
|
|
65
80
|
try {
|
|
66
81
|
return fileSystem.realpathSync(p);
|
|
@@ -306,15 +321,9 @@ export function resolveLiveRoot(opts = {}) {
|
|
|
306
321
|
// Walk up from cwd. Unlike the explicit tiers this is a guess, so failing to
|
|
307
322
|
// find a root here is reported as "run this from inside HQ" rather than as a
|
|
308
323
|
// bad value.
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
return dir;
|
|
313
|
-
const parent = path.dirname(dir);
|
|
314
|
-
if (parent === dir)
|
|
315
|
-
break;
|
|
316
|
-
dir = parent;
|
|
317
|
-
}
|
|
324
|
+
const discovered = findHqRootAncestor(realpathOrResolve(opts.cwd ?? process.cwd()), (dir) => isHqRoot(dir) && !isWithinPackage(dir));
|
|
325
|
+
if (discovered !== null)
|
|
326
|
+
return discovered;
|
|
318
327
|
throw rootError("Could not find your HQ installation. Run this from inside your HQ " +
|
|
319
328
|
"directory, or pass --hq-root <path> / set $HQ_ROOT.");
|
|
320
329
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface OwnerSessionDeps {
|
|
2
|
+
hasPersonSession?: () => boolean;
|
|
3
|
+
hasMachineCreds?: () => boolean;
|
|
4
|
+
machineKind?: () => string | undefined;
|
|
5
|
+
machineToken?: (signal?: AbortSignal) => Promise<string>;
|
|
6
|
+
personToken?: (interactive: boolean, signal?: AbortSignal) => Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare function delegatedOwnerSub(token: string | undefined): string | null;
|
|
9
|
+
export declare function ensureOwnerToken(options: {
|
|
10
|
+
interactive: boolean;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
}, deps?: OwnerSessionDeps): Promise<string>;
|
|
13
|
+
//# sourceMappingURL=owner-session.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { loadMachineCreds } from "@indigoai-us/hq-cloud";
|
|
2
|
+
import { ensureCognitoToken } from "./cognito-session.js";
|
|
3
|
+
import { hasPersonCachedSession, probeMachineIdentity } from "./machine-principal-state.js";
|
|
4
|
+
import { decodeJwtPayload } from "./person-token-cache.js";
|
|
5
|
+
const NEVER_AN_OWNER = new Set(["agent", "company-outpost"]);
|
|
6
|
+
export function delegatedOwnerSub(token) {
|
|
7
|
+
const claims = decodeJwtPayload(token);
|
|
8
|
+
if (claims?.["custom:entityType"] !== "outpost")
|
|
9
|
+
return null;
|
|
10
|
+
const sub = claims["custom:delegatedSub"];
|
|
11
|
+
return typeof sub === "string" && sub.trim().length > 0 ? sub : null;
|
|
12
|
+
}
|
|
13
|
+
export async function ensureOwnerToken(options, deps = {}) {
|
|
14
|
+
const hasPersonSession = deps.hasPersonSession ?? (() => hasPersonCachedSession());
|
|
15
|
+
const hasMachineCreds = deps.hasMachineCreds ?? (() => probeMachineIdentity(process.env));
|
|
16
|
+
const machineToken = deps.machineToken ??
|
|
17
|
+
((signal) => ensureCognitoToken({ tokenSource: "machine", interactive: false, ...(signal ? { signal } : {}) }));
|
|
18
|
+
const personToken = deps.personToken ??
|
|
19
|
+
((interactive, signal) => ensureCognitoToken({ tokenSource: "person", interactive, ...(signal ? { signal } : {}) }));
|
|
20
|
+
const machineKind = deps.machineKind ?? (() => loadMachineCreds()?.entityType);
|
|
21
|
+
if (!hasPersonSession() && hasMachineCreds() && !NEVER_AN_OWNER.has(machineKind() ?? "")) {
|
|
22
|
+
const token = await machineToken(options.signal);
|
|
23
|
+
if (delegatedOwnerSub(token))
|
|
24
|
+
return token;
|
|
25
|
+
}
|
|
26
|
+
return personToken(options.interactive, options.signal);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=owner-session.js.map
|
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.235",
|
|
4
4
|
"description": "HQ by Indigo management CLI — modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -126,11 +126,11 @@
|
|
|
126
126
|
"*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}": "eslint --cache --no-error-on-unmatched-pattern"
|
|
127
127
|
},
|
|
128
128
|
"optionalDependencies": {
|
|
129
|
-
"@indigoai-us/hq-hook-win32-x64": "5.345.
|
|
130
|
-
"@indigoai-us/hq-hook-win32-arm64": "5.345.
|
|
131
|
-
"@indigoai-us/hq-hook-darwin-x64": "5.345.
|
|
132
|
-
"@indigoai-us/hq-hook-darwin-arm64": "5.345.
|
|
133
|
-
"@indigoai-us/hq-hook-linux-x64": "5.345.
|
|
134
|
-
"@indigoai-us/hq-hook-linux-arm64": "5.345.
|
|
129
|
+
"@indigoai-us/hq-hook-win32-x64": "5.345.235",
|
|
130
|
+
"@indigoai-us/hq-hook-win32-arm64": "5.345.235",
|
|
131
|
+
"@indigoai-us/hq-hook-darwin-x64": "5.345.235",
|
|
132
|
+
"@indigoai-us/hq-hook-darwin-arm64": "5.345.235",
|
|
133
|
+
"@indigoai-us/hq-hook-linux-x64": "5.345.235",
|
|
134
|
+
"@indigoai-us/hq-hook-linux-arm64": "5.345.235"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -24,20 +24,13 @@ try {
|
|
|
24
24
|
} catch (error) {
|
|
25
25
|
console.warn(`HQ PowerShell launcher cleanup skipped: ${error instanceof Error ? error.message : String(error)}. If PowerShell blocks hq, run hq.cmd doctor --fix.`);
|
|
26
26
|
}
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const dirs = (process.env.PATH ?? '').split(';').map(dir => dir.trim().replace(/^"(.*)"$/, '$1')).filter(Boolean);
|
|
36
|
-
// Git Bash runs the hooks: it can run jq.exe but not a jq.cmd or jq.bat.
|
|
37
|
-
if (!dirs.some(dir => existsSync(join(dir, 'jq.exe')))) {
|
|
38
|
-
console.warn('jq not found on PATH. Install jq (Windows: winget install jqlang.jq) and open a new terminal; HQ hooks block tool calls until jq is on PATH.');
|
|
39
|
-
}
|
|
27
|
+
// The CLI stays available for repair if the download fails. The hook's
|
|
28
|
+
// existing refusal still applies whenever it cannot find jq.
|
|
29
|
+
if (process.platform === 'win32') {
|
|
30
|
+
try {
|
|
31
|
+
const { installWindowsJq } = await import('../dist/lib/windows/jq.js');
|
|
32
|
+
await installWindowsJq();
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.warn(`HQ could not install jq: ${error instanceof Error ? error.message : String(error)}. Repair: hq doctor --fix-jq.`);
|
|
40
35
|
}
|
|
41
|
-
} catch {
|
|
42
|
-
// A PATH scan failure must not fail the install.
|
|
43
36
|
}
|