Skip to content

refactor(build): split monolith into focused crates (remote-server, cli, app-core, app, transport)#143

Merged
matej21 merged 6 commits into
mainfrom
build/crate-split
Jun 18, 2026
Merged

refactor(build): split monolith into focused crates (remote-server, cli, app-core, app, transport)#143
matej21 merged 6 commits into
mainfrom
build/crate-split

Conversation

@matej21

@matej21 matej21 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Splits the okena monolith further into focused crates. The desktop binary becomes a thin entry point (main.rs, assets.rs, smoke_tests.rs) — everything else moves into dedicated workspace crates. No behavior changes; this is a pure build/structure refactor.

Extracted crates

Commit New crate What moved out
refactor(build): …okena-remote-server okena-remote-server Remote-control HTTP/WS server (axum/hyper/rustls/rcgen + HMAC auth), routes, PTY broadcaster, bridge
refactor(build): …okena-cli okena-cli CLI command surface (clap parser, command registry, resolve, self-installing skill)
refactor(build): …okena-app-core okena-app-core Headless app-logic: settings + workspace action execution
refactor(build): …okena-app okena-app The whole UI/app layer (views, app coordinator, keybindings, action dispatch, logging, theme/terminal shims)
refactor(build): …okena-transport okena-transport Networking/transport split out of okena-core (client, http, TLS, remote_action)

Notes

🤖 Generated with Claude Code

matej21 and others added 6 commits June 18, 2026 14:22
…er crate

Moves the HTTP/WS remote-control server (src/remote/) out of the monolithic
okena binary into a dedicated library crate, so the axum/hyper/rustls/rcgen
server stack no longer compiles on the binary's hot path and can build in
parallel. Re-exported as `crate::remote` via a shim in main.rs so existing
references keep working. CommandResult DTO moved to okena-core alongside
ActionRequest.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ions) into okena-app-core crate

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… now a thin entry point

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ena-transport

okena-core was a 28-consumer hub that forced the async stack (tokio, reqwest, tokio-tungstenite, rustls) onto every crate via its `client` / `blocking-http` features. Move the transport layer — the async client engine (client/, WS + TLS pinning), blocking HTTP and remote_action — into a new okena-transport crate depending on okena-core.

The wire schema (api) and WS message types (ws) stay in okena-core as pure serde data, so api's 14 consumers are unchanged. okena-core now pulls no networking deps. Repoint the 8 client + 6 blocking-http consumers at okena-transport, and drop the dead `client` activation from hooks, app-core and the root binary (none use the transport).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
`AuthStore`, `PtyBroadcaster` and `RemoteInfo` each have a public
argument-less `new()`. While they lived in the binary crate they were not
externally reachable, so clippy's `new_without_default` stayed quiet. After
extracting them into the `okena-remote-server` library crate they became
public API, tripping the lint under CI's `-D warnings`. Add the conventional
`Default` impls that delegate to `new()`.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@matej21 matej21 merged commit 913fb29 into main Jun 18, 2026
8 checks passed
@matej21 matej21 deleted the build/crate-split branch June 18, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant