Commit graph

21964 commits

Author SHA1 Message Date
Simon Klee
0f63e545d7
chore(cli-rs): format the API generator and type the oracle's fetch
Prettier over script/gen/api.ts and script/rust; the oracle's fake fetch no
longer casts to typeof fetch, so bun check passes. Output is unchanged.
2026-11-04 18:20:48 +01:00
Simon Klee
b826557733
test(cli-rs): decode the TUI's reads against the running service
An opt-in live test (OPENCODE_LIVE=1) reads through the generated client from
the service script/live.sh uses: info, sessions, messages, inbox, forms,
permissions, location collections, and the event stream. It skips
experimental.session.stats, which took the shared service down unbounded.
2026-11-04 18:20:48 +01:00
Simon Klee
34e9ec7d47
test(cli-rs): prove API requests and decoding against the TS client
A P-ORACLE fixture records the requests the TypeScript Promise client builds;
the generated Rust client must build the same ones, and query::append must
match appendQuery. Unit tests cover tagged unions (known, rpc.*, unknown),
literal enums, double options, declared errors, binary bodies, auth, and
the event stream through F.3's SSE reader.
2026-11-04 18:20:48 +01:00
Simon Klee
a477234497
feat(cli-rs): share one type for equal anonymous API shapes
Every endpoint's location query decoded into its own struct; equal anonymous
objects and unions now share one, and the location query is LocationQueryInput.
2026-11-04 18:20:48 +01:00
Simon Klee
cc409d1fcf
feat(cli-rs): generate the Rust API client from ClientApi
script/gen/api.ts compiles ClientApi with the Promise client's options and emits
types and one method per endpoint (166) into crates/api/src/generated. The
request core, errors, query encoding, and the reqwest transport are written
by hand. Tagged unions decode through a generated Deserialize that keeps
unknown members and routes rpc.* events.
2026-11-04 18:20:48 +01:00
Simon Klee
6954ec9bf2
docs(cli-rs): add the F.2 API type mapping note
How script/gen/api.ts maps ClientApi schemas to Rust types, unions, and methods.
2026-11-04 18:20:48 +01:00
Simon Klee
267c1ff412
chore(cli-rs): declare effect for the command dump
script/gen/commands.ts imports effect; without the dev dependency the package typecheck cannot resolve it.
2026-11-04 18:19:46 +01:00
Simon Klee
e0923a565a
docs(cli-rs): record the command tree deviations
Help and completion layout (Q12 b), usage error output, and the deferred --wizard (O-11).
2026-11-04 18:19:21 +01:00
Simon Klee
01ab034b56
feat(cli-rs): add the command tree
All 48 commands of the TypeScript CLI with clap derive, proven against the dumped Spec tree. A pre-pass and a post-parse check keep the Effect CLI behaviors scripts see: --no-<flag>, boolean literals, repeated flags, k=v values, -w without a following value, the scope of --standalone and --server, and root flags before a subcommand. Help, version, completions for six shells, exit code 1 on usage errors, and stdout that ignores EPIPE. Handlers are stubs that name their step; the root command reports that the TUI is not built yet.
2026-11-04 18:19:21 +01:00
Simon Klee
ad5c8910e0
feat(cli-rs): dump the TypeScript command tree
script/gen/commands.ts writes the Spec tree of packages/cli/src/commands/commands.ts to crates/cli/tests/fixtures/commands.json: names, aliases, descriptions, arguments, and flags with types, bounds, and defaults. The Rust tree test compares against it.
2026-11-04 18:19:21 +01:00
Simon Klee
73e4842f35
docs(cli-rs): design the command tree
C.0 design note: clap derive tree proven against a dump of the TypeScript Spec tree, and the Effect CLI parsing behaviors kept.
2026-11-04 18:19:21 +01:00
Simon Klee
a067e063aa
feat(cli-rs): compare TestApp captures with cell fixtures
opencode-parity loads P-COMP fixtures, compares a capture cell by cell, and reports each differing row with markers plus the fields of each differing cell. Tests cover byte-exact reformatting, an injected one-cell change, and an opentui-rust box matching the TypeScript render.
2026-11-04 18:15:42 +01:00
Simon Klee
20b0af8827
feat(cli-rs): dump TUI component cells to P-COMP fixtures
renderComponent renders a TUI component in createTestRenderer at a fixed size and theme, inside the TUI providers or bare, and writes its cells through the same native resolved-chars call opentui-rust's Capture uses. bun run fixtures now also runs parity/component scripts.
2026-11-04 18:15:40 +01:00
Simon Klee
e812746abe
feat(cli-rs): add the WebSocket helper
Build socket URLs as the PTY and client MCP clients do (path prefix and base query kept, URLSearchParams.set order, ws or wss), with an optional ticket parameter, and open them with handshake headers.
2026-11-04 18:04:23 +01:00
Simon Klee
e5800a0de2
feat(cli-rs): share event streams and run the connection loop
SharedEvents ports shared-events.ts: one upstream per subscriber set, a types filter, the latest server.connected for late subscribers, and a 4,096-event cap per subscriber. connect() ports createClientConnection: server.connected first, the 2 s connect and 45 s idle limits, resync, 1 s reconnect, and 10 ms batches with adjacent deltas merged on a bounded queue. Both are generic over an Event trait. An opt-in live test (OPENCODE_LIVE=1) reads the running service.
2026-11-04 18:04:18 +01:00
Simon Klee
00695b7119
feat(cli-rs): mint time-sortable identifiers
Port Identifier.create with session, message, and part prefixes. A P-ORACLE script records the time prefixes TypeScript mints for a call sequence, counter restarts and overflow included, and the Rust test replays it.
2026-11-04 18:04:13 +01:00
Simon Klee
3d6ee48b53
feat(cli-rs): add the SSE reader
Port the generated TypeScript client's SSE reader: blank-line blocks, joined data lines, CRLF and CR normalization across chunks, streaming UTF-8 decoding, and the 16 MiB limit counted in UTF-16 units. Every chunk reports activity, keepalive comments included.
2026-11-04 18:04:08 +01:00
Simon Klee
271fc7c26d
feat(cli-rs): scaffold the Rust client workspace
Add packages/cli-rs: a Cargo workspace with the 14 crates of the plan,
module stubs for api, local, service, store, and ui, and the expected
third-party crates in [workspace.dependencies]. opentui is a path
dependency on the local opentui-rust checkout, linked statically.

script/opentui-lib.sh copies native artifacts whose header matches the
bindings into ~/.cache/opencode-rs/opentui, where .cargo/config.toml
points OPENTUI_LIB_DIR. opencode-rs --version runs; script/live.sh
runs it against the elected background service.
2026-11-04 17:52:34 +01:00
usrnk1
8568952e77
feat(app): add return sessions to the first unread message experiment (#61663) 2026-11-04 14:03:26 +00:00
usrnk1
5a750e64a2
feat(session-ui): reveal token throughput on response footer hover (#61646) 2026-11-04 13:38:14 +01:00
usrnk1
b9d0982b44
test(app): keep the bulk tab close case off the draft navigation race (#61642) 2026-11-04 13:25:18 +01:00
usrnk1
7864a94152
feat(app): add close other tabs and tabs after from the tab menu (#61631) 2026-11-04 11:24:00 +00:00
Adam
b3fd4a75fe
feat(core): refresh Console config before prompts and add a console.poll server option (#61583) 2026-11-04 04:29:54 -06:00
Adam
ce53f18a1b
feat(server): let embedders supply the fetch for OpenCode's HTTP and MCP requests (#61582) 2026-11-04 04:13:45 -06:00
Adam
baeebc2f93
feat(core): add a websearch.use policy action (#61557) 2026-11-04 04:13:25 -06:00
Aiden Cline
ffe6fed583
fix(cli): wait for background jobs in opencode run (#60699) 2026-11-04 01:20:08 -06:00
Luke Parker
59e95cc539
perf(app): stop restyling the side panel on every move of a resize drag (#61560) 2026-11-04 00:35:27 -06:00
Luke Parker
ba084e62d8
perf(ui): run the spinner and the text shimmer on the compositor (#61562) 2026-11-04 00:30:30 -06:00
Aiden Cline
d85283496f
fix(cli): stop opencode run from leaving a background service running (#61564) 2026-11-04 00:05:12 -06:00
Andras Lassu
55276f2108
fix(mcp): send logo_uri on dynamic client registration (#59031)
Co-authored-by: DS <78942835+Tarquinen@users.noreply.github.com>
2026-11-03 23:53:13 -05:00
Ludvig Rask
e756624814
feat(ui): add the design system checkbox as the compact appearance (#61516) 2026-11-04 05:50:30 +01:00
Ludvig Rask
774a3dd510
feat(ui): add input field appearances and surfaces to select (#61500) 2026-11-04 05:42:13 +01:00
Luke Parker
fe04656465
refactor: run every benchmark with strobe (#60880) 2026-11-03 20:05:16 -06:00
Luke Parker
77264eb66e
fix(core): capture snapshots for a Location opened through a symlink (#61546) 2026-11-03 19:54:58 -06:00
Luke Parker
0c4dd78fd6
test(session-ui): ignore the story's own favicon in the favicon request check (#61545) 2026-11-03 19:54:39 -06:00
Luke Parker
4f271bcd15
fix(session-ui): let triple click select across link icons (#61538) 2026-11-03 19:13:41 -06:00
Luke Parker
27dd925604
feat(app): let GUI plugins render and add actions to code blocks (#61533) 2026-11-03 18:34:53 -06:00
Luke Parker
3fcdcb35e8
feat(plugin): add settings rows, selects and menu rows to ctx.ui (#61527) 2026-11-03 18:10:41 -06:00
Aiden Cline
922994ac1e
fix(core): expand ~ in a local MCP server's cwd (#61496) 2026-11-03 17:52:09 -06:00
Luke Parker
f73e2847ba
fix(app): make URLs in questions, MCP prompts and errors clickable (#61514) 2026-11-03 17:35:23 -06:00
Luke Parker
4b370b4020
docs(plugin): show GUI plugins where session usage data lives (#61517) 2026-11-03 17:34:24 -06:00
James Long
9028e90039
fix(cli): keep WebSocket upgrades working in the compiled binary (#61518) 2026-11-03 17:32:22 -06:00
Luke Parker
69ef55f02b
feat(app): let GUI plugin panels size the side region (#61509) 2026-11-03 16:45:52 -06:00
Luke Parker
4dd7b2662c
feat(app): let GUI plugins add color themes (#61485) 2026-11-03 15:50:15 -06:00
Luke Parker
15a863346f
fix(session-ui): keep inline file links from shifting text (#61482) 2026-11-03 15:42:16 -06:00
Walter
d1dec5a576
fix(ai): count Gemini tool-use prompt tokens as billed input (#61484) 2026-11-03 15:34:32 -06:00
opencode-agent[bot]
c7e008d29e
docs(console): add Crouton Alpha Free (#61459) 2026-11-03 15:06:51 -05:00
Adam
156bb61010
feat(stats): run the stats sync on Cloudflare Workflows (#61461) 2026-11-03 13:01:07 -06:00
usrnk1
826381e44d
feat(app): simplify inbox rows and keep Recent and the current session in view (#61445) 2026-11-03 18:50:11 +00:00
usrnk1
9d002c27a7
fix(ui): use V2 regular and medium font weights (#61444) 2026-11-03 18:31:28 +00:00