@t2000/cli 5.24.0 → 5.24.2
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.
|
@@ -99283,7 +99283,7 @@ CRITICAL: When the user asks to use any external or paid API, names a provider (
|
|
|
99283
99283
|
The wallet can also HIRE OTHER AGENTS: the agent store (agents.t2000.ai) lists agents selling one-call services (market reads, data feeds, tools) with receipt-backed reputation. Browse with t2000_agents, buy with t2000_agent_pay (escrowed \u2014 auto-refund if delivery fails). The user's wallet can EARN too: reward tasks + a community task board live at mpp.t2000.ai/tasks (see the skill-hire prompt or the t2000-hire skill).
|
|
99284
99284
|
|
|
99285
99285
|
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.`;
|
|
99286
|
-
var PKG_VERSION = "5.24.
|
|
99286
|
+
var PKG_VERSION = "5.24.2";
|
|
99287
99287
|
console.log = (...args) => console.error("[log]", ...args);
|
|
99288
99288
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
99289
99289
|
async function startMcpServer(opts) {
|
|
@@ -99357,4 +99357,4 @@ mime-types/index.js:
|
|
|
99357
99357
|
@scure/bip39/index.js:
|
|
99358
99358
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
99359
99359
|
*/
|
|
99360
|
-
//# sourceMappingURL=dist-
|
|
99360
|
+
//# sourceMappingURL=dist-ZX4DO4GG.js.map
|
package/dist/index.js
CHANGED
|
@@ -33109,7 +33109,7 @@ function registerMcpStart(parent) {
|
|
|
33109
33109
|
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) => {
|
|
33110
33110
|
let mod3;
|
|
33111
33111
|
try {
|
|
33112
|
-
mod3 = await import("./dist-
|
|
33112
|
+
mod3 = await import("./dist-ZX4DO4GG.js");
|
|
33113
33113
|
} catch {
|
|
33114
33114
|
console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
|
|
33115
33115
|
process.exit(1);
|
|
@@ -33949,7 +33949,8 @@ Subcommands:
|
|
|
33949
33949
|
const maxPrice = opts.maxPrice ? Number.parseFloat(opts.maxPrice) : opts.amount ? Number.parseFloat(opts.amount) : 1;
|
|
33950
33950
|
const gateway = opts.gateway ?? DEFAULT_GATEWAY;
|
|
33951
33951
|
const agent = await withAgent({ keyPath: opts.key });
|
|
33952
|
-
const
|
|
33952
|
+
const resolvedSeller = seller.startsWith("0x") ? seller : (await agent.resolveRecipient(seller)).address;
|
|
33953
|
+
const url = opts.amount ? `${gateway}/commerce/pay/${resolvedSeller}?amount=${encodeURIComponent(opts.amount)}` : `${gateway}/commerce/pay/${resolvedSeller}`;
|
|
33953
33954
|
const result = await agent.pay({
|
|
33954
33955
|
url,
|
|
33955
33956
|
method: "POST",
|
|
@@ -33963,7 +33964,7 @@ Subcommands:
|
|
|
33963
33964
|
const paidUsd = typeof chargedMicros === "number" ? chargedMicros / 1e6 : opts.amount ? Number.parseFloat(opts.amount) : result.cost ?? 0;
|
|
33964
33965
|
if (isJsonMode()) {
|
|
33965
33966
|
printJson({
|
|
33966
|
-
seller,
|
|
33967
|
+
seller: resolvedSeller,
|
|
33967
33968
|
amount: paidUsd,
|
|
33968
33969
|
paid: result.paid,
|
|
33969
33970
|
cost: result.cost,
|
|
@@ -33973,7 +33974,9 @@ Subcommands:
|
|
|
33973
33974
|
return;
|
|
33974
33975
|
}
|
|
33975
33976
|
printBlank();
|
|
33976
|
-
printSuccess(
|
|
33977
|
+
printSuccess(
|
|
33978
|
+
`Paid ${formatUsd(paidUsd)} to ${seller.startsWith("0x") ? truncateAddress(seller) : `${seller} (${truncateAddress(resolvedSeller)})`}`
|
|
33979
|
+
);
|
|
33977
33980
|
if (receipt) {
|
|
33978
33981
|
if (typeof receipt.refundMicros === "number" && receipt.refundMicros > 0 && typeof receipt.authorizedMicros === "number") {
|
|
33979
33982
|
printKeyValue(
|
|
@@ -34093,7 +34096,7 @@ function firstLine(text, max = 76) {
|
|
|
34093
34096
|
function registerAgents(program3) {
|
|
34094
34097
|
program3.command("agents").argument("[address]", "Show one agent\u2019s full listing (profile + reputation)").description(
|
|
34095
34098
|
"Browse the agent store (agents.t2000.ai): priced services from the live directory, or one agent\u2019s full listing. Buy with `t2 agent pay <address>`. [Agent Commerce]"
|
|
34096
|
-
).option("--category <category>", "Filter the list by store category").option("--all", "Include agents without a priced service").option("--limit <n>", "Max rows (default
|
|
34099
|
+
).option("--category <category>", "Filter the list by store category").option("--all", "Include agents without a priced service").option("--limit <n>", "Max rows (default: all)").option("--api <url>", `API base URL (default ${DEFAULT_API_BASE4})`).action(
|
|
34097
34100
|
async (address, opts) => {
|
|
34098
34101
|
try {
|
|
34099
34102
|
const base = opts.api ?? DEFAULT_API_BASE4;
|
|
@@ -34130,7 +34133,7 @@ function registerAgents(program3) {
|
|
|
34130
34133
|
printBlank();
|
|
34131
34134
|
return;
|
|
34132
34135
|
}
|
|
34133
|
-
const limit = Math.min(Number.parseInt(opts.limit ?? "
|
|
34136
|
+
const limit = Math.min(Number.parseInt(opts.limit ?? "100", 10) || 100, 100);
|
|
34134
34137
|
const data = await getJson(
|
|
34135
34138
|
`${base}/agents?limit=100`
|
|
34136
34139
|
);
|
|
@@ -34154,11 +34157,12 @@ function registerAgents(program3) {
|
|
|
34154
34157
|
for (const a of agents) {
|
|
34155
34158
|
const price = a.priceUsdc ? formatUsd(Number.parseFloat(a.priceUsdc)).padStart(6) : " \u2014";
|
|
34156
34159
|
printLine(
|
|
34157
|
-
` ${price} ${(a.name ?? truncateAddress(a.address)).padEnd(
|
|
34160
|
+
` ${price} ${(a.name ?? truncateAddress(a.address)).padEnd(24).slice(0, 24)} ${a.category ?? ""}`
|
|
34158
34161
|
);
|
|
34162
|
+
printLine(` ${a.address}`);
|
|
34159
34163
|
}
|
|
34160
34164
|
printBlank();
|
|
34161
|
-
printInfo("Detail: t2 agents <address> \xB7 Buy: t2 agent pay <address>");
|
|
34165
|
+
printInfo("Detail: t2 agents <address> \xB7 Buy: t2 agent pay <address> (addresses above are complete)");
|
|
34162
34166
|
printBlank();
|
|
34163
34167
|
} catch (error) {
|
|
34164
34168
|
handleError(error);
|
|
@@ -34261,7 +34265,7 @@ function registerTask(program3) {
|
|
|
34261
34265
|
);
|
|
34262
34266
|
group.command("post").description(
|
|
34263
34267
|
"Post a community task \u2014 pays the FULL budget (reward \xD7 completions) into escrow via x402; auto-moderated at post time. SAVE the returned manageKey."
|
|
34264
|
-
).requiredOption("--title <text>", "What needs doing (8+ chars)").requiredOption("--description <text>", "Exactly what the worker must deliver + what proof (30+ chars)").requiredOption("--reward <usdc>", "Reward per approved completion ($0.01\u2013$50)").option("--completions <n>", "Max completions (default 1)", "1").option("--expiry-days <n>", "Days until unspent budget auto-refunds (default 7)", "7").option("--category <category>", "research | data | marketing | dev | creative | other", "other").option("--gateway <url>", `Gateway base URL (default ${DEFAULT_GATEWAY2})`).option("--force", "Override spending limits for this call (see `t2 limit`)").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(
|
|
34268
|
+
).requiredOption("--title <text>", "What needs doing (8+ chars)").requiredOption("--description <text>", "Exactly what the worker must deliver + what proof (30+ chars)").requiredOption("--reward <usdc>", "Reward per approved completion ($0.01\u2013$50)").option("--completions <n>", "Max completions (default 1)", "1").option("--expiry-days <n>", "Days until unspent budget auto-refunds (default 7)", "7").option("--category <category>", "research | data | marketing | dev | creative | other", "other").option("--notify-email <email>", "Email me when submissions arrive + when the refund settles (per-task, one-click stop in every mail)").option("--gateway <url>", `Gateway base URL (default ${DEFAULT_GATEWAY2})`).option("--force", "Override spending limits for this call (see `t2 limit`)").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(
|
|
34265
34269
|
async (opts) => {
|
|
34266
34270
|
try {
|
|
34267
34271
|
const gateway = opts.gateway ?? DEFAULT_GATEWAY2;
|
|
@@ -34281,7 +34285,8 @@ function registerTask(program3) {
|
|
|
34281
34285
|
rewardUsd: reward,
|
|
34282
34286
|
maxCompletions: completions,
|
|
34283
34287
|
expiryDays: Number.parseInt(opts.expiryDays, 10),
|
|
34284
|
-
category: opts.category
|
|
34288
|
+
category: opts.category,
|
|
34289
|
+
...opts.notifyEmail ? { notifyEmail: opts.notifyEmail } : {}
|
|
34285
34290
|
}),
|
|
34286
34291
|
maxPrice: budget,
|
|
34287
34292
|
force: opts.force
|