cloudaxe-opencode/packages/opencode/test
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
..
account refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
acp ignore: fix typerrs on dev (#26544) 2026-05-09 12:08:00 -05:00
agent feat(core): add scout agent for repo research (#24149) 2026-05-08 20:20:08 +00:00
auth core: move cross-spawn-spawner to root and remove unused types 2026-04-25 14:30:16 -04:00
bus Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
cli fix: preserve full OpenCode provider cost shape in auth.loader 2026-05-09 15:28:13 -04:00
config flatten to keybind compatible config (#26421) 2026-05-09 01:29:13 +02:00
control-plane research: delete Hono backend (do not merge) (#25667) 2026-05-09 13:10:42 +00:00
effect fix(instance): run bootstrap from instance store (#25475) 2026-05-02 19:33:38 -04:00
fake refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
file Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
filesystem refactor: rename shared package to core (#24309) 2026-04-25 10:59:17 -04:00
fixture fix: preserve full OpenCode provider cost shape in auth.loader 2026-05-09 15:28:13 -04:00
format core: move cross-spawn-spawner to root and remove unused types 2026-04-25 14:30:16 -04:00
git fix(vcs): avoid unbounded diff memory usage (#25581) 2026-05-03 17:49:46 +05:30
ide fix(test): replace structuredClone with spread for process.env (#14908) 2026-02-24 23:16:24 +10:00
installation Refactor npm config handling (#24565) 2026-04-27 03:54:59 +00:00
lib chore: generate 2026-05-03 00:32:24 +00:00
lsp Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
mcp Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
memory feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
patch big format 2025-11-06 13:03:12 -05:00
permission Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
plugin feat(core): copy file changes when warping (#26190) 2026-05-07 10:24:17 -04:00
project research: delete Hono backend (do not merge) (#25667) 2026-05-09 13:10:42 +00:00
provider fix(provider): align Gemini thinking controls (#26279) 2026-05-08 10:22:45 -04:00
pty chore: generate 2026-05-04 02:57:18 +00:00
question Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
server fix(httpapi): eliminate drift between runtime query schemas and OpenAPI params 2026-05-09 16:12:02 -04:00
session feat(core): add scout agent for repo research (#24149) 2026-05-08 20:20:08 +00:00
share refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
shell refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
skill fix(skill): allow missing descriptions (#26391) 2026-05-08 18:50:06 +00:00
snapshot Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
storage fix(storage): default workspace time migration (#26556) 2026-05-09 14:18:55 -04:00
sync feat(core): session warping (#25768) 2026-05-04 21:28:38 -04:00
tool feat(core): add scout agent for repo research (#24149) 2026-05-08 20:20:08 +00:00
util fix(sdk+cli): surface real errors instead of bare {} when server returns empty body (#25592) 2026-05-03 13:17:06 +00:00
v2 Improve v2 session message rendering (#25634) 2026-05-05 02:35:21 +00:00
AGENTS.md chore: generate 2026-05-09 04:06:08 +00:00
permission-task.test.ts Normalize instance lifecycle wiring (#25501) 2026-05-02 20:39:20 -04:00
preload.ts Refactor v2 session events as schemas (#24512) 2026-05-02 22:09:48 -04:00