@stellar-agent-services/dev-mcp 0.0.0-stage → 0.1.1

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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -2
  3. package/dist/docs.d.ts +35 -0
  4. package/dist/docs.d.ts.map +1 -0
  5. package/dist/docs.js +92 -0
  6. package/dist/docs.js.map +1 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +6 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/server.d.ts +14 -0
  12. package/dist/server.d.ts.map +1 -0
  13. package/dist/server.js +125 -0
  14. package/dist/server.js.map +1 -0
  15. package/package.json +40 -4
  16. package/repository/AGENTS.md +162 -0
  17. package/repository/CONTRIBUTING.md +95 -0
  18. package/repository/IMPLEMENTATION_PLAN.md +560 -0
  19. package/repository/README.md +80 -0
  20. package/repository/SECURITY.md +22 -0
  21. package/repository/apps/wallet/README.md +78 -0
  22. package/repository/docs/client-integration/README-AI.md +495 -0
  23. package/repository/docs/client-integration/README.md +138 -0
  24. package/repository/docs/dx-improvements.md +670 -0
  25. package/repository/docs/erc-compatibility.md +163 -0
  26. package/repository/docs/job-recovery.md +201 -0
  27. package/repository/docs/payment-client.md +290 -0
  28. package/repository/docs/provider-setup-guide.md +348 -0
  29. package/repository/docs/provider-standard.md +728 -0
  30. package/repository/docs/recovery/README-AI.md +288 -0
  31. package/repository/docs/recovery/README.md +119 -0
  32. package/repository/docs/sow-closeout.md +67 -0
  33. package/repository/docs/standard/README-AI.md +614 -0
  34. package/repository/docs/standard/README.md +108 -0
  35. package/repository/docs/verification.md +504 -0
  36. package/repository/examples/paid-service/README.md +33 -0
  37. package/repository/examples/python-upstream/README.md +44 -0
  38. package/repository/llms.txt +65 -0
  39. package/repository/packages/create-stellar-service/README.md +143 -0
  40. package/repository/packages/dev-mcp/README.md +51 -0
  41. package/repository/packages/payment-client/README.md +98 -0
  42. package/repository/packages/protocol/README.md +15 -0
  43. package/repository/packages/protocol/schemas/manifest.schema.json +272 -0
  44. package/repository/packages/protocol/test-vectors/README.md +45 -0
  45. package/repository/packages/provider-kit/README.md +509 -0
  46. package/repository/packages/provider-kit/schemas/gateway-config.schema.json +140 -0
  47. package/repository/packages/verifier/README.md +131 -0
  48. package/repository/plugins/stellar-agent-services/README.md +31 -0
@@ -0,0 +1,138 @@
1
+ # Payment Client Integrations, in short
2
+
3
+ How a wallet, a payment service or another payment client works with Stellar Agent Services. This page is the short
4
+ version. If you are an AI coding agent, read [README-AI.md](README-AI.md) instead.
5
+
6
+ ## Why it exists
7
+
8
+ Our payment client pays AI services that follow the [Provider Standard](../standard/README.md). The part that keeps
9
+ money safe, the **core**, is the same for everyone. Two parts plug into it:
10
+
11
+ - **Signer:** who holds the key. A browser wallet, a passkey smart account, a policy wallet.
12
+ - **Payment method:** how a payment is made and proven. Today there is one: x402 `exact`, USDC on Stellar.
13
+
14
+ When you plug in, your users can pay every service that follows the standard, and they keep every safety rule. You
15
+ don't build those rules again.
16
+
17
+ ## Pick a path
18
+
19
+ | You have | You build | Examples |
20
+ | --- | --- | --- |
21
+ | A wallet that holds keys | A **signer** adapter, `signer-<name>` | Freighter through Stellar Wallets Kit, an ERC-8196 policy wallet |
22
+ | A new way to pay or to prove a payment | A **payment method** adapter, `method-<name>` | A smart account that signs in its own format. A new x402 scheme, which needs a change to the standard first. |
23
+ | Your own agent, wallet or app | A **native client** that follows the standard's client rules | Your code, with no adapter |
24
+
25
+ ```
26
+ Your app or agent
27
+ │
28
+ ▼
29
+ payment-client core: price check · limits · approval · journal · recovery
30
+ │ │
31
+ ▼ ▼
32
+ Signer: who signs Payment method: how to pay and prove it
33
+ (your wallet) (x402 exact on Stellar, or yours)
34
+ ```
35
+
36
+ ## What the core does for you
37
+
38
+ | Promise | How |
39
+ | --- | --- |
40
+ | The price is checked | The payment request must match the price, payee and network the service published. |
41
+ | Limits are checked | Per-payment and daily limits, plus your wallet's own budget, before anything is signed. |
42
+ | Verification gates apply | Configured risk/level limits require fresh evidence from an application-trusted source; missing evidence blocks signing. |
43
+ | The user approves | Every payment, or only those above an amount the user chose. |
44
+ | One signature per job | Even when a wallet popup is slow or the user clicks twice. |
45
+ | Saved before sending | A journal entry is written before the payment leaves, so a crash never leads to paying twice. |
46
+ | Recovery never pays | A lost answer is fetched again. Nothing is signed again. |
47
+ | "Paid" means proven | The transaction is checked on chain against what the user approved, not against what the service says. |
48
+
49
+ ## What only you can get right
50
+
51
+ The core can't see inside your adapter. In particular, **it does not read what your code signs.** So:
52
+
53
+ **A signer must:**
54
+ - sign only as its own address, and keep that address for as long as it exists
55
+ - sign only what it is asked to sign, and never send a transaction itself
56
+ - report a budget only if the wallet enforces it on chain, in base units, without asking the user anything
57
+ - throw an error when the user cancels or it can't sign
58
+
59
+ **A payment method must:**
60
+ - have a fixed id that it never renames
61
+ - accept only payments it can make
62
+ - sign exactly the approved payment: this asset, this amount, this payee, this network, and nothing else
63
+ - never send or settle the payment itself
64
+ - confirm a payment only when the chain shows what the user approved, never because the service said so
65
+
66
+ ## What we need from you
67
+
68
+ 1. **Your own package** (`signer-<name>` or `method-<name>`). It uses our types. We never depend on it.
69
+ 2. **The conformance checks passing** in your CI. They ship with the payment client.
70
+ 3. **Two testnet runs:** one paid job with your adapter, and one interrupted job recovered with exactly one payment.
71
+ 4. **An adapter card** in your README: what it signs, where keys live, which addresses and networks, whether it has a
72
+ budget, and a security contact. The template is in [README-AI.md §9](README-AI.md#9-adapter-card).
73
+ 5. **Open source code** that we can review.
74
+ 6. **No custody:** an adapter whose server holds users' keys can't be verified.
75
+
76
+ ## What you get from us
77
+
78
+ - The `Signer` and `PaymentMethod` interfaces and the conformance checks
79
+ - Every promise above, plus the journal and recovery, with no extra work
80
+ - An approval screen, spending limits and payment history, in our web app and CLI
81
+ - A code review and a "verified" badge that users see
82
+ - A listing on this page, with a link
83
+ - An example service and failure drills to test against
84
+
85
+ ## Trust levels
86
+
87
+ | Level | Meaning | Users see |
88
+ | --- | --- | --- |
89
+ | Built-in | Ours, inside the payment client | No label |
90
+ | Verified | Passes the checks and the testnet runs, and we reviewed the code | A "verified" badge |
91
+ | Community | Anyone's adapter that we have not reviewed | A warning at setup |
92
+
93
+ ## How to submit
94
+
95
+ 1. Open an issue called **"Integration: \<name\>"** with your adapter card. We confirm the slot, and whether the
96
+ standard needs a change first.
97
+ 2. Build and test the adapter in your own repository.
98
+ 3. Open a pull request here that adds a row to [Listed adapters](#listed-adapters), with the checklist below.
99
+ 4. We review the signing and confirmation code, run the checks and look at the testnet transactions.
100
+ 5. You are listed as Verified. Each new major version is reviewed again.
101
+
102
+ **Pull request checklist** (copy it into the PR description):
103
+
104
+ ```markdown
105
+ - [ ] Adapter card in the package README
106
+ - [ ] Conformance checks pass in CI: <link to the run>
107
+ - [ ] Testnet paid job: <transaction hash>, confirmed by the client
108
+ - [ ] Testnet recovery drill: one job, one transfer: <transaction hash>
109
+ - [ ] The adapter never submits, sends or settles a payment itself
110
+ - [ ] No keys, signed payloads or job tokens in logs or telemetry
111
+ - [ ] Security contact: <email or URL>
112
+ ```
113
+
114
+ ## Listed adapters
115
+
116
+ | Adapter | Slot | Level | Where |
117
+ | --- | --- | --- | --- |
118
+ | Local key (`localKeySigner`) | Signer | Built-in | [payment-client](../../packages/payment-client/src/local-key-signer.ts) |
119
+ | x402 exact on Stellar (`x402-exact-stellar`) | Payment method | Built-in | [payment-client](../../packages/payment-client/src/x402-exact-stellar.ts) |
120
+
121
+ Planned, not built: Stellar Wallets Kit, passkey smart accounts, Eunomia, ERC-8196 policy wallets. See
122
+ [payment-client.md](../payment-client.md#strategies-signers-and-payment-methods).
123
+
124
+ ## Not ready on our side yet
125
+
126
+ - The payment client is at 0.x: a minor release may change the interfaces an adapter implements. Pin its version.
127
+ - The conformance checks don't test what a payment method signs. We check it by hand in review.
128
+ - Smart accounts (`C…`) can't pay through the built-in payment method yet. They need their own method.
129
+ - There is no conformance suite for native clients yet. Test against the example service and its drills.
130
+ - The web app doesn't show trust levels yet.
131
+
132
+ ## Learn more
133
+
134
+ - [AI-readable version](README-AI.md)
135
+ - [Payment client design](../payment-client.md)
136
+ - [Provider Standard, in short](../standard/README.md), and its [client rules](../standard/README-AI.md#14-client-rules-agents-wallets-apps)
137
+ - [Payment client package](../../packages/payment-client/README.md)
138
+ - [Example service](../../examples/paid-service/README.md)