Skip to main content

Module replay

Module replay 

Source
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::Message envelopes 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.