Commit f0de305
refactor(runtime): split server.rs into cohesive submodules (#74)
server.rs had grown well past the 800-line audit threshold. Convert it
into a `runtime/server/` directory module, splitting along cohesion
boundaries while preserving the public API (`ARCPRuntime`,
`RuntimeBuilder`, `STREAMED_RESULT_SENTINEL` keep their paths):
- builder.rs — RuntimeBuilder configuration + build()
- handshake.rs — session.open / authenticate / resume, welcome, rejects
- jobs.rs — tool.invoke dispatch, cancellation, result finalization
- subscriptions.rs — generic subscribe and job.subscribe handling
- artifacts.rs — artifact put/fetch dispatch
- mod.rs — runtime state, the connection writer/dispatch loop,
dedup window, and maintenance sweep
Cross-module entry methods are `pub(crate)`; the external import preamble
is re-exported `pub(crate) use` so submodules share it via `use super::*`.
No behavior change; the full test suite, clippy -D warnings, and fmt all
pass. Each module is now under 800 lines (largest: mod.rs at 719).
Closes #74
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent efa79b3 commit f0de305
7 files changed
Lines changed: 2226 additions & 2199 deletions
File tree
- crates/arcp-runtime/src/runtime
- server
0 commit comments