@indigoai-us/hq-cli 5.345.11 → 5.345.13

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/assets/scaffold/core/scripts/hq-delegate-grant.sh +16 -16
  3. package/assets/scaffold/core/scripts/register-project.sh +5 -5
  4. package/assets/scaffold/core/scripts/repo-run-registry.sh +8 -8
  5. package/assets/scaffold/core/scripts/resume-thread-lock.sh +4 -4
  6. package/assets/scaffold/core/scripts/verify-story-deliverables.sh +1 -1
  7. package/assets/scaffold/core/scripts/worktree-gc.sh +1 -1
  8. package/dist/commands/core-delegate-w1b.js +14 -9
  9. package/dist/commands/core-delegate.d.ts +1 -0
  10. package/dist/commands/core-delegate.js +10 -2
  11. package/dist/commands/core-handoff.js +69 -34
  12. package/dist/commands/core-hq-session-native.js +26 -5
  13. package/dist/commands/core-job-notify-fast.d.ts +2 -0
  14. package/dist/commands/core-job-notify-fast.js +6 -0
  15. package/dist/commands/core-job-probe-fast.d.ts +2 -0
  16. package/dist/commands/core-job-probe-fast.js +11 -0
  17. package/dist/commands/core-job-probe-native.js +1 -1
  18. package/dist/commands/core-job-remediate-fast.d.ts +2 -0
  19. package/dist/commands/core-job-remediate-fast.js +6 -0
  20. package/dist/commands/core-job-run-fast.d.ts +2 -0
  21. package/dist/commands/core-job-run-fast.js +6 -0
  22. package/dist/commands/core-pin-fast.d.ts +2 -0
  23. package/dist/commands/core-pin-fast.js +15 -0
  24. package/dist/commands/core-rebuild-index-fast.d.ts +6 -0
  25. package/dist/commands/core-rebuild-index-fast.js +39 -0
  26. package/dist/commands/core-register-project-native.js +11 -2
  27. package/dist/commands/core-repo-run-registry-native.js +47 -4
  28. package/dist/commands/core-session-journal-native.d.ts +1 -1
  29. package/dist/commands/core-session-journal-native.js +2 -2
  30. package/dist/commands/core-share-suggestion-state-native.js +6 -2
  31. package/dist/commands/core-work-mesh-live-rebind-native.js +5 -2
  32. package/dist/commands/core-worker-lint-fast.d.ts +2 -0
  33. package/dist/commands/core-worker-lint-fast.js +11 -0
  34. package/dist/commands/core.js +9 -6
  35. package/dist/fast-scaffold.js +49 -0
  36. package/dist/lib/core-utils/worktree-resume.d.ts +1 -0
  37. package/dist/lib/core-utils/worktree-resume.js +68 -31
  38. package/dist/lib/daemon/catalog.d.ts +10 -0
  39. package/dist/lib/daemon/catalog.js +8 -0
  40. package/dist/lib/daemon/lanes-reconcile-guard.d.ts +43 -0
  41. package/dist/lib/daemon/lanes-reconcile-guard.js +115 -0
  42. package/dist/lib/daemon/run.js +2 -0
  43. package/dist/lib/daemon/supervisor.d.ts +2 -0
  44. package/dist/lib/daemon/supervisor.js +28 -0
  45. package/dist/lib/lanes/autopilot-registry.d.ts +2 -5
  46. package/dist/lib/lanes/autopilot-registry.js +4 -4
  47. package/dist/lib/lanes/compaction.d.ts +2 -2
  48. package/dist/lib/lanes/compaction.js +221 -54
  49. package/dist/lib/lanes/move-account.js +24 -1
  50. package/dist/lib/lanes/reconcile.d.ts +0 -5
  51. package/dist/lib/lanes/reconcile.js +4 -4
  52. package/dist/lib/lanes/types.d.ts +6 -5
  53. package/dist/utils/run-bundled-script.js +1 -1
  54. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ /** Isolated fast-entry adapter for the native scheduled-job notifier. */
2
+ import { runJobNotify } from "./core-job-notify-native.js";
3
+ export function runJobNotifyFast(args, _stdin, _cwd, hqRoot) {
4
+ return runJobNotify([...args], { hqRoot: hqRoot ?? process.env.HQ_ROOT });
5
+ }
6
+ //# sourceMappingURL=core-job-notify-fast.js.map
@@ -0,0 +1,2 @@
1
+ export declare function runJobProbeFast(args: readonly string[], _stdin: string, _cwd: string, hqRoot: string | undefined): Promise<number>;
2
+ //# sourceMappingURL=core-job-probe-fast.d.ts.map
@@ -0,0 +1,11 @@
1
+ /** Isolated fast-entry adapter for the native scheduled-job probe. */
2
+ import { defaultProbeDeps, runJobProbe } from "./core-job-probe-native.js";
3
+ export async function runJobProbeFast(args, _stdin, _cwd, hqRoot) {
4
+ const result = await runJobProbe([...args], defaultProbeDeps(hqRoot ?? process.env.HQ_ROOT ?? process.cwd()));
5
+ if (result.stdout)
6
+ process.stdout.write(result.stdout.endsWith("\n") ? result.stdout : `${result.stdout}\n`);
7
+ if (result.stderr)
8
+ process.stderr.write(result.stderr);
9
+ return result.code;
10
+ }
11
+ //# sourceMappingURL=core-job-probe-fast.js.map
@@ -607,6 +607,6 @@ export function registerCoreJobProbeCommand(job) {
607
607
  if (r.code)
608
608
  process.exit(r.code);
609
609
  });
610
- describeCoreCommand(command, { execution: "native", root: "live" });
610
+ describeCoreCommand(command, { execution: "native", asset: JOB_PROBE_ASSET, root: "live" });
611
611
  }
612
612
  //# sourceMappingURL=core-job-probe-native.js.map
@@ -0,0 +1,2 @@
1
+ export declare function runJobRemediateFast(args: readonly string[], _stdin: string, _cwd: string, hqRoot: string | undefined): number;
2
+ //# sourceMappingURL=core-job-remediate-fast.d.ts.map
@@ -0,0 +1,6 @@
1
+ /** Isolated fast-entry adapter for native bounded job remediation. */
2
+ import { runJobRemediate } from "./core-job-remediate-native.js";
3
+ export function runJobRemediateFast(args, _stdin, _cwd, hqRoot) {
4
+ return runJobRemediate([...args], { hqRoot: hqRoot ?? process.env.HQ_ROOT });
5
+ }
6
+ //# sourceMappingURL=core-job-remediate-fast.js.map
@@ -0,0 +1,2 @@
1
+ export declare function runJobFast(args: readonly string[], _stdin: string, _cwd: string, hqRoot: string | undefined): Promise<number>;
2
+ //# sourceMappingURL=core-job-run-fast.d.ts.map
@@ -0,0 +1,6 @@
1
+ /** Isolated fast-entry adapter for the native scheduled-job runner. */
2
+ import { runJob } from "./core-job-run-native.js";
3
+ export async function runJobFast(args, _stdin, _cwd, hqRoot) {
4
+ return runJob([...args], hqRoot ?? process.env.HQ_ROOT);
5
+ }
6
+ //# sourceMappingURL=core-job-run-fast.js.map
@@ -0,0 +1,2 @@
1
+ export declare function runPinFast(args: readonly string[], _stdin: string, _cwd: string, hqRoot: string | undefined): number;
2
+ //# sourceMappingURL=core-pin-fast.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Isolated fast-entry adapter for the native pin utility. */
2
+ import { runPin } from "./core-pin-native.js";
3
+ export function runPinFast(args, _stdin, _cwd, hqRoot) {
4
+ const result = runPin([...args], {
5
+ root: hqRoot ?? process.env.HQ_ROOT ?? process.cwd(),
6
+ env: process.env,
7
+ now: () => new Date(),
8
+ });
9
+ if (result.stdout)
10
+ process.stdout.write(result.stdout);
11
+ if (result.stderr)
12
+ process.stderr.write(result.stderr);
13
+ return result.code;
14
+ }
15
+ //# sourceMappingURL=core-pin-fast.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Run a standard rebuild with the same renderer used by the full command.
3
+ * Argument forms that need Commander error formatting remain on the full graph.
4
+ */
5
+ export declare function runRebuildIndexFast(args: readonly string[], _stdin: string, _cwd: string, hqRoot: string | undefined): Promise<number | undefined>;
6
+ //# sourceMappingURL=core-rebuild-index-fast.d.ts.map
@@ -0,0 +1,39 @@
1
+ /** Isolated fast-entry adapter for rebuild-index native renderers. */
2
+ import { CompanyIndexUserError, renderIndexTarget } from "../lib/index-render/index.js";
3
+ const targets = new Set([
4
+ "all", "companies", "company-knowledge", "orchestrator", "projects",
5
+ "public-knowledge", "reports", "social-drafts", "threads", "workers",
6
+ ]);
7
+ /**
8
+ * Run a standard rebuild with the same renderer used by the full command.
9
+ * Argument forms that need Commander error formatting remain on the full graph.
10
+ */
11
+ export async function runRebuildIndexFast(args, _stdin, _cwd, hqRoot) {
12
+ const [target, ...rest] = args;
13
+ if (!target || !targets.has(target) || rest.length > 0 || !hqRoot)
14
+ return undefined;
15
+ const logs = [];
16
+ const flushLogs = () => {
17
+ for (const message of logs)
18
+ process.stderr.write(`${message}\n`);
19
+ };
20
+ try {
21
+ const refused = [];
22
+ renderIndexTarget(target, {
23
+ root: hqRoot,
24
+ log: (message) => logs.push(message),
25
+ refused,
26
+ });
27
+ if (refused.length > 0)
28
+ return undefined;
29
+ flushLogs();
30
+ return 0;
31
+ }
32
+ catch (error) {
33
+ if (error instanceof CompanyIndexUserError)
34
+ return undefined;
35
+ flushLogs();
36
+ throw error;
37
+ }
38
+ }
39
+ //# sourceMappingURL=core-rebuild-index-fast.js.map
@@ -5,14 +5,18 @@ import * as path from "node:path";
5
5
  import { spawnSync } from "node:child_process";
6
6
  import { serializeJqJson } from "../lib/core-utils/jq-json-serializer.js";
7
7
  import { resolveBundledAsset } from "../utils/hq-roots-core.js";
8
+ import { buildSpawnPlan } from "../utils/windows-spawn.js";
8
9
  export const REGISTER_PROJECT_ASSET = "core/scripts/register-project.sh";
9
10
  const USAGE = "usage: register-project.sh <company> <project> | --audit <company> | --backfill <company> --only-active [--yes] | --retry-pending <company>";
10
11
  const MIN_HQ_CLI = "5.139.0";
11
12
  export function createRegisterProjectHqRunner(spawn = spawnSync) {
12
13
  return (args, options) => {
13
- const result = spawn("hq", args, {
14
+ const plan = buildSpawnPlan("hq", args);
15
+ const { cmd, args: spawnArgs, ...spawnOptions } = plan;
16
+ const result = spawn(cmd, spawnArgs, {
14
17
  cwd: options.cwd,
15
18
  env: options.env,
19
+ ...spawnOptions,
16
20
  encoding: "utf8",
17
21
  // Shell hq children inherit fd 0 even when their output is captured or discarded.
18
22
  stdio: options.capture ? ["inherit", "pipe", "pipe"] : ["inherit", "ignore", "ignore"],
@@ -130,7 +134,12 @@ function ensureOne(company, project, deps) {
130
134
  catch { /* legacy jq/write errors remain a failed registration */ }
131
135
  return errorResult(`hq-cli ${MIN_HQ_CLI} or newer is required; ${company}/${project} stays local until then`);
132
136
  }
133
- const ensure = deps.runHq(["mesh", "project", "ensure", project, "--company", company, "--stories-file", prd, "--json"], {
137
+ // The shell builds this argument from its raw HQ_ROOT plus POSIX separators.
138
+ // On Git Bash that preserves a Win32 drive prefix and appends `/companies/...`.
139
+ const hqPrd = process.platform === "win32"
140
+ ? `${deps.root.replace(/[\\/]+$/u, "")}/companies/${company}/projects/${project}/prd.json`
141
+ : prd;
142
+ const ensure = deps.runHq(["mesh", "project", "ensure", project, "--company", company, "--stories-file", hqPrd, "--json"], {
134
143
  cwd: deps.cwd, env: deps.env, capture: true,
135
144
  });
136
145
  if (ensure.code !== 0)
@@ -28,7 +28,16 @@ function epoch(value, parseDate) {
28
28
  }
29
29
  return parseDate(value);
30
30
  }
31
+ function nativePath(value) {
32
+ if (process.platform === "win32") {
33
+ const gitBashPath = /^\/([A-Za-z])\/(.*)$/u.exec(value);
34
+ if (gitBashPath)
35
+ return `${gitBashPath[1]}:\\${gitBashPath[2].replaceAll("/", "\\")}`;
36
+ }
37
+ return value;
38
+ }
31
39
  function pathAbs(value, cwd, f) {
40
+ value = nativePath(value);
32
41
  if (value.startsWith("/"))
33
42
  return value;
34
43
  const parent = path.dirname(value);
@@ -40,8 +49,29 @@ function pathAbs(value, cwd, f) {
40
49
  return value;
41
50
  }
42
51
  }
52
+ function shellAbsolutePath(value) {
53
+ if (process.platform !== "win32")
54
+ return value;
55
+ // The shell companion stores drive paths with forward slashes. The shared
56
+ // shellDisplayPath helper emits Git Bash mount paths for command output, but
57
+ // that is not the registry's persisted path format.
58
+ if (/^\/[A-Za-z]\//u.test(value))
59
+ return value;
60
+ return path.win32.resolve(nativePath(value)).replaceAll("\\", "/");
61
+ }
62
+ function shellScope(value) {
63
+ return value.startsWith("worktree:") ? `worktree:${shellAbsolutePath(value.slice("worktree:".length))}` : value;
64
+ }
43
65
  function worktreeScopeCovers(target, scope) {
44
66
  const rawRoot = scope.slice("worktree:".length);
67
+ if (process.platform === "win32") {
68
+ const canonical = (value) => {
69
+ return path.win32.normalize(nativePath(value).replaceAll("/", "\\")).replace(/[\\/]+$/u, "").toLowerCase();
70
+ };
71
+ const canonicalTarget = canonical(target);
72
+ const canonicalRoot = canonical(rawRoot);
73
+ return canonicalTarget === canonicalRoot || canonicalTarget.startsWith(`${canonicalRoot}\\`);
74
+ }
45
75
  const trimmedRoot = rawRoot.replace(/\/+$/, "");
46
76
  const root = trimmedRoot === "" && rawRoot.startsWith("/") ? "/" : trimmedRoot;
47
77
  if (root === "/")
@@ -135,7 +165,10 @@ export function runRepoRunRegistry(args, deps) {
135
165
  f.rmSync(lockDir, { recursive: true, force: true });
136
166
  }
137
167
  catch {
138
- throw new Error(`ERROR: could not remove stale registry lock: ${lockDir}`);
168
+ const displayLock = process.platform === "win32"
169
+ ? `${root.replace(/[\\/]+$/u, "")}/workspace/orchestrator/active-runs.json.lock`
170
+ : lockDir;
171
+ throw new Error(`ERROR: could not remove stale registry lock: ${displayLock}`);
139
172
  }
140
173
  continue;
141
174
  }
@@ -157,6 +190,10 @@ export function runRepoRunRegistry(args, deps) {
157
190
  const value = Number(raw);
158
191
  if (!Number.isFinite(value))
159
192
  return false;
193
+ // Git Bash's kill -0 -1 probes all signalable processes and succeeds on
194
+ // Windows; Node's process.kill does not accept the same sentinel there.
195
+ if (process.platform === "win32" && value === -1)
196
+ return true;
160
197
  try {
161
198
  return deps.isPidAlive ? deps.isPidAlive(value) : (process.kill(value, 0), true);
162
199
  }
@@ -207,7 +244,7 @@ export function runRepoRunRegistry(args, deps) {
207
244
  catch { /* keep resolved path */ }
208
245
  while (dir !== "/" && dir) {
209
246
  if (f.existsSync(path.join(dir, ".git")))
210
- return dir;
247
+ return process.platform === "win32" ? shellAbsolutePath(dir) : dir;
211
248
  const parent = path.dirname(dir);
212
249
  if (parent === dir)
213
250
  break;
@@ -256,7 +293,8 @@ export function runRepoRunRegistry(args, deps) {
256
293
  let runId = valueAfter(rest, "--run-id"), runPid = valueAfter(rest, "--pid"), sessionId = valueAfter(rest, "--session-id"), command = valueAfter(rest, "--command"), project = valueAfter(rest, "--project"), repo = valueAfter(rest, "--repo"), scope = valueAfter(rest, "--scope"), host = valueAfter(rest, "--host");
257
294
  if (!runPid || !command || !repo || !scope)
258
295
  return die("register requires --pid --command --repo --scope");
259
- repo = pathAbs(repo, deps.cwd, f);
296
+ repo = shellAbsolutePath(pathAbs(repo, deps.cwd, f));
297
+ scope = shellScope(scope);
260
298
  if (!runId)
261
299
  runId = `${command.replaceAll("/", "-")}-${Math.floor(now().getTime() / 1000)}-${project || "none"}-${runPid}`;
262
300
  if (!host)
@@ -357,7 +395,12 @@ export function runRepoRunRegistry(args, deps) {
357
395
  const owners = runs.filter((run) => covers(run) && String(run?.pid) !== myPid && run?.session_id !== mySession);
358
396
  if (!owners.length)
359
397
  return output();
360
- const lines = owners.map((run) => `run_id=${run?.run_id} pid=${run?.pid} command=${run?.command} project=${run?.project} scope=${run?.scope} repo=${run?.repo_path} started=${run?.started_at} heartbeat=${run?.heartbeat_at}`).join("\n") + "\n";
398
+ const lines = owners.map((run) => {
399
+ // This diagnostic interpolates the stored fields directly in Bash.
400
+ // Keep their original spelling (including a trailing slash) rather
401
+ // than canonicalizing paths only on the native side.
402
+ return `run_id=${run?.run_id} pid=${run?.pid} command=${run?.command} project=${run?.project} scope=${run?.scope} repo=${run?.repo_path} started=${run?.started_at} heartbeat=${run?.heartbeat_at}`;
403
+ }).join("\n") + "\n";
361
404
  return output(2, "", lines);
362
405
  }
363
406
  return die(`unknown subcommand: ${sub}`);
@@ -10,6 +10,6 @@ export type SessionJournalOperationResult = {
10
10
  /** Execute one native helper call while retaining its two output byte streams. */
11
11
  export declare function runSessionJournalOperation(args: readonly string[], _stdin: string, cwd: string, hqRoot: string | undefined, dependencies?: SessionHelperRuntimeOverrides): SessionJournalOperationResult;
12
12
  /** Native implementation of the fail-soft session journal helper. */
13
- export declare function runSessionJournalFast(args: readonly string[], stdin: string, cwd: string, hqRoot: string | undefined, dependencies?: SessionHelperRuntimeOverrides): number;
13
+ export declare function runSessionJournalFast(args: readonly string[], _stdin: string, cwd: string, hqRoot: string | undefined, dependencies?: SessionHelperRuntimeOverrides): number;
14
14
  export {};
15
15
  //# sourceMappingURL=core-session-journal-native.d.ts.map
@@ -243,8 +243,8 @@ export function runSessionJournalOperation(args, _stdin, cwd, hqRoot, dependenci
243
243
  return { code, stdout: Buffer.concat(stdout), stderr: Buffer.concat(stderr) };
244
244
  }
245
245
  /** Native implementation of the fail-soft session journal helper. */
246
- export function runSessionJournalFast(args, stdin, cwd, hqRoot, dependencies = {}) {
247
- const result = runSessionJournalOperation(args, stdin, cwd, hqRoot, dependencies);
246
+ export function runSessionJournalFast(args, _stdin, cwd, hqRoot, dependencies = {}) {
247
+ const result = runSessionJournalOperation(args, _stdin, cwd, hqRoot, dependencies);
248
248
  process.stdout.write(result.stdout);
249
249
  process.stderr.write(result.stderr);
250
250
  return result.code;
@@ -1,6 +1,7 @@
1
1
  /** Native port of share-suggestion-state.sh; kept dependency-light for hooks. */
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
+ import { shellDisplayPath } from "../lib/core-utils/shell-display-path.js";
4
5
  import { isByteOrientedLocale } from "../lib/core-utils/byte-oriented-locale.js";
5
6
  export const SHARE_SUGGESTION_STATE_ASSET = "core/scripts/share-suggestion-state.sh";
6
7
  const isObj = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
@@ -170,10 +171,13 @@ export function runShareSuggestionState(args, stdin, deps) {
170
171
  }
171
172
  catch { /* locate the first existing non-directory parent when present */ }
172
173
  }
174
+ const displayBlockedPath = platform === "win32"
175
+ ? shellDisplayPath(blockedPath)
176
+ : blockedPath;
173
177
  const reason = code === "ENOTDIR" ? "Not a directory" : code === "EACCES" || code === "EPERM" ? "Permission denied" : code === "EEXIST" ? "File exists" : (error instanceof Error ? error.message : String(error));
174
178
  const mkdirError = platform === "darwin"
175
- ? `mkdir: ${blockedPath}: ${reason}\n`
176
- : `mkdir: cannot create directory ‘${blockedPath}’: ${reason}\n`;
179
+ ? `mkdir: ${displayBlockedPath}: ${reason}\n`
180
+ : `mkdir: cannot create directory ‘${displayBlockedPath}’: ${reason}\n`;
177
181
  return failFromShellMain(`${mkdirError}share-suggestion-state: unable to create state directory\n`);
178
182
  }
179
183
  const sessionUnits = platform === "darwin" && !isByteOrientedLocale(env, platform)
@@ -4,6 +4,7 @@ import * as os from "node:os";
4
4
  import * as path from "node:path";
5
5
  import { generateUlid } from "../lib/mesh/live/ulid.js";
6
6
  import { formatSpoolLine } from "../lib/mesh/live/format-spool-line.js";
7
+ import { shellDisplayPath } from "../lib/core-utils/shell-display-path.js";
7
8
  export const WORK_MESH_LIVE_REBIND_ASSET = "core/scripts/work-mesh-live-rebind.sh";
8
9
  const WORK_MESH_LIVE_REBIND_LIBRARY_ASSET = "core/scripts/lib/work-mesh-live-rebind.sh";
9
10
  const USAGE = "usage: work-mesh-live-rebind.sh --session <sid> ...\n";
@@ -118,7 +119,7 @@ function enqueueLifecycle(kind, sid, harness, adapter, company, project, task, d
118
119
  at: `${now.toISOString().slice(0, 19)}.000Z`,
119
120
  seq,
120
121
  cwd: deps.env.PWD ?? "",
121
- hqRoot: deps.env.HQ_ROOT ?? deps.root,
122
+ hqRoot: shellDisplayPath(deps.env.HQ_ROOT ?? deps.root),
122
123
  };
123
124
  if (company)
124
125
  event.companySlug = company;
@@ -247,7 +248,9 @@ export function runWorkMeshLiveRebind(args, deps) {
247
248
  : cause?.code === "ENOSPC" ? "No space left on device"
248
249
  : "Input/output error";
249
250
  const script = path.join(deps.root, WORK_MESH_LIVE_REBIND_LIBRARY_ASSET);
250
- return { code: 1, stdout: "", stderr: `${script}: line 34: ${error.target}: ${message}\n` };
251
+ const scriptPath = shellDisplayPath(script);
252
+ const targetPath = shellDisplayPath(error.target);
253
+ return { code: 1, stdout: "", stderr: `${scriptPath}: line 34: ${targetPath}: ${message}\n` };
251
254
  }
252
255
  }
253
256
  export async function runWorkMeshLiveRebindFast(args, _stdin, cwd, root) {
@@ -0,0 +1,2 @@
1
+ export declare function runWorkerSkillLintFast(args: readonly string[], _stdin: string, cwd: string): number;
2
+ //# sourceMappingURL=core-worker-lint-fast.d.ts.map
@@ -0,0 +1,11 @@
1
+ /** Isolated fast-entry adapter for native worker-skill linting. */
2
+ import { runWorkerSkillLint } from "./core-worker-lint-native.js";
3
+ export function runWorkerSkillLintFast(args, _stdin, cwd) {
4
+ const result = runWorkerSkillLint([...args], { cwd });
5
+ if (result.stdout)
6
+ process.stdout.write(result.stdout);
7
+ if (result.stderr)
8
+ process.stderr.write(result.stderr);
9
+ return result.code;
10
+ }
11
+ //# sourceMappingURL=core-worker-lint-fast.js.map
@@ -631,12 +631,15 @@ export function registerCoreCommands(program) {
631
631
  }
632
632
  });
633
633
  describeCoreCommand(rebuildCommand, {
634
- entries: REBUILD_INDEX_TARGETS.map((entry) => ({
635
- name: `rebuild-index ${entry.target}`,
636
- execution: "native",
637
- asset: entry.asset,
638
- root: "live",
639
- })),
634
+ entries: [
635
+ { name: "rebuild-index", execution: "native", root: "live" },
636
+ ...REBUILD_INDEX_TARGETS.map((entry) => ({
637
+ name: `rebuild-index ${entry.target}`,
638
+ execution: "native",
639
+ asset: entry.asset,
640
+ root: "live",
641
+ })),
642
+ ],
640
643
  });
641
644
  for (const entry of SCAFFOLD_COMMANDS) {
642
645
  const command = core
@@ -11,6 +11,55 @@
11
11
  */
12
12
  /** The relocated scripts that qualify for the entrypoint fast path. */
13
13
  export const FAST_SCAFFOLD_SCRIPTS = [
14
+ ...["notify", "probe", "remediate", "run"].map((name) => ({
15
+ name: `job ${name}`,
16
+ kind: "native",
17
+ modulePath: `./commands/core-job-${name}-fast.js`,
18
+ exportName: name === "notify" ? "runJobNotifyFast"
19
+ : name === "probe" ? "runJobProbeFast"
20
+ : name === "remediate" ? "runJobRemediateFast"
21
+ : "runJobFast",
22
+ flagKey: "hq-core-native-fast-route",
23
+ familyFlagKey: "core-native-jobs",
24
+ asset: `core/scripts/hq-job-${name}.sh`,
25
+ root: "live",
26
+ shellCwd: "live",
27
+ shellHqRoot: "live",
28
+ requiresNodeNetworkCompatibility: name === "probe" || name === "run",
29
+ })),
30
+ {
31
+ name: "pin",
32
+ kind: "native",
33
+ modulePath: "./commands/core-pin-fast.js",
34
+ exportName: "runPinFast",
35
+ flagKey: "hq-core-native-fast-route",
36
+ familyFlagKey: "core-native-utilities",
37
+ asset: "core/scripts/hq-pin.sh",
38
+ root: "live",
39
+ shellCwd: "live",
40
+ shellHqRoot: "live",
41
+ },
42
+ {
43
+ name: "worker lint",
44
+ kind: "native",
45
+ modulePath: "./commands/core-worker-lint-fast.js",
46
+ exportName: "runWorkerSkillLintFast",
47
+ flagKey: "hq-core-native-fast-route",
48
+ familyFlagKey: "core-native-worker-skills",
49
+ asset: "core/scripts/lint-shared-worker-skills.sh",
50
+ root: "cwd",
51
+ shellCwd: "caller",
52
+ shellHqRoot: "none",
53
+ },
54
+ {
55
+ name: "rebuild-index",
56
+ kind: "native",
57
+ modulePath: "./commands/core-rebuild-index-fast.js",
58
+ exportName: "runRebuildIndexFast",
59
+ flagKey: "hq-core-native-fast-route",
60
+ root: "live",
61
+ fallbackToCommandGraph: true,
62
+ },
14
63
  {
15
64
  name: "checkpoint-stop-gate",
16
65
  kind: "native",
@@ -9,6 +9,7 @@ export type CoreIo = {
9
9
  env?: NodeJS.ProcessEnv;
10
10
  cwd?: string;
11
11
  now?: () => Date;
12
+ randomBytes?: (size: number) => Buffer;
12
13
  };
13
14
  export declare function worktreeGcPathKey(value: string): string;
14
15
  export declare function runWorktreeGc(args: readonly string[], hqRoot: string, io?: CoreIo): number;