Commit graph

14 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
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
Dax
f25f1485d5
refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
James Long
7605acff65
refactor(core): move server routes around to clarify workspacing (#23031) 2026-04-17 02:06:20 -04:00
Kit Langton
80f1f1b5b8
feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
Kit Langton
343a564183
feat: unwrap 11 util namespaces to flat exports + barrel (#22739) 2026-04-15 23:15:58 -04:00
Kit Langton
68384613be
refactor(session): remove async facade exports (#22471) 2026-04-14 13:45:13 -04:00
Dax
ca5f086759
refactor(server): simplify router middleware with next() (#21720) 2026-04-11 16:55:17 -04:00
Brendan Allan
ee23043d64
Remove CLI from electron app (#17803)
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
2026-04-09 13:18:46 +08:00
Kit Langton
a898c2ea3a
refactor(storage): effectify Storage service (#20132) 2026-03-31 01:16:02 +00:00
Kit Langton
c5442d418d
refactor(session): effectify SessionPrompt service (#19483) 2026-03-30 20:06:51 +00:00
Ryan Skidmore
814a515a8a
fix: improve plugin system robustness — agent/command resolution, async errors, hook timing, two-phase init (#18280)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-03-24 12:50:55 -05:00
Shoubhit Dash
9457493696
perf(server): paginate session history (#17134) 2026-03-13 15:48:43 +05:30