@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.
- package/CHANGELOG.md +7 -0
- package/dist/commands/lanes-message.js +100 -75
- package/dist/commands/lanes.js +52 -4
- package/dist/lib/bot/coding-tool-activity.d.ts +2 -8
- package/dist/lib/bot/coding-tool-activity.js +1 -5
- package/dist/lib/bot/setup-tool-offer.d.ts +0 -4
- package/dist/lib/bot/setup-tool-offer.js +2 -2
- package/dist/lib/checkpoint-ontology/tree.d.ts +0 -1
- package/dist/lib/checkpoint-ontology/tree.js +1 -1
- package/dist/lib/core-utils/qmd-reindex-after-sync.d.ts +0 -2
- package/dist/lib/core-utils/qmd-reindex-after-sync.js +2 -2
- package/dist/lib/daemon/convergence.d.ts +0 -2
- package/dist/lib/daemon/convergence.js +2 -2
- package/dist/lib/daemon/flag-monitor.d.ts +0 -2
- package/dist/lib/daemon/flag-monitor.js +2 -2
- package/dist/lib/daemon/heartbeat.d.ts +0 -4
- package/dist/lib/daemon/heartbeat.js +3 -3
- package/dist/lib/daemon/legacy-sync-env.d.ts +0 -1
- package/dist/lib/daemon/legacy-sync-env.js +1 -1
- package/dist/lib/daemon/ops/memory.d.ts +0 -2
- package/dist/lib/daemon/ops/memory.js +2 -2
- package/dist/lib/daemon/run.d.ts +1 -1
- package/dist/lib/daemon/run.js +11 -2
- package/dist/lib/daemon/supervisor.d.ts +0 -1
- package/dist/lib/daemon/supervisor.js +1 -1
- package/dist/lib/daemon/sync-runner-bundle.d.ts +2 -1
- package/dist/lib/daemon/sync-runner-bundle.js +1 -1
- package/dist/lib/daemon/sync-runner.d.ts +2 -1
- package/dist/lib/doctor/checks/anywhere.d.ts +3 -4
- package/dist/lib/doctor/checks/anywhere.js +2 -2
- package/dist/lib/doctor/checks/runtime-probe.d.ts +2 -16
- package/dist/lib/doctor/checks/runtime-probe.js +2 -2
- package/dist/lib/doctor/fix/json-output.d.ts +0 -1
- package/dist/lib/doctor/fix/json-output.js +1 -1
- package/dist/lib/doctor/platform.d.ts +5 -4
- package/dist/lib/install/claude-targets.d.ts +0 -4
- package/dist/lib/install/claude-targets.js +3 -3
- package/dist/lib/install/codex-targets.d.ts +0 -9
- package/dist/lib/install/codex-targets.js +4 -4
- package/dist/lib/lanes/blocker-freshness.d.ts +0 -2
- package/dist/lib/lanes/blocker-freshness.js +2 -2
- package/dist/lib/lanes/config.d.ts +1 -5
- package/dist/lib/lanes/config.js +4 -4
- package/dist/lib/lanes/keep-alive.d.ts +0 -4
- package/dist/lib/lanes/keep-alive.js +3 -3
- package/dist/lib/lanes/kr-freshness.d.ts +2 -4
- package/dist/lib/lanes/kr-freshness.js +4 -4
- package/dist/lib/lanes/outpost-pruner-install.d.ts +0 -3
- package/dist/lib/lanes/outpost-pruner-install.js +3 -3
- package/dist/lib/lanes/reviews.d.ts +3 -4
- package/dist/lib/lanes/reviews.js +3 -3
- package/dist/lib/lanes/store.js +1 -1
- package/dist/lib/lanes/types.d.ts +1 -1
- package/dist/lib/mesh/live/report-summary.d.ts +0 -10
- package/dist/lib/mesh/live/report-summary.js +5 -5
- package/dist/lib/work-context/bind-best.d.ts +0 -19
- package/dist/lib/work-context/bind-best.js +3 -3
- package/dist/lib/work-context/organize.d.ts +3 -11
- package/dist/lib/work-context/organize.js +3 -3
- package/dist/utils/pack-contributions.d.ts +1 -3
- package/dist/utils/pack-contributions.js +0 -5
- package/dist/utils/package-use-lease.d.ts +0 -7
- package/dist/utils/package-use-lease.js +1 -1
- package/dist/utils/resolve-executable.d.ts +0 -1
- package/dist/utils/resolve-executable.js +1 -1
- package/dist/utils/version-gate.d.ts +2 -2
- package/dist/utils/version-gate.js +2 -2
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ function tokens(value) {
|
|
|
16
16
|
.split(/[^a-z0-9]+/)
|
|
17
17
|
.filter((part) => part.length > 2);
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
function scoreProject(hint, row, repoPath, nowMs) {
|
|
20
20
|
const hintL = hint.toLowerCase();
|
|
21
21
|
const idL = row.projectId.toLowerCase();
|
|
22
22
|
let score = 0;
|
|
@@ -162,7 +162,7 @@ function listProjectDirs(parent, map) {
|
|
|
162
162
|
absorbDir(map, dir, name);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
function discoverProjects(input) {
|
|
166
166
|
const map = new Map();
|
|
167
167
|
const hqRoot = input.hqRoot?.trim();
|
|
168
168
|
const slug = input.companySlug?.trim();
|
|
@@ -223,7 +223,7 @@ function catalogStamp(input) {
|
|
|
223
223
|
}).join("|");
|
|
224
224
|
}
|
|
225
225
|
/** discoverProjects memoized by source directory and mtime. A hit does not rescan. */
|
|
226
|
-
|
|
226
|
+
function discoverProjectsCached(input, nowMs = Date.now()) {
|
|
227
227
|
const key = `${input.hqRoot ?? ""}|${input.companySlug ?? ""}|${input.companyUid ?? ""}|${input.home ?? ""}|${catalogStamp(input)}`;
|
|
228
228
|
if (catalogCache && catalogCache.key === key && nowMs - catalogCache.at < CATALOG_CACHE_TTL_MS) {
|
|
229
229
|
return catalogCache.rows;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* never invents a project or adhoc target and never repeats the ask.
|
|
8
8
|
*/
|
|
9
9
|
import { type SessionDecision, type SessionStateFile } from "./state.js";
|
|
10
|
-
|
|
10
|
+
interface OrganizeCandidate {
|
|
11
11
|
candidateId: string;
|
|
12
12
|
projectId: string;
|
|
13
13
|
taskId?: string;
|
|
@@ -22,7 +22,7 @@ export interface CandidatesResponse {
|
|
|
22
22
|
decisionExpiresAt: string;
|
|
23
23
|
candidates: OrganizeCandidate[];
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
type OrganizeDecisionKind = "bind_existing" | "create_project" | "create_task";
|
|
26
26
|
export interface OrganizeSubmitDecision {
|
|
27
27
|
kind: OrganizeDecisionKind;
|
|
28
28
|
projectId?: string;
|
|
@@ -74,15 +74,6 @@ export type PostOrganizeFn = (input: {
|
|
|
74
74
|
expectedVersion: number;
|
|
75
75
|
decisionExpiresAt?: string;
|
|
76
76
|
}) => Promise<OrganizeReceipt>;
|
|
77
|
-
/** Stable decision id for a session + expiry window. */
|
|
78
|
-
export declare function stableDecisionId(sessionId: string, decisionExpiresAt: string): string;
|
|
79
|
-
export declare function digestOrganizePayload(parts: {
|
|
80
|
-
sessionId: string;
|
|
81
|
-
companyUid: string;
|
|
82
|
-
decision: OrganizeSubmitDecision;
|
|
83
|
-
expectedVersion: number;
|
|
84
|
-
}): string;
|
|
85
|
-
export declare function stableOrganizeOperationId(sessionId: string, decision: OrganizeSubmitDecision): string;
|
|
86
77
|
/**
|
|
87
78
|
* Build a pending decision from server candidates. Soft evidence ranks on the
|
|
88
79
|
* server; the CLI never auto-binds from this list.
|
|
@@ -127,4 +118,5 @@ export declare function submitOrganizeDecision(input: {
|
|
|
127
118
|
now?: () => Date;
|
|
128
119
|
postOrganize?: PostOrganizeFn;
|
|
129
120
|
}): Promise<OrganizeSubmitResult>;
|
|
121
|
+
export {};
|
|
130
122
|
//# sourceMappingURL=organize.d.ts.map
|
|
@@ -12,7 +12,7 @@ import { NotTrackingError } from "./errors.js";
|
|
|
12
12
|
import { shouldAskAfter } from "./project.js";
|
|
13
13
|
import { mergeLocalSessionFields, readSessionState, writeSessionState, } from "./state.js";
|
|
14
14
|
/** Stable decision id for a session + expiry window. */
|
|
15
|
-
|
|
15
|
+
function stableDecisionId(sessionId, decisionExpiresAt) {
|
|
16
16
|
const h = crypto
|
|
17
17
|
.createHash("sha256")
|
|
18
18
|
.update(`dec:v1:${sessionId}:${decisionExpiresAt}`)
|
|
@@ -20,7 +20,7 @@ export function stableDecisionId(sessionId, decisionExpiresAt) {
|
|
|
20
20
|
.slice(0, 24);
|
|
21
21
|
return `dec_${h}`;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
function digestOrganizePayload(parts) {
|
|
24
24
|
const canonical = JSON.stringify({
|
|
25
25
|
v: 1,
|
|
26
26
|
sessionId: parts.sessionId,
|
|
@@ -30,7 +30,7 @@ export function digestOrganizePayload(parts) {
|
|
|
30
30
|
});
|
|
31
31
|
return crypto.createHash("sha256").update(canonical).digest("hex").slice(0, 64);
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
function stableOrganizeOperationId(sessionId, decision) {
|
|
34
34
|
const h = crypto
|
|
35
35
|
.createHash("sha256")
|
|
36
36
|
.update(`organize:v1:${sessionId}:${decision.kind}:${decision.projectId ?? ""}:${decision.taskId ?? ""}:${decision.title ?? ""}`)
|
|
@@ -37,11 +37,9 @@
|
|
|
37
37
|
* `merge` rows -- they never produce a symlink.
|
|
38
38
|
*/
|
|
39
39
|
import type { PackManifest, PackContributeKey } from '../types.js';
|
|
40
|
-
import {
|
|
40
|
+
import { type WireMode } from './contribution-table.js';
|
|
41
41
|
import { type UnregisterServerResult, type SafeWriteEnv, type AcquireLockOptions } from '../commands/mcp-registration.js';
|
|
42
42
|
export { readHqVersion, readRecommendedPackages } from './hq-core-yaml.js';
|
|
43
|
-
export type { CatalogEntry } from './hq-core-yaml.js';
|
|
44
|
-
export { CONTRIBUTION_TABLE };
|
|
45
43
|
export type { WireMode };
|
|
46
44
|
/**
|
|
47
45
|
* Where a contributes key is ROUTED (US-005). Reads the single-source table's
|
|
@@ -42,11 +42,6 @@ import * as yaml from 'js-yaml';
|
|
|
42
42
|
import { CONTRIBUTION_TABLE, payloadFor } from './contribution-table.js';
|
|
43
43
|
import { unregisterMcpServers, } from '../commands/mcp-registration.js';
|
|
44
44
|
export { readHqVersion, readRecommendedPackages } from './hq-core-yaml.js';
|
|
45
|
-
// NOTE on dependency direction: this module imports from ../commands/mcp-registration.js
|
|
46
|
-
// to un-register `wire:merge` (mcp) servers on uninstall. mcp-registration.ts imports
|
|
47
|
-
// ONLY fs/os/path/smol-toml (it does NOT import from pack-contributions.ts), so there
|
|
48
|
-
// is NO import cycle. If that ever changes, invert via a callback injected by packs.ts.
|
|
49
|
-
export { CONTRIBUTION_TABLE };
|
|
50
45
|
/**
|
|
51
46
|
* Where a contributes key is ROUTED (US-005). Reads the single-source table's
|
|
52
47
|
* `wire` field — `'symlink'` keys go through `linkFor`/`contributionLinks` (a
|
|
@@ -8,12 +8,6 @@ export interface PackageUseLease {
|
|
|
8
8
|
readonly leasePath: string;
|
|
9
9
|
release(): void;
|
|
10
10
|
}
|
|
11
|
-
export interface PackageUseLeaseRecord {
|
|
12
|
-
pid: number;
|
|
13
|
-
start_time_ms: number;
|
|
14
|
-
hq_version: string;
|
|
15
|
-
purpose?: PackageUseLeasePurpose;
|
|
16
|
-
}
|
|
17
11
|
/** Map only fixed command words to a bounded lease purpose; never persist argv values. */
|
|
18
12
|
export declare function packageUseLeasePurposeForArgv(argv: readonly string[]): PackageUseLeasePurpose;
|
|
19
13
|
export interface PackageUseLeaseHandoff {
|
|
@@ -23,7 +17,6 @@ export interface PackageUseLeaseHandoff {
|
|
|
23
17
|
}
|
|
24
18
|
export declare function npmPrefix(root: string, platform?: NodeJS.Platform): string | null;
|
|
25
19
|
export declare function packageUseLeaseDirectory(prefix: string, stateDirectory?: string): string;
|
|
26
|
-
export declare function packageUseUpdateRequestPath(prefix: string, stateDirectory?: string): string;
|
|
27
20
|
declare function waitForUpdateRequest(requestPath: string, timeoutMs: number): void;
|
|
28
21
|
export declare function acquirePackageUseLease(prefix: string, hqVersion: string, stateDirectory?: string, purpose?: PackageUseLeasePurpose): PackageUseLease;
|
|
29
22
|
/**
|
|
@@ -133,7 +133,7 @@ export function packageUseLeaseDirectory(prefix, stateDirectory = packageUseStat
|
|
|
133
133
|
const digest = createHash("sha256").update(normalizedPrefix(prefix), "utf8").digest("hex");
|
|
134
134
|
return path.join(stateDirectory, digest);
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
function packageUseUpdateRequestPath(prefix, stateDirectory) {
|
|
137
137
|
return path.join(packageUseLeaseDirectory(prefix, stateDirectory), UPDATE_REQUEST);
|
|
138
138
|
}
|
|
139
139
|
function waitForUpdateRequest(requestPath, timeoutMs) {
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export declare function executableCandidates(command: string, pathValue?: string, platform?: NodeJS.Platform, pathExt?: string): string[];
|
|
2
1
|
export declare function isExecutableOnPath(command: string, pathValue?: string, platform?: NodeJS.Platform, pathExt?: string): boolean;
|
|
3
2
|
//# sourceMappingURL=resolve-executable.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
-
|
|
3
|
+
function executableCandidates(command, pathValue = process.env.PATH ?? '', platform = process.platform, pathExt = process.env.PATHEXT ?? '.EXE;.CMD;.BAT;.COM') {
|
|
4
4
|
const extensions = platform === 'win32'
|
|
5
5
|
? (pathExt || '.EXE;.CMD;.BAT;.COM').split(';').filter(Boolean)
|
|
6
6
|
: [''];
|
|
@@ -385,7 +385,7 @@ declare function nudgeUpdateRecommended(decision: VersionCheckResponse, install?
|
|
|
385
385
|
* (Windows) rather than trusting our own install path — the whole point is to
|
|
386
386
|
* see what the USER's next invocation resolves.
|
|
387
387
|
*/
|
|
388
|
-
|
|
388
|
+
declare function resolveHqOnPath(): string | null;
|
|
389
389
|
/**
|
|
390
390
|
* Pull the CLI version out of `hq --version` / `hq version` output.
|
|
391
391
|
*
|
|
@@ -400,7 +400,7 @@ export declare function resolveHqOnPath(): string | null;
|
|
|
400
400
|
*/
|
|
401
401
|
export declare function parseReportedCliVersion(stdout: string): string | null;
|
|
402
402
|
/** `<bin> --version` output (trimmed), or null on any failure/timeout. */
|
|
403
|
-
|
|
403
|
+
declare function probeCliVersion(bin: string): string | null;
|
|
404
404
|
/**
|
|
405
405
|
* Read-your-writes convergence check, run after an install reports success.
|
|
406
406
|
*
|
|
@@ -1129,7 +1129,7 @@ const CONVERGENCE_TIMEOUT_MS = 3_000;
|
|
|
1129
1129
|
* (Windows) rather than trusting our own install path — the whole point is to
|
|
1130
1130
|
* see what the USER's next invocation resolves.
|
|
1131
1131
|
*/
|
|
1132
|
-
|
|
1132
|
+
function resolveHqOnPath() {
|
|
1133
1133
|
try {
|
|
1134
1134
|
const probe = process.platform === "win32"
|
|
1135
1135
|
? spawnSync("where", ["hq"], {
|
|
@@ -1191,7 +1191,7 @@ export function parseReportedCliVersion(stdout) {
|
|
|
1191
1191
|
return null;
|
|
1192
1192
|
}
|
|
1193
1193
|
/** `<bin> --version` output (trimmed), or null on any failure/timeout. */
|
|
1194
|
-
|
|
1194
|
+
function probeCliVersion(bin) {
|
|
1195
1195
|
try {
|
|
1196
1196
|
const result = spawnSync(bin, ["--version"], {
|
|
1197
1197
|
encoding: "utf-8",
|