@dzhechkov/harness-core 0.3.146 → 0.3.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dz-manifest.json +66 -18
- package/README.md +2 -0
- package/dist/cost-ledger.d.ts +318 -0
- package/dist/cost-ledger.d.ts.map +1 -0
- package/dist/cost-ledger.js +871 -0
- package/dist/cost-ledger.js.map +1 -0
- package/dist/cost-scoring.d.ts +9 -0
- package/dist/cost-scoring.d.ts.map +1 -1
- package/dist/cost-scoring.js +18 -0
- package/dist/cost-scoring.js.map +1 -1
- package/dist/feature-adr-checkpoints.d.ts +113 -0
- package/dist/feature-adr-checkpoints.d.ts.map +1 -0
- package/dist/feature-adr-checkpoints.js +184 -0
- package/dist/feature-adr-checkpoints.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/usage.d.ts +32 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +59 -10
- package/dist/usage.js.map +1 -1
- package/package.json +4 -4
- package/sbom.json +137 -17
- package/src/cost-ledger.ts +1105 -0
- package/src/cost-scoring.ts +17 -0
- package/src/feature-adr-checkpoints.ts +221 -0
- package/src/index.ts +55 -0
- package/src/usage.ts +74 -12
package/.dz-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "README.md",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "4710903a3f0f81d2163062977f6471f29073d2c516209f875c09cc54e75ea099"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "coverage/coverage-final.json",
|
|
@@ -259,21 +259,37 @@
|
|
|
259
259
|
"path": "dist/compounding.js.map",
|
|
260
260
|
"sha256": "f353339d08c311fb69d44960e97bcc9ddfc01d7bdb8c3ae26e9884a494c0338f"
|
|
261
261
|
},
|
|
262
|
+
{
|
|
263
|
+
"path": "dist/cost-ledger.d.ts",
|
|
264
|
+
"sha256": "872006c1a6dac23672b6879fa5b7506d2ce7e57f9682d518ffd986e9522e623f"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"path": "dist/cost-ledger.d.ts.map",
|
|
268
|
+
"sha256": "8df65b2795b029e0c8a1e3de73593d487ab4b730be134646215935d0a6c73709"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"path": "dist/cost-ledger.js",
|
|
272
|
+
"sha256": "da9c70db0807f05b19825a5344d3f73ff11e3759ad5be8b2db75c259be2e0580"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"path": "dist/cost-ledger.js.map",
|
|
276
|
+
"sha256": "48aa21f898920731f12e1454793f6d4bb9bcc4d0b1bef519bf1f7df87b7723f6"
|
|
277
|
+
},
|
|
262
278
|
{
|
|
263
279
|
"path": "dist/cost-scoring.d.ts",
|
|
264
|
-
"sha256": "
|
|
280
|
+
"sha256": "be1b6a913c8ed391e12a3e0d703733fdbca0d7975d2f40a895f85921583220da"
|
|
265
281
|
},
|
|
266
282
|
{
|
|
267
283
|
"path": "dist/cost-scoring.d.ts.map",
|
|
268
|
-
"sha256": "
|
|
284
|
+
"sha256": "04a3e07b206bf9f88750bdf061b7370558f6a6af95e109347cf18d92dbc22437"
|
|
269
285
|
},
|
|
270
286
|
{
|
|
271
287
|
"path": "dist/cost-scoring.js",
|
|
272
|
-
"sha256": "
|
|
288
|
+
"sha256": "27a8789698060e69be20fe2beccf792603ad3b414aa95563e1cccddb7ab4a8cc"
|
|
273
289
|
},
|
|
274
290
|
{
|
|
275
291
|
"path": "dist/cost-scoring.js.map",
|
|
276
|
-
"sha256": "
|
|
292
|
+
"sha256": "fe5762b4ac2c5249116c5a18223cf41e87510feb498a8d0663a2bd6a2cadf074"
|
|
277
293
|
},
|
|
278
294
|
{
|
|
279
295
|
"path": "dist/create-skill.d.ts",
|
|
@@ -387,6 +403,22 @@
|
|
|
387
403
|
"path": "dist/event-chain.js.map",
|
|
388
404
|
"sha256": "a874ba52b35ed445f2310a04bb0fbdb0ba34db18601d0086e7e666b7bafc8a16"
|
|
389
405
|
},
|
|
406
|
+
{
|
|
407
|
+
"path": "dist/feature-adr-checkpoints.d.ts",
|
|
408
|
+
"sha256": "e93790da411c0385feb2153a6cd424b2305773a9709582eafe7f2adc8ab45c36"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"path": "dist/feature-adr-checkpoints.d.ts.map",
|
|
412
|
+
"sha256": "28f030188a9061ebab709bd2ce90d06ebff69f8baef39551df7dd25520b801a2"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"path": "dist/feature-adr-checkpoints.js",
|
|
416
|
+
"sha256": "88120bc4dc1a3fbab9b051434103936ea769978e66d7aada30589cf96602d46c"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"path": "dist/feature-adr-checkpoints.js.map",
|
|
420
|
+
"sha256": "361699e01e18cf80f46602673dc1ee8e13ec63bee1d37fe120e4275b052b265d"
|
|
421
|
+
},
|
|
390
422
|
{
|
|
391
423
|
"path": "dist/feature-adr-claim-gate.d.ts",
|
|
392
424
|
"sha256": "abce2849ac6aa7b31292fb4d5e80b500b3a33a77533d3a3a8b3da6fe3ebaa7af"
|
|
@@ -485,19 +517,19 @@
|
|
|
485
517
|
},
|
|
486
518
|
{
|
|
487
519
|
"path": "dist/index.d.ts",
|
|
488
|
-
"sha256": "
|
|
520
|
+
"sha256": "ecf62c0372ef24516aa12797719b0cedfbfea1cf0f92d573baea8e9d9dea45b8"
|
|
489
521
|
},
|
|
490
522
|
{
|
|
491
523
|
"path": "dist/index.d.ts.map",
|
|
492
|
-
"sha256": "
|
|
524
|
+
"sha256": "ef7b4183ebdd16a162e00960b8070207901d6d3b4415c2ff78da0a762e713a78"
|
|
493
525
|
},
|
|
494
526
|
{
|
|
495
527
|
"path": "dist/index.js",
|
|
496
|
-
"sha256": "
|
|
528
|
+
"sha256": "25595cd5c6d53c4376571a9bf52444778a749fc22f50c64d15c38b248c12ed1f"
|
|
497
529
|
},
|
|
498
530
|
{
|
|
499
531
|
"path": "dist/index.js.map",
|
|
500
|
-
"sha256": "
|
|
532
|
+
"sha256": "c07373c4a1ad8ec473dcd01852cbffc6b5641e78bbf629dd8b5060dda94eea5e"
|
|
501
533
|
},
|
|
502
534
|
{
|
|
503
535
|
"path": "dist/learning-backend.d.ts",
|
|
@@ -1029,19 +1061,19 @@
|
|
|
1029
1061
|
},
|
|
1030
1062
|
{
|
|
1031
1063
|
"path": "dist/usage.d.ts",
|
|
1032
|
-
"sha256": "
|
|
1064
|
+
"sha256": "a03311bd06b17ee842215a65755d08d0c1e07188af344c495f73d7c5196c163f"
|
|
1033
1065
|
},
|
|
1034
1066
|
{
|
|
1035
1067
|
"path": "dist/usage.d.ts.map",
|
|
1036
|
-
"sha256": "
|
|
1068
|
+
"sha256": "33eb02f603e5b668dbfa4af6ed5747d039e2562c5e018c149c21c3c4eed9549c"
|
|
1037
1069
|
},
|
|
1038
1070
|
{
|
|
1039
1071
|
"path": "dist/usage.js",
|
|
1040
|
-
"sha256": "
|
|
1072
|
+
"sha256": "065a9b2209111adcc448d53191ed37a08db09029cf89188446186bc284ff45bf"
|
|
1041
1073
|
},
|
|
1042
1074
|
{
|
|
1043
1075
|
"path": "dist/usage.js.map",
|
|
1044
|
-
"sha256": "
|
|
1076
|
+
"sha256": "e1562daf935c8e1f0dd0f3372cd5ff9c999d137d80fd900d06cd62e8b511ebb1"
|
|
1045
1077
|
},
|
|
1046
1078
|
{
|
|
1047
1079
|
"path": "dist/vector-tier.d.ts",
|
|
@@ -1077,7 +1109,7 @@
|
|
|
1077
1109
|
},
|
|
1078
1110
|
{
|
|
1079
1111
|
"path": "package.json",
|
|
1080
|
-
"sha256": "
|
|
1112
|
+
"sha256": "1a64e1ded35c482214c3426808b24bcf7048041d716e375f101e228931c28248"
|
|
1081
1113
|
},
|
|
1082
1114
|
{
|
|
1083
1115
|
"path": "src/__tests__/golden-baseline.test.ts",
|
|
@@ -1139,9 +1171,13 @@
|
|
|
1139
1171
|
"path": "src/compounding.ts",
|
|
1140
1172
|
"sha256": "1b20b2b6ababea386d195ab3481a0af6582fda2757720732b5098e162964da32"
|
|
1141
1173
|
},
|
|
1174
|
+
{
|
|
1175
|
+
"path": "src/cost-ledger.ts",
|
|
1176
|
+
"sha256": "0658e1caedea358d50e69c5b52ac704b29f614349b7527b2ddd0f82911428abd"
|
|
1177
|
+
},
|
|
1142
1178
|
{
|
|
1143
1179
|
"path": "src/cost-scoring.ts",
|
|
1144
|
-
"sha256": "
|
|
1180
|
+
"sha256": "8ca46e3e1396242f91fbd517b76ebbdf775d3540a033208ba0f0ca33d779d07a"
|
|
1145
1181
|
},
|
|
1146
1182
|
{
|
|
1147
1183
|
"path": "src/create-skill.ts",
|
|
@@ -1171,6 +1207,10 @@
|
|
|
1171
1207
|
"path": "src/event-chain.ts",
|
|
1172
1208
|
"sha256": "f8306131a5021167169b525733da711ff378382f0a7368376f35834c350a9e23"
|
|
1173
1209
|
},
|
|
1210
|
+
{
|
|
1211
|
+
"path": "src/feature-adr-checkpoints.ts",
|
|
1212
|
+
"sha256": "17278275695f9bbec9f48628853659c9d8b5dfcdc6bb2b03e0c88648f95a446d"
|
|
1213
|
+
},
|
|
1174
1214
|
{
|
|
1175
1215
|
"path": "src/feature-adr-claim-gate.ts",
|
|
1176
1216
|
"sha256": "0fd1c44e7f6aea1abfac1e6d3fac3e4bbe4dfd501d068803f310c1ec36716eb6"
|
|
@@ -1197,7 +1237,7 @@
|
|
|
1197
1237
|
},
|
|
1198
1238
|
{
|
|
1199
1239
|
"path": "src/index.ts",
|
|
1200
|
-
"sha256": "
|
|
1240
|
+
"sha256": "537dc4dc55cb43f11f2f0cee45ea53ec6fe362df470948408c49bb11fe972d9f"
|
|
1201
1241
|
},
|
|
1202
1242
|
{
|
|
1203
1243
|
"path": "src/learning-backend.ts",
|
|
@@ -1329,7 +1369,7 @@
|
|
|
1329
1369
|
},
|
|
1330
1370
|
{
|
|
1331
1371
|
"path": "src/usage.ts",
|
|
1332
|
-
"sha256": "
|
|
1372
|
+
"sha256": "317fc95287308a8d7ea92222d234bf62f8415ab97e40c8ceaf2f6a3f1ac5d80c"
|
|
1333
1373
|
},
|
|
1334
1374
|
{
|
|
1335
1375
|
"path": "src/vector-tier.ts",
|
|
@@ -1407,6 +1447,10 @@
|
|
|
1407
1447
|
"path": "test/compounding.test.ts",
|
|
1408
1448
|
"sha256": "89265131de29a2841e73068e4be256e1cbe7bd8dbd0c8eacc79039626b41e6f0"
|
|
1409
1449
|
},
|
|
1450
|
+
{
|
|
1451
|
+
"path": "test/cost-ledger.test.ts",
|
|
1452
|
+
"sha256": "75a5d06f5221fed7f98997a544c880836ead6fe74cc03ebe8c1a0875fb48ad9c"
|
|
1453
|
+
},
|
|
1410
1454
|
{
|
|
1411
1455
|
"path": "test/cost-scoring.test.ts",
|
|
1412
1456
|
"sha256": "7cafddfb69103fc401d17781ade8654a0f7cec92f131bb383be715e6f273d8aa"
|
|
@@ -1463,6 +1507,10 @@
|
|
|
1463
1507
|
"path": "test/feature-adr-brain.test.ts",
|
|
1464
1508
|
"sha256": "f131290294c1da977c621842e65c0dc560643720c6b5d49fd6aead2d9270bf74"
|
|
1465
1509
|
},
|
|
1510
|
+
{
|
|
1511
|
+
"path": "test/feature-adr-checkpoints.test.ts",
|
|
1512
|
+
"sha256": "8564e1953e6da1f5a2b0990b1e5d8c78b24cc268a2c4eea15609d90b8fbda6f6"
|
|
1513
|
+
},
|
|
1466
1514
|
{
|
|
1467
1515
|
"path": "test/feature-adr-claim-gate.test.ts",
|
|
1468
1516
|
"sha256": "0b72b9bc26722022dee860dff0811426c7038a15631bcd084a2fb8295211b741"
|
|
@@ -1681,5 +1729,5 @@
|
|
|
1681
1729
|
}
|
|
1682
1730
|
]
|
|
1683
1731
|
},
|
|
1684
|
-
"signature": "+
|
|
1732
|
+
"signature": "hxJqU0VjfVbOQps7TTMTwogoeBt7+hX81mj6AF3qiYzso74iAmy0yyf2CQzfZO++8Lk3uw1Cxw50kz92gZyACQ=="
|
|
1685
1733
|
}
|
package/README.md
CHANGED
|
@@ -15,8 +15,10 @@ and any other consumer.
|
|
|
15
15
|
| `backlog` | `dedupIdea`, `classifyDedup`, `alignIdea`, `spinRoulette`, `readGoalMapDetailed`, `parseEffort`, `ensureBacklogGitignored`, `harmonizeBacklog` | The Smart Backlog engine behind `dz backlog`: content-addressed idea records in `.dz/backlog/ideas.jsonl`, semantic dedup over the REUSED agentdb vector namespace (`dz-backlog` — no second store), weighted-max GoalMap alignment, and a seeded weighted roulette. Every band/weight decision is a PURE function. `classifyDedup` also reports the top-1 match id alongside the cosine (the calibration surface for the 0.92 duplicate band — observational, it never moves the verdict); `readGoalMapDetailed` returns the entries the defensive reader DROPPED with a reason AND the fields it REPAIRED with their raw values (a weight clamped before validation made the validator's out-of-range branch dead code), so `goals --validate` can never report a vacuous "valid (0 goals)" nor hide a `weight: 7`; `parseEffort` returns a printable note for every clamp; `ensureBacklogGitignored` gitignores the store on first write (raw ideas are private prompt-class content) — atomically, preserving the file's dominant EOL, recognising every plain spelling of an existing rule (`/.dz/`, `.dz/**`, …) via `backlogIgnoreStatus`, and obeying a `!` negation as an explicit user opt-out instead of overriding it |
|
|
16
16
|
| `feature-adr-setup` (P3) | `renderGuardsConfig`, `renderGuardsRunner` | Scaffolds deterministic guard tests into a TARGET project: `guards.config.json` + a zero-dependency `check.mjs` runner (loc-cap, secret-scan, frozen-file sha256 pins, waivers-with-reasons) — `dz feature-adr-setup --guards` |
|
|
17
17
|
| `usage` | `computeUsage`, `TOKEN_WEIGHTS`, `readUsageLimits`, `deriveUsageCalibration` | Read-only Claude usage ESTIMATE behind `dz usage`. Tokens are COST-WEIGHTED input-equivalents (input 1x, cache-write 1.25x / 1h 2x, cache-read 0.1x, output 5x) — a flat sum is 89-99.7% cache-read (MEASURED) and tracks conversation length, not work. Scans subagent transcripts too (`<session>/subagents/*.jsonl`), follows no symlinks, reads only regular files (symlinked FILES and DIRECTORY components alike are skipped), and caps the walk BY RECENCY so a huge history cannot discard current usage. `pct` stays `null` while limits are unconfigured — an unconfigured estimate is never dressed up as a number |
|
|
18
|
+
| `cost-ledger` | `deriveCostLedger`, `buildCostLedger`, `verifyCostLedgerReport`, `stageCostAggregates`, `renderCostLedger`, `writeCostLedgerJsonl`, `COST_LEDGER_SCOPE` | Per-stage cost ledger behind `dz usage --by-stage`. A feature-adr run reports ONE number; this joins the workflow's own `stageLabel()` strings to the per-agent transcripts the harness already writes, so a run becomes an itemized receipt. POST-HOC DERIVER, not a writer — no workflow edit, and a KILLED run is still derivable. The invariant: `accounted + unaccounted === runTotal` and `accounted + doubleAttributed === Σ stages`, RAW integer equality (rounding happens exactly once, per sample, at extraction), re-derived from the emitted report by `verifyCostLedgerReport` — the writer clamps, the verifier enforces. A mismatch is a NAMED defect (`Unaccounted`, `DoubleAttributed`, `ForeignSample`, `MissingStageTranscript`, `MalformedRecord`), never a rounding remainder, so `epsilon` defaults to 0. The run total comes from the run's transcript DIRECTORY LISTING, NOT the record's own `totalTokens` — that field is exactly `Σ workflowProgress[].tokens` in 29 of 29 recorded runs (MEASURED), so an invariant against it can never fail. Both sides share ONE estimator with `dz usage` (`weightedTokensOf`). `stageCostAggregates` is a pure feed-forward reader for auto-cost routing that EXCLUDES non-reconciling runs; wiring it into routing is deliberately out of scope. HONEST SCOPE, printed by every surface: local transcript ESTIMATES, not billed amounts — it catches ATTRIBUTION errors, NOT pricing errors; `hasKnownPricing` marks rows priced by the sonnet-class fallback. `INSUFFICIENT_DATA` is a distinct verdict, never collapsed into `BALANCED` |
|
|
18
19
|
| `compounding` | `mulberry32`, `bootstrapDelta`, `decidePromotion`, `assembleCompoundingReport` | Pure learning-loop payoff engine behind `dz compounding`: seeded deterministic bootstrap (conservative nearest-rank lower-95), promotion that refuses non-finite/malformed input and anything under 5 samples per arm, and dz-native measurements (pool write-only ratio, guard trajectory by RATE, replay readiness over unique untruncated prompt events). A gate without data says INSUFFICIENT_DATA — never a verdict. Compaction keeps the newest query-bearing rows verbatim and aggregates ONLY the rest (read totals are invariant across compactions). Also reports EVENT-CHAIN health of the evidence logs it computed from (`evidenceLogs` in, `instrumentation.chains` out) — verified / defect kinds / uncovered pre-chain prefix, with no logs handed in producing no line at all rather than a vacuous "clean" |
|
|
19
20
|
| `event-chain` | `fnv1a32`, `nextChainFields`, `appendChainedLines`, `chainRewrite`, `guardedRewrite`, `verifyEventChain`, `EVENT_CHAIN_SCOPE` | Pure hash-chain over the two learning-evidence logs (`.dz/recall-usage.jsonl`, `.dz/guard-audit.jsonl`): each appended record carries `seq` + `prevHash` (FNV-1a over the previous line AS WRITTEN, so key order cannot make writer and verifier disagree), derived from the LAST LINE ONLY so a per-prompt hook stays O(1). `verifyEventChain` names eight classes — `BrokenLink`, `DuplicateSeq`, `NonMonotonicSeq`, `TornTail`, `DoubleCounted`, `LedgerImbalance`, `MalformedLedger`, `ClaimInterrupted`. The last four exist because a rewriter must not be able to certify itself: the compaction ledger's arithmetic (`Σ weight + dropped === source`, `dropped ∈ [0, source]`) is enforced with NO clamps in the verifier (the clamp belongs to the writer), a damaged ledger line is a defect rather than a silently-disabled check, and a claim that never reached its `throughSeq` — because the segment restarted or the file ended — is reported instead of escaping through the discontinuity. `guardedRewrite` is the concurrency guard for any whole-file rewrite: exclusive lock, plus a re-read of the live file after computing the new text and BEFORE the rename, so a concurrent append aborts the attempt and is folded into a bounded retry rather than overwritten (it narrows the read→rename window; it cannot close it, and says so). Records written before chaining existed stay LEGAL and are counted as an uncovered `preChainPrefix`; an unreadable tail never blocks a write (fresh MARKED segment — an unreadable tail WINDOW is distinguished from an empty file — and the appender starts on a new line so one torn write cannot eat the next record); an unmarked restart is reported once and then re-anchored, so one incident is one defect instead of a cascade. HONEST SCOPE, carried in every result and printed by every surface: corruption detection for our own bugs — FNV-1a is not cryptography, its collisions are constructible, the threat model has no adversary, and a regression test fails if the module regrows tamper-proofing vocabulary |
|
|
21
|
+
| `feature-adr-checkpoints` | `checkpointInputHash`, `decideCheckpointResume`, `parseCheckpointRead`, `serializeCheckpoint`, `fnv1a64`, `CKPT_SCHEMA_VERSION`, `STAGE_ARTIFACTS` | The PURE half of feature-adr's durable per-stage checkpoints (`features/<slug>/.fa-state/checkpoints.jsonl`): a dead L/XL run — or the standard stop-after-plan re-invoke — resumes completed stages instead of re-spending them. Resume = INPUT-identity (64-bit salted FNV over a schema-versioned JSON tuple incl. upstream stage results) + presence of EVERY tier-required artifact; a stale-input hash never resumes in ANY mode (`force` relaxes only the artifact probe — the tested load-bearing property). HONEST SCOPE: it does NOT fingerprint the working tree (a crash-resume legitimately sees the dead run's uncommitted writes) — after manual edits use `resume:'never'` and re-QE. Null results are never persisted or resumable; a stage-identifiable corrupt record ERASES its older entry (last-wins holds for corruption too); a codex code stage whose landing barrier said `genuinely-not-landed` is never checkpointed. The workflow mirrors this inline (wiring-guarded); RU: чекпоинт после каждой дорогой стадии — упавший ран возобновляется, а не пере-тратит завершённое |
|
|
20
22
|
| `operations` | `runInit`, `runSync`, `runVerify`, `runDoctor` | The harness operations, returning structured reports |
|
|
21
23
|
| `release` | `collectPackageFacts`, `selectAffectedPackages`, `planReleaseGates`, `classifyGateExecutions`, `buildFailureIssue`, `firstOutputLine` | Pure verified-release engine behind `dz release`: plans 4 HARD gates (tests / `pnpm audit --prod` / `node --check` / bin smoke-boot) as DATA and classifies injected results fail-closed — an unbuilt package (declared `build` script, no dist JS) is a `MISSING_DIST` failure, a template-only pack is a named `SKIP_NO_ARTIFACTS` skip, `selectAffectedPackages` fail-opens to the full set when the changed-file list is unavailable |
|
|
22
24
|
| `parity` | `TARGET_CAPABILITIES`, `PARITY_FEATURES`, `computeParity`, `buildParityMatrix` | Declarative target-parity model behind `dz parity`: verified capability flags per target × feature FORMS with requirements; the feature×target matrix is always COMPUTED (never hand-written), and the model must classify exactly `TARGET_NAMES` — an unclassified new target refuses to compile |
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-stage cost ledger with a reconciliation invariant for feature-adr runs
|
|
3
|
+
* (feature `cost-ledger`, ADR-001/ADR-002/ADR-003).
|
|
4
|
+
*
|
|
5
|
+
* A feature-adr run reports ONE number. The recorded run `wf_0576bd7d-797` has
|
|
6
|
+
* `totalTokens: 623290` — the "623k subagent tokens" figure in project memory. That number cannot
|
|
7
|
+
* be attributed to a stage, so "where the budget burns" is a feeling. feature-adr ALREADY labels
|
|
8
|
+
* every stage via `stageLabel()` and the harness ALREADY persists those labels next to per-agent
|
|
9
|
+
* transcripts; nothing joined labels to spend. This module is that join.
|
|
10
|
+
*
|
|
11
|
+
* ## What this is
|
|
12
|
+
*
|
|
13
|
+
* A POST-HOC DERIVER (ADR-001). It reads what is already on disk —
|
|
14
|
+
* `<session>/workflows/wf_<runId>.json` for the stage labels and
|
|
15
|
+
* `<session>/subagents/workflows/<runId>/agent-<agentId>.jsonl` for the spend — and never edits
|
|
16
|
+
* `.claude/workflows/feature-adr.js`. A killed run is still derivable, which a stage-boundary
|
|
17
|
+
* writer could not manage; 5 of 29 recorded runs on this machine are killed.
|
|
18
|
+
*
|
|
19
|
+
* ## The invariant (ADR-002 — the load-bearing half)
|
|
20
|
+
*
|
|
21
|
+
* The obvious run total, the record's own `totalTokens`, is EXACTLY `Σ workflowProgress[].tokens`
|
|
22
|
+
* in 29 of 29 recorded runs. Reconciling against it can never fail: a vacuous gate that would print
|
|
23
|
+
* BALANCED forever and be believed. So the right-hand side comes from the run's transcript
|
|
24
|
+
* DIRECTORY LISTING — a source independent of the record — and both sides run the SAME estimator
|
|
25
|
+
* (`weightedTokensOf`, shared with `dz usage`):
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
* accountedTokens + unaccountedTokens === runTotalTokens
|
|
29
|
+
* accountedTokens + doubleAttributedTokens === stageTokensSum
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* Raw integer equality, no epsilon: rounding happens exactly once, per sample, at extraction.
|
|
33
|
+
* {@link verifyCostLedgerReport} re-derives both identities from the emitted report — the writer
|
|
34
|
+
* clamps, the verifier enforces raw equality (the `event-chain.ts` house pattern). A mismatch is a
|
|
35
|
+
* NAMED defect from {@link COST_LEDGER_DEFECT_KINDS}, never a rounding remainder.
|
|
36
|
+
*
|
|
37
|
+
* ## What this is NOT — read {@link COST_LEDGER_SCOPE} before describing it to anyone
|
|
38
|
+
*
|
|
39
|
+
* The totals are LOCAL TRANSCRIPT ESTIMATES. No billing API is consulted. The invariant therefore
|
|
40
|
+
* catches ATTRIBUTION errors — a double-counted stage, a stage missing from the ledger — and says
|
|
41
|
+
* NOTHING about whether the prices are right. The USD column is a secondary figure derived from a
|
|
42
|
+
* static table that has no `claude-fable` entry, so it falls back to sonnet-class pricing for the
|
|
43
|
+
* default model of every recorded run; the fallback is REPORTED, per ADR-003, not hidden.
|
|
44
|
+
*
|
|
45
|
+
* The ADR-158 reference implementation this feature is grounded in quotes a ~50.5% figure. That
|
|
46
|
+
* number is SYNTHETIC, belongs to their document, and is never a measurement of this repo.
|
|
47
|
+
*
|
|
48
|
+
* @packageDocumentation
|
|
49
|
+
*/
|
|
50
|
+
/** The one sentence that states what the ledger is and is not. Printed by EVERY surface (ADR-003). */
|
|
51
|
+
export declare const COST_LEDGER_SCOPE: string;
|
|
52
|
+
export type CostLedgerDefectKind =
|
|
53
|
+
/** Run spend attributed to no stage — an agent transcript with no `workflowProgress[]` entry. */
|
|
54
|
+
'Unaccounted'
|
|
55
|
+
/** One usage sample claimed by more than one stage. */
|
|
56
|
+
| 'DoubleAttributed'
|
|
57
|
+
/** A stage claims a sample absent from the run's universe — the join went outside the run. */
|
|
58
|
+
| 'ForeignSample'
|
|
59
|
+
/** A stage present in the run record has no transcript, or a transcript with no usage samples. */
|
|
60
|
+
| 'MissingStageTranscript'
|
|
61
|
+
/** A record or sample whose fields are missing, mistyped or non-finite — never silently ignored. */
|
|
62
|
+
| 'MalformedRecord'
|
|
63
|
+
/** The transcript listing hit the file cap — the run total is INCOMPLETE, so no verdict may be
|
|
64
|
+
* built on it (Codex QE HIGH: a silent cap could emit BALANCED from a partial directory). */
|
|
65
|
+
| 'TruncatedListing';
|
|
66
|
+
/**
|
|
67
|
+
* The defect vocabulary, as data. Deliberately absent: any name implying these are BILLED amounts —
|
|
68
|
+
* that name would assert exactly the promise {@link COST_LEDGER_SCOPE} refuses. A test pins this
|
|
69
|
+
* list so the vocabulary cannot quietly grow such a name.
|
|
70
|
+
*/
|
|
71
|
+
export declare const COST_LEDGER_DEFECT_KINDS: readonly CostLedgerDefectKind[];
|
|
72
|
+
/**
|
|
73
|
+
* Three values, not two. `INSUFFICIENT_DATA` is NOT success: a caller must not read
|
|
74
|
+
* `verdict !== 'DEFECT'` as "reconciled" (ADR-003).
|
|
75
|
+
*/
|
|
76
|
+
export type CostLedgerVerdict = 'BALANCED' | 'DEFECT' | 'INSUFFICIENT_DATA';
|
|
77
|
+
export declare const COST_LEDGER_VERDICTS: readonly CostLedgerVerdict[];
|
|
78
|
+
/**
|
|
79
|
+
* Default reconciliation tolerance, as a FRACTION of the run total. Zero, because the arithmetic is
|
|
80
|
+
* exact integer — there is no rounding remainder for a tolerance to absorb, so any remainder is a
|
|
81
|
+
* defect. A caller may raise it to tolerate small orphans; its value is always printed.
|
|
82
|
+
*/
|
|
83
|
+
export declare const DEFAULT_COST_LEDGER_EPSILON = 0;
|
|
84
|
+
/** One deduped usage sample extracted from a transcript. */
|
|
85
|
+
export interface CostLedgerSample {
|
|
86
|
+
/** Dedup key: `message.id + ':' + requestId`, or a content key when both are absent. */
|
|
87
|
+
readonly key: string;
|
|
88
|
+
/** Epoch ms, or `null` when the record carried no parseable timestamp. */
|
|
89
|
+
readonly ts: number | null;
|
|
90
|
+
/** Cost-weighted input-equivalent tokens, ROUNDED — the single rounding point of the feature. */
|
|
91
|
+
readonly weighted: number;
|
|
92
|
+
readonly input: number;
|
|
93
|
+
readonly cacheWrite: number;
|
|
94
|
+
readonly cacheRead: number;
|
|
95
|
+
readonly output: number;
|
|
96
|
+
readonly model: string | null;
|
|
97
|
+
}
|
|
98
|
+
/** One `type: "workflow_agent"` entry of a run record, after clamping. */
|
|
99
|
+
export interface WorkflowStageEntry {
|
|
100
|
+
/** `stageLabel()` output, VERBATIM — the ledger invents no taxonomy (FR-2). */
|
|
101
|
+
readonly label: string;
|
|
102
|
+
readonly agentId: string;
|
|
103
|
+
readonly model: string;
|
|
104
|
+
readonly phase: string | null;
|
|
105
|
+
readonly startedAtMs: number | null;
|
|
106
|
+
readonly durationMs: number | null;
|
|
107
|
+
readonly state: string | null;
|
|
108
|
+
/** The record's own per-agent token count. Reported for traceability; NOT the invariant's input. */
|
|
109
|
+
readonly recordTokens: number | null;
|
|
110
|
+
}
|
|
111
|
+
/** A parsed `wf_<runId>.json` workflow run record. */
|
|
112
|
+
export interface WorkflowRunRecord {
|
|
113
|
+
readonly runId: string;
|
|
114
|
+
readonly workflowName: string | null;
|
|
115
|
+
readonly slug: string | null;
|
|
116
|
+
readonly status: string | null;
|
|
117
|
+
readonly startedAtMs: number | null;
|
|
118
|
+
readonly durationMs: number | null;
|
|
119
|
+
/** The record's cached `Σ workflowProgress[].tokens` — RAW, unweighted, and NOT the run total. */
|
|
120
|
+
readonly recordTotalTokens: number | null;
|
|
121
|
+
readonly stages: readonly WorkflowStageEntry[];
|
|
122
|
+
/** Non-fatal problems found while parsing — surfaced as `MalformedRecord` defects. */
|
|
123
|
+
readonly malformed: readonly string[];
|
|
124
|
+
}
|
|
125
|
+
/** One ledger row: a stage's aggregated spend (FR-1). */
|
|
126
|
+
export interface CostLedgerRow {
|
|
127
|
+
readonly runId: string;
|
|
128
|
+
readonly slug: string | null;
|
|
129
|
+
/** `stageLabel()` output, verbatim. */
|
|
130
|
+
readonly stage: string;
|
|
131
|
+
readonly phase: string | null;
|
|
132
|
+
/** The stage's model id, or `'mixed'` when several agents share a label with different models. */
|
|
133
|
+
readonly model: string;
|
|
134
|
+
readonly agentIds: readonly string[];
|
|
135
|
+
readonly tokensIn: number;
|
|
136
|
+
readonly tokensCacheWrite: number;
|
|
137
|
+
readonly tokensCacheRead: number;
|
|
138
|
+
readonly tokensOut: number;
|
|
139
|
+
/** Cost-weighted input-equivalent tokens — the PRIMARY number of the row. */
|
|
140
|
+
readonly weightedTokens: number;
|
|
141
|
+
/** Secondary, derived estimate. `pricingKnown === false` ⇒ sonnet-class fallback pricing. */
|
|
142
|
+
readonly costUsd: number;
|
|
143
|
+
readonly pricingKnown: boolean;
|
|
144
|
+
/** ISO, from the run record's stage boundaries (ADR-001) — `null` when the record lacked them. */
|
|
145
|
+
readonly startedTs: string | null;
|
|
146
|
+
readonly endedTs: string | null;
|
|
147
|
+
/** Number of deduped usage samples (billed calls) attributed to this stage. */
|
|
148
|
+
readonly calls: number;
|
|
149
|
+
}
|
|
150
|
+
export interface CostLedgerDefect {
|
|
151
|
+
readonly kind: CostLedgerDefectKind;
|
|
152
|
+
readonly detail: string;
|
|
153
|
+
/** Weighted tokens implicated, when the defect is quantitative. */
|
|
154
|
+
readonly tokens?: number;
|
|
155
|
+
/** Stage labels or agent ids implicated, when the defect is locatable. */
|
|
156
|
+
readonly subjects?: readonly string[];
|
|
157
|
+
}
|
|
158
|
+
export interface CostLedgerReconciliation {
|
|
159
|
+
/** RIGHT side — dedup-union over the run's transcript DIRECTORY (independent of the record). */
|
|
160
|
+
readonly runTotalTokens: number;
|
|
161
|
+
/** Dedup-union of samples claimed by at least one stage. */
|
|
162
|
+
readonly accountedTokens: number;
|
|
163
|
+
/** Σ of the per-stage sums. Exceeds `accountedTokens` exactly when a sample is double-claimed. */
|
|
164
|
+
readonly stageTokensSum: number;
|
|
165
|
+
/** `runTotalTokens - accountedTokens`. */
|
|
166
|
+
readonly unaccountedTokens: number;
|
|
167
|
+
/** `stageTokensSum - accountedTokens`. */
|
|
168
|
+
readonly doubleAttributedTokens: number;
|
|
169
|
+
/** Tolerance as a FRACTION of the run total; `0` by default (ADR-002). */
|
|
170
|
+
readonly epsilon: number;
|
|
171
|
+
/** Both raw integer identities held when the report was built. */
|
|
172
|
+
readonly identityHolds: boolean;
|
|
173
|
+
readonly verdict: CostLedgerVerdict;
|
|
174
|
+
readonly defects: readonly CostLedgerDefect[];
|
|
175
|
+
}
|
|
176
|
+
export interface CostLedgerReport {
|
|
177
|
+
readonly runId: string;
|
|
178
|
+
readonly slug: string | null;
|
|
179
|
+
readonly workflowName: string | null;
|
|
180
|
+
readonly status: string | null;
|
|
181
|
+
readonly startedTs: string | null;
|
|
182
|
+
readonly rows: readonly CostLedgerRow[];
|
|
183
|
+
readonly reconciliation: CostLedgerReconciliation;
|
|
184
|
+
/** The record's cached raw sum — reported, never the invariant's right-hand side (ADR-002). */
|
|
185
|
+
readonly recordTotalTokens: number | null;
|
|
186
|
+
readonly totalCostUsd: number;
|
|
187
|
+
/** Model ids whose USD figures used sonnet-class fallback pricing (ADR-003). */
|
|
188
|
+
readonly pricingFallbackModels: readonly string[];
|
|
189
|
+
/** ALWAYS `true` — a local aggregation, not an official API (mirrors `dz usage`). */
|
|
190
|
+
readonly estimated: true;
|
|
191
|
+
/** ALWAYS {@link COST_LEDGER_SCOPE}. */
|
|
192
|
+
readonly scope: string;
|
|
193
|
+
}
|
|
194
|
+
/** FR-8 feed-forward aggregate. WIRING INTO auto-cost ROUTING IS OUT OF SCOPE — this is a reader. */
|
|
195
|
+
export interface StageCostAggregate {
|
|
196
|
+
readonly stage: string;
|
|
197
|
+
readonly model: string;
|
|
198
|
+
readonly avgTokens: number;
|
|
199
|
+
readonly runs: number;
|
|
200
|
+
readonly totalTokens: number;
|
|
201
|
+
readonly avgCostUsd: number;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Extract deduped, weighted usage samples from ONE transcript's text. Pure and never-throw — a
|
|
205
|
+
* corrupt line is skipped, exactly as `computeUsage` does.
|
|
206
|
+
*
|
|
207
|
+
* `weighted` is `Math.round(weightedTokensOf(...))`: the SINGLE rounding point of the feature, so
|
|
208
|
+
* every sum downstream is exact integer arithmetic and the reconciliation identity is raw equality
|
|
209
|
+
* rather than a float comparison (ADR-002).
|
|
210
|
+
*/
|
|
211
|
+
export declare function extractCostSamples(text: string): CostLedgerSample[];
|
|
212
|
+
/**
|
|
213
|
+
* Parse a `wf_<runId>.json` object into a {@link WorkflowRunRecord}. Pure and never-throw; every
|
|
214
|
+
* number is clamped and every unusable field is RECORDED in `malformed` rather than dropped, so it
|
|
215
|
+
* can surface as a `MalformedRecord` defect (the vocabulary refuses silent ignores).
|
|
216
|
+
*
|
|
217
|
+
* `args` is stored as a JSON STRING in the recorded runs on this machine and as an object in
|
|
218
|
+
* others; both shapes are accepted.
|
|
219
|
+
*/
|
|
220
|
+
export declare function parseWorkflowRunRecord(raw: unknown): WorkflowRunRecord | null;
|
|
221
|
+
/** Per-stage sample sets, keyed by the `stageLabel()` string. */
|
|
222
|
+
export interface StageSampleSet {
|
|
223
|
+
readonly stage: string;
|
|
224
|
+
readonly samples: readonly CostLedgerSample[];
|
|
225
|
+
}
|
|
226
|
+
export interface BuildCostLedgerInput {
|
|
227
|
+
readonly record: WorkflowRunRecord;
|
|
228
|
+
/** LEFT side — one entry per `agentId` that had a transcript. */
|
|
229
|
+
readonly stageSamples: readonly {
|
|
230
|
+
readonly agentId: string;
|
|
231
|
+
readonly samples: readonly CostLedgerSample[];
|
|
232
|
+
}[];
|
|
233
|
+
/** RIGHT side — the dedup-union over the run's transcript DIRECTORY (ADR-002). */
|
|
234
|
+
readonly runSamples: readonly CostLedgerSample[];
|
|
235
|
+
/** Agent transcripts present in the run directory with no `workflowProgress[]` entry. */
|
|
236
|
+
readonly orphanAgentIds?: readonly string[];
|
|
237
|
+
/** Fraction of the run total tolerated as unaccounted. Default {@link DEFAULT_COST_LEDGER_EPSILON}. */
|
|
238
|
+
readonly epsilon?: number;
|
|
239
|
+
/** True when the transcript listing hit the file cap — the run total is incomplete (Codex QE HIGH). */
|
|
240
|
+
readonly transcriptListingTruncated?: boolean;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Build the report and evaluate the invariant. PURE — no filesystem, no clock. Every number that
|
|
244
|
+
* enters is clamped here (the writer clamps; {@link verifyCostLedgerReport} enforces raw equality).
|
|
245
|
+
*/
|
|
246
|
+
export declare function buildCostLedger(input: BuildCostLedgerInput): CostLedgerReport;
|
|
247
|
+
/**
|
|
248
|
+
* Re-derive both identities from an EMITTED report — the verifier half of the house pattern. It
|
|
249
|
+
* trusts nothing the builder computed except the numbers it printed, so a future writer bug shows
|
|
250
|
+
* up as a `MalformedRecord` finding instead of a plausible table.
|
|
251
|
+
*/
|
|
252
|
+
export declare function verifyCostLedgerReport(report: CostLedgerReport): readonly CostLedgerDefect[];
|
|
253
|
+
/**
|
|
254
|
+
* Aggregate per-stage cost across runs, for a future auto-cost router that today chooses models
|
|
255
|
+
* from a STATIC assumptions table.
|
|
256
|
+
*
|
|
257
|
+
* **WIRING INTO ROUTING IS OUT OF SCOPE for this feature** — this returns data and nothing consumes
|
|
258
|
+
* it yet. That is deliberate: an ESTIMATED number must not drive an expensive routing decision
|
|
259
|
+
* until it has been calibrated. Rows from runs whose verdict is not `BALANCED` are EXCLUDED, so a
|
|
260
|
+
* run with a known attribution defect can never quietly become a routing input.
|
|
261
|
+
*/
|
|
262
|
+
export declare function stageCostAggregates(reports: readonly CostLedgerReport[]): StageCostAggregate[];
|
|
263
|
+
/** Human table + reconciliation line + verdict + the honest-scope note (ADR-003). */
|
|
264
|
+
export declare function renderCostLedger(report: CostLedgerReport): string;
|
|
265
|
+
/**
|
|
266
|
+
* FR-7 serialization: one JSON object per line. The first line is a `kind: "cost-ledger-scope"`
|
|
267
|
+
* header carrying {@link COST_LEDGER_SCOPE}, so the honest scope travels with the file; the last is
|
|
268
|
+
* the reconciliation. This is a REGENERABLE REPORT, never a read-back source of truth (ADR-001).
|
|
269
|
+
*/
|
|
270
|
+
export declare function costLedgerJsonl(report: CostLedgerReport): string;
|
|
271
|
+
export interface CostLedgerIoOptions {
|
|
272
|
+
/** Override the `~/.claude/projects` root. Defaults to {@link claudeProjectsRoot}. */
|
|
273
|
+
readonly projectsRoot?: string;
|
|
274
|
+
/** Munged project directory name (e.g. `-home-user-repo`). Absent ⇒ scan every project. */
|
|
275
|
+
readonly projectDir?: string;
|
|
276
|
+
readonly epsilon?: number;
|
|
277
|
+
}
|
|
278
|
+
export interface CostLedgerRunRef {
|
|
279
|
+
readonly runId: string;
|
|
280
|
+
readonly slug: string | null;
|
|
281
|
+
readonly workflowName: string | null;
|
|
282
|
+
readonly status: string | null;
|
|
283
|
+
readonly startedAtMs: number | null;
|
|
284
|
+
/** Absolute path of the `wf_*.json` record. */
|
|
285
|
+
readonly recordPath: string;
|
|
286
|
+
/** Absolute path of `<session>/subagents/workflows/<runId>` — may not exist. */
|
|
287
|
+
readonly transcriptDir: string;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Enumerate workflow run records, newest first. NEVER throws — an unreadable tree yields `[]`.
|
|
291
|
+
* READONLY. `lstat` everywhere, so a symlinked session or run directory is never walked.
|
|
292
|
+
*/
|
|
293
|
+
export declare function listCostLedgerRuns(opts?: CostLedgerIoOptions): CostLedgerRunRef[];
|
|
294
|
+
export interface DeriveCostLedgerOptions extends CostLedgerIoOptions {
|
|
295
|
+
/** Exact run id. Must match `[A-Za-z0-9_.-]{1,128}` — it becomes a path segment. */
|
|
296
|
+
readonly runId?: string;
|
|
297
|
+
/** Most recent run with this `args.slug`. Same pattern restriction. */
|
|
298
|
+
readonly slug?: string;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Derive the ledger for ONE run. Returns `null` when no run matches — an ABSENT run is never a
|
|
302
|
+
* BALANCED empty report (ADR-003). NEVER throws; READONLY.
|
|
303
|
+
*/
|
|
304
|
+
export declare function deriveCostLedger(opts?: DeriveCostLedgerOptions): CostLedgerReport | null;
|
|
305
|
+
/**
|
|
306
|
+
* FR-8 IO wrapper: derive every run and aggregate. Runs that do not reconcile are excluded by
|
|
307
|
+
* {@link stageCostAggregates}. NEVER throws; READONLY. Still NOT wired into routing.
|
|
308
|
+
*/
|
|
309
|
+
export declare function deriveStageCostAggregates(opts?: CostLedgerIoOptions & {
|
|
310
|
+
readonly maxRuns?: number;
|
|
311
|
+
}): StageCostAggregate[];
|
|
312
|
+
/**
|
|
313
|
+
* FR-7 opt-in materialization. Atomic: writes a sibling `.tmp` then `renameSync`s over the target,
|
|
314
|
+
* and removes the temp file if the rename fails, so a crash can never leave a half-written ledger.
|
|
315
|
+
* Returns `true` on success; never throws.
|
|
316
|
+
*/
|
|
317
|
+
export declare function writeCostLedgerJsonl(path: string, report: CostLedgerReport): boolean;
|
|
318
|
+
//# sourceMappingURL=cost-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost-ledger.d.ts","sourceRoot":"","sources":["../src/cost-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAUH,sGAAsG;AACtG,eAAO,MAAM,iBAAiB,QAEmC,CAAC;AAElE,MAAM,MAAM,oBAAoB;AAC9B,iGAAiG;AAC/F,aAAa;AACf,uDAAuD;GACrD,kBAAkB;AACpB,8FAA8F;GAC5F,eAAe;AACjB,kGAAkG;GAChG,wBAAwB;AAC1B,oGAAoG;GAClG,iBAAiB;AACnB;8FAC8F;GAC5F,kBAAkB,CAAC;AAEvB;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,oBAAoB,EAOnE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EAI5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAW7C,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B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