Expand description
Context prefill assembly for mana dispatch.
When imp run <unit_id> dispatches an agent, the unit description often
references files the agent will need. Instead of making the agent spend
turns reading those files, we assemble them into a cached prefix message
that precedes the task prompt.
The assembled context gets cache_control breakpoints so every subsequent
turn in the agent’s session gets cache_read on the file contents — no
re-transmission cost.
Structs§
- Assembled
Context - Result of context assembly.
- File
Spec - A file to include in the prefill context.
- Prefill
Config - Configuration for context assembly.
Enums§
- File
Mode - How to extract content from a file.
Functions§
- assemble_
context - Assemble context from file specs, reading from disk and respecting budgets.
- detect_
file_ paths - Auto-detect file paths from a unit description string.