Expand description
Attachments for the agent composer: ingest from paths, process on a bounded blocking pool, report progress on the event bus, and keep a content-addressed store with retention by last use. docs/specs/SPEC_AGENT_PANE_IMAGE_ATTACHMENTS_2026_09_26.md §6, SPEC_AGENT_PANE_FILE_ATTACHMENTS_2026_09_26.md.
Re-exports§
pub use kind::FileKind;pub use store::is_valid_id;pub use store::Kind;pub use store::Store;
Modules§
- extract
- Everything derived from a non-image attachment: a short text preview for the tile, a text version of Office documents (no agent reads those), the page count of a PDF, and whether an Office file carries macros. docs/specs/SPEC_AGENT_PANE_FILE_ATTACHMENTS_2026_09_26.md §6.
- kind
- What kind of file an attachment is, decided by content first and the
name’s extension second (a
.txtthat is really a ZIP is not text). docs/specs/SPEC_AGENT_PANE_FILE_ATTACHMENTS_2026_09_26.md §5. - process
- Sniff, decode and derive the two files an attachment needs besides its original: a small thumbnail for the composer and transcript, and the “send-copy” the agent actually receives. SPEC_AGENT_PANE_IMAGE_ATTACHMENTS_2026_09_26.md §6.4.
- prompt
- Turning a message’s attachments into what the agent receives (docs/specs/SPEC_AGENT_PANE_IMAGE_ATTACHMENTS_2026_09_26.md §6.6, SPEC_AGENT_PANE_FILE_ATTACHMENTS_2026_09_26.md §7):
- store
- The on-disk attachment store: content-addressed originals, derived files, and the retention sweep. SPEC_AGENT_PANE_IMAGE_ATTACHMENTS_2026_09_26.md §6.3.
Structs§
- Limits
- Limits and knobs, read from settings on every ingest.
- Plan
- The outcome of classifying an ingest request against the limits.
- Send
Target - One attachment as delivered to an agent.
- Service
Constants§
Functions§
- get
- The service when it has been initialised (by the RPC or HTTP layer).
Prompt delivery uses this: it has no
AppStateto initialise from. - init
- The process-wide service. The first call creates the store and starts the retention timer; later calls return the same instance.
- plan
- Every dropped file (and every file in a dropped folder) against the
limits.
non_imagesis always empty now that any file can be attached; the field stays for older frontends. Pure apart from reading metadata.