{"uid":"cap_cRiHiQ4uKkP4NCmouVNrf","slug":"defi-shield-hazel-vercel-app-44793aa3","name":"DeFi Shield Diff Impact Analyzer","description":"","url":"https://defi-shield-hazel.vercel.app/api/dev/diff-impact","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"properties":{"language":{"type":"string","description":"Programming language (default: typescript)"},"new_code":{"type":"string","description":"Modified code"},"old_code":{"type":"string","description":"Original code"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"language":"typescript","new_code":"export function calculateFee(amount: number, taxRate: number = 0.01): number {\n  return amount * taxRate;\n}\n\nexport interface Config {\n  apiKey: string;\n  timeout: number;\n  retryCount?: number;\n}","old_code":"export function calculateFee(amount: number): number {\n  return amount * 0.01;\n}\n\nexport interface Config {\n  apiKey: string;\n  timeout: number;\n}"},"type":"http","method":"POST","bodyType":"json"}},"response":{"summary":"3 additions, 2 deletions. 1 breaking change(s) found. Review breaking changes before merging.","language":"typescript","additions":3,"deletions":2,"diff_lines":[{"status":"removed","content":"export function calculateFee(amount: number): number {","lineNumber":1},{"status":"removed","content":"  return amount * 0.01;","lineNumber":2},{"status":"added","content":"export function calculateFee(amount: number, taxRate: number = 0.01): number {","lineNumber":1},{"status":"added","content":"  return amount * taxRate;","lineNumber":2},{"status":"added","content":"  retryCount?: number;","lineNumber":8}],"risk_level":"medium","analyzed_at":"2026-06-13T04:21:50.332Z","breaking_changes":[{"type":"changed_signature","severity":"high","description":"Function \"calculateFee\" signature changed: (amount: number) → (amount: number, taxRate: number = 0.01)"}],"response_time_ms":2,"total_lines_changed":5,"backwards_compatible":false}},"exampleRequest":{"language":"typescript","new_code":"export function calculateFee(amount: number, taxRate: number = 0.01): number {\n  return amount * taxRate;\n}\n\nexport interface Config {\n  apiKey: string;\n  timeout: number;\n  retryCount?: number;\n}","old_code":"export function calculateFee(amount: number): number {\n  return amount * 0.01;\n}\n\nexport interface Config {\n  apiKey: string;\n  timeout: number;\n}"},"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Nsb65khsNdPMok3EjEE1q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs line-by-line diff analysis between two code versions to detect breaking changes, export/signature/type modifications, and impact severity.","exampleAgentPrompt":"Can you run a diff impact analysis on these two versions of my code and tell me if there are any breaking changes, signature changes, or modified exports — here's the before and after content?","exampleUseCases":null,"resultDescription":"Returns a structured report with a line-by-line diff, a list of detected breaking changes, modified export names, changed function signatures, type changes, and an overall impact assessment indicating severity and affected surface area.","failureModes":["Empty or identical before/after inputs return no changes detected","Malformed or non-parseable code may result in parse errors or incomplete diff","Very large files may exceed payload limits","Missing required before or after code fields return 400 validation errors","Non-code text inputs may produce unreliable signature/type tracking"],"whenToPreferThis":"Use this endpoint when you need structured, programmatic detection of breaking changes between two code versions — especially when tracking export stability, function signature changes, or type modifications. Prefer this over generic diff tools when you need semantic impact classification, not just textual differences.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T06:46:46.200Z","isFirstParty":false}