Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 23:08
· 16 commits to main since this release

Added

  • token_norm_status reports policy.current, policy.peak and
    policy.driver.
    current is severity at this instant and may fall;
    peak is the session high-water mark and never does; driver names the axis
    (calls, budget, context) behind current. Additive: the top-level
    state field remains, now documented as a deprecated alias of policy.peak,
    and recommendation is still derived from the peak. The snapshot enforces
    peak >= current itself, so a stale stored level cannot produce an
    inconsistent payload.
  • Executable invariants for the policy machine. Idempotence, BLOCKED only
    under block mode with a hard limit exceeded (and always, then),
    HANDOFF_RECOMMENDED only under handoff mode with pressure and an armed
    pause (and always, then), observe/warn measuring identically, state never
    below the axis max, and at most one rendered block with exactly one header for
    every subset of due sections — each checked over the whole reachable input
    space rather than on hand-picked examples.

Fixed

  • The driver axis at HEALTHY is no longer reported as context. The
    most-specific-first rule matched every axis when nothing was wrong, so a
    healthy session — including one whose context window could not be resolved at
    all — named context as its driver. It now attributes to the calls axis, which
    always exists.

Documentation

  • README leads with the positioning, the checkpoint ladder, and a
    before/after; adds an enforcement-mode table, a Node/OpenCode/plugin
    compatibility row, and splits evidence into observed / benchmark / hypothesis
    (including the retracted wall-time finding: +2.6 s, p = 0.83).
  • docs/how-it-works.md documents the status payload field by field, the
    current vs peak distinction, weighted vs raw call counts (why
    calls 37 and budget.toolCalls: 52 are both right), the
    measurement → policy → rendering pipeline, and a call-by-call session
    walkthrough.
  • Process-local state is stated as an explicit guarantee in the README, and
    effective fresh tokens is called out as cost-weighted input rather than a
    provider token total.

Provenance

Built from ef2f9b1dfe865c2c4be06964848694c4a3287791.

artifact sha256
dist/plugin.js 4bb0bf8057f0f70622143119549cf026f973f32ef898a1a8c08e6396e9d1f7c0
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