diff --git a/docs/offscale-plugin.md b/docs/offscale-plugin.md index 89e7c048..1ce9cf52 100644 --- a/docs/offscale-plugin.md +++ b/docs/offscale-plugin.md @@ -177,15 +177,25 @@ Better than the TrieRouter route on both counts: the default `SmartRouter` is ke to become `(req, server) => honoServer.fetch(req, server)`, or reassigning the app has no effect at all. This is the whole mechanical cost. -### Websockets are a separate table, and still open +### Websockets are a separate table, and they reload Six providers are declared in **Bun's route table**, not Hono's: `/api/tasks/run/ws`, `/api/tasks/pipeline/ws`, `/api/terminal/ws`, `/api/chat/ws`, `/api/cliamp/ws`, `/api/cliamp/audio/ws`. -The Hono swap above does not reach them, so a plugin contributing a websocket provider needs -`server.reload({ routes })` — untested here. +The Hono swap does not reach them — but `server.reload({ routes })` does, in both directions: -**Not blocking offscale**, which has none. But it is the reason a plugin cannot yet own a socket, and -it is the same seam as the totality bug below: Bun's route table and Hono's are two different lists. +``` +before reload /api/offscale/ws -> refused | /core -> 200 +after reload /api/offscale/ws -> CONNECTED | /core -> 200 +after remove /api/offscale/ws -> refused | /core -> 200 +``` + +So **nothing needs a restart, for either table.** A plugin owning a socket is possible from the start. +`reload` wants the whole option set, so `fetch` is passed alongside `routes`. + +`[open]` Whether connections already open across a `reload` survive it was not tested. Worth knowing +before a plugin install can interrupt somebody's terminal. + +The two tables remain two lists, which is the same seam as the totality bug below. ### What this means for `assertCapabilityTotality`