Repository navigation
v0.9.0
Added
- Weighted tool-call budgets.
TOKEN_NORM_TOOL_WEIGHTSand
TOKEN_NORM_PHASE_WEIGHTSacceptname=weightcomma lists (positive numbers;
unlisted names weigh 1), so abashcall can cost more than aread, or a
planning-mode call less than a build-mode one. Phase is the latest assistant
message mode, resolved per step throughmessageIDwith a session-latest
fallback. A malformed entry is dropped, weighs 1, and reports into the config
diagnostics.
Changed
TOKEN_NORM_MAX_TOOL_CALLSnow compares weighted calls (tool weight ×
phase weight; cheap tools still contribute nothing) and the metric is labeled
"Weighted tool calls". Raw call counts continue to drive the announce, audit,
and task-boundary thresholds and the policy call-count axis, so weights can
never delay or advance a reminder.
Provenance
Built from 6cb11a3ca8ccb024be5754e811626c294ebbc882.
| artifact | sha256 |
|---|---|
dist/plugin.js |
5517525e2ea43979a298b575cfe6314894cb3042e561765ef8dddae71e0f7b94 |
scripts/usage-audit.py |
ad5d1c4e18eac2c73dfc7267ff6c8a1f553783d7f62cd9d32d54f25f2ffa0c73 |
Verify an installed copy:
shasum -a 256 ~/.config/opencode/plugins/opencode-token-norm.js
shasum -a 256 ~/.config/opencode/scripts/usage-audit.py