@t2000/cli 5.9.0 → 5.10.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.
|
@@ -80332,7 +80332,7 @@ Through this wallet you can reach essentially any major external API, billed to
|
|
|
80332
80332
|
CRITICAL: When the user asks to use any external or paid API, names a provider (e.g. "via fal.ai", "with ElevenLabs"), or requests a capability one of the services above provides, DO NOT say you cannot reach that service, that it isn't on an allowlist, or that there's no connector \u2014 and do NOT fall back to writing a script for the user to run. You CAN do it directly through this wallet. Use t2000_services to discover the endpoint and request shape, then t2000_pay to execute, then show the user the result (display image/audio URLs returned in the response).
|
|
80333
80333
|
|
|
80334
80334
|
Spending is the user's own USDC and every t2000_pay call is bounded by maxPrice. For larger or multi-step spends, state the estimated cost first and proceed once the user is happy. Use t2000_balance to check funds. The v4 wallet is payments-only; savings / lending live on audric.ai.`;
|
|
80335
|
-
var PKG_VERSION = "5.
|
|
80335
|
+
var PKG_VERSION = "5.10.0";
|
|
80336
80336
|
console.log = (...args) => console.error("[log]", ...args);
|
|
80337
80337
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
80338
80338
|
async function startMcpServer(opts) {
|
|
@@ -80398,4 +80398,4 @@ mime-types/index.js:
|
|
|
80398
80398
|
@scure/bip39/index.js:
|
|
80399
80399
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
80400
80400
|
*/
|
|
80401
|
-
//# sourceMappingURL=dist-
|
|
80401
|
+
//# sourceMappingURL=dist-5EASN5MD.js.map
|
package/dist/index.js
CHANGED
|
@@ -32580,7 +32580,7 @@ function registerMcpStart(parent) {
|
|
|
32580
32580
|
parent.command("start", { isDefault: true }).description("Start MCP server (stdio transport \u2014 for AI client integration)").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(async (opts) => {
|
|
32581
32581
|
let mod2;
|
|
32582
32582
|
try {
|
|
32583
|
-
mod2 = await import("./dist-
|
|
32583
|
+
mod2 = await import("./dist-5EASN5MD.js");
|
|
32584
32584
|
} catch {
|
|
32585
32585
|
console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
|
|
32586
32586
|
process.exit(1);
|
|
@@ -33247,7 +33247,7 @@ Subcommands:
|
|
|
33247
33247
|
);
|
|
33248
33248
|
group.command("pay").argument("<seller>", "The seller agent's Sui address").description(
|
|
33249
33249
|
"Pay a seller agent for a service (gateway-mediated, USDC). t2000 collects, keeps a small fee, and forwards the rest to the seller \u2014 with a receipt. [Agent Commerce]"
|
|
33250
|
-
).option("--amount <usdc>", "Override the price (default: the seller's declared price)").option("--max-price <usdc>", "Max USDC to auto-approve (default 1.00, or --amount)").option(
|
|
33250
|
+
).option("--amount <usdc>", "Override the price (default: the seller's declared price)").option("--data <json>", "Service input forwarded to the seller's endpoint").option("--max-price <usdc>", "Max USDC to auto-approve (default 1.00, or --amount)").option(
|
|
33251
33251
|
"--gateway <url>",
|
|
33252
33252
|
`Gateway base URL (default ${DEFAULT_GATEWAY})`
|
|
33253
33253
|
).option("--force", "Override spending limits for this call (see `t2 limit`)").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(
|
|
@@ -33263,7 +33263,13 @@ Subcommands:
|
|
|
33263
33263
|
const gateway = opts.gateway ?? DEFAULT_GATEWAY;
|
|
33264
33264
|
const agent = await withAgent({ keyPath: opts.key });
|
|
33265
33265
|
const url = opts.amount ? `${gateway}/commerce/pay/${seller}?amount=${encodeURIComponent(opts.amount)}` : `${gateway}/commerce/pay/${seller}`;
|
|
33266
|
-
const result = await agent.pay({
|
|
33266
|
+
const result = await agent.pay({
|
|
33267
|
+
url,
|
|
33268
|
+
method: "POST",
|
|
33269
|
+
body: opts.data,
|
|
33270
|
+
maxPrice,
|
|
33271
|
+
force: opts.force
|
|
33272
|
+
});
|
|
33267
33273
|
const body = result.body;
|
|
33268
33274
|
const receipt = body?.receipt;
|
|
33269
33275
|
const paidUsd = typeof receipt?.grossMicros === "number" ? receipt.grossMicros / 1e6 : opts.amount ? Number.parseFloat(opts.amount) : result.cost ?? 0;
|
|
@@ -33273,7 +33279,8 @@ Subcommands:
|
|
|
33273
33279
|
amount: paidUsd,
|
|
33274
33280
|
paid: result.paid,
|
|
33275
33281
|
cost: result.cost,
|
|
33276
|
-
receipt
|
|
33282
|
+
receipt,
|
|
33283
|
+
response: body?.response
|
|
33277
33284
|
});
|
|
33278
33285
|
return;
|
|
33279
33286
|
}
|
|
@@ -33290,6 +33297,11 @@ Subcommands:
|
|
|
33290
33297
|
printKeyValue("Settlement tx", receipt.forwardDigest);
|
|
33291
33298
|
}
|
|
33292
33299
|
}
|
|
33300
|
+
if (body?.response !== void 0) {
|
|
33301
|
+
printBlank();
|
|
33302
|
+
printInfo("Service response:");
|
|
33303
|
+
printLine(JSON.stringify(body.response, null, 2));
|
|
33304
|
+
}
|
|
33293
33305
|
printBlank();
|
|
33294
33306
|
} catch (error) {
|
|
33295
33307
|
handleError(error);
|