@piprail/sdk 2.0.2 → 2.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,53 @@ 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.1] — 2026-06-15 — discoverability polish (post-2.1.0 audit)
8
+
9
+ A consistency patch from a deep docs↔source audit of the 2.1.0 discoverability surface. No
10
+ behaviour change to any working feature.
11
+
12
+ ### Changed
13
+
14
+ - **`DiscoverySort` drops the `'latency'` member** (now `'relevance' | 'reliability' | 'price' |
15
+ 'uptime' | 'name'`). It was a no-op client-side (no latency field is surfaced on a result) and
16
+ was absent from the `piprail_discover` MCP tool enum — removing it makes the type, the tool, and
17
+ the docs agree. Sort by `'reliability'`/`'uptime'` for endpoint health instead.
18
+
19
+ ### Docs
20
+
21
+ - Completed the `piprail_discover` / `piprail_register` argument + result tables on the MCP-tools
22
+ and agent-toolkit reference pages with the 2.1.0 params/fields; added `summary` to the
23
+ `DiscoveryDescriptor` table; clarified that `limit` is a per-index-*request* fetch cap (a
24
+ multi-word query fans out into several). Added a committed discoverability sandbox suite.
25
+
26
+ ## [2.1.0] — 2026-06-15 — discoverability: pinpoint search, richer registration, self-describing endpoints
27
+
28
+ A major upgrade to the discovery surface — making `discover()` find the right resource, `register()`
29
+ make yours findable, and every 402 self-explain to an AI agent. All additive and backward-compatible
30
+ (defaults unchanged); the zero-config 402 stays byte-identical.
31
+
32
+ ### Added
33
+
34
+ - **Pinpoint `discover()`.** Multi-word queries now work: the query is **fanned out per word** to 402
35
+ Index (whose `?q=` is AND-tokenized and would otherwise miss them, capped at 5 requests) and the
36
+ merged results are **ranked client-side by relevance** (name > category/tags > URL path >
37
+ description, with a complete-match bonus). A query like `"crypto price feed"` now lands on the
38
+ right resource where it previously returned nothing. Exposed as `rankResources` / `scoreResource`.
39
+ - **Server-side filters on `discover()`** — `category` (strict), `asset`, `maxPrice`, `minReliability`,
40
+ `verified`, `paymentValid`, `sort` (`DiscoverySort`: `relevance`/`reliability`/`price`/`uptime`/`name`)
41
+ + `order` — pushed to 402 Index where supported, applied client-side where not.
42
+ - **Richer `DiscoveredResource`** — `tags`, `reliabilityScore`, `health`, `verified`, and `score`
43
+ (relevance) so an agent can prefer healthy, verified, on-topic endpoints.
44
+ - **Richer `register()`** — `category` (the top findability lever; most of 402 Index is
45
+ `uncategorized`), `tags` (folded into the description as a searchable keyword tail via the new
46
+ `appendKeywords` helper, since index search is literal), `provider`, `contactEmail`, `probeBody`.
47
+ - **Self-describing endpoints** — the default-on `extensions.piprail` block gains an optional
48
+ `endpoint` (summary · method · mimeType · input schema · output example) so an AI agent understands
49
+ what an endpoint does, its inputs, and an example output **from the 402 alone, no paid call**. A new
50
+ gate `mimeType` option emits the v2 root `resource.mimeType`; the `discovery` descriptor gains
51
+ `summary` and now lights up BOTH the index-facing `extensions.bazaar` block and the agent-facing
52
+ `extensions.piprail.endpoint`. `gate.describe()` carries `mimeType`. Exposed as `buildEndpointInfo`.
53
+
7
54
  ## [2.0.2] — 2026-06-15 — docs/JSDoc accuracy (no code change)
8
55
 
9
56
  A documentation-accuracy patch from a final repo-wide doc↔source sweep. **No behaviour or API
@@ -1149,6 +1196,8 @@ straight into your wallet. The API is small and self-contained.
1149
1196
  to your wallet; PipRail never holds funds.
1150
1197
  - `viem ^2.21` is a peer dependency. Node 20+ or a modern browser.
1151
1198
 
1199
+ [2.1.1]: https://www.npmjs.com/package/@piprail/sdk
1200
+ [2.1.0]: https://www.npmjs.com/package/@piprail/sdk
1152
1201
  [2.0.2]: https://www.npmjs.com/package/@piprail/sdk
1153
1202
  [2.0.1]: https://www.npmjs.com/package/@piprail/sdk
1154
1203
  [2.0.0]: https://www.npmjs.com/package/@piprail/sdk