New dependency-free crate crates/worker-protocol (L0): events (Event, Done, Finish, parse_line, moved from control-plane/src/wire.rs), command (GEN/STOP/QUIT parser, moved from cpu-worker/src/protocol.rs) and lines (READY/T/PP/REUSED/ERR/DONE writers, moved from cpu-worker). Finish was defined twice (gateway and worker) and is now one enum with a word(). wire.rs re-exports the event types and cpu-worker/protocol.rs re-exports the old paths, so no caller changes. The gateway's rich GEN writer (golden-tested against the Python server) stays in wire.rs. New golden: every line the worker writes round-trips through the gateway parser. Verified (host): cargo test leleka-worker-protocol 8/8, cpu-worker, strata-control all green (0 failed); the 6 moved tests keep their bodies; clippy -D warnings clean on the new crate; fmt clean.
9 lines
482 B
Rust
9 lines
482 B
Rust
//! The line protocol the control plane speaks to an inference worker. The grammar lives in `leleka-worker-protocol`, shared with the
|
|
//! gateway that reads these lines; this module keeps the old `leleka_cpu_worker::protocol` paths.
|
|
|
|
pub use leleka_worker_protocol::command::{Command, Generate, parse_command};
|
|
pub use leleka_worker_protocol::events::Finish;
|
|
pub use leleka_worker_protocol::lines::{
|
|
done_line, error_line, progress_line, ready_line, reused_line, token_line,
|
|
};
|