@indigoai-us/hq-cli 5.345.241 → 5.345.242
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 +49 -0
- package/assets/scaffold/core/scripts/hq-delegate-grant.sh +170 -8
- package/assets/scaffold/core/scripts/hq-delegate-publish.sh +21 -1
- package/assets/scaffold/core/scripts/lib/delegate-engine.sh +77 -0
- package/dist/command-catalog.generated.d.ts +28 -8
- package/dist/command-catalog.generated.js +33 -8
- package/dist/commands/cloud-off-gate.d.ts +7 -7
- package/dist/commands/cloud-off-gate.js +26 -38
- package/dist/commands/core-delegate-w1b.js +307 -26
- package/dist/commands/core-delegate.js +2 -0
- package/dist/commands/core-handoff.js +1 -1
- package/dist/commands/core-job-model-auth.d.ts +95 -0
- package/dist/commands/core-job-model-auth.js +247 -0
- package/dist/commands/core-job-run-native.js +280 -12
- package/dist/commands/core.js +1 -0
- package/dist/commands/files-browse.js +2 -0
- package/dist/commands/files.js +4 -0
- package/dist/commands/integrations-core.d.ts +11 -0
- package/dist/commands/integrations-core.js +15 -1
- package/dist/commands/lanes-link.js +2 -2
- package/dist/commands/lanes-loop.d.ts +2 -2
- package/dist/commands/lanes-loop.js +5 -5
- package/dist/commands/lanes-questions.js +1 -1
- package/dist/commands/lanes-stories.js +1 -1
- package/dist/commands/lanes.js +80 -14
- package/dist/commands/rescue.d.ts +3 -2
- package/dist/commands/rescue.js +48 -34
- package/dist/commands/search.d.ts +6 -0
- package/dist/commands/search.js +24 -4
- package/dist/commands/sources.js +6 -2
- package/dist/commands/sync-core.d.ts +8 -0
- package/dist/commands/sync-core.js +43 -0
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +1737 -1450
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/capacity/accounts.d.ts +1 -1
- package/dist/lib/capacity/accounts.js +1 -1
- package/dist/lib/capacity/freshness.d.ts +1 -1
- package/dist/lib/capacity/freshness.js +1 -1
- package/dist/lib/capacity/route.js +1 -1
- package/dist/lib/daemon/catalog.d.ts +3 -0
- package/dist/lib/daemon/hook-requests.d.ts +1 -1
- package/dist/lib/daemon/hook-requests.js +4 -2
- package/dist/lib/daemon/run.js +16 -22
- package/dist/lib/environment/work-requirements.d.ts +1 -1
- package/dist/lib/environment/work-requirements.js +1 -1
- 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/hook-engine/coverage.js +11 -3
- package/dist/lib/hook-engine/git-stop-config.json +510 -510
- package/dist/lib/hook-engine/native-precompact-compatibility.json +443 -443
- package/dist/lib/hook-engine/native-stop-compatibility.json +359 -359
- package/dist/lib/hot-channels/adapters/meetings.d.ts +1 -16
- package/dist/lib/hot-channels/adapters/meetings.js +3 -28
- package/dist/lib/hot-channels/adapters/slack.d.ts +3 -1
- package/dist/lib/hot-channels/adapters/slack.js +4 -1
- package/dist/lib/hot-channels/contract.d.ts +14 -0
- package/dist/lib/hot-channels/fleet-complete.d.ts +18 -2
- package/dist/lib/hot-channels/fleet-complete.js +29 -4
- package/dist/lib/hot-channels/meeting-source-ref.d.ts +17 -0
- package/dist/lib/hot-channels/meeting-source-ref.js +32 -0
- package/dist/lib/hot-channels/prompts/signals-pass.md +6 -1
- package/dist/lib/hot-channels/run.d.ts +10 -0
- package/dist/lib/hot-channels/run.js +34 -0
- package/dist/lib/hot-channels/signals-pass.d.ts +27 -0
- package/dist/lib/hot-channels/signals-pass.js +57 -2
- package/dist/lib/hot-channels/signals-runtime.js +3 -2
- package/dist/lib/lanes/accounts.js +2 -2
- package/dist/lib/lanes/claude-balance.d.ts +6 -0
- package/dist/lib/lanes/claude-balance.js +124 -0
- package/dist/lib/lanes/grants.js +15 -2
- package/dist/lib/lanes/hq-root.d.ts +1 -1
- package/dist/lib/lanes/hq-root.js +1 -1
- package/dist/lib/lanes/links.d.ts +1 -1
- package/dist/lib/lanes/liveness.d.ts +3 -0
- package/dist/lib/lanes/liveness.js +61 -7
- package/dist/lib/lanes/models.d.ts +1 -1
- package/dist/lib/lanes/models.js +1 -1
- package/dist/lib/lanes/questions.d.ts +1 -1
- package/dist/lib/lanes/questions.js +2 -2
- package/dist/lib/lanes/spawn.js +4 -6
- package/dist/lib/lanes/store.d.ts +13 -2
- package/dist/lib/lanes/store.js +13 -5
- package/dist/lib/lanes/types.d.ts +7 -7
- package/dist/lib/lanes/types.js +1 -1
- package/dist/lib/lanes/watcher-main.js +1 -1
- package/dist/lib/lanes/watcher.d.ts +1 -1
- package/dist/lib/lanes/watcher.js +1 -1
- package/dist/lib/onboarding/cli/onboard.js +5 -0
- package/dist/lib/signals/sanitize.d.ts +19 -0
- package/dist/lib/signals/sanitize.js +103 -7
- package/dist/lib/signals/steps/upload.d.ts +40 -1
- package/dist/lib/signals/steps/upload.js +122 -6
- package/dist/lib/sync-core/access-refresh.d.ts +29 -0
- package/dist/lib/sync-core/access-refresh.js +97 -0
- package/dist/lib/sync-core/company-adoption.d.ts +33 -0
- package/dist/lib/sync-core/company-adoption.js +223 -0
- package/dist/lib/sync-core/engine-home.d.ts +1 -0
- package/dist/lib/sync-core/engine-owned.d.ts +13 -0
- package/dist/lib/sync-core/engine-owned.js +38 -0
- package/dist/lib/sync-core/hand-back.d.ts +17 -0
- package/dist/lib/sync-core/hand-back.js +23 -0
- package/dist/lib/sync-core/post-apply-reindex.d.ts +33 -0
- package/dist/lib/sync-core/post-apply-reindex.js +149 -0
- package/dist/lib/sync-core/reconcile.d.ts +10 -0
- package/dist/lib/sync-core/reconcile.js +117 -12
- package/dist/lib/sync-core/rollout-state.d.ts +2 -0
- package/dist/lib/sync-core/rollout-state.js +6 -0
- package/dist/lib/vault-sync-switches.d.ts +14 -0
- package/dist/lib/vault-sync-switches.js +22 -0
- package/dist/lib/workers-registry/index.d.ts +1 -1
- package/dist/lib/workers-registry/index.js +1 -1
- package/dist/utils/github-tag-fallback.d.ts +16 -0
- package/dist/utils/github-tag-fallback.js +126 -0
- package/dist/utils/version-report.d.ts +2 -1
- package/dist/utils/version-report.js +40 -27
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"hq-cli-daemon-sync-runner","type":"module","version":"6.18.
|
|
1
|
+
{"name":"hq-cli-daemon-sync-runner","type":"module","version":"6.18.118","bundleSha256":"7f7e31221249ffacdaee78e883c2d2e761d189b251d6cb8b57824e97ee185d2f","formatVersion":1}
|
|
@@ -23,7 +23,7 @@ export interface CapacityAccount {
|
|
|
23
23
|
* `disabled_reason` that marks a registry account as capacity-only. Signing in
|
|
24
24
|
* for usage visibility must not opt an account into lane work, because lanes
|
|
25
25
|
* spread work across every enabled account and the accounts can belong to
|
|
26
|
-
* different companies. `hq
|
|
26
|
+
* different companies. `hq runners accounts enable` opts one in.
|
|
27
27
|
*/
|
|
28
28
|
export declare const CAPACITY_ONLY_REASON = "capacity-only: read for usage, not used by lanes";
|
|
29
29
|
export interface ListCapacityAccountsOptions {
|
|
@@ -17,7 +17,7 @@ import { LANE_PROVIDERS } from "../lanes/types.js";
|
|
|
17
17
|
* `disabled_reason` that marks a registry account as capacity-only. Signing in
|
|
18
18
|
* for usage visibility must not opt an account into lane work, because lanes
|
|
19
19
|
* spread work across every enabled account and the accounts can belong to
|
|
20
|
-
* different companies. `hq
|
|
20
|
+
* different companies. `hq runners accounts enable` opts one in.
|
|
21
21
|
*/
|
|
22
22
|
export const CAPACITY_ONLY_REASON = "capacity-only: read for usage, not used by lanes";
|
|
23
23
|
const DEFAULT_DIR = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Capacity view freshness. Kept in lib (not commands/capacity.ts) so resident
|
|
3
|
-
* paths such as `hq
|
|
3
|
+
* paths such as `hq runners` can check staleness without pulling in the capacity
|
|
4
4
|
* command module and its lazy collector imports.
|
|
5
5
|
*/
|
|
6
6
|
/** now.json older than this is stale: the collector is not keeping the view current. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Capacity view freshness. Kept in lib (not commands/capacity.ts) so resident
|
|
3
|
-
* paths such as `hq
|
|
3
|
+
* paths such as `hq runners` can check staleness without pulling in the capacity
|
|
4
4
|
* command module and its lazy collector imports.
|
|
5
5
|
*/
|
|
6
6
|
/** now.json older than this is stale: the collector is not keeping the view current. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { codexSnapshotStale, hasCodexCreditRoom } from "./codex-availability.js";
|
|
2
2
|
/**
|
|
3
|
-
* Pure router for `hq capacity route` and `hq
|
|
3
|
+
* Pure router for `hq capacity route` and `hq runners create --account auto`.
|
|
4
4
|
*
|
|
5
5
|
* Port of personal/skills/boss-mode/boss-route.mjs into hq-cli. Owner decision
|
|
6
6
|
* 2026-10-11: all accounts are one pool across companies; the pick names the
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import type { MachineType } from "./machine-type.js";
|
|
13
13
|
import type { SyncOwner, DaemonConfig } from "./config.js";
|
|
14
14
|
import { type SyncCoreVaultPlan } from "../sync-core/engine-home.js";
|
|
15
|
+
import type { HandBackVault } from "../sync-core/hand-back.js";
|
|
15
16
|
import type { RemoteControlPoolsConfig } from "./remote-control-pools.js";
|
|
16
17
|
import { type SyncRunnerProcess } from "./sync-runner.js";
|
|
17
18
|
import { type VaultSyncSwitches } from "../vault-sync-switches.js";
|
|
@@ -187,6 +188,8 @@ export interface PlanContext {
|
|
|
187
188
|
/** Persisted/effective owner selected for this machine. */
|
|
188
189
|
syncOwner: SyncOwner;
|
|
189
190
|
syncCoreVaults?: readonly SyncCoreVaultPlan[];
|
|
191
|
+
/** Full vaults leaving the engine (rollout.json handingBack), returned to the current sync once their engine has stopped. */
|
|
192
|
+
syncCoreHandingBack?: readonly HandBackVault[];
|
|
190
193
|
syncCoreRunning?: SyncCoreRunning;
|
|
191
194
|
legacySyncReadyForCore?: boolean;
|
|
192
195
|
legacySyncHolder?: LegacySyncHolder;
|
|
@@ -89,7 +89,7 @@ export type HookOperation = {
|
|
|
89
89
|
* adapter's payload is the note's `.body` file (`host::fleet_settings`). */
|
|
90
90
|
| {
|
|
91
91
|
kind: "fleet-local-settings";
|
|
92
|
-
event: "PostToolUse" | "SessionEnd";
|
|
92
|
+
event: "PostToolUse" | "SessionEnd" | "SubagentStop";
|
|
93
93
|
commands: FleetLocalSettingsCommand[];
|
|
94
94
|
}
|
|
95
95
|
/** The Work Mesh register step of a mid-session company bind (`spawn_work_mesh_register`, owner decision 36). */
|
|
@@ -332,11 +332,13 @@ export function parseHookRequest(text, stem) {
|
|
|
332
332
|
}
|
|
333
333
|
return { stem, id: value.id, at, root: value.hqRoot, session: value.session, operation };
|
|
334
334
|
}
|
|
335
|
-
/** The args of a `fleet-local-settings` note: exactly `event` (PostToolUse or
|
|
335
|
+
/** The args of a `fleet-local-settings` note: exactly `event` (PostToolUse, SessionEnd or SubagentStop) and 1 to 64 typed commands. */
|
|
336
336
|
function parseFleetLocalSettings(args) {
|
|
337
337
|
const keys = Object.keys(args).sort();
|
|
338
338
|
const event = args.event;
|
|
339
|
-
if (keys.length !== 2 || keys[0] !== "commands" || keys[1] !== "event"
|
|
339
|
+
if (keys.length !== 2 || keys[0] !== "commands" || keys[1] !== "event")
|
|
340
|
+
return undefined;
|
|
341
|
+
if (event !== "PostToolUse" && event !== "SessionEnd" && event !== "SubagentStop")
|
|
340
342
|
return undefined;
|
|
341
343
|
const list = args.commands;
|
|
342
344
|
if (!Array.isArray(list) || list.length === 0 || list.length > FLEET_LOCAL_SETTINGS_MAX_COMMANDS)
|
package/dist/lib/daemon/run.js
CHANGED
|
@@ -30,9 +30,10 @@ import { createLegacyHandover, LEGACY_HANDOVER_STUCK_FILE, writeLegacyHandoverSt
|
|
|
30
30
|
import { effectiveSyncOwner, readDaemonConfig } from "./config.js";
|
|
31
31
|
import { backgroundQosCommand } from "./background-qos.js";
|
|
32
32
|
import { serveQmdWorker } from "../search-index/worker-process.js";
|
|
33
|
-
import { inspectEngineHome } from "../sync-core/engine-home.js";
|
|
33
|
+
import { inspectEngineHome, syncCoreUnitId } from "../sync-core/engine-home.js";
|
|
34
34
|
import { fullModeHold } from "../sync-core/reconcile.js";
|
|
35
35
|
import { engineVaultCount, readSyncCoreRolloutState } from "../sync-core/rollout-state.js";
|
|
36
|
+
import { engineOwnsVault, finishLegacyHandBack } from "../sync-core/hand-back.js";
|
|
36
37
|
import { effectiveEngineSettings, readSyncCoreVaultSettings } from "../sync-core/vault-settings.js";
|
|
37
38
|
import { assertPersonalServiceSessionCapability, readRemoteControlPoolsConfig, remoteControlPoolSecretsEnv, } from "./remote-control-pools.js";
|
|
38
39
|
import { loadLanesConfig } from "../lanes/config.js";
|
|
@@ -48,7 +49,7 @@ import { createLanesReconcileWatcher } from "./lanes-reconcile-watcher.js";
|
|
|
48
49
|
import { createLanesReconcileStatus, withLanesReconcileUnit } from "./lanes-reconcile-status.js";
|
|
49
50
|
import { findLegacyUnits, legacyMeshUnitsToRetire, legacyOwnerLookup, } from "./legacy.js";
|
|
50
51
|
import { readLegacySyncEnv } from "./legacy-sync-env.js";
|
|
51
|
-
import { readVaultSwitchOnTimes, readVaultSyncSwitches, unreadableSwitchesWarning
|
|
52
|
+
import { legacySwitchRestorePatch, readVaultSwitchOnTimes, readVaultSyncSwitches, unreadableSwitchesWarning } from "../vault-sync-switches.js";
|
|
52
53
|
import { scheduleDaemonPlistRefresh } from "./plist-refresh.js";
|
|
53
54
|
import { acquireDaemonLock, isProcessAlive, processCommandLine, releaseDaemonLock } from "./lock.js";
|
|
54
55
|
import { retireLegacyMeshUnits } from "./migrate.js";
|
|
@@ -108,6 +109,7 @@ export function syncCoreVaultPlans(home, hqRoot, platform) {
|
|
|
108
109
|
binaryPath: state.binaryPath,
|
|
109
110
|
release: state.release,
|
|
110
111
|
...(vault.legacyOffSince ? { legacyOffSince: vault.legacyOffSince } : {}),
|
|
112
|
+
...(vault.legacyAlreadyOff ? { legacyAlreadyOff: true } : {}),
|
|
111
113
|
...(effective ? { settings: effective } : {}),
|
|
112
114
|
}, platform);
|
|
113
115
|
const releaseHold = vault.phase === "full" ? fullModeHold(vault, state.release, platform) : undefined;
|
|
@@ -140,27 +142,18 @@ export function planUnitsWithSyncCoreInterlock(services, context, supervisor, re
|
|
|
140
142
|
if (context.vaultSync && !context.vaultSync.allOff) {
|
|
141
143
|
let personalOff = context.vaultSync.personalOff;
|
|
142
144
|
const offCompanies = new Set(context.vaultSync.offCompanies);
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (offCompanies.has(vault.slug))
|
|
154
|
-
restoreCompanies[vault.slug] = true;
|
|
155
|
-
offCompanies.delete(vault.slug);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
if (restorePersonal || Object.keys(restoreCompanies).length > 0) {
|
|
145
|
+
const engineStopped = (uid) => !!supervisor && supervisor.runningPlanKey(syncCoreUnitId(uid)) === undefined;
|
|
146
|
+
const held = (context.syncCoreVaults ?? []).filter((vault) => vault.phase === "full" && engineStopped(vault.uid) && fullModeHold(vault, vault.release, context.platform));
|
|
147
|
+
const handingBack = (context.syncCoreHandingBack ?? []).filter((vault) => engineStopped(vault.uid) && engineOwnsVault(context.home, vault.uid));
|
|
148
|
+
const handBack = [...held, ...handingBack];
|
|
149
|
+
const restore = legacySwitchRestorePatch(handBack, context.vaultSync);
|
|
150
|
+
if (restore.personal)
|
|
151
|
+
personalOff = false;
|
|
152
|
+
for (const slug of Object.keys(restore.companies))
|
|
153
|
+
offCompanies.delete(slug);
|
|
154
|
+
if (handBack.length > 0) {
|
|
159
155
|
try {
|
|
160
|
-
|
|
161
|
-
...(restorePersonal ? { personal: true } : {}),
|
|
162
|
-
companies: restoreCompanies,
|
|
163
|
-
});
|
|
156
|
+
finishLegacyHandBack(context.home, handBack, context.vaultSync);
|
|
164
157
|
}
|
|
165
158
|
catch {
|
|
166
159
|
fallbackPersistenceFailed = true;
|
|
@@ -1616,6 +1609,7 @@ export async function runDaemon(opts) {
|
|
|
1616
1609
|
})(),
|
|
1617
1610
|
syncOwner,
|
|
1618
1611
|
syncCoreVaults: syncCoreVaultPlans(home, hqRoot, platform),
|
|
1612
|
+
syncCoreHandingBack: readSyncCoreRolloutState(home)?.handingBack ?? [],
|
|
1619
1613
|
desktopAppManagesSync: appManagesSync,
|
|
1620
1614
|
legacySyncUnitManagesSync: legacy.some((u) => u.service === "sync" && !u.migratable),
|
|
1621
1615
|
syncRunnerProcesses,
|
|
@@ -161,7 +161,7 @@ export declare const DERIVED_WORK_SIZE: {
|
|
|
161
161
|
*/
|
|
162
162
|
export declare function deriveWorkRequirements(input: DeriveWorkRequirementsInput): WorkRequirements;
|
|
163
163
|
/**
|
|
164
|
-
* A derived document after the work's company was repaired (hq
|
|
164
|
+
* A derived document after the work's company was repaired (hq runners
|
|
165
165
|
* repair-company). The company and the company line of derived_from are
|
|
166
166
|
* replaced; a slug outside the schema pattern leaves the document as it is.
|
|
167
167
|
*/
|
|
@@ -371,7 +371,7 @@ export function deriveWorkRequirements(input) {
|
|
|
371
371
|
return document;
|
|
372
372
|
}
|
|
373
373
|
/**
|
|
374
|
-
* A derived document after the work's company was repaired (hq
|
|
374
|
+
* A derived document after the work's company was repaired (hq runners
|
|
375
375
|
* repair-company). The company and the company line of derived_from are
|
|
376
376
|
* replaced; a slug outside the schema pattern leaves the document as it is.
|
|
377
377
|
*/
|