@devlab.group/agent-commerce 2.7.2 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +79 -30
  2. package/dist/ap2.d.ts +3 -11
  3. package/dist/ap2.js +97 -28
  4. package/dist/ap2.js.map +1 -1
  5. package/dist/{chunk-77HLISG4.js → chunk-2PVRHMVT.js} +14 -10
  6. package/dist/chunk-2PVRHMVT.js.map +1 -0
  7. package/dist/{chunk-WDD2ZUR3.js → chunk-46Y5M7BA.js} +3 -2
  8. package/dist/chunk-46Y5M7BA.js.map +1 -0
  9. package/dist/{chunk-XXHC6AA3.js → chunk-5Q6W7YTK.js} +160 -41
  10. package/dist/chunk-5Q6W7YTK.js.map +1 -0
  11. package/dist/chunk-JF45GSNA.js +22 -0
  12. package/dist/chunk-JF45GSNA.js.map +1 -0
  13. package/dist/{chunk-YHNTTMED.js → chunk-MDOGXTZD.js} +2 -2
  14. package/dist/chunk-MDOGXTZD.js.map +1 -0
  15. package/dist/chunk-MNI6APE6.js +64 -0
  16. package/dist/chunk-MNI6APE6.js.map +1 -0
  17. package/dist/{chunk-IWXVQYG5.js → chunk-RF3DFVXH.js} +2 -2
  18. package/dist/{chunk-IWXVQYG5.js.map → chunk-RF3DFVXH.js.map} +1 -1
  19. package/dist/{chunk-DJRWYDKJ.js → chunk-RXYGC7A3.js} +3 -3
  20. package/dist/{chunk-DJRWYDKJ.js.map → chunk-RXYGC7A3.js.map} +1 -1
  21. package/dist/{chunk-5AO5N2XY.js → chunk-VHS6MGXJ.js} +621 -4
  22. package/dist/chunk-VHS6MGXJ.js.map +1 -0
  23. package/dist/cli/{ap2-O3HJSS2E.js → ap2-SJZAZQIR.js} +36 -9
  24. package/dist/cli/ap2-SJZAZQIR.js.map +1 -0
  25. package/dist/cli/chunk-25WJIUJU.js +8 -0
  26. package/dist/cli/{chunk-B4QJV7OC.js.map → chunk-25WJIUJU.js.map} +1 -1
  27. package/dist/cli/chunk-2PO65227.js +619 -0
  28. package/dist/cli/chunk-2PO65227.js.map +1 -0
  29. package/dist/cli/{chunk-DKWO6LLX.js → chunk-4WPHZLVO.js} +3 -2
  30. package/dist/cli/chunk-4WPHZLVO.js.map +1 -0
  31. package/dist/cli/chunk-4YZULHX2.js +64 -0
  32. package/dist/cli/chunk-4YZULHX2.js.map +1 -0
  33. package/dist/cli/chunk-526C4KZA.js +93 -0
  34. package/dist/cli/chunk-526C4KZA.js.map +1 -0
  35. package/dist/cli/{chunk-FETTSOMT.js → chunk-5CH5VFC6.js} +139 -4
  36. package/dist/cli/chunk-5CH5VFC6.js.map +1 -0
  37. package/dist/cli/chunk-GISJ73ML.js +20 -0
  38. package/dist/cli/chunk-GISJ73ML.js.map +1 -0
  39. package/dist/cli/chunk-IJFPWT4I.js +435 -0
  40. package/dist/cli/chunk-IJFPWT4I.js.map +1 -0
  41. package/dist/cli/{chunk-QUFFT5K3.js → chunk-K34CRXKX.js} +141 -42
  42. package/dist/cli/chunk-K34CRXKX.js.map +1 -0
  43. package/dist/cli/{chunk-OETKXDGA.js → chunk-L264N3ZV.js} +127 -274
  44. package/dist/cli/chunk-L264N3ZV.js.map +1 -0
  45. package/dist/cli/chunk-MASLG557.js +26 -0
  46. package/dist/cli/chunk-MASLG557.js.map +1 -0
  47. package/dist/cli/{chunk-S5TQXKQ7.js → chunk-NM7V2Y4I.js} +7 -5
  48. package/dist/cli/chunk-NM7V2Y4I.js.map +1 -0
  49. package/dist/cli/chunk-RQ7W3NA5.js +143 -0
  50. package/dist/cli/chunk-RQ7W3NA5.js.map +1 -0
  51. package/dist/cli/chunk-RWBUHDU7.js +48 -0
  52. package/dist/cli/chunk-RWBUHDU7.js.map +1 -0
  53. package/dist/cli/{chunk-GBBG66O6.js → chunk-SHIA2B6G.js} +161 -106
  54. package/dist/cli/chunk-SHIA2B6G.js.map +1 -0
  55. package/dist/cli/{chunk-FL4HPCD4.js → chunk-THH7Y3OO.js} +3 -35
  56. package/dist/cli/chunk-THH7Y3OO.js.map +1 -0
  57. package/dist/cli/{chunk-XRG5UTIC.js → chunk-U3SEGD4H.js} +127 -19
  58. package/dist/cli/chunk-U3SEGD4H.js.map +1 -0
  59. package/dist/cli/{chunk-55AI6CLW.js → chunk-USIXWAXZ.js} +2 -2
  60. package/dist/cli/chunk-USIXWAXZ.js.map +1 -0
  61. package/dist/cli/{chunk-APC5BTQM.js → chunk-UV23DWUY.js} +2 -2
  62. package/dist/cli/{chunk-APC5BTQM.js.map → chunk-UV23DWUY.js.map} +1 -1
  63. package/dist/cli/config-IBG46HTQ.js +14 -0
  64. package/dist/cli/{config-ODN4IEMZ.js.map → config-IBG46HTQ.js.map} +1 -1
  65. package/dist/cli/index.js +373 -82
  66. package/dist/cli/index.js.map +1 -1
  67. package/dist/cli/{mcp-G2D2Z77G.js → mcp-F3EQQWDZ.js} +84 -45
  68. package/dist/cli/mcp-F3EQQWDZ.js.map +1 -0
  69. package/dist/cli/payment-providers-FPTGQBU7.js +6 -0
  70. package/dist/cli/{payment-providers-7RIIZ5OF.js.map → payment-providers-FPTGQBU7.js.map} +1 -1
  71. package/dist/cli/{provider-ARV3VAQ7.js → provider-XACFJ7MG.js} +145 -23
  72. package/dist/cli/provider-XACFJ7MG.js.map +1 -0
  73. package/dist/cli/receipts-AXCPPGOK.js +9 -0
  74. package/dist/cli/{receipts-HLQ7D722.js.map → receipts-AXCPPGOK.js.map} +1 -1
  75. package/dist/cli/{run-BHODKC6H.js → run-C3VWMM57.js} +912 -237
  76. package/dist/cli/run-C3VWMM57.js.map +1 -0
  77. package/dist/cli/{x402-LHW2YQ6W.js → x402-SUXWULOP.js} +12 -8
  78. package/dist/cli/x402-SUXWULOP.js.map +1 -0
  79. package/dist/index.d.ts +108 -41
  80. package/dist/index.js +1614 -633
  81. package/dist/index.js.map +1 -1
  82. package/dist/mcp.d.ts +2 -2
  83. package/dist/mcp.js +80 -42
  84. package/dist/mcp.js.map +1 -1
  85. package/dist/mpp.d.ts +3 -2
  86. package/dist/mpp.js +139 -20
  87. package/dist/mpp.js.map +1 -1
  88. package/dist/{protocol-adapter-DdFL5LBU.d.ts → protocol-adapter-D6JH_kk-.d.ts} +2 -2
  89. package/dist/{runtime-BmaSp2Ce.d.ts → runtime-D8u6lYfx.d.ts} +10 -0
  90. package/dist/{store-DQwbKhnc.d.ts → store-04pazhFP.d.ts} +54 -3
  91. package/dist/testing.d.ts +1 -1
  92. package/dist/testing.js +469 -274
  93. package/dist/testing.js.map +1 -1
  94. package/dist/{transaction-BXXJltZ-.d.ts → transaction-F9ZvhokH.d.ts} +1 -1
  95. package/dist/types-Dl27vhEc.d.ts +167 -0
  96. package/dist/x402.d.ts +7 -110
  97. package/dist/x402.js +6 -5
  98. package/dist/x402.js.map +1 -1
  99. package/package.json +3 -1
  100. package/dist/chunk-2573DASO.js +0 -8
  101. package/dist/chunk-2573DASO.js.map +0 -1
  102. package/dist/chunk-5AO5N2XY.js.map +0 -1
  103. package/dist/chunk-77HLISG4.js.map +0 -1
  104. package/dist/chunk-WDD2ZUR3.js.map +0 -1
  105. package/dist/chunk-XXHC6AA3.js.map +0 -1
  106. package/dist/chunk-YHNTTMED.js.map +0 -1
  107. package/dist/cli/ap2-O3HJSS2E.js.map +0 -1
  108. package/dist/cli/chunk-3NVJAQRO.js +0 -119
  109. package/dist/cli/chunk-3NVJAQRO.js.map +0 -1
  110. package/dist/cli/chunk-55AI6CLW.js.map +0 -1
  111. package/dist/cli/chunk-66NTYSXI.js +0 -277
  112. package/dist/cli/chunk-66NTYSXI.js.map +0 -1
  113. package/dist/cli/chunk-B4QJV7OC.js +0 -8
  114. package/dist/cli/chunk-DKWO6LLX.js.map +0 -1
  115. package/dist/cli/chunk-FETTSOMT.js.map +0 -1
  116. package/dist/cli/chunk-FL4HPCD4.js.map +0 -1
  117. package/dist/cli/chunk-GBBG66O6.js.map +0 -1
  118. package/dist/cli/chunk-H7EBJ4I3.js +0 -53
  119. package/dist/cli/chunk-H7EBJ4I3.js.map +0 -1
  120. package/dist/cli/chunk-OETKXDGA.js.map +0 -1
  121. package/dist/cli/chunk-QUFFT5K3.js.map +0 -1
  122. package/dist/cli/chunk-S5TQXKQ7.js.map +0 -1
  123. package/dist/cli/chunk-TPC4EJLT.js +0 -11
  124. package/dist/cli/chunk-TPC4EJLT.js.map +0 -1
  125. package/dist/cli/chunk-XRG5UTIC.js.map +0 -1
  126. package/dist/cli/config-ODN4IEMZ.js +0 -13
  127. package/dist/cli/mcp-G2D2Z77G.js.map +0 -1
  128. package/dist/cli/payment-providers-7RIIZ5OF.js +0 -6
  129. package/dist/cli/provider-ARV3VAQ7.js.map +0 -1
  130. package/dist/cli/receipts-HLQ7D722.js +0 -9
  131. package/dist/cli/run-BHODKC6H.js.map +0 -1
  132. package/dist/cli/x402-LHW2YQ6W.js.map +0 -1
  133. package/dist/networks-DDHYJLcg.d.ts +0 -39
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/payments/x402/provider/bazaar.ts","../../src/payments/x402/dev-key-guard.ts","../../src/payments/x402/guardrails.ts","../../src/payments/x402/options.ts"],"names":["invalid"],"mappings":";;;;;AAYO,IAAM,oBAAA,GAAuB;AAG7B,IAAM,0BAAA,GAA6B,IAAA;AAGnC,IAAM,6BAAA,GAAgC,GAAA;AAoB7C,IAAM,mBAAA,GAAsB,8CAAA;AAUrB,SAAS,cAAA,CACd,QAAA,EACA,QAAA,EACA,QAAA,EACgB;AAChB,EAAA,IAAI,QAAA,CAAS,MAAA,KAAW,CAAA,EAAG,OAAO,EAAE,YAAY,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAChE,EAAA,MAAM,GAAA,GAAM,CAAC,MAAA,MAAoC;AAAA,IAC/C,YAAY,EAAC;AAAA,IACb,OAAA,EAAS,CAAC,EAAE,QAAA,EAAU,QAAQ;AAAA,GAChC,CAAA;AAEA,EAAA,MAAM,WAAA,GAAc,QAAA,CAAS,WAAA,IAAe,QAAA,CAAS,IAAA;AACrD,EAAA,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;AAAA,IACA,KAAA;AAAA,IACA,GAAI,MAAM,SAAA,KAAc,MAAA,GAAY,EAAE,SAAA,EAAW,KAAA,CAAM,SAAA,EAAU,GAAI,EAAC;AAAA,IACtE,GAAI,MAAM,YAAA,KAAiB,MAAA,GAAY,EAAE,YAAA,EAAc,KAAA,CAAM,YAAA,EAAa,GAAI,EAAC;AAAA,IAC/E,eAAe,KAAA,CAAM,aAAA;AAAA,IACrB,mBAAA,EAAqB;AAAA,GACvB;AACF","file":"chunk-5CH5VFC6.js","sourcesContent":["// Build HTTP and MCP Bazaar metadata without loading an SDK. Config loading\n// can use these helpers to report omitted resources and surfaces before startup.\nimport type { CommerceResource } from '../../../core';\nimport { validateBackendRequestShape } from '../../../core/execution/backend-request';\nimport {\n exampleObject,\n exampleValue,\n publishedInputSchema,\n} from '../../../core/execution/schema-example';\nimport { compileJsonSchema, unenforcedSchemaPart } from '../../../core/execution/validation';\n\n/** The extension's key in a challenge's `extensions` */\nexport const BAZAAR_EXTENSION_KEY = 'bazaar';\n\n/** Maximum serialized extension size accepted by `bazaarMetadata`, in bytes */\nexport const MAX_BAZAAR_EXTENSION_BYTES = 4096;\n\n/** Maximum description length accepted by `bazaarMetadata` */\nexport const MAX_BAZAAR_DESCRIPTION_LENGTH = 500;\n\n/** Experimental. One surface's `extensions.bazaar` value */\nexport interface BazaarExtension {\n readonly info: Readonly<Record<string, unknown>>;\n readonly schema: Readonly<Record<string, unknown>>;\n}\n\n/** Supported Bazaar metadata surfaces */\nexport type BazaarSurface = 'http' | 'mcp';\n\nexport interface BazaarMetadata {\n readonly extensions: Partial<Record<BazaarSurface, BazaarExtension>>;\n /** Omission reasons and affected surfaces, for config-load warnings */\n readonly omitted: readonly {\n readonly surfaces: readonly BazaarSurface[];\n readonly reason: string;\n }[];\n}\n\nconst JSON_SCHEMA_2020_12 = 'https://json-schema.org/draft/2020-12/schema';\n\n/**\n * Build Bazaar extensions for the requested surfaces. Metadata is omitted\n * unless the generated example passes input schema and backend request shape\n * checks, and the schema passes checks for supported keywords and valid values.\n * These checks avoid publishing examples the gateway rejects before pricing\n * or malformed schemas a facilitator cannot compile. `mimeType` is the\n * resource's declared media type; an omitted value is treated as JSON.\n */\nexport function bazaarMetadata(\n resource: CommerceResource,\n surfaces: readonly BazaarSurface[],\n mimeType?: string,\n): BazaarMetadata {\n if (surfaces.length === 0) return { extensions: {}, omitted: [] };\n const all = (reason: string): BazaarMetadata => ({\n extensions: {},\n omitted: [{ surfaces, reason }],\n });\n\n const description = resource.description ?? resource.name;\n if (description.length > MAX_BAZAAR_DESCRIPTION_LENGTH) {\n return all(\n `its description is longer than ${MAX_BAZAAR_DESCRIPTION_LENGTH} characters, which the CDP facilitator refuses`,\n );\n }\n const schema = resource.inputSchema ?? {};\n const part = unenforcedSchemaPart(schema, 'input');\n if (part !== undefined) {\n return all(`its input schema cannot be published as is: ${part.path} ${part.message}`);\n }\n const example = exampleObject(schema);\n if (!compileJsonSchema(schema)(example).valid || !shapeAccepts(resource, example)) {\n return all('the example generated from its input schema fails the gateway input checks');\n }\n\n const built = {\n http: () => httpForm(resource, schema, example, mimeType),\n mcp: () => mcpForm(resource, description, example),\n };\n const extensions: Partial<Record<BazaarSurface, BazaarExtension>> = {};\n const oversized: BazaarSurface[] = [];\n for (const surface of surfaces) {\n const extension = built[surface]();\n if (Buffer.byteLength(JSON.stringify(extension)) > MAX_BAZAAR_EXTENSION_BYTES) {\n oversized.push(surface);\n } else {\n extensions[surface] = extension;\n }\n }\n return {\n extensions,\n omitted:\n oversized.length > 0\n ? [\n {\n surfaces: oversized,\n reason: `the extension exceeds ${MAX_BAZAAR_EXTENSION_BYTES} bytes`,\n },\n ]\n : [],\n };\n}\n\nfunction shapeAccepts(resource: CommerceResource, example: unknown): boolean {\n try {\n validateBackendRequestShape(resource.handler, example, {\n requestId: 'bazaar-example',\n resourceId: resource.id,\n });\n return true;\n } catch {\n return false;\n }\n}\n\n// Recognize JSON media types, including those with a `+json` syntax suffix\nconst JSON_MEDIA_TYPE = /^[^/;\\s]+\\/(?:[^;\\s]+\\+)?json\\s*(?:;|$)/i;\n\n// The invoke route takes a JSON body. Match the x402 SDK builder by publishing\n// `output` only when a JSON response example is available.\nfunction httpForm(\n resource: CommerceResource,\n schema: Record<string, unknown>,\n example: Record<string, unknown>,\n mimeType: string | undefined,\n): BazaarExtension {\n const output =\n mimeType === undefined || JSON_MEDIA_TYPE.test(mimeType)\n ? outputExample(resource.outputSchema)\n : undefined;\n return {\n info: {\n input: { type: 'http', method: 'POST', bodyType: 'json', body: example },\n ...(output !== undefined ? { output: { type: 'json', example: output } } : {}),\n },\n schema: {\n $schema: JSON_SCHEMA_2020_12,\n type: 'object',\n properties: {\n input: {\n type: 'object',\n properties: {\n type: { type: 'string', const: 'http' },\n method: { type: 'string', enum: ['POST'] },\n bodyType: { type: 'string', enum: ['json'] },\n body: schema,\n },\n required: ['type', 'method', 'bodyType', 'body'],\n additionalProperties: false,\n },\n ...(output !== undefined\n ? {\n output: {\n type: 'object',\n properties: { type: { type: 'string' }, example: resource.outputSchema },\n required: ['type'],\n },\n }\n : {}),\n },\n required: ['input'],\n },\n };\n}\n\n// A tool is keyed by its endpoint URL and `toolName`, the resource id\nfunction mcpForm(\n resource: CommerceResource,\n description: string,\n example: Record<string, unknown>,\n): BazaarExtension {\n return {\n info: {\n input: {\n type: 'mcp',\n toolName: resource.id,\n description,\n inputSchema: publishedInputSchema(resource.inputSchema),\n example,\n },\n },\n schema: {\n $schema: JSON_SCHEMA_2020_12,\n type: 'object',\n properties: {\n input: {\n type: 'object',\n properties: {\n type: { type: 'string', const: 'mcp' },\n toolName: { type: 'string' },\n description: { type: 'string' },\n inputSchema: { type: 'object' },\n example: { type: 'object' },\n },\n required: ['type', 'toolName', 'inputSchema'],\n additionalProperties: false,\n },\n },\n required: ['input'],\n },\n };\n}\n\n// Publish an output example only when its schema uses the supported subset\n// and local validation accepts it; runtime delivery does not validate output schemas\nfunction outputExample(schema: Record<string, unknown> | undefined): unknown {\n if (schema === undefined || unenforcedSchemaPart(schema) !== undefined) return undefined;\n const example = exampleValue(schema, 'output');\n return compileJsonSchema(schema)(example).valid ? example : undefined;\n}\n","/**\n * Rejects well-known Anvil keys and payment destinations when the RPC host\n * does not look local or private. Their private keys are published, so anyone\n * can spend what such an address receives on a public chain.\n *\n * The check uses the RPC hostname because the local chain shares Base\n * Sepolia's chain id. Both guards run at provider construction.\n */\nimport { CommerceError } from '../../core';\nimport { ANVIL_WELL_KNOWN_ACCOUNTS } from './local-chain/accounts';\n\nconst WELL_KNOWN_DEV_KEYS: ReadonlySet<string> = new Set(\n ANVIL_WELL_KNOWN_ACCOUNTS.map((a) => a.privateKey.toLowerCase()),\n);\n\nconst WELL_KNOWN_DEV_ADDRESSES: ReadonlySet<string> = new Set(\n ANVIL_WELL_KNOWN_ACCOUNTS.map((a) => a.address.toLowerCase()),\n);\n\n// `0x` plus 64 hex characters, the only shape `privateKeyToAccount` accepts\nconst PRIVATE_KEY_SHAPE = /^0x[0-9a-fA-F]{64}$/;\n\nexport function isWellKnownDevKey(privateKey: string): boolean {\n return WELL_KNOWN_DEV_KEYS.has(privateKey.toLowerCase());\n}\n\nexport function isWellKnownDevAddress(address: string): boolean {\n return WELL_KNOWN_DEV_ADDRESSES.has(address.toLowerCase());\n}\n\n/**\n * True for loopback addresses, RFC 1918 private ranges, and bare (dot-free)\n * hostnames, such as the compose service name \"anvil\".\n *\n * Bare hostnames are treated as local without resolving them. Operators must\n * point them at a private chain.\n */\nexport function isLikelyLocalOrPrivateHost(hostname: string): boolean {\n const h = hostname.toLowerCase().replace(/^\\[|\\]$/g, '');\n if (h === 'localhost' || h === '::1') return true;\n if (/^127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/.test(h)) return true;\n if (/^10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/.test(h)) return true;\n if (/^192\\.168\\.\\d{1,3}\\.\\d{1,3}$/.test(h)) return true;\n if (/^172\\.(1[6-9]|2\\d|3[01])\\.\\d{1,3}\\.\\d{1,3}$/.test(h)) return true;\n if (!h.includes('.') && !h.includes(':')) return true; // bare hostname\n return false;\n}\n\nfunction parseHostnameOrThrow(rpcUrl: string): string {\n try {\n return new URL(rpcUrl).hostname;\n } catch (cause) {\n // Never the URL itself: RPC providers commonly put an API key in the path,\n // and this message reaches startup output and CI logs\n throw new CommerceError('CONFIG_INVALID', 'x402 provider: rpcUrl is not a valid URL', {\n cause,\n });\n }\n}\n\n/** Origin only, for diagnostics: RPC URLs often carry an API key in the path or query */\nexport function describeRpc(rpcUrl: string): string {\n try {\n return new URL(rpcUrl).origin;\n } catch {\n return '[unparseable rpcUrl]';\n }\n}\n\n/**\n * Throws CONFIG_INVALID if `signerPrivateKey` is not shaped like a private key,\n * or if it is a well-known dev key and the RPC is not local.\n *\n * The shape check runs first, so a truncated key is reported as malformed\n * instead of passing as \"not a dev key\".\n */\nexport function assertDevKeyIsLocalOnly(rpcUrl: string, signerPrivateKey: string): void {\n if (!PRIVATE_KEY_SHAPE.test(signerPrivateKey)) {\n throw new CommerceError(\n 'CONFIG_INVALID',\n 'x402 provider: facilitator.signerPrivateKey is not a well-formed private key ' +\n '(expected \"0x\" followed by exactly 64 hex characters).',\n );\n }\n\n if (!isWellKnownDevKey(signerPrivateKey)) return; // the operator's own key\n\n const hostname = parseHostnameOrThrow(rpcUrl);\n\n if (!isLikelyLocalOrPrivateHost(hostname)) {\n throw new CommerceError(\n 'CONFIG_INVALID',\n 'x402 provider: facilitator.signerPrivateKey is a well-known Anvil development key, but rpcUrl ' +\n `${describeRpc(rpcUrl)} does not look like a local/private chain. A public dev key must never sign against ` +\n 'a public network: it is instantly drainable and can grief real settlements via nonce exhaustion. ' +\n 'Use a real facilitator key for any non-local RPC, or point rpcUrl at your local/dev chain.',\n );\n }\n}\n\n/**\n * Throws CONFIG_INVALID if `payTo` is a well-known Anvil address and `rpcUrl`\n * does not look local or private.\n *\n * Guards the receiving side, in every facilitator mode. `agent-commerce init`\n * defaults `payTo` to a well-known address for the local demo, and on a real\n * network that default sends every payment where anyone can sweep it.\n */\nexport function assertPayToIsNotDevAddress(rpcUrl: string, payTo: string): void {\n if (!isWellKnownDevAddress(payTo)) return;\n\n const hostname = parseHostnameOrThrow(rpcUrl);\n\n if (!isLikelyLocalOrPrivateHost(hostname)) {\n throw new CommerceError(\n 'CONFIG_INVALID',\n `x402 provider: \"payTo\" (${payTo}) is a well-known Anvil development address, but rpcUrl ` +\n `${describeRpc(rpcUrl)} does not look like a local/private chain. The private key behind that address ` +\n 'is public knowledge, so any revenue settled to it is immediately spendable by anyone. Set ' +\n '\"payTo\" to your own merchant wallet for any non-local RPC, or point rpcUrl at your ' +\n 'local/dev chain.',\n );\n }\n}\n","/**\n * What must hold before this gateway may settle a payment on the configured\n * network. Two callers share these checks: the provider runs them at\n * construction, so a library consumer who skips our config loader still gets\n * them, and the config loader runs them, so `validate` and `doctor` report\n * them too.\n *\n * Both run before any request, because a failure found in `settle()` would\n * come after the pipeline reserved the buyer's replay key.\n *\n * Imports no peer (no viem, no `@x402/*`), so the CLI can load it.\n */\nimport { CommerceError } from '../../core';\nimport { isBurnAddress, sameAddress } from './addresses';\nimport { isLikelyLocalOrPrivateHost, isWellKnownDevAddress } from './dev-key-guard';\nimport {\n type CustomNetworks,\n type DeploymentMode,\n LOCAL_CHAIN_ID,\n requireX402Network,\n resolveDeploymentMode,\n type X402Network,\n} from './networks';\n\n/**\n * How the gateway authenticates to a remote facilitator.\n *\n * - `none`: send no credential; use it when the facilitator accepts\n * anonymous requests.\n * - `bearer`: send a static token; no extra peer package is needed.\n * - `cdp`: Coinbase Developer Platform. The gateway signs a fresh JWT per\n * request with the API key; no extra peer package is needed.\n *\n * Any other auth type is refused at config load.\n */\nexport type FacilitatorAuth =\n | { readonly type: 'none' }\n | { readonly type: 'bearer'; readonly token: string }\n | { readonly type: 'cdp'; readonly apiKeyId: string; readonly apiKeySecret: string };\n\nexport type X402FacilitatorConfig =\n | { readonly mode: 'local'; readonly signerPrivateKey: string }\n | { readonly mode: 'remote'; readonly url: string; readonly auth: FacilitatorAuth };\n\nexport interface X402DeploymentInput {\n readonly network: string;\n readonly payTo: string;\n readonly asset: string;\n /** EIP-712 domain of the asset, as the token itself reports it */\n readonly assetName?: string;\n readonly assetVersion?: string;\n readonly facilitator: X402FacilitatorConfig;\n /** Must be `true` before anything settles on a mainnet */\n readonly allowMainnet?: boolean;\n /**\n * Must be `true` on mainnet when facilitator auth is `none`. A separate\n * decision from `allowMainnet`: it accepts settling without an account at\n * the facilitator, under its anonymous-access limits.\n */\n readonly allowUnauthenticatedFacilitator?: boolean;\n /**\n * Allow other tokens on built-in EVM networks with explicit metadata.\n * MPP config leaves this unset; Solana and NEAR still require USDC.\n */\n readonly allowOtherEvmToken?: boolean;\n /** Error-path prefix, `payments.x402` by default */\n readonly configPath?: string;\n /** Settlement-recipient field named in errors, `payTo` by default */\n readonly payToField?: string;\n /** EVM networks declared under `payments.x402.networks` */\n readonly customNetworks?: CustomNetworks;\n}\n\nexport interface X402Deployment {\n readonly profile: X402Network;\n readonly mode: DeploymentMode;\n}\n\nconst BASE_SEPOLIA = 'eip155:84532';\n\nfunction invalid(message: string, path: string): CommerceError {\n return new CommerceError('CONFIG_INVALID', message, { details: { path } });\n}\n\n/**\n * Resolves the deployment and refuses the combinations that could move real\n * money by accident. The network must resolve first; the other checks are\n * independent.\n */\nexport function resolveX402Deployment(input: X402DeploymentInput): X402Deployment {\n const at = input.configPath ?? 'payments.x402';\n const payTo = input.payToField ?? 'payTo';\n const profile = requireX402Network(input.network, `${at}.network`, input.customNetworks);\n const mode = resolveDeploymentMode(profile);\n\n // Local mode keeps a gas-paying key in the gateway process. A compromise\n // could expose that key, so mainnet requires a remote facilitator.\n if (profile.kind === 'mainnet' && input.facilitator.mode === 'local') {\n throw invalid(\n `${at}: network \"${profile.id}\" (${profile.displayName}) is a mainnet and cannot be served by facilitator.mode \"local\". A mainnet deployment must settle through a remote facilitator.`,\n `${at}.facilitator.mode`,\n );\n }\n // The in-process facilitator signs with a client built for the Anvil chain\n // id, so on any other chain every settlement would fail\n if (input.facilitator.mode === 'local' && mode !== 'local') {\n throw invalid(\n profile.id === BASE_SEPOLIA\n ? `${at}: the local Anvil chain is eip155:${LOCAL_CHAIN_ID}, Anvil's default chain id; \"${BASE_SEPOLIA}\" is public Base Sepolia. Set ${at}.network to eip155:${LOCAL_CHAIN_ID}, start Anvil with its default chain id and redeploy the local contracts (npm run chain:start, npm run chain:deploy).`\n : `${at}: facilitator.mode \"local\" serves the local Anvil chain (eip155:${LOCAL_CHAIN_ID}) only, not \"${profile.id}\" (${profile.displayName}). Use a remote facilitator.`,\n `${at}.facilitator.mode`,\n );\n }\n\n if (mode === 'mainnet' && input.allowMainnet !== true) {\n throw invalid(\n `${at}: network \"${profile.id}\" (${profile.displayName}) settles real funds. Set ${at}.allowMainnet: true to acknowledge this explicitly - it is never the default.`,\n `${at}.allowMainnet`,\n );\n }\n\n if (input.facilitator.mode === 'remote') {\n assertFacilitatorUrlIsSafe(input.facilitator.url, mode, at);\n // CDP JWTs bind requests to CDP's host and route, so reject other URLs\n if (input.facilitator.auth.type === 'cdp' && !isCdpFacilitatorUrl(input.facilitator.url)) {\n throw invalid(\n `${at}: facilitator.auth.type \"cdp\" signs requests for ${CDP_FACILITATOR_URL} only, so facilitator ${describeOrigin(input.facilitator.url)} cannot accept its credential. Set facilitator.url to ${CDP_FACILITATOR_URL}, or use auth.type \"bearer\" or \"none\".`,\n `${at}.facilitator.url`,\n );\n }\n // The authorization fixes recipient, amount and chain, so a facilitator\n // cannot redirect funds. A credential adds an account: rate limits, terms\n // and support. On mainnet, going without one is an explicit choice.\n if (\n mode === 'mainnet' &&\n input.facilitator.auth.type === 'none' &&\n input.allowUnauthenticatedFacilitator !== true\n ) {\n throw invalid(\n `${at}: no credential is configured for facilitator ${describeOrigin(input.facilitator.url)} on mainnet. Set ${at}.allowUnauthenticatedFacilitator: true to accept anonymous access and the facilitator's limits, or configure facilitator.auth.`,\n `${at}.allowUnauthenticatedFacilitator`,\n );\n }\n // A blank credential reaches the facilitator as \"unauthenticated\" and fails\n // every payment after the buyer signed. `${VAR:- }` resolving to whitespace\n // is the usual cause.\n for (const [field, value] of credentialFields(input.facilitator.auth)) {\n if (value.trim() === '') {\n throw invalid(\n `${at}: facilitator.auth.type is \"${input.facilitator.auth.type}\" but ${field} is empty. An empty credential is refused rather than sent.`,\n `${at}.facilitator.auth.${field}`,\n );\n }\n }\n }\n\n // The config loader's address check refuses this too; repeated here for a\n // library consumer who calls `createX402PaymentProvider` without it\n if (isBurnAddress(profile, input.payTo)) {\n throw invalid(\n `${at}: \"${payTo}\" is the zero address. Every payment settled there is destroyed.`,\n `${at}.${payTo}`,\n );\n }\n\n // Anyone can spend from a well-known Anvil address. `dev-key-guard` refuses\n // one behind a public RPC; this refuses one on any non-local deployment,\n // whose RPC host says nothing about where a remote facilitator settles.\n if (mode !== 'local' && isWellKnownDevAddress(input.payTo)) {\n throw invalid(\n `${at}: \"${payTo}\" (${input.payTo}) is a well-known Anvil development address and this is a ${mode} deployment. Anyone can spend what settles there. Set ${payTo} to your own merchant wallet.`,\n `${at}.${payTo}`,\n );\n }\n\n // Public built-ins require USDC unless the caller allows another EVM token.\n // Local and declared networks have no default asset.\n const canonical = profile.canonicalAsset;\n if (canonical) {\n if (!sameAddress(profile, input.asset, canonical.address)) {\n if (input.allowOtherEvmToken !== true || profile.family !== 'evm') {\n const rule =\n input.allowOtherEvmToken === true\n ? `Only an EVM network accepts another token; ${profile.displayName} settles only in its ${canonical.symbol}.`\n : `A built-in network settles only in its ${canonical.symbol}.`;\n throw invalid(\n `${at}: asset ${input.asset} is not ${canonical.symbol} on ${profile.displayName} (expected ${canonical.address}). ${rule}`,\n `${at}.asset`,\n );\n }\n } else {\n // Catch USDC domain mismatches before accepting payments; a wrong name\n // can fail with `invalid_exact_evm_token_name_mismatch`\n const domain = 'name' in canonical ? canonical : undefined;\n if (domain && input.assetName !== undefined && input.assetName !== domain.name) {\n throw invalid(\n `${at}: assetName \"${input.assetName}\" is not the EIP-712 domain name ${canonical.symbol} reports on ${profile.displayName} (expected \"${domain.name}\"). Every payment would be refused after the buyer signed.`,\n `${at}.assetName`,\n );\n }\n if (domain && input.assetVersion !== undefined && input.assetVersion !== domain.version) {\n throw invalid(\n `${at}: assetVersion \"${input.assetVersion}\" is not the EIP-712 domain version ${canonical.symbol} reports on ${profile.displayName} (expected \"${domain.version}\").`,\n `${at}.assetVersion`,\n );\n }\n }\n }\n\n return { profile, mode };\n}\n\n/**\n * A facilitator sees every payment authorization this gateway handles. Plain\n * HTTP puts those on the wire in the clear and lets anyone in the path rewrite\n * a settlement result, so it is allowed only to a local or private host, and\n * never on a mainnet.\n */\nfunction assertFacilitatorUrlIsSafe(url: string, mode: DeploymentMode, at: string): void {\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch (cause) {\n throw new CommerceError('CONFIG_INVALID', `${at}: facilitator.url is not a valid URL`, {\n cause,\n details: { path: `${at}.facilitator.url` },\n });\n }\n // The SDK appends `/verify` to the URL string, which would land the route\n // inside a query or fragment. The raw test also catches an empty `?` or `#`.\n if (/[?#]/.test(url)) {\n throw invalid(\n `${at}: facilitator ${describeOrigin(url)} has a query string or fragment in facilitator.url. The x402 client appends its routes to the URL, so they would land inside it. Remove it; send a credential with facilitator.auth instead.`,\n `${at}.facilitator.url`,\n );\n }\n\n if (parsed.protocol === 'https:') return;\n if (parsed.protocol !== 'http:') {\n throw invalid(\n `${at}: facilitator ${describeOrigin(url)} must be reached over https (or http on a local/private host); got \"${parsed.protocol}//\"`,\n `${at}.facilitator.url`,\n );\n }\n if (mode !== 'mainnet' && isLikelyLocalOrPrivateHost(parsed.hostname)) return;\n\n // The origin, never the whole URL: the path can carry a tenant or an API\n // key, and this message reaches `validate`, `doctor`, startup output and CI logs\n throw invalid(\n `${at}: facilitator ${describeOrigin(url)} is reached over plain HTTP. Payment authorizations and settlement results would travel unencrypted. Use https, or point at a local/private host on a non-mainnet deployment.`,\n `${at}.facilitator.url`,\n );\n}\n\n/** The facilitator URL that `auth.type: cdp` signs its JWTs for */\nexport const CDP_FACILITATOR_URL = 'https://api.cdp.coinbase.com/platform/v2/x402';\n\n// The SDK client strips trailing slashes before appending its route\nfunction isCdpFacilitatorUrl(url: string): boolean {\n try {\n const parsed = new URL(url);\n const expected = new URL(CDP_FACILITATOR_URL);\n return (\n parsed.origin === expected.origin && parsed.pathname.replace(/\\/+$/, '') === expected.pathname\n );\n } catch {\n return false;\n }\n}\n\n// Origin only: a facilitator URL can carry a tenant path or an API key\nfunction describeOrigin(url: string): string {\n try {\n return new URL(url).origin;\n } catch {\n return '[unparseable facilitator.url]';\n }\n}\n\n// The secret-bearing fields of an auth block, for emptiness checks only. Never logged\nfunction credentialFields(auth: FacilitatorAuth): readonly (readonly [string, string])[] {\n switch (auth.type) {\n case 'bearer':\n return [['token', auth.token]];\n case 'cdp':\n return [\n ['apiKeyId', auth.apiKeyId],\n ['apiKeySecret', auth.apiKeySecret],\n ];\n default:\n return [];\n }\n}\n","/**\n * Resolves an x402 option into offer terms at config load, so `validate`\n * reports invalid options before startup. This module uses no SDK.\n *\n * Omitted assets use `canonicalAsset`. Overrides for the default token must\n * match its metadata; another token needs its own, including the EIP-712 domain\n * on EVM.\n */\nimport { CommerceError } from '../../core';\nimport { isBurnAddress, normalizeAddress, sameAddress } from './addresses';\nimport { type CustomNetworks, requireX402Network, type X402Network } from './networks';\n\nexport interface X402OptionInput {\n readonly scheme?: string;\n readonly network: string;\n readonly payTo: string;\n readonly asset?: string;\n readonly assetName?: string;\n readonly assetVersion?: string;\n readonly assetDecimals?: number;\n /** `eip3009` (the default) or `permit2`; EVM only */\n readonly assetTransferMethod?: string;\n}\n\nexport interface ResolvedX402Option {\n readonly scheme: 'exact';\n readonly network: X402Network;\n readonly payTo: string;\n readonly asset: string;\n /** EIP-712 domain; EVM only */\n readonly assetName?: string;\n readonly assetVersion?: string;\n readonly assetDecimals: number;\n /**\n * Default token symbol when `asset` is omitted; resource prices must use\n * this symbol or USD\n */\n readonly defaultAssetSymbol?: string;\n /** How the buyer authorizes the transfer; always `eip3009` off EVM */\n readonly assetTransferMethod: X402AssetTransferMethod;\n}\n\n/**\n * Names health components by network, asset and payee for discovery matching.\n * Lowercase EVM addresses so case variants identify the same offer.\n */\nexport function x402OfferName(offer: {\n readonly network: string;\n readonly asset: string;\n readonly payTo: string;\n}): string {\n const evm = offer.network.startsWith('eip155:');\n const address = (value: string) => (evm ? value.toLowerCase() : value);\n return `${offer.network} ${address(offer.asset)} ${address(offer.payTo)}`;\n}\n\n/** EIP-3009 `transferWithAuthorization`, or Permit2 with a prior token allowance */\nexport type X402AssetTransferMethod = 'eip3009' | 'permit2';\n\n// Incorrect EIP-712 domain values invalidate the buyer's signature\nconst FIELD_MEANINGS = {\n assetName: 'EIP-712 domain name',\n assetVersion: 'EIP-712 domain version',\n assetDecimals: 'decimals',\n} as const;\n\nconst ADDRESS_SHAPES = {\n evm: '\"0x\" followed by 40 hex characters',\n svm: 'a base58 public key of 32 bytes',\n near: 'a NEAR account ID: 2 to 64 lowercase characters, digits and single \"-\", \"_\" or \".\" separators',\n} as const;\n\nfunction invalid(message: string, path: string): CommerceError {\n return new CommerceError('CONFIG_INVALID', message, { details: { path } });\n}\n\nexport function resolveX402Option(\n input: X402OptionInput,\n path: string,\n custom?: CustomNetworks,\n): ResolvedX402Option {\n if (input.scheme !== undefined && input.scheme !== 'exact') {\n throw invalid(\n `${path}.scheme: \"${input.scheme}\" is not supported; the only x402 scheme is \"exact\"`,\n `${path}.scheme`,\n );\n }\n const network = requireX402Network(input.network, `${path}.network`, custom);\n const address = (field: 'payTo' | 'asset', value: string): string => {\n const wire = normalizeAddress(network, value);\n if (wire === undefined) {\n throw invalid(\n // The value is not echoed: a swapped variable could put a key here\n `${path}.${field} is not a plausible address on ${network.displayName} (expected ${ADDRESS_SHAPES[network.family]})`,\n `${path}.${field}`,\n );\n }\n return wire;\n };\n\n const payTo = address('payTo', input.payTo);\n if (isBurnAddress(network, payTo)) {\n throw invalid(\n `${path}.payTo is the zero address of ${network.displayName}. Every payment settled there is destroyed.`,\n `${path}.payTo`,\n );\n }\n\n const method = input.assetTransferMethod ?? 'eip3009';\n if (method !== 'eip3009' && method !== 'permit2') {\n throw invalid(\n `${path}.assetTransferMethod: \"${method}\" is not supported; use \"eip3009\" or \"permit2\"`,\n `${path}.assetTransferMethod`,\n );\n }\n if (network.family !== 'evm' && input.assetTransferMethod !== undefined) {\n throw invalid(\n `${path}.assetTransferMethod applies to EVM networks only, not to ${network.displayName}`,\n `${path}.assetTransferMethod`,\n );\n }\n\n if (network.family !== 'evm') {\n for (const field of ['assetName', 'assetVersion'] as const) {\n if (input[field] !== undefined) {\n throw invalid(\n `${path}.${field}: an EIP-712 domain applies to EVM tokens only, not to ${network.displayName}`,\n `${path}.${field}`,\n );\n }\n }\n }\n\n const canonical = network.canonicalAsset;\n const domain = canonical && 'name' in canonical ? canonical : undefined;\n\n const asset = input.asset !== undefined ? address('asset', input.asset) : undefined;\n if (asset !== undefined && isBurnAddress(network, asset)) {\n throw invalid(`${path}.asset must not be the zero address`, `${path}.asset`);\n }\n\n // The default asset applies when the option names none or names it exactly\n if (canonical && (asset === undefined || sameAddress(network, asset, canonical.address))) {\n const expected = {\n assetName: domain?.name,\n assetVersion: domain?.version,\n assetDecimals: canonical.decimals,\n };\n for (const field of ['assetName', 'assetVersion', 'assetDecimals'] as const) {\n const given = input[field];\n if (given !== undefined && given !== expected[field]) {\n throw invalid(\n `${path}.${field} does not match ${canonical.symbol} on ${network.displayName}, which reports ${FIELD_MEANINGS[field]} ${JSON.stringify(expected[field])}. Remove ${field}, or set asset to the token it describes.`,\n `${path}.${field}`,\n );\n }\n }\n return {\n scheme: 'exact',\n network,\n payTo,\n asset: asset ?? canonical.address,\n ...(domain ? { assetName: domain.name, assetVersion: domain.version } : {}),\n assetDecimals: canonical.decimals,\n defaultAssetSymbol: canonical.symbol,\n assetTransferMethod: method,\n };\n }\n\n // Another token: nothing about it can be borrowed from the default. The\n // token's EIP-712 domain matters to EIP-3009 only: a Permit2 buyer signs\n // Permit2's own domain.\n const required =\n network.family === 'evm' && method === 'eip3009'\n ? (['asset', 'assetName', 'assetVersion', 'assetDecimals'] as const)\n : (['asset', 'assetDecimals'] as const);\n const missing = required.filter((field) => input[field] === undefined);\n if (asset === undefined || missing.length > 0) {\n throw invalid(\n canonical\n ? `${path}: a token other than ${canonical.symbol} on ${network.displayName} needs ${missing.join(', ')}`\n : `${path}: ${network.displayName} has no default asset, so the option needs ${missing.join(', ')}`,\n `${path}.${missing[0] ?? 'asset'}`,\n );\n }\n return {\n scheme: 'exact',\n network,\n payTo,\n asset,\n ...(input.assetName !== undefined ? { assetName: input.assetName } : {}),\n ...(input.assetVersion !== undefined ? { assetVersion: input.assetVersion } : {}),\n assetDecimals: input.assetDecimals as number,\n assetTransferMethod: method,\n };\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { CommerceError } from './chunk-C5YISPT6.js';
2
+
3
+ // src/support/claims.ts
4
+ function descriptorStatus(record) {
5
+ return record.status === "supported" ? "stable" : "experimental";
6
+ }
7
+ function exclusionNames(record) {
8
+ return record.exclusions.map((exclusion) => exclusion.name);
9
+ }
10
+ function featureStatus(record, name) {
11
+ const feature = record.features.find((candidate) => candidate.name === name);
12
+ if (feature === void 0) {
13
+ throw new CommerceError("INTERNAL_ERROR", `support record has no feature "${name}"`);
14
+ }
15
+ return feature.status;
16
+ }
17
+
18
+ export { descriptorStatus, exclusionNames, featureStatus };
19
+ //# sourceMappingURL=chunk-GISJ73ML.js.map
20
+ //# sourceMappingURL=chunk-GISJ73ML.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/support/claims.ts"],"names":[],"mappings":";;;AAkBO,SAAS,iBAAiB,MAAA,EAAkD;AACjF,EAAA,OAAO,MAAA,CAAO,MAAA,KAAW,WAAA,GAAc,QAAA,GAAW,cAAA;AACpD;AAGO,SAAS,eAAe,MAAA,EAA0C;AACvE,EAAA,OAAO,OAAO,UAAA,CAAW,GAAA,CAAI,CAAC,SAAA,KAAc,UAAU,IAAI,CAAA;AAC5D;AAEO,SAAS,aAAA,CAAc,QAAuB,IAAA,EAA6B;AAChF,EAAA,MAAM,OAAA,GAAU,OAAO,QAAA,CAAS,IAAA,CAAK,CAAC,SAAA,KAAc,SAAA,CAAU,SAAS,IAAI,CAAA;AAC3E,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,MAAM,IAAI,aAAA,CAAc,gBAAA,EAAkB,CAAA,+BAAA,EAAkC,IAAI,CAAA,CAAA,CAAG,CAAA;AAAA,EACrF;AACA,EAAA,OAAO,OAAA,CAAQ,MAAA;AACjB","file":"chunk-GISJ73ML.js","sourcesContent":["/**\n * Read support status, feature status and exclusion names for descriptors,\n * discovery and `doctor`, without loading external packages.\n * `scripts/support-record.ts` validates records in tests and tooling; runtime\n * readers trust them.\n */\nimport { CommerceError } from '../core/errors';\n\n/** The fields of a support record that runtime code reads */\nexport interface SupportClaims {\n readonly status: string;\n readonly features: readonly { readonly name: string; readonly status: string }[];\n readonly exclusions: readonly { readonly name: string }[];\n}\n\nexport type FeatureStatus = 'supported' | 'experimental' | 'partial';\n\n/** Maps `supported` to `stable` without changing the descriptor's status union */\nexport function descriptorStatus(record: SupportClaims): 'stable' | 'experimental' {\n return record.status === 'supported' ? 'stable' : 'experimental';\n}\n\n/** The strings a descriptor publishes in `unsupported` */\nexport function exclusionNames(record: SupportClaims): readonly string[] {\n return record.exclusions.map((exclusion) => exclusion.name);\n}\n\nexport function featureStatus(record: SupportClaims, name: string): FeatureStatus {\n const feature = record.features.find((candidate) => candidate.name === name);\n if (feature === undefined) {\n throw new CommerceError('INTERNAL_ERROR', `support record has no feature \"${name}\"`);\n }\n return feature.status as FeatureStatus;\n}\n"]}
@@ -0,0 +1,435 @@
1
+ // src/support/a2a.json
2
+ var a2a_default = {
3
+ name: "a2a",
4
+ kind: "protocol",
5
+ title: "A2A",
6
+ status: "supported",
7
+ role: "Transport that carries x402 and MPP payments in `SendMessage`, including through the x402 extension.",
8
+ subset: "Agent Card, `SendMessage` with `returnImmediately`, `GetTask`, `ListTasks`, `CancelTask` and the paid flow; the x402 extension is experimental",
9
+ spec: {
10
+ revisions: ["1.0.1"],
11
+ display: "v1.0.1; negotiation `1.0`; `JSONRPC` binding",
12
+ source: {
13
+ repo: "a2aproject/A2A",
14
+ commit: "3303592588e388e62e0f69f701af531d2f4e3991"
15
+ },
16
+ stable: true,
17
+ statement: "the first stable, production-ready version",
18
+ checked: "2026-11-17"
19
+ },
20
+ packages: [{ name: "@a2a-js/sdk", use: "test" }],
21
+ artifacts: [],
22
+ features: [
23
+ { name: "agent-card", status: "supported" },
24
+ { name: "jsonrpc", status: "supported" },
25
+ { name: "SendMessage", status: "supported" },
26
+ { name: "GetTask", status: "supported" },
27
+ { name: "ListTasks", status: "supported" },
28
+ { name: "CancelTask", status: "supported" },
29
+ { name: "returnImmediately", status: "supported" },
30
+ { name: "x402-extension", status: "experimental" }
31
+ ],
32
+ exclusions: [
33
+ { name: "SendStreamingMessage" },
34
+ { name: "SubscribeToTask" },
35
+ { name: "CreateTaskPushNotificationConfig" },
36
+ { name: "GetTaskPushNotificationConfig" },
37
+ { name: "ListTaskPushNotificationConfigs" },
38
+ { name: "DeleteTaskPushNotificationConfig" },
39
+ { name: "GetExtendedAgentCard" },
40
+ { name: "HTTP+JSON/REST binding" },
41
+ { name: "gRPC binding" },
42
+ { name: "SSE" },
43
+ {
44
+ name: "resuming a background task after a restart",
45
+ note: "A task the gateway stopped in reads as failed; any payment is in the gateway records."
46
+ },
47
+ { name: "task resumption other than an x402 extension payment" },
48
+ { name: "push notifications" },
49
+ { name: "multi-turn conversational continuation" },
50
+ {
51
+ name: "client-chosen contextId",
52
+ note: "A `contextId` without a task gets `UnsupportedOperationError`; each new task opens a context the gateway generates."
53
+ },
54
+ {
55
+ name: "listing tasks across contexts",
56
+ note: "`ListTasks` reads only the given `contextId`; without one, the page is empty."
57
+ },
58
+ {
59
+ name: "task history",
60
+ note: "Tasks omit `history`; `historyLength` is validated but has nothing to cap."
61
+ },
62
+ { name: "non-empty tenant" },
63
+ { name: "text parts" },
64
+ { name: "file and URL parts (including inline bytes)" },
65
+ { name: "multi-part messages" },
66
+ { name: "message roles other than ROLE_USER" },
67
+ { name: "authenticated extended agent cards" },
68
+ { name: "A2A authentication schemes" },
69
+ { name: "artifact types beyond Agent Commerce outcome data" },
70
+ {
71
+ name: "tasks across gateway instances",
72
+ note: "Instances with separate receipt stores cannot read, cancel or pay each other's tasks."
73
+ }
74
+ ],
75
+ deviations: [
76
+ {
77
+ summary: "A `ListTasks` page with no matching task has an empty `tasks` array. The proto marks `tasks` REQUIRED, and \xA75.7 requires a REQUIRED array to hold an element, but an empty result has none to return.",
78
+ spec: "A2A 1.0.1 \xA75.7; `ListTasksResponse.tasks`",
79
+ tests: ["tests/conformance/a2a/tasks.test.ts"]
80
+ }
81
+ ],
82
+ conformance: {
83
+ suite: "Our tests against the A2A 1.0.1 specification, and the A2A TCK at MUST level in CI.",
84
+ tests: [
85
+ "tests/conformance/a2a/agent-card.test.ts",
86
+ "tests/conformance/a2a/errors.test.ts",
87
+ "tests/conformance/a2a/free-resource.test.ts",
88
+ "tests/conformance/a2a/paid-resource.test.ts",
89
+ "tests/conformance/a2a/params.test.ts",
90
+ "tests/conformance/a2a/protocol-version.test.ts",
91
+ "tests/conformance/a2a/tasks.test.ts"
92
+ ],
93
+ skipped: [],
94
+ upstream: {
95
+ repo: "a2aproject/a2a-tck",
96
+ commit: "5e6f37c2d38eb3d7684686243c34d365c83df49b",
97
+ command: "run_tck.py --sut-host http://127.0.0.1:8099 --transport jsonrpc --level must",
98
+ workflow: ".github/workflows/ci.yml",
99
+ job: "tck",
100
+ results: [
101
+ {
102
+ test: "tests.compatibility.core_operations.test_requirements::test_must_requirement[CORE-SEND-001-jsonrpc]",
103
+ id: "CORE-SEND-001",
104
+ outcome: "failed",
105
+ message: "Text parts are not supported",
106
+ reason: "The test sends a text part, and the Agent Card declares only application/json input",
107
+ upstream: "Report drafted, not filed"
108
+ },
109
+ {
110
+ test: "tests.compatibility.core_operations.test_requirements::test_must_requirement[CORE-EXECUTION-MODE-001-jsonrpc]",
111
+ id: "CORE-EXECUTION-MODE-001",
112
+ outcome: "failed",
113
+ message: "Text parts are not supported",
114
+ reason: "The test sends a text part, and the Agent Card declares only application/json input",
115
+ upstream: "Report drafted, not filed"
116
+ },
117
+ {
118
+ test: "tests.compatibility.core_operations.test_requirements::test_must_requirement[CORE-EXECUTION-MODE-002-jsonrpc]",
119
+ id: "CORE-EXECUTION-MODE-002",
120
+ outcome: "failed",
121
+ message: "Text parts are not supported",
122
+ reason: "The test sends a text part, and the Agent Card declares only application/json input",
123
+ upstream: "Report drafted, not filed"
124
+ },
125
+ {
126
+ test: "tests.compatibility.core_operations.test_requirements::test_must_requirement[CORE-MULTI-001a-jsonrpc]",
127
+ id: "CORE-MULTI-001a",
128
+ outcome: "failed",
129
+ message: "Text parts are not supported",
130
+ reason: "The test sends a text part, and the Agent Card declares only application/json input",
131
+ upstream: "Report drafted, not filed"
132
+ },
133
+ {
134
+ test: "tests.compatibility.core_operations.test_requirements::test_must_requirement[CORE-MULTI-003-jsonrpc]",
135
+ id: "CORE-MULTI-003",
136
+ outcome: "failed",
137
+ message: "Text parts are not supported",
138
+ reason: "The test sends a text part, and the Agent Card declares only application/json input",
139
+ upstream: "Report drafted, not filed"
140
+ },
141
+ {
142
+ test: "tests.compatibility.core_operations.test_requirements::test_must_requirement[CORE-MULTI-002a-jsonrpc]",
143
+ id: "CORE-MULTI-002a",
144
+ outcome: "failed",
145
+ message: "Multi-turn conversational continuation is not supported",
146
+ reason: "The adapter refuses the client contextId with -32004, as the requirement asks, but the requirement sets no expected error and the runner fails on any error. Its sample input also sends a text part.",
147
+ spec: "A2A 1.0.1 \xA73.4.1",
148
+ upstream: "Report drafted, not filed"
149
+ },
150
+ {
151
+ test: "tests.compatibility.core_operations.test_transport_behavior.TestJsonRpcFormat::test_response_validates_jsonrpc_envelope",
152
+ id: "JSONRPC-FMT-001",
153
+ outcome: "failed",
154
+ message: "Text parts are not supported",
155
+ reason: "The test sends a text part, and the Agent Card declares only application/json input",
156
+ upstream: "Report drafted, not filed"
157
+ },
158
+ {
159
+ test: "tests.compatibility.core_operations.test_artifacts.TestTextArtifact::test_task_has_text_artifact[jsonrpc]",
160
+ id: "DM-ART-001",
161
+ outcome: "skipped",
162
+ message: "send_message failed: Text parts are not supported",
163
+ reason: "The test creates its task with a text part, which the adapter refuses",
164
+ upstream: "Report drafted, not filed"
165
+ },
166
+ {
167
+ test: "tests.compatibility.core_operations.test_artifacts.TestFileArtifact::test_task_has_file_artifact[jsonrpc]",
168
+ id: "DM-ART-001",
169
+ outcome: "skipped",
170
+ message: "send_message failed: Text parts are not supported",
171
+ reason: "The test creates its task with a text part, which the adapter refuses",
172
+ upstream: "Report drafted, not filed"
173
+ },
174
+ {
175
+ test: "tests.compatibility.core_operations.test_artifacts.TestFileUrlArtifact::test_task_has_file_url_artifact[jsonrpc]",
176
+ id: "DM-ART-001",
177
+ outcome: "skipped",
178
+ message: "send_message failed: Text parts are not supported",
179
+ reason: "The test creates its task with a text part, which the adapter refuses",
180
+ upstream: "Report drafted, not filed"
181
+ },
182
+ {
183
+ test: "tests.compatibility.core_operations.test_artifacts.TestDataArtifact::test_task_has_data_artifact[jsonrpc]",
184
+ id: "DM-ART-001",
185
+ outcome: "skipped",
186
+ message: "send_message failed: Text parts are not supported",
187
+ reason: "The test creates its task with a text part, which the adapter refuses",
188
+ upstream: "Report drafted, not filed"
189
+ },
190
+ {
191
+ test: "tests.compatibility.core_operations.test_artifacts.TestMessageResponse::test_returns_message_with_text_part[jsonrpc]",
192
+ id: "DM-MSG-001",
193
+ outcome: "skipped",
194
+ message: "send_message failed: Text parts are not supported",
195
+ reason: "The test creates its task with a text part, which the adapter refuses",
196
+ upstream: "Report drafted, not filed"
197
+ },
198
+ {
199
+ test: "tests.compatibility.core_operations.test_task_history.TestHistoryLengthLimit::test_get_task_history_does_not_exceed_limit[jsonrpc]",
200
+ id: "CORE-HIST-002",
201
+ outcome: "skipped",
202
+ message: "send_message failed: Text parts are not supported",
203
+ reason: "The test creates its task with a text part, which the adapter refuses",
204
+ upstream: "Report drafted, not filed"
205
+ },
206
+ {
207
+ test: "tests.compatibility.core_operations.test_task_lifecycle.TestGetTask::test_get_task_returns_current_state[jsonrpc]",
208
+ id: "CORE-GET-001",
209
+ outcome: "skipped",
210
+ message: "send_message failed: Text parts are not supported",
211
+ reason: "The test creates its task with a text part, which the adapter refuses",
212
+ upstream: "Report drafted, not filed"
213
+ },
214
+ {
215
+ test: "tests.compatibility.core_operations.test_task_lifecycle.TestCancelTask::test_cancel_task_returns_updated_state[jsonrpc]",
216
+ id: "CORE-CANCEL-001",
217
+ outcome: "skipped",
218
+ message: "send_message failed: Text parts are not supported",
219
+ reason: "The test creates its task with a text part, which the adapter refuses",
220
+ upstream: "Report drafted, not filed"
221
+ },
222
+ {
223
+ test: "tests.compatibility.core_operations.test_task_lifecycle.TestCancelTask::test_cancel_terminal_task_returns_error[jsonrpc]",
224
+ id: "CORE-CANCEL-002",
225
+ outcome: "skipped",
226
+ message: "send_message failed: Text parts are not supported",
227
+ reason: "The test creates its task with a text part, which the adapter refuses",
228
+ upstream: "Report drafted, not filed"
229
+ },
230
+ {
231
+ test: "tests.compatibility.core_operations.test_task_lifecycle.TestMultiTurn::test_send_message_to_terminal_task[jsonrpc]",
232
+ id: "CORE-SEND-002",
233
+ outcome: "skipped",
234
+ message: "send_message failed: Text parts are not supported",
235
+ reason: "The test creates its task with a text part, which the adapter refuses",
236
+ upstream: "Report drafted, not filed"
237
+ },
238
+ {
239
+ test: "tests.compatibility.core_operations.test_task_lifecycle.TestMultiTurn::test_infer_context_from_task[jsonrpc]",
240
+ id: "CORE-MULTI-005",
241
+ outcome: "skipped",
242
+ message: "send_message failed: Text parts are not supported",
243
+ reason: "The test creates its task with a text part, which the adapter refuses",
244
+ upstream: "Report drafted, not filed"
245
+ },
246
+ {
247
+ test: "tests.compatibility.core_operations.test_task_lifecycle.TestMultiTurn::test_reject_mismatching_context[jsonrpc]",
248
+ id: "CORE-MULTI-006",
249
+ outcome: "skipped",
250
+ message: "send_message failed: Text parts are not supported",
251
+ reason: "The test creates its task with a text part, which the adapter refuses",
252
+ upstream: "Report drafted, not filed"
253
+ },
254
+ {
255
+ test: "tests.compatibility.core_operations.test_data_model.TestSendMessageResponseSchema::test_response_validates_against_schema",
256
+ outcome: "skipped",
257
+ message: "No successful send_message responses",
258
+ reason: "Every message in the run sends a text part, which leaves no successful response to check",
259
+ upstream: "Report drafted, not filed"
260
+ },
261
+ {
262
+ test: "tests.compatibility.core_operations.test_data_model.TestCamelCaseFieldNames::test_no_snake_case_keys",
263
+ id: "DM-SERIAL-001",
264
+ outcome: "skipped",
265
+ message: "No successful send_message responses",
266
+ reason: "Every message in the run sends a text part, which leaves no successful response to check",
267
+ upstream: "Report drafted, not filed"
268
+ },
269
+ {
270
+ test: "tests.compatibility.core_operations.test_data_model.TestEnumSerialization::test_enum_values_are_strings",
271
+ id: "DM-SERIAL-002",
272
+ outcome: "skipped",
273
+ message: "No successful send_message responses",
274
+ reason: "Every message in the run sends a text part, which leaves no successful response to check",
275
+ upstream: "Report drafted, not filed"
276
+ },
277
+ {
278
+ test: "tests.compatibility.core_operations.test_data_model.TestTimestampFormat::test_timestamps_are_iso8601_utc",
279
+ id: "DM-SERIAL-003",
280
+ outcome: "skipped",
281
+ message: "No successful send_message responses",
282
+ reason: "Every message in the run sends a text part, which leaves no successful response to check",
283
+ upstream: "Report drafted, not filed"
284
+ }
285
+ ],
286
+ skipClasses: [
287
+ {
288
+ reason: "The gateway serves only the JSON-RPC binding",
289
+ messages: [
290
+ "Transport 'http_json' not configured",
291
+ "Transport 'grpc' not configured",
292
+ "Transport 'grpc' not configured (filtered by --transport)",
293
+ "Transport 'http_json' not configured (filtered by --transport)",
294
+ "HTTP+JSON transport not configured",
295
+ "gRPC transport not configured"
296
+ ]
297
+ },
298
+ {
299
+ reason: "The Agent Card declares streaming false (excluded)",
300
+ messages: [
301
+ "Agent does not support streaming",
302
+ "Agent card does not declare capabilities for: ['streaming']",
303
+ 'Streaming not supported: A2A method "SendStreamingMessage" is not supported by this deployment.'
304
+ ]
305
+ },
306
+ {
307
+ reason: "The Agent Card declares push notifications false (excluded)",
308
+ messages: ["Agent does not support push notifications"]
309
+ },
310
+ {
311
+ reason: "The Agent Card declares no extended card (excluded)",
312
+ messages: ["Agent does not declare extendedAgentCard capability"]
313
+ },
314
+ {
315
+ reason: "The TCK's probe for an agent that requires its test extension; this card requires none",
316
+ messages: ["Agent card does not declare urn:a2a:tck:required-extension as required"]
317
+ }
318
+ ]
319
+ }
320
+ },
321
+ gaps: [
322
+ {
323
+ requirement: "\xA73.1: GetTask, ListTasks and CancelTask, which every agent implements",
324
+ state: "closed"
325
+ },
326
+ {
327
+ requirement: "\xA73.2.2: returnImmediately as well as the blocking default",
328
+ state: "closed"
329
+ },
330
+ {
331
+ requirement: "\xA73.3.2: validate all input parameters, including tenant and configuration",
332
+ state: "closed"
333
+ },
334
+ {
335
+ requirement: "\xA77.1: encrypted communication in production; config accepts an http merchant.publicBaseUrl, and doctor warns when its host is not loopback",
336
+ state: "closed"
337
+ }
338
+ ],
339
+ docs: ["docs/protocols/a2a.md"]
340
+ };
341
+
342
+ // src/support/acp.json
343
+ var acp_default = {
344
+ name: "acp",
345
+ kind: "protocol",
346
+ title: "ACP",
347
+ status: "experimental",
348
+ role: "Checkout API that forwards checkout operations to the merchant, whose payment handler receives `payment_data`. Gateway checkout routes are free and carry no x402 or MPP payment.",
349
+ subset: "discovery and the five checkout operations",
350
+ spec: {
351
+ revisions: ["2026-04-17"],
352
+ display: "stable snapshot `2026-04-17`; REST binding",
353
+ source: {
354
+ repo: "agentic-commerce-protocol/agentic-commerce-protocol",
355
+ commit: "6b828681206f1f98a3faba978610ced66770d2ae"
356
+ },
357
+ stable: false,
358
+ statement: "currently in `beta`",
359
+ checked: "2026-11-17"
360
+ },
361
+ packages: [],
362
+ artifacts: [
363
+ {
364
+ path: "src/protocols/acp/spec/2026-04-17/schema.agentic_checkout.json",
365
+ revision: "6b828681206f1f98a3faba978610ced66770d2ae"
366
+ },
367
+ {
368
+ path: "tests/fixtures/acp/2026-04-17",
369
+ revision: "6b828681206f1f98a3faba978610ced66770d2ae"
370
+ }
371
+ ],
372
+ features: [
373
+ { name: "rest transport", status: "experimental" },
374
+ { name: "well-known discovery", status: "experimental" },
375
+ { name: "bearer authentication", status: "experimental" },
376
+ { name: "API-Version enforcement", status: "experimental" },
377
+ { name: "request header forwarding to the merchant", status: "experimental" },
378
+ { name: "checkout service", status: "experimental" },
379
+ { name: "createCheckoutSession", status: "experimental" },
380
+ { name: "updateCheckoutSession", status: "experimental" },
381
+ { name: "getCheckoutSession", status: "experimental" },
382
+ { name: "completeCheckoutSession", status: "experimental" },
383
+ { name: "cancelCheckoutSession", status: "experimental" }
384
+ ],
385
+ exclusions: [
386
+ {
387
+ name: "carts service",
388
+ note: "The discovery document advertises only the checkout service."
389
+ },
390
+ { name: "feed service" },
391
+ { name: "standalone orders service" },
392
+ { name: "delegate_payment" },
393
+ { name: "delegate_authentication" },
394
+ { name: "ACP MCP transport binding" },
395
+ { name: "webhooks", note: "The merchant backend sends ACP order webhooks itself." },
396
+ { name: "outbound merchant-to-agent delivery" },
397
+ { name: "ACP client role" },
398
+ {
399
+ name: "Signature header verification",
400
+ note: "The adapter forwards the header to the merchant unverified."
401
+ },
402
+ {
403
+ name: "Timestamp replay-window verification",
404
+ note: "The adapter forwards the header to the merchant unverified."
405
+ },
406
+ { name: "discount extension" },
407
+ { name: "general ACP extension framework" },
408
+ { name: "multiple ACP API versions" },
409
+ { name: "seller-backed payment handler integration" }
410
+ ],
411
+ deviations: [
412
+ {
413
+ summary: "After a merchant 5xx, retrying the same `Idempotency-Key` returns 409 `idempotency_unresolved` unless `protocols.acp.idempotency.merchantIdempotent` is true. The merchant may have acted, and another execution could duplicate the order.",
414
+ spec: "ACP RFC \xA76.5",
415
+ tests: ["tests/conformance/acp/idempotency.test.ts", "tests/conformance/acp/errors.test.ts"]
416
+ }
417
+ ],
418
+ conformance: {
419
+ suite: "Our tests against the vendored schema and official examples; ACP publishes no conformance suite.",
420
+ tests: [
421
+ "tests/conformance/acp/checkout.test.ts",
422
+ "tests/conformance/acp/errors.test.ts",
423
+ "tests/conformance/acp/idempotency.test.ts",
424
+ "tests/conformance/acp/protocol.test.ts",
425
+ "tests/conformance/acp/snapshot.test.ts"
426
+ ],
427
+ skipped: []
428
+ },
429
+ gaps: [],
430
+ docs: ["docs/protocols/acp.md"]
431
+ };
432
+
433
+ export { a2a_default, acp_default };
434
+ //# sourceMappingURL=chunk-IJFPWT4I.js.map
435
+ //# sourceMappingURL=chunk-IJFPWT4I.js.map