Expand description
Pure-serde conversation/message wire types for CAR inference.
These types — Message, ToolCall, ContentBlock — define the
multi-turn conversation wire form that car-inference’s protocol handlers
and local chat templates consume. They were extracted out of
car-inference (where they still live as re-exports) so a dependency-
light consumer can build and pattern-match the REAL types without pulling
the Candle/MLX inference stack:
car-inferencere-exports every type here (pub use car_inference_types::{Message, ToolCall, ContentBlock}), so its own callers are unchanged.car-sync’s transcript-resume projection (multi-device sync B2) buildsVec<Message>directly from folded conversation ops. Because it depends on this crate — not on a hand-copied mirror — a change toMessage’s shape is a compile error at the resume site, not a runtimefrom_value::<Message>break in the daemon (the drift trap the kernel review flagged).
The crate is deliberately serde-only. Anything that needs Candle, a
tokenizer, or a model backend belongs in car-inference, not here.
Structs§
- Thinking
Block - A single assistant extended-thinking block, preserved for verbatim replay.
- Tool
Call - A tool call returned by the model.
Enums§
- Content
Block - A content block in a multimodal message.
- Message
- A message in a multi-turn conversation.
- Provenance
- Where a tool result’s bytes came from, relative to the runtime’s trust boundary.
Constants§
- EXTERNAL_
CLOSE - Closing delimiter for externally-sourced tool output.
- EXTERNAL_
OPEN - Opening delimiter for externally-sourced tool output.
Functions§
- fence_
external - Wrap externally-sourced tool output so its status is legible in the prompt.