Skip to content
Trazum

2.4.2

The bill as an attachment

A patch on 2.4's terms with one new envelope. The models Claude Code runs today are priced: until this release a log written on Claude Opus 5.5 or Fable 5.1 came out of npx @trazum/cli bill ~/.claude/projects with nothing priced, because neither id was in the catalogue. The bill leaves as a PDF: --pdf-out on bill and profile, written by a new zero-dependency PdfDocument in @trazum/core, and bill now writes every report profile writes. Three silent wrong answers are fixed (a shell glob billed only its first file, bill and profile disagreed on one directory, and the MCP spend_guard said yes to a misspelt argument), and the web app closes sign-in until its operator lists who may use it, sends only the analytics events it names, and refuses impossible usage at its API. No command added.

Added#

  • The bill as a PDF: --pdf-out on bill and profile. The person who signs a bill off reads an attachment, not a terminal, and until now the nearest thing was an HTML file they had to open in a browser. The PDF is the HTML report in another envelope: the same input object, the same sentences from the same message catalogue, the caveat block ahead of every table, and a footer on every page naming where the figures came from and which page of how many it is. It is written by PdfDocument, a new export of @trazum/core over the 14 standard PDF fonts: no dependency, no embedded font, a few kilobytes, the same bytes for the same report, plain ASCII so a reader can find their figures in a text editor. The standard fonts cover Latin script, which is every locale this tool ships; a character outside it is written as its obvious ASCII form (→ as ->) or as ?, never dropped. pdf.test.js checks every cross-reference offset against the file, and pdf-report.test.js holds the figures to the --json document, a 90-row table across pages with its header repeated, a hostile label with parentheses and backslashes, and Spanish.

  • bill writes the envelopes profile writes. --pdf-out, --html-out, --markdown-out and --csv-out (with --csv-shape), from the report bill just priced, so the files and the receipt cannot disagree. Until now a converted Claude Code transcript could reach a forwarded report only through from-claude-code and then profile. A bad --csv-shape is refused before any file is read, rather than after the receipt has printed.

Changed#

  • The Anthropic catalogue was reviewed on 2026-10-10 and carries the models Claude Code runs today. Until now a Claude Code log written on Claude Opus 5.5 or Fable 5.1 came out of trazum bill as nothing priced, because neither id was in the table. Added from the pricing page, the models overview and each model's own page: Claude Fable 5.1 ($10/$50), Claude Opus 5.5 ($4/$20), Claude Sonnet 5.5 ($2/$10), Claude Mythos 5.1 ($10/$50, priced and never recommended, as only verified organisations can call it) and Claude Opus 4.5 ($5/$25, legacy but still served, with its dated id declared as an alias). The new generation reads the cache cheaper than the 0.1x every earlier Claude model pays: 0.05x on Opus 5.5 and Sonnet 5.5, 0.025x on Fable 5.1 and Mythos 5.1, and each row says so in its multipliers rather than inheriting the default. Every existing row matched the page; Fable 5's note now says it is superseded, and Mythos 5's no longer names a programme the page has dropped. Claude Haiku 5.5 is left out on purpose: it is priced by prompt length per request, above 100,000 tokens counting cache reads and writes, and nothing that prices a usage log yet passes one request's length to the catalogue, so adding it today would price every call at the ceiling, five times what most paid. Its calls stay an unpriced gap that names it until that lands. The README's cache rows say the new ratios and minimums.

  • The web app's routine dependencies moved (#532). Dependabot's weekly group in apps/web: next 16.3.3 to 16.3.5, react, react-dom and @types/react to 19.3.0, lucide-react 1.35.0 to 1.46.0, posthog-js 1.422.5 to 1.433.4, @types/node 26.4.0 to 26.5.1. Minor and patch only, every check green on the rebased head, and the same sharp move #533 had already made. Recorded here because a merge with no entry is a change only git log remembers, not because any of it changes what Trazum does.

  • Both CodeQL entry points advanced to v4.38.0 in one commit, and Dependabot now raises the pair as one pull request. As at 4.37.9, Dependabot raised init and analyze separately (#527, #529) and each was red on its own, because analyze refuses a configuration file init wrote at another version and security.test.js holds that the two pins agree. The pins move together here, and .github/dependabot.yml gains a codeql group over github/codeql-action* so the next bump arrives as the one pull request the guard can pass.

Fixed#

  • The web app told readers two things the server does not do. The key note said to put an LLM key in the server's environment and leave the field empty; the server deliberately never spends a key it was not handed. The history note said nothing leaves the machine; the prompt is sent to the server to be optimised. Both are corrected in English and Spanish, and a test holds the catalogues to it.

  • /api/optimize with reorder and no model answered 502 Unknown model. It asked the catalogue for a model named "". No model named is now no cache minimum known, as in the CLI.

  • An IPv6 loopback database ([::1]) was never treated as local, so the default SSL mode demanded a certificate from the operator's own machine. The URL parser keeps the brackets and the check compared without them.

  • An unpriced model showed $0 in the HTML report's model table. Zero is a claim that the calls were free, the claim the CSV door has refused with an empty cell since it shipped. It is a dash now, in the dollars and the share, in the HTML and the PDF alike; the caveat block above already names the model and how to price it.

  • profile --markdown-out and --csv-out announced "Optimised prompt written to". The notice was the optimize command's, borrowed. They say "Report written to" now, in both locales.

  • trazum bill logs/*.jsonl priced the first file and called it the bill. The shell expands a glob into every file, and bill, like every command but rollup and diff, read the first argument and ignored the rest, with no gap and exit 0: two files worth $7.51 came out as $0.01. bill now reads every file and directory it is given, once each, and every other command refuses arguments it would ignore, naming the first one and the directory form that reads them all.

  • bill and profile read the same directory to different totals. bill skipped .log files, which profile reads and the docs name as a usage log, and did not count the file it skipped: a directory came to $7.51 by one verb and $15.01 by the other. The walk now uses the one list of log names profile uses, plain or gzipped, through a predicate rather than a copied pattern.

  • The MCP server's spend_guard answered "yes" to a typo. Called with output_tokens instead of outputTokens, it read zero output tokens and allowed a call that broke the budget, where the right spelling refused it. Every tool schema says additionalProperties: false and nothing enforced it. The server now does, for every tool: an undeclared key comes back as an isError result naming the key, the declared name it most likely meant (case and separators only), and the full list it takes.

  • The packaged Action pin in README.md and docs/running.md advanced to 2.4.1's release commit, the one v2.4.1 points at, in the pull request after the release as docs/releasing.md says it must: security.test.js asks git which version that commit declares and refuses any other.

  • sharp moved from 0.35.3 to 0.35.4 in the lockfile, with its libvips binaries from 1.3.2 to 1.3.3, closing GHSA-rgj7-g3m4-5g8c (two libheif advisories, rated high). It is Next's optional image dependency in apps/web, reached at build time only, and no manifest changes: next's own range already allowed the fix and only the pinned transitive version had not moved, which is the exact case SECURITY.md warns about. npm audit over the whole tree reports 0 vulnerabilities after it.

Security#

  • Sign-in is closed until the operator says who may use it. A deployment with accounts on let any GitHub account sign in, which made a team's prompt library a free prompt store for anyone who found the URL, up to the per-account caps and on the operator's database. Now TRAZUM_ALLOWED_USERS (logins or numeric ids) and TRAZUM_ADMINS say who may, TRAZUM_OPEN_SIGNUP=1 lets anyone in out loud, and with none of them set the sign-in button answers 503 naming the variables before GitHub is asked anything. A refused account gets 403 and no row. Checked on every sign-in, so removing somebody takes effect at their next one. An operator who relied on open sign-in sets TRAZUM_OPEN_SIGNUP=1.

  • Analytics, when an operator turns it on, sends only the events the app names. posthog.init was called with a host and nothing else, so it autocaptured clicks with the text and attributes of the element, recorded pageviews with the full URL (on /c/<token>, the share link itself), could start session recordings and heatmaps from PostHog's dashboard, and kept a cookie. The README said aggregate metrics only. Every collector is now off by name, persistence is in memory, and scrubAnalyticsEvent rewrites every URL an event carries (/c/:token, no query) and drops element text before it leaves the browser. Off by default, as before.

  • /api/optimize and /api/compare refuse impossible usage. Negative calls, a cache hit rate of 7, a string where a count goes, and a misspelt field such as calls_per_month all came back 200 with figures shaped like an answer. One parser now checks usage at both doors and names the field and the range in the refusal, English and Spanish.

  • Expired share links no longer count toward the hundred-link limit, and their text is deleted. They opened nothing and still filled the quota, so an owner whose links had all lapsed could never make another, and the prompt text stayed in the table indefinitely. They are purged when their owner next creates a link.

  • next 16.3.5 to 16.3.8 (#540), closing a critical remote code execution in next/og's ImageResponse (GHSA-vcvr-r3jv-pc5j). apps/web renders app/opengraph-image.tsx through next/og, so the advisory was reachable on the deployed site, not only in a build. The same release closes the cache poisoning, Image Optimization SSRF and information disclosure advisories npm audit reported for 16.0.0 to 16.3.7.

  • The rest of the web app's tree moved to a clean npm audit. sharp 0.35.4 to 0.35.5 with its libvips binaries 1.3.3 to 1.3.4 (GHSA-wq5f-xc86-pv6w, librsvg, high), source-map-js 1.2.1 to 1.2.2 (GHSA-68fv-2mgg-jv7q, event-loop denial of service, high, reached through postcss and Tailwind at build time) and dompurify 3.4.13 to 3.4.16 (two low IN_PLACE advisories, reached through posthog-js). None of these had a Dependabot pull request for sharp or source-map-js: both are transitive and their parents' ranges already allowed the fix, the case SECURITY.md describes, so they moved in the lockfile here. This also carries Dependabot's #537 (both CodeQL entry points to v4.38.1, raised as one pull request by the codeql group), #538 (@types/node 26.6, lucide-react 1.48, posthog-js 1.434) and #539 (dompurify), which close once this merges.