@indigoai-us/hq-cli 5.323.0 → 5.324.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 +8 -1
- package/dist/bin/hq-auth-refresh.d.ts +5 -1
- package/dist/bin/hq-auth-refresh.js +33 -1
- package/dist/command-catalog.generated.d.ts +125 -6
- package/dist/command-catalog.generated.js +162 -6
- package/dist/command-registration-plan.d.ts +24 -0
- package/dist/command-registration-plan.js +4 -0
- package/dist/commands/anywhere-runtime-flag.d.ts +9 -0
- package/dist/commands/anywhere-runtime-flag.js +22 -0
- package/dist/commands/daemon.js +39 -2
- package/dist/commands/db-provision.js +6 -1
- package/dist/commands/doctor.js +8 -4
- package/dist/commands/feedback.d.ts +2 -0
- package/dist/commands/feedback.js +10 -0
- package/dist/commands/install-global.d.ts +46 -0
- package/dist/commands/install-global.js +674 -0
- package/dist/commands/link.d.ts +30 -0
- package/dist/commands/link.js +184 -0
- package/dist/commands/mcp-status.d.ts +6 -0
- package/dist/commands/mcp-status.js +21 -4
- package/dist/commands/pkg-install.js +20 -1
- package/dist/commands/update.d.ts +19 -0
- package/dist/commands/update.js +52 -6
- package/dist/fast-core.d.ts +2 -1
- package/dist/fast-core.js +12 -8
- package/dist/index.js +9 -7
- package/dist/lib/core-utils/timeout-guard-native-flags.d.ts +6 -0
- package/dist/lib/core-utils/timeout-guard-native-flags.js +30 -0
- package/dist/lib/core-utils/timeout-guard-native.d.ts +0 -3
- package/dist/lib/core-utils/timeout-guard-native.js +4 -30
- package/dist/lib/core-utils/timeout-guard.d.ts +2 -0
- package/dist/lib/core-utils/timeout-guard.js +2 -1
- package/dist/lib/daemon/convergence.d.ts +42 -0
- package/dist/lib/daemon/convergence.js +66 -0
- package/dist/lib/daemon/heartbeat.d.ts +43 -0
- package/dist/lib/daemon/heartbeat.js +70 -0
- package/dist/lib/daemon/ops/journal.d.ts +29 -0
- package/dist/lib/daemon/ops/journal.js +141 -0
- package/dist/lib/daemon/ops/memory.d.ts +20 -0
- package/dist/lib/daemon/ops/memory.js +65 -0
- package/dist/lib/daemon/ops/mesh.d.ts +38 -0
- package/dist/lib/daemon/ops/mesh.js +70 -0
- package/dist/lib/daemon/ops/policy.d.ts +78 -0
- package/dist/lib/daemon/ops/policy.js +283 -0
- package/dist/lib/daemon/protocol.d.ts +68 -0
- package/dist/lib/daemon/protocol.js +154 -0
- package/dist/lib/daemon/run.d.ts +10 -0
- package/dist/lib/daemon/run.js +85 -3
- package/dist/lib/daemon/server.d.ts +36 -0
- package/dist/lib/daemon/server.js +306 -0
- package/dist/lib/daemon/session-registry.d.ts +30 -0
- package/dist/lib/daemon/session-registry.js +42 -0
- package/dist/lib/doctor/checks/anywhere.d.ts +38 -0
- package/dist/lib/doctor/checks/anywhere.js +182 -0
- package/dist/lib/doctor/registry.js +6 -0
- package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
- package/dist/lib/flag-registry-worker-source.generated.js +1 -1
- package/dist/lib/install/claude-targets.d.ts +47 -0
- package/dist/lib/install/claude-targets.js +203 -0
- package/dist/lib/install/codex-targets.d.ts +57 -0
- package/dist/lib/install/codex-targets.js +187 -0
- package/dist/lib/mesh/live/session-seq.js +62 -9
- package/dist/lib/registry/normalize-remote.d.ts +21 -0
- package/dist/lib/registry/normalize-remote.js +68 -0
- package/dist/lib/registry/registry.d.ts +75 -0
- package/dist/lib/registry/registry.js +261 -0
- package/dist/utils/cognito-session.d.ts +5 -1
- package/dist/utils/cognito-session.js +8 -12
- package/dist/utils/feedback-diagnostics.d.ts +2 -0
- package/dist/utils/version-check.d.ts +2 -0
- package/dist/utils/version-check.js +7 -0
- package/package.json +2 -2
package/dist/commands/doctor.js
CHANGED
|
@@ -37,6 +37,7 @@ import { isCompanyJournalSlug } from "../lib/doctor/checks/sync-health.js";
|
|
|
37
37
|
import { readCompaniesManifestMap } from "../lib/work-context/repo-remote.js";
|
|
38
38
|
import * as readline from "node:readline";
|
|
39
39
|
import { runSideEffectTests } from "../lib/doctor/deep/sandbox.js";
|
|
40
|
+
import { anywhereRuntimeEnabled } from "./anywhere-runtime-flag.js";
|
|
40
41
|
/**
|
|
41
42
|
* Marker directories that identify an HQ tree root. A directory is an HQ root
|
|
42
43
|
* only when it contains ALL of these. `.claude` + `core` are present in both
|
|
@@ -90,7 +91,8 @@ export async function runDoctor(options = {}) {
|
|
|
90
91
|
const write = options.stdout ?? ((chunk) => void process.stdout.write(chunk));
|
|
91
92
|
const writeErr = options.stderr ?? ((chunk) => void process.stderr.write(chunk));
|
|
92
93
|
const hqRoot = options.root ?? resolveHqRoot(options.cwd);
|
|
93
|
-
|
|
94
|
+
const standaloneAnywhere = !hqRoot && options.only?.length === 1 && options.only[0] === "anywhere" && anywhereRuntimeEnabled();
|
|
95
|
+
if (!hqRoot && !standaloneAnywhere) {
|
|
94
96
|
const from = options.cwd ?? process.cwd();
|
|
95
97
|
writeErr(`hq doctor: not inside an HQ tree.\n` +
|
|
96
98
|
` Searched upward from: ${from}\n` +
|
|
@@ -121,7 +123,9 @@ export async function runDoctor(options = {}) {
|
|
|
121
123
|
// The detected platform and the session id are exposed to every check so the
|
|
122
124
|
// host-specific runtime probe (US-006) can decide UNKNOWN vs FAIL vs UNTESTED.
|
|
123
125
|
const context = {
|
|
124
|
-
|
|
126
|
+
// Anywhere checks inspect ~/.hq and are intentionally runnable from a foreign
|
|
127
|
+
// repo. No other family is selected in this standalone path.
|
|
128
|
+
hqRoot: hqRoot ?? "",
|
|
125
129
|
platform: { id: platform.id, evidence: platform.evidence },
|
|
126
130
|
sessionId: options.sessionId,
|
|
127
131
|
liveRuntimes: options.liveRuntimes === true,
|
|
@@ -166,7 +170,7 @@ export async function runDoctor(options = {}) {
|
|
|
166
170
|
? await resolveClientHealthReasonCodesCheckIds(families, options.resolveClientHealthReasonCodesForCompany)
|
|
167
171
|
: undefined;
|
|
168
172
|
write(renderJson(buildDoctorJson({
|
|
169
|
-
hqRoot,
|
|
173
|
+
hqRoot: hqRoot ?? "",
|
|
170
174
|
families,
|
|
171
175
|
platform,
|
|
172
176
|
scope,
|
|
@@ -175,7 +179,7 @@ export async function runDoctor(options = {}) {
|
|
|
175
179
|
}
|
|
176
180
|
else {
|
|
177
181
|
write(renderText({
|
|
178
|
-
hqRoot,
|
|
182
|
+
hqRoot: hqRoot ?? "",
|
|
179
183
|
families,
|
|
180
184
|
platform,
|
|
181
185
|
verbose: options.verbose ?? false,
|
|
@@ -2,6 +2,8 @@ import { Command } from "commander";
|
|
|
2
2
|
import { type DiagnosticsBlob } from "../utils/feedback-diagnostics.js";
|
|
3
3
|
import { collectFeedbackLogs, feedbackLogsEnabled } from "../utils/feedback-logs.js";
|
|
4
4
|
import { type LogBundleRef } from "../utils/feedback-log-bundle.js";
|
|
5
|
+
export declare const FEEDBACK_LATEST_VERSION_FLAG = "feedback.latest-version";
|
|
6
|
+
export declare const FEEDBACK_LATEST_VERSION_FLAG_FALLBACK = false;
|
|
5
7
|
export declare const BODY_MAX_BYTES: number;
|
|
6
8
|
/** Validate fields that must be valid before feedback attachments are uploaded. */
|
|
7
9
|
export declare function validateFeedbackContent(title: string, body: string): void;
|
|
@@ -6,6 +6,10 @@ import { collectDiagnostics } from "../utils/feedback-diagnostics.js";
|
|
|
6
6
|
import { MAX_SCREENSHOTS, uploadScreenshots } from "../utils/feedback-screenshots.js";
|
|
7
7
|
import { FEEDBACK_LOGS_MAX_TOTAL_BYTES, FEEDBACK_LOGS_MIN_USEFUL_BYTES, collectFeedbackLogs, feedbackLogsEnabled, } from "../utils/feedback-logs.js";
|
|
8
8
|
import { uploadLogBundle } from "../utils/feedback-log-bundle.js";
|
|
9
|
+
import { resolveProcessFlagGate } from "../lib/flag-registry.js";
|
|
10
|
+
import { cachedLatestVersion } from "../utils/version-check.js";
|
|
11
|
+
export const FEEDBACK_LATEST_VERSION_FLAG = "feedback.latest-version";
|
|
12
|
+
export const FEEDBACK_LATEST_VERSION_FLAG_FALLBACK = false;
|
|
9
13
|
export const BODY_MAX_BYTES = 64 * 1024;
|
|
10
14
|
/** Validate fields that must be valid before feedback attachments are uploaded. */
|
|
11
15
|
export function validateFeedbackContent(title, body) {
|
|
@@ -181,6 +185,12 @@ function registerSubcommand(feedbackCmd, type) {
|
|
|
181
185
|
// diagnostics are passed through so submitFeedback does not collect
|
|
182
186
|
// them again after attachments have been uploaded.
|
|
183
187
|
const diagnostics = collectDiagnostics();
|
|
188
|
+
const includeLatestVersion = resolveProcessFlagGate(FEEDBACK_LATEST_VERSION_FLAG, { fallback: FEEDBACK_LATEST_VERSION_FLAG_FALLBACK }, () => FEEDBACK_LATEST_VERSION_FLAG_FALLBACK);
|
|
189
|
+
if (includeLatestVersion) {
|
|
190
|
+
const latestVersion = cachedLatestVersion();
|
|
191
|
+
if (latestVersion)
|
|
192
|
+
diagnostics.latestVersion = latestVersion;
|
|
193
|
+
}
|
|
184
194
|
const logsEnabled = opts.logs !== false && feedbackLogsEnabled();
|
|
185
195
|
// Validate the serialized server request envelope before screenshots
|
|
186
196
|
// or the log bundle can create remote objects. Attachment references
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { AnywhereRuntimeDisabledError } from './anywhere-runtime-flag.js';
|
|
3
|
+
export interface GlobalInstallOptions {
|
|
4
|
+
/** HQ checkout to install from (absolute). */
|
|
5
|
+
hqRoot: string;
|
|
6
|
+
/** Home directory; tests MUST pass a tmpdir. */
|
|
7
|
+
home?: string;
|
|
8
|
+
dryRun?: boolean;
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
/** Absolute node binary for the MCP server command (default process.execPath). */
|
|
11
|
+
nodePath?: string;
|
|
12
|
+
/** Absolute hq CLI entry script (default realpath of process.argv[1]). */
|
|
13
|
+
cliEntry?: string;
|
|
14
|
+
/** Registry file override (default ~/.hq/registry.json under `home`). */
|
|
15
|
+
registryFile?: string;
|
|
16
|
+
log?: (line: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export { AnywhereRuntimeDisabledError as AnywhereDisabledError };
|
|
19
|
+
export declare const isAnywhereEnabled: (_home: string, env?: NodeJS.ProcessEnv) => boolean;
|
|
20
|
+
/** Install HQ into Claude Code user scope. Returns the files touched (or that would be). */
|
|
21
|
+
export declare function installGlobalClaude(opts: GlobalInstallOptions): string[];
|
|
22
|
+
export interface GlobalUninstallOptions {
|
|
23
|
+
home?: string;
|
|
24
|
+
/** Used when no install state exists (falls back to ~/.hq/root). */
|
|
25
|
+
hqRoot?: string;
|
|
26
|
+
dryRun?: boolean;
|
|
27
|
+
env?: NodeJS.ProcessEnv;
|
|
28
|
+
registryFile?: string;
|
|
29
|
+
log?: (line: string) => void;
|
|
30
|
+
}
|
|
31
|
+
/** Reverse every install step; non-HQ entries are left untouched. */
|
|
32
|
+
export declare function uninstallGlobalClaude(opts?: GlobalUninstallOptions): string[];
|
|
33
|
+
/** Install HQ into Codex user scope. Returns the files touched (or that would be). */
|
|
34
|
+
export declare function installGlobalCodex(opts: GlobalInstallOptions): string[];
|
|
35
|
+
/** Reverse every Codex install step; non-HQ entries are left untouched. */
|
|
36
|
+
export declare function uninstallGlobalCodex(opts?: GlobalUninstallOptions): string[];
|
|
37
|
+
export interface GlobalCommandOpts {
|
|
38
|
+
global?: boolean;
|
|
39
|
+
runtime?: string;
|
|
40
|
+
dryRun?: boolean;
|
|
41
|
+
hqRoot?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Entry used by `hq install --global` (wired from pkg-install.ts). */
|
|
44
|
+
export declare function runInstallGlobal(opts: GlobalCommandOpts): void;
|
|
45
|
+
export declare function registerUninstallCommand(program: Command): void;
|
|
46
|
+
//# sourceMappingURL=install-global.d.ts.map
|