@t2000/cli 10.17.0 → 10.17.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.
package/dist/index.js CHANGED
@@ -31,9 +31,8 @@ import {
31
31
  truncateAddress,
32
32
  validateAddress,
33
33
  verifyJobForSeller,
34
- verifyReceipt,
35
34
  walletExists
36
- } from "./chunk-BK4CVWKU.js";
35
+ } from "./chunk-F2KFMF7W.js";
37
36
  import "./chunk-634W6JCI.js";
38
37
  import "./chunk-3ZUWXUSN.js";
39
38
  import "./chunk-QSITA6GU.js";
@@ -22267,7 +22266,7 @@ async function runEstimate(url, opts) {
22267
22266
  let req = accepts.find((a) => a.scheme === "exact" && a.network?.startsWith("sui:")) ?? accepts[0];
22268
22267
  let dialect = "x402";
22269
22268
  if (!req) {
22270
- const { parseMppSuiChallenge } = await import("./dist-RKHQD7AR.js");
22269
+ const { parseMppSuiChallenge } = await import("./dist-7RYTY436.js");
22271
22270
  const challenge = await parseMppSuiChallenge(response);
22272
22271
  if (!challenge) {
22273
22272
  throw new Error(
@@ -22362,7 +22361,7 @@ function describeSchemaFields(schema) {
22362
22361
  // src/commands/models.ts
22363
22362
  var import_picocolors9 = __toESM(require_picocolors(), 1);
22364
22363
  function registerModels(program3) {
22365
- program3.command("models").description("List the t2000 Private Inference model catalog (id \xB7 privacy tier \xB7 per-1M pricing).").option("--api-key <key>", "Private Inference key (or set T2000_API_KEY)").option("--api <url>", "API base URL (default https://api.t2000.ai/v1)").action(async (opts) => {
22364
+ program3.command("models").description("List the t2000 Private Inference model catalog (id \xB7 privacy tier \xB7 per-1M pricing).").option("--api-key <key>", "Private Inference key (or set T2000_API_KEY)").option("--api <url>", "API base URL (default https://api.audric.ai/v1)").action(async (opts) => {
22366
22365
  try {
22367
22366
  const models = await listModels({ apiKey: opts.apiKey, apiBase: opts.api });
22368
22367
  if (isJsonMode()) {
@@ -22385,7 +22384,7 @@ function registerModels(program3) {
22385
22384
  program3.command("chat", { hidden: true }).allowUnknownOption(true).argument("[message...]").action(() => {
22386
22385
  printLine("`t2 chat` was removed.");
22387
22386
  printLine(" Use your own agent with `t2 connect` (Claude Code, Codex, Continue, \u2026)");
22388
- printLine(" or call https://api.t2000.ai/v1 directly.");
22387
+ printLine(" or call https://api.audric.ai/v1 directly.");
22389
22388
  printLine(" Docs: https://developers.t2000.ai/use-with-your-tools");
22390
22389
  process.exitCode = 1;
22391
22390
  });
@@ -22399,11 +22398,11 @@ import { homedir as homedir3 } from "os";
22399
22398
  // src/commands/connect/clients.ts
22400
22399
  import { join as join2 } from "path";
22401
22400
  import { homedir as homedir2 } from "os";
22402
- var API_BASE = "https://api.t2000.ai/v1";
22401
+ var API_BASE = "https://api.audric.ai/v1";
22403
22402
  var CHAT_COMPLETIONS_URL = `${API_BASE}/chat/completions`;
22404
22403
  var DEFAULT_MODEL = "t2000/auto";
22405
22404
  var OPEN_MODEL = "t2000/auto-open";
22406
- var CONSOLE_KEYS_URL = "https://t2000.ai/manage";
22405
+ var CONSOLE_KEYS_URL = "https://audric.ai";
22407
22406
  var CONNECT_CLIENTS = [
22408
22407
  {
22409
22408
  slug: "hermes",
@@ -22477,7 +22476,7 @@ function hermesConfigYaml(key) {
22477
22476
  ].join("\n");
22478
22477
  }
22479
22478
  function hermesHasT2000(existingYaml) {
22480
- return existingYaml.includes("api.t2000.ai") && /provider:\s*custom/.test(existingYaml);
22479
+ return existingYaml.includes("api.audric.ai") && /provider:\s*custom/.test(existingYaml);
22481
22480
  }
22482
22481
  function ccrDir(home = homedir2()) {
22483
22482
  return join2(home, ".claude-code-router");
@@ -22852,7 +22851,7 @@ function runConnect(slug, key, print) {
22852
22851
  }
22853
22852
  }
22854
22853
  function registerConnect(program3) {
22855
- program3.command("connect").description("Point a coding tool at Private Inference (api.t2000.ai/v1) with your key").argument(
22854
+ program3.command("connect").description("Point a coding tool at Audric Private Inference (api.audric.ai/v1) with your key").argument(
22856
22855
  "[client]",
22857
22856
  "client to connect: hermes | claude-code | continue | aider | codex | grok | cline | cursor"
22858
22857
  ).option("--key <sk-key>", `Private Inference key (create one at ${CONSOLE_KEYS_URL})`).option("--print", "Show what would be written / the paste snippet, without writing").addHelpText(
@@ -22939,86 +22938,8 @@ you pay the price of the model that actually served each request).`
22939
22938
  });
22940
22939
  }
22941
22940
 
22942
- // src/commands/verify.ts
22943
- var import_picocolors10 = __toESM(require_picocolors(), 1);
22944
- function mark(check2) {
22945
- if (check2.status === "pass") {
22946
- return import_picocolors10.default.green("\u2713");
22947
- }
22948
- if (check2.status === "fail") {
22949
- return import_picocolors10.default.red("\u2717");
22950
- }
22951
- return import_picocolors10.default.dim("\u2022");
22952
- }
22953
- function trustTag(check2) {
22954
- if (check2.trust === "trustless") {
22955
- return import_picocolors10.default.green(" (trustless)");
22956
- }
22957
- if (check2.trust === "roadmap") {
22958
- return import_picocolors10.default.dim(" (roadmap)");
22959
- }
22960
- return import_picocolors10.default.dim(" (in signed receipt)");
22961
- }
22962
- function registerVerify(program3) {
22963
- program3.command("verify").argument("<receipt-id>", "A confidential receipt id (rcpt-\u2026)").description(
22964
- "Verify a confidential response by receipt id \u2014 checks the signed receipt + its trustless on-chain Sui anchor. Fails closed on any mismatch."
22965
- ).option("--api <url>", "API base URL (default https://api.t2000.ai/v1)").option("--model <id>", "Confidential model for the attested key (default phala/glm-5.2)").option("--quick", "Skip the local DCAP quote verification (the slower, network-bound check)").option("--testnet", "Read the anchor from Sui testnet (default mainnet)").action(
22966
- async (receiptId, opts) => {
22967
- try {
22968
- const result = await verifyReceipt(receiptId, {
22969
- apiBase: opts.api,
22970
- model: opts.model,
22971
- skipQuote: opts.quick,
22972
- network: opts.testnet ? "testnet" : "mainnet"
22973
- });
22974
- if (isJsonMode()) {
22975
- printJson(result);
22976
- if (!result.verified) {
22977
- process.exitCode = 1;
22978
- }
22979
- return;
22980
- }
22981
- printBlank();
22982
- printLine(import_picocolors10.default.bold(`Verifying ${receiptId}`));
22983
- printBlank();
22984
- for (const check2 of result.checks) {
22985
- printLine(` ${mark(check2)} ${import_picocolors10.default.bold(check2.name)}${trustTag(check2)}`);
22986
- printLine(` ${import_picocolors10.default.dim(check2.detail)}`);
22987
- if (check2.name === "Confidential upstream" && result.upstream) {
22988
- for (const c of result.upstream.claims ?? []) {
22989
- const src = c.source ? import_picocolors10.default.dim(` (${c.source})`) : "";
22990
- printLine(` ${import_picocolors10.default.dim("\xB7")} ${c.name}: ${c.status}${src}`);
22991
- }
22992
- if (result.upstream.sessionId) {
22993
- printLine(import_picocolors10.default.dim(` session: ${result.upstream.sessionId}`));
22994
- }
22995
- }
22996
- }
22997
- printBlank();
22998
- if (result.anchor) {
22999
- printLine(import_picocolors10.default.dim(` anchor: ${result.anchor.explorer}`));
23000
- }
23001
- if (result.verified) {
23002
- const quoteSkipped = result.checks.find((c) => c.name === "TDX quote (DCAP)")?.status === "skip";
23003
- printLine(
23004
- import_picocolors10.default.green(
23005
- quoteSkipped ? " RESULT: \u2713 verified \u2014 TEE-signed receipt + trustless Sui anchor (DCAP quote check skipped)." : " RESULT: \u2713 verified \u2014 genuine TDX quote + TEE-signed receipt + Sui anchor, all checked client-side."
23006
- )
23007
- );
23008
- } else {
23009
- printLine(import_picocolors10.default.red(" RESULT: \u2717 NOT verified \u2014 see the failed check above."));
23010
- process.exitCode = 1;
23011
- }
23012
- printBlank();
23013
- } catch (error) {
23014
- handleError(error);
23015
- }
23016
- }
23017
- );
23018
- }
23019
-
23020
22941
  // src/commands/limit/show.ts
23021
- var import_picocolors11 = __toESM(require_picocolors(), 1);
22942
+ var import_picocolors10 = __toESM(require_picocolors(), 1);
23022
22943
  function registerLimitShow(parent) {
23023
22944
  parent.command("show").description("Show current spending limits").action(async (opts) => {
23024
22945
  try {
@@ -23041,10 +22962,10 @@ function registerLimitShow(parent) {
23041
22962
  }
23042
22963
  printBlank();
23043
22964
  if (limits.perTxUsd !== void 0) {
23044
- printKeyValue("Per-transaction", import_picocolors11.default.green(`$${limits.perTxUsd}`));
22965
+ printKeyValue("Per-transaction", import_picocolors10.default.green(`$${limits.perTxUsd}`));
23045
22966
  }
23046
22967
  if (limits.dailyUsd !== void 0) {
23047
- printKeyValue("Daily (cumulative)", import_picocolors11.default.green(`$${limits.dailyUsd}`));
22968
+ printKeyValue("Daily (cumulative)", import_picocolors10.default.green(`$${limits.dailyUsd}`));
23048
22969
  }
23049
22970
  printBlank();
23050
22971
  printInfo("Use `--force` on `t2 send` / `t2 swap` / `t2 pay` to override per-call.");
@@ -23056,7 +22977,7 @@ function registerLimitShow(parent) {
23056
22977
  }
23057
22978
 
23058
22979
  // src/commands/limit/set.ts
23059
- var import_picocolors12 = __toESM(require_picocolors(), 1);
22980
+ var import_picocolors11 = __toESM(require_picocolors(), 1);
23060
22981
  function parseLimitSetArgs(opts) {
23061
22982
  const perTx = opts.perTx !== void 0 ? parseUsdFlag("--per-tx", opts.perTx) : void 0;
23062
22983
  const daily = opts.daily !== void 0 ? parseUsdFlag("--daily", opts.daily) : void 0;
@@ -23098,10 +23019,10 @@ Examples:
23098
23019
  printBlank();
23099
23020
  printSuccess("Spending limits updated.");
23100
23021
  if (next?.perTxUsd !== void 0) {
23101
- printKeyValue("Per-transaction", import_picocolors12.default.green(`$${next.perTxUsd}`));
23022
+ printKeyValue("Per-transaction", import_picocolors11.default.green(`$${next.perTxUsd}`));
23102
23023
  }
23103
23024
  if (next?.dailyUsd !== void 0) {
23104
- printKeyValue("Daily (cumulative)", import_picocolors12.default.green(`$${next.dailyUsd}`));
23025
+ printKeyValue("Daily (cumulative)", import_picocolors11.default.green(`$${next.dailyUsd}`));
23105
23026
  }
23106
23027
  printBlank();
23107
23028
  printInfo("Use `t2 limit show` to view; `t2 limit reset` to clear.");
@@ -23163,7 +23084,7 @@ function registerMcpStart(parent) {
23163
23084
  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) => {
23164
23085
  let mod;
23165
23086
  try {
23166
- mod = await import("./dist-4S5J2AW4.js");
23087
+ mod = await import("./dist-JXBUUJI2.js");
23167
23088
  } catch {
23168
23089
  console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
23169
23090
  process.exit(1);
@@ -23456,8 +23377,8 @@ function registerSkillsCheck(parent) {
23456
23377
  return;
23457
23378
  }
23458
23379
  for (const r of rows) {
23459
- const mark2 = r.status === "up-to-date" ? "\u2713" : r.status === "drifted" ? "\u21BB" : "\u2717";
23460
- console.log(` ${mark2} ${r.name} [${r.target} \xB7 ${r.scope}] ${r.status}`);
23380
+ const mark = r.status === "up-to-date" ? "\u2713" : r.status === "drifted" ? "\u21BB" : "\u2717";
23381
+ console.log(` ${mark} ${r.name} [${r.target} \xB7 ${r.scope}] ${r.status}`);
23461
23382
  }
23462
23383
  printBlank();
23463
23384
  if (upToDate) {
@@ -24248,12 +24169,12 @@ function registerAgents(program3) {
24248
24169
  }
24249
24170
 
24250
24171
  // src/commands/job.ts
24251
- var import_picocolors14 = __toESM(require_picocolors(), 1);
24172
+ var import_picocolors13 = __toESM(require_picocolors(), 1);
24252
24173
  import { createHash } from "crypto";
24253
24174
  import { readFile as readFile4 } from "fs/promises";
24254
24175
 
24255
24176
  // src/commands/open.ts
24256
- var import_picocolors13 = __toESM(require_picocolors(), 1);
24177
+ var import_picocolors12 = __toESM(require_picocolors(), 1);
24257
24178
  import { readFile as readFile3 } from "fs/promises";
24258
24179
  var DEFAULT_API_BASE5 = process.env.T2000_API_URL ?? "https://api.t2000.ai/v1";
24259
24180
  var MAX_BRIEF_BYTES = 16 * 1024;
@@ -24276,9 +24197,9 @@ async function resolveBrief(input) {
24276
24197
  }
24277
24198
  }
24278
24199
  function statusColor(status) {
24279
- if (status === "open") return import_picocolors13.default.green(status);
24280
- if (status === "claimed") return import_picocolors13.default.cyan(status);
24281
- return import_picocolors13.default.yellow(status);
24200
+ if (status === "open") return import_picocolors12.default.green(status);
24201
+ if (status === "claimed") return import_picocolors12.default.cyan(status);
24202
+ return import_picocolors12.default.yellow(status);
24282
24203
  }
24283
24204
  function fmtLeft(ms) {
24284
24205
  if (ms == null) return "";
@@ -24366,13 +24287,13 @@ function registerOpenVerbs(group) {
24366
24287
  }
24367
24288
  for (const row of rows) {
24368
24289
  printLine(
24369
- ` ${import_picocolors13.default.bold(row.title ?? "Untitled opening")} ${import_picocolors13.default.dim(`$${row.maxUsdc.toFixed(2)}`)} ${statusColor(row.status)}` + (row.status === "open" ? import_picocolors13.default.dim(` ${fmtLeft(row.openUntilMs)} left`) : "")
24290
+ ` ${import_picocolors12.default.bold(row.title ?? "Untitled opening")} ${import_picocolors12.default.dim(`$${row.maxUsdc.toFixed(2)}`)} ${statusColor(row.status)}` + (row.status === "open" ? import_picocolors12.default.dim(` ${fmtLeft(row.openUntilMs)} left`) : "")
24370
24291
  );
24371
24292
  const brief = (row.brief ?? "").replace(/\s+/g, " ");
24372
24293
  if (brief) {
24373
- printLine(` ${import_picocolors13.default.dim(brief.length > 100 ? `${brief.slice(0, 100)}\u2026` : brief)}`);
24294
+ printLine(` ${import_picocolors12.default.dim(brief.length > 100 ? `${brief.slice(0, 100)}\u2026` : brief)}`);
24374
24295
  }
24375
- printLine(` ${import_picocolors13.default.dim(row.id)}`);
24296
+ printLine(` ${import_picocolors12.default.dim(row.id)}`);
24376
24297
  printBlank();
24377
24298
  }
24378
24299
  printInfo(
@@ -24489,15 +24410,15 @@ async function resolveSpecUpload(base, input) {
24489
24410
  return { hash: `0x${await putJobSpec(base, text)}`, uploaded: true };
24490
24411
  }
24491
24412
  function stateColor(state) {
24492
- if (state === "released") return import_picocolors14.default.green(state);
24493
- if (state === "refunded" || state === "rejected") return import_picocolors14.default.yellow(state);
24494
- return import_picocolors14.default.cyan(state);
24413
+ if (state === "released") return import_picocolors13.default.green(state);
24414
+ if (state === "refunded" || state === "rejected") return import_picocolors13.default.yellow(state);
24415
+ return import_picocolors13.default.cyan(state);
24495
24416
  }
24496
24417
  function printJob(job, me) {
24497
24418
  printKeyValue("Job", job.id);
24498
24419
  printKeyValue("State", stateColor(job.state));
24499
- printKeyValue("Buyer", truncateAddress(job.buyer) + (me === job.buyer ? import_picocolors14.default.dim(" (you)") : ""));
24500
- printKeyValue("Seller", truncateAddress(job.seller) + (me === job.seller ? import_picocolors14.default.dim(" (you)") : ""));
24420
+ printKeyValue("Buyer", truncateAddress(job.buyer) + (me === job.buyer ? import_picocolors13.default.dim(" (you)") : ""));
24421
+ printKeyValue("Seller", truncateAddress(job.seller) + (me === job.seller ? import_picocolors13.default.dim(" (you)") : ""));
24501
24422
  printKeyValue("Amount", `$${job.amountUsdc.toFixed(2)} USDC`);
24502
24423
  printKeyValue("Deliver by", new Date(job.deliverByMs).toISOString());
24503
24424
  if (job.deliveredAtMs) {
@@ -24517,7 +24438,7 @@ async function fetchSellerJobs(base, seller) {
24517
24438
  var TERMINAL_STATES = /* @__PURE__ */ new Set(["released", "rejected", "refunded"]);
24518
24439
  function inboxHint(job) {
24519
24440
  if (job.state === "funded") {
24520
- return `t2 job spec ${truncateAddress(job.jobId)} \u2192 do the work \u2192 t2 job deliver ${truncateAddress(job.jobId)} <file>`;
24441
+ return `t2 job spec ${job.jobId} \u2192 do the work \u2192 t2 job deliver ${job.jobId} <file>`;
24521
24442
  }
24522
24443
  if (job.state === "delivered") {
24523
24444
  return `waiting on the buyer's review \u2014 anyone can \`t2 job release\` once it lapses`;
@@ -24529,9 +24450,9 @@ function printInboxRow(job) {
24529
24450
  printLine(
24530
24451
  ` ${stateColor(job.state)} $${job.amountUsdc.toFixed(2)} USDC \xB7 from ${truncateAddress(job.buyer)}${deadline}`
24531
24452
  );
24532
- printLine(` ${import_picocolors14.default.dim(job.jobId)}`);
24453
+ printLine(` ${import_picocolors13.default.dim(job.jobId)}`);
24533
24454
  const hint = inboxHint(job);
24534
- if (hint) printLine(` ${import_picocolors14.default.dim("\u2192")} ${hint}`);
24455
+ if (hint) printLine(` ${import_picocolors13.default.dim("\u2192")} ${hint}`);
24535
24456
  }
24536
24457
  async function sponsoredJobVerb(opts) {
24537
24458
  const agent = await withAgent({ keyPath: opts.keyPath });
@@ -24803,7 +24724,7 @@ no fund step; unclaimed openings refund fee-free):
24803
24724
  printSuccess(note);
24804
24725
  if (digest) printKeyValue("Tx", digest);
24805
24726
  if (verb === "release") {
24806
- printInfo(`Rate the work (builds the seller's on-chain-backed reputation): t2 job review ${truncateAddress(jobId)} --stars 5`);
24727
+ printInfo(`Rate the work (builds the seller's on-chain-backed reputation): t2 job review ${jobId} --stars 5`);
24807
24728
  }
24808
24729
  printBlank();
24809
24730
  } catch (error) {
@@ -24878,7 +24799,7 @@ no fund step; unclaimed openings refund fee-free):
24878
24799
  }
24879
24800
  printBlank();
24880
24801
  printKeyValue("Job", jobId);
24881
- printKeyValue("Spec hash", `${job.specHash} ${import_picocolors14.default.green("(content verified)")}`);
24802
+ printKeyValue("Spec hash", `${job.specHash} ${import_picocolors13.default.green("(content verified)")}`);
24882
24803
  printBlank();
24883
24804
  printLine(content);
24884
24805
  printBlank();
@@ -24968,7 +24889,7 @@ no fund step; unclaimed openings refund fee-free):
24968
24889
  printBlank();
24969
24890
  printJob(job, me);
24970
24891
  if (actions.length > 0) {
24971
- printInfo(`You can now: ${actions.map((a) => `t2 job ${a} ${truncateAddress(watchId)}`).join(" \xB7 ")}`);
24892
+ printInfo(`You can now: ${actions.map((a) => `t2 job ${a} ${watchId}`).join(" \xB7 ")}`);
24972
24893
  } else if (!terminal) {
24973
24894
  printInfo("Nothing for you to do yet \u2014 waiting on the counterparty / clock.");
24974
24895
  }
@@ -24984,7 +24905,7 @@ no fund step; unclaimed openings refund fee-free):
24984
24905
  }
24985
24906
 
24986
24907
  // src/commands/service.ts
24987
- var import_picocolors15 = __toESM(require_picocolors(), 1);
24908
+ var import_picocolors14 = __toESM(require_picocolors(), 1);
24988
24909
  import { createHash as createHash2 } from "crypto";
24989
24910
  import { readFile as readFile5 } from "fs/promises";
24990
24911
  var DEFAULT_API_BASE7 = process.env.T2000_API_URL ?? "https://api.t2000.ai/v1";
@@ -25040,13 +24961,13 @@ function formatSla(minutes) {
25040
24961
  return `${minutes}m`;
25041
24962
  }
25042
24963
  function printService(o) {
25043
- const flag = o.retired ? import_picocolors15.default.dim(" (retired)") : "";
25044
- printLine(`${import_picocolors15.default.bold(o.name)} ${import_picocolors15.default.dim(`\xB7 ${o.slug}`)}${flag}`);
24964
+ const flag = o.retired ? import_picocolors14.default.dim(" (retired)") : "";
24965
+ printLine(`${import_picocolors14.default.bold(o.name)} ${import_picocolors14.default.dim(`\xB7 ${o.slug}`)}${flag}`);
25045
24966
  printKeyValue("Price", `$${o.priceUsdc.toFixed(2)} USDC`);
25046
24967
  printKeyValue("Delivery", `within ${formatSla(o.slaMinutes)}`);
25047
24968
  printKeyValue(
25048
24969
  "Seller",
25049
- `${o.agentName ?? "unnamed"} ${import_picocolors15.default.dim(truncateAddress(o.agent))}`
24970
+ `${o.agentName ?? "unnamed"} ${import_picocolors14.default.dim(truncateAddress(o.agent))}`
25050
24971
  );
25051
24972
  printKeyValue("You get", o.deliverable);
25052
24973
  if (o.requirements != null) {
@@ -25266,7 +25187,6 @@ Examples:
25266
25187
  registerPay(program3);
25267
25188
  registerModels(program3);
25268
25189
  registerConnect(program3);
25269
- registerVerify(program3);
25270
25190
  registerServices(program3);
25271
25191
  registerLimit(program3);
25272
25192
  registerMcp(program3);