@t2000/sdk 0.11.0 → 0.11.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@ The complete TypeScript SDK for AI agent bank accounts on Sui. Send USDC, earn y
5
5
  [![npm](https://img.shields.io/npm/v/@t2000/sdk)](https://www.npmjs.com/package/@t2000/sdk)
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)** · **[CLI](https://www.npmjs.com/package/@t2000/cli)** · **[x402](https://www.npmjs.com/package/@t2000/x402)**
8
+ **[Website](https://t2000.ai)** · **[GitHub](https://github.com/mission69b/t2000)** · **[CLI](https://www.npmjs.com/package/@t2000/cli)** · **[x402](https://www.npmjs.com/package/@t2000/x402)** · **[MCP](https://www.npmjs.com/package/@t2000/mcp)**
9
9
 
10
10
  ## Installation
11
11
 
@@ -335,6 +335,10 @@ pnpm --filter @t2000/sdk test
335
335
 
336
336
  Fees are collected by the t2000 protocol treasury on-chain.
337
337
 
338
+ ## MCP Server
339
+
340
+ The SDK powers the [`@t2000/mcp`](https://www.npmjs.com/package/@t2000/mcp) server — 16 tools and 3 prompts for Claude Desktop, Cursor, and any MCP-compatible AI platform. Run `t2000 mcp` to start.
341
+
338
342
  ## License
339
343
 
340
344
  MIT — see [LICENSE](https://github.com/mission69b/t2000/blob/main/LICENSE)
package/dist/index.cjs CHANGED
@@ -2607,12 +2607,16 @@ var SafeguardEnforcer = class {
2607
2607
  }
2608
2608
  }
2609
2609
  assertNotLocked() {
2610
+ this.load();
2610
2611
  if (this.config.locked) {
2611
2612
  throw new SafeguardError("locked", {});
2612
2613
  }
2613
2614
  }
2614
2615
  check(metadata) {
2615
- this.assertNotLocked();
2616
+ this.load();
2617
+ if (this.config.locked) {
2618
+ throw new SafeguardError("locked", {});
2619
+ }
2616
2620
  if (!OUTBOUND_OPS.has(metadata.operation)) return;
2617
2621
  const amount = metadata.amount ?? 0;
2618
2622
  if (this.config.maxPerTx > 0 && amount > this.config.maxPerTx) {
@@ -2654,6 +2658,7 @@ var SafeguardEnforcer = class {
2654
2658
  this.save();
2655
2659
  }
2656
2660
  getConfig() {
2661
+ this.load();
2657
2662
  this.resetDailyIfNewDay();
2658
2663
  return { ...this.config };
2659
2664
  }