{"data":{"status":"pass","applied":true,"text":"function add(a, b) {\n  return a + b;\n}\n\nfunction sub(a, b) {\n  return b - a;\n}\n","hunks":[{"index":0,"kind":"hunk","state":"applied","lineHint":40,"tolerance":"exact","startLine":5,"endLine":7,"lineShift":-35}],"eol":"lf","finalNewline":true,"changed":true,"witnesses":[],"versions":{"engine":"patch-anchor 1","tolerance-ladder":"exact > trailing-ws > outer-ws > inner-ws (first rung with a match; more than one match at that rung is refused)","unified-diff":"single-file; header counts ignored; GNU 'no newline at end of file' marker honoured","asOf":"2026-11-04"},"limits":["File at most 524288 bytes and 100000 lines, at most 64 hunks, at most 400 anchor lines per hunk; matching work is capped and exceeding it returns unknown.","Hunks are located against the original file, not against earlier hunks' output.","Final-newline state is preserved unless a no-newline marker on a hunk touching the end of the file changes it.","A trailing CR on a diff or edit line is read as a line terminator."],"deterministic":true},"_provenance":{"version":"writerslogic-provenance/1","issuer":"did:web:agents.writerslogic.com","verify":{"endpoint":"POST /api/v1/verify-provenance","did":"did:web:agents.writerslogic.com"},"manifest":{"format":"application/json","instance_id":"xmp:iid:632f8b6d-9f4e-490d-8138-36f055feed70","claim_generator_info":[{"name":"WritersLogic x402 Agent Hub","version":"2.0.0"}],"title":"Apply a unified-diff hunk or search/replace edit to a file by content, refusing ambiguity","assertions":[{"label":"c2pa.actions.v2","data":{"actions":[{"action":"c2pa.created","when":"2026-11-06T01:30:19.208Z","softwareAgent":{"name":"writerslogic-agent-hub/patch-anchor","version":"2.0.0"},"digitalSourceType":"http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicMedia","parameters":{"endpoint":"POST /api/v1/patch-anchor","inputDigest":{"alg":"sha256","hash":"540d1b14555b9a00e87bc0084532249e3aacfd5108e5b2ce4410440fa2865d67","canonicalization":"JCS"}}}]}},{"label":"c2pa.hash.data","data":{"alg":"sha256","hash":"f0f6a8a11274c20b20041c9c4074644cadeee82e40f96d5b831e3fa6f10ffe00","name":"jcs-canonical-json(data)"}}]},"credential":{"@context":["https://www.w3.org/ns/credentials/v2"],"id":"urn:uuid:ce1148cc-263f-4c9d-903e-916670903e73","type":["VerifiableCredential","AgentOutputCredential"],"issuer":"did:web:agents.writerslogic.com","validFrom":"2026-11-06T01:30:19.208Z","credentialSubject":{"id":"urn:sha256:f0f6a8a11274c20b20041c9c4074644cadeee82e40f96d5b831e3fa6f10ffe00","agent":"patch-anchor","endpoint":"POST /api/v1/patch-anchor","outputDigest":{"alg":"sha256","value":"f0f6a8a11274c20b20041c9c4074644cadeee82e40f96d5b831e3fa6f10ffe00","canonicalization":"JCS"},"inputDigest":{"alg":"sha256","value":"540d1b14555b9a00e87bc0084532249e3aacfd5108e5b2ce4410440fa2865d67","canonicalization":"JCS"},"manifestDigest":{"alg":"sha256","value":"0f2620c4670c642da50b3fd25b0aed6bdad7ae0aac4b778de10f5d820f7e99f1","canonicalization":"JCS"},"ingredients":[],"payment":{"scheme":"api-key","network":"eip155:8453","payer":"sample"}},"proof":{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2026-11-06T01:30:19.208Z","verificationMethod":"did:web:agents.writerslogic.com#key-1","proofPurpose":"assertionMethod","proofValue":"z2doBDkfzLN3L4GHDJTGzLvBenLLsESczHWpLz4Xor4fe8Go2zF5GH2z3qvN7Rqv4rsumSUPK33hXiJFfjewd5CCX"}},"ethSignature":{"type":"EIP-191","signer":"did:pkh:eip155:8453:0x3DBd42560cA7a7E448A2c7DfC9E785526189411f","address":"0x3DBd42560cA7a7E448A2c7DfC9E785526189411f","message":"writerslogic-provenance:1dd55126fd5504eb0b744612de989a279d6049e19644f072e181b439812d1124","signature":"0x63f892aa0ba9eddd65f7962446f69feddc435edd6d2233c9ea11e237cfc1852b101656c3cbbd9871a1ff3711ef56f8d9b1d476b5a32c6d2b07343c0787e9affd1c"}}}