Commit graph

1062 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
Developer
47d6fc7382 fix: preserve full OpenCode provider cost shape in auth.loader
The normalizeProviderModelCosts function was only setting { input: 0, output: 0 }
which doesn't match the full OpenCode provider cost shape that includes cache fields.

This fix:
- Preserves existing cost fields (input, output, cache.read, cache.write) if valid
- Adds missing cache: { read: 0, write: 0 } structure when not present
- Validates provider and model objects before modification to avoid poisoning
  invalid provider metadata
- Updates ProviderModel type to include optional cache field

Fixes provider cost normalization to maintain cache field compatibility.
2026-05-09 15:28:13 -04:00
Kit Langton
6fea0178eb fix(server): defer validation error body change 2026-05-09 14:50:45 -04:00
Kit Langton
57efec4429
fix(storage): default workspace time migration (#26556) 2026-05-09 14:18:55 -04:00
Kit Langton
27fa297a42
fix(server): keep provider lists JSON-safe (#26550) 2026-05-09 13:40:46 -04:00
Aiden Cline
b1cd25de3d
ignore: fix typerrs on dev (#26544) 2026-05-09 12:08:00 -05:00
Steffen Deusch
817cb076a8
fix(acp): include tool image attachments in updates (#25128) 2026-05-09 11:45:44 -05: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
Kit Langton
32684e70e6
test(server): expect null body from HTTP API authorize() with no redirect (#26515) 2026-05-09 08:50:00 -04:00
Kit Langton
e7cc8259b5
test(server): drop flaky account error-mapping test (#26475) 2026-05-09 00:29:31 -04:00
opencode-agent[bot]
a9ccb0804f chore: generate 2026-05-09 04:22:25 +00:00
Kit Langton
ebe6087e8f
fix(server): return structured validation errors (#26457) 2026-05-09 00:21:19 -04:00
Kit Langton
dc978cb889
fix(server): validate permission and question ids (#26456) 2026-05-09 00:20:28 -04:00
Kit Langton
8cbc43fbb0
fix(server): include auth challenge on typed 401 (#26455) 2026-05-09 00:15:20 -04:00
opencode-agent[bot]
82359c4b1b chore: generate 2026-05-09 04:06:08 +00:00
Kit Langton
7f3e51453b
test(server): use Layer.mock for partial Account service stub (#26472) 2026-05-09 00:05:05 -04:00
Kit Langton
cbdb2d9825
test(server): expand workspace routing fixed-id coverage (#26458) 2026-05-09 00:00:18 -04:00
Kit Langton
dcb8ed8eb0
test(server): cover workspace sync fence protocol (#26441) 2026-05-08 23:55:47 -04:00
Kit Langton
aab82cc1a7
test(project): rescue non-Hono InstanceBootstrap boundary tests (#26453) 2026-05-08 23:53:42 -04:00
opencode-agent[bot]
cff441909a chore: generate 2026-05-09 03:45:35 +00:00
Kit Langton
3615d5aab1
fix(server): map Account failures to typed 500 instead of defect (#26448) 2026-05-08 23:44:28 -04:00
Kit Langton
4d585464f3
fix(server): include Origin in CORS preflight Vary header (#26445) 2026-05-08 23:17:47 -04:00
Kit Langton
357a74714a
fix(test): set OPENCODE_EXPERIMENTAL_WORKSPACES in fence header test (#26466) 2026-05-08 23:12:08 -04:00
Kit Langton
ffea6c7974
feat(server): add HTTP API response compression (#26440) 2026-05-08 23:06:00 -04:00
Kit Langton
8e9550d90d
fix(server): emit fixed workspace fence headers (#26443) 2026-05-08 22:45:54 -04:00
James Long
9b7b6cb30f
feat(core): be smarter about generating a worktree name (#26368) 2026-05-08 22:45:44 -04:00
Kit Langton
cc68afb2de
test(server): lock fixed workspace routing context (#26454) 2026-05-08 22:35:32 -04:00
Kit Langton
11c33d52a5
test(server): cover REST API project skills (#26451) 2026-05-09 02:23:21 +00:00
Kit Langton
9c05d4e2fd
fix(server): serve HttpApi OpenAPI document (#26438) 2026-05-08 22:20:50 -04:00
Kit Langton
0745162eab
test(server): harden HttpApi exercise coverage (#26425) 2026-05-08 20:50:01 -04:00
Kit Langton
21d055be19
fix(workspace): claim detached sessions to source project (#26413) 2026-05-08 20:25:53 -04:00
Sebastian
a0fc27e424
flatten to keybind compatible config (#26421) 2026-05-09 01:29:13 +02:00
Shoubhit Dash
40d5ea1cf1
feat(core): add scout agent for repo research (#24149)
Co-authored-by: Dax Raad <d@ironbay.co>
2026-05-08 20:20:08 +00:00
Dax
fed221e0b0
fix(skill): allow missing descriptions (#26391) 2026-05-08 18:50:06 +00:00
Kit Langton
75308ea47d
test(server): add HttpApi auth exercise mode (#26386) 2026-05-08 14:05:46 -04:00
Kit Langton
daa3116f4b
refactor(server): split HttpApi exercise harness (#26385) 2026-05-08 17:58:14 +00:00
opencode-agent[bot]
9e7f7bf8e4 chore: generate 2026-05-08 17:46:57 +00:00
Simon Klee
4d43d584fe
cli/run: switch to global event stream (#26383) 2026-05-08 19:44:31 +02:00
Kit Langton
3052a79b32
refactor(server): clarify HttpApi route auth layers (#26372) 2026-05-08 13:06:00 -04:00
Rajvardhan Patil
13b3117ca9
fix(server): require auth for effect root routes (#26361)
Co-authored-by: Rajvardhan Patil <243567420+RajvardhanPatil07@users.noreply.github.com>
2026-05-08 16:39:11 +00:00
opencode-agent[bot]
fc46cef5fd chore: generate 2026-05-08 15:49:37 +00:00
Aiden Cline
799996db76
fix: adjust tui retry dialog logic to be more provider specific and error case specific (#26366) 2026-05-08 10:48:19 -05:00
opencode-agent[bot]
df75bfe07c chore: generate 2026-05-08 15:10:32 +00:00
James Long
c818c9dcb6
feat(core): allow external workspace creation (#26212) 2026-05-08 11:09:12 -04:00
Kit Langton
c36ab3f935
fix(provider): align Gemini thinking controls (#26279) 2026-05-08 10:22:45 -04:00
opencode-agent[bot]
a196569f51 chore: generate 2026-05-08 11:56:55 +00:00
Sebastian
19da27e1cb
internal which-key plugin, inactive by default (#26337) 2026-05-08 13:55:49 +02:00
opencode-agent[bot]
ac7a885ae9 chore: generate 2026-05-08 10:18:22 +00:00
Simon Klee
7f2b5ee8c2
feat(opencode): add interactive split-footer mode to run (#23557) 2026-05-08 12:17:14 +02:00