@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.js +35 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -5
- package/dist/index.mjs.map +1 -1
- package/dist/providers/sdk/v1/builders/cli/parse-session.d.ts +13 -0
- package/dist/providers/spec/types.d.ts +17 -0
- package/package.json +3 -3
- package/src/providers/sdk/v1/builders/cli/parse-session.ts +22 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-transcript-pty-v1.json +1 -1
- package/src/providers/spec/native-history-executor.ts +50 -1
- package/src/providers/spec/types.ts +17 -0
package/dist/index.js
CHANGED
|
@@ -419,10 +419,10 @@ function readInjected(value) {
|
|
|
419
419
|
}
|
|
420
420
|
function getDaemonBuildInfo() {
|
|
421
421
|
if (cached) return cached;
|
|
422
|
-
const commit = readInjected(true ? "
|
|
423
|
-
const commitShort = readInjected(true ? "
|
|
424
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
425
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
422
|
+
const commit = readInjected(true ? "e7001a2fe5b5af35d3710c964727f7e4d735e852" : void 0) ?? "unknown";
|
|
423
|
+
const commitShort = readInjected(true ? "e7001a2f" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
424
|
+
const version = readInjected(true ? "0.9.82-rc.536" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
425
|
+
const builtAt = readInjected(true ? "2026-07-15T11:34:59.318Z" : void 0);
|
|
426
426
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
427
427
|
return cached;
|
|
428
428
|
}
|
|
@@ -24808,7 +24808,11 @@ function buildParseSessionFromTui(spec) {
|
|
|
24808
24808
|
const stripLeadingChrome = spec.transcriptPty.stripLeadingChrome ?? true;
|
|
24809
24809
|
const scope = spec.transcriptPty.scope ?? "buffer";
|
|
24810
24810
|
const userBgList = Array.isArray(spec.transcriptPty.userBackgroundSgr) ? spec.transcriptPty.userBackgroundSgr.map((s2) => String(s2).trim()).filter(Boolean) : [];
|
|
24811
|
+
const ANY_BG_SENTINELS = /* @__PURE__ */ new Set(["*", "48;*", "bg", "48"]);
|
|
24811
24812
|
const userBgRes = userBgList.map((code) => {
|
|
24813
|
+
if (ANY_BG_SENTINELS.has(code.toLowerCase())) {
|
|
24814
|
+
return new RegExp("\\x1b\\[[0-9;]*\\b48;(?:5;\\d{1,3}|2;\\d{1,3};\\d{1,3};\\d{1,3})[0-9;]*m");
|
|
24815
|
+
}
|
|
24812
24816
|
const esc = code.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
24813
24817
|
return new RegExp(`\\x1b\\[[0-9;]*${esc}[0-9;]*m`);
|
|
24814
24818
|
});
|
|
@@ -44256,7 +44260,7 @@ function executeJsonl(src, input) {
|
|
|
44256
44260
|
const mtime = safeMtimeMs(sourcePath);
|
|
44257
44261
|
const lines = readJsonlLines(sourcePath);
|
|
44258
44262
|
if (lines.length === 0) return null;
|
|
44259
|
-
const transcriptWorkspace = readSessionMetaWorkspace(lines);
|
|
44263
|
+
const transcriptWorkspace = readSessionMetaWorkspace(lines) ?? (src.workspace_from_input ? workspaceFromInputIfSlugMatches(sourcePath, input) : void 0);
|
|
44260
44264
|
let providerSessionId;
|
|
44261
44265
|
if (src.session_id_from === "first_record" && src.session_id_path) {
|
|
44262
44266
|
const v = jsonPathGet(lines[0], src.session_id_path);
|
|
@@ -44339,6 +44343,32 @@ function readSessionMetaWorkspace(lines) {
|
|
|
44339
44343
|
}
|
|
44340
44344
|
return void 0;
|
|
44341
44345
|
}
|
|
44346
|
+
function workspaceFromInputIfSlugMatches(sourcePath, input) {
|
|
44347
|
+
const wsRaw = typeof input.workspace === "string" ? input.workspace.trim() : "";
|
|
44348
|
+
if (!wsRaw) return void 0;
|
|
44349
|
+
let wsReal = wsRaw;
|
|
44350
|
+
try {
|
|
44351
|
+
wsReal = fs17.realpathSync(wsRaw);
|
|
44352
|
+
} catch {
|
|
44353
|
+
}
|
|
44354
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
44355
|
+
for (const w of [wsReal, wsRaw]) {
|
|
44356
|
+
if (!w) continue;
|
|
44357
|
+
slugs.add(claudeProjectDirName(w));
|
|
44358
|
+
slugs.add(claudeProjectDirName(w.replace(/^\/+/, "")));
|
|
44359
|
+
}
|
|
44360
|
+
const segments = sourcePath.split(path24.sep);
|
|
44361
|
+
for (const seg of segments) {
|
|
44362
|
+
if (!seg) continue;
|
|
44363
|
+
for (const slug of slugs) {
|
|
44364
|
+
if (!slug) continue;
|
|
44365
|
+
if (seg === slug) return wsRaw;
|
|
44366
|
+
const m = seg.match(/^(.*)-[0-9a-f]{6,}$/);
|
|
44367
|
+
if (m && m[1] && m[1].length >= 8 && slug.startsWith(m[1])) return wsRaw;
|
|
44368
|
+
}
|
|
44369
|
+
}
|
|
44370
|
+
return void 0;
|
|
44371
|
+
}
|
|
44342
44372
|
function readJsonlLines(p) {
|
|
44343
44373
|
let text;
|
|
44344
44374
|
try {
|