Commit graph

25 commits

Author SHA1 Message Date
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
opencode-agent[bot]
d01cb7f013 chore: generate 2026-05-09 13:11:45 +00:00
Kit Langton
28b03595bf
research: delete Hono backend (do not merge) (#25667) 2026-05-09 13:10:42 +00:00
James Long
3c4b4d5faf
feat(core): copy file changes when warping (#26190) 2026-05-07 10:24:17 -04:00
Kit Langton
8555de8189
Type session not-found errors (#25818) 2026-05-05 21:33:47 -04:00
Dax
39c88f9afb
Improve v2 session message rendering (#25634) 2026-05-05 02:35:21 +00:00
opencode-agent[bot]
a6cadba814 chore: generate 2026-05-03 02:10:52 +00:00
Dax
a3bc5d35b0
Refactor v2 session events as schemas (#24512) 2026-05-02 22:09:48 -04:00
Kit Langton
7d91d3b1ed
Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
Kit Langton
4c4860fb24
Replace Instance.disposeAll/load with fixture helper (#25418) 2026-05-02 10:56:15 -04:00
Kit Langton
8c79c58c4d
refactor: rename workspace adapters (#25272) 2026-05-01 07:36:52 -04:00
Kit Langton
0e9d9282c6
Refactor workspace service boundaries (#25152) 2026-04-30 15:34:37 -04:00
Kit Langton
feeebbe7d4
Preserve workspace context in session HTTP routes (#25136) 2026-04-30 13:53:26 -04:00
opencode-agent[bot]
29b1060c67 chore: generate 2026-04-30 15:08:03 +00:00
Kit Langton
dddfcbf0d8
test: port instance HttpApi path/vcs read coverage to Effect 2026-04-30 11:07:00 -04:00
Kit Langton
6015084fa2
Prepare Effect HttpApi backend parity (#24853) 2026-04-29 09:34:50 -04:00
Kit Langton
7739cc53b4
refactor(httpapi): fork server startup by flag (#24799) 2026-04-28 11:02:35 -04:00
Kit Langton
576efed196
fix(httpapi): preserve optional session fields (#24671) 2026-04-27 21:38:28 +00:00
Dax
f25f1485d5
refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
Kit Langton
55ecb06748
fix(httpapi): accept empty session create body (#24640) 2026-04-27 17:17:11 +00:00
Kit Langton
c5b67927af
feat(httpapi): bridge remaining session routes (#24510) 2026-04-26 12:24:19 -04:00
Kit Langton
151df05eeb
feat(httpapi): bridge session message mutations (#24487) 2026-04-26 12:00:02 -04:00
Kit Langton
daaa2e5911
feat(httpapi): bridge session lifecycle routes (#24486) 2026-04-26 11:50:26 -04:00
opencode-agent[bot]
daff119fe4 chore: generate 2026-04-26 15:50:09 +00:00
Kit Langton
e0d1ff42c0
feat(httpapi): bridge session read routes (#24485) 2026-04-26 11:49:11 -04:00