@adhdev/daemon-standalone 0.9.82-rc.534 → 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.js CHANGED
@@ -30208,10 +30208,10 @@ var require_dist3 = __commonJS({
30208
30208
  }
30209
30209
  function getDaemonBuildInfo() {
30210
30210
  if (cached2) return cached2;
30211
- const commit = readInjected(true ? "7b6411ebc267c71484a3f7d16c392b5bd3e71bd8" : void 0) ?? "unknown";
30212
- const commitShort = readInjected(true ? "7b6411eb" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30213
- const version2 = readInjected(true ? "0.9.82-rc.534" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30214
- const builtAt = readInjected(true ? "2026-07-15T08:30:49.700Z" : void 0);
30211
+ const commit = readInjected(true ? "e7001a2fe5b5af35d3710c964727f7e4d735e852" : void 0) ?? "unknown";
30212
+ const commitShort = readInjected(true ? "e7001a2f" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30213
+ const version2 = readInjected(true ? "0.9.82-rc.536" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30214
+ const builtAt = readInjected(true ? "2026-07-15T11:40:00.569Z" : void 0);
30215
30215
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30216
30216
  return cached2;
30217
30217
  }
@@ -54741,7 +54741,11 @@ ${cleanBody}`;
54741
54741
  const stripLeadingChrome = spec.transcriptPty.stripLeadingChrome ?? true;
54742
54742
  const scope = spec.transcriptPty.scope ?? "buffer";
54743
54743
  const userBgList = Array.isArray(spec.transcriptPty.userBackgroundSgr) ? spec.transcriptPty.userBackgroundSgr.map((s2) => String(s2).trim()).filter(Boolean) : [];
54744
+ const ANY_BG_SENTINELS = /* @__PURE__ */ new Set(["*", "48;*", "bg", "48"]);
54744
54745
  const userBgRes = userBgList.map((code) => {
54746
+ if (ANY_BG_SENTINELS.has(code.toLowerCase())) {
54747
+ return new RegExp("\\x1b\\[[0-9;]*\\b48;(?:5;\\d{1,3}|2;\\d{1,3};\\d{1,3};\\d{1,3})[0-9;]*m");
54748
+ }
54745
54749
  const esc2 = code.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
54746
54750
  return new RegExp(`\\x1b\\[[0-9;]*${esc2}[0-9;]*m`);
54747
54751
  });
@@ -56120,7 +56124,7 @@ ${cont}` : cont;
56120
56124
  if (!this.isWaitingForResponse || this.hasActionableApproval()) return false;
56121
56125
  const snap = this.transport.getSnapshot();
56122
56126
  const detectFn = typeof this.transport.runDetectStatus === "function" ? () => this.transport.runDetectStatus(snap.recentOutputBuffer) : () => this.runDetectStatus(snap);
56123
- const latestStatus = detectFn() || this.currentStatus;
56127
+ const latestStatus = detectFn();
56124
56128
  if (latestStatus === "generating") {
56125
56129
  this.evaluateSettled(snap);
56126
56130
  return true;
@@ -74023,7 +74027,7 @@ ${body}
74023
74027
  const mtime = safeMtimeMs(sourcePath);
74024
74028
  const lines = readJsonlLines(sourcePath);
74025
74029
  if (lines.length === 0) return null;
74026
- const transcriptWorkspace = readSessionMetaWorkspace(lines);
74030
+ const transcriptWorkspace = readSessionMetaWorkspace(lines) ?? (src.workspace_from_input ? workspaceFromInputIfSlugMatches(sourcePath, input) : void 0);
74027
74031
  let providerSessionId;
74028
74032
  if (src.session_id_from === "first_record" && src.session_id_path) {
74029
74033
  const v = jsonPathGet(lines[0], src.session_id_path);
@@ -74106,6 +74110,32 @@ ${body}
74106
74110
  }
74107
74111
  return void 0;
74108
74112
  }
74113
+ function workspaceFromInputIfSlugMatches(sourcePath, input) {
74114
+ const wsRaw = typeof input.workspace === "string" ? input.workspace.trim() : "";
74115
+ if (!wsRaw) return void 0;
74116
+ let wsReal = wsRaw;
74117
+ try {
74118
+ wsReal = fs17.realpathSync(wsRaw);
74119
+ } catch {
74120
+ }
74121
+ const slugs = /* @__PURE__ */ new Set();
74122
+ for (const w of [wsReal, wsRaw]) {
74123
+ if (!w) continue;
74124
+ slugs.add(claudeProjectDirName(w));
74125
+ slugs.add(claudeProjectDirName(w.replace(/^\/+/, "")));
74126
+ }
74127
+ const segments = sourcePath.split(path24.sep);
74128
+ for (const seg of segments) {
74129
+ if (!seg) continue;
74130
+ for (const slug of slugs) {
74131
+ if (!slug) continue;
74132
+ if (seg === slug) return wsRaw;
74133
+ const m = seg.match(/^(.*)-[0-9a-f]{6,}$/);
74134
+ if (m && m[1] && m[1].length >= 8 && slug.startsWith(m[1])) return wsRaw;
74135
+ }
74136
+ }
74137
+ return void 0;
74138
+ }
74109
74139
  function readJsonlLines(p) {
74110
74140
  let text;
74111
74141
  try {
@@ -84650,10 +84680,10 @@ Run 'adhdev doctor' for detailed diagnostics.`
84650
84680
  candidates.push(path45.join(providerDir, "specs", "default.json"));
84651
84681
  candidates.push(path45.join(providerDir, "spec.json"));
84652
84682
  const specPath = candidates.find((p) => fs42.existsSync(p));
84683
+ let nh;
84653
84684
  if (specPath) {
84654
84685
  resolved._resolvedSpecPath = specPath;
84655
84686
  let specControls;
84656
- let nh;
84657
84687
  try {
84658
84688
  const rawSpec = JSON.parse(fs42.readFileSync(specPath, "utf8"));
84659
84689
  specControls = rawSpec.control_bar;
@@ -84679,42 +84709,48 @@ Run 'adhdev doctor' for detailed diagnostics.`
84679
84709
  }
84680
84710
  }
84681
84711
  }
84682
- if (nh) {
84683
- let reader = null;
84684
- let format = "spec";
84685
- if (nh.source) {
84686
- format = `spec-${nh.source.kind}`;
84687
- reader = (input) => executeNativeHistory(nh, input);
84688
- } else if (nh.override_path) {
84689
- const overrideFile = path45.resolve(providerDir, nh.override_path);
84690
- if (fs42.existsSync(overrideFile)) {
84691
- try {
84692
- registerProviderScriptRootSafely(path45.dirname(path45.dirname(providerDir)));
84693
- delete require.cache[require.resolve(overrideFile)];
84694
- const mod = require(overrideFile);
84695
- const fn = typeof mod === "function" ? mod : mod && typeof mod.default === "function" ? mod.default : null;
84696
- if (fn) {
84697
- format = "spec-override";
84698
- reader = (input) => fn(input);
84699
- }
84700
- } catch {
84712
+ }
84713
+ if (!nh) {
84714
+ const inlineNh = base?.nativeHistory || resolved?.nativeHistory;
84715
+ if (inlineNh && (inlineNh.source || inlineNh.override_path || inlineNh.reader)) {
84716
+ nh = inlineNh;
84717
+ }
84718
+ }
84719
+ if (nh) {
84720
+ let reader = null;
84721
+ let format = "spec";
84722
+ if (nh.source) {
84723
+ format = `spec-${nh.source.kind}`;
84724
+ reader = (input) => executeNativeHistory(nh, input);
84725
+ } else if (nh.override_path) {
84726
+ const overrideFile = path45.resolve(providerDir, nh.override_path);
84727
+ if (fs42.existsSync(overrideFile)) {
84728
+ try {
84729
+ registerProviderScriptRootSafely(path45.dirname(path45.dirname(providerDir)));
84730
+ delete require.cache[require.resolve(overrideFile)];
84731
+ const mod = require(overrideFile);
84732
+ const fn = typeof mod === "function" ? mod : mod && typeof mod.default === "function" ? mod.default : null;
84733
+ if (fn) {
84734
+ format = "spec-override";
84735
+ reader = (input) => fn(input);
84701
84736
  }
84737
+ } catch {
84702
84738
  }
84703
- } else if (nh.reader) {
84704
- const dispatch = createNativeHistoryDispatcher(nh.reader);
84705
- format = nh.reader;
84706
- reader = (input) => dispatch(input);
84707
- }
84708
- if (reader) {
84709
- resolved.scripts = { ...resolved.scripts || {} };
84710
- resolved.scripts.readNativeHistory = reader;
84711
- resolved.nativeHistory = {
84712
- format,
84713
- watchPath: void 0,
84714
- scripts: { readSession: "readNativeHistory" },
84715
- mode: "native-source"
84716
- };
84717
84739
  }
84740
+ } else if (nh.reader) {
84741
+ const dispatch = createNativeHistoryDispatcher(nh.reader);
84742
+ format = nh.reader;
84743
+ reader = (input) => dispatch(input);
84744
+ }
84745
+ if (reader) {
84746
+ resolved.scripts = { ...resolved.scripts || {} };
84747
+ resolved.scripts.readNativeHistory = reader;
84748
+ resolved.nativeHistory = {
84749
+ format,
84750
+ watchPath: void 0,
84751
+ scripts: { readSession: "readNativeHistory" },
84752
+ mode: "native-source"
84753
+ };
84718
84754
  }
84719
84755
  }
84720
84756
  } catch {