Versions 196 to 197
new file, 217 lines
1+// Recover each past hold's lines from a project's raw log (#19): the held agent's own lines survive in its draft
6+// <log.ndjson> is GET /p/<project>/export (one raw log entry per line; owner-only). <cases.json> comes from
7+// extract.ts, which says which settles to look for and what was kept. The seat folder reads theirs' file text
8+// for positions and context. For each settle: the held agent's draft edits between its last push and the
9+// refused push, the edits of theirs' push, and the groups of them that wrote the same lines (abso's own test
11+
14+
41+ settler: { agent: string; heldMessage?: string; settleVersion: number; settleMessage?: string };
46+
49+ console.error("usage: node scripts/autosettle/replay.ts <log.ndjson> <cases.json> <seat folder> <out.json>");
58+ execFileSync("abso", args, { cwd: seat, encoding: "utf8", maxBuffer: 1 << 28, shell: process.platform === "win32" });
59+
68+ for (const run of a.inserts) for (const text of run.lines) lineText.set(`${a.id}.${k++}`, { text, file: run.file });
81+
82+/** The published shared version's index in the log, and the agent's draft atoms before an index since its last push. */
85+ if ((e.type === "publish" || e.type === "land") && e.space === undefined && typeof e.version === "number")
102+
103+/** Atoms touching `file`, grouped into collisions: groups linked by a written key or by one editing another's lines. */
106+ a.inserts.some((r) => r.file === file) || a.deletes.some((d) => lineText.get(d)?.file === file);
126+ return [...groups.values()].filter((g) => g.some((x) => x.side === "yours") && g.some((x) => x.side === "theirs"));
128+
140+
153+ for (const c of group) results.push({ ...c, yours: null, notes: "the settle or theirs isn't in this log" });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 196 197 scripts/autosettle/replay.ts --json
- JSON
- /christopher/abso-core/compare/196..197?file=scripts%2Fautosettle%2Freplay.ts&format=json