{"id":"text-conflict-parse","version":"1.0.0","description":"Parse merge or diff3 conflict-marker text into ordered text and conflict parts.","supported_operations":["text conflict parse","parse conflict marker blocks","split merge conflict text into parts"],"unsupported_operations":["nested conflict markers","git mergetool filesystem access","unicode normalization","fuzzy matching","RFC 6902 JSON Patch"],"semantics":["text is scanned as line records; conflict blocks start at a line whose text begins with \"<<<<< \" plus a nonempty label.","A merge block is ours lines, a line whose text is \"=======\", theirs lines, then a \">>>>>>> \" closer. diff3 inserts a \"||||||| \" base section before =======.","Nested <<<<<<< markers, missing closers, unknown marker order, and ||||||| without a following ======= are rejected.","parts is an ordered list of {type:\"text\", text} or {type:\"conflict\", ours, theirs} with base only when a ||||||| section existed.","ours, theirs, and base are the inner texts without marker lines, preserving inner bytes including original record eols.","conflict_count is the number of conflict parts. Empty text yields no parts and conflict_count 0."],"limits":{"max_text_bytes":262144,"max_line_count":4096,"max_line_bytes":16384,"max_output_bytes":1048576},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","maxLength":262144}}},"output_schema":{"type":"object","additionalProperties":false,"required":["parts","conflict_count"],"properties":{"parts":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["text","conflict"]},"text":{"type":"string"},"ours":{"type":"string"},"theirs":{"type":"string"},"base":{"type":"string"}}}},"conflict_count":{"type":"integer","minimum":0}}},"examples":[{"input":{"text":"keep\n<<<<<<< ours\naaa\n=======\nbbb\n>>>>>>> theirs\n"},"output":{"parts":[{"type":"text","text":"keep\n"},{"type":"conflict","ours":"aaa\n","theirs":"bbb\n"}],"conflict_count":1}}],"execute_url":"/v1/tools/text-conflict-parse/versions/1.0.0/execute"}