Structs§
- Patch
- Represents a complete patch comprised of multiple operations.
- Patch
Chunk - Represents a chunk of changes within an update operation.
Enums§
- Patch
Error - Errors produced while parsing or applying agent patches.
- Patch
Line - Represents a single diff line inside a patch hunk.
- Patch
Operation - Represents a patch operation.
Functions§
- looks_
like_ unified_ diff - Cheap shape check: does this text look like a standard unified diff
(
diff --githeader, or a paired---/+++file-header block)? Used to produce actionable error guidance when a model submits a git-style diff toapply_patch(which requires the*** Begin Patchenvelope). VT Code patch format never uses---/+++markers, so this will not false-positive on valid VTE patches. - looks_
like_ vte_ patch - Cheap shape check: does this text begin with the VT Code patch envelope
(
*** Begin Patch) or a bare file-operation header (*** Update File:,*** Add File:,*** Delete File:)? Used by tool routing and source-field selection to distinguish a real patch from raw file contents or a unified diff. Intentionally cheap (prefix-only) — it does not validate the full patch. - render_
patch_ update_ content