@indigoai-us/hq-cli 5.345.179 → 5.345.181
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 +23 -0
- package/dist/command-catalog.generated.d.ts +126 -0
- package/dist/command-catalog.generated.js +155 -0
- package/dist/commands/bot.d.ts +29 -1
- package/dist/commands/bot.js +282 -22
- package/dist/commands/channels.d.ts +18 -1
- package/dist/commands/channels.js +185 -1
- package/dist/commands/lanes.d.ts +1 -1
- package/dist/commands/lanes.js +6 -2
- package/dist/commands/mesh.js +19 -0
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +2285 -1743
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/bot/config.d.ts +8 -0
- package/dist/lib/bot/fleet-local.d.ts +7 -3
- package/dist/lib/bot/fleet-local.js +234 -64
- package/dist/lib/bot/run.js +39 -2
- package/dist/lib/bot/runtime-auth.d.ts +119 -0
- package/dist/lib/bot/runtime-auth.js +251 -0
- package/dist/lib/daemon/catalog.d.ts +1 -0
- package/dist/lib/daemon/catalog.js +1 -1
- package/dist/lib/daemon/run.d.ts +2 -0
- package/dist/lib/daemon/run.js +64 -16
- 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/hot-channels/adapters/meetings.js +3 -1
- package/dist/lib/hot-channels/contract.d.ts +6 -0
- package/dist/lib/hot-channels/ledger.js +17 -0
- package/dist/lib/hot-channels/loop.js +2 -0
- package/dist/lib/lanes/accounts.d.ts +1 -17
- package/dist/lib/lanes/accounts.js +5 -45
- package/dist/lib/lanes/provider-home.d.ts +24 -0
- package/dist/lib/lanes/provider-home.js +52 -0
- package/dist/lib/lanes/spawn.d.ts +12 -0
- package/dist/lib/lanes/spawn.js +27 -0
- package/dist/lib/mesh/live/daemon/doctor.d.ts +3 -0
- package/dist/lib/mesh/live/daemon/doctor.js +13 -0
- package/dist/lib/mesh/live/daemon/owner-inbox-push.d.ts +94 -0
- package/dist/lib/mesh/live/daemon/owner-inbox-push.js +273 -0
- package/dist/lib/mesh/live/daemon/run.js +31 -0
- package/dist/lib/mesh/live/daemon/work-subscribe.d.ts +14 -0
- package/dist/lib/mesh/live/daemon/work-subscribe.js +210 -3
- package/dist/lib/mesh/live/paths.d.ts +2 -0
- package/dist/lib/mesh/live/paths.js +2 -0
- package/dist/lib/sync-core/flag.d.ts +1 -1
- package/dist/lib/sync-core/flag.js +1 -1
- package/dist/lib/sync-core/reconcile.d.ts +1 -1
- package/dist/lib/sync-core/reconcile.js +9 -7
- package/dist/lib/sync-core/release.d.ts +3 -3
- package/dist/lib/sync-core/release.js +4 -4
- package/dist/lib/sync-core/rollout-state.d.ts +1 -0
- package/dist/lib/sync-core/rollout-state.js +1 -0
- package/package.json +8 -8
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
/** Content-free sequence file written by the mesh MQTT inbox subscriber. */
|
|
6
6
|
export declare const AGENT_INBOX_PUSH_STATE_BASENAME = "agent-inbox-push.json";
|
|
7
7
|
export declare const SYNC_WAKE_STATE_BASENAME = "sync-wake.json";
|
|
8
|
+
/** Content-free counter file written by the mesh MQTT owner DM subscriber. */
|
|
9
|
+
export declare const OWNER_INBOX_PUSH_STATE_BASENAME = "owner-inbox-push.json";
|
|
8
10
|
export declare function workMeshRoot(home?: string, env?: NodeJS.ProcessEnv): string;
|
|
9
11
|
export declare function workMeshSpoolPath(root?: string): string;
|
|
10
12
|
export declare function workMeshHeldPath(root?: string): string;
|
|
@@ -8,6 +8,8 @@ const WORK_MESH_DIRNAME = "work-mesh";
|
|
|
8
8
|
/** Content-free sequence file written by the mesh MQTT inbox subscriber. */
|
|
9
9
|
export const AGENT_INBOX_PUSH_STATE_BASENAME = "agent-inbox-push.json";
|
|
10
10
|
export const SYNC_WAKE_STATE_BASENAME = "sync-wake.json";
|
|
11
|
+
/** Content-free counter file written by the mesh MQTT owner DM subscriber. */
|
|
12
|
+
export const OWNER_INBOX_PUSH_STATE_BASENAME = "owner-inbox-push.json";
|
|
11
13
|
export function workMeshRoot(home = os.homedir(), env = process.env) {
|
|
12
14
|
const override = env.HQ_WORK_MESH_ROOT?.trim();
|
|
13
15
|
if (override)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FlagClientOptions, type FlagResolution } from "@indigoai-us/hq-flags-client";
|
|
2
|
-
export declare const SYNC_RUST_ENGINE_ROLLOUT_FLAG = "sync.rust-engine-rollout";
|
|
2
|
+
export declare const SYNC_RUST_ENGINE_ROLLOUT_FLAG = "sync.rust-engine-rollout-v2";
|
|
3
3
|
export interface RolloutFlagClient {
|
|
4
4
|
ready(): Promise<void>;
|
|
5
5
|
explain(flagKey: string, options?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createFlagClient, readLocalOverride } from "@indigoai-us/hq-flags-client";
|
|
2
2
|
import { resolveFlagRegistryEndpoint } from "../flag-registry-endpoint.js";
|
|
3
|
-
export const SYNC_RUST_ENGINE_ROLLOUT_FLAG = "sync.rust-engine-rollout";
|
|
3
|
+
export const SYNC_RUST_ENGINE_ROLLOUT_FLAG = "sync.rust-engine-rollout-v2";
|
|
4
4
|
const READ_TIMEOUT_MS = 5_000;
|
|
5
5
|
export class RolloutFlagReadError extends Error {
|
|
6
6
|
}
|
|
@@ -26,6 +26,6 @@ export interface SyncCoreReconcileResult {
|
|
|
26
26
|
kept: string[];
|
|
27
27
|
warnings: string[];
|
|
28
28
|
}
|
|
29
|
-
export declare function
|
|
29
|
+
export declare function fullModeHold(vault: SyncCoreVault, release: string): string | undefined;
|
|
30
30
|
export declare function reconcileSyncCore(deps: SyncCoreReconcileDeps): Promise<SyncCoreReconcileResult>;
|
|
31
31
|
//# sourceMappingURL=reconcile.d.ts.map
|
|
@@ -3,17 +3,18 @@ import * as path from "node:path";
|
|
|
3
3
|
import { readCompaniesManifestMap } from "../work-context/repo-remote.js";
|
|
4
4
|
import { readVaultSyncSwitches, writeVaultSyncSwitches } from "../vault-sync-switches.js";
|
|
5
5
|
import { clearEngineStatus, engineFirstCycle, isSyncCoreVaultUid, removeEngineOwnership, syncCoreEngineHome, writeEngineHome, } from "./engine-home.js";
|
|
6
|
-
import {
|
|
6
|
+
import { SYNC_CORE_FULL_RELEASE, SYNC_CORE_RELEASE, fullModeAllowed, installedSyncCoreRelease, syncCoreBinaryPath, } from "./release.js";
|
|
7
7
|
import { readSyncCoreSkips } from "./skip.js";
|
|
8
|
+
import { SYNC_RUST_ENGINE_ROLLOUT_FLAG } from "./flag.js";
|
|
8
9
|
import { readSyncCoreRolloutState, syncCoreRolloutStatePath, writeSyncCoreRolloutState, } from "./rollout-state.js";
|
|
9
10
|
function message(error) {
|
|
10
11
|
return error instanceof Error ? error.message : String(error);
|
|
11
12
|
}
|
|
12
|
-
export function
|
|
13
|
-
if (
|
|
13
|
+
export function fullModeHold(vault, release) {
|
|
14
|
+
if (fullModeAllowed(release))
|
|
14
15
|
return undefined;
|
|
15
|
-
const needed =
|
|
16
|
-
return
|
|
16
|
+
const needed = SYNC_CORE_FULL_RELEASE ? `engine release ${SYNC_CORE_FULL_RELEASE} or later` : "an engine release cleared for full sync";
|
|
17
|
+
return `${vault.kind} vaults move to the new sync engine with ${needed} (${release} installed); staying on the current sync`;
|
|
17
18
|
}
|
|
18
19
|
function localCompanies(hqRoot, memberships) {
|
|
19
20
|
const manifest = readCompaniesManifestMap(hqRoot) ?? {};
|
|
@@ -78,7 +79,7 @@ export async function reconcileSyncCore(deps) {
|
|
|
78
79
|
on = await deps.readRolloutFlag(company.uid);
|
|
79
80
|
}
|
|
80
81
|
catch (error) {
|
|
81
|
-
on = previousByUid.has(company.uid);
|
|
82
|
+
on = previous?.rolloutFlagKey === SYNC_RUST_ENGINE_ROLLOUT_FLAG && previousByUid.has(company.uid);
|
|
82
83
|
warnings.push(`${message(error)}; keeping ${company.slug} ${on ? "on the new engine" : "on the current sync"}`);
|
|
83
84
|
}
|
|
84
85
|
if (on) {
|
|
@@ -132,7 +133,7 @@ export async function reconcileSyncCore(deps) {
|
|
|
132
133
|
const held = [];
|
|
133
134
|
const engineRelease = installedRelease ?? release;
|
|
134
135
|
for (let i = desired.length - 1; i >= 0; i -= 1) {
|
|
135
|
-
const reason =
|
|
136
|
+
const reason = fullModeHold(desired[i], engineRelease);
|
|
136
137
|
if (!reason)
|
|
137
138
|
continue;
|
|
138
139
|
held.unshift({ uid: desired[i].uid, reason });
|
|
@@ -200,6 +201,7 @@ export async function reconcileSyncCore(deps) {
|
|
|
200
201
|
}
|
|
201
202
|
const state = {
|
|
202
203
|
version: 1,
|
|
204
|
+
rolloutFlagKey: SYNC_RUST_ENGINE_ROLLOUT_FLAG,
|
|
203
205
|
readAt: at,
|
|
204
206
|
release: installedRelease ?? release,
|
|
205
207
|
binaryPath,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const SYNC_CORE_RELEASE = "v0.1.
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const SYNC_CORE_RELEASE = "v0.1.23";
|
|
2
|
+
export declare const SYNC_CORE_FULL_RELEASE: string | null;
|
|
3
3
|
export declare function compareSyncCoreReleases(a: string, b: string): number;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function fullModeAllowed(release: string): boolean;
|
|
5
5
|
export declare const SYNC_CORE_DOWNLOAD_BASE = "https://indigoai-public.s3.amazonaws.com/hq-sync-core";
|
|
6
6
|
export declare const SYNC_CORE_DOWNLOAD_BASE_ENV = "HQ_SYNC_CORE_DOWNLOAD_BASE";
|
|
7
7
|
export declare function syncCoreBinaryPath(home?: string): string;
|
|
@@ -3,8 +3,8 @@ import * as fs from "node:fs";
|
|
|
3
3
|
import * as os from "node:os";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
|
-
export const SYNC_CORE_RELEASE = "v0.1.
|
|
7
|
-
export const
|
|
6
|
+
export const SYNC_CORE_RELEASE = "v0.1.23";
|
|
7
|
+
export const SYNC_CORE_FULL_RELEASE = "v0.1.23";
|
|
8
8
|
export function compareSyncCoreReleases(a, b) {
|
|
9
9
|
const parse = (release) => release.replace(/^v/, "").split(".").map((part) => Number.parseInt(part, 10) || 0);
|
|
10
10
|
const [x, y] = [parse(a), parse(b)];
|
|
@@ -15,8 +15,8 @@ export function compareSyncCoreReleases(a, b) {
|
|
|
15
15
|
}
|
|
16
16
|
return 0;
|
|
17
17
|
}
|
|
18
|
-
export function
|
|
19
|
-
return
|
|
18
|
+
export function fullModeAllowed(release) {
|
|
19
|
+
return SYNC_CORE_FULL_RELEASE !== null && compareSyncCoreReleases(release, SYNC_CORE_FULL_RELEASE) >= 0;
|
|
20
20
|
}
|
|
21
21
|
export const SYNC_CORE_DOWNLOAD_BASE = "https://indigoai-public.s3.amazonaws.com/hq-sync-core";
|
|
22
22
|
export const SYNC_CORE_DOWNLOAD_BASE_ENV = "HQ_SYNC_CORE_DOWNLOAD_BASE";
|
|
@@ -100,6 +100,7 @@ export function readSyncCoreRolloutState(home) {
|
|
|
100
100
|
return null;
|
|
101
101
|
return {
|
|
102
102
|
version: 1,
|
|
103
|
+
...(typeof obj.rolloutFlagKey === "string" ? { rolloutFlagKey: obj.rolloutFlagKey } : {}),
|
|
103
104
|
readAt: obj.readAt,
|
|
104
105
|
release: obj.release,
|
|
105
106
|
binaryPath: obj.binaryPath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cli",
|
|
3
|
-
"version": "5.345.
|
|
3
|
+
"version": "5.345.181",
|
|
4
4
|
"description": "HQ by Indigo management CLI — modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@aws-sdk/client-iot-data-plane": "^3.1096.0",
|
|
53
53
|
"@aws-sdk/client-s3": "^3.1049.0",
|
|
54
54
|
"@aws-sdk/dsql-signer": "^3.1146.0",
|
|
55
|
-
"@indigoai-us/hq-cloud": "6.18.
|
|
55
|
+
"@indigoai-us/hq-cloud": "6.18.105",
|
|
56
56
|
"@indigoai-us/hq-flags-client": "^0.1.2",
|
|
57
57
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
58
58
|
"@sentry/node": "^10.49.0",
|
|
@@ -114,11 +114,11 @@
|
|
|
114
114
|
"*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}": "eslint --cache --no-error-on-unmatched-pattern"
|
|
115
115
|
},
|
|
116
116
|
"optionalDependencies": {
|
|
117
|
-
"@indigoai-us/hq-hook-win32-x64": "5.345.
|
|
118
|
-
"@indigoai-us/hq-hook-win32-arm64": "5.345.
|
|
119
|
-
"@indigoai-us/hq-hook-darwin-x64": "5.345.
|
|
120
|
-
"@indigoai-us/hq-hook-darwin-arm64": "5.345.
|
|
121
|
-
"@indigoai-us/hq-hook-linux-x64": "5.345.
|
|
122
|
-
"@indigoai-us/hq-hook-linux-arm64": "5.345.
|
|
117
|
+
"@indigoai-us/hq-hook-win32-x64": "5.345.181",
|
|
118
|
+
"@indigoai-us/hq-hook-win32-arm64": "5.345.181",
|
|
119
|
+
"@indigoai-us/hq-hook-darwin-x64": "5.345.181",
|
|
120
|
+
"@indigoai-us/hq-hook-darwin-arm64": "5.345.181",
|
|
121
|
+
"@indigoai-us/hq-hook-linux-x64": "5.345.181",
|
|
122
|
+
"@indigoai-us/hq-hook-linux-arm64": "5.345.181"
|
|
123
123
|
}
|
|
124
124
|
}
|