@piprail/sdk 2.0.1 → 2.1.0

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,52 @@ 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
+ ## [2.1.0] — 2026-06-15 — discoverability: pinpoint search, richer registration, self-describing endpoints
8
+
9
+ A major upgrade to the discovery surface — making `discover()` find the right resource, `register()`
10
+ make yours findable, and every 402 self-explain to an AI agent. All additive and backward-compatible
11
+ (defaults unchanged); the zero-config 402 stays byte-identical.
12
+
13
+ ### Added
14
+
15
+ - **Pinpoint `discover()`.** Multi-word queries now work: the query is **fanned out per word** to 402
16
+ Index (whose `?q=` is AND-tokenized and would otherwise miss them, capped at 5 requests) and the
17
+ merged results are **ranked client-side by relevance** (name > category/tags > URL path >
18
+ description, with a complete-match bonus). A query like `"crypto price feed"` now lands on the
19
+ right resource where it previously returned nothing. Exposed as `rankResources` / `scoreResource`.
20
+ - **Server-side filters on `discover()`** — `category` (strict), `asset`, `maxPrice`, `minReliability`,
21
+ `verified`, `paymentValid`, `sort` (`DiscoverySort`: `relevance`/`reliability`/`price`/`uptime`/`name`)
22
+ + `order` — pushed to 402 Index where supported, applied client-side where not.
23
+ - **Richer `DiscoveredResource`** — `tags`, `reliabilityScore`, `health`, `verified`, and `score`
24
+ (relevance) so an agent can prefer healthy, verified, on-topic endpoints.
25
+ - **Richer `register()`** — `category` (the top findability lever; most of 402 Index is
26
+ `uncategorized`), `tags` (folded into the description as a searchable keyword tail via the new
27
+ `appendKeywords` helper, since index search is literal), `provider`, `contactEmail`, `probeBody`.
28
+ - **Self-describing endpoints** — the default-on `extensions.piprail` block gains an optional
29
+ `endpoint` (summary · method · mimeType · input schema · output example) so an AI agent understands
30
+ what an endpoint does, its inputs, and an example output **from the 402 alone, no paid call**. A new
31
+ gate `mimeType` option emits the v2 root `resource.mimeType`; the `discovery` descriptor gains
32
+ `summary` and now lights up BOTH the index-facing `extensions.bazaar` block and the agent-facing
33
+ `extensions.piprail.endpoint`. `gate.describe()` carries `mimeType`. Exposed as `buildEndpointInfo`.
34
+
35
+ ## [2.0.2] — 2026-06-15 — docs/JSDoc accuracy (no code change)
36
+
37
+ A documentation-accuracy patch from a final repo-wide doc↔source sweep. **No behaviour or API
38
+ change** — published purely to refresh the shipped TypeScript JSDoc + npm README.
39
+
40
+ ### Fixed
41
+
42
+ - **`payExact` SPI JSDoc** (`drivers/types.ts`) said "EVM + EIP-3009 only" — corrected to
43
+ "EVM EIP-3009/Permit2 + Solana SVM", matching the shipped Solana `exact` buyer rail.
44
+ - **`WalletInput` JSDoc** notes Tron accepts its hex `key` with or without the `0x` prefix.
45
+ - **`ERRORS.md`**: added the `WALLET_REQUIRED` / `WalletRequiredError` row to §2; included Aptos in
46
+ the no-receive-prerequisite list (§6.1); and corrected `UNSUPPORTED_SCHEME` to reflect that
47
+ `exact` now ships on **EVM + Solana** (not EVM-only).
48
+
49
+ (Docs-site + `llms.txt` accuracy fixes — TON `estimateCost` `cost` fields, the MCP read-only tool
50
+ count, the `paymentTools` 7-tool list, the Kaia USDT default, and the additional `@piprail/mcp`
51
+ library exports — shipped in the same sweep via the docs/site deploy.)
52
+
7
53
  ## [2.0.1] — 2026-06-15 — clearer typed errors (robustness; no API change)
8
54
 
9
55
  A patch release hardening error reporting at every wrong-input boundary — found by a
@@ -1131,6 +1177,8 @@ straight into your wallet. The API is small and self-contained.
1131
1177
  to your wallet; PipRail never holds funds.
1132
1178
  - `viem ^2.21` is a peer dependency. Node 20+ or a modern browser.
1133
1179
 
1180
+ [2.1.0]: https://www.npmjs.com/package/@piprail/sdk
1181
+ [2.0.2]: https://www.npmjs.com/package/@piprail/sdk
1134
1182
  [2.0.1]: https://www.npmjs.com/package/@piprail/sdk
1135
1183
  [2.0.0]: https://www.npmjs.com/package/@piprail/sdk
1136
1184
  [1.25.0]: https://www.npmjs.com/package/@piprail/sdk