xytara 3.2.0 → 3.2.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 (2) hide show
  1. package/RELEASE_NOTES.md +7 -8
  2. package/package.json +1 -1
package/RELEASE_NOTES.md CHANGED
@@ -1,9 +1,8 @@
1
- `xytara` 3.2.0 turns the npm package into a thin client for the hosted naxytra runtime. The runtime is a hosted service; this package is the client. The server is not distributed.
1
+ `xytara` 3.2.1 makes paying plug-and-play for every kind of client.
2
2
 
3
- - **What the package now contains** — `client.js` (the entry), the buyer-side `CommerceClient`, the delivery-receipt verifier, the `xytara` / `xytara-run` CLIs, two offline verification scripts, and the docs. Nothing else: no server, no payment or settlement engine, no routing, no state store, no fixtures, adapters, integrations or operator tooling.
4
- - **`require("xytara")` is now the client surface** — `CommerceClient` and the commerce helpers as before, plus `verifyDeliveryReceipt`, `canonicalize`, `hashCanonical`, `keyRef`, `verificationRecipe`, `RECEIPT_VERSION`, the x402 header helpers `encodeX402PaymentHeader` / `decodeX402Header`, an `endpoints` constant (runtime, mcp, website) and `version`. An `exports` map keeps `xytara`, `xytara/client`, `xytara/lib/commerce_client`, `xytara/lib/delivery_receipt_verify`, `xytara/bin/*` and `xytara/package.json` resolvable.
5
- - **Delivery-receipt verification stands alone** — the verification side of `naxytra-delivery-receipt/1` (JCS canonical form, hashes, key refs, verifier, recipe) ships as `lib/delivery_receipt_verify.js`; issuing and signing stay in the hosted runtime and MCP executor.
6
- - **CLI** — `xytara release` is no longer part of the package (it prints a notice and exits 2); `xytara-release` is gone from `bin`. `xytara start-here`, `xytara first-run` and `xytara-run` are unchanged.
7
- - **Release gate** — `npm run verify:release-candidate` now runs with Node built-ins only, asserts the published tarball contains exactly the thin client file list, and runs `scripts/verify_client.js`: an offline check of the package surface, receipt verification (genuine, tampered, stripped, unsigned, untrusted key), the paid command path against a local stub of the runtime (discover, 402 challenge with x402 accepts, paid 200 with a signed receipt), and the CLIs. It also runs inside an installed `node_modules/xytara`.
8
- - **Docs** — README and START_HERE rewritten for the client: hosted endpoints, pricing ($0.01 USDC per call on Base mainnet, $0.001 on Base Sepolia, credits $1.00 = 400), a `CommerceClient` walk-through from discover to a verified receipt, and the public MCP integration guide. Self-hosting text, `npm start` and `.env.example` are gone.
9
- - Published through npm trusted publishing (GitHub OIDC) — no npm token involved.
3
+ - **Free daily allowance** — every caller of the MCP server gets 20 free tool calls per UTC day, no key or wallet needed; each result reports the remaining allowance in `_meta["naxytra.com/allowance"]`.
4
+ - **Spend-key mode** — a prepaid spend credential (`Authorization: Bearer xytara_spend_…`, `X-Naxytra-Key`, or `?key=` on the MCP URL for clients that cannot set headers) pays 3 credits per call from the runtime; failed calls are never debited, and a retried debit with the same id is never charged twice. The self-serve top-up ($1.00 USDC on Base = 400 credits) returns the key.
5
+ - **Balance endpoint** — `GET /v1/credits/balance` with the spend credential; browser-callable (CORS) so the buy and setup pages can show it.
6
+ - **Hosted-deploy hardening** — the credit lifecycle routes (reserve, release, reverse) now require the account's spend credential or the operator token; a bare account id is never authority.
7
+ - **Payment-required results** now explain the allowance, the two ways to continue (spend key or x402) and the price. The server card no longer says "no API keys".
8
+ - Client package (thin): unchanged surface; the MCP server itself is not distributed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xytara",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Client for the hosted naxytra runtime: discover a capability, pay per call with x402 (gasless USDC on Base) or credits, get the deliverable and a signed delivery receipt you can verify offline. The runtime is a hosted service; this package is the client.",
5
5
  "main": "client.js",
6
6
  "exports": {