@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 +76 -40
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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 ? "
|
|
30212
|
-
const commitShort = readInjected(true ? "
|
|
30213
|
-
const version2 = readInjected(true ? "0.9.82-rc.
|
|
30214
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
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()
|
|
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
|
-
|
|
84683
|
-
|
|
84684
|
-
|
|
84685
|
-
|
|
84686
|
-
|
|
84687
|
-
|
|
84688
|
-
|
|
84689
|
-
|
|
84690
|
-
|
|
84691
|
-
|
|
84692
|
-
|
|
84693
|
-
|
|
84694
|
-
|
|
84695
|
-
|
|
84696
|
-
|
|
84697
|
-
|
|
84698
|
-
|
|
84699
|
-
|
|
84700
|
-
|
|
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 {
|