@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
|
@@ -8430,6 +8430,11 @@ export const COMMAND_CATALOG = [
|
|
|
8430
8430
|
"flags": "--cloud-update",
|
|
8431
8431
|
"description": "Cloud-update mode",
|
|
8432
8432
|
"hidden": false
|
|
8433
|
+
},
|
|
8434
|
+
{
|
|
8435
|
+
"flags": "--verbose",
|
|
8436
|
+
"description": "Show diagnostic details when recovery fails",
|
|
8437
|
+
"hidden": false
|
|
8433
8438
|
}
|
|
8434
8439
|
],
|
|
8435
8440
|
"subcommands": []
|
|
@@ -10632,7 +10637,7 @@ export const COMMAND_CATALOG = [
|
|
|
10632
10637
|
},
|
|
10633
10638
|
{
|
|
10634
10639
|
"flags": "--size <size>",
|
|
10635
|
-
"description": "small, medium, large or xlarge (
|
|
10640
|
+
"description": "small, medium, large or xlarge (default medium; the request shows its price)",
|
|
10636
10641
|
"hidden": false
|
|
10637
10642
|
},
|
|
10638
10643
|
{
|
|
@@ -10858,7 +10863,7 @@ export const COMMAND_CATALOG = [
|
|
|
10858
10863
|
},
|
|
10859
10864
|
{
|
|
10860
10865
|
"name": "list",
|
|
10861
|
-
"description": "List
|
|
10866
|
+
"description": "List your personal Outposts and, grouped by company, the company Outposts you can use. --company lists one company's Outposts",
|
|
10862
10867
|
"aliases": [],
|
|
10863
10868
|
"hidden": false,
|
|
10864
10869
|
"helpOption": true,
|
|
@@ -10869,12 +10874,12 @@ export const COMMAND_CATALOG = [
|
|
|
10869
10874
|
"options": [
|
|
10870
10875
|
{
|
|
10871
10876
|
"flags": "--company <slug>",
|
|
10872
|
-
"description": "List
|
|
10877
|
+
"description": "List only this company's Outposts",
|
|
10873
10878
|
"hidden": false
|
|
10874
10879
|
},
|
|
10875
10880
|
{
|
|
10876
10881
|
"flags": "--json",
|
|
10877
|
-
"description": "Emit raw JSON",
|
|
10882
|
+
"description": "Emit raw JSON (without --company: your personal Outposts only, as before)",
|
|
10878
10883
|
"hidden": false
|
|
10879
10884
|
}
|
|
10880
10885
|
],
|
|
@@ -11475,23 +11480,23 @@ export const COMMAND_CATALOG = [
|
|
|
11475
11480
|
},
|
|
11476
11481
|
{
|
|
11477
11482
|
"name": "pull",
|
|
11478
|
-
"description": "Download one file from an Outpost through a short-lived download link (for files too large for exec output). <outpost> is
|
|
11483
|
+
"description": "Download one file from an Outpost through a short-lived download link (for files too large for exec output). <outpost> is your personal Outpost id (`primary` for your first box); for a company Outpost pass --company (and --outpost when the company has more than one) instead. The remote path must be inside the Outpost user's home or HQ dir; relative and ~ paths start at the home dir. The file is saved to [local-path], or to the remote file name in the current directory.",
|
|
11479
11484
|
"aliases": [],
|
|
11480
11485
|
"hidden": false,
|
|
11481
11486
|
"helpOption": true,
|
|
11482
11487
|
"helpCommand": false,
|
|
11483
|
-
"usage": "[
|
|
11488
|
+
"usage": "<outpost> <remote-path> [local-path] | --company <slug> [--outpost <name|id>] <remote-path> [local-path]",
|
|
11484
11489
|
"helpText": [],
|
|
11485
11490
|
"arguments": [
|
|
11486
11491
|
{
|
|
11487
|
-
"name": "outpost",
|
|
11492
|
+
"name": "outpost-or-path",
|
|
11488
11493
|
"required": true,
|
|
11489
11494
|
"variadic": false,
|
|
11490
11495
|
"description": ""
|
|
11491
11496
|
},
|
|
11492
11497
|
{
|
|
11493
11498
|
"name": "remote-path",
|
|
11494
|
-
"required":
|
|
11499
|
+
"required": false,
|
|
11495
11500
|
"variadic": false,
|
|
11496
11501
|
"description": ""
|
|
11497
11502
|
},
|
|
@@ -11503,6 +11508,16 @@ export const COMMAND_CATALOG = [
|
|
|
11503
11508
|
}
|
|
11504
11509
|
],
|
|
11505
11510
|
"options": [
|
|
11511
|
+
{
|
|
11512
|
+
"flags": "--company <slug>",
|
|
11513
|
+
"description": "Run on this company's Outpost (owners, admins, and members approved for it; others: hq outposts request-access)",
|
|
11514
|
+
"hidden": false
|
|
11515
|
+
},
|
|
11516
|
+
{
|
|
11517
|
+
"flags": "--outpost <name|id>",
|
|
11518
|
+
"description": "Which company Outpost, when the company has more than one",
|
|
11519
|
+
"hidden": false
|
|
11520
|
+
},
|
|
11506
11521
|
{
|
|
11507
11522
|
"flags": "--force",
|
|
11508
11523
|
"description": "Replace the local file if it already exists",
|
|
@@ -11675,6 +11690,11 @@ export const COMMAND_CATALOG = [
|
|
|
11675
11690
|
"description": "Which company Outpost, when the company has more than one",
|
|
11676
11691
|
"hidden": false
|
|
11677
11692
|
},
|
|
11693
|
+
{
|
|
11694
|
+
"flags": "--no-wait",
|
|
11695
|
+
"description": "With --company: return once HQ has the code, without waiting for the Outpost to confirm sign-in",
|
|
11696
|
+
"hidden": false
|
|
11697
|
+
},
|
|
11678
11698
|
{
|
|
11679
11699
|
"flags": "--json",
|
|
11680
11700
|
"description": "Emit raw JSON",
|
|
@@ -21315,6 +21335,11 @@ export const COMMAND_CATALOG = [
|
|
|
21315
21335
|
"description": "Confirm the registered Outpost hosting a native lane",
|
|
21316
21336
|
"hidden": false
|
|
21317
21337
|
},
|
|
21338
|
+
{
|
|
21339
|
+
"flags": "--company <slug>",
|
|
21340
|
+
"description": "Company that owns the --outpost company Outpost",
|
|
21341
|
+
"hidden": false
|
|
21342
|
+
},
|
|
21318
21343
|
{
|
|
21319
21344
|
"flags": "--json",
|
|
21320
21345
|
"description": "JSON on stdout (always)",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* only (`hq daemon sync pause`, the tray pause), and a manual push while
|
|
25
25
|
* background sync is paused is expected to run.
|
|
26
26
|
*/
|
|
27
|
+
import { engineOwnedVaultsFromState, NO_ENGINE_VAULTS, readEngineOwnedVaults, type EngineOwnedVaults } from "../lib/sync-core/engine-owned.js";
|
|
27
28
|
import { readVaultSyncSwitches, vaultSkipEnv, type VaultSyncSwitches } from "../lib/vault-sync-switches.js";
|
|
28
29
|
export { readVaultSyncSwitches, vaultSkipEnv, type VaultSyncSwitches };
|
|
29
30
|
/**
|
|
@@ -37,13 +38,7 @@ export type GatedSyncCommand = "push" | "pull" | "now";
|
|
|
37
38
|
export declare function isCloudOff(home?: string): boolean;
|
|
38
39
|
/** True when `company` (a slug) is a company vault whose switch is off. */
|
|
39
40
|
export declare function isCompanyVaultOff(switches: VaultSyncSwitches, company: string): boolean;
|
|
40
|
-
export
|
|
41
|
-
personal: boolean;
|
|
42
|
-
companies: ReadonlySet<string>;
|
|
43
|
-
uidSlugs: ReadonlyMap<string, string>;
|
|
44
|
-
}
|
|
45
|
-
export declare const NO_ENGINE_VAULTS: EngineOwnedVaults;
|
|
46
|
-
export declare function readEngineOwnedVaults(home?: string): EngineOwnedVaults;
|
|
41
|
+
export { engineOwnedVaultsFromState, NO_ENGINE_VAULTS, readEngineOwnedVaults, type EngineOwnedVaults };
|
|
47
42
|
/**
|
|
48
43
|
* The refusal text when every vault is off. The first line keeps the phrase
|
|
49
44
|
* "refused immediately": `handoff-sync-prefetch` (shell and native) reports
|
|
@@ -53,6 +48,11 @@ export declare function readEngineOwnedVaults(home?: string): EngineOwnedVaults;
|
|
|
53
48
|
export declare function cloudOffMessage(command: GatedSyncCommand): string;
|
|
54
49
|
/** The refusal text when the one vault a command targets is off. */
|
|
55
50
|
export declare function vaultOffMessage(command: GatedSyncCommand, vaultName: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* The refusal text when the new sync engine owns the vault a pull or sync-now targets. Keeps
|
|
53
|
+
* "refused immediately" on the first line for the same reason as {@link cloudOffMessage}.
|
|
54
|
+
*/
|
|
55
|
+
export declare function engineOwnedMessage(command: GatedSyncCommand, vaultName: string): string;
|
|
56
56
|
/** The refusal text when a company uid cannot be mapped while some vault is off. */
|
|
57
57
|
export declare function unresolvedVaultMessage(command: GatedSyncCommand, ref: string): string;
|
|
58
58
|
/** Which vaults a `push|pull|now` invocation targets. */
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
* background sync is paused is expected to run.
|
|
26
26
|
*/
|
|
27
27
|
import * as fs from "node:fs";
|
|
28
|
-
import * as os from "node:os";
|
|
29
28
|
import * as path from "node:path";
|
|
30
29
|
import { readCompaniesManifestMap } from "../lib/work-context/repo-remote.js";
|
|
31
|
-
import {
|
|
30
|
+
import { SyncCoreRolloutStateError } from "../lib/sync-core/rollout-state.js";
|
|
31
|
+
import { engineOwnedVaultsFromState, NO_ENGINE_VAULTS, readEngineOwnedVaults, } from "../lib/sync-core/engine-owned.js";
|
|
32
32
|
import { readVaultSyncSwitches, unreadableSwitchesWarning, vaultSkipEnv, } from "../lib/vault-sync-switches.js";
|
|
33
33
|
export { readVaultSyncSwitches, vaultSkipEnv };
|
|
34
34
|
/**
|
|
@@ -45,34 +45,7 @@ export function isCloudOff(home) {
|
|
|
45
45
|
export function isCompanyVaultOff(switches, company) {
|
|
46
46
|
return switches.offCompanies.has(company.trim().toLowerCase());
|
|
47
47
|
}
|
|
48
|
-
export
|
|
49
|
-
personal: false,
|
|
50
|
-
companies: new Set(),
|
|
51
|
-
uidSlugs: new Map(),
|
|
52
|
-
};
|
|
53
|
-
export function readEngineOwnedVaults(home = os.homedir()) {
|
|
54
|
-
const state = readSyncCoreRolloutState(home, { strict: true });
|
|
55
|
-
if (!state)
|
|
56
|
-
return NO_ENGINE_VAULTS;
|
|
57
|
-
const held = new Set((state.held ?? []).map((h) => h.uid.toLowerCase()));
|
|
58
|
-
let personal = false;
|
|
59
|
-
const companies = new Set();
|
|
60
|
-
const uidSlugs = new Map();
|
|
61
|
-
for (const vault of state.vaults) {
|
|
62
|
-
if (vault.phase !== "full" || held.has(vault.uid.toLowerCase()))
|
|
63
|
-
continue;
|
|
64
|
-
if (vault.kind === "personal") {
|
|
65
|
-
personal = true;
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
const slug = vault.slug?.trim().toLowerCase();
|
|
69
|
-
if (!slug)
|
|
70
|
-
continue;
|
|
71
|
-
companies.add(slug);
|
|
72
|
-
uidSlugs.set(vault.uid.toLowerCase(), slug);
|
|
73
|
-
}
|
|
74
|
-
return { personal, companies, uidSlugs };
|
|
75
|
-
}
|
|
48
|
+
export { engineOwnedVaultsFromState, NO_ENGINE_VAULTS, readEngineOwnedVaults };
|
|
76
49
|
const HOW_TO_TURN_ON = "To turn it back on, open HQ and go to Settings > Sync.";
|
|
77
50
|
const NOTHING_MOVED = "Nothing was uploaded or downloaded. Your local files are unchanged.";
|
|
78
51
|
/**
|
|
@@ -96,6 +69,17 @@ export function vaultOffMessage(command, vaultName) {
|
|
|
96
69
|
HOW_TO_TURN_ON,
|
|
97
70
|
].join("\n");
|
|
98
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* The refusal text when the new sync engine owns the vault a pull or sync-now targets. Keeps
|
|
74
|
+
* "refused immediately" on the first line for the same reason as {@link cloudOffMessage}.
|
|
75
|
+
*/
|
|
76
|
+
export function engineOwnedMessage(command, vaultName) {
|
|
77
|
+
return [
|
|
78
|
+
`The new sync is handling ${vaultName} on this computer and keeps it up to date in the background, so \`hq sync ${command}\` is not needed and was refused immediately.`,
|
|
79
|
+
"This command uploaded and downloaded nothing. Your local files are unchanged.",
|
|
80
|
+
"To see what the new sync is doing, run `hq sync-core status`.",
|
|
81
|
+
].join("\n");
|
|
82
|
+
}
|
|
99
83
|
/** The refusal text when a company uid cannot be mapped while some vault is off. */
|
|
100
84
|
export function unresolvedVaultMessage(command, ref) {
|
|
101
85
|
return [
|
|
@@ -146,14 +130,18 @@ function refusalForVault(command, vault, switches, engine) {
|
|
|
146
130
|
const enginePush = command === "push";
|
|
147
131
|
switch (vault.kind) {
|
|
148
132
|
case "personal":
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
133
|
+
if (!switches.personalOff || (enginePush && engine.personal))
|
|
134
|
+
return null;
|
|
135
|
+
return {
|
|
136
|
+
message: (engine.personal ? engineOwnedMessage : vaultOffMessage)(command, "your personal vault"),
|
|
137
|
+
vault: "personal",
|
|
138
|
+
};
|
|
139
|
+
case "company": {
|
|
140
|
+
const engineOwned = engine.companies.has(vault.slug.trim().toLowerCase());
|
|
141
|
+
if (!isCompanyVaultOff(switches, vault.slug) || (enginePush && engineOwned))
|
|
142
|
+
return null;
|
|
143
|
+
return { message: (engineOwned ? engineOwnedMessage : vaultOffMessage)(command, vault.slug), vault: vault.slug };
|
|
144
|
+
}
|
|
157
145
|
case "unknown": {
|
|
158
146
|
const engineSlug = engine.uidSlugs.get(vault.ref.toLowerCase());
|
|
159
147
|
if (engineSlug)
|