@t2000/cli 10.18.0 → 10.19.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.
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  AggregatorClient,
12
12
  Env
13
- } from "./chunk-QSITA6GU.js";
13
+ } from "./chunk-3YV35WUN.js";
14
14
  import {
15
15
  BalanceChange,
16
16
  BaseClient,
@@ -12600,7 +12600,7 @@ var SPONSORED_PYTH_DEPENDENT_PROVIDERS = [
12600
12600
  "HAEDALHMMV2"
12601
12601
  ];
12602
12602
  async function getSponsoredSwapProviders() {
12603
- const { getProvidersExcluding } = await import("./dist-WNY2TO7E.js");
12603
+ const { getProvidersExcluding } = await import("./dist-3WU6OGLY.js");
12604
12604
  return getProvidersExcluding([...SPONSORED_PYTH_DEPENDENT_PROVIDERS]);
12605
12605
  }
12606
12606
  var WRITE_APPENDER_REGISTRY = {
@@ -13600,4 +13600,4 @@ export {
13600
13600
  @scure/bip39/index.js:
13601
13601
  (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
13602
13602
  */
13603
- //# sourceMappingURL=chunk-PXQ3GPIL.js.map
13603
+ //# sourceMappingURL=chunk-RHEUNSVF.js.map
@@ -171,7 +171,7 @@ import {
171
171
  processEndpoint,
172
172
  processFlattenRoutes,
173
173
  restituteMsafeFastRouterSwapParams
174
- } from "./chunk-QSITA6GU.js";
174
+ } from "./chunk-3YV35WUN.js";
175
175
  import "./chunk-WHUYPKGH.js";
176
176
  import "./chunk-OCLKPYUU.js";
177
177
  import "./chunk-XE63VG7O.js";
@@ -351,4 +351,4 @@ export {
351
351
  processFlattenRoutes,
352
352
  restituteMsafeFastRouterSwapParams
353
353
  };
354
- //# sourceMappingURL=dist-WNY2TO7E.js.map
354
+ //# sourceMappingURL=dist-3WU6OGLY.js.map
@@ -211,10 +211,10 @@ import {
211
211
  verifyReceipt,
212
212
  walletExists,
213
213
  writeLimitsFile
214
- } from "./chunk-PXQ3GPIL.js";
214
+ } from "./chunk-RHEUNSVF.js";
215
215
  import "./chunk-634W6JCI.js";
216
216
  import "./chunk-3ZUWXUSN.js";
217
- import "./chunk-QSITA6GU.js";
217
+ import "./chunk-3YV35WUN.js";
218
218
  import "./chunk-WHUYPKGH.js";
219
219
  import "./chunk-OCLKPYUU.js";
220
220
  import "./chunk-XE63VG7O.js";
@@ -437,4 +437,4 @@ export {
437
437
  walletExists,
438
438
  writeLimitsFile
439
439
  };
440
- //# sourceMappingURL=dist-6ARPIZ47.js.map
440
+ //# sourceMappingURL=dist-VOMEYPJS.js.map
package/dist/index.js CHANGED
@@ -32,10 +32,10 @@ import {
32
32
  validateAddress,
33
33
  verifyJobForSeller,
34
34
  walletExists
35
- } from "./chunk-PXQ3GPIL.js";
35
+ } from "./chunk-RHEUNSVF.js";
36
36
  import "./chunk-634W6JCI.js";
37
37
  import "./chunk-3ZUWXUSN.js";
38
- import "./chunk-QSITA6GU.js";
38
+ import "./chunk-3YV35WUN.js";
39
39
  import "./chunk-WHUYPKGH.js";
40
40
  import "./chunk-OCLKPYUU.js";
41
41
  import "./chunk-XE63VG7O.js";
@@ -21823,10 +21823,6 @@ import { readFile, writeFile, mkdir } from "fs/promises";
21823
21823
  import { join, dirname } from "path";
21824
21824
  import { homedir } from "os";
21825
21825
  import { existsSync } from "fs";
21826
- var MCP_SERVER_ENTRY = {
21827
- command: "t2000",
21828
- args: ["mcp", "start"]
21829
- };
21830
21826
  var MCP_SERVER_KEY = "t2000";
21831
21827
  function getPlatformConfigs() {
21832
21828
  const home = homedir();
@@ -21863,15 +21859,6 @@ async function writeJsonFile(path2, data) {
21863
21859
  }
21864
21860
  await writeFile(path2, JSON.stringify(data, null, 2) + "\n", "utf-8");
21865
21861
  }
21866
- function withMcpEntry(config) {
21867
- return {
21868
- ...config,
21869
- mcpServers: {
21870
- ...config.mcpServers ?? {},
21871
- [MCP_SERVER_KEY]: { ...MCP_SERVER_ENTRY }
21872
- }
21873
- };
21874
- }
21875
21862
  function hasMcpEntry(config) {
21876
21863
  return typeof config.mcpServers === "object" && config.mcpServers !== null && MCP_SERVER_KEY in config.mcpServers;
21877
21864
  }
@@ -21891,18 +21878,19 @@ var { version: CLI_VERSION } = (() => {
21891
21878
  return require2("../../package.json");
21892
21879
  }
21893
21880
  })();
21894
- async function checkMcpClients() {
21881
+ async function staleStdioClients() {
21895
21882
  const platforms = getPlatformConfigs();
21896
- return Promise.all(
21883
+ const wired = await Promise.all(
21897
21884
  platforms.map(async (p) => ({ name: p.name, wired: hasMcpEntry(await readJsonFile(p.path)) }))
21898
21885
  );
21886
+ return wired.filter((c) => c.wired).map((c) => c.name);
21899
21887
  }
21900
21888
  function registerStatus(program3) {
21901
- program3.command("status").description("Health check: wallet, balances, limits, MCP wiring").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(async (opts) => {
21889
+ program3.command("status").description("Health check: wallet, balances, limits").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(async (opts) => {
21902
21890
  try {
21903
- const [agentResult, mcpClients] = await Promise.all([
21891
+ const [agentResult, staleStdio] = await Promise.all([
21904
21892
  tryWithAgent({ keyPath: opts.key }),
21905
- checkMcpClients()
21893
+ staleStdioClients()
21906
21894
  ]);
21907
21895
  let wallet = { created: false };
21908
21896
  let balance = null;
@@ -21924,7 +21912,7 @@ function registerStatus(program3) {
21924
21912
  };
21925
21913
  }
21926
21914
  if (isJsonMode()) {
21927
- printJson({ cliVersion: CLI_VERSION, wallet, balance, limits, mcpClients });
21915
+ printJson({ cliVersion: CLI_VERSION, wallet, balance, limits, staleStdio });
21928
21916
  return;
21929
21917
  }
21930
21918
  printBlank();
@@ -21952,14 +21940,10 @@ function registerStatus(program3) {
21952
21940
  } else {
21953
21941
  printKeyValue("Wallet", `${import_picocolors5.default.yellow("not created")} ${import_picocolors5.default.dim("\u2014 run `t2 init`")}`);
21954
21942
  }
21955
- const mcpSummary = mcpClients.map((c) => `${c.name} ${c.wired ? import_picocolors5.default.green("\u2713") : import_picocolors5.default.dim("\u2717")}`).join(" \xB7 ");
21956
- printKeyValue("MCP wired", mcpSummary);
21957
- if (!mcpClients.some((c) => c.wired)) {
21958
- printLine(
21959
- import_picocolors5.default.dim(" Hosted: add https://mcp.t2000.ai/mcp as a custom connector in Claude.")
21960
- );
21943
+ printKeyValue("MCP", "https://mcp.t2000.ai/mcp " + import_picocolors5.default.dim("(hosted \u2014 add as a connector in any MCP client)"));
21944
+ if (staleStdio.length > 0) {
21961
21945
  printLine(
21962
- import_picocolors5.default.dim(" Local: `t2 mcp install` wires the stdio server (advanced \u2014 keypair you hold).")
21946
+ import_picocolors5.default.yellow(` Stale stdio config in ${staleStdio.join(", ")} \u2014 the local server is retired; run \`t2 mcp uninstall\`.`)
21963
21947
  );
21964
21948
  }
21965
21949
  printBlank();
@@ -22271,7 +22255,7 @@ async function runEstimate(url, opts) {
22271
22255
  let req = accepts.find((a) => a.scheme === "exact" && a.network?.startsWith("sui:")) ?? accepts[0];
22272
22256
  let dialect = "x402";
22273
22257
  if (!req) {
22274
- const { parseMppSuiChallenge } = await import("./dist-6ARPIZ47.js");
22258
+ const { parseMppSuiChallenge } = await import("./dist-VOMEYPJS.js");
22275
22259
  const challenge = await parseMppSuiChallenge(response);
22276
22260
  if (!challenge) {
22277
22261
  throw new Error(
@@ -23084,61 +23068,6 @@ Subcommands:
23084
23068
  registerLimitReset(group);
23085
23069
  }
23086
23070
 
23087
- // src/commands/mcp/start.ts
23088
- function registerMcpStart(parent) {
23089
- 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) => {
23090
- let mod;
23091
- try {
23092
- mod = await import("./dist-7E74C4U2.js");
23093
- } catch {
23094
- console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
23095
- process.exit(1);
23096
- }
23097
- await mod.startMcpServer({ keyPath: opts.key });
23098
- });
23099
- }
23100
-
23101
- // src/commands/mcp/install.ts
23102
- async function runInstall() {
23103
- const platforms = getPlatformConfigs();
23104
- const results = [];
23105
- for (const platform of platforms) {
23106
- const config = await readJsonFile(platform.path);
23107
- if (hasMcpEntry(config)) {
23108
- results.push({ name: platform.name, slug: platform.slug, status: "exists" });
23109
- continue;
23110
- }
23111
- await writeJsonFile(platform.path, withMcpEntry(config));
23112
- results.push({ name: platform.name, slug: platform.slug, status: "added" });
23113
- }
23114
- return results;
23115
- }
23116
- function registerMcpInstall(parent) {
23117
- parent.command("install").description("Auto-configure the MCP server in Claude Desktop, Cursor, and Windsurf").action(async () => {
23118
- try {
23119
- const results = await runInstall();
23120
- if (isJsonMode()) {
23121
- printJson({ installed: results });
23122
- return;
23123
- }
23124
- printBlank();
23125
- for (const r of results) {
23126
- if (r.status === "exists") {
23127
- printInfo(`${r.name} already configured`);
23128
- } else {
23129
- printSuccess(`${r.name} configured`);
23130
- }
23131
- }
23132
- printBlank();
23133
- printInfo("Restart your AI platform to activate.");
23134
- printInfo(`Then ask: "what's my t2000 balance?"`);
23135
- printBlank();
23136
- } catch (error) {
23137
- handleError(error);
23138
- }
23139
- });
23140
- }
23141
-
23142
23071
  // src/commands/mcp/uninstall.ts
23143
23072
  import { existsSync as existsSync3 } from "fs";
23144
23073
  async function runUninstall() {
@@ -23160,7 +23089,7 @@ async function runUninstall() {
23160
23089
  return results;
23161
23090
  }
23162
23091
  function registerMcpUninstall(parent) {
23163
- parent.command("uninstall").description("Remove the t2000 MCP server entry from Claude Desktop, Cursor, and Windsurf").action(async () => {
23092
+ parent.command("uninstall").description("Remove the retired stdio server entry from Claude Desktop, Cursor, and Windsurf configs").action(async () => {
23164
23093
  try {
23165
23094
  const results = await runUninstall();
23166
23095
  if (isJsonMode()) {
@@ -23183,19 +23112,41 @@ function registerMcpUninstall(parent) {
23183
23112
  }
23184
23113
 
23185
23114
  // src/commands/mcp/index.ts
23115
+ var CONNECT_SNIPPET = `{
23116
+ "mcpServers": {
23117
+ "t2000": {
23118
+ "url": "https://mcp.t2000.ai/mcp"
23119
+ }
23120
+ }
23121
+ }`;
23122
+ function printRetired() {
23123
+ printBlank();
23124
+ printInfo("The local stdio MCP server is retired.");
23125
+ printLine("");
23126
+ printLine("Connect any MCP client to the hosted server instead \u2014 one URL,");
23127
+ printLine("OAuth sign-in, spend limits you set in the console:");
23128
+ printLine("");
23129
+ for (const line of CONNECT_SNIPPET.split("\n")) {
23130
+ printLine(` ${line}`);
23131
+ }
23132
+ printLine("");
23133
+ printLine("Docs: https://docs.t2000.ai/passport-connect");
23134
+ printLine("Terminal workflows: use the t2 CLI itself.");
23135
+ printLine("Old client configs: clean up with `t2 mcp uninstall`.");
23136
+ printBlank();
23137
+ }
23186
23138
  function registerMcp(program3) {
23187
- const group = program3.command("mcp").description("MCP server + AI-client integration").addHelpText(
23188
- "after",
23189
- `
23190
- Subcommands:
23191
- $ t2 mcp Start the MCP stdio server (default)
23192
- $ t2 mcp start Same as above (explicit)
23193
- $ t2 mcp install Auto-configure Claude / Cursor / Windsurf
23194
- $ t2 mcp uninstall Remove t2000 from every AI-client config
23195
- `
23196
- );
23197
- registerMcpStart(group);
23198
- registerMcpInstall(group);
23139
+ const group = program3.command("mcp", { hidden: true }).description("Retired \u2014 connect clients to https://mcp.t2000.ai/mcp instead");
23140
+ group.action(() => {
23141
+ printRetired();
23142
+ process.exitCode = 1;
23143
+ });
23144
+ for (const retired of ["start", "install"]) {
23145
+ group.command(retired, { hidden: true }).description("Retired \u2014 connect clients to https://mcp.t2000.ai/mcp instead").action(() => {
23146
+ printRetired();
23147
+ process.exitCode = 1;
23148
+ });
23149
+ }
23199
23150
  registerMcpUninstall(group);
23200
23151
  }
23201
23152
 
@@ -23377,7 +23328,7 @@ function registerSkillsCheck(parent) {
23377
23328
  printInfo(
23378
23329
  "No installed skills found (checked ./ and ~/ for .agents/skills, .cursor/rules, .claude/skills)."
23379
23330
  );
23380
- printInfo("Install: t2 skills install \xB7 MCP clients: t2 mcp install (no files, always fresh)");
23331
+ printInfo("Install: t2 skills install \xB7 MCP clients get skills via mcp.t2000.ai (no files, always fresh)");
23381
23332
  printBlank();
23382
23333
  return;
23383
23334
  }
@@ -23470,7 +23421,7 @@ function registerSkillsInstall(parent) {
23470
23421
  printBlank();
23471
23422
  printInfo("Reload your AI client to pick up the new skill files.");
23472
23423
  if (target !== "cursor") {
23473
- printInfo("(For an MCP-aware client, prefer `t2 mcp install` \u2014 same skills, zero local files.)");
23424
+ printInfo("(Clients connected to mcp.t2000.ai already have these as /skill-<name> prompts.)");
23474
23425
  }
23475
23426
  printBlank();
23476
23427
  } catch (err) {
@@ -23540,7 +23491,7 @@ function registerSkillsUninstall(parent) {
23540
23491
 
23541
23492
  // src/commands/skills/index.ts
23542
23493
  function registerSkills(program3) {
23543
- const group = program3.command("skills").description("Install agent SKILL.md playbooks locally (alternative to `t2 mcp install`)").addHelpText(
23494
+ const group = program3.command("skills").description("Install agent SKILL.md playbooks locally").addHelpText(
23544
23495
  "after",
23545
23496
  `
23546
23497
  Subcommands:
@@ -23551,8 +23502,8 @@ Subcommands:
23551
23502
  $ t2 skills check Are installed skills current? (agents: run at session start)
23552
23503
  $ t2 skills uninstall Remove installed skills
23553
23504
 
23554
- For MCP-aware clients (Claude Desktop, Cursor, Windsurf), prefer
23555
- \`t2 mcp install\` \u2014 same skills, no local files.
23505
+ MCP clients connected to https://mcp.t2000.ai/mcp get every skill as a
23506
+ \`/skill-<name>\` prompt automatically \u2014 no local files needed.
23556
23507
  `
23557
23508
  );
23558
23509
  registerSkillsList(group);
@@ -25226,10 +25177,10 @@ Wallet:
25226
25177
  $ t2 limit set --daily 100 Change the daily spend cap (default $100/day)
25227
25178
 
25228
25179
  Connect an AI client:
25229
- Hosted (recommended) Add https://mcp.t2000.ai/mcp as a custom connector
25230
- in Claude, then approve with Google \u2014 no install,
25231
- no key in the client, spend limits you set.
25232
- $ t2 mcp install Local stdio server (advanced) \u2014 for a keypair you hold
25180
+ One URL Add https://mcp.t2000.ai/mcp as a connector in
25181
+ Claude, Cursor, or any MCP client, then approve
25182
+ with Google \u2014 no install, no key in the client,
25183
+ spend limits you set.
25233
25184
  $ t2 skills install Install skills as local SKILL.md files
25234
25185
 
25235
25186
  Models (Audric \u2014 a separate product, billed in credit):