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