{
  "x402Version": 2,
  "name": "Agent Error Fix Receipt",
  "description": "Paid x402 endpoint that diagnoses one AI or developer error log and returns a fix receipt.",
  "service": {
    "id": "agent-error-fix-receipt",
    "name": "Agent Error Fix Receipt",
    "description": "Paid x402 endpoint that diagnoses one AI or developer error log and returns a fix receipt."
  },
  "acceptedHeaders": [
    "X-PAYMENT",
    "PAYMENT",
    "PAYMENT-SIGNATURE"
  ],
  "resources": [
    {
      "url": "/fix-error",
      "method": "POST",
      "description": "Fix one AI/developer error",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "networkName": "Base",
          "asset": "USDC",
          "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "amount": "10000",
          "maxAmountRequired": "10000",
          "decimals": 6,
          "payTo": "0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3",
          "price": "$0.01"
        }
      ],
      "input": {
        "type": "object",
        "required": [
          "error_log"
        ],
        "properties": {
          "error_log": {
            "type": "string",
            "description": "Stacktrace or error log to diagnose."
          }
        },
        "additionalProperties": false,
        "example": {
          "error_log": "Error: Cannot find module 'hono'"
        }
      },
      "output": {
        "type": "object",
        "properties": {
          "root_cause": {
            "type": "string"
          },
          "next_command": {
            "type": "string"
          },
          "prevention_note": {
            "type": "string"
          }
        },
        "example": {
          "root_cause": "A required dependency is missing from the runtime environment.",
          "next_command": "npm install",
          "prevention_note": "Pin dependencies and install from the lockfile during deployment."
        }
      },
      "examples": [
        {
          "request": {
            "method": "POST",
            "url": "https://agentos-revenue-cloudflare.fuwafuwow.workers.dev/fix-error",
            "headers": {
              "content-type": "application/json"
            },
            "body": {
              "error_log": "Error: Cannot find module 'hono'"
            }
          },
          "response_402": {
            "description": "Unauthenticated POST /fix-error returns HTTP 402 with x402 v2 payment requirements."
          },
          "response_200": {
            "body": {
              "root_cause": "A required dependency is missing from the runtime environment.",
              "next_command": "npm install",
              "prevention_note": "Pin dependencies and install from the lockfile during deployment."
            }
          }
        }
      ]
    },
    {
      "url": "/mini-diagnosis",
      "method": "POST",
      "description": "Mini AI/developer error diagnosis (light)",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "5000",
          "maxAmountRequired": "5000",
          "asset": "USDC",
          "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3",
          "maxTimeoutSeconds": 300,
          "extra": {
            "name": "USD Coin",
            "version": "2"
          }
        }
      ],
      "input": {
        "type": "object",
        "required": [
          "error_log"
        ],
        "properties": {
          "error_log": {
            "type": "string",
            "description": "Stacktrace or error log to diagnose."
          }
        },
        "additionalProperties": false,
        "example": {
          "error_log": "Error: Cannot find module 'hono'"
        }
      },
      "output": {
        "type": "object",
        "properties": {
          "root_cause": {
            "type": "string"
          },
          "next_command": {
            "type": "string"
          },
          "prevention_note": {
            "type": "string"
          }
        },
        "example": {
          "root_cause": "A required dependency is missing from the runtime environment.",
          "next_command": "npm install",
          "prevention_note": "Pin dependencies and install from the lockfile during deployment."
        }
      },
      "examples": [
        {
          "request": {
            "method": "POST",
            "url": "https://agentos-revenue-cloudflare.fuwafuwow.workers.dev/mini-diagnosis",
            "headers": {
              "content-type": "application/json"
            },
            "body": {
              "error_log": "Error: Cannot find module 'hono'"
            }
          },
          "response_402": {
            "description": "Unauthenticated POST /mini-diagnosis returns HTTP 402 with x402 v2 payment requirements."
          },
          "response_200": {
            "body": {
              "root_cause": "A required dependency is missing from the runtime environment.",
              "next_command": "npm install",
              "prevention_note": "Pin dependencies and install from the lockfile during deployment."
            }
          }
        }
      ]
    },
    {
      "url": "/nano-check",
      "method": "POST",
      "description": "Nano quick error check (cheapest benchmark)",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "1000",
          "maxAmountRequired": "1000",
          "asset": "USDC",
          "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3",
          "maxTimeoutSeconds": 300,
          "extra": {
            "name": "USD Coin",
            "version": "2"
          }
        }
      ],
      "input": {
        "type": "object",
        "required": [
          "error_log"
        ],
        "properties": {
          "error_log": {
            "type": "string",
            "description": "Stacktrace or error log to diagnose."
          }
        },
        "additionalProperties": false,
        "example": {
          "error_log": "Error: Cannot find module 'hono'"
        }
      },
      "output": {
        "type": "object",
        "properties": {
          "root_cause": {
            "type": "string"
          },
          "next_command": {
            "type": "string"
          },
          "prevention_note": {
            "type": "string"
          }
        },
        "example": {
          "root_cause": "A required dependency is missing from the runtime environment.",
          "next_command": "npm install",
          "prevention_note": "Pin dependencies and install from the lockfile during deployment."
        }
      },
      "examples": [
        {
          "request": {
            "method": "POST",
            "url": "https://agentos-revenue-cloudflare.fuwafuwow.workers.dev/nano-check",
            "headers": {
              "content-type": "application/json"
            },
            "body": {
              "error_log": "Error: Cannot find module 'hono'"
            }
          },
          "response_402": {
            "description": "Unauthenticated POST /nano-check returns HTTP 402 with x402 v2 payment requirements."
          },
          "response_200": {
            "body": {
              "root_cause": "A required dependency is missing from the runtime environment.",
              "next_command": "npm install",
              "prevention_note": "Pin dependencies and install from the lockfile during deployment."
            }
          }
        }
      ]
    },
    {
      "url": "/pro-diagnosis",
      "method": "POST",
      "description": "Pro error diagnosis (higher value tier)",
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "25000",
          "maxAmountRequired": "25000",
          "asset": "USDC",
          "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x4D7d842536De9Eb491AE2300126B3CDdE7B0aDE3",
          "maxTimeoutSeconds": 300,
          "extra": {
            "name": "USD Coin",
            "version": "2"
          }
        }
      ],
      "input": {
        "type": "object",
        "required": [
          "error_log"
        ],
        "properties": {
          "error_log": {
            "type": "string",
            "description": "Stacktrace or error log to diagnose."
          }
        },
        "additionalProperties": false,
        "example": {
          "error_log": "Error: Cannot find module 'hono'"
        }
      },
      "output": {
        "type": "object",
        "properties": {
          "root_cause": {
            "type": "string"
          },
          "next_command": {
            "type": "string"
          },
          "prevention_note": {
            "type": "string"
          }
        },
        "example": {
          "root_cause": "A required dependency is missing from the runtime environment.",
          "next_command": "npm install",
          "prevention_note": "Pin dependencies and install from the lockfile during deployment."
        }
      },
      "examples": [
        {
          "request": {
            "method": "POST",
            "url": "https://agentos-revenue-cloudflare.fuwafuwow.workers.dev/pro-diagnosis",
            "headers": {
              "content-type": "application/json"
            },
            "body": {
              "error_log": "Error: Cannot find module 'hono'"
            }
          },
          "response_402": {
            "description": "Unauthenticated POST /pro-diagnosis returns HTTP 402 with x402 v2 payment requirements."
          },
          "response_200": {
            "body": {
              "root_cause": "A required dependency is missing from the runtime environment.",
              "next_command": "npm install",
              "prevention_note": "Pin dependencies and install from the lockfile during deployment."
            }
          }
        }
      ]
    }
  ]
}