mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-03 21:35:13 +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. |
||
|---|---|---|
| .. | ||
| schemas | ||
| scripts | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@codeburn/core
Shared, provider-agnostic core for CodeBurn: session parsing, model/pricing resolution, and the cost math that the CLI and the desktop apps all depend on.
Status: skeleton. This package currently exports nothing. It is introduced in
Phase 1 of the core extraction (packaging only) and is populated incrementally in
later phases as logic is lifted out of packages/cli.