codeburn/packages/core/package.json
iamtoruk b504838309 refactor(core): codex decoder with explicit serializable state, cost leaves the decoder (phase 4)
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.
2026-07-26 12:44:10 -07:00

75 lines
1.9 KiB
JSON

{
"name": "@codeburn/core",
"version": "0.9.19",
"description": "Shared, provider-agnostic core for CodeBurn (parsing, pricing, models). Skeleton — populated in later phases of the core extraction.",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./schema": {
"types": "./dist/schema.d.ts",
"import": "./dist/schema.js"
},
"./observations": {
"types": "./dist/observations.d.ts",
"import": "./dist/observations.js"
},
"./diagnostics": {
"types": "./dist/diagnostics.d.ts",
"import": "./dist/diagnostics.js"
},
"./fingerprint": {
"types": "./dist/fingerprint.d.ts",
"import": "./dist/fingerprint.js"
},
"./contracts": {
"types": "./dist/contracts.d.ts",
"import": "./dist/contracts.js"
},
"./providers/claude": {
"types": "./dist/providers/claude/index.d.ts",
"import": "./dist/providers/claude/index.js"
},
"./providers/codex": {
"types": "./dist/providers/codex/index.d.ts",
"import": "./dist/providers/codex/index.js"
}
},
"files": [
"dist",
"schemas"
],
"scripts": {
"build": "tsup",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"emit-schemas": "tsx scripts/emit-schemas.mts"
},
"engines": {
"node": ">=22.13.0"
},
"dependencies": {
"zod": "^3.25.76"
},
"devDependencies": {
"@types/node": "^22.0.0",
"ajv": "^8.17.1",
"tsup": "^8.0.0",
"tsx": "^4.19.0",
"typescript": "^5.5.0",
"vitest": "^3.1.0",
"zod-to-json-schema": "^3.24.1"
},
"author": "AgentSeal <hello@agentseal.org>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/getagentseal/codeburn.git",
"directory": "packages/core"
}
}