@t2000/cli 5.21.0 → 5.23.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/dist/{chunk-MBNGFMZQ.js → chunk-3TZXRO3E.js} +1848 -1015
- package/dist/chunk-3TZXRO3E.js.map +1 -0
- package/dist/{dist-NBK4J54W.js → dist-AFL7T3GQ.js} +2 -2
- package/dist/{dist-FBZWN6ED.js → dist-TCGFVCLO.js} +1399 -558
- package/dist/{dist-FBZWN6ED.js.map → dist-TCGFVCLO.js.map} +1 -1
- package/dist/index.js +47 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-MBNGFMZQ.js.map +0 -1
- /package/dist/{dist-NBK4J54W.js.map → dist-AFL7T3GQ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'module'; import { fileURLToPat
|
|
|
3
3
|
import {
|
|
4
4
|
AggregatorClient,
|
|
5
5
|
Env
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3TZXRO3E.js";
|
|
7
7
|
import {
|
|
8
8
|
BalanceChange,
|
|
9
9
|
BaseClient,
|
|
@@ -32064,7 +32064,7 @@ function receiptLine(receiptId) {
|
|
|
32064
32064
|
printLine(import_picocolors9.default.dim(`\u{1F512} confidential \xB7 attested \xB7 receipt ${receiptId}`));
|
|
32065
32065
|
}
|
|
32066
32066
|
}
|
|
32067
|
-
var DEFAULT_MODEL = "
|
|
32067
|
+
var DEFAULT_MODEL = "openai/gpt-oss-120b";
|
|
32068
32068
|
function numOrUndef(v) {
|
|
32069
32069
|
if (v === void 0) {
|
|
32070
32070
|
return;
|
|
@@ -32577,7 +32577,7 @@ function registerMcpStart(parent) {
|
|
|
32577
32577
|
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) => {
|
|
32578
32578
|
let mod3;
|
|
32579
32579
|
try {
|
|
32580
|
-
mod3 = await import("./dist-
|
|
32580
|
+
mod3 = await import("./dist-TCGFVCLO.js");
|
|
32581
32581
|
} catch {
|
|
32582
32582
|
console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
|
|
32583
32583
|
process.exit(1);
|
|
@@ -32921,6 +32921,27 @@ import { createHash } from "crypto";
|
|
|
32921
32921
|
var DEFAULT_API_BASE3 = process.env.T2000_API_URL ?? "https://api.t2000.ai/v1";
|
|
32922
32922
|
var DEFAULT_GATEWAY = process.env.T2000_GATEWAY_URL ?? "https://mpp.t2000.ai";
|
|
32923
32923
|
var DEFAULT_RAIL = process.env.T2000_RAIL_URL ?? "https://x402.t2000.ai";
|
|
32924
|
+
var AGENT_CATEGORIES = [
|
|
32925
|
+
"ai-models",
|
|
32926
|
+
"data-feeds",
|
|
32927
|
+
"finance",
|
|
32928
|
+
"research",
|
|
32929
|
+
"dev-tools",
|
|
32930
|
+
"creative",
|
|
32931
|
+
"other"
|
|
32932
|
+
];
|
|
32933
|
+
function normalizeCategory(input) {
|
|
32934
|
+
if (input === void 0) {
|
|
32935
|
+
return;
|
|
32936
|
+
}
|
|
32937
|
+
const c = input.trim().toLowerCase();
|
|
32938
|
+
if (!AGENT_CATEGORIES.includes(c)) {
|
|
32939
|
+
throw new Error(
|
|
32940
|
+
`--category must be one of: ${AGENT_CATEGORIES.join(", ")} (got "${input}").`
|
|
32941
|
+
);
|
|
32942
|
+
}
|
|
32943
|
+
return c;
|
|
32944
|
+
}
|
|
32924
32945
|
function collectHeader(value, previous) {
|
|
32925
32946
|
const [key, ...rest] = value.split("=");
|
|
32926
32947
|
if (key && rest.length > 0) {
|
|
@@ -33208,12 +33229,15 @@ Subcommands:
|
|
|
33208
33229
|
).option("--mcp-endpoint <url>", "Your agent service endpoint (https)").option(
|
|
33209
33230
|
"--payment-methods <list>",
|
|
33210
33231
|
'Comma-separated methods you accept, e.g. "x402"'
|
|
33211
|
-
).option("--price <usdc>", "Price per call in USDC (e.g. 0.02) \u2014 buyers pay this").option(
|
|
33232
|
+
).option("--price <usdc>", "Price per call in USDC (e.g. 0.02) \u2014 buyers pay this").option(
|
|
33233
|
+
"--category <category>",
|
|
33234
|
+
`Storefront category: ${AGENT_CATEGORIES.join(" | ")}`
|
|
33235
|
+
).option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").option("--api <url>", `API base URL (default ${DEFAULT_API_BASE3})`).action(
|
|
33212
33236
|
async (opts) => {
|
|
33213
33237
|
try {
|
|
33214
|
-
if (opts.mcpEndpoint === void 0 && opts.paymentMethods === void 0 && opts.price === void 0) {
|
|
33238
|
+
if (opts.mcpEndpoint === void 0 && opts.paymentMethods === void 0 && opts.price === void 0 && opts.category === void 0) {
|
|
33215
33239
|
throw new Error(
|
|
33216
|
-
'Provide at least one of --mcp-endpoint, --payment-methods, --price. (Pass --mcp-endpoint "" to clear your endpoint.)'
|
|
33240
|
+
'Provide at least one of --mcp-endpoint, --payment-methods, --price, --category. (Pass --mcp-endpoint "" to clear your endpoint.)'
|
|
33217
33241
|
);
|
|
33218
33242
|
}
|
|
33219
33243
|
if (opts.price !== void 0) {
|
|
@@ -33222,6 +33246,7 @@ Subcommands:
|
|
|
33222
33246
|
throw new Error(`--price must be a positive number (got "${opts.price}").`);
|
|
33223
33247
|
}
|
|
33224
33248
|
}
|
|
33249
|
+
const category = normalizeCategory(opts.category);
|
|
33225
33250
|
const base = opts.api ?? DEFAULT_API_BASE3;
|
|
33226
33251
|
const agent = await withAgent({ keyPath: opts.key });
|
|
33227
33252
|
const address = agent.address();
|
|
@@ -33235,6 +33260,9 @@ Subcommands:
|
|
|
33235
33260
|
if (opts.price !== void 0) {
|
|
33236
33261
|
prepareBody.priceUsdc = opts.price;
|
|
33237
33262
|
}
|
|
33263
|
+
if (category !== void 0) {
|
|
33264
|
+
prepareBody.category = category;
|
|
33265
|
+
}
|
|
33238
33266
|
const { digest } = await runSponsoredTx({
|
|
33239
33267
|
keypair: agent.keypair,
|
|
33240
33268
|
actor: address,
|
|
@@ -33257,6 +33285,9 @@ Subcommands:
|
|
|
33257
33285
|
if (opts.price) {
|
|
33258
33286
|
printKeyValue("Price", `$${opts.price} USDC`);
|
|
33259
33287
|
}
|
|
33288
|
+
if (category) {
|
|
33289
|
+
printKeyValue("Category", category);
|
|
33290
|
+
}
|
|
33260
33291
|
printKeyValue("Tx", String(digest));
|
|
33261
33292
|
printBlank();
|
|
33262
33293
|
} catch (error) {
|
|
@@ -33271,11 +33302,15 @@ Subcommands:
|
|
|
33271
33302
|
"Header to inject into upstream calls (repeatable; e.g. your API key)",
|
|
33272
33303
|
collectHeader,
|
|
33273
33304
|
{}
|
|
33274
|
-
).option("--method <method>", "Upstream method: GET or POST (default POST)").option("--price <usdc>", "Price per call in USDC (e.g. 0.02)").option(
|
|
33305
|
+
).option("--method <method>", "Upstream method: GET or POST (default POST)").option("--price <usdc>", "Price per call in USDC (e.g. 0.02)").option(
|
|
33306
|
+
"--category <category>",
|
|
33307
|
+
`Storefront category: ${AGENT_CATEGORIES.join(" | ")}`
|
|
33308
|
+
).option("--remove", "Take down the deployed service").option("--gateway <url>", `Gateway base URL (default ${DEFAULT_GATEWAY})`).option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").option("--api <url>", `API base URL (default ${DEFAULT_API_BASE3})`).action(
|
|
33275
33309
|
async (opts) => {
|
|
33276
33310
|
try {
|
|
33277
33311
|
const base = opts.api ?? DEFAULT_API_BASE3;
|
|
33278
33312
|
const gateway = opts.gateway ?? DEFAULT_GATEWAY;
|
|
33313
|
+
const category = normalizeCategory(opts.category);
|
|
33279
33314
|
const agent = await withAgent({ keyPath: opts.key });
|
|
33280
33315
|
const address = agent.address();
|
|
33281
33316
|
if (opts.remove) {
|
|
@@ -33341,7 +33376,8 @@ Subcommands:
|
|
|
33341
33376
|
// (no route → 404). Any x402 client can hit this URL.
|
|
33342
33377
|
mcpEndpoint: `${DEFAULT_RAIL}/commerce/pay/${address}`,
|
|
33343
33378
|
paymentMethods: ["x402"],
|
|
33344
|
-
priceUsdc: opts.price
|
|
33379
|
+
priceUsdc: opts.price,
|
|
33380
|
+
...category ? { category } : {}
|
|
33345
33381
|
},
|
|
33346
33382
|
submitUrl: `${base}/agent/service/submit`
|
|
33347
33383
|
});
|
|
@@ -33353,6 +33389,9 @@ Subcommands:
|
|
|
33353
33389
|
printSuccess("Service deployed \u2014 live + listed in the directory.");
|
|
33354
33390
|
printKeyValue("Wraps", opts.upstream);
|
|
33355
33391
|
printKeyValue("Price", `$${opts.price} USDC`);
|
|
33392
|
+
if (category) {
|
|
33393
|
+
printKeyValue("Category", category);
|
|
33394
|
+
}
|
|
33356
33395
|
printKeyValue("Tx", String(digest));
|
|
33357
33396
|
printInfo(`Buyers: t2 agent pay ${truncateAddress(address)}`);
|
|
33358
33397
|
printBlank();
|