{"openapi":"3.1.0","info":{"title":"ACN Preflight Engine","version":"1.0.0","description":"Three preflight capabilities. Paid paths return HTTP 402 when paid access is required."},"servers":[{"url":"https://preflight.abacore.net"}],"paths":{"/v1/bounty":{"get":{"summary":"Bounty Reality Check","parameters":[{"name":"issue_url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"example":"https://github.com/python-poetry/poetry/issues/9574"}],"responses":{"200":{"description":"Fresh bounty reality check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BountyRealityCheck"},"example":{"capability":"bounty_reality_check","price_usd":0,"issue_url":"https://github.com/owner/repo/issues/123"}},"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or missing issue URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"External verification unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/repo":{"post":{"summary":"Repo Contribution Readiness","security":[{"paidAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoInput"},"example":{"repo_url":"https://github.com/python-poetry/poetry","change_type":"docs"}}}},"responses":{"200":{"description":"Contribution readiness result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoOutput"}},"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required is the normal unauthenticated response for this paid capability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"},"example":{"error":"payment_required","capability":"repo_contribution_readiness","price_usd":0.1,"payment_state":"SAFETY_HOLD","order_endpoint":"/api/v1/orders","x402":"/.well-known/x402"}},"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Capability or payment rail unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/payment":{"post":{"summary":"Payment Preflight","security":[{"paidAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInput"},"example":{"chain":"base","address":"0xAa476D1E087957e2F0905353f5560451eC3462a4","token_contract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10.00"}}}},"responses":{"200":{"description":"Technical chain-state preflight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOutput"}},"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required is the normal unauthenticated response for this paid capability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"},"example":{"error":"payment_required","capability":"payment_preflight","price_usd":0.02,"payment_state":"SAFETY_HOLD","order_endpoint":"/api/v1/orders","x402":"/.well-known/x402"}},"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Capability or payment rail unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"paidAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"ACN paid access token"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"}},"required":["error"]},"PaymentRequired":{"type":"object","properties":{"error":{"const":"payment_required"},"capability":{"type":"string"},"price_usd":{"type":"number"},"payment_state":{"type":"string","enum":["ACTIVE","SAFETY_HOLD"]},"order_endpoint":{"type":"string"},"x402":{"type":"string"}},"required":["error","capability","price_usd","payment_state","order_endpoint","x402"]},"RepoInput":{"type":"object","properties":{"repo_url":{"type":"string","format":"uri"},"change_type":{"type":"string","enum":["bugfix","feature","docs","dependency"]}},"required":["repo_url"],"additionalProperties":false},"PaymentInput":{"type":"object","properties":{"chain":{"type":"string","enum":["base","8453","base-mainnet"]},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"token_contract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"oneOf":[{"type":"number"},{"type":"string"}]}},"required":["chain","address"],"additionalProperties":false},"BountyRealityCheck":{"type":"object","properties":{"capability":{"const":"bounty_reality_check"},"price_usd":{"const":0},"issue_url":{"type":"string","format":"uri"},"email_required":{"const":false},"registration_required":{"const":false},"data_collected_at":{"type":"string","format":"date-time"},"github_issue":{"type":"object","properties":{"state":{"type":"string"},"state_reason":{"type":["string","null"]},"title":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"closed_at":{"type":["string","null"]},"comments":{"type":"integer"},"assignees":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"type":"string"}},"locked":{"type":"boolean"}}},"github_repository":{"type":"object","properties":{"full_name":{"type":"string"},"archived":{"type":"boolean"},"disabled":{"type":"boolean"},"fork":{"type":"boolean"},"default_branch":{"type":"string"},"pushed_at":{"type":"string"},"updated_at":{"type":"string"},"open_issues_count":{"type":"integer"}}},"linked_pull_requests":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"state":{"type":"string"},"author":{"type":["string","null"]}}}},"acn_snapshot_match":{"type":["object","null"]},"provenance":{"type":"array","items":{"type":"object"}}},"required":["capability","price_usd","issue_url","email_required","registration_required","data_collected_at","github_issue","github_repository","linked_pull_requests","acn_snapshot_match","provenance"]},"RepoOutput":{"type":"object","properties":{"capability":{"type":"string"},"price_usd":{"type":"number"},"contributing_md_present":{"type":"boolean"},"cla_required":{"type":"boolean"},"dco_required":{"type":"boolean"},"test_requirements":{"type":"array","items":{"type":"string"}},"required_ci_checks":{"type":"array","items":{"type":"string"}},"median_time_to_first_review_external_pr_days":{"type":["number","null"]},"median_time_to_merge_external_pr_days":{"type":["number","null"]},"external_pr_merge_rate_90d":{"type":"number"},"open_external_pr_backlog":{"type":"integer"},"maintainer_last_activity_days_ago":{"type":["number","null"]},"ai_pr_stance":{"type":"string","enum":["welcoming","neutral","hostile","unknown"]},"ai_pr_stance_evidence_url":{"type":["string","null"],"format":"uri"},"bounty_program_status":{"type":"string","enum":["active","discontinued","none"]},"recommended_action":{"type":"string"},"data_collected_at":{"type":"string","format":"date-time"},"repo_url":{"type":"string","format":"uri"},"change_type":{"type":["string","null"],"enum":["bugfix","feature","docs","dependency",null]},"data_source":{"const":"public_github_api"},"model_used":{"const":false},"sample":{"type":"object","properties":{"external_prs_created_90d":{"type":"integer"},"external_prs_review_sampled":{"type":"integer"}}}},"required":["capability","price_usd","contributing_md_present","cla_required","dco_required","test_requirements","required_ci_checks","median_time_to_first_review_external_pr_days","median_time_to_merge_external_pr_days","external_pr_merge_rate_90d","open_external_pr_backlog","maintainer_last_activity_days_ago","ai_pr_stance","ai_pr_stance_evidence_url","bounty_program_status","recommended_action","data_collected_at","repo_url","data_source","model_used","sample"]},"PaymentOutput":{"type":"object","properties":{"capability":{"type":"string"},"price_usd":{"type":"number"},"checksum_valid":{"type":"boolean"},"is_contract":{"type":"boolean"},"account_type":{"type":"string","enum":["eoa","smart_account"]},"delegate_address":{"type":["string","null"]},"nonce":{"type":"integer"},"has_outgoing_history":{"type":"boolean"},"token_contract_matches_canonical":{"type":["boolean","null"]},"token_name_homoglyph_detected":{"type":"boolean"},"token_symbol_homoglyph_detected":{"type":"boolean"},"similar_address_seen_in_recent_counterparties":{"type":"boolean"},"verdict":{"type":"string","enum":["SAFE","CAUTION","DANGER"]},"reasons":{"type":"array","items":{"type":"string"}},"rpc_sources":{"type":"array","items":{"type":"string","format":"uri"}},"checked_at_block":{"type":"integer"},"checked_at":{"type":"string","format":"date-time"},"chain_id":{"const":8453},"token_name":{"type":["string","null"]},"token_symbol":{"type":["string","null"]},"scope":{"type":"string"}},"required":["capability","price_usd","checksum_valid","is_contract","account_type","delegate_address","nonce","has_outgoing_history","token_contract_matches_canonical","token_name_homoglyph_detected","token_symbol_homoglyph_detected","similar_address_seen_in_recent_counterparties","verdict","reasons","rpc_sources","checked_at_block","checked_at","chain_id","scope"]}}}}