Skip to main content

Module template

Module template 

Source
Expand description

Template-mode support for in-place response documents.

Parses <!-- patch:name -->...<!-- /patch:name --> blocks from agent responses and applies them to the corresponding <!-- agent:name --> components in the document.

Structs§

ComponentInfo
Per-component info for plugin rendering.
PatchBlock
A parsed patch directive from an agent response.
TemplateInfo
Template info output for plugins.

Functions§

apply_patches
Apply patch blocks to a document’s components.
apply_patches_with_overrides
Apply patches with per-component mode overrides (e.g., stream mode forces “replace” for cumulative buffers even on append-mode components like exchange).
parse_patches
Parse <!-- patch:name -->...<!-- /patch:name --> blocks from an agent response.
reposition_boundary_to_end
Reposition the boundary marker to the end of the exchange component.
reposition_boundary_to_end_with_summary
Reposition boundary with an optional human-readable summary suffix.
template_info
Get template info for a document (for plugin rendering).