{"id":"text-three-way-merge","version":"1.0.0","description":"Three-way merge of text line records with merge or diff3 conflict markers.","supported_operations":["text three way merge","three-way merge of text","merge base ours theirs with conflict markers"],"unsupported_operations":["patience or histogram diff","unicode normalization","locale word break","offset or fuzz patch apply","RFC 6902 JSON Patch","filesystem access"],"semantics":["base, ours, and theirs are split into line records; only CRLF, LF, and CR are terminators. Record equality is text plus eol.","Regions come from mergeRegions on those records using Myers SES(base, ours) and SES(base, theirs) with the library overlap rule.","status is clean when every region is ok; text is then joinRecords of the merged records, preserving each record eol.","status is conflict when any region conflicts; text is renderConflictParts of regionsToParts using marker_style merge (default) or diff3.","Conflict marker lines use LF. Nonempty conflict blocks that do not already end with LF get a trailing LF. merge omits the ||||||| base section; diff3 includes it.","Labels default to ours, theirs, and base. Labels are nonempty, at most 256 UTF-8 bytes, and must not contain CR or LF.","Identical replacements on overlapping spans collapse to one ok region. Abutting nonempty base ranges do not overlap."],"limits":{"max_text_bytes":262144,"max_line_count":4096,"max_line_bytes":16384,"max_label_bytes":256,"max_output_bytes":1048576},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["base","ours","theirs"],"properties":{"base":{"type":"string","maxLength":262144},"ours":{"type":"string","maxLength":262144},"theirs":{"type":"string","maxLength":262144},"marker_style":{"type":"string","enum":["merge","diff3"]},"ours_label":{"type":"string","minLength":1,"maxLength":256},"theirs_label":{"type":"string","minLength":1,"maxLength":256},"base_label":{"type":"string","minLength":1,"maxLength":256}}},"output_schema":{"type":"object","additionalProperties":false,"required":["status","text"],"properties":{"status":{"type":"string","enum":["clean","conflict"]},"text":{"type":"string","maxLength":1048576}}},"examples":[{"input":{"base":"a\nb\nc\n","ours":"a\nx\nc\n","theirs":"a\nb\ny\n"},"output":{"status":"clean","text":"a\nx\ny\n"}}],"execute_url":"/v1/tools/text-three-way-merge/versions/1.0.0/execute"}