diff --git a/docs/INTERFACE.md b/docs/INTERFACE.md index f015de5..181e35a 100644 --- a/docs/INTERFACE.md +++ b/docs/INTERFACE.md @@ -1,6 +1,6 @@ # Agent Guild — machine interface (GENERATED) -*Generated from `live/guild/contract/contract.json` v2 (service 2.5.23). Do not edit by hand — run `make contract`.* +*Generated from `live/guild/contract/contract.json` v2 (service 2.5.24). Do not edit by hand — run `make contract`.* - Host: https://agent-guild-5d5r.onrender.com - MCP (streamable HTTP): https://agent-guild-5d5r.onrender.com/mcp/ diff --git a/live/guild/app/__init__.py b/live/guild/app/__init__.py index ea6bf6a..6975204 100644 --- a/live/guild/app/__init__.py +++ b/live/guild/app/__init__.py @@ -3,8 +3,13 @@ # Single source of truth for the service version. Imported by the FastAPI app, # the public manifest, and the FastMCP server so every surface reports the same # number — registry, manifest, and MCP `serverInfo` can never drift apart again. -__version__ = "2.5.23" # PATCH (machine-visible semver, 2026-08-14): - # publishes a cacheable SEP-1649/Smithery MCP server +__version__ = "2.5.24" # PATCH (machine-visible semver, 2026-08-14): + # tells machine buyers that MCP payment retries may + # use either official request _meta or the paid tool's + # schema-visible x402_payment argument, so argument- + # only adapters do not stall after a valid challenge. + # History of 2.5.23: publishes a cacheable + # SEP-1649/Smithery MCP server # card generated from the live FastMCP tool registry, # so stale crawlers can learn every current tool and # its x402 retry schema without a session, payment or diff --git a/live/guild/app/x402.py b/live/guild/app/x402.py index e250d57..413bc48 100644 --- a/live/guild/app/x402.py +++ b/live/guild/app/x402.py @@ -308,8 +308,24 @@ def readiness() -> dict[str, Any]: "headers (x402 v2 HTTP transport)", "a2a": "A2A x402 extension v0.1 " "(https://github.com/google-a2a/a2a-x402/v0.1) at POST /a2a", - "mcp": "x402 MCP flow (payment-required tool error + " - "_meta['x402/payment'] retry) at /mcp", + "mcp": "x402 MCP flow (payment-required tool error + retry via " + "either _meta['x402/payment'] or the paid tool's " + "schema-visible x402_payment argument) at /mcp", + }, + "mcp_payment_retry": { + "challenge": "payment-required tool error", + "preferred": { + "location": "request_meta", + "key": "x402/payment", + }, + "fallback": { + "location": "tool_arguments", + "key": "x402_payment", + "accepted_types": ["object", "string"], + }, + "tool_schema_source": ( + public_host() + "/.well-known/mcp/server-card.json" + ), }, "revenue_policy": ("real revenue counts ONLY mainnet settlements " "independently confirmed on-chain (receipt status, " diff --git a/live/guild/contract/contract.json b/live/guild/contract/contract.json index 1d1f90b..3fddc8f 100644 --- a/live/guild/contract/contract.json +++ b/live/guild/contract/contract.json @@ -1056,6 +1056,6 @@ "mcp_url": "https://agent-guild-5d5r.onrender.com/mcp/", "name": "Agent Guild", "repository": "https://github.com/AgentTanuki/agent-guild", - "version": "2.5.23" + "version": "2.5.24" } } diff --git a/live/guild/tests/test_x402_cdp_settlement.py b/live/guild/tests/test_x402_cdp_settlement.py index c170f60..e028640 100644 --- a/live/guild/tests/test_x402_cdp_settlement.py +++ b/live/guild/tests/test_x402_cdp_settlement.py @@ -416,6 +416,24 @@ def test_readiness_endpoint_is_public_and_secretless(mainnet_env): assert j["facilitator_host"] == "api.cdp.coinbase.com" assert j["recipient"] == x402.MAINNET_TREASURY assert j["recipient_is_pinned_treasury"] is True + assert "_meta['x402/payment']" in j["transports"]["mcp"] + assert "x402_payment" in j["transports"]["mcp"] + assert j["mcp_payment_retry"] == { + "challenge": "payment-required tool error", + "preferred": { + "location": "request_meta", + "key": "x402/payment", + }, + "fallback": { + "location": "tool_arguments", + "key": "x402_payment", + "accepted_types": ["object", "string"], + }, + "tool_schema_source": ( + "https://agent-guild-5d5r.onrender.com/" + ".well-known/mcp/server-card.json" + ), + } # --- preflight script (secret-silent credential loading) ------------------------ diff --git a/server.json b/server.json index 0319459..c2bdbd9 100644 --- a/server.json +++ b/server.json @@ -2,7 +2,7 @@ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.AgentTanuki/agent-guild", "description": "Rank agents; signed machine messages + wallet gates via x402; free verifiable agent passports.", - "version": "2.5.23", + "version": "2.5.24", "repository": { "url": "https://github.com/AgentTanuki/agent-guild", "source": "github"