Skip to content

v0.11.0

Latest

Choose a tag to compare

@salitaba salitaba released this 12 Sep 07:07
· 14 commits to main since this release

Added

  • doctor command. node scripts/install-local.mjs doctor runs nine checks
    against a live install: Node >= 22, opencode --version, the package bundle
    being present, the sha256 of the installed plugin against dist/plugin.js,
    the audit script being readable, the settings (imported from dist/config.js
    via takeConfigDiagnostics()), python3, the OpenCode database being
    readable, and duplicate plugin registration in opencode.json. It exits 1
    only on a fail; a warn is reported and still exits 0, so it can gate a
    script without failing on the merely unusual.
  • --dry-run on install and uninstall. Prints the file operations that
    would run and touches nothing. The preview and the real run read the same
    plan(), so the two cannot drift. The argv parse was rewritten to filter
    -- flags rather than reading process.argv[2], which is what makes
    uninstall --dry-run work rather than being read as an unknown command.

Documentation

  • The token_norm_status payload is declared a public interface. Stable
    within a major version, peak >= current always, and reads are
    side-effect-free — stated in docs/how-it-works.md above the payload example
    and in the README. No field changed; this documents the existing contract.
  • docs/install.md shows a --dry-run example and replaces the "check it
    loaded" section with annotated doctor output, explaining what the sha256
    and settings checks actually prove.

Internal

  • 29 new tests. test/contract.test.ts is new and asserts behavioral
    contracts through the plugin hooks: a throwing audit, a throwing toast, an
    async-rejecting toast and an exploding provider all leave the tool call
    intact; compaction recovery drops current to HEALTHY while peak holds
    PRESSURE; status reads never latch the peak; block mode keeps the handoff
    and cheap tools open even at 50000x over limit; and pressure alone never
    blocks. test/install-local.test.ts grew to 15 tests covering the new
    command surface, including exit codes.

Provenance

Built from 8a483717fadc1c026d52063b8a22cd09d050e54c.

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