mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-02 04:45:21 +00:00
Carve the Codex decoder into @codeburn/core/providers/codex as a pure function over supplied rollout records with EXPLICIT, JSON-serializable state (CodexDecodeState): the running cumulative token counters, fork-replay cutoff, mid-turn accumulators, id/turn bookkeeping, and the cross-file dedup memory (seenKeys). Decoding a corpus in one pass equals decoding it in any number of passes when the state threads between them (the resume invariant). Cost leaves the decoder: the rich calls are cost-free and the CLI prices them through the established estimated-cost seam (costBasis: 'estimated'), retiring both Phase-0 residual calculateCost sites. The CLI codex provider is now discovery + file streaming + cache I/O + pricing. codex-results cache bumped to v8 (one deliberate bump): it persists the decoder end-state blob + a byte offset + host-priced calls, so a grown rollout resumes from the stored state and decodes only the appended bytes. Lossless — rollout files are durable, so the one-time re-derive rebuilds identical data. Adds a codex path to the content-smuggling guardrail and the import-smoke subpath set. Byte-parity verified against a frozen 826-file corpus (codex-only and all-providers, rel_tol 1e-9); perf within ±1.5% cold / ±0.5% warm. |
||
|---|---|---|
| .. | ||
| cli | ||
| core | ||