MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / readReceiptFile

Function readReceiptFile

src/schedule/receipt.ts:112–119  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

110
111/** Read a receipt JSON file QodeX wrote at end-of-run. Returns null if absent/unreadable. */
112export async function readReceiptFile(filePath: string): Promise<RunReceipt | null> {
113 try {
114 const { promises: fs } = await import('fs');
115 const raw = await fs.readFile(filePath, 'utf-8');
116 const obj = JSON.parse(raw);
117 return coerce(obj);
118 } catch { return null; }
119}
120
121/** Compact, scannable receipt for a chat message. PURE. */
122export function formatReceipt(r: RunReceipt): string {

Callers 2

runOneFunction · 0.85

Calls 1

coerceFunction · 0.85

Tested by

no test coverage detected