@t2000/cli 0.21.0 → 0.22.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.
@@ -21192,6 +21192,21 @@ function registerReadTools(server, agent) {
21192
21192
  }
21193
21193
  }
21194
21194
  );
21195
+ server.tool(
21196
+ "t2000_services",
21197
+ "Discover available MPP services the agent can pay for with t2000_pay. Returns all services with URLs, endpoints, descriptions, and prices. Use this BEFORE t2000_pay to find the right URL and request format. Includes AI models, search, media, weather, maps, code execution, email, gift cards, physical mail, and more.",
21198
+ {},
21199
+ async () => {
21200
+ try {
21201
+ const res = await fetch("https://mpp.t2000.ai/api/services");
21202
+ if (!res.ok) throw new Error(`Service discovery failed (${res.status})`);
21203
+ const services = await res.json();
21204
+ return { content: [{ type: "text", text: JSON.stringify(services) }] };
21205
+ } catch (err) {
21206
+ return errorResult(err);
21207
+ }
21208
+ }
21209
+ );
21195
21210
  server.tool(
21196
21211
  "t2000_sentinel_list",
21197
21212
  "List active Sui Sentinels \u2014 AI agents with prize pools you can attack. Shows name, attack fee, prize pool, and attack count. Use this for bounty hunting.",
@@ -21716,13 +21731,26 @@ function registerWriteTools(server, agent) {
21716
21731
  );
21717
21732
  server.tool(
21718
21733
  "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.",
21734
+ `Make a paid API request using MPP (Machine Payments Protocol). Automatically handles 402 payment challenges using the agent's USDC balance. Enforces safeguards. Returns the API response and payment receipt.
21735
+
21736
+ IMPORTANT: Use t2000_services first to discover available services and their URLs. All services are at https://mpp.t2000.ai/.
21737
+
21738
+ Common examples:
21739
+ - Chat: POST https://mpp.t2000.ai/openai/v1/chat/completions {"model":"gpt-4o","messages":[...]}
21740
+ - Search: POST https://mpp.t2000.ai/brave/v1/web/search {"q":"query"}
21741
+ - Image: POST https://mpp.t2000.ai/fal/fal-ai/flux/dev {"prompt":"..."}
21742
+ - Weather: POST https://mpp.t2000.ai/openweather/v1/weather {"q":"Tokyo"}
21743
+ - Email: POST https://mpp.t2000.ai/resend/v1/emails {"from":"...","to":"...","subject":"...","text":"..."}
21744
+ - Gift card: POST https://mpp.t2000.ai/reloadly/v1/order {"productId":120,"unitPrice":20,"recipientEmail":"..."}
21745
+ - Postcard: POST https://mpp.t2000.ai/lob/v1/postcards {"to":{"name":"...","address_line1":"...","address_city":"...","address_state":"...","address_zip":"..."},...}
21746
+ - Letter: POST https://mpp.t2000.ai/lob/v1/letters {similar to postcards}
21747
+ - Code exec: POST https://mpp.t2000.ai/judge0/v1/submissions {"source_code":"...","language_id":71}`,
21720
21748
  {
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"),
21749
+ url: external_exports.string().describe("Full URL of the MPP service endpoint (use t2000_services to discover available URLs)"),
21750
+ method: external_exports.enum(["GET", "POST", "PUT", "DELETE"]).default("POST").describe("HTTP method (most services use POST)"),
21751
+ body: external_exports.string().optional().describe("JSON request body (required for POST endpoints)"),
21724
21752
  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)")
21753
+ maxPrice: external_exports.number().default(1).describe("Max USD to pay (default: $1.00). Set higher for gift cards/commerce.")
21726
21754
  },
21727
21755
  async ({ url, method, body, headers, maxPrice }) => {
21728
21756
  try {
@@ -22718,7 +22746,7 @@ async function startMcpServer(opts) {
22718
22746
  );
22719
22747
  process.exit(1);
22720
22748
  }
22721
- const server = new McpServer({ name: "t2000", version: "0.20.1" });
22749
+ const server = new McpServer({ name: "t2000", version: "0.22.0" });
22722
22750
  registerReadTools(server, agent);
22723
22751
  registerWriteTools(server, agent);
22724
22752
  registerSafetyTools(server, agent);
@@ -22729,4 +22757,4 @@ async function startMcpServer(opts) {
22729
22757
  export {
22730
22758
  startMcpServer
22731
22759
  };
22732
- //# sourceMappingURL=dist-7OOZ6NXP.js.map
22760
+ //# sourceMappingURL=dist-BGQK2CN5.js.map