sessiongraph-app-darwin-arm64 1.0.26 → 1.0.27
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/package.json +2 -2
- package/payload/SessionGraph.app/Contents/Info.plist +2 -2
- package/payload/SessionGraph.app/Contents/MacOS/sessiongraph +0 -0
- package/payload/SessionGraph.app/Contents/Resources/resources/cli-package.json +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/cli.mjs +210 -46
- package/payload/SessionGraph.app/Contents/Resources/resources/server.mjs +236 -81
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{index-D4p45n7i.js → index-BDlenc5U.js} +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{index-YT1ntRdY.js → index-BVcGr0Qy.js} +7 -7
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{index-B05th82t.js → index-CI08Hryc.js} +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{index-DFcP_XK3.js → index-Ds6_5DlV.js} +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{public-viewer-DZqNLaJW.js → public-viewer-BR7Jvjf3.js} +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{scene-BkT0QJrf.js → scene-CaX0r4Hf.js} +1 -1
- package/payload/SessionGraph.app/Contents/Resources/resources/web/assets/{share-jfnlc0aB.js → share-C0Ryjhbj.js} +3 -3
- package/payload/SessionGraph.app/Contents/Resources/resources/web/index.html +1 -1
- package/payload/SessionGraph.app/Contents/_CodeSignature/CodeResources +40 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sessiongraph-app-darwin-arm64",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "Explore & visualize all your LLM sessions — darwin/arm64",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"access": "public",
|
|
11
11
|
"registry": "https://registry.npmjs.org/"
|
|
12
12
|
},
|
|
13
|
-
"sessionGraphCommit": "
|
|
13
|
+
"sessionGraphCommit": "80473c2689fd8ff47b36ab15150f4270290d57ab",
|
|
14
14
|
"os": [
|
|
15
15
|
"darwin"
|
|
16
16
|
],
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
<key>CFBundlePackageType</key>
|
|
18
18
|
<string>APPL</string>
|
|
19
19
|
<key>CFBundleShortVersionString</key>
|
|
20
|
-
<string>1.0.
|
|
20
|
+
<string>1.0.27</string>
|
|
21
21
|
<key>CFBundleVersion</key>
|
|
22
|
-
<string>1.0.
|
|
22
|
+
<string>1.0.27</string>
|
|
23
23
|
<key>CSResourcesFileMapped</key>
|
|
24
24
|
<true/>
|
|
25
25
|
<key>LSApplicationCategoryType</key>
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.27","buildID":"46bb17d3df5f3b48e624072d9d0991b666d3aadfa1552d23a4f4d7f1b7c496a5"}
|
|
@@ -17373,8 +17373,8 @@ function rewriteKeyNames(ctx) {
|
|
|
17373
17373
|
bySchema.set(entry.schema, entry);
|
|
17374
17374
|
}
|
|
17375
17375
|
const rewrites = /* @__PURE__ */ new Map();
|
|
17376
|
-
for (const
|
|
17377
|
-
const seen = ctx.seen.get(
|
|
17376
|
+
for (const record3 of pendingRecords.get(ctx) ?? []) {
|
|
17377
|
+
const seen = ctx.seen.get(record3);
|
|
17378
17378
|
const names = (seen?.def ?? seen?.schema)?.propertyNames;
|
|
17379
17379
|
if (!names || names === true || rewrites.has(names))
|
|
17380
17380
|
continue;
|
|
@@ -24014,16 +24014,16 @@ async function publish(file2, info, handoff2) {
|
|
|
24014
24014
|
await rename(temporary, file2 + ".pty-handoff").finally(() => rm(temporary, { force: true }));
|
|
24015
24015
|
}
|
|
24016
24016
|
async function environment2(file2, env2) {
|
|
24017
|
-
const
|
|
24017
|
+
const record3 = await read(file2);
|
|
24018
24018
|
const current = await readFile(file2, "utf8").then((text4) => JSON.parse(text4)).catch(() => {
|
|
24019
24019
|
return;
|
|
24020
24020
|
});
|
|
24021
|
-
const handoff2 =
|
|
24021
|
+
const handoff2 = record3 !== void 0 && record3.expiresAt > Date.now() && (current === void 0 || same(record3.source, current)) ? record3.handoff : void 0;
|
|
24022
24022
|
return { ...env2, OPENCODE_PTY_HANDOFF: handoff2 == null ? void 0 : JSON.stringify(handoff2) };
|
|
24023
24023
|
}
|
|
24024
24024
|
async function complete2(file2, info) {
|
|
24025
|
-
const
|
|
24026
|
-
if (
|
|
24025
|
+
const record3 = await read(file2);
|
|
24026
|
+
if (record3 !== void 0 && !same(record3.source, info))
|
|
24027
24027
|
await clear2(file2);
|
|
24028
24028
|
}
|
|
24029
24029
|
async function clear2(file2) {
|
|
@@ -52111,7 +52111,7 @@ function piHistory(value) {
|
|
|
52111
52111
|
nativeID: header.id,
|
|
52112
52112
|
messages,
|
|
52113
52113
|
partial: partial2,
|
|
52114
|
-
session: { directory: text3(header.cwd), created: time3(header.timestamp), title: text3([...rows2].reverse().find((r) => r.type === "session_info")?.name), model: text3(lastModel?.modelId || lastModel?.message?.model) || "Unknown model", provider: text3(lastModel?.provider || lastModel?.message?.provider) },
|
|
52114
|
+
session: { directory: text3(header.cwd), created: time3(header.timestamp), title: text3([...rows2].reverse().find((r) => r.type === "session_info" && text3(r.name).trim())?.name).trim(), model: text3(lastModel?.modelId || lastModel?.message?.model) || "Unknown model", provider: text3(lastModel?.provider || lastModel?.message?.provider) },
|
|
52115
52115
|
note: "Includes all saved branches in this transcript."
|
|
52116
52116
|
};
|
|
52117
52117
|
}
|
|
@@ -52209,7 +52209,7 @@ function jcodeHistory(path, files) {
|
|
|
52209
52209
|
function codebuffHistory(path, files, free) {
|
|
52210
52210
|
const records = json4(files.get(path));
|
|
52211
52211
|
if (!Array.isArray(records)) throw new Error("Unsupported Codebuff chat.");
|
|
52212
|
-
const isFree = records.some((m) => text3(m.metadata?.runState?.sessionState?.mainAgentState?.agentType).
|
|
52212
|
+
const isFree = records.some((m) => text3(m.metadata?.runState?.sessionState?.mainAgentState?.agentType).split("-").includes("free"));
|
|
52213
52213
|
if (isFree !== free) return;
|
|
52214
52214
|
const messages = records.flatMap((r, i) => {
|
|
52215
52215
|
const content = r.content ?? (Array.isArray(r.blocks) ? r.blocks.filter((b) => typeof b.content === "string").map((b) => ({ type: "text", text: b.content })) : void 0);
|
|
@@ -52805,6 +52805,7 @@ function codexRecord(raw, offset, candidate) {
|
|
|
52805
52805
|
if (!p || typeof p !== "object") return;
|
|
52806
52806
|
if (raw.type === "session_meta" || raw.type === "turn_context") candidate.locator.executionCwd = typeof p.cwd === "string" ? p.cwd : "";
|
|
52807
52807
|
if (raw.type === "turn_context" && typeof p.model === "string") candidate.session.model = p.model;
|
|
52808
|
+
if (raw.type === "world_state" && typeof p.state?.model === "string" && p.state.model && candidate.session.model === "Unknown model") candidate.session.model = p.state.model;
|
|
52808
52809
|
if (raw.type === "event_msg" && p.type === "item_completed" && ["FileChange", "fileChange"].includes(p.item?.type)) {
|
|
52809
52810
|
const msg2 = blankMessage(`event:${p.item.id || raw.ordinal || offset}`, p.completed_at_ms || Date.parse(raw.timestamp) || 0, "tool");
|
|
52810
52811
|
msg2.events = [eventFor(msg2, "change", "event", "File-change result", eventText(p.item), { nativeType: p.type, status: ["completed", "Completed"].includes(p.item.status) ? "completed" : "unknown" })];
|
|
@@ -54617,13 +54618,155 @@ var init_harness_extra_formats = __esm({
|
|
|
54617
54618
|
}
|
|
54618
54619
|
});
|
|
54619
54620
|
|
|
54620
|
-
// server/adapters/
|
|
54621
|
+
// server/adapters/minimax.ts
|
|
54622
|
+
import { readdirSync as readdirSync2, realpathSync as realpathSync2, statSync as statSync2 } from "node:fs";
|
|
54621
54623
|
import { basename as basename13, dirname as dirname11, join as join23 } from "node:path";
|
|
54624
|
+
function minimaxRoots() {
|
|
54625
|
+
const override = process.env.MINIMAX_DATA_DIR?.trim() || process.env.MAVIS_DATA_DIR?.trim();
|
|
54626
|
+
let dirs = override ? [override] : bases.map((b) => homePath(b));
|
|
54627
|
+
if (!override) {
|
|
54628
|
+
try {
|
|
54629
|
+
dirs.push(...readdirSync2(homePath()).filter((n) => bases.some((b) => n.startsWith(`${b}-`) && n.length > b.length + 1)).sort().map((n) => homePath(n)));
|
|
54630
|
+
} catch {
|
|
54631
|
+
}
|
|
54632
|
+
}
|
|
54633
|
+
const seen = /* @__PURE__ */ new Set();
|
|
54634
|
+
return dirs.map((d) => join23(d, "v2", "sessions")).filter((root2) => {
|
|
54635
|
+
let key = root2;
|
|
54636
|
+
try {
|
|
54637
|
+
key = realpathSync2(root2);
|
|
54638
|
+
} catch {
|
|
54639
|
+
}
|
|
54640
|
+
return !seen.has(key) && Boolean(seen.add(key));
|
|
54641
|
+
});
|
|
54642
|
+
}
|
|
54643
|
+
function snapshotFiles2(path) {
|
|
54644
|
+
const dir = join23(dirname11(path), "snapshots");
|
|
54645
|
+
try {
|
|
54646
|
+
return readdirSync2(dir).filter((n) => n.endsWith(".jsonl")).sort((a, b) => generation(a) - generation(b) || a.localeCompare(b)).map((n) => join23(dir, n));
|
|
54647
|
+
} catch {
|
|
54648
|
+
return [];
|
|
54649
|
+
}
|
|
54650
|
+
}
|
|
54651
|
+
function minimaxExtras(path) {
|
|
54652
|
+
const dir = dirname11(path);
|
|
54653
|
+
let budget2 = SNAPSHOT_BUDGET;
|
|
54654
|
+
try {
|
|
54655
|
+
budget2 -= statSync2(path).size;
|
|
54656
|
+
} catch {
|
|
54657
|
+
}
|
|
54658
|
+
const kept = [];
|
|
54659
|
+
for (const file2 of snapshotFiles2(path).reverse()) {
|
|
54660
|
+
let size = 0;
|
|
54661
|
+
try {
|
|
54662
|
+
size = statSync2(file2).size;
|
|
54663
|
+
} catch {
|
|
54664
|
+
continue;
|
|
54665
|
+
}
|
|
54666
|
+
if (size > budget2) break;
|
|
54667
|
+
budget2 -= size;
|
|
54668
|
+
kept.unshift(file2);
|
|
54669
|
+
}
|
|
54670
|
+
return [join23(dir, "manifest.json"), ...kept];
|
|
54671
|
+
}
|
|
54672
|
+
function minimaxFolderID(path) {
|
|
54673
|
+
const encoded = /session_([A-Za-z0-9_-]+)$/.exec(basename13(dirname11(path)))?.[1];
|
|
54674
|
+
if (!encoded) return "";
|
|
54675
|
+
const decoded = Buffer.from(encoded, "base64url").toString("utf8");
|
|
54676
|
+
return /^[\x21-\x7e]{1,256}$/.test(decoded) ? decoded : encoded;
|
|
54677
|
+
}
|
|
54678
|
+
function runtimeSession(path, nativeID) {
|
|
54679
|
+
const sessions = dirname11(dirname11(dirname11(dirname11(dirname11(path))))), v22 = dirname11(sessions);
|
|
54680
|
+
if (basename13(sessions) !== "sessions" || basename13(v22) !== "v2") return;
|
|
54681
|
+
const db2 = join23(v22, "sqlite", "runtime-state.sqlite");
|
|
54682
|
+
try {
|
|
54683
|
+
const revision2 = sqliteRevision(db2);
|
|
54684
|
+
if (runtime?.path !== db2 || runtime.revision !== revision2) {
|
|
54685
|
+
runtime = { path: db2, revision: revision2, sessions: withSqliteSnapshot(db2, (d) => {
|
|
54686
|
+
const rows2 = /* @__PURE__ */ new Map();
|
|
54687
|
+
if (!hasTable(d, "local_runtime_sessions")) return rows2;
|
|
54688
|
+
const columns2 = new Set(d.prepare("PRAGMA table_info(local_runtime_sessions)").all().map((c) => String(c.name)));
|
|
54689
|
+
const pick2 = (name) => columns2.has(name) ? name : "NULL";
|
|
54690
|
+
if (!columns2.has("session_id")) return rows2;
|
|
54691
|
+
const workspace = `CASE WHEN ${pick2("is_default_workspace")} = 1 THEN NULL ELSE COALESCE(NULLIF(${pick2("project_workspace_dir")}, ''), ${pick2("workspace_dir")}) END`;
|
|
54692
|
+
for (const r of d.prepare(`SELECT session_id, ${pick2("title")} AS title, ${workspace} AS directory, ${pick2("parent_session_id")} AS parent FROM local_runtime_sessions LIMIT 100000`).all())
|
|
54693
|
+
if (text3(r.session_id)) rows2.set(text3(r.session_id), { title: text3(r.title).trim(), directory: text3(r.directory), parent: text3(r.parent) });
|
|
54694
|
+
return rows2;
|
|
54695
|
+
}, revision2) };
|
|
54696
|
+
}
|
|
54697
|
+
return runtime.sessions.get(nativeID);
|
|
54698
|
+
} catch {
|
|
54699
|
+
return;
|
|
54700
|
+
}
|
|
54701
|
+
}
|
|
54702
|
+
function record2(r, i) {
|
|
54703
|
+
const body = object4(r.message), id3 = text3(r.message_id) || text3(body.id) || `record:${i}`, at2 = minimaxTime(body.timestamp ?? r.timestamp);
|
|
54704
|
+
if (body.role === "compactionSummary" || body.archonCompaction) return recordEvent(r, id3, "Compaction summary", at2, body.summary ?? body.content);
|
|
54705
|
+
const content = body.role === "user" && typeof body.genuineUserQueryText === "string" ? body.genuineUserQueryText : body.content;
|
|
54706
|
+
return message({ ...body, id: id3, content }, id3, at2);
|
|
54707
|
+
}
|
|
54708
|
+
function minimaxHistory(path, files) {
|
|
54709
|
+
const manifestPath = join23(dirname11(path), "manifest.json");
|
|
54710
|
+
const manifest2 = object4(files.has(manifestPath) ? json4(files.get(manifestPath)) : void 0);
|
|
54711
|
+
const nativeID = text3(manifest2.sessionId) || minimaxFolderID(path);
|
|
54712
|
+
if (!nativeID) throw new Error("MiniMax session has no native identity.");
|
|
54713
|
+
const snapshots = [...files.keys()].filter((f) => dirname11(f) === join23(dirname11(path), "snapshots"));
|
|
54714
|
+
const omitted = snapshotFiles2(path).length > snapshots.length;
|
|
54715
|
+
const byID = /* @__PURE__ */ new Map(), rows2 = [];
|
|
54716
|
+
let partial2 = false;
|
|
54717
|
+
for (const file2 of [...snapshots, path]) {
|
|
54718
|
+
const parsed = jsonLines(files.get(file2));
|
|
54719
|
+
partial2 ||= parsed.partial;
|
|
54720
|
+
rows2.push(...parsed.rows);
|
|
54721
|
+
parsed.rows.forEach((r, i) => {
|
|
54722
|
+
const m = record2(r, i);
|
|
54723
|
+
if (m && !byID.has(m.id)) byID.set(m.id, m);
|
|
54724
|
+
});
|
|
54725
|
+
}
|
|
54726
|
+
const meta3 = runtimeSession(path, nativeID);
|
|
54727
|
+
const last2 = [...rows2].reverse().map((r) => object4(r.message)).find((m) => m.role === "assistant" && text3(m.model));
|
|
54728
|
+
return {
|
|
54729
|
+
nativeID,
|
|
54730
|
+
messages: [...byID.values()],
|
|
54731
|
+
partial: partial2 || omitted,
|
|
54732
|
+
parent: meta3?.parent || void 0,
|
|
54733
|
+
session: { created: minimaxTime(manifest2.createdAtMs), title: meta3?.title, directory: meta3?.directory, model: text3(last2?.model) || "Unknown model", provider: text3(last2?.provider) },
|
|
54734
|
+
note: omitted ? "The oldest compacted history exceeds the snapshot size limit and is summarized, not imported." : partial2 ? "Some transcript records could not be imported." : void 0
|
|
54735
|
+
};
|
|
54736
|
+
}
|
|
54737
|
+
var bases, SNAPSHOT_BUDGET, minimaxNative, generation, runtime, minimaxTime;
|
|
54738
|
+
var init_minimax = __esm({
|
|
54739
|
+
"server/adapters/minimax.ts"() {
|
|
54740
|
+
"use strict";
|
|
54741
|
+
init_local_files();
|
|
54742
|
+
init_harness_formats();
|
|
54743
|
+
init_harness_paths();
|
|
54744
|
+
init_sqlite_snapshot();
|
|
54745
|
+
bases = [".minimax", ".mavis"];
|
|
54746
|
+
SNAPSHOT_BUDGET = 24e6;
|
|
54747
|
+
minimaxNative = (path) => /(?:^|\/)[^/]*session_[^/]+\/messages\.jsonl$/.test(path);
|
|
54748
|
+
generation = (name) => Number(/^g(\d+)--/.exec(name)?.[1] ?? Infinity);
|
|
54749
|
+
minimaxTime = (v3) => typeof v3 === "number" && v3 > 0 && v3 < 1e11 ? seconds(v3) : time3(v3);
|
|
54750
|
+
}
|
|
54751
|
+
});
|
|
54752
|
+
|
|
54753
|
+
// server/adapters/harness-files.ts
|
|
54754
|
+
import { readdirSync as readdirSync3 } from "node:fs";
|
|
54755
|
+
import { basename as basename14, dirname as dirname12, join as join24 } from "node:path";
|
|
54756
|
+
function claudeStyleHistory(path, files) {
|
|
54757
|
+
const history = envelopeHistory(path, files.get(path));
|
|
54758
|
+
const agent = /^agent-(.+)\.jsonl$/.exec(basename14(path))?.[1];
|
|
54759
|
+
if (!agent || basename14(dirname12(path)) !== "subagents") return history;
|
|
54760
|
+
const recorded = jsonLines(files.get(path)).rows.map((r) => text3(r.agentId)).find(Boolean) || agent;
|
|
54761
|
+
history.parent = history.nativeID;
|
|
54762
|
+
history.nativeID = `${history.nativeID}/agent/${recorded}`;
|
|
54763
|
+
return history;
|
|
54764
|
+
}
|
|
54622
54765
|
function kimiHistory(path, files) {
|
|
54623
54766
|
const { rows: rows2 } = jsonLines(files.get(path));
|
|
54624
|
-
const folder =
|
|
54625
|
-
const nativeID = agent ? `${
|
|
54626
|
-
const wire =
|
|
54767
|
+
const folder = dirname12(path), id3 = basename14(folder), agent = basename14(dirname12(folder)) === "agents";
|
|
54768
|
+
const nativeID = agent ? `${basename14(dirname12(dirname12(folder)))}/agent/${id3}` : id3;
|
|
54769
|
+
const wire = join24(folder, "wire.jsonl"), wireRows = files.has(wire) ? jsonLines(files.get(wire)).rows : [];
|
|
54627
54770
|
const messages = rows2.flatMap((r, i) => {
|
|
54628
54771
|
const m = message(r, nativeText(r.id) || `context:${i}`);
|
|
54629
54772
|
return m ? [m] : [];
|
|
@@ -54642,7 +54785,7 @@ function museHistory(path, files) {
|
|
|
54642
54785
|
const meta3 = rows2.find((r) => r.payload_type === "runtime.session.metadata");
|
|
54643
54786
|
const ids = new Set(rows2.map((r) => text3(r.stream?.id)).filter(Boolean));
|
|
54644
54787
|
if (!meta3 || ids.size > 1) throw new Error("Unsupported Muse stream.");
|
|
54645
|
-
const nativeID = [...ids][0] ||
|
|
54788
|
+
const nativeID = [...ids][0] || basename14(dirname12(path));
|
|
54646
54789
|
const messages = rows2.flatMap((r, i) => {
|
|
54647
54790
|
const event = object4(r.payload?.event), body = object4(event.message);
|
|
54648
54791
|
const at2 = typeof r.recorded_at === "number" && r.recorded_at >= 1e15 ? r.recorded_at / 1e3 : typeof r.recorded_at === "number" && r.recorded_at < 1e12 ? seconds(r.recorded_at) : time3(r.recorded_at);
|
|
@@ -54660,7 +54803,7 @@ function junieHistory(path, files) {
|
|
|
54660
54803
|
return [recordEvent(r, text3(r.id) || `event:${i}`, kind, r.timestampMs, e10.text ?? e10.prompt ?? e10.message)];
|
|
54661
54804
|
});
|
|
54662
54805
|
if (!messages.length) throw new Error("No supported Junie events.");
|
|
54663
|
-
return { nativeID:
|
|
54806
|
+
return { nativeID: basename14(dirname12(path)), messages, partial: true, note: "Recorded events only." };
|
|
54664
54807
|
}
|
|
54665
54808
|
function augmentHistory(path, files) {
|
|
54666
54809
|
const r = object4(json4(files.get(path)));
|
|
@@ -54672,7 +54815,7 @@ function augmentHistory(path, files) {
|
|
|
54672
54815
|
return { nativeID: r.sessionId, messages, partial: true, session: { title: text3(r.title), created: time3(r.created), model: text3(r.agentState?.modelId) || "Unknown model" }, note: "Recorded exchanges only." };
|
|
54673
54816
|
}
|
|
54674
54817
|
function fxHistory(path, files) {
|
|
54675
|
-
const usage = object4(json4(files.get(path))), meta3 = sidecar2(files,
|
|
54818
|
+
const usage = object4(json4(files.get(path))), meta3 = sidecar2(files, join24(dirname12(path), "session.json"));
|
|
54676
54819
|
const id3 = text3(usage.session_id) || text3(meta3.id);
|
|
54677
54820
|
if (!id3 || !usage.snapshot || meta3.id && meta3.id !== id3) throw new Error("Unsupported Fx session metadata.");
|
|
54678
54821
|
const snapshot2 = object4(usage.snapshot);
|
|
@@ -54699,7 +54842,7 @@ function fxHistory(path, files) {
|
|
|
54699
54842
|
note: "Session metadata only."
|
|
54700
54843
|
};
|
|
54701
54844
|
}
|
|
54702
|
-
var piParse, jsonl, piSources, openclawRoots, promaRoots, definitions, fileHarnessAdapters;
|
|
54845
|
+
var piParse, jsonl, claudeStyle, piSources, omoChildRoots, openclawRoots, promaRoots, definitions, fileHarnessAdapters;
|
|
54703
54846
|
var init_harness_files = __esm({
|
|
54704
54847
|
"server/adapters/harness-files.ts"() {
|
|
54705
54848
|
"use strict";
|
|
@@ -54708,32 +54851,42 @@ var init_harness_files = __esm({
|
|
|
54708
54851
|
init_harness_formats();
|
|
54709
54852
|
init_harness_paths();
|
|
54710
54853
|
init_harness_extra_formats();
|
|
54854
|
+
init_minimax();
|
|
54711
54855
|
init_usage();
|
|
54712
54856
|
piParse = (path, files) => piHistory(files.get(path));
|
|
54713
54857
|
jsonl = (path) => path.endsWith(".jsonl");
|
|
54858
|
+
claudeStyle = (path) => jsonl(path) && !path.endsWith(".checkpoints.jsonl") && !(path.includes("subagents/") && basename14(path) === "journal.jsonl");
|
|
54714
54859
|
piSources = [
|
|
54715
54860
|
{ id: "prime-agent", name: "Prime Agent", roots: () => [process.env.PRIME_AGENT_SESSION_DIR || process.env.PRIME_AGENT_CODING_AGENT_SESSION_DIR || envHome("PRIME_AGENT_CODING_AGENT_DIR", ".prime/agent", "sessions"), envHome("PRIME_AGENT_CODING_AGENT_DIR", ".prime/agent", "session-artifacts")] },
|
|
54716
54861
|
{ id: "omp", name: "Oh My Pi", roots: () => [envHome("PI_CODING_AGENT_DIR_OMP", ".omp/agent", "sessions")] },
|
|
54717
|
-
{ id: "senpi", name: "Senpi / OmO Native", roots: () => [envHome("SENPI_CODING_AGENT_DIR", ".senpi/agent", "sessions"), homePath(".omo/agent/sessions")] },
|
|
54718
|
-
{ id: "kimchi", name: "Kimchi", roots: () => [
|
|
54719
|
-
{ id: "gajae", name: "Gajae-Code", roots: () => [
|
|
54862
|
+
{ id: "senpi", name: "Senpi / OmO Native", roots: () => [envHome("SENPI_CODING_AGENT_DIR", ".senpi/agent", "sessions"), homePath(".omo/agent/sessions"), ...omoChildRoots()] },
|
|
54863
|
+
{ id: "kimchi", name: "Kimchi", roots: () => [join24(process.env.KIMCHI_CODING_AGENT_DIR || configPath("kimchi/harness"), "sessions")] },
|
|
54864
|
+
{ id: "gajae", name: "Gajae-Code", roots: () => [join24(process.env.GJC_CODING_AGENT_DIR || (process.env.GJC_CONFIG_DIR || process.env.PI_CONFIG_DIR ? join24(process.env.GJC_CONFIG_DIR || process.env.PI_CONFIG_DIR, "agent") : homePath(".gjc/agent")), "sessions"), dataPath("gjc/sessions")] }
|
|
54720
54865
|
].map((s) => ({ ...s, parse: piParse }));
|
|
54866
|
+
omoChildRoots = () => [[".omo/agent/projects", "senpi-task/children"], [".omo/memory/agents", "runtime/transcripts"]].flatMap(([parent, child]) => {
|
|
54867
|
+
try {
|
|
54868
|
+
return readdirSync3(homePath(parent), { withFileTypes: true }).filter((e10) => e10.isDirectory()).map((e10) => homePath(parent, e10.name, child));
|
|
54869
|
+
} catch {
|
|
54870
|
+
return [];
|
|
54871
|
+
}
|
|
54872
|
+
});
|
|
54721
54873
|
openclawRoots = () => [envHome("OPENCLAW_STATE_DIR", ".openclaw", "agents"), ...[".clawdbot", ".moltbot", ".moldbot"].map((p) => homePath(p, "agents"))];
|
|
54722
54874
|
promaRoots = () => [".proma", ".proma-dev"].flatMap((p) => ["agent-sessions", "sdk-config/sessions", "sdk-config/projects"].map((s) => homePath(p, s)));
|
|
54723
54875
|
definitions = [
|
|
54724
54876
|
...piSources,
|
|
54725
|
-
{ id: "kiro", name: "Kiro", roots: () => [homePath(".kiro/sessions"), appPath("Kiro/User/globalStorage/kiro.kiroagent")], match: (p) => p.endsWith("/session.json") || /^cli\/[^/]+\.json$/.test(p), extras: (p) => [
|
|
54726
|
-
{ id: "mux", name: "Mux", roots: () => [envHome("MUX_ROOT", ".mux", "sessions")], match: (p) => p.endsWith("/chat.jsonl"), extras: (p) => [
|
|
54877
|
+
{ id: "kiro", name: "Kiro", roots: () => [homePath(".kiro/sessions"), appPath("Kiro/User/globalStorage/kiro.kiroagent")], match: (p) => p.endsWith("/session.json") || /^cli\/[^/]+\.json$/.test(p), extras: (p) => [basename14(p) === "session.json" ? join24(dirname12(p), "messages.jsonl") : p.replace(/\.json$/, ".jsonl")], parse: kiroHistory },
|
|
54878
|
+
{ id: "mux", name: "Mux", roots: () => [envHome("MUX_ROOT", ".mux", "sessions")], match: (p) => p.endsWith("/chat.jsonl"), extras: (p) => [join24(dirname12(p), "chat-archive.jsonl"), join24(dirname12(p), "session-usage.json")], parse: muxHistory },
|
|
54727
54879
|
{ id: "devin-desktop", name: "Devin Desktop", roots: () => [appPath("Devin/User/acp-events")], match: (p) => /\.(ndjson|jsonl)$/.test(p), parse: devinDesktopHistory },
|
|
54728
54880
|
{ id: "openclaw", name: "OpenClaw", roots: openclawRoots, match: (p) => /(?:^|\/)sessions\/.*\.jsonl(?:\.[\w.-]+)?$/.test(p) || /session-sqlite-import-archive\/.*\.jsonl\./.test(p), parse: piParse },
|
|
54729
54881
|
{ id: "amp", name: "Amp", roots: () => [dataPath("amp/threads"), tokscalePath("amp-cache/threads")], match: (p) => p.endsWith(".json"), parse: ampHistory },
|
|
54730
54882
|
{ id: "droid", name: "Factory Droid", roots: () => [envHome("FACTORY_HOME", ".factory", "sessions")] },
|
|
54731
54883
|
{ id: "codebuff", name: "Codebuff", roots: () => process.env.CODEBUFF_DATA_DIR ? [process.env.CODEBUFF_DATA_DIR] : ["manicode", "manicode-dev", "manicode-staging"].map((p) => configPath(p)), match: (p) => p.endsWith("/chat-messages.json"), parse: (p, f) => codebuffHistory(p, f, false) },
|
|
54732
54884
|
{ id: "freebuff", name: "Freebuff", roots: () => process.env.FREEBUFF_DATA_DIR ? [process.env.FREEBUFF_DATA_DIR] : process.env.CODEBUFF_DATA_DIR ? [process.env.CODEBUFF_DATA_DIR] : ["manicode", "manicode-dev", "manicode-staging"].map((p) => configPath(p)), match: (p) => p.endsWith("/chat-messages.json"), parse: (p, f) => codebuffHistory(p, f, true) },
|
|
54733
|
-
{ id: "kimi", name: "Kimi CLI / Code", roots: () => [envHome("KIMI_HOME", ".kimi", "sessions"), envHome("KIMI_CODE_HOME", ".kimi-code", "sessions")], match: (p) => p.endsWith("/context.jsonl"), extras: (p) => [
|
|
54885
|
+
{ id: "kimi", name: "Kimi CLI / Code", roots: () => [envHome("KIMI_HOME", ".kimi", "sessions"), envHome("KIMI_CODE_HOME", ".kimi-code", "sessions")], match: (p) => p.endsWith("/context.jsonl"), extras: (p) => [join24(dirname12(p), "wire.jsonl")], parse: kimiHistory },
|
|
54734
54886
|
{ id: "grok", name: "Grok Build", roots: () => [envHome("GROK_HOME", ".grok", "sessions")], match: (p) => p.endsWith("/updates.jsonl"), parse: (p, f) => acpHistory(p, f.get(p)) },
|
|
54735
54887
|
{ id: "jcode", name: "Jcode", roots: () => [envHome("JCODE_HOME", ".jcode", "sessions")], match: (p) => /(?:^|\/)session_[^/]+\.json$/.test(p), extras: (p) => [p.replace(/\.json$/, ".journal.jsonl")], parse: jcodeHistory },
|
|
54736
54888
|
{ id: "cherry-studio", name: "Cherry Studio", roots: () => [appPath("CherryStudio/Data/Agents/.claude/projects"), appPath("CherryStudio/.claude/projects")] },
|
|
54889
|
+
{ id: "qoder", name: "Qoder", roots: () => [envHome("QODER_CONFIG_DIR", ".qoder", "projects"), envHome("QODERCN_CONFIG_DIR", ".qoder-cn", "projects")] },
|
|
54737
54890
|
{ id: "command-code", name: "Command Code", roots: () => [homePath(".commandcode/projects")] },
|
|
54738
54891
|
{ id: "zcode", name: "ZCode", roots: () => [homePath(".zcode/projects")] },
|
|
54739
54892
|
{ id: "codebuddy", name: "CodeBuddy", roots: () => [homePath(".codebuddy/projects")] },
|
|
@@ -54742,14 +54895,25 @@ var init_harness_files = __esm({
|
|
|
54742
54895
|
{ id: "deepseek-harness", name: "DeepSeek Harness", roots: () => [envHome("DSH_HOME", ".dsh", "sessions")], match: (p) => /(?:^|\/)session(?:\.v\d+)?\.jsonl(?:\.zstd)?$/.test(p), parse: (p, f) => dshHistory(f.get(p)) },
|
|
54743
54896
|
{ id: "aside", name: "Aside", roots: () => [homePath(".aside/u")], match: (p) => /^[^/]+\/sessions\/[^/]+\/messages\.jsonl$/.test(p), parse(p, f) {
|
|
54744
54897
|
const h3 = envelopeHistory(p, f.get(p));
|
|
54745
|
-
h3.nativeID = `${
|
|
54898
|
+
h3.nativeID = `${basename14(dirname12(dirname12(dirname12(p))))}/${basename14(dirname12(p))}`;
|
|
54746
54899
|
return h3;
|
|
54747
54900
|
} },
|
|
54748
|
-
{ id: "vibe", name: "Mistral Vibe", roots: () => [envHome("VIBE_HOME", ".vibe", "logs/session")], match: (p) => p.endsWith("/meta.json") || /^[^/]+\.json$/.test(p), extras: (p) =>
|
|
54901
|
+
{ id: "vibe", name: "Mistral Vibe", roots: () => [envHome("VIBE_HOME", ".vibe", "logs/session")], match: (p) => p.endsWith("/meta.json") || /^[^/]+\.json$/.test(p), extras: (p) => basename14(p) === "meta.json" ? [join24(dirname12(p), "messages.jsonl")] : [], parse: vibeHistory },
|
|
54749
54902
|
{ id: "muse", name: "Muse Code", roots: () => [dataPath("muse/sessions")], match: (p) => p.endsWith("/session.jsonl"), parse: museHistory },
|
|
54750
54903
|
{ id: "junie", name: "Junie", roots: () => [homePath(".junie/sessions")], match: (p) => p.endsWith("/events.jsonl"), parse: junieHistory, description: "Local agent event history \xB7 partial conversation coverage" },
|
|
54751
54904
|
{ id: "augment", name: "Augment Code", roots: () => [homePath(".augment/sessions")], match: (p) => p.endsWith(".json"), parse: augmentHistory, description: "Local exchange records \xB7 partial conversation coverage" },
|
|
54752
|
-
{ id: "fx", name: "Fx", roots: () => [homePath(".fx/sessions")], match: (p) => p.endsWith("/usage-v2.json"), extras: (p) => [
|
|
54905
|
+
{ id: "fx", name: "Fx", roots: () => [homePath(".fx/sessions")], match: (p) => p.endsWith("/usage-v2.json"), extras: (p) => [join24(dirname12(p), "session.json")], parse: fxHistory, history: false, description: "Session metadata only" },
|
|
54906
|
+
{
|
|
54907
|
+
id: "minimax-code",
|
|
54908
|
+
name: "MiniMax Code",
|
|
54909
|
+
description: "Local runtime transcripts (CLI and desktop)",
|
|
54910
|
+
roots: minimaxRoots,
|
|
54911
|
+
children: true,
|
|
54912
|
+
// Session folders hold other JSONL logs (ledger, display, snapshots); only messages.jsonl is the transcript.
|
|
54913
|
+
match: minimaxNative,
|
|
54914
|
+
extras: minimaxExtras,
|
|
54915
|
+
parse: minimaxHistory
|
|
54916
|
+
},
|
|
54753
54917
|
{ id: "opencodereview", name: "OpenCodeReview", roots: () => [homePath(".opencodereview/sessions")], parse(p, f) {
|
|
54754
54918
|
const { rows: rows2 } = jsonLines(f.get(p)), header = rows2.find((r) => r.type === "session_start");
|
|
54755
54919
|
if (!header) throw new Error("Unsupported review session.");
|
|
@@ -54759,17 +54923,17 @@ var init_harness_files = __esm({
|
|
|
54759
54923
|
fileHarnessAdapters = definitions.map((source) => localFileAdapter({
|
|
54760
54924
|
...source,
|
|
54761
54925
|
roots: harnessRoots(source.id, source.roots),
|
|
54762
|
-
match: source.match ||
|
|
54926
|
+
match: source.match || claudeStyle,
|
|
54763
54927
|
description: source.description || "Local session transcripts",
|
|
54764
|
-
capabilities: { history: source.history !== false, forks: false, children:
|
|
54765
|
-
parse: source.parse ||
|
|
54928
|
+
capabilities: { history: source.history !== false, forks: false, children: source.children === true || !source.parse, files: false },
|
|
54929
|
+
parse: source.parse || claudeStyleHistory
|
|
54766
54930
|
}));
|
|
54767
54931
|
}
|
|
54768
54932
|
});
|
|
54769
54933
|
|
|
54770
54934
|
// server/adapters/harness-databases.ts
|
|
54771
54935
|
import { lstat as lstat9, readFile as readFile3 } from "node:fs/promises";
|
|
54772
|
-
import { isAbsolute as isAbsolute8, join as
|
|
54936
|
+
import { isAbsolute as isAbsolute8, join as join25 } from "node:path";
|
|
54773
54937
|
function hermesContent(value) {
|
|
54774
54938
|
if (typeof value !== "string" || !value.startsWith("\0json:")) return value;
|
|
54775
54939
|
try {
|
|
@@ -54889,7 +55053,7 @@ var init_harness_databases = __esm({
|
|
|
54889
55053
|
goose = {
|
|
54890
55054
|
id: "goose",
|
|
54891
55055
|
name: "Goose",
|
|
54892
|
-
paths: dbPaths("goose", () => process.env.GOOSE_PATH_ROOT && isAbsolute8(process.env.GOOSE_PATH_ROOT) ? [
|
|
55056
|
+
paths: dbPaths("goose", () => process.env.GOOSE_PATH_ROOT && isAbsolute8(process.env.GOOSE_PATH_ROOT) ? [join25(process.env.GOOSE_PATH_ROOT, "data/sessions/sessions.db")] : [dataPath("goose/sessions/sessions.db"), dataPath("Block/goose/sessions/sessions.db"), appPath("goose/sessions/sessions.db"), appPath("Block/goose/sessions/sessions.db"), appPath("Block/goose/data/sessions/sessions.db")], (p) => p.endsWith("sessions.db")),
|
|
54893
55057
|
table: "sessions",
|
|
54894
55058
|
key: "id",
|
|
54895
55059
|
fields: [
|
|
@@ -54956,7 +55120,7 @@ var init_harness_databases = __esm({
|
|
|
54956
55120
|
zed = {
|
|
54957
55121
|
id: "zed",
|
|
54958
55122
|
name: "Zed Agent",
|
|
54959
|
-
paths: dbPaths("zed", () => [process.platform === "darwin" ? appPath("Zed/threads/threads.db") : process.platform === "win32" ?
|
|
55123
|
+
paths: dbPaths("zed", () => [process.platform === "darwin" ? appPath("Zed/threads/threads.db") : process.platform === "win32" ? join25(process.env.LOCALAPPDATA || homePath("AppData/Local"), "Zed/threads/threads.db") : dataPath("zed/threads/threads.db")], (p) => p.endsWith("threads.db")),
|
|
54960
55124
|
table: "threads",
|
|
54961
55125
|
key: "id",
|
|
54962
55126
|
fields: ["id", "summary", "created_at", "updated_at", "data_type", "data", "folder_paths"],
|
|
@@ -55005,7 +55169,7 @@ var init_harness_databases = __esm({
|
|
|
55005
55169
|
paths: async () => {
|
|
55006
55170
|
const override = sourcePath("crush") || process.env.SESSIONGRAPH_CRUSH_HISTORY_DIR;
|
|
55007
55171
|
if (override) return (await historyFiles([override], (p) => p.endsWith("crush.db"))).files;
|
|
55008
|
-
const registry2 =
|
|
55172
|
+
const registry2 = join25(process.env.CRUSH_GLOBAL_DATA || dataPath("crush"), "projects.json");
|
|
55009
55173
|
try {
|
|
55010
55174
|
const stat3 = await lstat9(registry2);
|
|
55011
55175
|
if (!stat3.isFile() || stat3.size > 2e6) throw new Error("Unsupported Crush registry.");
|
|
@@ -55013,7 +55177,7 @@ var init_harness_databases = __esm({
|
|
|
55013
55177
|
const paths2 = [];
|
|
55014
55178
|
for (const p of Array.isArray(raw.projects) ? raw.projects.slice(0, 2e4) : []) {
|
|
55015
55179
|
if (!isAbsolute8(text3(p.path)) || !text3(p.data_dir)) continue;
|
|
55016
|
-
const path =
|
|
55180
|
+
const path = join25(isAbsolute8(p.data_dir) ? p.data_dir : join25(p.path, p.data_dir), "crush.db");
|
|
55017
55181
|
paths2.push(path);
|
|
55018
55182
|
crushDirectories.set(path, p.path);
|
|
55019
55183
|
}
|
|
@@ -55133,7 +55297,7 @@ var init_harness_databases = __esm({
|
|
|
55133
55297
|
});
|
|
55134
55298
|
|
|
55135
55299
|
// server/adapters/harness-metadata.ts
|
|
55136
|
-
import { basename as
|
|
55300
|
+
import { basename as basename15 } from "node:path";
|
|
55137
55301
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
55138
55302
|
function protoFields(value) {
|
|
55139
55303
|
if (value.length > 2e6) throw new Error("Trajectory metadata exceeds 2 MB.");
|
|
@@ -55196,7 +55360,7 @@ var init_harness_metadata = __esm({
|
|
|
55196
55360
|
}
|
|
55197
55361
|
}
|
|
55198
55362
|
if (!created) throw new Error("Trajectory creation time is unavailable.");
|
|
55199
|
-
return { nativeID:
|
|
55363
|
+
return { nativeID: basename15(path, ".db"), messages: [], partial: true, session: { created, directory: directory3 }, note: "Session metadata only." };
|
|
55200
55364
|
}
|
|
55201
55365
|
}));
|
|
55202
55366
|
}
|
|
@@ -66985,33 +67149,33 @@ var SessionGraphStore = class {
|
|
|
66985
67149
|
const rows2 = this.db.prepare("SELECT id,data FROM search_cache WHERE id>? ORDER BY id LIMIT 51").all(after);
|
|
66986
67150
|
const records = [];
|
|
66987
67151
|
for (const row of rows2.slice(0, 50)) {
|
|
66988
|
-
const
|
|
66989
|
-
if (validRecord(
|
|
67152
|
+
const record3 = JSON.parse(String(row.data));
|
|
67153
|
+
if (validRecord(record3, this.getSession(String(row.id)))) records.push(record3);
|
|
66990
67154
|
else this.db.prepare("DELETE FROM search_cache WHERE id=?").run(row.id);
|
|
66991
67155
|
}
|
|
66992
67156
|
return { records, cursor: rows2.length > 50 ? String(rows2[49].id) : void 0, epoch: this.setting("indexEpoch") || 0 };
|
|
66993
67157
|
}
|
|
66994
|
-
saveCheckpoint(
|
|
67158
|
+
saveCheckpoint(record3, epoch) {
|
|
66995
67159
|
this.db.exec("BEGIN IMMEDIATE");
|
|
66996
67160
|
try {
|
|
66997
|
-
if (epoch !== (this.setting("indexEpoch") || 0) || !validRecord(
|
|
67161
|
+
if (epoch !== (this.setting("indexEpoch") || 0) || !validRecord(record3, this.getSession(record3.id))) {
|
|
66998
67162
|
this.db.exec("ROLLBACK");
|
|
66999
67163
|
return false;
|
|
67000
67164
|
}
|
|
67001
|
-
const total = Number(this.db.prepare("SELECT COALESCE(SUM(characters),0) AS n FROM search_cache WHERE id<>?").get(
|
|
67002
|
-
if (total +
|
|
67165
|
+
const total = Number(this.db.prepare("SELECT COALESCE(SUM(characters),0) AS n FROM search_cache WHERE id<>?").get(record3.id).n);
|
|
67166
|
+
if (total + record3.characters > MAX_CHARACTERS) {
|
|
67003
67167
|
this.db.exec("ROLLBACK");
|
|
67004
67168
|
return false;
|
|
67005
67169
|
}
|
|
67006
|
-
const previous = this.db.prepare("SELECT data FROM search_cache WHERE id=?").get(
|
|
67170
|
+
const previous = this.db.prepare("SELECT data FROM search_cache WHERE id=?").get(record3.id);
|
|
67007
67171
|
if (previous) {
|
|
67008
67172
|
const old = JSON.parse(String(previous.data));
|
|
67009
|
-
if (old.version ===
|
|
67173
|
+
if (old.version === record3.version && old.pages > record3.pages) {
|
|
67010
67174
|
this.db.exec("ROLLBACK");
|
|
67011
67175
|
return false;
|
|
67012
67176
|
}
|
|
67013
67177
|
}
|
|
67014
|
-
this.db.prepare("INSERT INTO search_cache (id,data,characters) VALUES (?,?,?) ON CONFLICT(id) DO UPDATE SET data=excluded.data,characters=excluded.characters").run(
|
|
67178
|
+
this.db.prepare("INSERT INTO search_cache (id,data,characters) VALUES (?,?,?) ON CONFLICT(id) DO UPDATE SET data=excluded.data,characters=excluded.characters").run(record3.id, JSON.stringify(record3), record3.characters);
|
|
67015
67179
|
this.db.exec("COMMIT");
|
|
67016
67180
|
return true;
|
|
67017
67181
|
} catch (error62) {
|
|
@@ -69547,8 +69711,8 @@ var LibraryService = class {
|
|
|
69547
69711
|
if (plan2.error) invalid(plan2.error);
|
|
69548
69712
|
return this.snapshot(() => {
|
|
69549
69713
|
const { sessions, projects } = this.sessions(filters4);
|
|
69550
|
-
const
|
|
69551
|
-
const indexKey = fingerprint([filters4,
|
|
69714
|
+
const generation2 = [this.store.db.prepare("PRAGMA data_version").get(), this.store.db.prepare("SELECT total_changes() AS n").get()];
|
|
69715
|
+
const indexKey = fingerprint([filters4, generation2]);
|
|
69552
69716
|
if (this.searchCache?.key !== indexKey) {
|
|
69553
69717
|
this.searchCache = void 0;
|
|
69554
69718
|
const index2 = new SessionSearchIndex();
|