@adhdev/daemon-standalone 0.9.82-rc.530 → 0.9.82-rc.531
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 +34 -11
- 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 ? "e3fc80a7e951a782e3a4e192d432e9b5fc3ee1ab" : void 0) ?? "unknown";
|
|
30212
|
+
const commitShort = readInjected(true ? "e3fc80a7" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
30213
|
+
const version2 = readInjected(true ? "0.9.82-rc.531" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
30214
|
+
const builtAt = readInjected(true ? "2026-07-15T05:51:59.547Z" : void 0);
|
|
30215
30215
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
30216
30216
|
return cached2;
|
|
30217
30217
|
}
|
|
@@ -54589,6 +54589,9 @@ ${cleanBody}`;
|
|
|
54589
54589
|
function splitLines(text) {
|
|
54590
54590
|
return stripAnsi2(text).replace(//g, "").split(/\r?\n/).map((l) => l.replace(/\s+$/, ""));
|
|
54591
54591
|
}
|
|
54592
|
+
function splitRawLines(text) {
|
|
54593
|
+
return String(text || "").split(/\r?\n/).map((rawLine) => ({ raw: rawLine, text: stripAnsi2(rawLine).replace(/[\x00-\x08\x0b-\x1f\x7f]/g, "").replace(/\s+$/, "") }));
|
|
54594
|
+
}
|
|
54592
54595
|
function pickInputText(input, scope) {
|
|
54593
54596
|
if (!input) return "";
|
|
54594
54597
|
if (scope === "screen") return String(input.screenText || input.screen?.text || "");
|
|
@@ -54637,6 +54640,11 @@ ${cleanBody}`;
|
|
|
54637
54640
|
const requireIndentForContinuation = spec.transcriptPty.continuationLine?.indented ?? false;
|
|
54638
54641
|
const stripLeadingChrome = spec.transcriptPty.stripLeadingChrome ?? true;
|
|
54639
54642
|
const scope = spec.transcriptPty.scope ?? "buffer";
|
|
54643
|
+
const userBgList = Array.isArray(spec.transcriptPty.userBackgroundSgr) ? spec.transcriptPty.userBackgroundSgr.map((s2) => String(s2).trim()).filter(Boolean) : [];
|
|
54644
|
+
const userBgRes = userBgList.map((code) => {
|
|
54645
|
+
const esc2 = code.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
54646
|
+
return new RegExp(`\\x1b\\[[0-9;]*${esc2}[0-9;]*m`);
|
|
54647
|
+
});
|
|
54640
54648
|
const detectStatus = spec.spinner || spec.settledPrompt || spec.modal || spec.dispatchOrder ? buildDetectStatusFromTui({
|
|
54641
54649
|
spinner: spec.spinner,
|
|
54642
54650
|
settledPrompt: spec.settledPrompt,
|
|
@@ -54653,11 +54661,11 @@ ${cleanBody}`;
|
|
|
54653
54661
|
const status = detectStatus(input) ?? "idle";
|
|
54654
54662
|
const modal = parseApproval(input);
|
|
54655
54663
|
const text = pickInputText(input, scope);
|
|
54656
|
-
const
|
|
54664
|
+
const rawLines = userBgRes.length > 0 ? splitRawLines(text) : splitLines(text).map((t) => ({ raw: "", text: t }));
|
|
54657
54665
|
const messages = [];
|
|
54658
54666
|
let seenFirstRoleLine = !stripLeadingChrome;
|
|
54659
|
-
for (const
|
|
54660
|
-
const line =
|
|
54667
|
+
for (const entry of rawLines) {
|
|
54668
|
+
const line = entry.text;
|
|
54661
54669
|
if (line.trim() === "") {
|
|
54662
54670
|
continue;
|
|
54663
54671
|
}
|
|
@@ -54669,6 +54677,12 @@ ${cleanBody}`;
|
|
|
54669
54677
|
}
|
|
54670
54678
|
}
|
|
54671
54679
|
if (isChrome) continue;
|
|
54680
|
+
if (userBgRes.length > 0 && entry.raw && userBgRes.some((re) => re.test(entry.raw))) {
|
|
54681
|
+
seenFirstRoleLine = true;
|
|
54682
|
+
const content = line.replace(/^\s*[→>›❯]\s*/, "").trim();
|
|
54683
|
+
if (content) messages.push({ role: "user", kind: "standard", content });
|
|
54684
|
+
continue;
|
|
54685
|
+
}
|
|
54672
54686
|
const userMatch = userRe ? line.match(userRe) : null;
|
|
54673
54687
|
const toolMatch = toolRe ? line.match(toolRe) : null;
|
|
54674
54688
|
const assistMatch = line.match(assistantRe);
|
|
@@ -74031,11 +74045,16 @@ ${body}
|
|
|
74031
74045
|
let sessionRow;
|
|
74032
74046
|
try {
|
|
74033
74047
|
const sessionFloorSeconds = typeof input.sessionStartedAtMs === "number" ? Math.floor(input.sessionStartedAtMs / 1e3) : 0;
|
|
74048
|
+
const workspaceHint = typeof input.workspace === "string" ? input.workspace : "";
|
|
74034
74049
|
const stmt = db.prepare(src.session_query);
|
|
74035
74050
|
try {
|
|
74036
|
-
sessionRow = stmt.get(sessionFloorSeconds);
|
|
74051
|
+
sessionRow = stmt.get({ floor: sessionFloorSeconds, workspace: workspaceHint });
|
|
74037
74052
|
} catch {
|
|
74038
|
-
|
|
74053
|
+
try {
|
|
74054
|
+
sessionRow = stmt.get(sessionFloorSeconds);
|
|
74055
|
+
} catch {
|
|
74056
|
+
sessionRow = stmt.get();
|
|
74057
|
+
}
|
|
74039
74058
|
}
|
|
74040
74059
|
} catch {
|
|
74041
74060
|
return "";
|
|
@@ -74068,12 +74087,14 @@ ${body}
|
|
|
74068
74087
|
}
|
|
74069
74088
|
}
|
|
74070
74089
|
if (messages.length === 0) return null;
|
|
74090
|
+
const resultWorkspace = messages.find((m) => m.workspace)?.workspace;
|
|
74071
74091
|
return {
|
|
74072
74092
|
messages,
|
|
74073
74093
|
providerSessionId: sessionId,
|
|
74074
74094
|
sourcePath: resolved,
|
|
74075
74095
|
sourceMtimeMs: mtime,
|
|
74076
|
-
nativeHistoryCoverage: "full"
|
|
74096
|
+
nativeHistoryCoverage: "full",
|
|
74097
|
+
...resultWorkspace ? { workspace: resultWorkspace } : {}
|
|
74077
74098
|
};
|
|
74078
74099
|
} finally {
|
|
74079
74100
|
try {
|
|
@@ -74539,9 +74560,11 @@ ${body}
|
|
|
74539
74560
|
return out;
|
|
74540
74561
|
}
|
|
74541
74562
|
}
|
|
74563
|
+
const workspaceRaw = map2.workspace ? jsonPathGet(record2, map2.workspace) : void 0;
|
|
74564
|
+
const workspace = typeof workspaceRaw === "string" && workspaceRaw.trim() ? workspaceRaw.trim() : void 0;
|
|
74542
74565
|
const contentRaw = jsonPathGet(record2, map2.content);
|
|
74543
74566
|
const content = cleanContent(stringifyContent(contentRaw), map2);
|
|
74544
|
-
if (content) out.push({ role, content, receivedAt, kind });
|
|
74567
|
+
if (content) out.push(workspace ? { role, content, receivedAt, kind, workspace } : { role, content, receivedAt, kind });
|
|
74545
74568
|
if (map2.tools && Array.isArray(contentRaw)) {
|
|
74546
74569
|
let nudge = 1;
|
|
74547
74570
|
for (const block2 of contentRaw) {
|