Versions 156 to 318
new file, 257 lines
10+
12+type Progress = { ready: boolean; phase: "empty" | "writer" | "projection" | "history" | "ready"; next: number };
13+
22+ constructor(storage: SqliteStorage, database: string, namespace: string, services: Services = {}) {
55+ for (const chunk of jsonValueChunks({ result }, { maxDepth: Infinity, unboxPrimitives: true })) {
91+ if (typeof chunk !== "string" || chunk.length !== Math.min(64 * 1024, receipt.characters! - part * 64 * 1024))
99+
102+ if (result && (typeof result === "object" || typeof result === "function") && "then" in result)
109+ if (format !== undefined && format !== 1 && format !== 2 && format !== 3 && format !== 4 && format !== 5)
126+ if (request && (!request.id || request.id.length > 128)) throw Error("invalid disk-first request identity");
127+ const project = new Project(log, { ...this.#services, now: () => Date.now(), shapes: log.shapes() });
194+ return { ready: history.ready, phase: history.ready ? "ready" : "history", next: history.next };
199+ this.#storage.sql.exec("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'writer_state'").toArray()
231+ if (request && (!request.id || request.id.length > 128)) throw Error("invalid disk-first request identity");
238+ if (receipt.format !== 2 && receipt.format !== 3) throw Error("unsupported disk-first receipt format");
240+ throw Object.assign(Error("disk-first request identity was reused"), { code: "request-reused" });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 156 318 server/src/disk-first-runtime.ts --json
- JSON
- /christopher/abso-core/compare/156..318?file=server%2Fsrc%2Fdisk-first-runtime.ts&format=json