@aifinpay/skill 2.10.0 → 2.10.2

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.
@@ -12,7 +12,7 @@
12
12
  "name": "aifinpay",
13
13
  "source": "./",
14
14
  "description": "Payment rail skills for paying agents and API merchants.",
15
- "version": "2.10.0",
15
+ "version": "2.10.2",
16
16
  "author": {
17
17
  "name": "AiFinPay Support",
18
18
  "email": "contact@aifinpay.io"
@@ -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.10.0",
4
+ "version": "2.10.2",
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,34 @@
1
+ ## 2.10.2 — funding at today's rate, working limits in the dashboard
2
+
3
+ - Payer guide: step 4 no longer names a POL amount or a POL/USD rate. The
4
+ amount to fund is what `payment_setup_status` prices in `funding` (MCP
5
+ 2.11.3): the smallest batch at today's rate plus the gas cap. When no rate
6
+ can be read, the agent asks the owner for "the batch price in POL at
7
+ today's rate plus the gas cap" and names no number. On 2026-10-19 one
8
+ `$0.10` batch was 1.08 POL while the guide still said 0.5.
9
+ - Payer guide: the env USD values are a ceiling the owner sets once (the
10
+ example block shows `5` and `20` and says they are not a budget); the
11
+ working limits — per-payment cap, daily cap, pause, allowed sites — are the
12
+ dashboard Controls once the agent is claimed with `agent_claim_self`,
13
+ enforced by the backend on every quote and payment. The "link it to the
14
+ owner's dashboard" section says so instead of telling the agent to keep the
15
+ limits in its configuration.
16
+ - Release target MCP 2.11.3 / Node SDK 2.9.0; published baseline checked
17
+ 2026-10-19 (MCP 2.11.2, Node SDK 2.8.0).
18
+
19
+ ## 2.10.1 — restart after env changes, AIFINPAY_HOME on init
20
+
21
+ - Payer guide: owner limits are read when the MCP server starts, so after the
22
+ env changes the client must restart the `aifinpay` server; `agent_reload`
23
+ re-reads only the keystore. Until the restart `payment_setup_status`
24
+ reports `payments_enabled: false`, which the agent reports as expected and
25
+ waits on instead of treating as a refusal.
26
+ - Payer guide: step 3 runs the init command exactly as `next_step` gives it,
27
+ keeping the `AIFINPAY_HOME=…` prefix for a server with its own wallet
28
+ directory, and never replaces a keystore it cannot open.
29
+ - Release target MCP 2.11.1; published baseline checked 2026-10-19
30
+ (MCP 2.11.0, Node SDK 2.8.0).
31
+
1
32
  ## 2.10.0 — first payment in five steps
2
33
 
3
34
  - Payer guide: a fresh install reaches its first payment in five steps —
package/README.md CHANGED
@@ -9,8 +9,10 @@ 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.10.0** describes the first-payment path for a fresh agent.
13
- Release target: MCP **2.11.0**, Node SDK **2.8.0**, Python **2.7.0**.
12
+ Version **2.10.2** describes the first-payment path for a fresh agent, with
13
+ the funding amount priced at today's rate and the owner's working limits in
14
+ the dashboard.
15
+ Release target: MCP **2.11.3**, Node SDK **2.9.0**, Python **2.7.0**.
14
16
  Reporting release target: Node gate **0.4.0**, Python gate **0.1.3**.
15
17
  The merchant guide describes explicit opt-in observations, consent, queue loss
16
18
  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.10.0
9
+ version: 2.10.2
10
10
  author: AiFinPay Support
11
11
  metadata:
12
12
  hermes:
@@ -61,17 +61,17 @@ your language. There is no "install together" scenario.
61
61
 
62
62
  ## Version and release status
63
63
 
64
- Release target: MCP **2.11.0**, Node SDK **2.8.0**, Python **2.7.0**.
64
+ Release target: MCP **2.11.3**, Node SDK **2.9.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-19: MCP **2.10.0**, Node SDK **2.8.0**.
68
+ Published baseline checked 2026-10-19: MCP **2.11.2**, 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.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. |
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` and, from 2.11.3, `funding`: the amount to fund at today's rate. 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
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
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
 
@@ -192,23 +192,41 @@ step — no key handling of your own, no funding of an ephemeral address.
192
192
  example `$0.10` for 200 standard requests).
193
193
  2. **Check the setup.** Call `payment_setup_status`. It returns the wallet
194
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
198
- `npx @aifinpay/mcp init`. Without a terminal it does not prompt: it
199
- generates the passphrase, writes the keystore and prints one JSON document
200
- with `addresses` and an `env` block. Put that `env` into the `aifinpay`
201
- server entry of the MCP client config (the passphrase is only there — the
202
- output is a secret, and a second run never reprints it), reconnect the
203
- server, then call `agent_reload`. Never fund an ephemeral address.
195
+ set, the balance when the RPC answers, `funding` (what a persistent wallet
196
+ needs, priced now), `ready`, and `next_step` — the one thing still
197
+ missing. Follow `next_step`; do not skip ahead.
198
+ 3. **Persistent wallet.** If `wallet.persistent` is false, run the exact
199
+ command in `next_step` (it is `npx @aifinpay/mcp init`, prefixed with
200
+ `AIFINPAY_HOME=…` when the server uses its own wallet directory — keep
201
+ that prefix, or the server will not see the keystore). Without a terminal
202
+ init does not prompt: it generates the passphrase, writes the keystore and
203
+ prints one JSON document with `addresses` and an `env` block. Put that
204
+ `env` into the `aifinpay` server entry of the MCP client config (the
205
+ passphrase is only there — the output is a secret, and a second run never
206
+ reprints it), then call `agent_reload`: it reads the keystore and switches
207
+ this server to the persistent wallet. If init answers that a keystore
208
+ already exists and cannot be opened, do not delete or replace it: follow
209
+ its `next_step` and start a new wallet directory. Never fund an ephemeral
210
+ address.
204
211
  4. **Fund and enable.** Tell the owner `addresses.evm` and the amount: the
205
- batch price in the pay chain's native currency plus the gas cap (on
206
- Polygon, about `0.5 POL` covers one `$0.10` batch plus a `0.3 POL` cap).
207
- When the owner confirms funding, they add the payment settings from
208
- "Paying with payable_fetch" below — with their real origin and limits —
209
- to the same `env` and reconnect. `payment_setup_status` then reports
210
- `ready: true`. Funding, origins and limits are the owner's decisions;
211
- never choose them yourself.
212
+ batch price in the pay chain's native currency at today's rate plus the
213
+ gas cap. Take it from `payment_setup_status` — its `funding` field prices
214
+ the smallest batch now and adds the owner's gas cap into `amount`. The
215
+ rate moves (on 2026-10-19 one `$0.10` batch was 1.08 POL), so never
216
+ quote a remembered number; if `funding` has a `rate_error` and no
217
+ `amount`, ask the owner to fund "the batch price in POL at today's rate
218
+ plus the gas cap" and name no number. When the owner confirms funding,
219
+ they add the payment settings from "Paying with payable_fetch" below —
220
+ with their real origin, and USD values that are a ceiling they will not
221
+ need to revisit (the working limits are set in the dashboard, see "After
222
+ creating a wallet") — to the same `env`. **Limits are read only when the server starts**:
223
+ `agent_reload` re-reads the keystore and nothing else, so after the env
224
+ changes the client has to restart the `aifinpay` MCP server (restart the
225
+ client, or disable and re-enable the server in it). Until that restart
226
+ `payment_setup_status` keeps reporting `payments_enabled: false`; that is
227
+ expected, not a refusal — say so, ask the owner for the restart, and stop.
228
+ After it, `payment_setup_status` reports `ready: true`. Funding, origins
229
+ and limits are the owner's decisions; never choose them yourself.
212
230
  5. **Pay.** `payable_fetch({"url":"<origin><path>"})` (add
213
231
  `"scope":"merchant"` for a site-wide batch) buys the batch and returns the
214
232
  content with the receipt summary. Later requests reuse the batch.
@@ -238,9 +256,10 @@ into ratersapp.com", "купи доступ до цього сайту". Handle
238
256
  persistent wallet first, then the owner's funding and environment block
239
257
  with this origin in `AIFINPAY_GATEWAY_ORIGINS` (and
240
258
  `AIFINPAY_GATEWAY_PATH_MODE=direct` when the 402 comes from the site
241
- itself) — and stop until the owner has done their part. Adding a site,
242
- raising a limit and funding the wallet are the owner's decisions; never
243
- make them on your own initiative.
259
+ itself) — and stop until the owner has done their part. Env changes take
260
+ effect only after the client restarts the `aifinpay` server; `agent_reload`
261
+ does not read them. Adding a site, raising a limit and funding the wallet
262
+ are the owner's decisions; never make them on your own initiative.
244
263
  5. **Buy.** `payable_fetch({"url":"<origin><path>","scope":"merchant"})`, where
245
264
  the path is what the owner wants to read, or a standard resource from the
246
265
  discovery document.
@@ -259,21 +278,28 @@ default `scope`.
259
278
 
260
279
  ## Paying with payable_fetch
261
280
 
262
- The owner configures these MCP environment values (example limits only):
281
+ The owner configures these MCP environment values once (example values; the
282
+ USD ones are a ceiling, not a budget):
263
283
 
264
284
  ```json
265
285
  {
266
286
  "AIFINPAY_PAYMENTS_ENABLED": "1",
267
287
  "AIFINPAY_GATEWAY_ORIGINS": "https://merchant.example",
268
288
  "AIFINPAY_GATEWAY_PATH_MODE": "direct",
269
- "AIFINPAY_MAX_USD": "0.15",
270
- "AIFINPAY_DAILY_USD": "1.00",
289
+ "AIFINPAY_MAX_USD": "5",
290
+ "AIFINPAY_DAILY_USD": "20",
271
291
  "AIFINPAY_MAX_GAS_POL": "0.3"
272
292
  }
273
293
  ```
274
294
 
275
- The smallest batch is **$0.10 plus gas** on **Polygon**; keep `AIFINPAY_MAX_USD`
276
- a little above the batch you expect to buy. The gas cap has to cover the
295
+ `AIFINPAY_MAX_USD` and `AIFINPAY_DAILY_USD` are the ceiling the SDK requires
296
+ before it signs with the owner's key: set once, high enough not to need
297
+ revisiting, and left alone. The day-to-day limits — per-payment cap, daily
298
+ cap, pause, allowed sites — are the dashboard **Controls** once the agent is
299
+ claimed (see "After creating a wallet" below); the backend enforces them on
300
+ every quote and payment, with no env change and no server restart. A payment
301
+ has to pass both. The smallest batch is **$0.10 plus gas** on **Polygon**;
302
+ `AIFINPAY_MAX_USD` only has to be at or above the batch. The gas cap has to cover the
277
303
  worst-case fee: at ~280 gwei that is about 0.10 POL for a POL payment and
278
304
  0.21 POL for USDC, and a lower cap refuses before anything is signed. The fee
279
305
  charged is usually a fraction of that, but the wallet must hold the batch plus
@@ -286,8 +312,9 @@ wallet or create one with `npx @aifinpay/mcp init` (on a terminal it asks for
286
312
  a passphrase; without one it generates it and prints the `env` block to put
287
313
  into the MCP client config — the server's env needs that same
288
314
  `AIFINPAY_WALLET_PASSPHRASE`, or every start mints a new ephemeral wallet);
289
- fund its EVM address on Polygon with POL, or with USDC plus some POL. Funding a wallet does not establish
290
- unlimited spend authority. Use the owner's actual approved limits and origins,
315
+ fund its EVM address on Polygon with POL, or with USDC plus some POL, in the
316
+ amount `payment_setup_status` prices. Funding a wallet does not establish
317
+ unlimited spend authority. Use the owner's actual approved origins and ceiling,
291
318
  then call `payable_fetch({"url":"https://merchant.example/api/data"})`.
292
319
 
293
320
  For another network, the owner sets `AIFINPAY_PAY_CHAIN` to an exact name in
@@ -358,10 +385,16 @@ at https://dash.aifinpay.io → My Agents:
358
385
  `agent.sign_dashboard_claim(challenge)` (Python). These sign only
359
386
  `AiFinPay-claim:polygon:<own address>:<nonce>`.
360
387
 
361
- Keep local owner spending limits in the agent's configuration (`AIFINPAY_MAX_USD`,
362
- `AIFINPAY_DAILY_USD`). Claimed-wallet controls in the dashboard are additional
363
- backend restrictions on quotes and gateway access; they do not replace local
364
- limits or control transactions sent directly outside AiFinPay.
388
+ Once the agent is claimed, the dashboard is where the owner manages its
389
+ working limits: **Controls** on the agent's page sets the per-payment cap, the
390
+ daily cap, pause and the allowed sites, and the backend enforces that policy
391
+ on every `/v1/quote` and `/v1/pay` for the claimed agent — no env change, no
392
+ server restart. The env values (`AIFINPAY_MAX_USD`, `AIFINPAY_DAILY_USD`, the
393
+ gas cap, the origins) stay as the ceiling the SDK requires before it signs;
394
+ they do not replace the dashboard, and the dashboard does not replace them —
395
+ a payment has to pass both. Dashboard controls do not reach transactions sent
396
+ directly outside AiFinPay. After `agent_claim_self`, point the owner at
397
+ Controls rather than at the config file when they want to change a limit.
365
398
 
366
399
  Discover routes on the exact requested origin: `/.well-known/x402.json` and any
367
400
  API catalog linked by that site. A dev hostname does not imply testnet. If a
@@ -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.10.0
7
+ version: 2.10.2
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.11.0**, Node SDK **2.8.0**, Python **2.7.0**.
158
+ Release target: MCP **2.11.3**, Node SDK **2.9.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aifinpay/skill",
3
- "version": "2.10.0",
3
+ "version": "2.10.2",
4
4
  "description": "AiFinPay agent skills: pay for x402-gated APIs as an agent (aifinpay) and charge agents for your API as a merchant (aifinpay-merchant).",
5
5
  "type": "module",
6
6
  "files": [