harnessed 5.0.10 → 5.0.12

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 CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.0.12] - 2026-11-03
11
+
12
+ ### Fixed
13
+
14
+ - The compiled-binary self-update now survives a slow link and says what actually failed. The release-metadata hop gets a 30 s budget instead of 10 s and reports the stage it failed in — a timeout, a network error, an HTTP status, or an unparsable response — instead of one generic "could not reach GitHub releases" line, and the "the release may still be publishing" hint is now shown only for the case it describes. The binary asset is streamed to disk instead of being buffered in memory (it is ≈99 MB), the transfer aborts if no data arrives for 120 s, a progress line reports the downloaded size and rate while it runs, and a failed download states how many bytes arrived, how long it took and the average rate.
15
+ - `harnessed doctor` no longer reports a second install channel that is not installed. Channel presence is decided by what exists on disk, so running from a source checkout no longer counts as an npm-global install, and the single-channel line names the channel that is actually installed.
16
+
17
+ ## [5.0.11] - 2026-11-03
18
+
19
+ ### Fixed
20
+
21
+ - `harnessed setup` no longer fails the `planning-with-files` component on the codex host. The npx skill pack's target set was not declared, so the ownership guard refused it as unproven before it could check the installed state. The manifest now declares `installs_skills: [planning-with-files]`, so the component is detected as already installed (or installs normally on a fresh host) and setup no longer exits 1.
22
+
23
+ ### Removed
24
+
25
+ - The optional `stop-hook-recover` component (Tool-Call Auto-Recovery Stop hook) has been removed. Its manifest, the `harnessed stop-hook` internal subcommand and the generated `bin/harnessed-stop-hook.mjs` are gone; `harnessed setup` no longer offers it and `harnessed install stop-hook-recover` no longer resolves. The `stop-hook` hook identity is kept internally, so a registration left behind by an earlier install is still recognized and removed by the unified `harnessed uninstall` and is still flagged by `harnessed doctor`.
26
+
10
27
  ## [5.0.10] - 2026-11-02
11
28
 
12
29
  ### Fixed
@@ -65,7 +65,7 @@ var init_package = __esm({
65
65
  'package.json'() {
66
66
  package_default = {
67
67
  name: 'harnessed',
68
- version: '5.0.10',
68
+ version: '5.0.12',
69
69
  description: 'AI coding harness package manager + composition orchestrator',
70
70
  type: 'module',
71
71
  license: 'Apache-2.0',
@@ -14,7 +14,7 @@ var init_package = __esm({
14
14
  'package.json'() {
15
15
  package_default = {
16
16
  name: 'harnessed',
17
- version: '5.0.10',
17
+ version: '5.0.12',
18
18
  description: 'AI coding harness package manager + composition orchestrator',
19
19
  type: 'module',
20
20
  license: 'Apache-2.0',
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readFileSync, existsSync, mkdirSync, readdirSync, writeFileSync, appendFileSync, accessSync, constants, statSync, unlinkSync, realpathSync, renameSync, openSync, closeSync, fsyncSync, rmSync, mkdtempSync, lstatSync, readSync, utimesSync, createReadStream } from 'fs';
2
+ import { readFileSync, existsSync, mkdirSync, readdirSync, writeFileSync, appendFileSync, accessSync, constants, statSync, unlinkSync, realpathSync, renameSync, openSync, closeSync, fsyncSync, rmSync, mkdtempSync, lstatSync, readSync, utimesSync, createReadStream, createWriteStream } from 'fs';
3
3
  import { homedir, tmpdir } from 'os';
4
4
  import { join, dirname, resolve, basename, isAbsolute, relative, sep, win32, posix } from 'path';
5
5
  import { Type } from '@sinclair/typebox';
@@ -19,6 +19,8 @@ import * as p from '@clack/prompts';
19
19
  import { createPatch } from 'diff';
20
20
  import pc from 'picocolors';
21
21
  import { setTimeout as setTimeout$1 } from 'timers/promises';
22
+ import { Transform, Readable } from 'stream';
23
+ import { pipeline } from 'stream/promises';
22
24
  import { stdout, stdin } from 'process';
23
25
  import * as readline from 'readline/promises';
24
26
  import { parse as parse$1 } from 'smol-toml';
@@ -40,7 +42,7 @@ var init_package = __esm({
40
42
  "package.json"() {
41
43
  package_default = {
42
44
  name: "harnessed",
43
- version: "5.0.10",
45
+ version: "5.0.12",
44
46
  description: "AI coding harness package manager + composition orchestrator",
45
47
  type: "module",
46
48
  license: "Apache-2.0",
@@ -8709,8 +8711,8 @@ function detectInstallChannels(deps) {
8709
8711
  const binaryPath = running === "binary" ? execPath : binaryPresent ? binCand : null;
8710
8712
  const prefix = npmPrefix();
8711
8713
  const npmCand = prefix ? npmCandidate(platform, prefix) : null;
8712
- const npmPresent = running === "npm" || npmCand != null && exists(npmCand);
8713
8714
  const npmPath2 = npmCand != null && exists(npmCand) ? npmCand : null;
8715
+ const npmPresent = npmPath2 != null;
8714
8716
  return { binaryPath, npmPath: npmPath2, running, both: binaryPresent && npmPresent };
8715
8717
  }
8716
8718
  function bunPackageAdvisory(binaryPath) {
@@ -8751,10 +8753,11 @@ function checkInstallChannels(deps) {
8751
8753
  }
8752
8754
  const r = detectInstallChannels(deps);
8753
8755
  if (!r.both) {
8756
+ const installed2 = r.npmPath ? "npm" : r.binaryPath ? "binary" : null;
8754
8757
  return {
8755
8758
  name: "install channel",
8756
8759
  status: "pass",
8757
- message: `single channel (${r.running})`
8760
+ message: installed2 ? `single channel (${installed2})` : "no install channel on disk (running from a source checkout?)"
8758
8761
  };
8759
8762
  }
8760
8763
  return {
@@ -8938,6 +8941,9 @@ var init_hookEntry = __esm({
8938
8941
  init_runtime();
8939
8942
  COMPILED_HOOK_IDENTITIES = [
8940
8943
  "inject-state",
8944
+ // retired in 5.0.11 — no manifest ships this hook any more; the identity is
8945
+ // kept so legacy registrations can still be recognized and stripped.
8946
+ // Removal planned after 2027-02-03 (3-month window, see the doc comment).
8941
8947
  "stop-hook",
8942
8948
  "check-docs",
8943
8949
  "update-reminder"
@@ -21091,7 +21097,7 @@ function normalized(p8) {
21091
21097
  function downloadFailureMessage(error, version, url) {
21092
21098
  const detail = error instanceof Error ? error.message : String(error);
21093
21099
  const target = version ? ` for release v${version}` : "";
21094
- return `download failed${target}${url ? ` (tried ${url})` : ""}: ${detail} \u2014 if the network blocks GitHub, use the npm channel (\`npm i -g harnessed@latest\`) or a local build via \`HARNESSED_UPDATE_SOURCE_DIR=<dir> harnessed update\``;
21100
+ return `download failed${target}${url ? ` (tried ${url})` : ""}: ${detail} \u2014 the original binary was left untouched; if the network blocks GitHub, use the npm channel (\`npm i -g harnessed@latest\`) or a local build via \`HARNESSED_UPDATE_SOURCE_DIR=<dir> harnessed update\``;
21095
21101
  }
21096
21102
  async function sha256File(p8) {
21097
21103
  const buf = await readFile(p8);
@@ -21150,14 +21156,13 @@ async function runBinarySelfUpdate(deps, opts) {
21150
21156
  if (rel === null) {
21151
21157
  return {
21152
21158
  status: "error",
21153
- message: "could not reach GitHub releases to resolve the latest binary \u2014 check the network or use the npm channel (`npm i -g harnessed@latest`), or point `HARNESSED_UPDATE_SOURCE_DIR=<dir>` at a local build and re-run `harnessed update`"
21159
+ message: "could not resolve the latest release from GitHub (no release information returned) \u2014 use the npm channel (`npm i -g harnessed@latest`), or point `HARNESSED_UPDATE_SOURCE_DIR=<dir>` at a local build and re-run `harnessed update`"
21154
21160
  };
21155
21161
  }
21156
21162
  if ("error" in rel) {
21157
- return {
21158
- status: "error",
21159
- message: `${rel.error} \u2014 the release may still be publishing (retry in a few minutes) or use the npm channel (\`npm i -g harnessed@latest\`)`
21160
- };
21163
+ const publishing = rel.kind === void 0 || rel.kind === "publishing";
21164
+ const remedy = publishing ? "the release may still be publishing (retry in a few minutes) or use the npm channel (`npm i -g harnessed@latest`)" : "the original binary was left untouched; use the npm channel (`npm i -g harnessed@latest`) or point `HARNESSED_UPDATE_SOURCE_DIR=<dir>` at a local build and re-run `harnessed update`";
21165
+ return { status: "error", message: `${rel.error} \u2014 ${remedy}` };
21161
21166
  }
21162
21167
  targetVersion = rel.version;
21163
21168
  assetUrl = rel.assetUrl;
@@ -21420,11 +21425,13 @@ async function runBinaryRollback(deps, opts) {
21420
21425
  });
21421
21426
  return { status: "rolled-back", from: deps.currentVersion, to: target, backupUsed: backupBin };
21422
21427
  }
21423
- async function fetchWithTimeout(url, timeoutMs, net = {}, headers = {}) {
21428
+ async function fetchWithTimeout(url, timeoutMs, net = {}, headers = {}, controller) {
21424
21429
  await ensureProxyDispatcher();
21425
21430
  const doFetch = net.fetchImpl ?? fetch;
21426
- const ac = new AbortController();
21427
- const timer = setTimeout(() => ac.abort(), timeoutMs);
21431
+ const ac = controller ?? new AbortController();
21432
+ const timer = setTimeout(() => {
21433
+ ac.abort(new RequestTimeoutError(`the request to ${url} timed out after ${timeoutMs} ms`));
21434
+ }, timeoutMs);
21428
21435
  try {
21429
21436
  return await doFetch(url, {
21430
21437
  signal: ac.signal,
@@ -21448,20 +21455,31 @@ function isTransientNetworkError(error) {
21448
21455
  message
21449
21456
  );
21450
21457
  }
21451
- async function fetchAsset(url, fallbackUrl, timeoutMs, net, label) {
21458
+ async function fetchAsset(url, fallbackUrl, timeoutMs, net, label, consume) {
21452
21459
  const sleep2 = net.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
21453
21460
  const attempts = [];
21454
21461
  let lastError;
21455
21462
  for (const candidate of [url, fallbackUrl].filter((u) => !!u)) {
21456
21463
  for (let attempt = 1; attempt <= DOWNLOAD_ATTEMPTS; attempt++) {
21464
+ const ac = new AbortController();
21457
21465
  try {
21458
- const res = await fetchWithTimeout(candidate, timeoutMs, net, {
21459
- accept: "application/octet-stream"
21460
- });
21461
- if (res.ok) return res;
21462
- lastError = new Error(`HTTP ${res.status} downloading ${candidate}`);
21463
- if (res.status < 500) break;
21466
+ const res = await fetchWithTimeout(
21467
+ candidate,
21468
+ timeoutMs,
21469
+ net,
21470
+ {
21471
+ accept: "application/octet-stream"
21472
+ },
21473
+ ac
21474
+ );
21475
+ if (!res.ok) {
21476
+ lastError = new Error(`HTTP ${res.status} downloading ${candidate}`);
21477
+ if (res.status < 500) break;
21478
+ } else {
21479
+ return await consume(res, ac);
21480
+ }
21464
21481
  } catch (error) {
21482
+ if (error instanceof TransferStalledError) throw error;
21465
21483
  lastError = error;
21466
21484
  if (!isTransientNetworkError(error)) break;
21467
21485
  }
@@ -21473,46 +21491,134 @@ async function fetchAsset(url, fallbackUrl, timeoutMs, net, label) {
21473
21491
  `${label} download failed (${attempts.length} attempt(s) over ${[url, fallbackUrl].filter(Boolean).join(", ")}): ${lastError instanceof Error ? lastError.message : String(lastError)}`
21474
21492
  );
21475
21493
  }
21494
+ function formatBytes(n) {
21495
+ if (n >= 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
21496
+ if (n >= 1024) return `${(n / 1024).toFixed(1)} KB`;
21497
+ return `${n} B`;
21498
+ }
21499
+ function formatRate(received, elapsedMs) {
21500
+ if (received <= 0 || elapsedMs <= 0) return "0 KB/s";
21501
+ return `${(received / 1024 / (elapsedMs / 1e3)).toFixed(1)} KB/s`;
21502
+ }
21503
+ function transferStats(received, elapsedMs) {
21504
+ const seconds = (elapsedMs / 1e3).toFixed(1);
21505
+ const rate = received > 0 ? `, ${formatRate(received, elapsedMs)} average` : "";
21506
+ return `${received} bytes received in ${seconds} s${rate}`;
21507
+ }
21508
+ async function streamAssetToFile(res, dest, ac, stallTimeoutMs, progressIntervalMs, log) {
21509
+ if (!res.body) throw new Error("the release asset response carried no body");
21510
+ const started = Date.now();
21511
+ let received = 0;
21512
+ let lastProgressAt = started;
21513
+ let stalled = false;
21514
+ let stallTimer;
21515
+ const resetStall = () => {
21516
+ if (stallTimer) clearTimeout(stallTimer);
21517
+ stallTimer = setTimeout(() => {
21518
+ stalled = true;
21519
+ ac.abort(
21520
+ new TransferStalledError(`no data received for ${Math.round(stallTimeoutMs / 1e3)} s`)
21521
+ );
21522
+ }, stallTimeoutMs);
21523
+ };
21524
+ const meter = new Transform({
21525
+ transform(chunk, _encoding, callback) {
21526
+ received += chunk.length;
21527
+ const now = Date.now();
21528
+ if (now - lastProgressAt >= progressIntervalMs) {
21529
+ lastProgressAt = now;
21530
+ log(`downloading ${formatBytes(received)} (${formatRate(received, now - started)})`);
21531
+ }
21532
+ resetStall();
21533
+ callback(null, chunk);
21534
+ }
21535
+ });
21536
+ resetStall();
21537
+ try {
21538
+ await pipeline(
21539
+ // undici types the body as a DOM-ish ReadableStream; node:stream/web's
21540
+ // class is the one Readable.fromWeb accepts.
21541
+ Readable.fromWeb(res.body),
21542
+ meter,
21543
+ // flags 'w' truncates: a retried attempt must not append to the bytes
21544
+ // a previous attempt already wrote.
21545
+ createWriteStream(dest),
21546
+ { signal: ac.signal }
21547
+ );
21548
+ } catch (e) {
21549
+ if (stalled) {
21550
+ throw new TransferStalledError(
21551
+ `the download stalled \u2014 no data for ${Math.round(stallTimeoutMs / 1e3)} s (${transferStats(received, Date.now() - started)})`
21552
+ );
21553
+ }
21554
+ throw e;
21555
+ } finally {
21556
+ if (stallTimer) clearTimeout(stallTimer);
21557
+ }
21558
+ }
21476
21559
  async function resolveLatestRelease(platform = process.platform, arch = process.arch, net = {}) {
21560
+ let res;
21477
21561
  try {
21478
- const res = await fetchWithTimeout(RELEASES_LATEST_URL, 1e4, net);
21479
- if (!res.ok) return null;
21480
- const body = await res.json();
21481
- const version = (body.tag_name ?? "").replace(/^v/, "");
21482
- if (!/^\d+\.\d+\.\d+/.test(version)) return null;
21483
- const asset = assetNameFor(platform, arch);
21484
- const pick = (name) => body.assets?.find((a) => a.name === name);
21485
- const found = pick(asset);
21486
- const sha = pick(`${asset}.sha256`);
21487
- const sig = pick(`${asset}.sha256.sig`);
21488
- if (!found?.browser_download_url && !found?.url) {
21489
- return { error: `asset ${asset} not found on release v${version}` };
21490
- }
21491
- if (!sha?.browser_download_url && !sha?.url) {
21492
- return { error: `asset ${asset}.sha256 not found on release v${version}` };
21493
- }
21494
- const pair = (a) => {
21495
- const api = a?.url;
21496
- const browser = a?.browser_download_url;
21497
- return api && browser ? { primary: api, fallback: browser } : { primary: api ?? browser ?? "", fallback: void 0 };
21562
+ res = await fetchWithTimeout(RELEASES_LATEST_URL, RELEASE_METADATA_TIMEOUT_MS, net);
21563
+ } catch (e) {
21564
+ const budget = `${RELEASE_METADATA_TIMEOUT_MS / 1e3} s timeout budget`;
21565
+ return {
21566
+ error: e instanceof RequestTimeoutError ? `the request to the GitHub releases API timed out (${budget})` : `the request to the GitHub releases API failed or timed out (${budget}): ${e instanceof Error ? e.message : String(e)}`,
21567
+ kind: e instanceof RequestTimeoutError ? "timeout" : "network"
21498
21568
  };
21499
- const assetPair = pair(found);
21500
- const shaPair = pair(sha);
21501
- const sigPair = pair(sig);
21569
+ }
21570
+ if (!res.ok) {
21571
+ return { error: `the GitHub releases API returned HTTP ${res.status}`, kind: "http" };
21572
+ }
21573
+ let body;
21574
+ try {
21575
+ body = await res.json();
21576
+ } catch (e) {
21502
21577
  return {
21503
- version,
21504
- assetUrl: assetPair.primary,
21505
- shaUrl: shaPair.primary,
21506
- sigUrl: sigPair.primary || void 0,
21507
- assetFallbackUrl: assetPair.fallback,
21508
- shaFallbackUrl: shaPair.fallback,
21509
- sigFallbackUrl: sigPair.fallback
21578
+ error: `the GitHub releases API response could not be parsed: ${e instanceof Error ? e.message : String(e)}`,
21579
+ kind: "parse"
21580
+ };
21581
+ }
21582
+ const version = (body.tag_name ?? "").replace(/^v/, "");
21583
+ if (!/^\d+\.\d+\.\d+/.test(version)) {
21584
+ return {
21585
+ error: `the GitHub releases API response could not be parsed: unexpected tag_name "${body.tag_name ?? ""}"`,
21586
+ kind: "parse"
21510
21587
  };
21511
- } catch {
21512
- return null;
21513
21588
  }
21589
+ const asset = assetNameFor(platform, arch);
21590
+ const pick = (name) => body.assets?.find((a) => a.name === name);
21591
+ const found = pick(asset);
21592
+ const sha = pick(`${asset}.sha256`);
21593
+ const sig = pick(`${asset}.sha256.sig`);
21594
+ if (!found?.browser_download_url && !found?.url) {
21595
+ return { error: `asset ${asset} not found on release v${version}`, kind: "publishing" };
21596
+ }
21597
+ if (!sha?.browser_download_url && !sha?.url) {
21598
+ return { error: `asset ${asset}.sha256 not found on release v${version}`, kind: "publishing" };
21599
+ }
21600
+ const pair = (a) => {
21601
+ const api = a?.url;
21602
+ const browser = a?.browser_download_url;
21603
+ return api && browser ? { primary: api, fallback: browser } : { primary: api ?? browser ?? "", fallback: void 0 };
21604
+ };
21605
+ const assetPair = pair(found);
21606
+ const shaPair = pair(sha);
21607
+ const sigPair = pair(sig);
21608
+ return {
21609
+ version,
21610
+ assetUrl: assetPair.primary,
21611
+ shaUrl: shaPair.primary,
21612
+ sigUrl: sigPair.primary || void 0,
21613
+ assetFallbackUrl: assetPair.fallback,
21614
+ shaFallbackUrl: shaPair.fallback,
21615
+ sigFallbackUrl: sigPair.fallback
21616
+ };
21514
21617
  }
21515
21618
  function realSelfUpdateDeps(context, net = {}) {
21619
+ const log = (line) => console.warn(line);
21620
+ const stallTimeoutMs = net.stallTimeoutMs ?? ASSET_STALL_TIMEOUT_MS;
21621
+ const progressIntervalMs = net.progressIntervalMs ?? ASSET_PROGRESS_INTERVAL_MS;
21516
21622
  return {
21517
21623
  execPath: process.execPath,
21518
21624
  platform: process.platform,
@@ -21521,13 +21627,17 @@ function realSelfUpdateDeps(context, net = {}) {
21521
21627
  sourceDir: process.env.HARNESSED_UPDATE_SOURCE_DIR?.trim() || null,
21522
21628
  resolveRelease: () => resolveLatestRelease(process.platform, process.arch, net),
21523
21629
  downloadTo: async (url, dest, fallbackUrl) => {
21524
- const res = await fetchAsset(url, fallbackUrl, 12e4, net, "binary");
21525
- const buf = Buffer.from(await res.arrayBuffer());
21526
- await writeFile(dest, buf);
21630
+ await fetchAsset(
21631
+ url,
21632
+ fallbackUrl,
21633
+ ASSET_HEADERS_TIMEOUT_MS,
21634
+ net,
21635
+ "binary",
21636
+ (res, attempt) => streamAssetToFile(res, dest, attempt, stallTimeoutMs, progressIntervalMs, log)
21637
+ );
21527
21638
  },
21528
21639
  fetchShaText: async (url, fallbackUrl) => {
21529
- const res = await fetchAsset(url, fallbackUrl, 3e4, net, "checksum");
21530
- return res.text();
21640
+ return fetchAsset(url, fallbackUrl, CHECKSUM_TIMEOUT_MS, net, "checksum", (res) => res.text());
21531
21641
  },
21532
21642
  smoke: async (bin) => {
21533
21643
  const { execFile: execFile5 } = await import('child_process');
@@ -21541,7 +21651,7 @@ function realSelfUpdateDeps(context, net = {}) {
21541
21651
  return stdout2;
21542
21652
  },
21543
21653
  stateRoot: () => context.platform.stateRoot,
21544
- log: (l) => console.warn(l),
21654
+ log,
21545
21655
  pid: process.pid
21546
21656
  };
21547
21657
  }
@@ -21557,7 +21667,7 @@ async function execDirWritable(execPath) {
21557
21667
  return false;
21558
21668
  }
21559
21669
  }
21560
- var OWNER_REPO, RELEASES_LATEST_URL, DOWNLOAD_ATTEMPTS;
21670
+ var OWNER_REPO, RELEASES_LATEST_URL, RELEASE_METADATA_TIMEOUT_MS, ASSET_HEADERS_TIMEOUT_MS, CHECKSUM_TIMEOUT_MS, ASSET_STALL_TIMEOUT_MS, ASSET_PROGRESS_INTERVAL_MS, RequestTimeoutError, TransferStalledError, DOWNLOAD_ATTEMPTS;
21561
21671
  var init_selfUpdateBinary = __esm({
21562
21672
  "src/cli/lib/selfUpdateBinary.ts"() {
21563
21673
  init_package();
@@ -21567,6 +21677,15 @@ var init_selfUpdateBinary = __esm({
21567
21677
  init_version_check();
21568
21678
  OWNER_REPO = "easyinplay/harnessed";
21569
21679
  RELEASES_LATEST_URL = `https://api.github.com/repos/${OWNER_REPO}/releases/latest`;
21680
+ RELEASE_METADATA_TIMEOUT_MS = 3e4;
21681
+ ASSET_HEADERS_TIMEOUT_MS = 12e4;
21682
+ CHECKSUM_TIMEOUT_MS = 3e4;
21683
+ ASSET_STALL_TIMEOUT_MS = 12e4;
21684
+ ASSET_PROGRESS_INTERVAL_MS = 6e4;
21685
+ RequestTimeoutError = class extends Error {
21686
+ };
21687
+ TransferStalledError = class extends Error {
21688
+ };
21570
21689
  DOWNLOAD_ATTEMPTS = 3;
21571
21690
  }
21572
21691
  });
@@ -22892,7 +23011,6 @@ var init_refreshOwnedUpdate = __esm({
22892
23011
  ["cc-hooks", "update-reminder"],
22893
23012
  ["optional", "perturn-inject"],
22894
23013
  ["optional", "perturn-inject-invalidate"],
22895
- ["optional", "stop-hook-recover"],
22896
23014
  ["cc-hooks", "dashboard-autospawn"]
22897
23015
  ];
22898
23016
  }
@@ -26244,27 +26362,6 @@ var init_setup = __esm({
26244
26362
  }
26245
26363
  });
26246
26364
 
26247
- // src/cli/stopHookCmd.ts
26248
- var stopHookCmd_exports = {};
26249
- __export(stopHookCmd_exports, {
26250
- registerStopHook: () => registerStopHook
26251
- });
26252
- function registerStopHook(program2) {
26253
- program2.command("stop-hook").description("(internal) Stop hook \u2014 auto-recovers mode-B tool-call corruption (issue #6)").action(async () => {
26254
- try {
26255
- const mjs = join(getAssetsRoot(), "bin", "harnessed-stop-hook.mjs");
26256
- if (!existsSync(mjs)) return;
26257
- await import(pathToFileURL(mjs).href);
26258
- } catch {
26259
- }
26260
- });
26261
- }
26262
- var init_stopHookCmd = __esm({
26263
- "src/cli/stopHookCmd.ts"() {
26264
- init_assetsRoot();
26265
- }
26266
- });
26267
-
26268
26365
  // src/uninstallers/lib/runOrPreview.ts
26269
26366
  function dryRunGate(ctx) {
26270
26367
  if (ctx.opts.dryRun) return { aborted: true, reason: "dry-run" };
@@ -27935,7 +28032,6 @@ var { registerRollback: registerRollback2 } = await Promise.resolve().then(() =>
27935
28032
  var { registerRun: registerRun2 } = await Promise.resolve().then(() => (init_run2(), run_exports));
27936
28033
  var { registerSetup: registerSetup2 } = await Promise.resolve().then(() => (init_setup(), setup_exports));
27937
28034
  var { registerStatus: registerStatus2 } = await Promise.resolve().then(() => (init_status(), status_exports));
27938
- var { registerStopHook: registerStopHook2 } = await Promise.resolve().then(() => (init_stopHookCmd(), stopHookCmd_exports));
27939
28035
  var { registerUninstall: registerUninstall2 } = await Promise.resolve().then(() => (init_uninstall(), uninstall_exports));
27940
28036
  var { registerUpdate: registerUpdate2 } = await Promise.resolve().then(() => (init_update(), update_exports));
27941
28037
  var { registerWorkflows: registerWorkflows2 } = await Promise.resolve().then(() => (init_workflows(), workflows_exports));
@@ -28026,7 +28122,6 @@ registerUpdate2(program);
28026
28122
  registerReleasePreflight2(program);
28027
28123
  registerRetro2(program);
28028
28124
  registerInjectState2(program);
28029
- registerStopHook2(program);
28030
28125
  registerEval2(program);
28031
28126
  registerCheckDocs2(program);
28032
28127
  registerFacts2(program);