@t2000/cli 0.20.44 → 0.21.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/README.md CHANGED
@@ -5,7 +5,7 @@ A bank account for AI agents on Sui. Guided setup, MCP integration for Claude De
5
5
  [![npm](https://img.shields.io/npm/v/@t2000/cli)](https://www.npmjs.com/package/@t2000/cli)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- **[Website](https://t2000.ai)** · **[GitHub](https://github.com/mission69b/t2000)** · **[SDK](https://www.npmjs.com/package/@t2000/sdk)** · **[x402](https://www.npmjs.com/package/@t2000/x402)** · **[MCP](https://www.npmjs.com/package/@t2000/mcp)**
8
+ **[Website](https://t2000.ai)** · **[GitHub](https://github.com/mission69b/t2000)** · **[SDK](https://www.npmjs.com/package/@t2000/sdk)** · **[MPP](https://www.npmjs.com/package/@t2000/mpp-sui)** · **[MCP](https://www.npmjs.com/package/@t2000/mcp)**
9
9
 
10
10
  ## Installation
11
11
 
@@ -208,11 +208,11 @@ t2000 init
208
208
  | `t2000 earnings` | Yield earned to date |
209
209
  | `t2000 fund-status` | Full savings summary |
210
210
 
211
- ### x402 Payments
211
+ ### MPP Payments
212
212
 
213
213
  | Command | Description |
214
214
  |---------|-------------|
215
- | `t2000 pay <url>` | Pay for an x402-protected API resource |
215
+ | `t2000 pay <url>` | Pay for an MPP-protected API resource |
216
216
  | `t2000 pay <url> --max-price 0.10` | Set max USDC per request (default: $1.00) |
217
217
  | `t2000 pay <url> --method POST --data '{...}'` | POST with JSON body |
218
218
  | `t2000 pay <url> --header 'key=value'` | Add custom HTTP headers (repeatable) |
@@ -382,7 +382,7 @@ All multi-step operations (save with auto-convert, withdraw with auto-swap, reba
382
382
  | Withdraw | Free |
383
383
  | Repay | Free |
384
384
  | Send | Free |
385
- | Pay (x402) | Free |
385
+ | Pay (MPP) | Free |
386
386
 
387
387
  ## File Locations
388
388
 
@@ -21714,6 +21714,27 @@ function registerWriteTools(server, agent) {
21714
21714
  }
21715
21715
  }
21716
21716
  );
21717
+ server.tool(
21718
+ "t2000_pay",
21719
+ "Make a paid API request. Automatically handles MPP 402 payment challenges using the agent's USDC balance. Enforces safeguards. Returns the API response and payment receipt.",
21720
+ {
21721
+ url: external_exports.string().describe("URL of the MPP-protected resource"),
21722
+ method: external_exports.enum(["GET", "POST", "PUT", "DELETE"]).default("GET").describe("HTTP method"),
21723
+ body: external_exports.string().optional().describe("JSON request body"),
21724
+ headers: external_exports.record(external_exports.string()).optional().describe("Additional HTTP headers"),
21725
+ maxPrice: external_exports.number().default(1).describe("Max USD to pay (default: $1.00)")
21726
+ },
21727
+ async ({ url, method, body, headers, maxPrice }) => {
21728
+ try {
21729
+ const result = await mutex.run(
21730
+ () => agent.pay({ url, method, body, headers, maxPrice })
21731
+ );
21732
+ return { content: [{ type: "text", text: JSON.stringify(result) }] };
21733
+ } catch (err) {
21734
+ return errorResult(err);
21735
+ }
21736
+ }
21737
+ );
21717
21738
  server.tool(
21718
21739
  "t2000_sentinel_attack",
21719
21740
  "Attack a Sui Sentinel with a prompt to try to breach its defenses and win the prize pool. Costs SUI (the attack fee). Use t2000_sentinel_list to find targets first.",
@@ -22708,4 +22729,4 @@ async function startMcpServer(opts) {
22708
22729
  export {
22709
22730
  startMcpServer
22710
22731
  };
22711
- //# sourceMappingURL=dist-B43ZP5VT.js.map
22732
+ //# sourceMappingURL=dist-7OOZ6NXP.js.map