@piprail/sdk 1.14.0 → 1.15.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 (31) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +27 -754
  3. package/dist/{algorand-OIHGJN5S.cjs → algorand-EJ3S2V7E.cjs} +17 -17
  4. package/dist/{algorand-7EUZYL2Z.js → algorand-F3OYB534.js} +1 -1
  5. package/dist/{aptos-WDWZOU25.cjs → aptos-GJGIZHNI.cjs} +16 -16
  6. package/dist/{aptos-CDEYDDM5.js → aptos-SUXOVP7B.js} +1 -1
  7. package/dist/{chunk-H3A4KWLJ.js → chunk-ILPABTI2.js} +6 -0
  8. package/dist/{chunk-FTKVCP6K.cjs → chunk-PA6YD3HL.cjs} +17 -11
  9. package/dist/index.cjs +493 -115
  10. package/dist/index.d.cts +264 -12
  11. package/dist/index.d.ts +264 -12
  12. package/dist/index.js +403 -25
  13. package/dist/{near-DT6LRIKB.js → near-LM7S3WUD.js} +1 -1
  14. package/dist/{near-FUH3VAXT.cjs → near-ZJLZE26R.cjs} +19 -19
  15. package/dist/{solana-QUVXPKBZ.cjs → solana-MPPE6K24.cjs} +14 -14
  16. package/dist/{solana-3TRYD4QB.js → solana-WDKWWF33.js} +1 -1
  17. package/dist/{stellar-IK3UML6O.js → stellar-FIJPQZVW.js} +1 -1
  18. package/dist/{stellar-APZEBFAD.cjs → stellar-XHLLNHQP.cjs} +21 -21
  19. package/dist/{sui-L7BQNJWO.cjs → sui-6CVLEXLA.cjs} +17 -17
  20. package/dist/{sui-VSE63WQM.js → sui-B7AVN7NK.js} +1 -1
  21. package/dist/{ton-QHGQLJX2.js → ton-CHJ26BVA.js} +1 -1
  22. package/dist/{ton-5DLKKOFE.cjs → ton-RNEFN25G.cjs} +14 -14
  23. package/dist/{tron-2N2GA62O.js → tron-DD3JDROV.js} +1 -1
  24. package/dist/{tron-HHIT6WKY.cjs → tron-TKJHNFGM.cjs} +24 -24
  25. package/dist/{xrpl-2GZMDYW5.js → xrpl-GTUPP6SK.js} +1 -1
  26. package/dist/{xrpl-USEG4AHX.cjs → xrpl-XN2NBNGI.cjs} +21 -21
  27. package/package.json +1 -5
  28. package/CHAINS.md +0 -179
  29. package/DISCOVERY.md +0 -420
  30. package/ERRORS.md +0 -269
  31. package/STANDARDS.md +0 -128
package/CHANGELOG.md CHANGED
@@ -4,6 +4,44 @@ All notable changes to `@piprail/sdk` are documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the
5
5
  versions follow [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [1.15.1] — 2026-06-10 — docs consolidation: the README is now a signpost to docs.piprail.com
8
+
9
+ Docs-only. No code, no API, no behaviour change — `dist` is byte-identical.
10
+
11
+ ### Changed
12
+ - **`README.md` trimmed to a signpost.** The full manual now lives at **[docs.piprail.com](https://docs.piprail.com)**, the single source of truth. The README keeps a one-line pitch, install, two tiny examples, and a docs link table.
13
+ - **Slimmer npm tarball.** `CHAINS.md`, `ERRORS.md`, `STANDARDS.md`, and `DISCOVERY.md` are no longer shipped in the package (`files`) — they duplicated the docs site (or are internal contributor contracts). The package now ships `dist` + `README.md` + `CHANGELOG.md` + `LICENSE`.
14
+ - In-repo, `CHAINS.md` and `DISCOVERY.md` are reduced to pointers at the canonical docs; `ERRORS.md` is reframed as the internal driver error contract (the user-facing error model lives at [docs.piprail.com/errors](https://docs.piprail.com/errors/error-model/)).
15
+
16
+ ## [1.15.0] — 2026-06-10 — the trusted agent wallet (budget-bound, time-boxed, asks-first)
17
+
18
+ A minor, fully additive layer — defaults byte-identical, no new error code, protocol
19
+ layer stays viem-free.
20
+
21
+ ### Added — a TIME dimension on `PaymentPolicy` (Mode A)
22
+ - Four opt-in fields make the spend leash a *clock* too: `ttlSeconds` / `expiresAt` (a
23
+ session deadline — past it EVERY pay is refused with `reasonCode:'SESSION_EXPIRED'`,
24
+ TERMINAL) and `windowTotal` + `windowSeconds` (an optional rolling rate-limit, per
25
+ `(network, asset)`). All default off → behaviour unchanged. A half-armed window
26
+ (`windowTotal` without `windowSeconds`) or an unsafe `ttlSeconds` throws at construction.
27
+ - `client.budget(): SessionBudget` and `PaymentPlan.session` surface the remaining money +
28
+ time leash so a headless agent can SEE it before paying. `client.remaining(): SpendRemaining[]`
29
+ gives the per-asset cap, ledger-scoped. All read-only, never throw, process-scoped (reset on restart).
30
+ - `PolicyDecision` gains a typed `code` (`PolicyDenyCode`); `PayBlocker` gains `OUTSIDE_WINDOW`.
31
+
32
+ ### Added — agent ergonomics (the model-facing contract)
33
+ - `PaymentDeclinedError.reasonCode` (`'POLICY' | 'BUDGET' | 'OUTSIDE_WINDOW' | 'SESSION_EXPIRED'
34
+ | 'APPROVAL'`) — a typed discriminator so an agent branches on the cause (and spots a TERMINAL
35
+ decline) without parsing prose. No new `.code`.
36
+ - The `piprail_pay_request` tool now funnels EVERY `PipRailError` into a structured
37
+ `{ ok:false, code, reason, explain, ref?, reasonCode?, declined? }` — never an uncaught crash, so a
38
+ broadcast-but-unconfirmed timeout reaches the agent with its `.ref` and the never-re-pay rule.
39
+ - New pure exports: `summarizePlan` / `explainDecline` / `formatSpendReport` (NL renderers, wired into
40
+ the tool outputs), `classifyChallenge` + `ChallengeTriage` (scheme/chain triage), and
41
+ `PIPRAIL_AGENT_GUIDE` / `agentGuide` (the cross-tool contract).
42
+ - `paymentTools()` now returns **7** tools — the original 5, plus read-only `piprail_budget` and
43
+ `piprail_guide` appended last (the first five are byte-identical in name + order).
44
+
7
45
  ## [1.14.0] — 2026-06-10
8
46
 
9
47
  ### Added — pay the standard `exact` rail (opt-in, EVM + EIP-3009)
@@ -662,6 +700,8 @@ straight into your wallet. The API is small and self-contained.
662
700
  to your wallet; PipRail never holds funds.
663
701
  - `viem ^2.21` is a peer dependency. Node 20+ or a modern browser.
664
702
 
703
+ [1.15.1]: https://www.npmjs.com/package/@piprail/sdk
704
+ [1.15.0]: https://www.npmjs.com/package/@piprail/sdk
665
705
  [1.14.0]: https://www.npmjs.com/package/@piprail/sdk
666
706
  [1.13.1]: https://www.npmjs.com/package/@piprail/sdk
667
707
  [1.13.0]: https://www.npmjs.com/package/@piprail/sdk