@piprail/sdk 2.0.2 → 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 +29 -0
- package/dist/index.cjs +307 -84
- package/dist/index.d.cts +202 -8
- package/dist/index.d.ts +202 -8
- package/dist/index.js +247 -24
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ 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
|
+
|
|
7
35
|
## [2.0.2] — 2026-06-15 — docs/JSDoc accuracy (no code change)
|
|
8
36
|
|
|
9
37
|
A documentation-accuracy patch from a final repo-wide doc↔source sweep. **No behaviour or API
|
|
@@ -1149,6 +1177,7 @@ straight into your wallet. The API is small and self-contained.
|
|
|
1149
1177
|
to your wallet; PipRail never holds funds.
|
|
1150
1178
|
- `viem ^2.21` is a peer dependency. Node 20+ or a modern browser.
|
|
1151
1179
|
|
|
1180
|
+
[2.1.0]: https://www.npmjs.com/package/@piprail/sdk
|
|
1152
1181
|
[2.0.2]: https://www.npmjs.com/package/@piprail/sdk
|
|
1153
1182
|
[2.0.1]: https://www.npmjs.com/package/@piprail/sdk
|
|
1154
1183
|
[2.0.0]: https://www.npmjs.com/package/@piprail/sdk
|