@t2000/cli 2.19.0 → 2.19.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/README.md +7 -3
- package/dist/{chunk-2TOYZOH3.js → chunk-R7KXQRHQ.js} +10 -1
- package/dist/{chunk-2TOYZOH3.js.map → chunk-R7KXQRHQ.js.map} +1 -1
- package/dist/{dist-LIH33AY2.js → dist-A7D5R6SM.js} +2 -2
- package/dist/{dist-EJKUXGU5.js → dist-PGQB2FNL.js} +18 -8
- package/dist/{dist-EJKUXGU5.js.map → dist-PGQB2FNL.js.map} +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-LIH33AY2.js.map → dist-A7D5R6SM.js.map} +0 -0
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
validateLabel,
|
|
150
150
|
verifyCetusRouteCoinMatch,
|
|
151
151
|
walletExists
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-R7KXQRHQ.js";
|
|
153
153
|
import "./chunk-ZRPJE7U5.js";
|
|
154
154
|
import "./chunk-OCLKPYUU.js";
|
|
155
155
|
import "./chunk-SI54PO2N.js";
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
verifyCetusRouteCoinMatch,
|
|
312
312
|
walletExists
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=dist-
|
|
314
|
+
//# sourceMappingURL=dist-A7D5R6SM.js.map
|
|
@@ -139420,6 +139420,7 @@ var ContactManager = class {
|
|
|
139420
139420
|
const existed = key in this.contacts;
|
|
139421
139421
|
this.contacts[key] = { name, address: normalized };
|
|
139422
139422
|
this.save();
|
|
139423
|
+
warnContactsDeprecation();
|
|
139423
139424
|
return { action: existed ? "updated" : "added" };
|
|
139424
139425
|
}
|
|
139425
139426
|
remove(name) {
|
|
@@ -139862,6 +139863,14 @@ var T2000 = class _T2000 extends import_index2.default {
|
|
|
139862
139863
|
* unregistered SuiNS names (vs. propagating the engine-style
|
|
139863
139864
|
* `SuinsNotRegisteredError` — keeps the SDK's error surface
|
|
139864
139865
|
* `T2000Error`-only, consistent with every other write helper).
|
|
139866
|
+
*
|
|
139867
|
+
* [S.279.1 / 2026-05-23 — patch v2.19.1] Promoted from `private` to
|
|
139868
|
+
* `public` so MCP's `t2000_send` dryRun preview path can share the
|
|
139869
|
+
* same resolution logic as the live execute path. Pre-2.19.1 the
|
|
139870
|
+
* MCP dryRun called `agent.contacts.resolve(to)` directly, which
|
|
139871
|
+
* rejected SuiNS names — preview-then-execute flows broke for
|
|
139872
|
+
* `alex.sui`-style recipients. SSOT: never let preview and execute
|
|
139873
|
+
* resolve the same input differently.
|
|
139865
139874
|
*/
|
|
139866
139875
|
async resolveRecipient(input) {
|
|
139867
139876
|
const trimmed = input.trim();
|
|
@@ -140987,7 +140996,7 @@ Call t2000_services first to discover the right endpoint, then t2000_pay to exec
|
|
|
140987
140996
|
);
|
|
140988
140997
|
server.tool(
|
|
140989
140998
|
"t2000_contacts",
|
|
140990
|
-
"List saved contacts (name \u2192 address mappings).
|
|
140999
|
+
"DEPRECATED \u2014 List saved local contacts (~/.t2000/contacts.json name \u2192 address mappings). The local contact map is being sunset; the canonical name system is SuiNS (e.g. alex.sui \u2014 resolved by t2000_send automatically). This tool will be removed in the next major SDK release. Prefer pasting 0x addresses or using SuiNS names directly with t2000_send.",
|
|
140991
141000
|
{},
|
|
140992
141001
|
async () => {
|
|
140993
141002
|
try {
|
|
@@ -141036,16 +141045,16 @@ function registerWriteTools(server, agent) {
|
|
|
141036
141045
|
const mutex = new TxMutex();
|
|
141037
141046
|
server.tool(
|
|
141038
141047
|
"t2000_send",
|
|
141039
|
-
"Send USDC to a Sui address or contact
|
|
141048
|
+
"Send USDC (or another supported asset) to a 0x Sui address, a SuiNS name (e.g. alex.sui), or a saved contact alias. Amount is in dollars. Subject to per-transaction and daily send limits. Set dryRun: true to preview without signing. SuiNS is the preferred name path; saved contacts (~/.t2000/contacts.json) are deprecated and will be removed in the next major SDK release.",
|
|
141040
141049
|
{
|
|
141041
|
-
to: external_exports.string().describe("Recipient Sui address
|
|
141050
|
+
to: external_exports.string().describe("Recipient: 0x Sui address, SuiNS name like 'alex.sui', or saved contact name. SuiNS preferred; contact aliases are deprecated."),
|
|
141042
141051
|
amount: external_exports.number().describe("Amount in dollars to send"),
|
|
141043
141052
|
asset: external_exports.string().optional().describe("Asset to send (default: USDC)"),
|
|
141044
141053
|
dryRun: external_exports.boolean().optional().describe("Preview without signing (default: false)")
|
|
141045
141054
|
},
|
|
141046
141055
|
async ({ to: to2, amount: amount2, asset, dryRun }) => {
|
|
141047
141056
|
try {
|
|
141048
|
-
const resolved = agent.
|
|
141057
|
+
const resolved = await agent.resolveRecipient(to2);
|
|
141049
141058
|
if (dryRun) {
|
|
141050
141059
|
agent.enforcer.check({ operation: "send", amount: amount2 });
|
|
141051
141060
|
const balance = await agent.balance();
|
|
@@ -141059,6 +141068,7 @@ function registerWriteTools(server, agent) {
|
|
|
141059
141068
|
amount: amount2,
|
|
141060
141069
|
to: resolved.address,
|
|
141061
141070
|
contactName: resolved.contactName,
|
|
141071
|
+
suinsName: resolved.suinsName,
|
|
141062
141072
|
asset: asset ?? "USDC",
|
|
141063
141073
|
currentBalance: balance.available,
|
|
141064
141074
|
balanceAfter: balance.available - amount2,
|
|
@@ -141349,7 +141359,7 @@ ${text}`;
|
|
|
141349
141359
|
);
|
|
141350
141360
|
server.tool(
|
|
141351
141361
|
"t2000_contact_add",
|
|
141352
|
-
|
|
141362
|
+
"DEPRECATED \u2014 Save a contact name \u2192 Sui address mapping to ~/.t2000/contacts.json. The local-file contact map is being sunset; the canonical name system is SuiNS (register your-name.sui at https://suins.io once and every Sui app resolves it). Use this tool only if the recipient has no SuiNS name AND you need a memorable local alias. Will be removed in the next major SDK release.",
|
|
141353
141363
|
{
|
|
141354
141364
|
name: external_exports.string().describe('Contact name (e.g. "Tom", "Alice")'),
|
|
141355
141365
|
address: external_exports.string().describe("Sui wallet address (0x...)")
|
|
@@ -141365,7 +141375,7 @@ ${text}`;
|
|
|
141365
141375
|
);
|
|
141366
141376
|
server.tool(
|
|
141367
141377
|
"t2000_contact_remove",
|
|
141368
|
-
"Remove a saved contact by name.",
|
|
141378
|
+
"DEPRECATED \u2014 Remove a saved local contact by name. The local-file contact map is being sunset; will be removed entirely in the next major SDK release.",
|
|
141369
141379
|
{
|
|
141370
141380
|
name: external_exports.string().describe("Contact name to remove")
|
|
141371
141381
|
},
|
|
@@ -142133,7 +142143,7 @@ ${context}
|
|
|
142133
142143
|
})
|
|
142134
142144
|
);
|
|
142135
142145
|
}
|
|
142136
|
-
var PKG_VERSION = "2.19.
|
|
142146
|
+
var PKG_VERSION = "2.19.2";
|
|
142137
142147
|
console.log = (...args) => console.error("[log]", ...args);
|
|
142138
142148
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
142139
142149
|
async function startMcpServer(opts) {
|
|
@@ -142224,4 +142234,4 @@ axios/dist/node/axios.cjs:
|
|
|
142224
142234
|
@scure/bip39/index.js:
|
|
142225
142235
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
142226
142236
|
*/
|
|
142227
|
-
//# sourceMappingURL=dist-
|
|
142237
|
+
//# sourceMappingURL=dist-PGQB2FNL.js.map
|