opencode/packages
Kit Langton a2bc535367 sketch: typed SessionNotFound (design validation)
Demonstrates the typed-errors-at-the-service-layer pattern on a single
method (`Session.Service.get`):

- Define `Session.SessionNotFound` as `Schema.ErrorClass` with
  `httpApiStatus: 404` and a body shape that matches the existing Hono
  `NamedError` envelope (`name: "NotFoundError"`, `data: { message }`).
- Update `Session.Service.Interface.get` and the implementation to fail
  in the E channel via `yield* new SessionNotFound(...)`.
- HttpApi endpoint declares the typed error directly. The handler drops
  its `mapNotFound` wrapper for `get` — Effect HttpApi auto-routes the
  404 status from the schema annotation and serializes the body fields.
- Hono adapter (`runRequest`) bridges the typed error back to the
  legacy `NotFoundError` defect so the existing `ErrorMiddleware` keeps
  rendering 404 + body until that adapter is retired.

End-to-end validation: the unskipped parity test
(`Error JSON shape parity > HttpApi 404 body matches NamedError shape`)
now passes against the HttpApi adapter.

This is a sketch, not for merge — most cascading consumers are
absorbed via `Effect.orDie` (legacy never-E surface preserved). Real
rollout migrates each method/handler explicitly.
2026-05-03 00:07:01 -04:00
..
app sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
console sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
containers chore: bump Bun to 1.3.13 (#23791) 2026-04-23 00:25:36 -04:00
core Refactor v2 session events as schemas (#24512) 2026-05-02 22:09:48 -04:00
desktop sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
desktop-electron fix(desktop): limit zoom handler to zoom keys (#25516) 2026-05-03 02:44:52 +00:00
docs
enterprise sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
extensions/zed sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
function sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
identity
opencode sketch: typed SessionNotFound (design validation) 2026-05-03 00:07:01 -04:00
plugin sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
script refactor: replace bun semver with npm semver package 2026-03-09 15:29:55 -04:00
sdk chore: generate 2026-05-03 02:10:52 +00:00
slack sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
storybook feat(prompt): add shell mode UI with cancel button, custom icon, and example placeholder (#24105) 2026-04-24 14:04:55 +08:00
ui sync release versions for v1.14.33 2026-05-02 19:53:06 +00:00
web chore: generate 2026-05-03 00:10:53 +00:00