Releases: mdlog/AgentGate
Releases · mdlog/AgentGate
Release list
v0.1.2
Published to npm as @mdlog/agentgate@0.1.2.
Changes
- New command:
agentgate buy <id>— the buyer side in one command. Runs the full x402 exchange: fetch the402invoice, pay it with a native CSPR transfer carrying the invoice nonce astransfer_id, retry with theX-PAYMENTproof. Response body goes to stdout (pipeable); the payment receipt (price, deploy hash, explorer link, settlement) goes to stderr. --max <cspr>budget cap — refuses any invoice priced above it (PRICE_EXCEEDED), checked against both the on-chain price (before any HTTP) and the 402 invoice (before paying). Unknown (SERVICE_NOT_FOUND) and paused (SERVICE_INACTIVE) services fail fast before a single mote moves; non-JSON--bodyis rejected up front.- Buyer signer per mode:
MOCK_BUYER_ACCOUNT(mock),--pem/BUYER_SIGNER_PEM_PATH(live) — forbuy,--pemmeans the buyer key. @agentgate/clientis now inlined into the published bundle, keepingnpxself-contained.- Docs: full
buyreference on the docs site, buyer-guide one-liner,docs/BUY-QUICKSTART.md. - No contract change — payment is a plain native transfer; the deployed registry is untouched.
Install
npx @mdlog/agentgate@latest buy 1 --pem ./buyer.pem --max 5v0.1.1
Published to npm as @mdlog/agentgate@0.1.1.
Changes
- CLI now prints the hosted dashboard URL (
https://agentgate.mdloglabs.org/services/<id>) for a wrapped service in live mode; mock mode still links tohttp://localhost:<port>. - Added
DEFAULT_DASHBOARD_URLto shared config, mirroringDEFAULT_GATEWAY_URL. - Added
docs/WRAP-QUICKSTART.md— runagentgate wrapon a fresh machine (Node ≥ 22, funded Testnet PEM, zero env vars).
Install
npx @mdlog/agentgate@latest wrap https://api.example.com/gold --price 0.5 --name "Gold Spot Feed" --pem ./key.pemv0.1.0 — @mdlog/agentgate on npm
npx @mdlog/agentgate — wrap any HTTP API into a paid x402 service on Casper, or read the live on-chain catalog with zero setup.
npx @mdlog/agentgate list # live on-chain catalog — zero config, no keys
npx @mdlog/agentgate wrap <url> --price 0.5 --name "X" --pem ./key.pemHighlights
- Zero-env reads (
list/status) against Casper Testnet — resolves the registry contract via public node RPC, no CSPR.cloud key. - One-line
wrap— the only thing besides the args is your funded wallet key (--pem); it registers on-chain and self-maps on the gateway. - Owner-signature self-service gateway mapping (
POST /services/:id/map) — no shared admin token. - Inline config flags (
--mode/--node-url/--registry/--pem/--api-key/--admin-token), precedence flag > env > default. - Hosted gateway live at https://gateway.mdloglabs.org.