@adhdev/daemon-core 0.9.82-rc.535 → 0.9.82-rc.536

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
@@ -414,10 +414,10 @@ function readInjected(value) {
414
414
  }
415
415
  function getDaemonBuildInfo() {
416
416
  if (cached) return cached;
417
- const commit = readInjected(true ? "207830c90b06f2f738a85f74079a2460d53767c8" : void 0) ?? "unknown";
418
- const commitShort = readInjected(true ? "207830c9" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
419
- const version = readInjected(true ? "0.9.82-rc.535" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
420
- const builtAt = readInjected(true ? "2026-07-15T10:22:51.070Z" : void 0);
417
+ const commit = readInjected(true ? "e7001a2fe5b5af35d3710c964727f7e4d735e852" : void 0) ?? "unknown";
418
+ const commitShort = readInjected(true ? "e7001a2f" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
419
+ const version = readInjected(true ? "0.9.82-rc.536" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
420
+ const builtAt = readInjected(true ? "2026-07-15T11:34:59.318Z" : void 0);
421
421
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
422
422
  return cached;
423
423
  }
@@ -24810,7 +24810,11 @@ function buildParseSessionFromTui(spec) {
24810
24810
  const stripLeadingChrome = spec.transcriptPty.stripLeadingChrome ?? true;
24811
24811
  const scope = spec.transcriptPty.scope ?? "buffer";
24812
24812
  const userBgList = Array.isArray(spec.transcriptPty.userBackgroundSgr) ? spec.transcriptPty.userBackgroundSgr.map((s2) => String(s2).trim()).filter(Boolean) : [];
24813
+ const ANY_BG_SENTINELS = /* @__PURE__ */ new Set(["*", "48;*", "bg", "48"]);
24813
24814
  const userBgRes = userBgList.map((code) => {
24815
+ if (ANY_BG_SENTINELS.has(code.toLowerCase())) {
24816
+ return new RegExp("\\x1b\\[[0-9;]*\\b48;(?:5;\\d{1,3}|2;\\d{1,3};\\d{1,3};\\d{1,3})[0-9;]*m");
24817
+ }
24814
24818
  const esc = code.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
24815
24819
  return new RegExp(`\\x1b\\[[0-9;]*${esc}[0-9;]*m`);
24816
24820
  });
@@ -43828,7 +43832,7 @@ function executeJsonl(src, input) {
43828
43832
  const mtime = safeMtimeMs(sourcePath);
43829
43833
  const lines = readJsonlLines(sourcePath);
43830
43834
  if (lines.length === 0) return null;
43831
- const transcriptWorkspace = readSessionMetaWorkspace(lines);
43835
+ const transcriptWorkspace = readSessionMetaWorkspace(lines) ?? (src.workspace_from_input ? workspaceFromInputIfSlugMatches(sourcePath, input) : void 0);
43832
43836
  let providerSessionId;
43833
43837
  if (src.session_id_from === "first_record" && src.session_id_path) {
43834
43838
  const v = jsonPathGet(lines[0], src.session_id_path);
@@ -43911,6 +43915,32 @@ function readSessionMetaWorkspace(lines) {
43911
43915
  }
43912
43916
  return void 0;
43913
43917
  }
43918
+ function workspaceFromInputIfSlugMatches(sourcePath, input) {
43919
+ const wsRaw = typeof input.workspace === "string" ? input.workspace.trim() : "";
43920
+ if (!wsRaw) return void 0;
43921
+ let wsReal = wsRaw;
43922
+ try {
43923
+ wsReal = fs17.realpathSync(wsRaw);
43924
+ } catch {
43925
+ }
43926
+ const slugs = /* @__PURE__ */ new Set();
43927
+ for (const w of [wsReal, wsRaw]) {
43928
+ if (!w) continue;
43929
+ slugs.add(claudeProjectDirName(w));
43930
+ slugs.add(claudeProjectDirName(w.replace(/^\/+/, "")));
43931
+ }
43932
+ const segments = sourcePath.split(path24.sep);
43933
+ for (const seg of segments) {
43934
+ if (!seg) continue;
43935
+ for (const slug of slugs) {
43936
+ if (!slug) continue;
43937
+ if (seg === slug) return wsRaw;
43938
+ const m = seg.match(/^(.*)-[0-9a-f]{6,}$/);
43939
+ if (m && m[1] && m[1].length >= 8 && slug.startsWith(m[1])) return wsRaw;
43940
+ }
43941
+ }
43942
+ return void 0;
43943
+ }
43914
43944
  function readJsonlLines(p) {
43915
43945
  let text;
43916
43946
  try {