Tags: hamidi-dev/opencode-cachebell
Tags
feat: serve OpenCode 1 and 2 from one package
Version 2 replaces the chat.headers hook and the event hook with a
model.request session hook and a subscribed event stream, so the plugin
now exports { id, setup, server }: version 2 reads id and setup, version
1 calls server() and ignores the rest.
The state machine that decides when a cache window starts, when reported
cache reads or writes confirm it, and when the bell is due is shared by
both generations. Only session lookup and logging differ.
Version 2 runs one plugin instance per location against one shared event
stream, so a session is now claimed by the instance whose directory owns
it; every other instance stays silent. Auxiliary requests (titles,
summaries, compactions) never arm a window.
Co-Authored-By: Claude Opus 5 <[email protected]>