feat: live sessions dashboard — real-time transcript observability - #64
Merged
Merged
Conversation
The usage scorecard assumes every transcript came from a metered vendor
endpoint. `ollama launch claude` / `ollama launch codex` makes that
assumption a one-command violation, and nothing in the usage path knows
ollama exists (it appears only in routing.mjs/providers.mjs today).
Research findings, cited in the ADR:
- The model id is echoed verbatim by Ollama's Anthropic compat layer, so
identity capture already works — but the tag carries no quantization in
the general case (qwen3.6:latest, qwen3:32b), which lives only in
/api/tags details{} and /api/show model_info{}.
- /v1/messages returns usage.{input_tokens,output_tokens} only; prompt
caching is explicitly unsupported. Every local session therefore records
cacheRead=0, pricing 100% of input at 1x — the inverse of the 96.3%
cache-read corpus ADR-0009 §3 is built on.
- Ollama documents `ollama cp qwen3-coder claude-3-5-sonnet` for tools that
hardcode vendor names, so the model id is forgeable by a recommended
workflow. Id-based local detection cannot work.
- Measured: 754 indexed files, 7 distinct model ids, all matching the price
table — FALLBACK_PRICE has never fired. The silent path costs nothing
today and would misprice every local turn tomorrow.
Decisions: provenance established out-of-band (loopback catalogue read plus
ak's own wiring), ambiguous when a local tag collides with a table entry;
three cost states (metered / local $0 / unpriced) retiring FALLBACK_PRICE
from the cost path; per-model rows for local models rather than one bucket;
digest-keyed identity displayed with quantization; token KPI split the same
way cost is; provider capability gaps stated per session.
Status is Proposed, not Accepted: no local session exists on this machine to
observe, so the transcript-side claims are derived from specs rather than
measured. docs/LOCAL-MODEL-VALIDATION.md is the protocol that closes that
gap — six questions with predicted answers, a content-free capture step, and
a results table naming the ADR action for each contradiction.
Also amends ADR-0009 §3 and §8, and adds the missing ADR-0010 row to the
ADR index alongside 0011.
…install @claude-flow/cli pins better-sqlite3 in both `overrides` and `optionalDependencies`. deriveBsq3Spec bumped only the value handed to `npm install` (for Node 26 compat), leaving the other self-declared field stale — npm rejects that as EOVERRIDE since a package's own overrides/optionalDependencies/dependencies entries for the same dependency must agree with each other and with the explicit install spec. ensureNativeBsq3 now runs `npm pkg set` on every conflicting field first, verified live against the failing @claude-flow/cli tree.
Prevents the local-only CLAUDE.local.md boilerplate (written by the @claude-flow/codex initializer during dual-host setup) from being accidentally committed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@/private/tmp/claude-501/-Users-cphillipson-Development-active-ai-agentic-kit/ce0bc600-2537-4dc5-bf73-d2fd4b1cf35b/scratchpad/pr64-body.md