agentpay-mcp 4.1.10 → 4.1.16

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 (59) hide show
  1. package/README.md +13 -1
  2. package/dist/index.js +2 -2
  3. package/dist/utils/authorized-cybersecurity-scan-profile.d.ts +216 -0
  4. package/dist/utils/authorized-cybersecurity-scan-profile.d.ts.map +1 -0
  5. package/dist/utils/authorized-cybersecurity-scan-profile.js +130 -0
  6. package/dist/utils/authorized-cybersecurity-scan-profile.js.map +1 -0
  7. package/dist/utils/paid-provider-health-proof.d.ts +4 -4
  8. package/dist/utils/paid-tool-quality-threshold.d.ts +261 -0
  9. package/dist/utils/paid-tool-quality-threshold.d.ts.map +1 -0
  10. package/dist/utils/paid-tool-quality-threshold.js +155 -0
  11. package/dist/utils/paid-tool-quality-threshold.js.map +1 -0
  12. package/dist/utils/post-quantum-spend-envelope-compatibility.d.ts +22 -0
  13. package/dist/utils/post-quantum-spend-envelope-compatibility.d.ts.map +1 -0
  14. package/dist/utils/post-quantum-spend-envelope-compatibility.js +61 -0
  15. package/dist/utils/post-quantum-spend-envelope-compatibility.js.map +1 -0
  16. package/dist/utils/wallet-action-preflight-profile.d.ts +70 -0
  17. package/dist/utils/wallet-action-preflight-profile.d.ts.map +1 -0
  18. package/dist/utils/wallet-action-preflight-profile.js +151 -0
  19. package/dist/utils/wallet-action-preflight-profile.js.map +1 -0
  20. package/dist/utils/x402-chain-neutral-gateway-profile.d.ts +66 -0
  21. package/dist/utils/x402-chain-neutral-gateway-profile.d.ts.map +1 -0
  22. package/dist/utils/x402-chain-neutral-gateway-profile.js +145 -0
  23. package/dist/utils/x402-chain-neutral-gateway-profile.js.map +1 -0
  24. package/dist/utils/x402-dynamic-paid-mcp-manifest-drift.d.ts +82 -0
  25. package/dist/utils/x402-dynamic-paid-mcp-manifest-drift.d.ts.map +1 -0
  26. package/dist/utils/x402-dynamic-paid-mcp-manifest-drift.js +158 -0
  27. package/dist/utils/x402-dynamic-paid-mcp-manifest-drift.js.map +1 -0
  28. package/dist/utils/x402-multi-ledger-receipt.d.ts +64 -0
  29. package/dist/utils/x402-multi-ledger-receipt.d.ts.map +1 -0
  30. package/dist/utils/x402-multi-ledger-receipt.js +150 -0
  31. package/dist/utils/x402-multi-ledger-receipt.js.map +1 -0
  32. package/docs/agentpay-escrow-reputation-boundary.md +64 -0
  33. package/docs/agentpay-five-tool-parity-proof.json +56 -0
  34. package/docs/agentpay-five-tool-parity-proof.md +64 -0
  35. package/docs/agentpay-machine-payment-directory-listing-pack.md +101 -0
  36. package/docs/agentpay-machine-payment-directory-listing.json +41 -0
  37. package/docs/agentpay-paid-proxy-discovery-listing.json +42 -0
  38. package/docs/authorized-cybersecurity-scan-profile.md +56 -0
  39. package/docs/fixtures/authorized-cybersecurity-scan-profile-agentaegis-2026-05-04.json +43 -0
  40. package/docs/fixtures/chain-neutral-gateway-profile-rugmunch-2026-05-03.json +43 -0
  41. package/docs/fixtures/dynamic-paid-mcp-manifest-rugmunch-2026-05-04-baseline.json +67 -0
  42. package/docs/fixtures/dynamic-paid-mcp-manifest-rugmunch-2026-05-04.json +67 -0
  43. package/docs/fixtures/multi-ledger-receipt-xrpl-utilities-2026-05-04.json +35 -0
  44. package/docs/fixtures/paid-tool-quality-threshold-strale-2026-05-04.json +53 -0
  45. package/docs/fixtures/wallet-action-preflight-merx-2026-05-04.json +54 -0
  46. package/docs/paid-mcp-proxy-discovery-readiness.md +70 -0
  47. package/docs/paid-tool-quality-thresholds.md +47 -0
  48. package/docs/post-quantum-spend-envelope-compatibility.md +37 -0
  49. package/docs/smithery-paid-mcp-installation.md +180 -0
  50. package/docs/wallet-action-preflight-profile.md +57 -0
  51. package/docs/x402-chain-neutral-gateway-profile.md +65 -0
  52. package/docs/x402-chain-neutral-gateway-profile.schema.json +75 -0
  53. package/docs/x402-dynamic-paid-mcp-manifest-drift.md +41 -0
  54. package/docs/x402-dynamic-paid-mcp-manifest-drift.schema.json +193 -0
  55. package/docs/x402-multi-ledger-receipt-normalization.md +57 -0
  56. package/docs/x402-multi-ledger-receipt-normalization.schema.json +67 -0
  57. package/examples/smithery-paid-mcp-installation/README.md +63 -0
  58. package/llms.txt +4 -0
  59. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402-dynamic-paid-mcp-manifest-drift.js","sourceRoot":"","sources":["../../src/utils/x402-dynamic-paid-mcp-manifest-drift.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAsGH,wFAwFC;AAQD,wFAsCC;AAED,4FAUC;AArKD,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C,SAAS,UAAU,CAAC,KAAyB;IAC3C,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAW,EAAE,OAAa;IAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,WAAW,CAAC,QAAwB,EAAE,QAAuB,EAAE,KAAa,EAAE,OAAe;IACpG,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,sCAAsC,CACpD,QAAwC,EACxC,UAAmD,EAAE;IAErD,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;IACtC,MAAM,mBAAmB,GAAG,OAAO,C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aAAa,CAAC,EAAE,CAAC;QAC1I,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Multi-ledger x402 receipt normalization helpers.
3
+ *
4
+ * x402 paid MCP servers are starting to advertise non-Base payment rails. Buyer
5
+ * agents need one normalized receipt envelope before signing, with explicit
6
+ * ledger, asset, settlement target, verification state, and custody boundary.
7
+ */
8
+ export type X402LedgerNamespace = 'eip155' | 'xrpl' | 'tvm' | 'solana' | 'other';
9
+ export type X402VerificationStatus = 'verified' | 'pending' | 'unsupported_refused' | 'failed' | 'unknown';
10
+ export type X402CustodyBoundary = 'non-custodial' | 'facilitator' | 'managed' | 'unknown';
11
+ export type X402MultiLedgerReceipt = {
12
+ schema: 'agentpay-x402-multi-ledger-receipt/v1';
13
+ observedAt: string;
14
+ source: {
15
+ name: string;
16
+ repo?: string;
17
+ evidenceUrl?: string;
18
+ pushedAt?: string;
19
+ };
20
+ payment: {
21
+ x402Version: string;
22
+ paymentHeader: 'Payment-Signature';
23
+ receiptHeader: 'payment-response';
24
+ };
25
+ ledger: {
26
+ label: string;
27
+ namespace: X402LedgerNamespace;
28
+ chainId?: string | number;
29
+ };
30
+ settlement: {
31
+ asset: string;
32
+ target: string;
33
+ reference?: string;
34
+ };
35
+ verification: {
36
+ status: X402VerificationStatus;
37
+ verifier?: string;
38
+ checkedAt: string;
39
+ };
40
+ boundary: {
41
+ custody: X402CustodyBoundary;
42
+ nonCustodial: boolean;
43
+ description: string;
44
+ };
45
+ unsupportedLedgerRefusal?: string;
46
+ };
47
+ export type X402MultiLedgerReceiptPolicy = {
48
+ supportedLedgerNamespaces: X402LedgerNamespace[];
49
+ allowedAssets: string[];
50
+ allowedSettlementTargets: string[];
51
+ requireNonCustodialBoundary: boolean;
52
+ requireVerifiedReceipt: boolean;
53
+ allowUnsupportedRefusalProof: boolean;
54
+ };
55
+ export type X402MultiLedgerReceiptDecision = {
56
+ ok: boolean;
57
+ decision: 'allow' | 'deny';
58
+ failures: string[];
59
+ warnings: string[];
60
+ };
61
+ export declare function evaluateX402MultiLedgerReceipt(receipt: X402MultiLedgerReceipt, policy: X402MultiLedgerReceiptPolicy, now?: Date): X402MultiLedgerReceiptDecision;
62
+ export declare function buildAgentPayBaseReceiptExample(): X402MultiLedgerReceipt;
63
+ export declare function buildXrplUnsupportedRefusalExample(): X402MultiLedgerReceipt;
64
+ //# sourceMappingURL=x402-multi-ledger-receipt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402-multi-ledger-receipt.d.ts","sourceRoot":"","sources":["../../src/utils/x402-multi-ledger-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjF,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,SAAS,GAAG,qBAAqB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3G,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1F,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,uCAAuC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE;QACP,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,mBAAmB,CAAC;QACnC,aAAa,EAAE,kBAAkB,CAAC;KACnC,CAAC;IACF,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,mBAAmB,CAAC;QAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3B,CAAC;IACF,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,YAAY,EAAE;QACZ,MAAM,EAAE,sBAAsB,CAAC;QAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE,mBAAmB,CAAC;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,yBAAyB,EAAE,mBAAmB,EAAE,CAAC;IACjD,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,2BAA2B,EAAE,OAAO,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;IAChC,4BAA4B,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAeF,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,4BAA4B,EACpC,GAAG,OAAa,GACf,8BAA8B,CAkDhC;AAED,wBAAgB,+BAA+B,IAAI,sBAAsB,CAmCxE;AAED,wBAAgB,kCAAkC,IAAI,sBAAsB,CAqC3E"}
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ /**
3
+ * Multi-ledger x402 receipt normalization helpers.
4
+ *
5
+ * x402 paid MCP servers are starting to advertise non-Base payment rails. Buyer
6
+ * agents need one normalized receipt envelope before signing, with explicit
7
+ * ledger, asset, settlement target, verification state, and custody boundary.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.evaluateX402MultiLedgerReceipt = evaluateX402MultiLedgerReceipt;
11
+ exports.buildAgentPayBaseReceiptExample = buildAgentPayBaseReceiptExample;
12
+ exports.buildXrplUnsupportedRefusalExample = buildXrplUnsupportedRefusalExample;
13
+ function parseTime(value) {
14
+ const parsed = Date.parse(value);
15
+ return Number.isNaN(parsed) ? Number.NaN : parsed;
16
+ }
17
+ function includesCaseInsensitive(values, value) {
18
+ return values.map((entry) => entry.toLowerCase()).includes(value.toLowerCase());
19
+ }
20
+ function isNonEmpty(value) {
21
+ return typeof value === 'string' && value.trim().length > 0;
22
+ }
23
+ function evaluateX402MultiLedgerReceipt(receipt, policy, now = new Date()) {
24
+ const failures = [];
25
+ const warnings = [];
26
+ if (receipt.schema !== 'agentpay-x402-multi-ledger-receipt/v1')
27
+ failures.push('schema must be agentpay-x402-multi-ledger-receipt/v1.');
28
+ if (!isNonEmpty(receipt.source.name))
29
+ failures.push('source.name is required.');
30
+ if (receipt.payment.paymentHeader !== 'Payment-Signature')
31
+ failures.push('payment.paymentHeader must be Payment-Signature.');
32
+ if (receipt.payment.receiptHeader !== 'payment-response')
33
+ failures.push('payment.receiptHeader must be payment-response.');
34
+ if (!isNonEmpty(receipt.ledger.label))
35
+ failures.push('ledger.label is required.');
36
+ if (!isNonEmpty(receipt.settlement.asset))
37
+ failures.push('settlement.asset is required.');
38
+ if (!isNonEmpty(receipt.settlement.target))
39
+ failures.push('settlement.target is required.');
40
+ if (!isNonEmpty(receipt.verification.checkedAt) || Number.isNaN(parseTime(receipt.verification.checkedAt)))
41
+ failures.push('verification.checkedAt must be an ISO timestamp.');
42
+ if (!isNonEmpty(receipt.observedAt) || Number.isNaN(parseTime(receipt.observedAt)))
43
+ failures.push('observedAt must be an ISO timestamp.');
44
+ if (parseTime(receipt.observedAt) > now.getTime())
45
+ warnings.push('observedAt is in the future relative to evaluator clock.');
46
+ if (!policy.supportedLedgerNamespaces.includes(receipt.ledger.namespace)) {
47
+ failures.push(`ledger namespace ${receipt.ledger.namespace} is not supported by buyer policy.`);
48
+ }
49
+ if (!includesCaseInsensitive(policy.allowedAssets, receipt.settlement.asset)) {
50
+ failures.push(`settlement asset ${receipt.settlement.asset} is not allowed.`);
51
+ }
52
+ if (!includesCaseInsensitive(policy.allowedSettlementTargets, receipt.settlement.target)) {
53
+ failures.push(`settlement target ${receipt.settlement.target} is not allowlisted.`);
54
+ }
55
+ if (policy.requireNonCustodialBoundary && (!receipt.boundary.nonCustodial || receipt.boundary.custody !== 'non-custodial')) {
56
+ failures.push('non-custodial boundary is required before signing.');
57
+ }
58
+ if (policy.requireVerifiedReceipt && receipt.verification.status !== 'verified') {
59
+ if (receipt.verification.status === 'unsupported_refused' && policy.allowUnsupportedRefusalProof && isNonEmpty(receipt.unsupportedLedgerRefusal)) {
60
+ warnings.push('Receipt is an unsupported-ledger refusal proof, not a spend authorization.');
61
+ }
62
+ else {
63
+ failures.push(`verification status ${receipt.verification.status} is not verified.`);
64
+ }
65
+ }
66
+ if (receipt.verification.status === 'unsupported_refused' && !isNonEmpty(receipt.unsupportedLedgerRefusal)) {
67
+ failures.push('unsupportedLedgerRefusal copy is required for unsupported ledger refusal proofs.');
68
+ }
69
+ const ok = failures.length === 0 && receipt.verification.status === 'verified';
70
+ return {
71
+ ok,
72
+ decision: ok ? 'allow' : 'deny',
73
+ failures,
74
+ warnings,
75
+ };
76
+ }
77
+ function buildAgentPayBaseReceiptExample() {
78
+ return {
79
+ schema: 'agentpay-x402-multi-ledger-receipt/v1',
80
+ observedAt: '2026-05-05T01:10:00.000Z',
81
+ source: {
82
+ name: 'AgentPay MCP',
83
+ repo: 'up2itnow0822/agentpay-mcp',
84
+ evidenceUrl: 'https://www.npmjs.com/package/agentpay-mcp',
85
+ },
86
+ payment: {
87
+ x402Version: '2.x',
88
+ paymentHeader: 'Payment-Signature',
89
+ receiptHeader: 'payment-response',
90
+ },
91
+ ledger: {
92
+ label: 'Base mainnet',
93
+ namespace: 'eip155',
94
+ chainId: 8453,
95
+ },
96
+ settlement: {
97
+ asset: 'USDC',
98
+ target: '0x1111111111111111111111111111111111111111',
99
+ reference: 'x402-receipt:base-mainnet-example',
100
+ },
101
+ verification: {
102
+ status: 'verified',
103
+ verifier: 'AgentPay local policy engine',
104
+ checkedAt: '2026-05-05T01:10:00.000Z',
105
+ },
106
+ boundary: {
107
+ custody: 'non-custodial',
108
+ nonCustodial: true,
109
+ description: 'Private keys remain local and AgentPay signs only after policy approval.',
110
+ },
111
+ };
112
+ }
113
+ function buildXrplUnsupportedRefusalExample() {
114
+ return {
115
+ schema: 'agentpay-x402-multi-ledger-receipt/v1',
116
+ observedAt: '2026-05-05T01:10:00.000Z',
117
+ source: {
118
+ name: 'XRPL-Utilities MCP market signal',
119
+ repo: 'XRPL-Utilities/xrpl-utilities-mcp',
120
+ evidenceUrl: 'https://github.com/XRPL-Utilities/xrpl-utilities-mcp',
121
+ pushedAt: '2026-05-05T01:02:00.000Z',
122
+ },
123
+ payment: {
124
+ x402Version: '2.x',
125
+ paymentHeader: 'Payment-Signature',
126
+ receiptHeader: 'payment-response',
127
+ },
128
+ ledger: {
129
+ label: 'XRPL extension point',
130
+ namespace: 'xrpl',
131
+ chainId: 'xrpl-mainnet',
132
+ },
133
+ settlement: {
134
+ asset: 'RLUSD or XRP, provider-declared',
135
+ target: 'unsupported-until-allowlisted',
136
+ },
137
+ verification: {
138
+ status: 'unsupported_refused',
139
+ verifier: 'AgentPay buyer policy',
140
+ checkedAt: '2026-05-05T01:10:00.000Z',
141
+ },
142
+ boundary: {
143
+ custody: 'unknown',
144
+ nonCustodial: false,
145
+ description: 'AgentPay does not sign XRPL settlement until signer, asset, target, facilitator, and receipt semantics are explicitly implemented.',
146
+ },
147
+ unsupportedLedgerRefusal: 'Refused before signing: XRPL x402 rail is visible but not allowlisted. Add ledger namespace, asset parser, settlement target allowlist, verifier, receipt mapping, and non-custodial signer support before retrying.',
148
+ };
149
+ }
150
+ //# sourceMappingURL=x402-multi-ledger-receipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x402-multi-ledger-receipt.js","sourceRoot":"","sources":["../../src/utils/x402-multi-ledger-receipt.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AA0EH,wEAsDC;AAED,0EAmCC;AAED,gFAqCC;AA/ID,SAAS,SAAS,CAAC,KAAa;IAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;AACpD,CAAC;AAED,SAAS,uBAAuB,CAAC,MAAgB,EAAE,KAAa;IAC9D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;AAClF,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED,SAAgB,8BAA8B,CAC5C,OAA+B,EAC/B,MAAoC,EACpC,GAAG,GAAG,IAAI,IAAI,EAAE;IAEhB,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,IAAI,OAAO,CAAC,MAAM,KAAK,uCAAuC;QAAE,QAAQ,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;IACvI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;QAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAChF,IAAI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O,EAAE;YACP,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,mBAAmB;YAClC,aAAa,EAAE,kBAAkB;SAClC;QACD,MAAM,EAAE;YACN,KAAK,EAAE,sBAAsB;YAC7B,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,cAAc;SACxB;QACD,UAAU,EAAE;YACV,KAAK,EAAE,iCAAiC;YACxC,MAAM,EAAE,+BAA+B;SACxC;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,qBAAqB;YAC7B,QAAQ,EAAE,uBAAuB;YACjC,SAAS,EAAE,0BAA0B;SACtC;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,oIAAoI;SAClJ;QACD,wBAAwB,EACtB,sNAAsN;KACzN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,64 @@
1
+ # AgentPay escrow and reputation boundary proof
2
+
3
+ Execution Market packages x402 payment claims with escrow, ERC-8004 identity, A2A task execution, World ID proof, worker evidence, and reputation. That is a useful market signal: buyers will compare payment tools by trust outcomes, not only by payment headers.
4
+
5
+ This proof separates the layers so buyers do not treat payment authorization as proof that work was completed.
6
+
7
+ ## Market signal
8
+
9
+ Source: `UltravioletaDAO/execution-market` README, fetched during the May 4 market-intel cycle.
10
+
11
+ Observed claims:
12
+
13
+ - Task bounties can lock USDC in on-chain escrow.
14
+ - The product exposes MCP, REST, WebSocket, and A2A paths.
15
+ - Identity references include ERC-8004 and World ID.
16
+ - Worker submissions, evidence, approval, cancellation, refund, and escrow-state checks sit around payment.
17
+ - x402 is part of a broader task market, not the whole trust system.
18
+
19
+ ## Boundary table
20
+
21
+ | Layer | What the buyer needs | AgentPay role | Boundary |
22
+ |---|---|---|---|
23
+ | Payment authorization | Decide whether an agent may spend a given amount to a given recipient | Enforce approval gates, hard spend caps, allowlists, x402 metadata checks, and receipt logging | Payment authorization does not prove the seller did the task. |
24
+ | x402 settlement | Produce and verify the payment proof for a paid endpoint | Sign and retry x402 calls only after policy passes | x402 receipt is payment evidence, not work evidence. |
25
+ | Escrow | Lock funds until task terms, evidence, and approval rules are satisfied | AgentPay has a separate `create_escrow` tool for mutual-stake escrow when a factory is configured | Escrow must be explicit. It must not be hidden inside `x402_pay`. |
26
+ | Identity | Bind buyers, workers, agents, and policies to identities | AgentPay exposes wallet and identity/reputation utilities from the wallet stack | Identity signals can inform policy, but they are not spend approval by themselves. |
27
+ | Reputation | Score prior behavior and outcomes | AgentPay can read reputation signals and log payment outcomes | Reputation should be an input to policy, not the only policy. |
28
+ | Work proof | Validate evidence, fulfillment, dispute state, and release conditions | Integration boundary with task-market or verifier systems | Work proof belongs above payment execution. |
29
+
30
+ ## Safe buyer architecture
31
+
32
+ Use AgentPay as the x402 control layer in front of any task marketplace or paid worker flow:
33
+
34
+ 1. Discover the task or endpoint.
35
+ 2. Read identity, reputation, escrow, and work-proof requirements.
36
+ 3. Run AgentPay policy checks for spend cap, `payTo`, asset, network, price, manifest freshness, provider health, and approval mode.
37
+ 4. If the task requires escrow, call an escrow-specific flow such as `create_escrow`; do not treat a normal x402 receipt as escrow.
38
+ 5. Release or dispute funds only through the task-market or escrow contract state machine.
39
+ 6. Persist x402 receipts, escrow transaction hashes, worker evidence IDs, and approval logs as separate audit fields.
40
+
41
+ ## AgentPay guarantees today
42
+
43
+ AgentPay can guarantee these payment-control properties when configured correctly:
44
+
45
+ - Non-custodial local signing.
46
+ - Human approval for high-risk or high-value payments.
47
+ - Per-transaction and daily spend caps.
48
+ - Network, asset, recipient, and manifest checks.
49
+ - x402 `Payment-Signature` and `payment-response` receipt handling.
50
+ - Separate escrow creation through `create_escrow` when the wallet SDK factory is configured.
51
+ - Fail-closed behavior for unsupported ledgers or incomplete payment metadata.
52
+
53
+ AgentPay should not claim these as automatic x402 guarantees:
54
+
55
+ - Worker identity verification.
56
+ - World ID proof.
57
+ - Task outcome verification.
58
+ - Dispute resolution.
59
+ - Reputation scoring accuracy.
60
+ - Escrow release correctness.
61
+
62
+ ## Integration rule
63
+
64
+ A task platform can integrate AgentPay safely by treating it as the buyer-side payment policy layer. The platform should keep escrow, worker evidence, reputation, identity, and dispute state in its own task protocol or contracts, then pass only verified payment intents to AgentPay for approval and signing.
@@ -0,0 +1,56 @@
1
+ {
2
+ "proof": "agentpay-five-tool-x402-parity",
3
+ "market_signal": "OpenDexter documents x402_search, x402_check, x402_fetch, x402_wallet, and x402_pay across hosted session wallets and a local signer package.",
4
+ "agentpay_position": "Buyer-flow parity with local signing, explicit policy checks, and fail-closed unsupported-ledger handling.",
5
+ "grammar": [
6
+ {
7
+ "canonical_tool": "x402_search",
8
+ "agentpay_equivalent": [
9
+ "docs/agentpay-machine-payment-directory-listing.json",
10
+ "docs/mcp-registry-listing-proof.md",
11
+ "docs/directory-introspection-readiness.md"
12
+ ],
13
+ "safety_rule": "Search metadata cannot authorize payment."
14
+ },
15
+ {
16
+ "canonical_tool": "x402_check",
17
+ "agentpay_equivalent": [
18
+ "check_budget",
19
+ "check_spend_limit",
20
+ "docs/x402-dynamic-paid-mcp-manifest-drift.md",
21
+ "docs/paid-provider-health-proof.md",
22
+ "docs/paid-tool-quality-thresholds.md"
23
+ ],
24
+ "safety_rule": "Fail closed when network, asset, payTo, price, manifest freshness, or quality proof is missing."
25
+ },
26
+ {
27
+ "canonical_tool": "x402_fetch",
28
+ "agentpay_equivalent": [
29
+ "x402_pay",
30
+ "x402_session_start",
31
+ "x402_session_fetch"
32
+ ],
33
+ "safety_rule": "No automatic payment before policy, approval, cap, receipt, and session checks pass."
34
+ },
35
+ {
36
+ "canonical_tool": "x402_wallet",
37
+ "agentpay_equivalent": [
38
+ "get_wallet_info",
39
+ "set_spend_policy",
40
+ "deploy_wallet",
41
+ "x402_session_status"
42
+ ],
43
+ "safety_rule": "Private keys remain local and are never stored in directory or proxy metadata."
44
+ },
45
+ {
46
+ "canonical_tool": "x402_pay",
47
+ "agentpay_equivalent": [
48
+ "x402_pay",
49
+ "docs/x402-multi-ledger-receipt-normalization.md",
50
+ "docs/wallet-action-preflight-profile.md"
51
+ ],
52
+ "safety_rule": "Sign only after network, asset, amount, recipient, policy, and approval checks."
53
+ }
54
+ ],
55
+ "unsupported_ledger_policy": "Non-EVM rails remain fail-closed extension points until signer, asset, receipt, refund, and settlement semantics are implemented."
56
+ }
@@ -0,0 +1,64 @@
1
+ # AgentPay five-tool x402 parity proof
2
+
3
+ OpenDexter documents a compact paid-MCP grammar: `x402_search`, `x402_check`, `x402_fetch`, `x402_wallet`, and `x402_pay`. That grammar is useful because it gives buyer agents one mental model for discovery, policy checks, fetching, wallet state, and final payment.
4
+
5
+ AgentPay does not need to copy hosted session custody to be compatible with that buyer flow. The safer parity target is a mapping that lets agents run the same sequence while keeping signing local, policy explicit, and unsupported chains fail closed.
6
+
7
+ ## Market signal
8
+
9
+ Source: `Dexter-DAO/dexter-mcp` README, fetched during the May 4 market-intel cycle.
10
+
11
+ Observed claims:
12
+
13
+ - Hosted sessions create one Solana address and one EVM address for the user.
14
+ - `x402_fetch` checks balances across chains and picks the best-funded chain accepted by the endpoint.
15
+ - Sessions persist for 30 days in PostgreSQL.
16
+ - The local signer package exposes the same five-tool story and stores a local wallet file.
17
+ - The local signing path is currently optimized around Solana.
18
+
19
+ ## AgentPay parity map
20
+
21
+ | OpenDexter grammar | AgentPay equivalent | Proof surface | Buyer safety rule |
22
+ |---|---|---|---|
23
+ | `x402_search` | Directory/listing metadata, registry proof, and discovery docs | `docs/agentpay-machine-payment-directory-listing.json`, `docs/mcp-registry-listing-proof.md`, `docs/directory-introspection-readiness.md` | Search results are metadata only. They cannot authorize payment. |
24
+ | `x402_check` | Budget, spend-limit, manifest, provider-health, quality, and chain checks | `check_budget`, `check_spend_limit`, `docs/x402-dynamic-paid-mcp-manifest-drift.md`, `docs/paid-provider-health-proof.md`, `docs/paid-tool-quality-thresholds.md` | Checks must fail closed when network, asset, `payTo`, price, manifest freshness, or quality proof is missing. |
25
+ | `x402_fetch` | `x402_pay` for paid fetches, or `x402_session_fetch` for reusable paid sessions | `x402_pay`, `x402_session_start`, `x402_session_fetch`, `docs/x402-v211-paid-mcp-compatibility.md` | Fetch must not auto-pay unless policy, approval, cap, receipt, and session state pass first. |
26
+ | `x402_wallet` | Local wallet info, policy, deployment, and session status | `get_wallet_info`, `set_spend_policy`, `deploy_wallet`, `x402_session_status` | Wallet state stays local. Directories and hosted proxies do not receive private keys. |
27
+ | `x402_pay` | Approval-gated x402 payment execution | `x402_pay`, `docs/x402-multi-ledger-receipt-normalization.md`, `docs/wallet-action-preflight-profile.md` | Payment signs only after explicit network, asset, amount, recipient, policy, and approval checks. |
28
+
29
+ ## Hosted session wallet boundary
30
+
31
+ Hosted session wallets can reduce onboarding friction, but they move two risks into the provider surface:
32
+
33
+ 1. The provider or database becomes part of the wallet trust boundary.
34
+ 2. Chain auto-selection can hide which ledger, asset, and settlement target the buyer is about to use.
35
+
36
+ AgentPay's default posture is different:
37
+
38
+ - Signing stays local to the buyer runtime.
39
+ - Policy approval happens before payment, not after a provider selects a chain.
40
+ - The buyer sees `payTo`, network, asset, amount, session, receipt, and unsupported-ledger refusal copy before signing.
41
+ - Directory and proxy metadata can help the buyer discover endpoints, but metadata alone never grants spend authority.
42
+
43
+ ## Multi-chain selection guardrails
44
+
45
+ If a paid MCP endpoint supports more than one network, AgentPay should preserve these guardrails before any future auto-selection flow:
46
+
47
+ - Require an allowlist for network and asset.
48
+ - Require non-zero and verified `payTo`.
49
+ - Prefer a deterministic buyer policy over provider-selected best balance.
50
+ - Log why a chain was selected.
51
+ - Refuse Solana, XRPL, TRON, TVM, or other non-EVM payments until signer, asset, receipt, refund, and settlement semantics are implemented for that rail.
52
+ - Show the final chain and asset in approval copy.
53
+
54
+ ## Acceptance proof
55
+
56
+ A buyer agent can follow the five-step grammar today without handing custody to AgentPay or a hosted directory:
57
+
58
+ 1. Search: read AgentPay listing metadata and proof docs.
59
+ 2. Check: validate price, manifest, chain, provider health, quality, budget, and approval policy.
60
+ 3. Fetch: use `x402_pay` or `x402_session_fetch` only after checks pass.
61
+ 4. Wallet: inspect local wallet and active sessions without exposing private keys.
62
+ 5. Pay: sign a capped x402 payment and persist the receipt/audit trail.
63
+
64
+ This is five-tool parity at the buyer-flow layer, with local signer safety instead of hidden hosted-session custody.
@@ -0,0 +1,101 @@
1
+ # AgentPay machine-payment directory listing pack
2
+
3
+ Machine-payment directories are starting to shape buyer discovery. If AgentPay is not described clearly in those directories, buyers will compare us against managed payment stacks using incomplete metadata.
4
+
5
+ This pack gives directory maintainers a concise AgentPay listing with x402-only settlement wording, proof links, install instructions, and safety controls.
6
+
7
+ ## Listing title
8
+
9
+ AgentPay MCP - non-custodial x402 payment controls for AI agents
10
+
11
+ ## Short description
12
+
13
+ AgentPay MCP is an MCP server that lets AI agents pay x402-enabled APIs and tools with human approval, hard spend caps, non-custodial signing, and receipt/audit logging.
14
+
15
+ ## x402-only settlement wording
16
+
17
+ AgentPay MCP is not a managed wallet, hosted custodian, or payment processor. It is a buyer-side x402 payment-control layer. Current production signing is Base/USDC-oriented, and non-EVM rails are treated as fail-closed extension points until signer, asset, settlement, receipt, and refund semantics are implemented.
18
+
19
+ ## Install snippet
20
+
21
+ ```bash
22
+ npm install agentpay-mcp
23
+ ```
24
+
25
+ MCP config:
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "agentpay": {
31
+ "command": "npx",
32
+ "args": ["agentpay-mcp"],
33
+ "env": {
34
+ "AGENT_PRIVATE_KEY": "0x...",
35
+ "AGENT_WALLET_ADDRESS": "0x..."
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Safety controls to list
43
+
44
+ - Human approval for high-risk or high-value payments
45
+ - Per-transaction and daily spend caps
46
+ - Non-custodial private-key boundary
47
+ - x402 `Payment-Signature` and `payment-response` receipt handling
48
+ - Paid MCP manifest drift checks
49
+ - Provider-health and quality-threshold gates
50
+ - Chain-neutral gateway profile checks
51
+ - Multi-ledger receipt normalization
52
+ - Wallet-action simulate-first preflight profile
53
+
54
+ ## Proof links
55
+
56
+ - npm: https://www.npmjs.com/package/agentpay-mcp
57
+ - GitHub: https://github.com/up2itnow0822/agentpay-mcp
58
+ - Chain-neutral x402 gateway profile: `docs/x402-chain-neutral-gateway-profile.md`
59
+ - Multi-ledger receipt normalization: `docs/x402-multi-ledger-receipt-normalization.md`
60
+ - Wallet-action preflight profile: `docs/wallet-action-preflight-profile.md`
61
+ - Dynamic paid MCP manifest drift: `docs/x402-dynamic-paid-mcp-manifest-drift.md`
62
+ - Smithery paid MCP installation: `docs/smithery-paid-mcp-installation.md`
63
+ - Machine-readable listing JSON: `docs/agentpay-machine-payment-directory-listing.json`
64
+
65
+ ## Directory category suggestions
66
+
67
+ - MCP servers
68
+ - x402 tools
69
+ - Agent payments
70
+ - Stablecoin payment controls
71
+ - Non-custodial agent wallets
72
+ - Machine-payment buyer safety
73
+
74
+ ## Suggested PR body
75
+
76
+ Add AgentPay MCP to the machine-payment directory as a non-custodial x402 payment-control layer for AI agents.
77
+
78
+ Market signal: paid MCP and MPP directories are becoming a buyer discovery surface. AgentPay is not a managed custodian or generic wallet provider. It controls buyer-side x402 payments with approval gates, spend caps, receipt logging, and fail-closed handling for unsupported ledgers.
79
+
80
+ Scope:
81
+
82
+ - Add `agentpay-mcp` under MCP servers, x402 tools, or agent payment controls.
83
+ - Use the x402-only settlement wording above.
84
+ - Link npm, GitHub, and proof docs.
85
+ - Do not claim broad live XRPL/TRON/Solana signing. Current non-EVM wording is fail-closed extension support.
86
+
87
+ ## Suggested issue body
88
+
89
+ Could this directory add AgentPay MCP as a non-custodial x402 payment-control layer for AI agents?
90
+
91
+ AgentPay MCP lets AI agents pay x402-enabled APIs and tools while enforcing human approval, hard spend caps, non-custodial signing, and receipt/audit logging. It fits the machine-payment directory category because it covers buyer-side payment governance for paid MCP tools, not hosted custody or managed settlement.
92
+
93
+ Proof links:
94
+
95
+ - npm: https://www.npmjs.com/package/agentpay-mcp
96
+ - GitHub: https://github.com/up2itnow0822/agentpay-mcp
97
+ - Listing JSON: `docs/agentpay-machine-payment-directory-listing.json`
98
+ - Multi-ledger receipt normalization: `docs/x402-multi-ledger-receipt-normalization.md`
99
+ - Wallet-action preflight profile: `docs/wallet-action-preflight-profile.md`
100
+
101
+ Important wording: AgentPay MCP is a buyer-side x402 control layer. Current production signing is Base/USDC-oriented; non-EVM rails are fail-closed extension points until signer, asset, settlement, receipt, and refund semantics are implemented.
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "agentpay-mcp",
3
+ "title": "AgentPay MCP",
4
+ "description": "Non-custodial x402 payment controls for AI agents using MCP.",
5
+ "category": [
6
+ "mcp-server",
7
+ "x402",
8
+ "agent-payments",
9
+ "non-custodial",
10
+ "buyer-safety"
11
+ ],
12
+ "package": {
13
+ "manager": "npm",
14
+ "name": "agentpay-mcp",
15
+ "install": "npm install agentpay-mcp",
16
+ "url": "https://www.npmjs.com/package/agentpay-mcp"
17
+ },
18
+ "repository": "https://github.com/up2itnow0822/agentpay-mcp",
19
+ "settlement_wording": "Buyer-side x402 payment-control layer. Current production signing is Base/USDC-oriented; non-EVM rails are fail-closed extension points until signer, asset, settlement, receipt, and refund semantics are implemented.",
20
+ "supported_claims": {
21
+ "x402": true,
22
+ "mcp": true,
23
+ "non_custodial": true,
24
+ "human_approval": true,
25
+ "spend_caps": true,
26
+ "receipt_logging": true,
27
+ "managed_custody": false
28
+ },
29
+ "proofs": [
30
+ "docs/x402-chain-neutral-gateway-profile.md",
31
+ "docs/x402-multi-ledger-receipt-normalization.md",
32
+ "docs/wallet-action-preflight-profile.md",
33
+ "docs/x402-dynamic-paid-mcp-manifest-drift.md",
34
+ "docs/smithery-paid-mcp-installation.md"
35
+ ],
36
+ "mcp_config": {
37
+ "command": "npx",
38
+ "args": ["agentpay-mcp"],
39
+ "required_env": ["AGENT_PRIVATE_KEY", "AGENT_WALLET_ADDRESS"]
40
+ }
41
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "agentpay-mcp",
3
+ "title": "AgentPay MCP",
4
+ "role": "buyer-side x402 payment-control layer for paid MCP tools",
5
+ "package": "agentpay-mcp",
6
+ "mcp_name": "io.github.up2itnow0822/agentpay",
7
+ "repository": "https://github.com/up2itnow0822/agentpay-mcp",
8
+ "npm": "https://www.npmjs.com/package/agentpay-mcp",
9
+ "install": {
10
+ "command": "npx",
11
+ "args": ["agentpay-mcp"],
12
+ "required_env": ["AGENT_PRIVATE_KEY", "AGENT_WALLET_ADDRESS", "CHAIN_ID", "RPC_URL"]
13
+ },
14
+ "supports": [
15
+ "MCP",
16
+ "x402 payment execution",
17
+ "human approval",
18
+ "per-transaction spend caps",
19
+ "daily spend caps",
20
+ "receipt logging",
21
+ "manifest freshness checks",
22
+ "provider-health checks",
23
+ "quality-threshold checks"
24
+ ],
25
+ "does_not_provide": [
26
+ "managed custody",
27
+ "pooled SaaS token custody",
28
+ "automatic non-EVM signing",
29
+ "task outcome verification",
30
+ "reputation scoring as payment approval"
31
+ ],
32
+ "proofs": [
33
+ "docs/agentpay-five-tool-parity-proof.md",
34
+ "docs/agentpay-escrow-reputation-boundary.md",
35
+ "docs/paid-mcp-proxy-discovery-readiness.md",
36
+ "docs/agentpay-machine-payment-directory-listing.json",
37
+ "docs/x402-dynamic-paid-mcp-manifest-drift.md",
38
+ "docs/paid-provider-health-proof.md",
39
+ "docs/paid-tool-quality-thresholds.md"
40
+ ],
41
+ "settlement_wording": "Buyer-side x402 payment controls with local non-custodial signing. Base/USDC-oriented production signing; unsupported non-EVM rails fail closed until signer, asset, receipt, refund, and settlement semantics are implemented."
42
+ }