Expand description
Resume-history synthesizer: converts on-disk transcript JSONL into the
forge_primitives::Message envelopes the live wire stream produces, so
consumers read replay and live messages identically.
Re-exportsΒ§
use serde_json::Value;πuse serde_json::json;πuse forge_primitives::messages::Extras;πuse forge_primitives::AssistantEnvelope;πuse forge_primitives::ContentBlock;πuse forge_primitives::Message;πuse forge_primitives::UserEnvelope;π
FunctionsΒ§
- strip_
nested_ πattachment - synthesize_
replay_ messages - Synthesise on-disk transcript JSONL into the
forge_primitives::Messageenvelopes the live wire stream produces. Consumers read these identically to live messages, unifying replay + live code paths. - transform_
block π - transform_
prompt π - A queued promptβs block list with each nested attachment stripped.
- transform_
replay_ πcontent - Apply the replay-specific content-block transform: an attachment block keeps its mime and the size its payload weighed, and loses the payload itself.
- without_
payload π - An attachment block as the read path keeps it.