@aifinpay/skill 2.9.0 → 2.10.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aifinpay",
|
|
3
3
|
"description": "Payment rail for AI agents: pay for x402 APIs or charge agents for yours.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.10.1",
|
|
5
5
|
"author": { "name": "AiFinPay Support" },
|
|
6
6
|
"homepage": "https://aifinpay.io",
|
|
7
7
|
"repository": "https://github.com/AiFinPay/skill",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## 2.10.1 — restart after env changes, AIFINPAY_HOME on init
|
|
2
|
+
|
|
3
|
+
- Payer guide: owner limits are read when the MCP server starts, so after the
|
|
4
|
+
env changes the client must restart the `aifinpay` server; `agent_reload`
|
|
5
|
+
re-reads only the keystore. Until the restart `payment_setup_status`
|
|
6
|
+
reports `payments_enabled: false`, which the agent reports as expected and
|
|
7
|
+
waits on instead of treating as a refusal.
|
|
8
|
+
- Payer guide: step 3 runs the init command exactly as `next_step` gives it,
|
|
9
|
+
keeping the `AIFINPAY_HOME=…` prefix for a server with its own wallet
|
|
10
|
+
directory, and never replaces a keystore it cannot open.
|
|
11
|
+
- Release target MCP 2.11.1; published baseline checked 2026-10-19
|
|
12
|
+
(MCP 2.11.0, Node SDK 2.8.0).
|
|
13
|
+
|
|
14
|
+
## 2.10.0 — first payment in five steps
|
|
15
|
+
|
|
16
|
+
- Payer guide: a fresh install reaches its first payment in five steps —
|
|
17
|
+
402 → `payment_setup_status` → `npx @aifinpay/mcp init` (no terminal
|
|
18
|
+
needed) → owner funds and enables → `payable_fetch`. "Buy access for this
|
|
19
|
+
site" checks readiness through `payment_setup_status` instead of looking
|
|
20
|
+
for `payable_fetch` in the tool list.
|
|
21
|
+
- Payer guide: `payable_fetch` is always listed on MCP 2.11.0 and answers
|
|
22
|
+
with the setup checklist until the owner has enabled payments; a v1.3
|
|
23
|
+
route that is not live does not mean the network is disabled.
|
|
24
|
+
- Release target MCP 2.11.0 / Node SDK 2.8.0 / Python 2.7.0; published
|
|
25
|
+
baseline checked 2026-10-19 (MCP 2.10.0, Node SDK 2.8.0).
|
|
26
|
+
|
|
1
27
|
## 2.9.0 — reporting cohort source candidate
|
|
2
28
|
|
|
3
29
|
- Align package, lock, plugin and both skill versions with the coordinated
|
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ any client that loads `SKILL.md`).
|
|
|
9
9
|
| `aifinpay` | Paying — agent buys x402-gated API access | `agent/skills/aifinpay/SKILL.md` |
|
|
10
10
|
| `aifinpay-merchant` | Earning — merchant charges agents per request | `agent/skills/aifinpay-merchant/SKILL.md` |
|
|
11
11
|
|
|
12
|
-
Version **2.
|
|
13
|
-
Release target: MCP **2.
|
|
12
|
+
Version **2.10.1** describes the first-payment path for a fresh agent.
|
|
13
|
+
Release target: MCP **2.11.1**, Node SDK **2.8.0**, Python **2.7.0**.
|
|
14
14
|
Reporting release target: Node gate **0.4.0**, Python gate **0.1.3**.
|
|
15
15
|
The merchant guide describes explicit opt-in observations, consent, queue loss
|
|
16
16
|
and producer health using the SDK's reporting v2 contract. It adds no MCP tools
|
|
@@ -6,7 +6,7 @@ description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on an owner-s
|
|
|
6
6
|
wallet, payment history, prepaid quotas and Agent Passport records through
|
|
7
7
|
the AiFinPay MCP server or SDK.
|
|
8
8
|
license: MIT
|
|
9
|
-
version: 2.
|
|
9
|
+
version: 2.10.1
|
|
10
10
|
author: AiFinPay Support
|
|
11
11
|
metadata:
|
|
12
12
|
hermes:
|
|
@@ -61,19 +61,19 @@ your language. There is no "install together" scenario.
|
|
|
61
61
|
|
|
62
62
|
## Version and release status
|
|
63
63
|
|
|
64
|
-
Release target: MCP **2.
|
|
64
|
+
Release target: MCP **2.11.1**, Node SDK **2.8.0**, Python **2.7.0**.
|
|
65
65
|
This skill describes that coordinated package cohort. Check the installed
|
|
66
66
|
versions before using its additional-network instructions; a release target
|
|
67
67
|
does not establish npm/PyPI publication or production network activation.
|
|
68
|
-
Published baseline checked 2026-10-
|
|
68
|
+
Published baseline checked 2026-10-19: MCP **2.11.0**, Node SDK **2.8.0**.
|
|
69
69
|
`payable_fetch` has shipped since MCP 2.2.0, and Base since MCP 2.5.0.
|
|
70
70
|
Published packages remain usable within their documented capabilities.
|
|
71
71
|
|
|
72
72
|
| Surface | Can it pay? |
|
|
73
73
|
|---|---|
|
|
74
|
-
| MCP `@aifinpay/mcp` 2.
|
|
75
|
-
| Node `@aifinpay/agent` 2.
|
|
76
|
-
| Python `aifinpay-agent` 2.
|
|
74
|
+
| MCP `@aifinpay/mcp` 2.11.x | `payable_fetch`, only with a persistent wallet and every owner limit set; it is always listed and, until then, answers with the setup checklist instead of signing. `payment_setup_status` is the read-only checklist with one `next_step`. Polygon is the default; other networks require explicit `AIFINPAY_PAY_CHAIN`. The merchant and backend must authorize and serve that network. `scope: "merchant"` buys a site-wide batch. |
|
|
75
|
+
| Node `@aifinpay/agent` 2.8.x | `fetchPaid` with a v14 journal, gas cap and owner budgets. Select another network with `v14.chain`; select a pinned stablecoin with `v14.asset`. Native payments require an independent native/USD rate. |
|
|
76
|
+
| Python `aifinpay-agent` 2.7.x | `agent.fetch_paid(url, allowed_origins=…, max_amount_usd=…, daily_amount_usd=…)`; use explicit `chain` and the chain's native gas cap for another network, or a pinned stablecoin `asset`. `agent.recover_paid(journal_path)` recovers the original transaction. |
|
|
77
77
|
|
|
78
78
|
The client descriptors below are shared by the target cohort. They do not
|
|
79
79
|
activate a deployment, enroll a merchant or prove a completed payment.
|
|
@@ -166,12 +166,63 @@ or event log alone does not prove a valid paid request.
|
|
|
166
166
|
|
|
167
167
|
# AiFinPay agent workflow
|
|
168
168
|
|
|
169
|
-
Use the tools actually returned by MCP tools/list. MCP 2.
|
|
169
|
+
Use the tools actually returned by MCP tools/list. MCP 2.11.0 exposes
|
|
170
170
|
agent_address, agent_reload, agent_claim_self, agent_history, agent_quota,
|
|
171
|
-
agent_passport_resolve, settlement_routes, settlement_invoice
|
|
172
|
-
deployment_info
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
agent_passport_resolve, settlement_routes, settlement_invoice,
|
|
172
|
+
deployment_info, `payment_setup_status` and `payable_fetch`. `payable_fetch`
|
|
173
|
+
is listed from the first start; until the owner has enabled payments and set
|
|
174
|
+
every limit it returns the same checklist as `payment_setup_status` and signs
|
|
175
|
+
nothing. With AIFINPAY_MODE=dev it also exposes dev_payment_quote. Never tell
|
|
176
|
+
a user a payment was sent because a quote or invoice was created.
|
|
177
|
+
|
|
178
|
+
`settlement_routes` lists the AIFP-1 v1.4 routes first (Polygon and Base,
|
|
179
|
+
`live: true` when served) and the older splitter v1.3 routes under
|
|
180
|
+
`legacy_v13`. Only the v1.4 section says whether `payable_fetch` can pay; a
|
|
181
|
+
v1.3 route marked not live does not mean the network is disabled.
|
|
182
|
+
|
|
183
|
+
## First payment in five steps
|
|
184
|
+
|
|
185
|
+
A fresh install reaches its first payment in five steps. Each one is a
|
|
186
|
+
single tool call or command; signing happens only in step 5, and only after
|
|
187
|
+
the owner has set every limit in step 4. Do not improvise around a missing
|
|
188
|
+
step — no key handling of your own, no funding of an ephemeral address.
|
|
189
|
+
|
|
190
|
+
1. **Read the price.** `GET` the resource. The `402` names the merchant
|
|
191
|
+
(`merchant_id`), the price per request and the smallest batch (for
|
|
192
|
+
example `$0.10` for 200 standard requests).
|
|
193
|
+
2. **Check the setup.** Call `payment_setup_status`. It returns the wallet
|
|
194
|
+
(`persistent` or ephemeral), `payments_enabled`, which owner limits are
|
|
195
|
+
set, the balance when the RPC answers, `ready`, and `next_step` — the one
|
|
196
|
+
thing still missing. Follow `next_step`; do not skip ahead.
|
|
197
|
+
3. **Persistent wallet.** If `wallet.persistent` is false, run the exact
|
|
198
|
+
command in `next_step` (it is `npx @aifinpay/mcp init`, prefixed with
|
|
199
|
+
`AIFINPAY_HOME=…` when the server uses its own wallet directory — keep
|
|
200
|
+
that prefix, or the server will not see the keystore). Without a terminal
|
|
201
|
+
init does not prompt: it generates the passphrase, writes the keystore and
|
|
202
|
+
prints one JSON document with `addresses` and an `env` block. Put that
|
|
203
|
+
`env` into the `aifinpay` server entry of the MCP client config (the
|
|
204
|
+
passphrase is only there — the output is a secret, and a second run never
|
|
205
|
+
reprints it), then call `agent_reload`: it reads the keystore and switches
|
|
206
|
+
this server to the persistent wallet. If init answers that a keystore
|
|
207
|
+
already exists and cannot be opened, do not delete or replace it: follow
|
|
208
|
+
its `next_step` and start a new wallet directory. Never fund an ephemeral
|
|
209
|
+
address.
|
|
210
|
+
4. **Fund and enable.** Tell the owner `addresses.evm` and the amount: the
|
|
211
|
+
batch price in the pay chain's native currency plus the gas cap (on
|
|
212
|
+
Polygon, about `0.5 POL` covers one `$0.10` batch plus a `0.3 POL` cap).
|
|
213
|
+
When the owner confirms funding, they add the payment settings from
|
|
214
|
+
"Paying with payable_fetch" below — with their real origin and limits —
|
|
215
|
+
to the same `env`. **Limits are read only when the server starts**:
|
|
216
|
+
`agent_reload` re-reads the keystore and nothing else, so after the env
|
|
217
|
+
changes the client has to restart the `aifinpay` MCP server (restart the
|
|
218
|
+
client, or disable and re-enable the server in it). Until that restart
|
|
219
|
+
`payment_setup_status` keeps reporting `payments_enabled: false`; that is
|
|
220
|
+
expected, not a refusal — say so, ask the owner for the restart, and stop.
|
|
221
|
+
After it, `payment_setup_status` reports `ready: true`. Funding, origins
|
|
222
|
+
and limits are the owner's decisions; never choose them yourself.
|
|
223
|
+
5. **Pay.** `payable_fetch({"url":"<origin><path>"})` (add
|
|
224
|
+
`"scope":"merchant"` for a site-wide batch) buys the batch and returns the
|
|
225
|
+
content with the receipt summary. Later requests reuse the batch.
|
|
175
226
|
|
|
176
227
|
## "Buy access for this site"
|
|
177
228
|
|
|
@@ -193,13 +244,15 @@ into ratersapp.com", "купи доступ до цього сайту". Handle
|
|
|
193
244
|
the same $0.10 is 200 standard or 20 premium requests in any mix. Gas is
|
|
194
245
|
separate, in the selected network's native currency. Use the display rules
|
|
195
246
|
in "Transaction display" below.
|
|
196
|
-
4. **Check readiness.** `
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
`AIFINPAY_GATEWAY_PATH_MODE=direct` when the 402 comes from the site
|
|
201
|
-
— and stop
|
|
202
|
-
|
|
247
|
+
4. **Check readiness.** Call `payment_setup_status`. If it is not `ready`,
|
|
248
|
+
follow its `next_step` through "First payment in five steps" above: a
|
|
249
|
+
persistent wallet first, then the owner's funding and environment block
|
|
250
|
+
with this origin in `AIFINPAY_GATEWAY_ORIGINS` (and
|
|
251
|
+
`AIFINPAY_GATEWAY_PATH_MODE=direct` when the 402 comes from the site
|
|
252
|
+
itself) — and stop until the owner has done their part. Env changes take
|
|
253
|
+
effect only after the client restarts the `aifinpay` server; `agent_reload`
|
|
254
|
+
does not read them. Adding a site, raising a limit and funding the wallet
|
|
255
|
+
are the owner's decisions; never make them on your own initiative.
|
|
203
256
|
5. **Buy.** `payable_fetch({"url":"<origin><path>","scope":"merchant"})`, where
|
|
204
257
|
the path is what the owner wants to read, or a standard resource from the
|
|
205
258
|
discovery document.
|
|
@@ -241,8 +294,10 @@ To pay in **USDC** instead, the owner also sets `"AIFINPAY_PAY_ASSET": "USDC"`:
|
|
|
241
294
|
the wallet then needs USDC for the batch plus POL for the worst-case gas (about
|
|
242
295
|
0.21 POL at ~280 gwei), because the tool approves exactly the batch amount and
|
|
243
296
|
then settles — two transactions, both within `AIFINPAY_MAX_GAS_POL`. Use an existing persistent
|
|
244
|
-
wallet or create one with `npx @aifinpay/mcp init` (a
|
|
245
|
-
|
|
297
|
+
wallet or create one with `npx @aifinpay/mcp init` (on a terminal it asks for
|
|
298
|
+
a passphrase; without one it generates it and prints the `env` block to put
|
|
299
|
+
into the MCP client config — the server's env needs that same
|
|
300
|
+
`AIFINPAY_WALLET_PASSPHRASE`, or every start mints a new ephemeral wallet);
|
|
246
301
|
fund its EVM address on Polygon with POL, or with USDC plus some POL. Funding a wallet does not establish
|
|
247
302
|
unlimited spend authority. Use the owner's actual approved limits and origins,
|
|
248
303
|
then call `payable_fetch({"url":"https://merchant.example/api/data"})`.
|
|
@@ -4,7 +4,7 @@ description: Configure an HTTP 402 gate for agent access to a website or API,
|
|
|
4
4
|
with owner-selected routes, verified payouts and explicitly accepted EVM
|
|
5
5
|
networks. Agents settle from their own wallets; the merchant receives 99%.
|
|
6
6
|
license: MIT
|
|
7
|
-
version: 2.
|
|
7
|
+
version: 2.10.1
|
|
8
8
|
author: AiFinPay Support
|
|
9
9
|
metadata:
|
|
10
10
|
hermes:
|
|
@@ -155,7 +155,7 @@ Gate 0.3.3 source adds `instructions_url` (payer skill),
|
|
|
155
155
|
links to maintained public instructions, not stored wallet or receipt data.
|
|
156
156
|
Existing sites must upgrade/redeploy gate to emit those new fields.
|
|
157
157
|
|
|
158
|
-
Release target: MCP **2.
|
|
158
|
+
Release target: MCP **2.11.1**, Node SDK **2.8.0**, Python **2.7.0**.
|
|
159
159
|
This coordinated target does not establish publication or reporting rollout.
|
|
160
160
|
Those clients
|
|
161
161
|
reuse the signed v1.4 payment kernel for nine EVM network descriptors; network
|
package/package.json
CHANGED