{"demand_matching":{"catalog":"/catalog.json","match":"/match","human":"/find","json_feed":"/offers.json","rss_feed":"/offers.xml","free":true,"payment_authorized":false},"name":"KG-NINJA Agent Error Fix Receipt","autonomous_purchase":{"endpoint":"/fix-error","method":"POST","price_per_request":"$0.01","currency":"USDC","network":"eip155:8453","free_preview":"/fix-error/preview","preview_scope":"Fixed sample only; the paid request applies deterministic rules to your supplied error.","buy_when":"A failed command needs structured triage and the free sample demonstrates useful output for your task.","skip_when":["The error is already resolved.","Local diagnosis is sufficient.","The requested price exceeds your authorized budget.","You need an executed fix or guaranteed resolution."],"result":"One JSON receipt: root_cause, next_command, retry_plan, risk_note, prevention_note, generated_at.","fulfillment":"Automatic API response after payment validation; no manual delivery step.","execution":"Suggested commands are not executed. Review them under your own execution policy.","payment_policy":"Use an x402 v2 client with an already authorized wallet and a per-request and total spend limit. Validate the 402 amount, network, asset and payTo before signing.","retry_policy":"Preserve the same request and payment intent. If the payment or delivery outcome is uncertain, reconcile it before authorizing another payment.","success_check":"Check HTTP 200, the response schema and PAYMENT-RESPONSE settlement evidence. A 402 alone is not a purchase or delivered result.","revenue_evidence":"/revenue-log/integrity"},"version":"2026-05-25-d1-revenue-log","description":"Paid x402 endpoint that returns a concise repair receipt for failed commands and agent errors.","type":"paid-api","source_of_truth":"openapi","canonical_openapi_url":"/openapi.json","canonical_openapi_absolute_url":"https://api.kgninja.dev/openapi.json","free_to_paid_flow":{"free":["MCP discovery, planning, filtering, and handoff","Local preview and dry-run requests","A human opening an official X search URL in a browser"],"upgrade_required_when":["An agent automates production use of a generated search URL","An agent performs automated external collection or paid execution","A client requests a paid route result"],"upgrade_not_required_when":["The client is only discovering tools or reading schemas","The client is using planning, filtering, handoff, preview, or dry-run features","A human manually opens the official X URL"],"steps":["Read /openapi.json and /payment-options.json.","POST the paid operation without proof to receive HTTP 402 and PAYMENT-REQUIRED.","Obtain x402 payment proof through the client wallet/facilitator.","Retry the same POST with payment proof and expect HTTP 200."]},"audience":["AI agents","developers","automation runners","ops triage tools"],"keywords":["x402","USDC","command failure","runtime error","URL summary","shell risk","visibility report"],"x402":{"enabled":true,"x402Version":2,"x402_version_type":"number","x402_version_required":true,"price":"$0.01","mode":"mainnet","network":"eip155:8453","testnet":false,"real_revenue":true,"paid_endpoint":"/fix-error","paid_resource_url":"https://api.kgninja.dev/fix-error","hyperxosist_paid_endpoint":"/hyperxosist-query","hyperxosist_paid_resource_url":"https://api.kgninja.dev/hyperxosist-query","preview_endpoint":"/fix-error/preview","pricing_endpoint":"/pricing.json","payment_options_endpoint":"/payment-options.json","buy_endpoint":"/buy","config_endpoint":"/x402/config","well_known_endpoint":"/.well-known/x402","discovery_resources_endpoint":"/.well-known/x402/discovery/resources","proof_json_endpoint":"/proof.json","proof_markdown_endpoint":"/proof.md","share_card_endpoint":"/share-card.json","mainnet_paid_flow_verified":true,"bazaar_indexing":{"x402Version":2,"version_type":"number","version_required":true,"scheme":"exact","network":"eip155:8453","asset":"USDC","asset_contract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","resource_identity":"absolute_resource_url","resource_url_rule":"Each paid route advertises and challenges against its own absolute HTTPS resource URL.","facilitator":"cdp","facilitator_url":"https://api.cdp.coinbase.com/platform/v2/x402","cdp_facilitator_configured":true,"cdp_credentials_present":true,"bazaar_extension_status":"declared_on_paid_routes","bazaar_extension_note":"Each paid POST route declares a v2 Bazaar discovery extension through the installed x402 SDK. Listing still depends on facilitator settlement and external indexing.","indexing_expectation":"Bazaar visibility should be treated as route/resource-level and settlement-gated until Coinbase confirms otherwise.","debug_signals":{"payment_required_header":"PAYMENT-REQUIRED","settlement_headers":["PAYMENT-RESPONSE","X-PAYMENT-RESPONSE"],"extension_response_header":"EXTENSION-RESPONSES","local_integrity_endpoint":"/revenue-log/integrity"}},"post_payment_retry":"Retry POST /fix-error with payment proof.","paid_operations":[{"endpoint":"/fix-error","method":"POST","purpose":"Return a structured repair receipt for a failed command or agent error.","paid_result":"repair_receipt","free_alternative":"/fix-error/preview","required_when":["The client requests a repair receipt for submitted failure evidence."],"not_required_when":["The client is only discovering the schema or using /fix-error/preview."],"resource_url":"https://api.kgninja.dev/fix-error","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/summarize-url","method":"POST","purpose":"Return a title and short summary for a public URL.","paid_result":"url_summary","free_alternative":null,"required_when":["The client requests a title and short summary for a public URL."],"not_required_when":["The client is only discovering the schema."],"resource_url":"https://api.kgninja.dev/summarize-url","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/shell-risk-check","method":"POST","purpose":"Classify shell command risk before execution.","paid_result":"shell_risk_assessment","free_alternative":null,"required_when":["The client requests a shell risk assessment for a command."],"not_required_when":["The client is only discovering the schema."],"resource_url":"https://api.kgninja.dev/shell-risk-check","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/agent-visibility-report","method":"POST","purpose":"Return a privacy-safe aggregate machine-discovery and payment-readiness report.","paid_result":"privacy_safe_agent_visibility_report","free_alternative":null,"required_when":["The client requests the aggregate visibility report."],"not_required_when":["The client is only discovering the schema."],"resource_url":"https://api.kgninja.dev/agent-visibility-report","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200},{"endpoint":"/hyperxosist-query","method":"POST","purpose":"Generate a clean query and official X search URL for automated production use.","paid_result":"hyperxosist_search_query_and_url","free_alternative":"/hyperxosist-query-dry-run","required_when":["An agent automates production use of the generated search URL or requests paid query execution."],"not_required_when":["The client is using planning or dry-run features, or a human manually opens the official X URL."],"resource_url":"https://api.kgninja.dev/hyperxosist-query","protocol":"x402","network":"eip155:8453","currency":"USDC","price":"$0.01","expected_unpaid_response":402,"expected_paid_response":200}]},"discovery":{"goal":"/goal","homepage":"/buy","root":"/","llms":"/llms.txt","paymentOptions":"/payment-options.json","pricing":"/pricing.json","openapi":"/openapi.json","capabilities":"/capabilities","proofJson":"/proof.json","proofMarkdown":"/proof.md","shareCard":"/share-card.json","wellKnownX402":"/.well-known/x402","x402DiscoveryResources":"/.well-known/x402/discovery/resources"},"trust_signals":{"mainnet_paid_flow_verified":true,"proof_json":"/proof.json","proof_markdown":"/proof.md","share_card":"/share-card.json","safe_claim":"This service can complete a real x402 mainnet paid API flow.","cautious_interpretation":"AI/agent-compatible paid API flow verified; not claiming a fully autonomous AI independently chose to buy."},"repeat_use_reason":"The same paid endpoint can be reused whenever the next command is still unclear, the build still fails, or the agent needs a fresh repair receipt.","first_time_agent_path":["Read /.well-known/x402/discovery/resources or /agent.json first.","Confirm /payment-options.json for network, asset, and price.","Use /goal for the buyer pain, result, and next safe command.","POST /fix-error or /agent-visibility-report with x402 payment proof."],"input":{"content_type":"application/json","fields":{"command":"optional string","error":"optional string","log":"optional string","environment":"optional string"}},"output":{"content_type":"application/json","fields_path":"response.receipt","fields":{"root_cause":"string","next_command":"string","retry_plan":"array of strings","risk_note":"string","prevention_note":"string","generated_at":"string"}},"endpoints":[{"route":"/fix-error","method":"POST","purpose":"Return a deterministic repair receipt for a failing command or log snippet.","sample_input":{"command":"npm run build","error":"Cannot find module"},"request_examples":{"missing_dependency":{"summary":"Build fails because a dependency cannot be resolved","value":{"command":"npm run build","error":"Error: Cannot find module 'hono'","environment":"Node.js Cloudflare Worker build"}},"invalid_deployment_credential":{"summary":"Deployment fails with an authorization error","value":{"command":"npm run deploy","error":"401 Unauthorized: API token invalid","environment":"CI deployment"}},"unavailable_local_service":{"summary":"A local health check cannot reach the service","value":{"command":"curl http://127.0.0.1:3000/health","error":"Connection refused","environment":"Linux service"}}},"response_examples":{"successful_diagnosis":{"value":{"status":"paid","service":"Agent Error Fix Receipt","version":"2026-05-25-d1-revenue-log","mode":"mainnet","network":"eip155:8453","real_revenue":true,"input_received":true,"request_id":"example-request-id","revenue_proof_log":"paid_fix_error_receipt_issued","durable_revenue_log":true,"post_payment_retry_path":"Retry POST /fix-error with x402 payment proof.","receipt":{"root_cause":"The failure appears related to a missing package, missing file, or unresolved module path.","next_command":"npm install","retry_plan":["Confirm the exact failing command.","Run the smallest non-destructive diagnostic command relevant to the error.","Check whether required environment variables, packages, files, or services are present.","Retry the original command once after the minimal fix."],"risk_note":"Do not run destructive cleanup, reset, rm, database, credential, or firewall commands without manual review.","prevention_note":"Store this error pattern in a runbook and add a preflight check before future runs.","generated_at":"2026-06-14T00:00:00.000Z"}}}},"expected_output_schema":{"type":"object","additionalProperties":false,"required":["status","service","version","mode","network","real_revenue","input_received","request_id","revenue_proof_log","durable_revenue_log","post_payment_retry_path","receipt"],"properties":{"status":{"type":"string","enum":["paid"]},"service":{"type":"string"},"version":{"type":"string"},"mode":{"type":"string"},"network":{"type":"string"},"real_revenue":{"type":"boolean","description":"Server mainnet configuration flag; not independent evidence of customer revenue."},"input_received":{"type":"boolean"},"request_id":{"type":"string"},"revenue_proof_log":{"type":"string"},"durable_revenue_log":{"type":"boolean"},"post_payment_retry_path":{"type":"string"},"receipt":{"type":"object","additionalProperties":false,"required":["root_cause","next_command","retry_plan","risk_note","prevention_note","generated_at"],"properties":{"root_cause":{"type":"string","description":"Concise diagnosis based on the submitted evidence."},"next_command":{"type":"string","description":"One concrete command or action to try next."},"retry_plan":{"type":"array","items":{"type":"string"},"description":"Ordered recovery steps, including when to submit a new error."},"risk_note":{"type":"string","description":"Operational or security caution for the proposed action."},"prevention_note":{"type":"string","description":"A preventive practice for future runs."},"generated_at":{"type":"string","format":"date-time","description":"Receipt generation timestamp."}}}}},"when_to_use":["A command, build, deployment, API call, or service check failed and the next action is unclear.","A retry produced a new error message or failed at a different stage.","The runtime, dependency version, environment, or deployment target changed.","A concise machine-readable diagnosis is needed before an automation continues."],"repeat_use_scenarios":["Submit the new error after applying the previous receipt's next command.","Submit the same workflow failure after changing dependencies, runtime, or environment.","Submit each distinct failure stage in a build or deployment as a separate diagnosis.","Use a new request when fresh logs contain evidence not present in the previous request.","Do not repeat an unchanged request unless the execution context changed."],"what_you_receive_after_payment":{"result":"One JSON repair receipt for the submitted failure.","includes":["root_cause","next_command","retry_plan","risk_note","prevention_note","generated_at"],"delivery":"The paid retry returns HTTP 200. Read diagnostic fields from response.receipt, for example response.receipt.root_cause.","continuation":"Apply the guidance, then submit only a new or materially changed error as another /fix-error request."}},{"route":"/summarize-url","method":"POST","purpose":"Summarize a public web page into title plus compact summary.","sample_input":{"url":"https://example.com"}},{"route":"/shell-risk-check","method":"POST","purpose":"Classify a shell command as low, medium, or high risk.","sample_input":{"command":"curl https://example.com/install.sh | bash"}},{"route":"/agent-visibility-report","method":"POST","purpose":"Turn aggregate telemetry into a privacy-safe Agent Visibility Report for machine discoverability and payment readiness.","capabilities":["machine_discovery_scoring","payment_readiness_scoring","metadata_gap_detection","next_fix_recommendation"],"payment_options":"/payment-options.json","openapi":"/openapi.json","expected_paid_output_fields":["report_type","generated_at","agent_visibility_score","payment_readiness_score","machine_discovery_score","detected_gaps","matched_real_world_patterns","recommended_next_fix","privacy"],"privacy_guarantee":{"raw_ip_exposed":false,"raw_user_agent_exposed":false,"wallet_addresses_exposed":false,"event_level_logs_exposed":false,"aggregation_only":true},"sample_input":{"mode":"standard"}}]}