@indigoai-us/hq-cli 5.345.149 → 5.345.151
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 +46 -0
- package/dist/command-catalog.generated.d.ts +18 -6
- package/dist/command-catalog.generated.js +21 -6
- package/dist/commands/_patterns.d.ts +6 -0
- package/dist/commands/_patterns.js +6 -0
- package/dist/commands/cloud-off-gate.d.ts +138 -0
- package/dist/commands/cloud-off-gate.js +234 -0
- package/dist/commands/cloud.d.ts +7 -0
- package/dist/commands/cloud.js +59 -17
- package/dist/commands/core-handoff.js +6 -1
- package/dist/commands/groups.js +9 -6
- package/dist/commands/lanes-questions.js +7 -4
- package/dist/commands/lanes.js +13 -6
- package/dist/commands/meetings.js +7 -3
- package/dist/commands/members.d.ts +35 -0
- package/dist/commands/members.js +65 -14
- package/dist/commands/secrets.d.ts +5 -0
- package/dist/commands/secrets.js +11 -6
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +63282 -62480
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/daemon/catalog.d.ts +7 -0
- package/dist/lib/daemon/catalog.js +10 -1
- package/dist/lib/daemon/run.js +13 -0
- 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/lanes/index.d.ts +1 -1
- package/dist/lib/lanes/index.js +1 -1
- package/dist/lib/lanes/links.js +27 -11
- package/dist/lib/lanes/store.d.ts +11 -0
- package/dist/lib/lanes/store.js +20 -0
- package/dist/lib/lanes/watch.js +5 -3
- package/dist/lib/vault-sync-switches.d.ts +41 -0
- package/dist/lib/vault-sync-switches.js +86 -0
- package/package.json +8 -8
|
@@ -20,7 +20,7 @@ export { LANE_STORY_LEDGER_FLAG, buildLaneStatusSnapshot, formatLaneStatusHuman,
|
|
|
20
20
|
export type { LaneStatusSnapshot, ProjectStoryLedger, StoryLedgerWriteDeps } from "./story-ledger.js";
|
|
21
21
|
export { buildOutpostPickupCommand, parseOutpostPickupPayload, } from "./outpost-dispatch.js";
|
|
22
22
|
export type { OutpostDispatchResult, OutpostPickupPayload, } from "./outpost-dispatch.js";
|
|
23
|
-
export { LANES_STORE_REL, LANE_RECORDS_DIR, PENDING_INDEX_DIR, QUESTION_RECORDS_DIR, appendCappedHistory, appendLaneAttribution, appendLaneSeniorHistory, appendQuestionRouting, createLane, createQuestion, isConflictSidecarName, laneRecordPath, lanesStoreRoot, listLaneIds, listQuestionIds, mergeLaneRecords, mergeQuestionRecords, mintLaneId, mintQuestionId, parseLaneRecord, parseQuestionRecord, pendingMarkerPath, questionRecordPath, readAllLanes, readLane, readQuestion, resolveStoreHqRoot, sanitizeHostComponent, tryReadLane, tryReadQuestion, retryUpdateLane, retryUpdateQuestion, syncLaneRecordFromOwner, updateLane, updateQuestion, withLaneHireLocks, } from "./store.js";
|
|
23
|
+
export { LANES_STORE_REL, LANE_RECORDS_DIR, PENDING_INDEX_DIR, QUESTION_RECORDS_DIR, appendCappedHistory, appendLaneAttribution, appendLaneSeniorHistory, appendQuestionRouting, createLane, createQuestion, isConflictSidecarName, laneRecordPath, lanesStoreRoot, listLaneIds, expandLocalLaneIdPrefix, LANE_ID_PREFIX_MIN, listQuestionIds, mergeLaneRecords, mergeQuestionRecords, mintLaneId, mintQuestionId, parseLaneRecord, parseQuestionRecord, pendingMarkerPath, questionRecordPath, readAllLanes, readLane, readQuestion, resolveStoreHqRoot, sanitizeHostComponent, tryReadLane, tryReadQuestion, retryUpdateLane, retryUpdateQuestion, syncLaneRecordFromOwner, updateLane, updateQuestion, withLaneHireLocks, } from "./store.js";
|
|
24
24
|
export type { StoreDeps } from "./store.js";
|
|
25
25
|
export { DEFAULT_LANE_WATCH_INTERVAL_MS, MAX_LANE_WATCH_INTERVAL_MS, MAX_WATCHED_LANES, MAX_WATCH_OUTPUT_LINES, runLaneWatch, } from "./watch.js";
|
|
26
26
|
export type { LaneWatchDeps, LaneWatchResult } from "./watch.js";
|
package/dist/lib/lanes/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { DEFAULT_ACCOUNT_HOMES, DEFAULT_AUTO_COMPACT_TOKENS, DEFAULT_COMPACT_AFT
|
|
|
12
12
|
export { resolveLanesHqRoot } from "./hq-root.js";
|
|
13
13
|
export { LANE_STORY_LEDGER_FLAG, buildLaneStatusSnapshot, formatLaneStatusHuman, laneStoryLedgerEnabled, resolveProjectStoryLedger, syncLaneToProjectStoryLedger, removeLaneFromProjectStoryLedger, validateProjectStories, } from "./story-ledger.js";
|
|
14
14
|
export { buildOutpostPickupCommand, parseOutpostPickupPayload, } from "./outpost-dispatch.js";
|
|
15
|
-
export { LANES_STORE_REL, LANE_RECORDS_DIR, PENDING_INDEX_DIR, QUESTION_RECORDS_DIR, appendCappedHistory, appendLaneAttribution, appendLaneSeniorHistory, appendQuestionRouting, createLane, createQuestion, isConflictSidecarName, laneRecordPath, lanesStoreRoot, listLaneIds, listQuestionIds, mergeLaneRecords, mergeQuestionRecords, mintLaneId, mintQuestionId, parseLaneRecord, parseQuestionRecord, pendingMarkerPath, questionRecordPath, readAllLanes, readLane, readQuestion, resolveStoreHqRoot, sanitizeHostComponent, tryReadLane, tryReadQuestion, retryUpdateLane, retryUpdateQuestion, syncLaneRecordFromOwner, updateLane, updateQuestion, withLaneHireLocks, } from "./store.js";
|
|
15
|
+
export { LANES_STORE_REL, LANE_RECORDS_DIR, PENDING_INDEX_DIR, QUESTION_RECORDS_DIR, appendCappedHistory, appendLaneAttribution, appendLaneSeniorHistory, appendQuestionRouting, createLane, createQuestion, isConflictSidecarName, laneRecordPath, lanesStoreRoot, listLaneIds, expandLocalLaneIdPrefix, LANE_ID_PREFIX_MIN, listQuestionIds, mergeLaneRecords, mergeQuestionRecords, mintLaneId, mintQuestionId, parseLaneRecord, parseQuestionRecord, pendingMarkerPath, questionRecordPath, readAllLanes, readLane, readQuestion, resolveStoreHqRoot, sanitizeHostComponent, tryReadLane, tryReadQuestion, retryUpdateLane, retryUpdateQuestion, syncLaneRecordFromOwner, updateLane, updateQuestion, withLaneHireLocks, } from "./store.js";
|
|
16
16
|
export { DEFAULT_LANE_WATCH_INTERVAL_MS, MAX_LANE_WATCH_INTERVAL_MS, MAX_WATCHED_LANES, MAX_WATCH_OUTPUT_LINES, runLaneWatch, } from "./watch.js";
|
|
17
17
|
export { MONITOR_ERROR_EXIT_CODE, MONITOR_ENGINES, MONITOR_MAX_TIMEOUT_MS, MONITOR_TASK_OUTPUT_MAX_BYTES, MONITOR_TRANSCRIPT_MAX_BYTES, MONITOR_UNCOVERED_EXIT_CODE, coveredLaneIds, isMonitorTaskLive, monitorReminderText, parseCanonicalWatchCommand, parseMonitorTranscript, readLiveMonitorEvidence, } from "./monitor.js";
|
|
18
18
|
export { IMDS_HOST, IMDS_INSTANCE_ID_URL, IMDS_TIMEOUT_MS, IMDS_TOKEN_URL, defaultReadImdsInstanceId, resolveMachineIdentity, } from "./machine-identity.js";
|
package/dist/lib/lanes/links.js
CHANGED
|
@@ -267,28 +267,44 @@ function hookMessage(root, pointer) {
|
|
|
267
267
|
throw new LaneLinkError("link_pointer_invalid", "Child link pointer has no child name");
|
|
268
268
|
return { inbox: queueDir(root, pointer.link, pointer.name), role: "child", child: pointer.name };
|
|
269
269
|
}
|
|
270
|
+
// Same markers as core's conduct-lanes-link-deliver.sh. A parent session id
|
|
271
|
+
// alone is not one: resumed, forked, or launcher-spawned Grok roots carry it,
|
|
272
|
+
// and Grok marks its real children with subagent_type.
|
|
273
|
+
function isChildHookPayload(payload) {
|
|
274
|
+
const nonEmpty = (...keys) => keys.some((key) => typeof payload[key] === "string" && payload[key].length > 0);
|
|
275
|
+
if (["agent_id", "agentId"].some((key) => payload[key] !== undefined && payload[key] !== null && payload[key] !== ""))
|
|
276
|
+
return true;
|
|
277
|
+
if (nonEmpty("parent_thread_id", "parentThreadId", "agent_transcript_path", "agentTranscriptPath", "subagent_type", "subagentType"))
|
|
278
|
+
return true;
|
|
279
|
+
const transcript = payload.transcript_path ?? payload.transcriptPath;
|
|
280
|
+
return typeof transcript === "string" && /[/\\]subagents[/\\][^/\\]+\.jsonl$/.test(transcript);
|
|
281
|
+
}
|
|
270
282
|
export async function runLaneLink(subcommand, options) {
|
|
271
283
|
const now = options.now ?? (() => new Date());
|
|
272
284
|
const env = options.env ?? process.env;
|
|
273
285
|
const root = options.hqRoot;
|
|
274
286
|
let sid = "";
|
|
287
|
+
let childContext = false;
|
|
275
288
|
if (subcommand === "_deliver") {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
289
|
+
let payload = {};
|
|
290
|
+
try {
|
|
291
|
+
const parsed = JSON.parse(options.input ?? "{}");
|
|
292
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed))
|
|
293
|
+
payload = parsed;
|
|
294
|
+
}
|
|
295
|
+
catch { /* malformed hooks are inert */ }
|
|
296
|
+
const value = payload.session_id ?? payload.sessionId;
|
|
297
|
+
sid = typeof value === "string" && safeId(value) ? value : "";
|
|
298
|
+
childContext = isChildHookPayload(payload);
|
|
285
299
|
}
|
|
286
300
|
const requireSid = () => sid || (sid = resolveLinkSessionId(root, options.sessionId, env));
|
|
287
301
|
const links = rootDir(root);
|
|
288
302
|
if (subcommand === "_deliver") {
|
|
289
|
-
|
|
303
|
+
// Subagent hook events carry the parent's session_id. Delivering there would
|
|
304
|
+
// drain the root's queue into the subagent, so leave the message queued.
|
|
305
|
+
if (!sid || childContext || !["PostToolUse", "Stop"].includes(options.event ?? ""))
|
|
290
306
|
return {};
|
|
291
|
-
if (
|
|
307
|
+
if (options.event === "Stop" && env.HQ_STOP_DECISION_DELIVERABLE === "0")
|
|
292
308
|
return {};
|
|
293
309
|
const pointer = readPointer(root, sid);
|
|
294
310
|
if (!pointer)
|
|
@@ -87,5 +87,16 @@ export declare function createQuestion(hqRoot: string, init: Omit<QuestionRecord
|
|
|
87
87
|
export declare function updateQuestion(hqRoot: string, questionId: string, expectedVersion: number, updater: (current: QuestionRecord) => QuestionRecord, deps?: StoreDeps): QuestionRecord;
|
|
88
88
|
export declare function appendQuestionRouting(hqRoot: string, questionId: string, expectedVersion: number, entry: RoutingHistoryEntry, deps?: StoreDeps): QuestionRecord;
|
|
89
89
|
export declare function listLaneIds(hqRoot: string, deps?: StoreDeps): string[];
|
|
90
|
+
/** Shortest lane-id prefix a command expands to a full local lane id. */
|
|
91
|
+
export declare const LANE_ID_PREFIX_MIN = 8;
|
|
92
|
+
/**
|
|
93
|
+
* Expand a short lane-id prefix (at least `LANE_ID_PREFIX_MIN` ULID chars,
|
|
94
|
+
* no host suffix) to the one local lane id it starts. Returns `undefined`
|
|
95
|
+
* when the input is not such a prefix or matches no local lane, and throws
|
|
96
|
+
* `lane_id_ambiguous` listing every candidate when it matches more than one.
|
|
97
|
+
* Lane records, questions, run dirs and envelopes are always keyed by the
|
|
98
|
+
* full lane id; a prefix is only ever a lookup convenience.
|
|
99
|
+
*/
|
|
100
|
+
export declare function expandLocalLaneIdPrefix(hqRoot: string, input: string, deps?: StoreDeps): string | undefined;
|
|
90
101
|
export declare function listQuestionIds(hqRoot: string, deps?: StoreDeps): string[];
|
|
91
102
|
//# sourceMappingURL=store.d.ts.map
|
package/dist/lib/lanes/store.js
CHANGED
|
@@ -2072,6 +2072,26 @@ function listRecordIds(dir, label, deps) {
|
|
|
2072
2072
|
export function listLaneIds(hqRoot, deps = defaultStoreDeps()) {
|
|
2073
2073
|
return listRecordIds(path.join(lanesStoreRoot(hqRoot), LANE_RECORDS_DIR), "lane", deps);
|
|
2074
2074
|
}
|
|
2075
|
+
/** Shortest lane-id prefix a command expands to a full local lane id. */
|
|
2076
|
+
export const LANE_ID_PREFIX_MIN = 8;
|
|
2077
|
+
/**
|
|
2078
|
+
* Expand a short lane-id prefix (at least `LANE_ID_PREFIX_MIN` ULID chars,
|
|
2079
|
+
* no host suffix) to the one local lane id it starts. Returns `undefined`
|
|
2080
|
+
* when the input is not such a prefix or matches no local lane, and throws
|
|
2081
|
+
* `lane_id_ambiguous` listing every candidate when it matches more than one.
|
|
2082
|
+
* Lane records, questions, run dirs and envelopes are always keyed by the
|
|
2083
|
+
* full lane id; a prefix is only ever a lookup convenience.
|
|
2084
|
+
*/
|
|
2085
|
+
export function expandLocalLaneIdPrefix(hqRoot, input, deps = defaultStoreDeps()) {
|
|
2086
|
+
if (!new RegExp(`^[0-9A-HJKMNP-TV-Z]{${LANE_ID_PREFIX_MIN},26}$`, "i").test(input))
|
|
2087
|
+
return undefined;
|
|
2088
|
+
const prefix = input.toUpperCase();
|
|
2089
|
+
const matches = listLaneIds(hqRoot, deps).filter((laneId) => laneId.toUpperCase().startsWith(prefix)).sort();
|
|
2090
|
+
if (matches.length > 1) {
|
|
2091
|
+
throw new LanesError("lane_id_ambiguous", `Lane id prefix ${input} matches ${matches.length} lanes: ${matches.join(", ")}. Pass the full lane id.`, { lane_id: input, matches });
|
|
2092
|
+
}
|
|
2093
|
+
return matches[0];
|
|
2094
|
+
}
|
|
2075
2095
|
export function listQuestionIds(hqRoot, deps = defaultStoreDeps()) {
|
|
2076
2096
|
return listRecordIds(path.join(lanesStoreRoot(hqRoot), QUESTION_RECORDS_DIR), "question", deps);
|
|
2077
2097
|
}
|
package/dist/lib/lanes/watch.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { listQuestionIds, readLane, readQuestion, } from "./store.js";
|
|
1
|
+
import { expandLocalLaneIdPrefix, listQuestionIds, readLane, readQuestion, } from "./store.js";
|
|
2
2
|
import { LaneNotFoundError, LanesError } from "./errors.js";
|
|
3
3
|
import { providerSupportsSessionResume } from "./delivery.js";
|
|
4
4
|
import { canResumeDoneKeepAliveLane, hasPendingKeepAliveWork, keepAliveNextCheckAtMs, LEAD_LANE_KEEP_ALIVE_MAX_RESUMES, } from "./keep-alive.js";
|
|
@@ -62,7 +62,9 @@ function canResumeKeepAliveLane(hqRoot, lane, nowMs = Date.now()) {
|
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
64
|
export async function runLaneWatch(hqRoot, laneIds, deps = {}) {
|
|
65
|
-
|
|
65
|
+
// Watch by full lane id: a short prefix expands only when it names exactly
|
|
66
|
+
// one local lane, and an ambiguous prefix is refused with its candidates.
|
|
67
|
+
const watchedIds = [...new Set(validateLaneIds(laneIds).map((laneId) => expandLocalLaneIdPrefix(hqRoot, laneId) ?? laneId))];
|
|
66
68
|
const readLaneRecord = deps.readLane ?? readLane;
|
|
67
69
|
const listQuestions = deps.listQuestionIds ?? listQuestionIds;
|
|
68
70
|
const readQuestionRecord = deps.readQuestion ?? readQuestion;
|
|
@@ -130,7 +132,7 @@ export async function runLaneWatch(hqRoot, laneIds, deps = {}) {
|
|
|
130
132
|
}
|
|
131
133
|
records.push(record);
|
|
132
134
|
if (previousStates.get(laneId) !== record.state) {
|
|
133
|
-
emit(`lane ${
|
|
135
|
+
emit(`lane ${record.lane_id}: state=${record.state}${isTerminalLaneState(record.state) ? " (terminal)" : ""}`);
|
|
134
136
|
previousStates.set(laneId, record.state);
|
|
135
137
|
}
|
|
136
138
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HQ app's Settings > Sync switches on this computer (usage-only-pricing
|
|
3
|
+
* US-016), read from the desktop settings file (`menubar.json` in the HQ state
|
|
4
|
+
* directory):
|
|
5
|
+
*
|
|
6
|
+
* - `cloudPaused: true` turns sync off for every vault;
|
|
7
|
+
* - `personalSyncEnabled: false` turns the personal vault off;
|
|
8
|
+
* - `workspaceSyncEnabled: { "<slug>": false }` turns one company vault off.
|
|
9
|
+
*
|
|
10
|
+
* Dependency-free on purpose (node:fs/os/path only): the `hq daemon` planner
|
|
11
|
+
* reads it every reconcile.
|
|
12
|
+
*
|
|
13
|
+
* A missing file, a missing key, or a value of the wrong type means on, so
|
|
14
|
+
* CLI-only installs and agent boxes keep syncing. A file that exists but
|
|
15
|
+
* cannot be read or parsed also means on, and is reported through
|
|
16
|
+
* `unreadable` so callers can warn instead of turning sync back on silently.
|
|
17
|
+
*/
|
|
18
|
+
export interface VaultSyncSwitches {
|
|
19
|
+
/** "Turn off all cloud sync" is on. */
|
|
20
|
+
allOff: boolean;
|
|
21
|
+
/** The personal vault's switch is off. */
|
|
22
|
+
personalOff: boolean;
|
|
23
|
+
/** Lowercased slugs of company vaults whose switch is off. */
|
|
24
|
+
offCompanies: ReadonlySet<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Set when the settings file exists but could not be read or parsed. Every
|
|
27
|
+
* switch then reads as on; callers should warn.
|
|
28
|
+
*/
|
|
29
|
+
unreadable?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function vaultSyncSettingsPath(home?: string): string;
|
|
32
|
+
/** Read every switch. Never throws. */
|
|
33
|
+
export declare function readVaultSyncSwitches(home?: string): VaultSyncSwitches;
|
|
34
|
+
/** The warning printed when the settings file is unreadable. */
|
|
35
|
+
export declare function unreadableSwitchesWarning(reason: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Environment for an hq-cloud sync runner so it skips off vaults
|
|
38
|
+
* (`HQ_SYNC_SKIP_COMPANIES`, `HQ_SYNC_SKIP_PERSONAL`). Empty when all are on.
|
|
39
|
+
*/
|
|
40
|
+
export declare function vaultSkipEnv(switches: VaultSyncSwitches): Record<string, string>;
|
|
41
|
+
//# sourceMappingURL=vault-sync-switches.d.ts.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HQ app's Settings > Sync switches on this computer (usage-only-pricing
|
|
3
|
+
* US-016), read from the desktop settings file (`menubar.json` in the HQ state
|
|
4
|
+
* directory):
|
|
5
|
+
*
|
|
6
|
+
* - `cloudPaused: true` turns sync off for every vault;
|
|
7
|
+
* - `personalSyncEnabled: false` turns the personal vault off;
|
|
8
|
+
* - `workspaceSyncEnabled: { "<slug>": false }` turns one company vault off.
|
|
9
|
+
*
|
|
10
|
+
* Dependency-free on purpose (node:fs/os/path only): the `hq daemon` planner
|
|
11
|
+
* reads it every reconcile.
|
|
12
|
+
*
|
|
13
|
+
* A missing file, a missing key, or a value of the wrong type means on, so
|
|
14
|
+
* CLI-only installs and agent boxes keep syncing. A file that exists but
|
|
15
|
+
* cannot be read or parsed also means on, and is reported through
|
|
16
|
+
* `unreadable` so callers can warn instead of turning sync back on silently.
|
|
17
|
+
*/
|
|
18
|
+
import * as fs from "node:fs";
|
|
19
|
+
import * as os from "node:os";
|
|
20
|
+
import * as path from "node:path";
|
|
21
|
+
export function vaultSyncSettingsPath(home = os.homedir()) {
|
|
22
|
+
return path.join(home, ".hq", "menubar.json");
|
|
23
|
+
}
|
|
24
|
+
function allOn(unreadable) {
|
|
25
|
+
return {
|
|
26
|
+
allOff: false,
|
|
27
|
+
personalOff: false,
|
|
28
|
+
offCompanies: new Set(),
|
|
29
|
+
...(unreadable ? { unreadable } : {}),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Read every switch. Never throws. */
|
|
33
|
+
export function readVaultSyncSwitches(home = os.homedir()) {
|
|
34
|
+
const file = vaultSyncSettingsPath(home);
|
|
35
|
+
let text;
|
|
36
|
+
try {
|
|
37
|
+
text = fs.readFileSync(file, "utf8");
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
if (err?.code === "ENOENT")
|
|
41
|
+
return allOn();
|
|
42
|
+
return allOn(`could not read ${file}`);
|
|
43
|
+
}
|
|
44
|
+
let raw;
|
|
45
|
+
try {
|
|
46
|
+
raw = JSON.parse(text);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return allOn(`${file} is not valid JSON`);
|
|
50
|
+
}
|
|
51
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
52
|
+
return allOn(`${file} is not a JSON object`);
|
|
53
|
+
}
|
|
54
|
+
const prefs = raw;
|
|
55
|
+
const offCompanies = new Set();
|
|
56
|
+
const map = prefs.workspaceSyncEnabled;
|
|
57
|
+
if (typeof map === "object" && map !== null && !Array.isArray(map)) {
|
|
58
|
+
for (const [slug, enabled] of Object.entries(map)) {
|
|
59
|
+
if (enabled === false && slug.trim())
|
|
60
|
+
offCompanies.add(slug.trim().toLowerCase());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
allOff: prefs.cloudPaused === true,
|
|
65
|
+
personalOff: prefs.personalSyncEnabled === false,
|
|
66
|
+
offCompanies,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/** The warning printed when the settings file is unreadable. */
|
|
70
|
+
export function unreadableSwitchesWarning(reason) {
|
|
71
|
+
return `Warning: ${reason}, so HQ cannot tell which vaults have sync turned off on this computer. Every vault will sync. Fix or remove the file, or set the switches again in HQ Settings > Sync.`;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Environment for an hq-cloud sync runner so it skips off vaults
|
|
75
|
+
* (`HQ_SYNC_SKIP_COMPANIES`, `HQ_SYNC_SKIP_PERSONAL`). Empty when all are on.
|
|
76
|
+
*/
|
|
77
|
+
export function vaultSkipEnv(switches) {
|
|
78
|
+
const env = {};
|
|
79
|
+
if (switches.offCompanies.size > 0) {
|
|
80
|
+
env.HQ_SYNC_SKIP_COMPANIES = [...switches.offCompanies].sort().join(",");
|
|
81
|
+
}
|
|
82
|
+
if (switches.personalOff)
|
|
83
|
+
env.HQ_SYNC_SKIP_PERSONAL = "1";
|
|
84
|
+
return env;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=vault-sync-switches.js.map
|
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.151",
|
|
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.90",
|
|
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.151",
|
|
118
|
+
"@indigoai-us/hq-hook-win32-arm64": "5.345.151",
|
|
119
|
+
"@indigoai-us/hq-hook-darwin-x64": "5.345.151",
|
|
120
|
+
"@indigoai-us/hq-hook-darwin-arm64": "5.345.151",
|
|
121
|
+
"@indigoai-us/hq-hook-linux-x64": "5.345.151",
|
|
122
|
+
"@indigoai-us/hq-hook-linux-arm64": "5.345.151"
|
|
123
123
|
}
|
|
124
124
|
}
|