@agent-fuel/sdk 0.2.0 → 0.3.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
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to `@agent-fuel/sdk` are documented here. Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this package follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## [0.3.0] — 2026-05-31
6
+
7
+ ### Added
8
+
9
+ - `agent-fuel` CLI binary. Same install (`npm i -g @agent-fuel/sdk` or `npx @agent-fuel/sdk …`), three command surfaces:
10
+ - **Read** (no key) — `score <agent>`, `vault <owner> <agent>`, `policy <owner> <agent>`, `service <authority>`. Hit the live backend / on-chain account directly, no setup needed: `npx @agent-fuel/sdk vault <owner> <agent>` works out of the box.
11
+ - **Action** (`--keypair`) — `pay`, `request-spend`, `register-service`. Same primitives as the JS surface, with keypairs loaded from `solana-keygen`-style JSON files.
12
+ - **Dev** — `keygen [--out path]` (writes a fresh keypair; pubkey to stdout, secret to stderr so you can redirect), `--version`, `--help`.
13
+ - Global flags: `--cluster <name>` (default `devnet`), `--rpc <url>` override, `--api-base <url>` (default `https://api.agentfuel.online`), `--json` for machine-readable output piping into `jq`.
14
+
5
15
  ## [0.2.0] — 2026-05-31
6
16
 
7
17
  ### Added
package/README.md CHANGED
@@ -2,7 +2,42 @@
2
2
 
3
3
  TypeScript SDK for [Agent Fuel](https://github.com/TODO/agent_fuel) — credit vault + reputation primitives for AI agents on Solana.
4
4
 
5
- > **Status:** `0.1.0`. Full read/write/stream surface live, published to npm with provenance.
5
+ > **Status:** `0.3.0`. Full read/write/stream surface live, plus the `agent-fuel` CLI. Published to npm with provenance.
6
+
7
+ ## CLI
8
+
9
+ Installing the package also installs an `agent-fuel` binary. Read commands work with zero setup over `npx`:
10
+
11
+ ```bash
12
+ npx @agent-fuel/sdk vault <OWNER_PUBKEY> <AGENT_PUBKEY>
13
+ npx @agent-fuel/sdk score <AGENT_PUBKEY>
14
+ npx @agent-fuel/sdk policy <OWNER_PUBKEY> <AGENT_PUBKEY>
15
+ npx @agent-fuel/sdk service <AUTHORITY_PUBKEY>
16
+ ```
17
+
18
+ Action commands take a `solana-keygen`-style keypair JSON:
19
+
20
+ ```bash
21
+ agent-fuel pay \
22
+ --keypair ~/.config/solana/agent.json \
23
+ --service-keypair ~/.config/solana/svc-pyth.json \
24
+ --owner <OWNER_PUBKEY> \
25
+ --amount 0.5
26
+
27
+ agent-fuel request-spend \
28
+ --keypair ~/.config/solana/agent.json \
29
+ --owner <OWNER_PUBKEY> \
30
+ --service <SERVICE_PUBKEY> \
31
+ --amount 30
32
+
33
+ agent-fuel register-service \
34
+ --sponsor ~/.config/solana/id.json \
35
+ --service-keypair ~/.config/solana/svc-pyth.json \
36
+ --name "Pyth BTC Feed" \
37
+ --category DataFeed
38
+ ```
39
+
40
+ Plus `agent-fuel keygen [--out path]` to generate a fresh keypair (pubkey to stdout, secret to stderr — redirect with `2>` to save). Global flags: `--cluster devnet|mainnet-beta|testnet|localnet`, `--rpc <url>`, `--api-base <url>`, `--json` for machine-readable output.
6
41
 
7
42
  ## The six functions
8
43