mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-03 13:25:13 +00:00
Redesign the three token-waste detectors as pure @codeburn/core detectors that
consume an ObservationEnvelope of fingerprinted resource refs (never raw paths):
- Envelope schema 0.2.0: CallObservation gains optional resourceReads /
resourceEdits (ResourceRef = {resourceId 16-hex, resourceClass}). claude/codex
toObservations fingerprint toolSequence file paths into these; raw paths never
cross the boundary. Keep observation-0.1.0.json frozen; emit 0.2.0.
- Host privacy key (D1): sync keystore under the codeburn config dir, random
32-byte key generated on first use, stable across runs, never emitted.
- core/detectors: junk-reads, duplicate-reads, context-bloat — pure, zero
fs/env, each emitting Finding[] with confidence(basis), machine-readable
evidence, algorithmVersion.
- optimize.ts delegates the three to core, mapping Finding -> WasteFinding;
display strings, fix payloads and trend stay host-derived.
Numbers parity: all optimize tests pass unchanged; frozen-corpus optimize JSON
(3552 sessions) is byte-identical PRE vs POST.
79 lines
2 KiB
JSON
79 lines
2 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"
|
|
},
|
|
"./detectors": {
|
|
"types": "./dist/detectors/index.d.ts",
|
|
"import": "./dist/detectors/index.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"
|
|
}
|
|
}
|