@indigoai-us/hq-cli 5.345.241 → 5.345.243
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 +54 -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/claude-md-imports.d.ts +52 -0
- package/dist/lib/claude-md-imports.js +226 -0
- 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/doctor/checks/claude-imports.d.ts +29 -0
- package/dist/lib/doctor/checks/claude-imports.js +131 -0
- package/dist/lib/doctor/fix/apply.d.ts +7 -0
- package/dist/lib/doctor/fix/apply.js +77 -0
- package/dist/lib/doctor/fix/remediation.d.ts +11 -1
- package/dist/lib/doctor/fix/remediation.js +42 -0
- package/dist/lib/doctor/registry.js +4 -0
- 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,6 +1,7 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
2
|
import { type SyncCoreReconcileResult } from "../lib/sync-core/reconcile.js";
|
|
3
3
|
import { type EngineManifestScope } from "../lib/sync-core/manifest-scopes.js";
|
|
4
|
+
import { type RolloutVault } from "../lib/sync-core/rollout-state.js";
|
|
4
5
|
import type { RunSyncManifestOptions, RunSyncManifestOutcome, SyncManifestDeps } from "./sync-manifest.js";
|
|
5
6
|
export interface SyncCoreReconcileCommandOptions {
|
|
6
7
|
hqRoot?: string;
|
|
@@ -23,7 +24,14 @@ export interface SyncCoreCommandDeps {
|
|
|
23
24
|
out: (line: string) => void;
|
|
24
25
|
err: (line: string) => void;
|
|
25
26
|
now?: () => Date;
|
|
27
|
+
/** Runs the hq-cloud reindex against the HQ folder (tests replace it). */
|
|
28
|
+
reindex?: (hqRoot: string) => {
|
|
29
|
+
status: number;
|
|
30
|
+
} | Promise<{
|
|
31
|
+
status: number;
|
|
32
|
+
}>;
|
|
26
33
|
}
|
|
34
|
+
export declare function runPostApplyReindex(hqRoot: string, vaults: readonly RolloutVault[], d: SyncCoreCommandDeps, log: (line: string) => void): Promise<void>;
|
|
27
35
|
export declare function runSyncCoreReconcile(opts: SyncCoreReconcileCommandOptions, d?: SyncCoreCommandDeps): Promise<SyncCoreReconcileResult>;
|
|
28
36
|
export interface SyncCoreManifestCommandOptions {
|
|
29
37
|
hqRoot?: string;
|
|
@@ -10,9 +10,35 @@ import { readCompanyDownloadStreams, readCompanyRolloutFlag } from "../lib/sync-
|
|
|
10
10
|
import { reconcileSyncCore } from "../lib/sync-core/reconcile.js";
|
|
11
11
|
import { engineOwnedManifestScopes, manifestScopeArg } from "../lib/sync-core/manifest-scopes.js";
|
|
12
12
|
import { readSyncCoreRolloutState, syncCoreRolloutStatePath } from "../lib/sync-core/rollout-state.js";
|
|
13
|
+
import { reindexAfterEngineChanges } from "../lib/sync-core/post-apply-reindex.js";
|
|
13
14
|
import { readVaultSyncSwitches } from "../lib/vault-sync-switches.js";
|
|
14
15
|
import { isSyncCoreVaultUid } from "../lib/sync-core/vault-uid.js";
|
|
15
16
|
import { effectiveEngineSettings, readSyncCoreVaultSettings, setSyncCoreVaultSetting, SyncCoreVaultSettingError, } from "../lib/sync-core/vault-settings.js";
|
|
17
|
+
const SESSION_LOG_CAPTURE_QUIET_FOR_MS = 10 * 60_000;
|
|
18
|
+
const SESSION_LOG_CAPTURE_MAX_STALENESS_MS = 60 * 60_000;
|
|
19
|
+
export async function runPostApplyReindex(hqRoot, vaults, d, log) {
|
|
20
|
+
try {
|
|
21
|
+
await reindexAfterEngineChanges({
|
|
22
|
+
home: d.home,
|
|
23
|
+
hqRoot,
|
|
24
|
+
vaults,
|
|
25
|
+
reindex: d.reindex ?? (async (root) => {
|
|
26
|
+
const { reindex } = await import("@indigoai-us/hq-cloud");
|
|
27
|
+
return reindex({
|
|
28
|
+
repoRoot: root,
|
|
29
|
+
lockTimeoutSec: 0,
|
|
30
|
+
sessionLogQuietForMs: SESSION_LOG_CAPTURE_QUIET_FOR_MS,
|
|
31
|
+
sessionLogMaxStalenessMs: SESSION_LOG_CAPTURE_MAX_STALENESS_MS,
|
|
32
|
+
});
|
|
33
|
+
}),
|
|
34
|
+
now: d.now,
|
|
35
|
+
log,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
d.err(`warning: could not check whether the new sync engine changed skills or workers: ${error instanceof Error ? error.message : String(error)}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
16
42
|
function defaultDeps() {
|
|
17
43
|
return {
|
|
18
44
|
home: os.homedir(),
|
|
@@ -42,6 +68,20 @@ async function resolveHqRoot(flag, env) {
|
|
|
42
68
|
return fallback;
|
|
43
69
|
throw new Error("no HQ folder found; pass --hq-root <path>");
|
|
44
70
|
}
|
|
71
|
+
async function machineTypeHere(d) {
|
|
72
|
+
const [{ detectMachineType }, { readDaemonConfig }] = await Promise.all([
|
|
73
|
+
import("../lib/daemon/machine-type.js"),
|
|
74
|
+
import("../lib/daemon/config.js"),
|
|
75
|
+
]);
|
|
76
|
+
return detectMachineType(undefined, {
|
|
77
|
+
platform: d.platform,
|
|
78
|
+
env: d.env,
|
|
79
|
+
home: d.home,
|
|
80
|
+
savedType: readDaemonConfig(daemonPaths(d.home, d.env).configPath).machineType,
|
|
81
|
+
existsSync: fs.existsSync,
|
|
82
|
+
readFileSync: (p) => fs.readFileSync(p, "utf8"),
|
|
83
|
+
}).type;
|
|
84
|
+
}
|
|
45
85
|
export async function runSyncCoreReconcile(opts, d = defaultDeps()) {
|
|
46
86
|
const hqRoot = await resolveHqRoot(opts.hqRoot, d.env);
|
|
47
87
|
const [{ VaultClient }, { buildVaultConfig, ensureCognitoIdToken, machineTokenCacheFile, wantsMachineCognitoTokens }] = await Promise.all([import("@indigoai-us/hq-cloud"), import("../utils/cognito-session.js")]);
|
|
@@ -64,6 +104,8 @@ export async function runSyncCoreReconcile(opts, d = defaultDeps()) {
|
|
|
64
104
|
getEntity: async () => null,
|
|
65
105
|
}),
|
|
66
106
|
readRolloutFlag: (companyUid) => readCompanyRolloutFlag(companyUid, token, { env: d.env }),
|
|
107
|
+
resolveCompany: (companyUid) => client.entity.get(companyUid),
|
|
108
|
+
machineType: await machineTypeHere(d),
|
|
67
109
|
readDownloadStreams: (companyUid) => readCompanyDownloadStreams(companyUid, token, { env: d.env }),
|
|
68
110
|
ensureBinary: (release) => ensureSyncCoreBinary({ home: d.home, platform: d.platform, arch: d.arch, release, env: d.env }),
|
|
69
111
|
platform: d.platform,
|
|
@@ -71,6 +113,7 @@ export async function runSyncCoreReconcile(opts, d = defaultDeps()) {
|
|
|
71
113
|
readPin: () => readSyncCorePin({ env: d.env }),
|
|
72
114
|
log: opts.json ? () => { } : d.out,
|
|
73
115
|
});
|
|
116
|
+
await runPostApplyReindex(hqRoot, result.state.vaults, d, opts.json ? () => { } : d.out);
|
|
74
117
|
if (opts.json)
|
|
75
118
|
d.out(JSON.stringify(result.state, null, 2));
|
|
76
119
|
else if (result.state.vaults.length === 0)
|