@indigoai-us/hq-cli 5.345.231 → 5.345.232
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 +31 -0
- package/README.md +3 -2
- package/assets/lanes-reconcile/hq-lanes-reconcile.service +1 -1
- package/assets/scaffold/core/scripts/pipeline-conductor.sh +14 -14
- package/assets/scaffold/core/scripts/pipeline-driver.sh +7 -7
- package/assets/scaffold/core/scripts/session-project.sh +19 -4
- package/dist/command-catalog.generated.d.ts +213 -177
- package/dist/command-catalog.generated.js +263 -212
- package/dist/command-registration-plan.d.ts +6 -24
- package/dist/command-registration-plan.js +4 -8
- package/dist/commands/auth.js +3 -2
- package/dist/commands/core-pipeline-conductor-command.js +1 -1
- package/dist/commands/core-pipeline-conductor-native.js +5 -5
- package/dist/commands/core-pipeline-driver-native.js +5 -5
- package/dist/commands/daemon.js +7 -36
- package/dist/commands/deploy-access.js +6 -13
- package/dist/commands/deploy-comments.js +5 -13
- package/dist/commands/deploy-domains.js +6 -13
- package/dist/commands/deploy-list.js +25 -11
- package/dist/commands/deploy-mutations.d.ts +3 -0
- package/dist/commands/deploy-mutations.js +147 -0
- package/dist/commands/link.js +29 -0
- package/dist/commands/mesh.js +3 -1
- package/dist/commands/report.js +8 -9
- package/dist/data/command-states.json +10 -7
- package/dist/lib/bot/fleet-bots-update-pass.d.ts +8 -0
- package/dist/lib/bot/fleet-bots-update-pass.js +40 -0
- package/dist/lib/bot/fleet-bots-update-task.d.ts +12 -0
- package/dist/lib/bot/fleet-bots-update-task.js +52 -0
- package/dist/lib/bot/fleet-bots-update-worker-v1.d.ts +2 -0
- package/dist/lib/bot/fleet-bots-update-worker-v1.js +5 -0
- package/dist/lib/daemon/catalog.d.ts +8 -5
- package/dist/lib/daemon/catalog.js +15 -8
- package/dist/lib/daemon/lock.js +33 -37
- package/dist/lib/daemon/ops/skill-command.d.ts +99 -0
- package/dist/lib/daemon/ops/skill-command.js +260 -0
- package/dist/lib/daemon/protocol.d.ts +1 -1
- package/dist/lib/daemon/protocol.js +1 -0
- package/dist/lib/daemon/run.js +10 -18
- package/dist/lib/daemon/server.js +7 -0
- package/dist/lib/daemon/supervisor.d.ts +5 -0
- package/dist/lib/daemon/supervisor.js +17 -2
- package/dist/lib/db/app-ref.js +10 -15
- package/dist/lib/deploy-apps.d.ts +29 -0
- package/dist/lib/deploy-apps.js +37 -0
- package/dist/lib/doctor/checks/search-index.d.ts +16 -0
- package/dist/lib/doctor/checks/search-index.js +61 -0
- package/dist/lib/doctor/checks/stranded-lanes.js +1 -1
- package/dist/lib/doctor/registry.js +4 -0
- package/dist/lib/lanes/accounts.js +3 -3
- package/dist/lib/lanes/admission-host.js +1 -1
- package/dist/lib/lanes/admission.js +4 -4
- package/dist/lib/lanes/autopilot.js +2 -2
- package/dist/lib/lanes/blocker-freshness.js +1 -1
- package/dist/lib/lanes/compaction.js +5 -5
- package/dist/lib/lanes/delivery.js +1 -1
- package/dist/lib/lanes/depth-cap.js +1 -1
- package/dist/lib/lanes/disk-guard.js +1 -1
- package/dist/lib/lanes/dropbox.js +1 -1
- package/dist/lib/lanes/hooks-install.js +1 -1
- package/dist/lib/lanes/imported-question.js +1 -1
- package/dist/lib/lanes/keep-alive.d.ts +2 -2
- package/dist/lib/lanes/keep-alive.js +3 -3
- package/dist/lib/lanes/kr-freshness.js +1 -1
- package/dist/lib/lanes/links.js +4 -4
- package/dist/lib/lanes/loop.js +2 -2
- package/dist/lib/lanes/machine-identity.js +3 -3
- package/dist/lib/lanes/models.js +6 -6
- package/dist/lib/lanes/quota.js +1 -1
- package/dist/lib/lanes/reconcile-install.js +3 -3
- package/dist/lib/lanes/reconcile.js +16 -16
- package/dist/lib/lanes/remote-control-lane.js +6 -6
- package/dist/lib/lanes/reviews.js +2 -2
- package/dist/lib/lanes/spawn.js +24 -24
- package/dist/lib/lanes/status-fields.js +4 -4
- package/dist/lib/lanes/wait.js +4 -4
- package/dist/lib/lanes/watch.js +2 -2
- package/dist/lib/lanes/watcher-main.js +1 -1
- package/dist/lib/lanes/watcher.js +38 -38
- package/dist/lib/lanes/worker-process.js +5 -5
- package/dist/lib/mesh/live/daemon/pid-lock.d.ts +2 -4
- package/dist/lib/mesh/live/daemon/pid-lock.js +38 -55
- package/dist/utils/exclusive-lock.d.ts +60 -0
- package/dist/utils/exclusive-lock.js +65 -0
- package/package.json +8 -7
- package/dist/commands/staff/listings.d.ts +0 -41
- package/dist/commands/staff/listings.js +0 -160
- package/dist/commands/staff/reset-test-account.d.ts +0 -121
- package/dist/commands/staff/reset-test-account.js +0 -285
- package/dist/commands/staff/test-account.d.ts +0 -51
- package/dist/commands/staff/test-account.js +0 -196
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skill.command op (hq-core-rust US-049, 40-skill-command-script, ANSWERS-1645 option (c)).
|
|
3
|
+
*
|
|
4
|
+
* hq-hook starts no program on UserPromptSubmit, so when the native
|
|
5
|
+
* classifier (`crates/hq-hook/src/skill_command_script.rs`) finds that the
|
|
6
|
+
* released hook would run a skill's `command.sh`, the hook asks hqd to do it
|
|
7
|
+
* over the socket and waits a bounded time for the answer.
|
|
8
|
+
*
|
|
9
|
+
* For exact parity hqd runs the released hook itself, byte-checked against
|
|
10
|
+
* the pinned copy (hq-core-staging v16.0.48-beta.124, b1e484afe): the hook
|
|
11
|
+
* and the `hook-lib.sh` it sources must hash to the pinned sha256 values,
|
|
12
|
+
* and so must `session-scope-capability.sh` and `perl-child-locale.sh`
|
|
13
|
+
* when present (the hook sources them only then), or the op refuses. The hook gets the caller's payload on stdin and the
|
|
14
|
+
* caller's cwd. Its stdout (one `{"systemMessage":...}` line, or nothing) is
|
|
15
|
+
* returned as is.
|
|
16
|
+
*
|
|
17
|
+
* hqd builds the hook's environment itself (`childEnv`; Reviewer O2,
|
|
18
|
+
* ANSWERS-1736): only the hook's own settings and a few plain locale and
|
|
19
|
+
* user variables are taken from the request, PATH is hqd's own, HQ_ROOT is
|
|
20
|
+
* the root hqd verified, and BASH_ENV, ENV, BASH_FUNC_*, SHELLOPTS, BASHOPTS
|
|
21
|
+
* and CDPATH are never set. A request that carries any of these, or a
|
|
22
|
+
* hostile PATH or HQ_ROOT, has them ignored, so a caller cannot make the
|
|
23
|
+
* pinned hook source or run anything else.
|
|
24
|
+
*
|
|
25
|
+
* The op refuses (never answers "nothing") when it cannot run the hook as
|
|
26
|
+
* released: a root that is not hqd's own, a hook or library that differs
|
|
27
|
+
* from the pinned bytes, bash missing, or the hook still running at the
|
|
28
|
+
* request deadline (it is killed then).
|
|
29
|
+
*/
|
|
30
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
31
|
+
import { createHash } from "node:crypto";
|
|
32
|
+
import * as fs from "node:fs";
|
|
33
|
+
import * as path from "node:path";
|
|
34
|
+
/** The hook, relative to the HQ root. */
|
|
35
|
+
export const SKILL_COMMAND_HOOK = "core/hooks/UserPromptSubmit/40-skill-command-script.sh";
|
|
36
|
+
/** The library the hook sources, relative to the HQ root. */
|
|
37
|
+
export const SKILL_COMMAND_LIB = "core/scripts/hook-lib.sh";
|
|
38
|
+
/** sha256 of the pinned hook (same value as `skill_command_script::HOOK_SHA256`). */
|
|
39
|
+
export const SKILL_COMMAND_HOOK_SHA256 = "e6ddbaf1fe8f996fa0ade56cc89c3634782db49ab90becff3380bcb0ef6c5c3c";
|
|
40
|
+
/** sha256 of the pinned `hook-lib.sh` (same value as `skill_command_script::LIB_SHA256`). */
|
|
41
|
+
export const SKILL_COMMAND_LIB_SHA256 = "9133295e5ce523bf8355a093bbea5a1c19682ec42b59ab6b626dffbc33544f3f";
|
|
42
|
+
/**
|
|
43
|
+
* The libraries the hook sources only when they are present (ANSWERS-1817
|
|
44
|
+
* Q-SCS8 (b)): absent is the released behaviour; present, they must be the
|
|
45
|
+
* pinned bytes (same values as `skill_command_script::SCOPE_LIB_SHA256` and
|
|
46
|
+
* `PERL_LOCALE_LIB_SHA256`).
|
|
47
|
+
*/
|
|
48
|
+
export const SKILL_COMMAND_OPTIONAL_LIBS = [
|
|
49
|
+
{ rel: "core/scripts/lib/session-scope-capability.sh", sha256: "388ffef43cfe05810c38ce377245d0d86f415b4009b21a008bca8897be0c9ead" },
|
|
50
|
+
{ rel: "core/scripts/lib/perl-child-locale.sh", sha256: "18e6b9d0e22874eea00ecc868b4dcfebbc3bb42434d8d0c81b20baec1194df2e" },
|
|
51
|
+
];
|
|
52
|
+
/** The hook's stdout is a capped message; anything larger is not the released hook's answer. */
|
|
53
|
+
const STDOUT_MAX_BYTES = 256 * 1024;
|
|
54
|
+
export class SkillCommandOpError extends Error {
|
|
55
|
+
code;
|
|
56
|
+
constructor(code, message) {
|
|
57
|
+
super(message);
|
|
58
|
+
this.code = code;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The only variables taken from the request: the released hook's own
|
|
63
|
+
* settings (its header's Env list and the master-hook exports it reads), and
|
|
64
|
+
* plain user and locale variables a skill's command.sh may print with.
|
|
65
|
+
* Nothing here names a program, a file to source or a search path.
|
|
66
|
+
*/
|
|
67
|
+
export const CHILD_ENV_FROM_REQUEST = [
|
|
68
|
+
"HQ_SKILL_COMMAND_SCRIPTS",
|
|
69
|
+
"HQ_DISABLED_HOOKS",
|
|
70
|
+
"HQ_SKILL_COMMAND_FILE",
|
|
71
|
+
"HQ_SKILL_COMMAND_TIMEOUT",
|
|
72
|
+
"HQ_SKILL_COMMAND_MAX_BYTES",
|
|
73
|
+
"HQ_HOOK_EVENT",
|
|
74
|
+
"HQ_HOOK_SESSION_ID",
|
|
75
|
+
"HQ_HOOK_AGENT_ID",
|
|
76
|
+
"HOME",
|
|
77
|
+
"USER",
|
|
78
|
+
"LOGNAME",
|
|
79
|
+
"LANG",
|
|
80
|
+
"LANGUAGE",
|
|
81
|
+
"LC_ALL",
|
|
82
|
+
"LC_CTYPE",
|
|
83
|
+
"LC_COLLATE",
|
|
84
|
+
"LC_MESSAGES",
|
|
85
|
+
"LC_NUMERIC",
|
|
86
|
+
"LC_TIME",
|
|
87
|
+
"LC_MONETARY",
|
|
88
|
+
"TZ",
|
|
89
|
+
"TERM",
|
|
90
|
+
"TMPDIR",
|
|
91
|
+
];
|
|
92
|
+
/** Never set in the hook's environment, whatever the request holds. */
|
|
93
|
+
export const CHILD_ENV_NEVER = ["BASH_ENV", "ENV", "SHELLOPTS", "BASHOPTS", "CDPATH"];
|
|
94
|
+
/**
|
|
95
|
+
* The hook's environment, built by hqd: `CHILD_ENV_FROM_REQUEST` from the
|
|
96
|
+
* request, PATH from hqd's own environment, HQ_ROOT the verified root.
|
|
97
|
+
*/
|
|
98
|
+
export function childEnv(requested, verifiedRoot, ownPath) {
|
|
99
|
+
const env = {};
|
|
100
|
+
for (const name of CHILD_ENV_FROM_REQUEST) {
|
|
101
|
+
const value = requested[name];
|
|
102
|
+
if (typeof value === "string")
|
|
103
|
+
env[name] = value;
|
|
104
|
+
}
|
|
105
|
+
if (ownPath !== undefined)
|
|
106
|
+
env.PATH = ownPath;
|
|
107
|
+
env.HQ_ROOT = verifiedRoot;
|
|
108
|
+
for (const name of Object.keys(env)) {
|
|
109
|
+
if (CHILD_ENV_NEVER.includes(name) || name.startsWith("BASH_FUNC_"))
|
|
110
|
+
delete env[name];
|
|
111
|
+
}
|
|
112
|
+
return env;
|
|
113
|
+
}
|
|
114
|
+
function sha256File(file) {
|
|
115
|
+
try {
|
|
116
|
+
return createHash("sha256").update(fs.readFileSync(file)).digest("hex");
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function realDir(dir) {
|
|
123
|
+
try {
|
|
124
|
+
return fs.realpathSync(dir);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Kill the hook and everything it started. The released hook runs
|
|
132
|
+
* `command.sh` under coreutils `timeout`, which moves itself into its own
|
|
133
|
+
* process group, so killing the hook's group alone would leave the script
|
|
134
|
+
* running: every descendant is found from the process table and killed.
|
|
135
|
+
*/
|
|
136
|
+
export function killTree(pid) {
|
|
137
|
+
if (!pid)
|
|
138
|
+
return;
|
|
139
|
+
if (process.platform === "win32") {
|
|
140
|
+
spawnSync("taskkill", ["/T", "/F", "/PID", String(pid)], { stdio: "ignore", windowsHide: true });
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const parents = new Map();
|
|
144
|
+
const table = spawnSync("ps", ["-A", "-o", "pid=", "-o", "ppid="], { encoding: "utf8" });
|
|
145
|
+
for (const line of (table.stdout ?? "").split("\n")) {
|
|
146
|
+
const [p, pp] = line.trim().split(/\s+/).map(Number);
|
|
147
|
+
if (!Number.isInteger(p) || !Number.isInteger(pp))
|
|
148
|
+
continue;
|
|
149
|
+
parents.set(pp, [...(parents.get(pp) ?? []), p]);
|
|
150
|
+
}
|
|
151
|
+
const all = [];
|
|
152
|
+
const queue = [pid];
|
|
153
|
+
while (queue.length) {
|
|
154
|
+
const next = queue.shift();
|
|
155
|
+
if (all.includes(next))
|
|
156
|
+
continue;
|
|
157
|
+
all.push(next);
|
|
158
|
+
queue.push(...(parents.get(next) ?? []));
|
|
159
|
+
}
|
|
160
|
+
for (const target of all) {
|
|
161
|
+
for (const id of [-target, target]) {
|
|
162
|
+
try {
|
|
163
|
+
process.kill(id, "SIGKILL");
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
/* not a group leader, or already gone */
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/** Parse and check the op's arguments. Never trusts a path but the root, which must be hqd's own. */
|
|
172
|
+
export function parseSkillCommandArgs(args) {
|
|
173
|
+
const { hqRoot, input, env, cwd } = args;
|
|
174
|
+
if (typeof hqRoot !== "string" || !hqRoot)
|
|
175
|
+
throw new SkillCommandOpError("bad_args", "hqRoot must be a non-empty string");
|
|
176
|
+
if (typeof input !== "string")
|
|
177
|
+
throw new SkillCommandOpError("bad_args", "input must be a string");
|
|
178
|
+
if (typeof cwd !== "string" || !cwd)
|
|
179
|
+
throw new SkillCommandOpError("bad_args", "cwd must be a non-empty string");
|
|
180
|
+
if (!env || typeof env !== "object" || Array.isArray(env))
|
|
181
|
+
throw new SkillCommandOpError("bad_args", "env must be an object");
|
|
182
|
+
const plain = {};
|
|
183
|
+
for (const [key, value] of Object.entries(env)) {
|
|
184
|
+
if (typeof value !== "string")
|
|
185
|
+
throw new SkillCommandOpError("bad_args", `env.${key} must be a string`);
|
|
186
|
+
plain[key] = value;
|
|
187
|
+
}
|
|
188
|
+
return { hqRoot, input, env: plain, cwd };
|
|
189
|
+
}
|
|
190
|
+
/** Run the pinned hook for one prompt. */
|
|
191
|
+
export function runSkillCommand(req, deps) {
|
|
192
|
+
const now = deps.now ?? Date.now;
|
|
193
|
+
const root = realDir(req.hqRoot);
|
|
194
|
+
const daemonRoot = realDir(deps.daemonRoot);
|
|
195
|
+
if (!root || !daemonRoot || root !== daemonRoot) {
|
|
196
|
+
return Promise.reject(new SkillCommandOpError("root_mismatch", "skill.command runs only in hqd's own HQ root"));
|
|
197
|
+
}
|
|
198
|
+
const hook = path.join(root, SKILL_COMMAND_HOOK);
|
|
199
|
+
if (sha256File(hook) !== SKILL_COMMAND_HOOK_SHA256 || sha256File(path.join(root, SKILL_COMMAND_LIB)) !== SKILL_COMMAND_LIB_SHA256) {
|
|
200
|
+
return Promise.reject(new SkillCommandOpError("hook_not_pinned", `${SKILL_COMMAND_HOOK} or ${SKILL_COMMAND_LIB} is not the pinned release (hq-core-staging v16.0.48-beta.124)`));
|
|
201
|
+
}
|
|
202
|
+
for (const lib of SKILL_COMMAND_OPTIONAL_LIBS) {
|
|
203
|
+
const file = path.join(root, lib.rel);
|
|
204
|
+
if (fs.existsSync(file) && sha256File(file) !== lib.sha256) {
|
|
205
|
+
return Promise.reject(new SkillCommandOpError("hook_not_pinned", `${lib.rel} is not the pinned release (hq-core-staging v16.0.48-beta.124)`));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
const remainingMs = Math.floor(deps.deadlineMs - now());
|
|
209
|
+
if (remainingMs <= 0) {
|
|
210
|
+
return Promise.reject(new SkillCommandOpError("timeout", "skill.command reached its deadline before the hook started"));
|
|
211
|
+
}
|
|
212
|
+
return new Promise((resolve, reject) => {
|
|
213
|
+
let settled = false;
|
|
214
|
+
const settle = (fn) => {
|
|
215
|
+
if (settled)
|
|
216
|
+
return;
|
|
217
|
+
settled = true;
|
|
218
|
+
clearTimeout(timer);
|
|
219
|
+
fn();
|
|
220
|
+
};
|
|
221
|
+
const child = spawn(deps.bash ?? "bash", [hook], {
|
|
222
|
+
cwd: req.cwd,
|
|
223
|
+
env: childEnv(req.env, root, process.env.PATH),
|
|
224
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
225
|
+
detached: process.platform !== "win32",
|
|
226
|
+
});
|
|
227
|
+
const kill = () => killTree(child.pid);
|
|
228
|
+
const timer = setTimeout(() => {
|
|
229
|
+
kill();
|
|
230
|
+
settle(() => reject(new SkillCommandOpError("timeout", `the skill command hook did not finish within ${remainingMs}ms`)));
|
|
231
|
+
}, remainingMs);
|
|
232
|
+
const chunks = [];
|
|
233
|
+
let size = 0;
|
|
234
|
+
child.stdout.on("data", (chunk) => {
|
|
235
|
+
size += chunk.length;
|
|
236
|
+
if (size > STDOUT_MAX_BYTES) {
|
|
237
|
+
kill();
|
|
238
|
+
settle(() => reject(new SkillCommandOpError("too_large", "the skill command hook wrote more than the released hook can")));
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
chunks.push(chunk);
|
|
242
|
+
});
|
|
243
|
+
child.on("error", (err) => settle(() => reject(new SkillCommandOpError("spawn_failed", `bash could not start: ${err.message}`))));
|
|
244
|
+
child.on("close", (code, signal) => {
|
|
245
|
+
settle(() => {
|
|
246
|
+
// The released hook always exits 0; anything else is not its answer.
|
|
247
|
+
if (code !== 0) {
|
|
248
|
+
reject(new SkillCommandOpError("hook_failed", `the skill command hook ended with ${signal ?? `exit ${code}`}`));
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
resolve({ stdout: Buffer.concat(chunks).toString("utf8") });
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
child.stdin.on("error", () => {
|
|
255
|
+
/* the hook may exit before reading all of stdin */
|
|
256
|
+
});
|
|
257
|
+
child.stdin.end(req.input);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=skill-command.js.map
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* out of order, so clients match them by `id`.
|
|
8
8
|
*/
|
|
9
9
|
export declare const HQD_SOCKET_NAME = "hqd.sock";
|
|
10
|
-
export declare const HQD_OPS: readonly ["ping", "health", "resolve", "session.open", "session.close", "policy.check", "journal.append", "mcp.call", "auth.login", "auth.status"];
|
|
10
|
+
export declare const HQD_OPS: readonly ["ping", "health", "resolve", "session.open", "session.close", "policy.check", "journal.append", "mcp.call", "auth.login", "auth.status", "skill.command"];
|
|
11
11
|
export type HqdOp = (typeof HQD_OPS)[number];
|
|
12
12
|
export type HqdHealthFallbackReason = "registry_unavailable" | "manifest_missing_or_malformed" | "company_not_in_manifest" | "no_match";
|
|
13
13
|
export interface HqdHealthResult {
|
package/dist/lib/daemon/run.js
CHANGED
|
@@ -24,7 +24,7 @@ import { agentKitPaths } from "../agent-kit/paths.js";
|
|
|
24
24
|
import { HQ_FLEET_RUNTIME_ENGINE_ID, readBotConfig } from "../bot/config.js";
|
|
25
25
|
import { clearStaleReadyBeforeGatewayStart, planFleetBots } from "../bot/fleet-daemon.js";
|
|
26
26
|
import { botsRoot } from "../bot/paths.js";
|
|
27
|
-
import { CLAUDE_RUNNER_SCRIPT, CODEX_RUNNER_SCRIPT, enabledServices,
|
|
27
|
+
import { CLAUDE_RUNNER_SCRIPT, CODEX_RUNNER_SCRIPT, enabledServices, planUnits, SEARCH_INDEX_WORKER_UNAVAILABLE } from "./catalog.js";
|
|
28
28
|
import { effectiveSyncOwner, readDaemonConfig } from "./config.js";
|
|
29
29
|
import { backgroundQosCommand } from "./background-qos.js";
|
|
30
30
|
import { serveQmdWorker } from "../search-index/worker-process.js";
|
|
@@ -1518,8 +1518,10 @@ export async function runDaemon(opts) {
|
|
|
1518
1518
|
daemonSyncRunnerPids,
|
|
1519
1519
|
lanesReconcileInProcess: Boolean(laneReconcileWatcher && laneReconcileWatcherRoot === hqRoot),
|
|
1520
1520
|
// The first plan runs under the daemon startup lease. If it cannot be
|
|
1521
|
-
// released,
|
|
1522
|
-
|
|
1521
|
+
// released, or a rollback left an install without the worker, the plan
|
|
1522
|
+
// marks search-index unavailable; the timer never starts `hq index sync`.
|
|
1523
|
+
searchIndexWorkerAvailable: (startupPlanOpen || !cliPackagePrefix || packageUseLeaseReleased)
|
|
1524
|
+
&& (!cliPackagePrefix || fs.existsSync(searchIndexWorkerEntry)),
|
|
1523
1525
|
searchIndexOwnedBySyncRunner: searchIndexRunnerOwnsIndexFlag.status().enabled &&
|
|
1524
1526
|
hqCloud !== null && !hqCloudVersionOlder(hqCloud.version, "6.18.75") &&
|
|
1525
1527
|
syncOwner === "daemon" && services.includes("sync") && !config.syncPaused &&
|
|
@@ -1577,17 +1579,16 @@ export async function runDaemon(opts) {
|
|
|
1577
1579
|
return { skipped: true, on: events.on.bind(events), kill: () => false };
|
|
1578
1580
|
}
|
|
1579
1581
|
const controller = new AbortController();
|
|
1580
|
-
|
|
1581
|
-
const stop = (signal = "SIGTERM") => {
|
|
1582
|
+
const stop = () => {
|
|
1582
1583
|
controller.abort();
|
|
1583
|
-
return
|
|
1584
|
+
return true;
|
|
1584
1585
|
};
|
|
1585
|
-
let needsFallback = false;
|
|
1586
1586
|
const done = withSearchIndexPackageLease(packageUseLeaseReleased ? cliPackagePrefix : null, () => {
|
|
1587
1587
|
// A running daemon can survive a rollback to a package without v1.
|
|
1588
|
+
// It fails the pass and starts nothing; the next plan marks the unit
|
|
1589
|
+
// unavailable with the reason `hq daemon status` and `hq doctor` show.
|
|
1588
1590
|
if (cliPackagePrefix && !fs.existsSync(searchIndexWorkerEntry)) {
|
|
1589
|
-
|
|
1590
|
-
return Promise.resolve(true);
|
|
1591
|
+
return Promise.reject(new Error(SEARCH_INDEX_WORKER_UNAVAILABLE));
|
|
1591
1592
|
}
|
|
1592
1593
|
return runSearchIndexWorker({
|
|
1593
1594
|
root,
|
|
@@ -1597,15 +1598,6 @@ export async function runDaemon(opts) {
|
|
|
1597
1598
|
signal: controller.signal,
|
|
1598
1599
|
});
|
|
1599
1600
|
}, acquirePackageUseLease, stop).then((ok) => {
|
|
1600
|
-
if (!needsFallback || controller.signal.aborted)
|
|
1601
|
-
return ok;
|
|
1602
|
-
// The compatibility child acquires its own lease during bootstrap.
|
|
1603
|
-
return new Promise((resolve, reject) => {
|
|
1604
|
-
fallback = spawnUnit({ ...unit, command: legacySearchIndexCommand(root) });
|
|
1605
|
-
fallback.on("exit", (code) => resolve(code === 0));
|
|
1606
|
-
fallback.on("error", reject);
|
|
1607
|
-
});
|
|
1608
|
-
}).then((ok) => {
|
|
1609
1601
|
if (activeIndexWorker?.stop === stop)
|
|
1610
1602
|
activeIndexWorker = undefined;
|
|
1611
1603
|
if (controller.signal.aborted)
|
|
@@ -18,6 +18,7 @@ import { createLineSplitter, encodeMessage, HQD_DEFAULT_REQUEST_TIMEOUT_MS, HQD_
|
|
|
18
18
|
import { SessionRegistry } from "./session-registry.js";
|
|
19
19
|
import { sessionMetaCompanies } from "../core-utils/session-company.js";
|
|
20
20
|
import { journalAppend, JournalOpError } from "./ops/journal.js";
|
|
21
|
+
import { parseSkillCommandArgs, runSkillCommand, SkillCommandOpError } from "./ops/skill-command.js";
|
|
21
22
|
import { PolicyIndex, PolicyOpError, policyCheck } from "./ops/policy.js";
|
|
22
23
|
import { defaultMcpToken, HqMcpBridge, jsonResult, McpOpError, runWorker } from "./ops/mcp.js";
|
|
23
24
|
import { authenticateMachineCredentials, machineTokenExpiresAt, MachineLoginError, parseStdinMachineCredentials } from "./machine-login.js";
|
|
@@ -555,6 +556,11 @@ export async function startHqdServer(opts) {
|
|
|
555
556
|
throw new OpError("bad_args", "company is required (or a cwd linked to a company)");
|
|
556
557
|
return journalAppend({ company, project: stringArg(args, "project"), section: stringArg(args, "section"), text: stringArg(args, "text") }, requireRoot(), clock());
|
|
557
558
|
}
|
|
559
|
+
case "skill.command":
|
|
560
|
+
return runSkillCommand(parseSkillCommandArgs(args), {
|
|
561
|
+
daemonRoot: requireRoot(),
|
|
562
|
+
deadlineMs: requestStartedAt + HQD_DEFAULT_REQUEST_TIMEOUT_MS,
|
|
563
|
+
});
|
|
558
564
|
case "mcp.call": {
|
|
559
565
|
const name = stringArg(args, "name");
|
|
560
566
|
const raw = args.arguments ?? {};
|
|
@@ -679,6 +685,7 @@ export async function startHqdServer(opts) {
|
|
|
679
685
|
const error = err instanceof OpError ||
|
|
680
686
|
err instanceof PolicyOpError ||
|
|
681
687
|
err instanceof JournalOpError ||
|
|
688
|
+
err instanceof SkillCommandOpError ||
|
|
682
689
|
err instanceof McpOpError ||
|
|
683
690
|
err instanceof MachineLoginError
|
|
684
691
|
? { code: err.code, message: err.message }
|
|
@@ -188,6 +188,11 @@ export interface SupervisorDeps {
|
|
|
188
188
|
plan: () => UnitPlan[];
|
|
189
189
|
spawn: (unit: UnitPlan) => SupervisedChild;
|
|
190
190
|
runInternal: (task: string) => Promise<boolean>;
|
|
191
|
+
/** The fleet-bots-update internal task; defaults to one pass on a worker thread (tests replace it). */
|
|
192
|
+
runFleetBotsUpdate?: (options: {
|
|
193
|
+
env: NodeJS.ProcessEnv;
|
|
194
|
+
log: (line: string) => void;
|
|
195
|
+
}) => Promise<boolean>;
|
|
191
196
|
takeRequests: () => ControlRequest[];
|
|
192
197
|
/** Restart the whole daemon process (a `restart-daemon` request). */
|
|
193
198
|
restartDaemon?: () => void | boolean | Promise<boolean | void>;
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
import { createHash } from "node:crypto";
|
|
31
31
|
import { StringDecoder } from "node:string_decoder";
|
|
32
32
|
import { classifyExit } from "./exit-cause.js";
|
|
33
|
+
import { runFleetBotsUpdateWorker } from "../bot/fleet-bots-update-task.js";
|
|
33
34
|
import { SYNC_RUNNER_LEASE_CONFLICT_EXIT, SYNC_RUNNER_LEASE_RETRY_MS, parseSyncRunnerProtocolLine, syncPassResult, } from "./sync-runner.js";
|
|
34
35
|
const BACKOFF_BASE_MS = 1_000;
|
|
35
36
|
const BACKOFF_MAX_MS = 60_000;
|
|
@@ -1125,8 +1126,22 @@ export function createSupervisor(deps) {
|
|
|
1125
1126
|
const command = slot.plan.command;
|
|
1126
1127
|
if (command?.type === "internal") {
|
|
1127
1128
|
slot.state.status = "running";
|
|
1128
|
-
|
|
1129
|
-
|
|
1129
|
+
// A thrown error, a rejection or a crash of the fleet update's worker
|
|
1130
|
+
// thread ends only this run; other units keep their schedule.
|
|
1131
|
+
let run;
|
|
1132
|
+
try {
|
|
1133
|
+
run =
|
|
1134
|
+
command.task === "fleet-bots-update"
|
|
1135
|
+
? (deps.runFleetBotsUpdate ?? runFleetBotsUpdateWorker)({
|
|
1136
|
+
env: { ...process.env, ...slot.plan.env },
|
|
1137
|
+
log: (line) => deps.log("info", `${slot.plan.id}: ${line}`),
|
|
1138
|
+
})
|
|
1139
|
+
: deps.runInternal(command.task);
|
|
1140
|
+
}
|
|
1141
|
+
catch (err) {
|
|
1142
|
+
run = Promise.reject(err);
|
|
1143
|
+
}
|
|
1144
|
+
run
|
|
1130
1145
|
.then((ok) => {
|
|
1131
1146
|
slot.state.lastResult = ok ? "ok" : "failed";
|
|
1132
1147
|
}, (err) => {
|
package/dist/lib/db/app-ref.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* searched, so a name never resolves to another company's app.
|
|
5
5
|
*/
|
|
6
6
|
import { deployApiRequest } from "../deploy-api.js";
|
|
7
|
-
import {
|
|
7
|
+
import { findDeployApp, matchDeployApp } from "../deploy-apps.js";
|
|
8
8
|
export class AppRefError extends Error {
|
|
9
9
|
constructor(message) {
|
|
10
10
|
super(message);
|
|
@@ -13,17 +13,13 @@ export class AppRefError extends Error {
|
|
|
13
13
|
}
|
|
14
14
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
15
15
|
export function matchAppRef(apps, ref) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (byName.length === 1)
|
|
24
|
-
return byName[0];
|
|
25
|
-
if (byName.length > 1) {
|
|
26
|
-
throw new AppRefError(`More than one app in this company is called "${ref}" (${byName.join(", ")}). Use the app id.`);
|
|
16
|
+
return appRefId(matchDeployApp(apps, ref), ref);
|
|
17
|
+
}
|
|
18
|
+
function appRefId(match, ref) {
|
|
19
|
+
if (match.kind === "found")
|
|
20
|
+
return match.id;
|
|
21
|
+
if (match.kind === "many") {
|
|
22
|
+
throw new AppRefError(`More than one app in this company is called "${ref}" (${match.ids.join(", ")}). Use the app id.`);
|
|
27
23
|
}
|
|
28
24
|
throw new AppRefError(`No app called "${ref}" was found in this company.`);
|
|
29
25
|
}
|
|
@@ -32,14 +28,13 @@ export async function resolveAppRef(input, request = deployApiRequest) {
|
|
|
32
28
|
if (UUID_RE.test(ref))
|
|
33
29
|
return ref;
|
|
34
30
|
const headers = { "X-Org-Slug": input.companySlug };
|
|
35
|
-
const
|
|
36
|
-
const route = cursor ? `/api/apps?cursor=${encodeURIComponent(cursor)}` : "/api/apps";
|
|
31
|
+
const match = await findDeployApp(ref, async (route) => {
|
|
37
32
|
const res = await request(input.token, route, "GET", undefined, headers);
|
|
38
33
|
if (!res.ok) {
|
|
39
34
|
throw new AppRefError(`Could not look up the app "${ref}" (hq-deploy returned ${res.status}). Use the app id.`);
|
|
40
35
|
}
|
|
41
36
|
return (await res.json());
|
|
42
37
|
});
|
|
43
|
-
return
|
|
38
|
+
return appRefId(match, ref);
|
|
44
39
|
}
|
|
45
40
|
//# sourceMappingURL=app-ref.js.map
|
|
@@ -10,4 +10,33 @@ export interface DeployAppsPage<T> {
|
|
|
10
10
|
* bad cursor response from creating an unbounded CLI request loop.
|
|
11
11
|
*/
|
|
12
12
|
export declare function listDeployApps<T>(fetchPage: (cursor?: string) => Promise<DeployAppsPage<T>>): Promise<T[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Every app in the caller's scope. `getPage` sends GET for the given route with
|
|
15
|
+
* the caller's own headers and error handling, and returns the parsed body.
|
|
16
|
+
*/
|
|
17
|
+
export declare function listAllDeployApps<T = unknown>(getPage: (route: string) => Promise<DeployAppsPage<T>>): Promise<T[]>;
|
|
18
|
+
export type DeployAppMatch = {
|
|
19
|
+
kind: "found";
|
|
20
|
+
id: string;
|
|
21
|
+
record: Record<string, unknown>;
|
|
22
|
+
} | {
|
|
23
|
+
kind: "none";
|
|
24
|
+
} | {
|
|
25
|
+
kind: "many";
|
|
26
|
+
ids: string[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The one rule the CLI uses to turn an app id, subdomain or name into an app:
|
|
30
|
+
* equal to the row's id, subdomain or name, ignoring case. A value that fits
|
|
31
|
+
* more than one app is refused (the caller asks for the app id).
|
|
32
|
+
*
|
|
33
|
+
* `exact` is for write paths that reuse an app by its own slug (report
|
|
34
|
+
* publishing): only a subdomain or name equal to the value, case included,
|
|
35
|
+
* fits; the id never does.
|
|
36
|
+
*/
|
|
37
|
+
export declare function matchDeployApp(apps: readonly unknown[], ref: string, options?: {
|
|
38
|
+
exact?: boolean;
|
|
39
|
+
}): DeployAppMatch;
|
|
40
|
+
/** List the caller's apps and match `ref` against them (see matchDeployApp). */
|
|
41
|
+
export declare function findDeployApp(ref: string, getPage: (route: string) => Promise<DeployAppsPage<unknown>>): Promise<DeployAppMatch>;
|
|
13
42
|
//# sourceMappingURL=deploy-apps.d.ts.map
|
package/dist/lib/deploy-apps.js
CHANGED
|
@@ -26,4 +26,41 @@ export async function listDeployApps(fetchPage) {
|
|
|
26
26
|
}
|
|
27
27
|
throw new Error(`hq-deploy apps list exceeded the ${MAX_DEPLOY_APPS_PAGES}-page safety cap.`);
|
|
28
28
|
}
|
|
29
|
+
/** The route for one page of GET /api/apps. */
|
|
30
|
+
function appsRoute(cursor) {
|
|
31
|
+
return cursor ? `/api/apps?cursor=${encodeURIComponent(cursor)}` : "/api/apps";
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Every app in the caller's scope. `getPage` sends GET for the given route with
|
|
35
|
+
* the caller's own headers and error handling, and returns the parsed body.
|
|
36
|
+
*/
|
|
37
|
+
export function listAllDeployApps(getPage) {
|
|
38
|
+
return listDeployApps((cursor) => getPage(appsRoute(cursor)));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The one rule the CLI uses to turn an app id, subdomain or name into an app:
|
|
42
|
+
* equal to the row's id, subdomain or name, ignoring case. A value that fits
|
|
43
|
+
* more than one app is refused (the caller asks for the app id).
|
|
44
|
+
*
|
|
45
|
+
* `exact` is for write paths that reuse an app by its own slug (report
|
|
46
|
+
* publishing): only a subdomain or name equal to the value, case included,
|
|
47
|
+
* fits; the id never does.
|
|
48
|
+
*/
|
|
49
|
+
export function matchDeployApp(apps, ref, options = {}) {
|
|
50
|
+
const needle = options.exact ? ref : ref.toLowerCase();
|
|
51
|
+
const matches = apps
|
|
52
|
+
.filter((row) => typeof row === "object" && row !== null)
|
|
53
|
+
.filter((row) => typeof row.id === "string")
|
|
54
|
+
.filter((row) => (options.exact ? [row.subdomain, row.name] : [row.id, row.subdomain, row.name]).some((field) => typeof field === "string" && (options.exact ? field : field.toLowerCase()) === needle));
|
|
55
|
+
const ids = [...new Set(matches.map((row) => row.id))];
|
|
56
|
+
if (ids.length === 0)
|
|
57
|
+
return { kind: "none" };
|
|
58
|
+
if (ids.length > 1)
|
|
59
|
+
return { kind: "many", ids };
|
|
60
|
+
return { kind: "found", id: ids[0], record: matches[0] };
|
|
61
|
+
}
|
|
62
|
+
/** List the caller's apps and match `ref` against them (see matchDeployApp). */
|
|
63
|
+
export async function findDeployApp(ref, getPage) {
|
|
64
|
+
return matchDeployApp(await listAllDeployApps(getPage), ref);
|
|
65
|
+
}
|
|
29
66
|
//# sourceMappingURL=deploy-apps.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search index schedule: does the daemon refresh the HQ search index?
|
|
3
|
+
*
|
|
4
|
+
* The daemon refreshes the index with an in-process worker on a timer. When
|
|
5
|
+
* the worker cannot run, the timer starts nothing (it never falls back to
|
|
6
|
+
* starting `hq index sync`, hq-core-rust US-051) and the daemon plans the
|
|
7
|
+
* search-index unit as unavailable with a reason. This check reads that unit
|
|
8
|
+
* from the daemon's state file, so the user sees why the index is not being
|
|
9
|
+
* refreshed. It starts no process and makes no network call.
|
|
10
|
+
*/
|
|
11
|
+
import type { CheckFamily, CheckResult } from "../types.js";
|
|
12
|
+
export declare const SEARCH_INDEX_FAMILY_ID = "search-index";
|
|
13
|
+
export declare const SEARCH_INDEX_FAMILY_TITLE = "Search index schedule";
|
|
14
|
+
export declare function checkSearchIndexSchedule(env?: NodeJS.ProcessEnv): CheckResult[];
|
|
15
|
+
export declare const searchIndexFamily: CheckFamily;
|
|
16
|
+
//# sourceMappingURL=search-index.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search index schedule: does the daemon refresh the HQ search index?
|
|
3
|
+
*
|
|
4
|
+
* The daemon refreshes the index with an in-process worker on a timer. When
|
|
5
|
+
* the worker cannot run, the timer starts nothing (it never falls back to
|
|
6
|
+
* starting `hq index sync`, hq-core-rust US-051) and the daemon plans the
|
|
7
|
+
* search-index unit as unavailable with a reason. This check reads that unit
|
|
8
|
+
* from the daemon's state file, so the user sees why the index is not being
|
|
9
|
+
* refreshed. It starts no process and makes no network call.
|
|
10
|
+
*/
|
|
11
|
+
import * as fs from "node:fs";
|
|
12
|
+
import { daemonPaths } from "../../daemon/paths.js";
|
|
13
|
+
export const SEARCH_INDEX_FAMILY_ID = "search-index";
|
|
14
|
+
export const SEARCH_INDEX_FAMILY_TITLE = "Search index schedule";
|
|
15
|
+
const CHECK_ID = "search-index.schedule";
|
|
16
|
+
const UNIT_ID = "search-index";
|
|
17
|
+
export function checkSearchIndexSchedule(env = process.env) {
|
|
18
|
+
const statePath = daemonPaths(env.HOME || env.USERPROFILE || undefined, env).statePath;
|
|
19
|
+
let raw;
|
|
20
|
+
try {
|
|
21
|
+
raw = fs.readFileSync(statePath, "utf8");
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error.code === "ENOENT") {
|
|
25
|
+
return [{ status: "NA", checkId: CHECK_ID, message: "hq daemon has written no state on this machine, so it schedules no search index refresh." }];
|
|
26
|
+
}
|
|
27
|
+
return [unknown(`could not read the daemon state (${error.code ?? "error"})`)];
|
|
28
|
+
}
|
|
29
|
+
let units;
|
|
30
|
+
try {
|
|
31
|
+
units = JSON.parse(raw).units;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return [unknown("the daemon state file is not valid JSON")];
|
|
35
|
+
}
|
|
36
|
+
if (!Array.isArray(units))
|
|
37
|
+
return [unknown("the daemon state file has no unit list")];
|
|
38
|
+
const unit = units.find((u) => u && typeof u === "object" && u.id === UNIT_ID);
|
|
39
|
+
if (!unit) {
|
|
40
|
+
return [{ status: "NA", checkId: CHECK_ID, message: "hq daemon does not run a search-index unit on this machine (not enabled, or the sync runner indexes)." }];
|
|
41
|
+
}
|
|
42
|
+
if (unit.status === "unavailable") {
|
|
43
|
+
const reason = typeof unit.reason === "string" && unit.reason ? unit.reason : "no reason recorded";
|
|
44
|
+
return [{
|
|
45
|
+
status: "WARN",
|
|
46
|
+
checkId: CHECK_ID,
|
|
47
|
+
message: `The HQ search index is not refreshed on a timer: ${reason}`,
|
|
48
|
+
remediation: "hq daemon restart --daemon, or run `hq index sync` by hand",
|
|
49
|
+
}];
|
|
50
|
+
}
|
|
51
|
+
return [{ status: "PASS", checkId: CHECK_ID, message: "hq daemon refreshes the search index with its worker on a timer." }];
|
|
52
|
+
}
|
|
53
|
+
function unknown(why) {
|
|
54
|
+
return { status: "UNKNOWN", checkId: CHECK_ID, message: `Could not tell whether the search index is refreshed: ${why}.` };
|
|
55
|
+
}
|
|
56
|
+
export const searchIndexFamily = {
|
|
57
|
+
id: SEARCH_INDEX_FAMILY_ID,
|
|
58
|
+
title: SEARCH_INDEX_FAMILY_TITLE,
|
|
59
|
+
run: () => Promise.resolve(checkSearchIndexSchedule()),
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=search-index.js.map
|
|
@@ -38,7 +38,7 @@ export function checkStrandedLanes(context) {
|
|
|
38
38
|
...(lane.terminal_reason ? { terminal_reason: lane.terminal_reason } : {}),
|
|
39
39
|
},
|
|
40
40
|
message: `Keep-alive lead lane ${lane.lane_id} is ${state}${quotaExhausted ? " after account quota exhaustion" : ""}.`,
|
|
41
|
-
remediation: `Ask the senior to recover it with: hq
|
|
41
|
+
remediation: `Ask the senior to recover it with: hq runners resume ${lane.lane_id} --from-failed --reason "recover stranded keep-alive lane"`,
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -34,6 +34,7 @@ import { ps1ShimsFamily } from "./checks/ps1-shims.js";
|
|
|
34
34
|
import { tempHomesFamily } from "./checks/temp-homes.js";
|
|
35
35
|
import { replayRecorderFamily } from "./checks/replay-recorder.js";
|
|
36
36
|
import { machineChecksFamily } from "./checks/machine-checks.js";
|
|
37
|
+
import { searchIndexFamily } from "./checks/search-index.js";
|
|
37
38
|
import { fixtureCoverageFamily } from "./fixtures/discover.js";
|
|
38
39
|
import { checkClaudeWiring } from "./checks/claude-wiring.js";
|
|
39
40
|
/**
|
|
@@ -297,6 +298,9 @@ export function createDefaultRegistry() {
|
|
|
297
298
|
// Machine checks (US-016): the scripts the daemon runs on its schedule,
|
|
298
299
|
// run now for this HQ root; no daemon or socket needed.
|
|
299
300
|
registry.register(machineChecksFamily);
|
|
301
|
+
// Search index schedule (US-051): the daemon timer never starts `hq index
|
|
302
|
+
// sync`; when its worker cannot run, say so. Reads the daemon state file.
|
|
303
|
+
registry.register(searchIndexFamily);
|
|
300
304
|
return registry;
|
|
301
305
|
}
|
|
302
306
|
//# sourceMappingURL=registry.js.map
|