@adhdev/daemon-core 0.9.82-rc.418 → 0.9.82-rc.419

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/dist/index.mjs CHANGED
@@ -384,10 +384,10 @@ function readInjected(value) {
384
384
  }
385
385
  function getDaemonBuildInfo() {
386
386
  if (cached) return cached;
387
- const commit = readInjected(true ? "143c6a0cea61d764bf955548c73cdd3dd28c5849" : void 0) ?? "unknown";
388
- const commitShort = readInjected(true ? "143c6a0c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
389
- const version = readInjected(true ? "0.9.82-rc.418" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
390
- const builtAt = readInjected(true ? "2026-06-28T17:20:10.661Z" : void 0);
387
+ const commit = readInjected(true ? "00b0b1bba6930ac68b6c43e87795cbe63e59b323" : void 0) ?? "unknown";
388
+ const commitShort = readInjected(true ? "00b0b1bb" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
389
+ const version = readInjected(true ? "0.9.82-rc.419" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
390
+ const builtAt = readInjected(true ? "2026-06-28T18:13:37.481Z" : void 0);
391
391
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
392
392
  return cached;
393
393
  }
@@ -8625,6 +8625,36 @@ import { execFile as execFile3, execFileSync as execFileSync2 } from "child_proc
8625
8625
  import { createHash as createHash2 } from "crypto";
8626
8626
  import { promisify as promisify3 } from "util";
8627
8627
  import * as yaml3 from "js-yaml";
8628
+ function getRegisteredSubmodulePaths(workspace) {
8629
+ const paths = /* @__PURE__ */ new Set();
8630
+ try {
8631
+ const out = execFileSync2(
8632
+ resolveWin32Executable("git"),
8633
+ ["config", "--file", ".gitmodules", "--get-regexp", "path"],
8634
+ { cwd: workspace, encoding: "utf8", timeout: 1e4, windowsHide: true }
8635
+ );
8636
+ for (const line of String(out).split(/\r?\n/)) {
8637
+ const trimmed = line.trim();
8638
+ if (!trimmed) continue;
8639
+ const spaceIdx = trimmed.indexOf(" ");
8640
+ if (spaceIdx < 0) continue;
8641
+ const value = trimmed.slice(spaceIdx + 1).trim().replace(/\\/g, "/").replace(/\/+$/, "");
8642
+ if (value) paths.add(value);
8643
+ }
8644
+ } catch {
8645
+ }
8646
+ return paths;
8647
+ }
8648
+ function isCleanIgnoringSubmoduleGitlinks(porcelain, submodulePaths) {
8649
+ const lines = porcelain.split(/\r?\n/).filter((line) => line.length > 0);
8650
+ for (const line of lines) {
8651
+ const status = line.slice(0, 2);
8652
+ const path43 = line.slice(3).trim().replace(/\\/g, "/").replace(/\/+$/, "");
8653
+ const isGitlinkPointerMove = (status === " M" || status === "M ") && submodulePaths.has(path43);
8654
+ if (!isGitlinkPointerMove) return false;
8655
+ }
8656
+ return true;
8657
+ }
8628
8658
  function isWorktreeBootstrapStaleRunning(node, nowMs = Date.now()) {
8629
8659
  const wb = node?.worktreeBootstrap;
8630
8660
  if (!wb || wb.status !== "running") return false;
@@ -8642,7 +8672,11 @@ function isWorktreeBootstrapStaleRunning(node, nowMs = Date.now()) {
8642
8672
  timeout: 1e4,
8643
8673
  windowsHide: true
8644
8674
  });
8645
- return String(out).trim() === "";
8675
+ const porcelain = String(out).replace(/\r?\n$/, "");
8676
+ if (porcelain.trim() === "") return true;
8677
+ const submodulePaths = getRegisteredSubmodulePaths(workspace);
8678
+ if (submodulePaths.size === 0) return false;
8679
+ return isCleanIgnoringSubmoduleGitlinks(porcelain, submodulePaths);
8646
8680
  } catch {
8647
8681
  return false;
8648
8682
  }
@@ -8728,6 +8762,7 @@ function evaluateWorktreeBootstrapState(mesh, workspace, persisted) {
8728
8762
  }
8729
8763
  if (persisted?.status === "running") return { ...persisted, required };
8730
8764
  if (persisted?.status === "failed") return { ...persisted, required };
8765
+ if (persisted?.status === "complete") return { ...persisted, required };
8731
8766
  if (persisted?.status === "ready") {
8732
8767
  const staleInputs = loaded.config.staleInputs ?? persisted.staleInputs ?? [];
8733
8768
  if (staleInputs.length > 0 && persisted.staleInputsDigest) {