@zktx.io/sui-mcp 0.8.0 → 0.8.1

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.
@@ -1,5 +1,8 @@
1
1
  import { SuiEndpointError } from "../core/suiEndpoint.js";
2
+ import { ActivityDatabaseFormatError } from "../core/activity/sqliteActivityStoreTypes.js";
2
3
  export function runtimeFailureReason(error, stage) {
4
+ if (error instanceof ActivityDatabaseFormatError)
5
+ return ActivityDatabaseFormatError.recoveryMessage;
3
6
  if (error instanceof SuiEndpointError)
4
7
  return `Sui mainnet endpoint verification failed (${error.kind}). Check the configured endpoint.`;
5
8
  const code = typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
package/docs/MCP_SETUP.md CHANGED
@@ -6,7 +6,7 @@ It does not define tool field contracts or response wording. Use `docs/MCP_TOOLS
6
6
 
7
7
  The normal path is **install once with npm → register the command in each app → ask your first question**. No source checkout or special installation folder is required.
8
8
 
9
- These instructions describe `@zktx.io/sui-mcp@0.8.0`. The npm commands work only after that exact version is published. A repository commit, local build or successful package check does not publish it. Do not substitute an older release and assume it has the behavior described here.
9
+ These instructions describe `@zktx.io/sui-mcp@0.8.1`. The npm commands work only after that exact version is published. A repository commit, local build or successful package check does not publish it. Do not substitute an older release and assume it has the behavior described here.
10
10
 
11
11
  Already using Sui MCP? Follow [Updating an Existing Sui MCP Installation](#updating-an-existing-sui-mcp-installation) before replacing a running installation.
12
12
 
@@ -40,15 +40,15 @@ Interactive cards require the app's MCP Apps support. A local stdio connection a
40
40
  Check that the version described by this guide is available:
41
41
 
42
42
  ```sh
43
- npm view @zktx.io/sui-mcp@0.8.0 version
43
+ npm view @zktx.io/sui-mcp@0.8.1 version
44
44
  ```
45
45
 
46
- The result must be `0.8.0`. If the version is unavailable, stop here; see [NPM command returns 404](#npm-command-returns-404). Wait for publication, use the documentation for an available release, or deliberately choose the optional [developer checkout](#developer-checkout-setup). Dropping the version from the install command can install a different release.
46
+ The result must be `0.8.1`. If the version is unavailable, stop here; see [NPM command returns 404](#npm-command-returns-404). Wait for publication, use the documentation for an available release, or deliberately choose the optional [developer checkout](#developer-checkout-setup). Dropping the version from the install command can install a different release.
47
47
 
48
48
  Install the published package:
49
49
 
50
50
  ```sh
51
- npm install -g @zktx.io/sui-mcp@0.8.0
51
+ npm install -g @zktx.io/sui-mcp@0.8.1
52
52
  ```
53
53
 
54
54
  Install once in the Node/npm environment your apps use, then register each app separately. `-g` makes the executable available across projects; it does not automatically configure every app or grant access to other operating-system users. The installed version stays in place until you explicitly update it.
@@ -156,7 +156,7 @@ After registering your app, paste this into a new chat, not a terminal:
156
156
  Use Sui MCP to show its package name, server name, version and network.
157
157
  ```
158
158
 
159
- The app should call `read_get_server_status`. Confirm `packageName` is `@zktx.io/sui-mcp`, `serverName` is `sui-mcp`, `version` is `0.8.0` and `network` is `mainnet`. These are the expected identifiers, not a sample observation. If the version differs, use [Updating an Existing Sui MCP Installation](#updating-an-existing-sui-mcp-installation) rather than assuming the new installation replaced a running server.
159
+ The app should call `read_get_server_status`. Confirm `packageName` is `@zktx.io/sui-mcp`, `serverName` is `sui-mcp`, `version` is `0.8.1` and `network` is `mainnet`. These are the expected identifiers, not a sample observation. If the version differs, use [Updating an Existing Sui MCP Installation](#updating-an-existing-sui-mcp-installation) rather than assuming the new installation replaced a running server.
160
160
 
161
161
  ### 2. Try a read without connecting a wallet
162
162
 
@@ -305,7 +305,7 @@ npm run smoke:mainnet
305
305
 
306
306
  ## Install from the MCP Registry
307
307
 
308
- This is an alternative to the global-install path. If your client supports the [MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=sui-mcp), choose `io.github.zktx-mcp/sui-mcp` and check that the offered package is `@zktx.io/sui-mcp` at version `0.8.0`. Do not assume the registry entry already offers an unpublished release. Check the running identity through the first-use flow after registration.
308
+ This is an alternative to the global-install path. If your client supports the [MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=sui-mcp), choose `io.github.zktx-mcp/sui-mcp` and check that the offered package is `@zktx.io/sui-mcp` at version `0.8.1`. Do not assume the registry entry already offers an unpublished release. Check the running identity through the first-use flow after registration.
309
309
 
310
310
  ## Download on demand (npx)
311
311
 
@@ -314,7 +314,7 @@ Use this alternative if you do not want a global install. Replace the global com
314
314
  ```json
315
315
  {
316
316
  "command": "npx",
317
- "args": ["-y", "@zktx.io/sui-mcp@0.8.0"]
317
+ "args": ["-y", "@zktx.io/sui-mcp@0.8.1"]
318
318
  }
319
319
  ```
320
320
 
@@ -323,7 +323,7 @@ For Codex, the equivalent is:
323
323
  ```toml
324
324
  [mcp_servers.sui-mcp]
325
325
  command = "npx"
326
- args = ["-y", "@zktx.io/sui-mcp@0.8.0"]
326
+ args = ["-y", "@zktx.io/sui-mcp@0.8.1"]
327
327
  ```
328
328
 
329
329
  This downloads the requested published package as needed. A cold cache can exceed the app's startup timeout; the global install avoids per-launch package resolution. Keep the exact version in every app's configuration. Neither an unversioned package name nor `@latest` guarantees the version described by this guide.
@@ -342,13 +342,18 @@ the installed package or configured version, then reopen them and check
342
342
  name must match the intended installation. Updating the package does not
343
343
  replace a backend that is already running.
344
344
 
345
- Incompatible databases and backups are rejected without migration. To use a
346
- different database structure, choose a new empty directory and preserve the
347
- existing data and backups. Configure endpoints and read context as needed and
348
- connect through a new card. See
349
- [Local Database Architecture](LOCAL_DB_ARCHITECTURE.md#current-format-and-backups).
350
- Do not reset data or resend a transaction as an update step. Coordinate a safe
351
- restart if a transaction request is still in progress.
345
+ This is a pre-release. Local data compatibility between releases is not
346
+ guaranteed, and migration is not provided. An incompatible database is rejected
347
+ before writes; an npm update or reinstall does not convert or remove it.
348
+ If startup reports a database format mismatch, follow [Database format mismatch](#database-format-mismatch).
349
+ You may keep the old files and select a new empty directory, or explicitly
350
+ choose to discard the old local data and settings and restart with defaults.
351
+ Neither the runtime nor an installation agent may make that deletion choice
352
+ for the user. A compatible update does not require a reset.
353
+ Never resend a transaction as an update step. Coordinate a safe restart if a
354
+ transaction request is still in progress. See
355
+ [Local Database Architecture](LOCAL_DB_ARCHITECTURE.md#current-format-and-backups)
356
+ for the storage and backup boundary.
352
357
 
353
358
  ### Switching from a Different Package
354
359
 
@@ -369,7 +374,7 @@ restart first. A previous wallet pairing can remain in the wallet app; remove
369
374
  an unwanted pairing there rather than assuming new local storage disconnected it.
370
375
 
371
376
  Replace the old registration instead of adding a second one. Use
372
- `sui-mcp` as the default registration name. Install `@zktx.io/sui-mcp@0.8.0`
377
+ `sui-mcp` as the default registration name. Install `@zktx.io/sui-mcp@0.8.1`
373
378
  globally and register the `sui-mcp` command, or use the exact-version
374
379
  [npx alternative](#download-on-demand-npx). A client-defined alias does not change the package,
375
380
  server identity or permissions. Remove obsolete runtime environment overrides. If you set
@@ -461,7 +466,7 @@ A card accepts one read selection. Moving between chats or recreating its frame
461
466
 
462
467
  ## Local data format
463
468
 
464
- Start this runtime with an empty `SUI_MCP_DATA_DIR` or a database already in its current format. A mismatched existing database is refused before writes; incompatible databases and backups are not migrated or converted. A database with different table, constraint or field definitions requires a new empty data folder, preserving the existing folder. Databases and backups do not carry a separate numeric schema version. With a new empty folder, configure the required account context and endpoints. Existing files are left in place, and environment overrides keep their existing precedence. See [Local DB Architecture](LOCAL_DB_ARCHITECTURE.md) for the current format, backup scope and card-result retention. Card results do not expire with the input period and can increase DB size. Reset/import removes them along with the affected local data; it is not a card-only space cleanup operation.
469
+ Start this runtime with an empty `SUI_MCP_DATA_DIR` or a database already in its current format. A mismatched existing database is refused before writes; incompatible databases and backups are not migrated or converted. A database with different table, constraint or field definitions requires an empty data folder. Startup leaves existing files in place. Follow [Database format mismatch](#database-format-mismatch) to preserve the old files or explicitly choose a fresh start. Databases and backups do not carry a separate numeric schema version. With a new empty folder, configure the required account context and endpoints. Environment overrides keep their existing precedence. See [Local DB Architecture](LOCAL_DB_ARCHITECTURE.md) for the current format, backup scope and card-result retention. Card results do not expire with the input period and can increase DB size. Reset/import removes them along with the affected local data; it is not a card-only space cleanup operation.
465
470
 
466
471
  ## Local Settings
467
472
 
@@ -674,7 +679,7 @@ It is not part of CI or `release:check`.
674
679
  An `EACCES` or administrator-permission error means npm cannot write to its global installation directory. On macOS/Linux, if that directory is administrator-owned and you intend to install there, run the installer with administrator authorization:
675
680
 
676
681
  ```sh
677
- sudo npm install -g @zktx.io/sui-mcp@0.8.0
682
+ sudo npm install -g @zktx.io/sui-mcp@0.8.1
678
683
  ```
679
684
 
680
685
  Enter the administrator password only in your terminal, never in chat. Launch the AI apps normally afterward; running Sui MCP does not require administrator privileges. If you cannot authorize that installation, follow npm's [global installation permission guidance](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally). This step is only for a permission failure, not an extra installation step for everyone.
@@ -741,6 +746,58 @@ separate condition and does not by itself shut down the parent read service.
741
746
  - If a stored custom endpoint fails, temporarily start with `SUI_MCP_GRPC_URL`, open the Settings card, restore the default Sui gRPC URL or save a new endpoint, remove the override, and restart.
742
747
  - If an environment override is present, confirm it has scheme, host, and explicit port only.
743
748
  - If the startup chain identifier guard fails, use a Sui mainnet gRPC endpoint. If a Sui activity tool fails its GraphQL chain identifier guard, use a Sui mainnet GraphQL endpoint.
749
+ - If the reason says `Local database format does not match this runtime`, use [Database format mismatch](#database-format-mismatch).
750
+
751
+ ### Database format mismatch
752
+
753
+ This recovery applies to an existing installation with incompatible local data.
754
+ It is not an extra step for a first-time installation. The diagnostic
755
+ `Local database format does not match this runtime` means the database was
756
+ rejected before writes. The runtime does not migrate, repair or automatically
757
+ delete it. Reinstalling the npm package alone will not resolve this mismatch.
758
+ The Settings card cannot perform the recovery while startup is blocked.
759
+
760
+ Choose how to handle the old data:
761
+
762
+ - **Keep the files:** Leave the existing folder untouched and set
763
+ `SUI_MCP_DATA_DIR` to a new empty folder in every participating app. Use the
764
+ same folder for all apps; see [Advanced Runtime Settings](#advanced-runtime-settings).
765
+ Old-format backups cannot be restored into the new format.
766
+ - **Start fresh with default settings:** Explicitly choose to delete the old
767
+ Sui MCP data folder, then follow the steps below. This removes local activity
768
+ and saved card results, stored addresses, network and endpoint settings, and
769
+ private WalletConnect sessions and keys. An agent must obtain that choice;
770
+ a request to install, update or fix startup is not permission to delete data.
771
+
772
+ For an explicitly chosen fresh start:
773
+
774
+ 1. Stop Sui MCP in every app and wait for the shared backend to exit. Do not
775
+ delete data while a transaction request is unresolved; resolve the existing
776
+ request's digest or coordinate recovery first.
777
+ 2. Locate the active Sui MCP data folder. With default settings, use your file
778
+ manager's Go to Folder or address bar with the location below, then delete
779
+ only the `sui-mcp` folder after confirming the fresh-start choice.
780
+
781
+ | Platform | Default Sui MCP data folder |
782
+ | --- | --- |
783
+ | macOS | `~/Library/Application Support/sui-mcp` |
784
+ | Windows | `%APPDATA%\sui-mcp` |
785
+ | Linux | `$XDG_DATA_HOME/sui-mcp`, or `~/.local/share/sui-mcp` when `XDG_DATA_HOME` is unset |
786
+
787
+ If `SUI_MCP_DATA_DIR` is configured, it selects the active folder instead.
788
+ Remove an obsolete override from each app to return to the default path.
789
+ Preserve other app settings and MCP registrations; do not delete a parent
790
+ directory or another server's data.
791
+ 3. Keep the global `sui-mcp` command registration and reopen the MCP connections.
792
+ The runtime creates a new database with built-in defaults automatically.
793
+ Ask for the package name, version and network using the [first-use status check](#1-confirm-the-running-server).
794
+ A new wallet connection is needed only when you want wallet-dependent features.
795
+
796
+ Deleting local files does not reverse blockchain transactions or remove a
797
+ pairing still shown in your wallet app. Remove an unwanted pairing in the wallet
798
+ itself. Do not resend a transaction to reconstruct local history. Backups stored
799
+ outside the deleted folder remain untouched, and incompatible backups still
800
+ cannot be imported.
744
801
 
745
802
  ### Tool calls return `active_account_not_set`
746
803
 
@@ -758,7 +815,7 @@ If the user supplied a specific Sui address for `read_summarize_wallet_assets` o
758
815
 
759
816
  A 404 means the requested package or version could not be retrieved from the
760
817
  selected registry. Confirm the exact name and version, for example with
761
- `npm view @zktx.io/sui-mcp@0.8.0 version --registry=https://registry.npmjs.org`.
818
+ `npm view @zktx.io/sui-mcp@0.8.1 version --registry=https://registry.npmjs.org`.
762
819
  A new version may not have been published or become visible yet; a mistyped name
763
820
  or an alternate/private registry can also explain the response. Check the
764
821
  publication result and registry configuration before retrying. Do not assume
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zktx.io/sui-mcp",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "mcpName": "io.github.zktx-mcp/sui-mcp",
5
5
  "description": "Sui MCP is a local-first toolkit for helping AI applications and users inspect Sui DeFi actions before execution.",
6
6
  "license": "MIT",