opencode/packages
Developer b3c7d34dfb fix(httpapi): eliminate drift between runtime query schemas and OpenAPI params
Context: PR #26569 narrowly fixed a crash where the generated SDK sent
GET /session/{sessionID}/message?limit=80&directory=... because public.ts
manually injected InstanceQueryParameters (directory/workspace) into OpenAPI,
but the runtime MessagesQuery schema omitted directory, causing empty 400.

This change eliminates the drift by:

1. Creating a shared schema helper in query.ts that adds directory/workspace
   fields to all instance route query schemas.

2. Updating all instance route query schemas to use the helper:
   - session.ts: MessagesQuery, ListQuery
   - file.ts: FileQuery, FindTextQuery, FindFileQuery, FindSymbolQuery
   - experimental.ts: ToolListQuery, SessionListQuery
   - control.ts: LogQuery (already correct, now uses helper)
   - instance.ts, v2/session.ts, v2/message.ts

3. Adding reproducer tests in httpapi-query-schema-drift.test.ts that verify
   the runtime accepts directory/workspace params on affected routes.

The OpenAPI spec generation in public.ts still manually injects params for
backward compatibility with the legacy SDK format, but now the runtime
schemas match, eliminating the validation errors.

Verification:
- bun typecheck passes
- 4 drift reproducer tests pass
- 24 httpapi tests pass across session, file, experimental, workspace-routing
2026-05-09 16:12:02 -04:00
..
app sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
console sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
containers chore: bump Bun to 1.3.13 (#23791) 2026-04-23 00:25:36 -04:00
core sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
desktop sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
docs
enterprise sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
extensions/zed sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
function sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
http-recorder sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
identity
llm sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
opencode fix(httpapi): eliminate drift between runtime query schemas and OpenAPI params 2026-05-09 16:12:02 -04:00
plugin fix: preserve full OpenCode provider cost shape in auth.loader 2026-05-09 15:28:13 -04:00
script refactor: replace bun semver with npm semver package 2026-03-09 15:29:55 -04:00
sdk sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00
slack sync release versions for v1.14.43 2026-05-09 18:06:16 +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.43 2026-05-09 18:06:16 +00:00
web sync release versions for v1.14.43 2026-05-09 18:06:16 +00:00