From be183e4617607b8d0d582c12512e393f939e6dd2 Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Fri, 26 Jun 2026 17:48:22 +0200 Subject: [PATCH] =?UTF-8?q?chore(voyage):=20release=20v5.7.0=20=E2=80=94?= =?UTF-8?q?=20opt-in=20token/cost=20metering=20(SKAL-2)=20+=20eval=20found?= =?UTF-8?q?ation=20(SKAL-1=C2=B74a)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additive, no breaking change. Bundles the unreleased work since v5.6.1: SKAL-2 token/cost metering (parser+cache-aware cost, CWE-212 export boundary, cache-analyzer aggregation, opt-in VOYAGE_TOKEN_METER Stop-hook capture) and SKAL-1·4a eval foundation (gold corpus, review-coordinator contract, BRIEF_* gate coverage). Version sync across 5 refs + CHANGELOG; canonical node --test 807. --- .claude-plugin/plugin.json | 2 +- CHANGELOG.md | 20 ++++++++++++++++++++ README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index bc9c396..eb6c095 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "voyage", "description": "Voyage — brief, research, plan, execute, review, continue. Contract-driven Claude Code pipeline. /trekbrief, /trekplan, and /trekreview each end by building a self-contained operator-annotation HTML (scripts/annotate.mjs, modelled on claude-code-100x): select text or click any element, pick intent (Fiks/Endre/Spørsmål), write comment, copy structured prompt, paste back, Claude revises the .md.", - "version": "5.6.1", + "version": "5.7.0", "author": { "name": "Kjell Tore Guttormsen" }, diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f539b..1ae729e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## v5.7.0 — 2026-06-26 — opt-in token/cost metering (SKAL-2) + eval foundation (SKAL-1·4a) + +Additive — no breaking change. Two unreleased work-streams land together. + +### Opt-in token/cost metering (SKAL-2) — the headline + +- Pure token-usage parser + cache-aware USD cost (`lib/stats/token-usage.mjs`): parses MAIN-CONTEXT usage from the transcript, dedups by requestId (last-wins, streaming-placeholder mitigation), excludes sidechain records, and REFUSES to estimate (`cost_usd:null, is_estimate:true`) for models absent from the frozen PRICE_TABLE. +- CWE-212 export boundary: token-usage schema allowlist in the OTLP exporter; `session_id`/`transcript_path`/`cwd` stripped at export, asserted both ways. +- Cross-session aggregation in `cache-analyzer` (total tokens + cost). +- Capture folded into the EXISTING `otel-export.mjs` Stop hook, gated behind the `VOYAGE_TOKEN_METER` env var (default off), fail-open. v1 scope = main-context only; sub-agent turns are a documented v2 follow-on. + +### Eval foundation (SKAL-1·4a) + +- `gold.json` golden corpus + loader/validator; review-coordinator contract reference impl + deterministic test; two-sided gate coverage for the `BRIEF_*` BLOCKERs; eval-corpus frozen-failure home. + +### Release hygiene + +- Version sync: `plugin.json`, `package.json`, `package-lock.json`, README badge, CHANGELOG top entry all at `5.7.0`, guarded by `doc-consistency.test.mjs`. +- Canonical `node --test`: **807** (805 pass / 0 fail / 2 skipped). + ## v5.6.1 — 2026-06-24 — leaner always-loaded agent listing (reference/dormant agent descriptions trimmed) Additive — no breaking change, **no runtime behavior change**. Trims the always-loaded token cost of the agent listing that Claude Code injects into every session. diff --git a/README.md b/README.md index f95ce45..a4a823d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # trekplan — Brief, Research, Plan, Execute, Review, Continue -![Version](https://img.shields.io/badge/version-5.6.1-blue) +![Version](https://img.shields.io/badge/version-5.7.0-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Platform](https://img.shields.io/badge/platform-Claude%20Code-purple) diff --git a/package-lock.json b/package-lock.json index 2c62c2a..ac531f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "voyage", - "version": "5.6.1", + "version": "5.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "voyage", - "version": "5.6.1", + "version": "5.7.0", "license": "MIT", "engines": { "node": ">=18" diff --git a/package.json b/package.json index bca638c..2f3a494 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "voyage", - "version": "5.6.1", + "version": "5.7.0", "description": "Voyage — brief, research, plan, execute, review, continue. Contract-driven Claude Code pipeline. /trekbrief, /trekplan, and /trekreview each end by building a self-contained operator-annotation HTML (scripts/annotate.mjs, modelled on claude-code-100x): select text or click any heading/paragraph/list-item, pick intent (Fiks/Endre/Spørsmål), write comment, copy structured prompt, paste back, Claude revises the .md.", "type": "module", "engines": {