MCPcopy Create free account
hub / github.com/garrytan/gstack / writeCodexSession

Function writeCodexSession

test/gstack-memory-ingest.test.ts:52–59  ·  view source on GitHub ↗
(home: string, ymd: string, content: string)

Source from the content-addressed store, hash-verified

50}
51
52function writeCodexSession(home: string, ymd: string, content: string): string {
53 const [y, m, d] = ymd.split("-");
54 const dir = join(home, ".codex", "sessions", y, m, d);
55 mkdirSync(dir, { recursive: true });
56 const file = join(dir, `rollout-${Date.now()}.jsonl`);
57 writeFileSync(file, content, "utf-8");
58 return file;
59}
60
61// ── --help and --probe ─────────────────────────────────────────────────────
62

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected