Resolve git conflict markers in package-lock.json or a YAML lockfile
Takes a lockfile (package-lock.json or a YAML lockfile such as pnpm-lock.yaml) containing git merge-conflict markers, rebuilds both sides, and merges them key by key (using the diff3 base when present), returning the resolved file or the exact conflicting key paths with both values, for agents rebasing or merging branches. An optional prefer=ours|theirs applies one explicit policy to the remaining conflicts. A merged lockfile is not validated against the registry or dependency graph: run the package manager to regenerate it. yarn.lock and other non-JSON/YAML formats are not supported.
What you get
Resolves lockfile conflicts deterministically instead of hand-editing thousands of lines.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/lockfile-merge. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/lockfile-merge \
-H 'content-type: application/json' \
-d '{"content":"{\n \"packages\": {\n<<<<<<< HEAD\n \"node_modules/a\": { \"version\": \"1.0.0\" },\n=======\n \"node_modules/b\": { \"version\": \"2.0.0\" },\n>>>>>>> feature\n \"node_modules/c\": { \"version\": \"3.0.0\" }\n }\n}\n"}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
content | string; length 0..200000 | yes | Whole file text; YAML at most 100000 characters. |
format | string; one of "auto", "json", "yaml" | no | Default auto: JSON when the file starts with { or [. |
prefer | string; one of "none", "ours", "theirs" | no | Policy for keys changed on both sides. Default none: report them. |
Example request body
{
"content": "{\n \"packages\": {\n<<<<<<< HEAD\n \"node_modules/a\": { \"version\": \"1.0.0\" },\n=======\n \"node_modules/b\": { \"version\": \"2.0.0\" },\n>>>>>>> feature\n \"node_modules/c\": { \"version\": \"3.0.0\" }\n }\n}\n"
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
format | string | no | |
hunks | integer | no | |
baseKnown | boolean | no | |
autoMerged | integer | no | Keys that appear on one side only and were carried over. |
conflictCount | integer | no | |
conflicts | array<object> | no | |
resolved | string | no | Merged file text, present only when no conflict remains. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the code-preflight-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent