RUST.md's recommendation item 1 starts here: Event, QuestionOption, SessionStatus, ImageRef, AttachmentRef, SeqEvent, context_tokens and context_after move to a new event-model crate so a future Rust client shares one definition with server/ instead of Events.kt's hand-kept mirror. session/driver.rs and session/transcript.rs re-export everything they used to define, so nothing downstream of either module changed. cargo test (127 passed), clippy --all-targets and fmt clean in both server/ and event-model/. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
21 lines
906 B
TOML
21 lines
906 B
TOML
[package]
|
|
name = "event-model"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
# The common event model, extracted from `server/session/driver.rs` and
|
|
# `session/transcript.rs` so a Rust client (`client-core`) can share one
|
|
# definition with the server instead of hand-mirroring it the way
|
|
# `app/.../Events.kt` used to. Nothing here talks to a process, a file, or a
|
|
# socket -- it is exactly the wire shape in PLAN.md's "common event model",
|
|
# plus the transcript envelope and the context-token rule three different
|
|
# readers (the pump, the transcript, and a phone folding the same events)
|
|
# have to agree on.
|
|
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
# `Event::ToolStart.input` is a tool's raw call arguments, whatever shape the
|
|
# dialect gave them -- typing it further would mean this crate knowing every
|
|
# driver's tool schema.
|
|
serde_json = { version = "1", features = ["float_roundtrip"] }
|