Commit graph

12 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
Kit Langton
28b03595bf
research: delete Hono backend (do not merge) (#25667) 2026-05-09 13:10:42 +00:00
Kit Langton
11c33d52a5
test(server): cover REST API project skills (#26451) 2026-05-09 02:23:21 +00:00
Kit Langton
8555de8189
Type session not-found errors (#25818) 2026-05-05 21:33:47 -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
dddfcbf0d8
test: port instance HttpApi path/vcs read coverage to Effect 2026-04-30 11:07:00 -04:00
Kit Langton
cee9610d26
refactor: use Effect config for HttpApi authorization (#25035) 2026-04-29 22:22:32 -04:00
opencode-agent[bot]
a3f7ea2555 chore: generate 2026-04-29 13:47:48 +00:00
Kit Langton
d3df8e1180 test(httpapi): clean up SDK parity tests 2026-04-29 09:46:17 -04:00
Kit Langton
6015084fa2
Prepare Effect HttpApi backend parity (#24853) 2026-04-29 09:34:50 -04:00
Kit Langton
379e7f3f20
test(httpapi): cover sdk effect routes (#24836) 2026-04-28 16:34:06 -04:00