1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Direct incremental Claude Messages ↔ OpenAI Responses streams.
//!
//! Both native source and target collectors validate the lifecycle. Live text,
//! reasoning and function arguments come from actual source fragments. Final
//! source conversion checks the full target and supplies terminal metadata;
//! it never replays already emitted text. JSON argument spelling may differ,
//! but the streamed object must equal the actual native source tool input.
//!
//! Claude-to-Responses uses factual creation time and original/effective request
//! controls. Each Claude block retains its own output item, and call IDs remain
//! distinct from function item IDs. A late global Claude refusal keeps emitted
//! output text and becomes incomplete/content_filter. It cannot retract that
//! text into another channel. Annotation coordinates/resource bindings require
//! explicit facts bound to the exact source citation occurrence.
//!
//! Responses-to-Claude preserves every text/refusal part and actual tool input.
//! Earlier messages gate later items until their part list is complete; known
//! function items can stream concurrently. Optional item IDs may arrive late,
//! while native call IDs determine the target tool identity. Per-part refusal
//! text is retained; Claude's single stop_reason preserves explicit tool
//! continuation when both coexist, with a separate representation diagnostic.
//!
//! A Claude target start requires real usage. Missing start facts wait in a
//! bounded queue; initial counters never replace missing final usage. Initial
//! host input/cache facts must agree with final native counters. Late effective
//! service tier cannot rewrite message_start and is reported separately.
//! Signed thinking restores only from validated original model/origin/field
//! state. MCP receipts retain native MCP shapes without executing tools.
//!
//! Every failed push poisons the converter. Source terminal events and finish
//! are mandatory. Input/output bytes/events and retained payloads are bounded,
//! and each target event is charged once before native validation/retention.
pub use ;
pub use ;
pub use BoundResponseAnnotation;
pub use ;