@indigoai-us/hq-cli 5.345.1 → 5.345.3
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 +10 -0
- package/dist/commands/daemon.js +6 -2
- package/dist/commands/lanes-message.js +0 -3
- package/dist/commands/lanes-resume.js +0 -3
- package/dist/commands/lanes.js +1 -4
- package/dist/commands/mcp-serve.js +15 -5
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +135416 -0
- package/dist/hq-cloud-sync-runner/package.json +1 -0
- package/dist/index.js +2 -1
- package/dist/lib/daemon/hq-child-bootstrap-stage.d.ts +22 -0
- package/dist/lib/daemon/hq-child-bootstrap-stage.js +127 -0
- package/dist/lib/daemon/hq-child-bootstrap.d.mts +3 -0
- package/dist/lib/daemon/hq-child-bootstrap.mjs +208 -0
- package/dist/lib/daemon/hq-cloud.d.ts +5 -0
- package/dist/lib/daemon/hq-cloud.js +14 -0
- package/dist/lib/daemon/run.d.ts +28 -2
- package/dist/lib/daemon/run.js +139 -10
- package/dist/lib/daemon/sync-runner-bundle.d.ts +40 -0
- package/dist/lib/daemon/sync-runner-bundle.js +199 -0
- package/dist/lib/lanes/disk-guard.d.ts +3 -4
- package/dist/lib/lanes/disk-guard.js +7 -6
- package/dist/lib/lanes/reconcile.js +22 -28
- package/dist/lib/lanes/spawn.d.ts +0 -2
- package/dist/lib/lanes/spawn.js +21 -29
- package/dist/lib/lanes/watcher.js +6 -0
- package/dist/utils/package-use-lease.d.ts +6 -0
- package/dist/utils/package-use-lease.js +25 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.345.3] — 2026-10-05
|
|
6
|
+
- Retry a blocker freshness lane-inbox fallback after a transient append failure.
|
|
7
|
+
- Scope bundled-script stdin checks to changes in their workflow, build inputs, CLI sources, tests, or shell assets.
|
|
8
|
+
- Always apply the lane low-disk preflight before starting or resuming workers.
|
|
9
|
+
|
|
10
|
+
## [5.345.2] — 2026-10-05
|
|
11
|
+
- Build and version-check the hq-cloud sync-runner bundle, then validate and atomically stage it with the daemon child bootstrap before releasing the CLI package-use lease.
|
|
12
|
+
- Defer MCP tool and prompt handler imports until a request needs them so `hq mcp serve` can answer initialize without waiting on the full handler modules.
|
|
13
|
+
- Add regression coverage that a cancelled superseded lane still refuses `hq lanes message` when running-superseded message delivery is enabled.
|
|
14
|
+
|
|
5
15
|
## [5.345.1] — 2026-10-05
|
|
6
16
|
- Queue low-disk lanes before provider account login validation so the disk safety guard can run on hosts with low free space.
|
|
7
17
|
- Defer mesh daemon and session-validation modules until their command paths need them.
|
package/dist/commands/daemon.js
CHANGED
|
@@ -46,12 +46,16 @@ export async function loadDaemonRunner(release = releaseCurrentPackageUseLease,
|
|
|
46
46
|
await releasePackageUseLeaseAfterResidentPreload(preload, reportPreloadFailure, () => {
|
|
47
47
|
preloadComplete = true;
|
|
48
48
|
});
|
|
49
|
+
let released = false;
|
|
49
50
|
return (options) => runDaemon({
|
|
50
51
|
...options,
|
|
51
52
|
onStartupReadsComplete: () => {
|
|
52
53
|
options.onStartupReadsComplete?.();
|
|
53
|
-
if (preloadComplete)
|
|
54
|
-
|
|
54
|
+
if (!preloadComplete || released)
|
|
55
|
+
return released;
|
|
56
|
+
released = true;
|
|
57
|
+
release();
|
|
58
|
+
return true;
|
|
55
59
|
},
|
|
56
60
|
});
|
|
57
61
|
}
|
|
@@ -13,7 +13,6 @@ import { artifactIdentityKeys, rollbackStorySwitchAttribution, storySwitchNotice
|
|
|
13
13
|
import { laneRunDir, probePidRecord, readPidRecord, readProcStarttime, spawnLaneWorker } from "../lib/lanes/spawn.js";
|
|
14
14
|
import { keepAliveExclusion, keepAliveSupersededBy, LANE_RUNNING_SUPERSEDED_MESSAGE_DELIVERY_FLAG, LANE_SUPERSESSION_LINEAGE_AWARE_FLAG, loadRetiredLaneIds } from "../lib/lanes/keep-alive.js";
|
|
15
15
|
import { readLanesRegistryFlag } from "../lib/lanes/registry-flag.js";
|
|
16
|
-
import { lowDiskGuardEnabledForLane } from "../lib/lanes/disk-guard.js";
|
|
17
16
|
import { resolveLaneCompany } from "../lib/lanes/lane-company.js";
|
|
18
17
|
import { accountMoveSummary, accountRequestKeepsCurrentLane, assertCurrentResumeAccountAvailable, callerMatchesSessionSenior, recordedResumeEffort, resetKeepAliveProgress, resolveResumeEffort } from "./lanes-shared.js";
|
|
19
18
|
export function parseMonitorLaneMessagePayload(input) {
|
|
@@ -782,7 +781,6 @@ export function createLaneMessageHandlers(deps) {
|
|
|
782
781
|
const admission = await assessLaneAdmission(ctx, lane, { queueAt: at });
|
|
783
782
|
if (admission.action === "refuse" && admission.error)
|
|
784
783
|
throw admission.error;
|
|
785
|
-
const guardEnabled = admission.action === "queue" ? false : await lowDiskGuardEnabledForLane(hqRoot, lane);
|
|
786
784
|
return withResumeHireAdmission(ctx, lane, () => {
|
|
787
785
|
if (admission.action === "queue") {
|
|
788
786
|
const sessionId = lane.provider_session_id;
|
|
@@ -826,7 +824,6 @@ export function createLaneMessageHandlers(deps) {
|
|
|
826
824
|
return queued;
|
|
827
825
|
}
|
|
828
826
|
const started = spawnLaneWorker(hqRoot, lane, {
|
|
829
|
-
lowDiskGuardEnabled: guardEnabled,
|
|
830
827
|
env: ctx.env,
|
|
831
828
|
modelDeps: {
|
|
832
829
|
readFileSync: ctx.readFileSync,
|
|
@@ -7,7 +7,6 @@ import { assertNoSecretText } from "../lib/lanes/text-scan.js";
|
|
|
7
7
|
import { laneStories, laneStory, storyWarning } from "../lib/lanes/stories.js";
|
|
8
8
|
import { artifactIdentityKeys, rollbackStorySwitchAttribution, storySwitchNotice } from "../lib/lanes/story-switch.js";
|
|
9
9
|
import { spawnLaneWorker } from "../lib/lanes/spawn.js";
|
|
10
|
-
import { lowDiskGuardEnabledForLane } from "../lib/lanes/disk-guard.js";
|
|
11
10
|
import { accountMoveSummary, accountRequestKeepsCurrentLane, assertCurrentResumeAccountAvailable, hasKeepAliveProgress, recordedResumeEffort, resetKeepAliveProgress, resolveResumeEffort } from "./lanes-shared.js";
|
|
12
11
|
export function createLaneResumeHandlers(deps) {
|
|
13
12
|
const { archiveResumeMessage, assertLaneRunsHereForAdmission, assertLaneRunsHereForOperatorMutation, assessLaneAdmission, automaticBalanceMoveHistoryReason, authorizeFailedResume, authorizeResumeProfileRepin, casUpdateLane, dispatchOutpostLaneCommand, laneIsHostedHere, laneWithRecoveredProviderSession, mintMessageId, persistClaudeAccountSelection, prepareAccountMove, printJson, recordResumeSetup, resolveResumeProfile, selectAutomaticClaudeResumeAccount, validateResumeProfileModel, withResumeHireAdmission } = deps;
|
|
@@ -448,7 +447,6 @@ export function createLaneResumeHandlers(deps) {
|
|
|
448
447
|
const admission = await assessLaneAdmission(ctx, lane, { queueAt: at });
|
|
449
448
|
if (admission.action === "refuse" && admission.error)
|
|
450
449
|
throw admission.error;
|
|
451
|
-
const guardEnabled = admission.action === "queue" ? false : await lowDiskGuardEnabledForLane(hqRoot, lane);
|
|
452
450
|
return withResumeHireAdmission(ctx, lane, () => {
|
|
453
451
|
if (admission.action === "queue") {
|
|
454
452
|
const sessionId = lane.provider_session_id;
|
|
@@ -492,7 +490,6 @@ export function createLaneResumeHandlers(deps) {
|
|
|
492
490
|
});
|
|
493
491
|
}
|
|
494
492
|
const started = spawnLaneWorker(hqRoot, lane, {
|
|
495
|
-
lowDiskGuardEnabled: guardEnabled,
|
|
496
493
|
env: ctx.env,
|
|
497
494
|
modelDeps: {
|
|
498
495
|
readFileSync: ctx.readFileSync,
|
package/dist/commands/lanes.js
CHANGED
|
@@ -37,7 +37,7 @@ import { isSsmRunCommandProcess } from "../lib/lanes/ssm-command-context.js";
|
|
|
37
37
|
import { runResidentCommandWithPackageLease } from "../utils/resident-package-preload.js";
|
|
38
38
|
import { readLanesFlagLocalOverride, readLanesRegistryFlag, readLanesRegistryFlagFailOff } from "../lib/lanes/registry-flag.js";
|
|
39
39
|
import { LANE_HIRE_GRANT_FINISHED_LANES_FLAG, LANE_LIST_SKIP_REMOTE_REFRESH_FLAG, LANE_MESSAGE_ROUTE_OWNER_HOST_FLAG, LANE_ORPHANED_BARE_ID_DROPBOX_REPAIR_FLAG, LANE_REUSE_REFRESHES_PROFILE_FLAG, } from "../lib/lanes/flag-keys.js";
|
|
40
|
-
import { configuredCodexRolloutHomes,
|
|
40
|
+
import { configuredCodexRolloutHomes, retainCodexRollouts } from "../lib/lanes/disk-guard.js";
|
|
41
41
|
import { isControllerAliasOutpostId } from "../lib/lanes/admission-host.js";
|
|
42
42
|
import { runLeadAutopilotPass } from "../lib/lanes/autopilot.js";
|
|
43
43
|
import { syncOutpostLeadRegistries } from "../lib/lanes/autopilot-registry.js";
|
|
@@ -3735,7 +3735,6 @@ async function runCreate(ctx, opts) {
|
|
|
3735
3735
|
let started = lane;
|
|
3736
3736
|
if (admission.action === "start") {
|
|
3737
3737
|
started = spawnLaneWorker(hqRoot, lane, {
|
|
3738
|
-
lowDiskGuardEnabled: await lowDiskGuardEnabledForLane(hqRoot, lane),
|
|
3739
3738
|
env: ctx.env,
|
|
3740
3739
|
modelDeps: {
|
|
3741
3740
|
readFileSync: ctx.readFileSync,
|
|
@@ -4877,7 +4876,6 @@ async function runPickup(ctx, opts) {
|
|
|
4877
4876
|
}
|
|
4878
4877
|
try {
|
|
4879
4878
|
return spawnLaneWorker(hqRoot, current, {
|
|
4880
|
-
lowDiskGuardEnabled: await lowDiskGuardEnabledForLane(hqRoot, current),
|
|
4881
4879
|
env: ctx.env,
|
|
4882
4880
|
modelDeps: {
|
|
4883
4881
|
readFileSync: ctx.readFileSync,
|
|
@@ -6252,7 +6250,6 @@ async function runAdmit(ctx, laneId, opts) {
|
|
|
6252
6250
|
return;
|
|
6253
6251
|
}
|
|
6254
6252
|
const started = spawnLaneWorker(hqRoot, lane, {
|
|
6255
|
-
lowDiskGuardEnabled: await lowDiskGuardEnabledForLane(hqRoot, lane),
|
|
6256
6253
|
env: ctx.env,
|
|
6257
6254
|
modelDeps: {
|
|
6258
6255
|
readFileSync: ctx.readFileSync,
|
|
@@ -59,7 +59,11 @@ export async function runMcpServe(opts = {}) {
|
|
|
59
59
|
process.exitCode = 1;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
let packageHandlers;
|
|
63
|
+
const getPackageHandlers = () => {
|
|
64
|
+
packageHandlers ??= loadMcpPackageHandlers();
|
|
65
|
+
return packageHandlers;
|
|
66
|
+
};
|
|
63
67
|
const preload = (residentPath, modules) => opts.preloadResidentModules
|
|
64
68
|
? opts.preloadResidentModules(residentPath, modules)
|
|
65
69
|
: preloadResidentPackageModules(residentPath);
|
|
@@ -73,8 +77,8 @@ export async function runMcpServe(opts = {}) {
|
|
|
73
77
|
process.emitWarning("hq-cli resident package preload completion failed (class=Error, module=unknown)");
|
|
74
78
|
});
|
|
75
79
|
};
|
|
76
|
-
// Release before the stdio read can remain open indefinitely.
|
|
77
|
-
// handlers
|
|
80
|
+
// Release before the stdio read can remain open indefinitely. Request
|
|
81
|
+
// handlers stay lazy until a request needs them.
|
|
78
82
|
startResidentPreload();
|
|
79
83
|
const send = (msg) => {
|
|
80
84
|
const response = `${JSON.stringify({ jsonrpc: "2.0", ...msg })}\n`;
|
|
@@ -83,6 +87,7 @@ export async function runMcpServe(opts = {}) {
|
|
|
83
87
|
const reply = (id, result) => send({ id, result });
|
|
84
88
|
const replyError = (id, code, message) => send({ id, error: { code, message } });
|
|
85
89
|
const callTool = async (params) => {
|
|
90
|
+
const { tools } = await getPackageHandlers();
|
|
86
91
|
const name = params.name;
|
|
87
92
|
if (typeof name !== "string" || !tools.MCP_TOOLS.some((t) => t.name === name)) {
|
|
88
93
|
return toolError("unknown_tool", `unknown tool ${String(name)}`);
|
|
@@ -119,17 +124,22 @@ export async function runMcpServe(opts = {}) {
|
|
|
119
124
|
case "ping":
|
|
120
125
|
reply(id, {});
|
|
121
126
|
return;
|
|
122
|
-
case "tools/list":
|
|
127
|
+
case "tools/list": {
|
|
128
|
+
const { tools } = await getPackageHandlers();
|
|
123
129
|
reply(id, { tools: tools.MCP_TOOLS });
|
|
124
130
|
return;
|
|
131
|
+
}
|
|
125
132
|
case "tools/call":
|
|
126
133
|
reply(id, await callTool(params));
|
|
127
134
|
return;
|
|
128
|
-
case "prompts/list":
|
|
135
|
+
case "prompts/list": {
|
|
136
|
+
const { prompts } = await getPackageHandlers();
|
|
129
137
|
reply(id, { prompts: prompts.MCP_PROMPTS });
|
|
130
138
|
return;
|
|
139
|
+
}
|
|
131
140
|
case "prompts/get": {
|
|
132
141
|
const args = params.arguments && typeof params.arguments === "object" ? params.arguments : {};
|
|
142
|
+
const { prompts } = await getPackageHandlers();
|
|
133
143
|
try {
|
|
134
144
|
reply(id, prompts.getPrompt(String(params.name), args, readHqRoot(env, home)));
|
|
135
145
|
}
|