# kcode-kennedy-box-text-objects 0.1.0
## Public API
```rust
pub fn stage_box_text_objects(
journal: &mut kcode_session_history::Session,
box_ids: &[kcode_session_history::chatend::BoxId],
recorded_at: &str,
) -> anyhow::Result<String>;
```
`stage_box_text_objects` validates every selected box before staging anything. Each box must exist, be active, and have nonempty canonical text. `recorded_at` is the timestamp used for newly staged objects.
For each box, the operation reuses a pending object whose transport metadata has the same Kennedy box-text source, box ID, and canonical event ID. Otherwise it stages the canonical text bytes as `text/plain; charset=utf-8` with filename `box-{id}.txt` and transport metadata containing the source, box ID, box name, and canonical event ID.
The returned string lists each box and pending object, marks reused objects as already staged, and explains that pending references resolve to canonical object IDs when the logical session commits. Staging mutates only the supplied Session History journal; persistence and commit remain the caller's responsibility.