Expand description
Patch tool facade that exposes Codex-compatible patch parsing and application.
Actual patch parsing logic lives in tools::editing::patch so future edit
features can reuse the same primitives without depending on this facade.
Re-exports§
pub use crate::tools::editing::Patch;pub use crate::tools::editing::PatchError;pub use crate::tools::editing::PatchHunk;pub use crate::tools::editing::PatchLine;pub use crate::tools::editing::PatchOperation;
Structs§
- Apply
Patch Input - Input structure for the apply_patch tool
- Decoded
Apply Patch Input
Constants§
- APPLY_
PATCH_ ALIAS_ DESCRIPTION - MAX_
DECODED_ PATCH_ BYTES - Maximum allowed decoded patch size — same as
UNIFIED_FILE_MAX_PAYLOAD_BYTESbut exposed with a more specific name to clarify that it is enforced at decode time, not preflight time. - SEMANTIC_
ANCHOR_ GUIDANCE - UNIFIED_
FILE_ MAX_ PAYLOAD_ BYTES - Hard upper bound for any single
apply_patchpayload (andunified_fileedit/patchactions) after base64 decoding. The preflight cap mirrors this same value; both share the same env-var override. - UNIFIED_
FILE_ MAX_ PAYLOAD_ BYTES_ ENV - Env var name that overrides both the preflight cap and the post-decode cap.
Functions§
- decode_
apply_ patch_ input - effective_
max_ payload_ bytes - Resolve the effective cap, honoring the env-var override. A 1 KiB safety
floor is enforced so a sub-floor override can never silently disable the
post-decode cap; values below the floor fall back to the default. The same
floor is applied by the preflight resolver in
execution_kernelso both stages agree on the effective cap. - parameter_
schema - patch_
source_ from_ args - with_
semantic_ anchor_ guidance