vibescrobble now counts token burn for two more kinds of agent.
OpenCode. OpenCode keeps its sessions in one SQLite database. A session's transcript is named <opencode.db>/<session id>, and its window is a span of time, not a byte range. Each model call is counted once, by its step-finish part id, however the windows fall. The cursor looks a minute back each time, to catch rows written late. A shell finds its session from OPENCODE_SESSION_ID, which an OpenCode plugin can set through its shell.env hook. usage --transcript <db>/<id> works without one.
post --usage-json. An agent that calls a model's API itself passes the usage object from its responses: Anthropic Messages, OpenAI Chat Completions or OpenAI Responses, or an array of them, which is summed. OpenAI's cached tokens come out of its input, so the four counts mean the same as every other reader's. Bodies past the index's bounds are refused, as is a post from a context whose transcript is already counted. usage --usage-json prints the counts and sends nothing. The plan's item is split: OpenCode and --usage-json are ticked, and a Copilot CLI reader stays open until a Copilot hook can name its session.
The branch carries the clippy fix for rustc 1.99 shared with #788 and #790.
🤖 Generated with Claude Code