/** * Parser for the Codex `apply_patch` envelope format. * * *** Begin Patch * *** Add File: * + * *** Delete File: * *** Update File: * *** Move to: * @@ * -old * +new * context * *** End of File * *** End Patch * * Input is the full envelope text (optionally heredoc-wrapped). Output is a * list of `PatchInput` records, each ready to hand to the existing * single-file `applyPatch()` in `../modes/patch.ts`. * * Per spec ยง4.3 Lenient mode: a `<