@zktx.io/sui-mcp 0.6.2 → 0.8.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.
Files changed (87) hide show
  1. package/README.md +94 -52
  2. package/dist/adapters/adapterPromptSurfaces.js +1 -1
  3. package/dist/core/activity/localDataService.js +8 -21
  4. package/dist/core/activity/localDataValidation.js +22 -46
  5. package/dist/core/activity/sqliteAccountStore.js +46 -0
  6. package/dist/core/activity/sqliteActivityStore.js +65 -147
  7. package/dist/core/activity/sqliteActivityStoreSchema.js +42 -26
  8. package/dist/core/activity/transactionActivityService.js +2 -2
  9. package/dist/core/preferences/preferencesStore.js +2 -2
  10. package/dist/core/preferences/sqlitePreferencesRepository.js +10 -0
  11. package/dist/core/read/deepbookReadHelpers.js +1 -1
  12. package/dist/core/read/readResponseGuidance.js +6 -6
  13. package/dist/core/session/cardResult.js +41 -0
  14. package/dist/core/session/cardSession.js +1 -1
  15. package/dist/core/session/cardSessionStore.js +51 -19
  16. package/dist/core/session/chainAccounts.js +120 -0
  17. package/dist/core/session/sessionStore.js +4 -8
  18. package/dist/core/session/settingsFileProtocol.js +1 -1
  19. package/dist/core/session/settingsFileStore.js +3 -30
  20. package/dist/core/session/settingsOperation.js +27 -19
  21. package/dist/core/session/settingsWorkflow.js +161 -87
  22. package/dist/core/session/sqliteCardStore.js +34 -14
  23. package/dist/core/session/sqliteSessionStore.js +5 -5
  24. package/dist/core/session/sqliteSettingsWorkflowStore.js +135 -41
  25. package/dist/core/session/sqliteTransactionRequest.js +18 -0
  26. package/dist/core/session/sqliteWalletConnectionOperation.js +13 -0
  27. package/dist/core/session/sqliteWalletWorkflowStore.js +569 -333
  28. package/dist/core/session/status.js +2 -2
  29. package/dist/core/session/wait.js +6 -11
  30. package/dist/core/session/walletConnection.js +71 -46
  31. package/dist/core/session/walletConnectionOperations.js +24 -0
  32. package/dist/core/session/walletRuntime.js +7 -13
  33. package/dist/core/session/walletWorkflow.js +248 -99
  34. package/dist/core/session/workflowState.js +104 -38
  35. package/dist/core/session/workflowView.js +92 -101
  36. package/dist/mcp/activeAccountResponse.js +3 -0
  37. package/dist/mcp/prompts.js +10 -4
  38. package/dist/mcp/resources.js +1 -1
  39. package/dist/mcp/responseGuidance.js +7 -9
  40. package/dist/mcp/server.js +2 -2
  41. package/dist/mcp/serverInfo.js +21 -19
  42. package/dist/mcp/toolErrors.js +5 -3
  43. package/dist/mcp/toolNames.js +47 -46
  44. package/dist/mcp/tools/action/prepareSuiActionReview.js +13 -20
  45. package/dist/mcp/tools/read/deepbookReadTools.js +1 -1
  46. package/dist/mcp/tools/read/index.js +2 -2
  47. package/dist/mcp/tools/read/readToolHelpers.js +9 -7
  48. package/dist/mcp/tools/read/serverStatusTools.js +4 -5
  49. package/dist/mcp/tools/read/transactionActivityTools.js +3 -3
  50. package/dist/mcp/tools/session/executionResultTools.js +2 -2
  51. package/dist/mcp/tools/session/shared.js +2 -2
  52. package/dist/mcp/tools/session/statusTools.js +12 -10
  53. package/dist/mcp/tools/session/walletConnectionTools.js +29 -17
  54. package/dist/mcp/tools/settings/index.js +7 -4
  55. package/dist/mcp-app/account.html +7 -7
  56. package/dist/mcp-app/chart.html +3 -3
  57. package/dist/mcp-app/connect.html +13 -13
  58. package/dist/mcp-app/disconnect.html +3637 -0
  59. package/dist/mcp-app/disconnect.notices.txt +1480 -0
  60. package/dist/mcp-app/receipt.html +393 -393
  61. package/dist/mcp-app/review.html +459 -459
  62. package/dist/mcp-app/settings.html +7 -7
  63. package/dist/mcp-ui/contracts.js +3 -1
  64. package/dist/mcp-ui/tools.js +4 -4
  65. package/dist/runtime/application.js +3 -3
  66. package/dist/runtime/config.js +3 -6
  67. package/dist/runtime/localSettingsService.js +11 -8
  68. package/dist/runtime/shared/control.js +2 -2
  69. package/dist/runtime/smokeMainnetRead.js +23 -22
  70. package/dist/runtime/smokeReview.js +7 -7
  71. package/dist/runtime/start.js +1 -1
  72. package/dist/runtime/walletConnectTransport.js +16 -16
  73. package/dist/runtime/walletSdkChildRuntime.js +29 -12
  74. package/dist/runtime/walletSdkIpc.js +5 -4
  75. package/dist/runtime/walletSdkProcess.js +24 -8
  76. package/docs/AGENT_BEHAVIOR.md +149 -120
  77. package/docs/LOCAL_DB_ARCHITECTURE.md +103 -75
  78. package/docs/MCP_SETUP.md +365 -382
  79. package/docs/MCP_TOOLS.md +387 -271
  80. package/docs/SDK_API.md +23 -11
  81. package/docs/SIGNABLE_ADAPTER_CONTRACT.md +6 -6
  82. package/docs/TRANSACTION_ACTIVITY_LOG.md +11 -7
  83. package/docs/UTILITY_INDEX.md +66 -64
  84. package/docs/WALLET_CONNECTION.md +162 -166
  85. package/package.json +1 -1
  86. package/protocols/deepbook-margin.md +1 -1
  87. package/protocols/deepbook-v3.md +2 -2
@@ -1,172 +1,163 @@
1
1
  # Wallet Connection
2
2
 
3
- WalletConnect provides approved Sui mainnet account context and a transport for
4
- individual wallet requests. It is not login, proof of address ownership, custody, or standing permission to transact. Frontend behavior is defined in
3
+ WalletConnect provides approved mainnet account context and a transport for
4
+ individual Sui wallet requests. It is not login, proof of address ownership, custody, or standing permission to transact. Frontend behavior is defined in
5
5
  [Frontend Policy](https://github.com/zktx-mcp/sui-mcp/blob/main/docs/FRONTEND_POLICY.md)
6
6
  in the source repository; tools are in [MCP Tools](MCP_TOOLS.md).
7
7
 
8
- ## Connection and read account
9
-
10
- `session.create_wallet_connection` takes an intent: `connect`, `disconnect` or `manage` (the default). A connect-intent card automatically starts one pairing after the View confirms current state with its UI permission, unless a connection or operation already exists. Manage opens connection controls without starting pairing; Connect wallet starts it only after the user clicks. Disconnect opens target-specific confirmation when one connection is available; the user chooses Confirm disconnect or returns with Back. No model-facing call can disconnect or request a signature. Public saved reads never start pairing. QR data stays in UI metadata bound to the exact card, connection and revision; reopening a waiting card preserves that pairing.
11
-
12
- Sui MCP uses one wallet connection at a time across all clients sharing a
13
- data directory. That connection can approve several Sui mainnet addresses; other
14
- chains are not supported. The same connection rule controls displayed actions,
15
- restoration, SDK observations and atomic SQLite admission. An unexpired connected wallet, pending approval or pending disconnection
16
- prevents another pairing, including requests from different cards. A competing
17
- card retains its own permission and reports the existing connection; it does not
18
- inherit another card's QR or waiting controls. A failed connection attempt needs
19
- an explicit retry even if the other connection later ends. If multiple valid connections are saved, none is selected for account use,
20
- review preparation or signing. The Connect card shows each exact target for
21
- user-confirmed disconnection. After recorded disconnections leave one valid
22
- connection and no pending connection operation, that connection becomes usable;
23
- with no recorded or SDK-present connection and no pending operation, a new pairing is allowed. Terminal history alone does not
24
- block it. A failed disconnect remains unconfirmed in the wallet app; its SDK
25
- session cannot revive the failed product record.
26
- The current SDK snapshot also gates pairing and account use. A known failed or
27
- disconnected record whose SDK session remains present is a disconnect target
28
- on a new card, not a usable wallet. `manageableConnectionIds` identifies those
29
- exact targets and ordinary connected targets, including expired records.
30
- An unmapped SDK session in a published available run sets
31
- `connectionReconciliationRequired: true` after pending registration/cleanup
32
- ends. An initializing or state_sync memory snapshot does not establish this
33
- diagnosis, and an absent flag does not prove session absence. Pairing, account use, preparation and signing
34
- remain blocked. Remove the retained connection in the wallet app, then confirm
35
- its absence through the current connection service. Settings/Troubleshooting
36
- can explicitly restart the service to inspect it again, but restarting never
37
- promotes an unrecorded or failed session into a usable connection. The card does
38
- not invent a connection ID or report physical SDK failure.
39
- The SDK's availability and a recorded terminal outcome alone do not prove absence.
40
-
41
- The backend validates accounts, Sui mainnet namespace, methods and expiry before
42
- recording a connection. A single wallet-approved account can become read context
43
- from an explicit connection; multiple approved accounts require an explicit
44
- selection. The active read account is stored in SQLite until changed or cleared.
45
- SDK restoration and status reads never undo a user clearing that context. The stored selection is separate from its eligibility as a default for current asset reads. Implicit asset reads require a usable current wallet connection for the selected address; disconnection, expiry, pending disconnection, multiple-connection conflict or unavailable wallet state removes that default. Tools with an `account` input may still read an explicit address; connected-account-only tools require connection/account selection or recovery of wallet availability. Explicit-address public reads and saved transaction/activity reads remain available. `session.get_interaction_status.assetReadAccount` supplies that default-account decision alongside `connections` and `walletAvailability`.
46
-
47
- | Connection state | Available behavior |
48
- | --- | --- |
49
- | Unsubmitted card | Automatic pairing for connect intent; manual Connect wallet for manage intent; address selection and target-specific disconnect when permitted |
50
- | Multiple valid saved connections | Resolve through target-specific disconnect; no new pairing, address use, review preparation or signature |
51
- | awaiting_approval | Same private QR and approval observation; Stop connecting |
52
- | connected | View approved accounts and expiry; a new card may select another operation |
53
- | rejected / failed / expired / stopped / disconnected | View the recorded outcome; new operations need a new card |
54
-
55
- `session.get_interaction_status` reports the last confirmed wallet-service observation and stored connections. SDK events and command checks apply review/request invalidation through the same database owner. An ordinary status read does not wait for a fresh SDK request, change the selected account or start a wallet operation. `walletObservation` identifies the local service run, observation order and check time; it is not proof of the wallet app's current screen or online status. See the [interaction API](MCP_TOOLS.md) for the response contract.
56
-
57
- An admitted disconnect is a pending card operation, distinct from the last
58
- confirmed connection state. The same connection cannot be selected for another
59
- operation while disconnection is pending. Cards and wait tools observe its
60
- stored completion or failure; a connected-session update is not completion of
61
- the disconnect. A restart does not replay an unfinished disconnect or restore
62
- that connection as usable. The wallet app may still retain the connection.
63
-
64
- If the SDK disconnect ends but its local completion write fails, current reads
65
- settle the operation once storage recovers. An available SDK with no such session
66
- confirms local disconnection; an unavailable SDK or retained session produces an
67
- unconfirmed failure and wallet-app guidance. Reading never repeats disconnect.
68
- Approval storage failure can also leave a connection in the wallet app. Local
69
- failure or expiry does not prove remote revocation; remove retained connections
70
- in the wallet app. No fixed cleanup period is promised, and an SDK session alone
71
- never restores product authority.
72
-
73
- Chat navigation and frame recreation are not transitions. Local stopping does
74
- not claim that a remote wallet dialog closed. A late approval cannot revive a
75
- stopped connection. An unavailable backend wallet service keeps ordinary reads
76
- available and makes connection cards unavailable with an explicit explanation.
77
-
78
- The product supplies its public WalletConnect project identifier without user
79
- configuration or an override. Shared Relay service limits can affect connection
80
- availability across installations. An initialization failure does not establish
81
- that the user omitted a setting or that a transaction failed. A failure to
82
- restore saved connections or subscribe to wallet changes disables wallet operations until the wallet service is recovered;
83
- it cannot leave signing available without account/chain change observation.
84
- Stored review, request and verified execution facts remain readable through
85
- session tools and cards as well as ordinary evidence tools. `walletAvailability`
86
- describes the backend wallet dependency; it is not connection approval or
87
- transaction authorization. An unavailable dependency does not erase a saved
88
- result or prove chain failure. Startup diagnostics contain safe failure stages,
89
- not the project ID, SDK error bodies or wallet credentials.
90
-
91
- The wallet SDK runs in a separate child process. The parent retains database
92
- authority, transaction verification, submission and chain-result observation.
93
- An unresponsive wallet service does not prevent ordinary reads or access to
94
- stored results. Normal startup is shown as initialization, not as a wallet
95
- rejection. No implicit asset account is offered until the current service run
96
- confirms a usable connection.
97
-
98
- Settings owns explicit connection-service restart. Open its Troubleshooting
99
- section, inspect the current run and affected requests, then confirm the
100
- restart. Connect manages connections/approved addresses and retains individual
101
- Disconnect controls for conflicting saved sessions; it does not own global
102
- service controls. A restart waits for old child exit, new run reservation and
103
- complete ready observation. Unsubmitted signing authority is revoked at
104
- admission; late signatures cannot submit. Already submitted transactions keep
105
- their original digest and observation. A new explicit Settings operation may
106
- supersede a still-pending startup without erasing a known failure.
107
-
108
- Restart completion does not confirm an interrupted disconnect or remove a
109
- remote session. Check retained connections in the wallet app. If Settings or
110
- the parent is unavailable, fully quit all apps using Sui MCP and reopen them;
111
- closing a peer/window can leave the owner running. Full app restart, rather
112
- than child restart, applies stored endpoints and installation changes.
113
-
114
- A new owner records interrupted connection approval as stopped and unconfirmed
115
- disconnection as failed. It does not repeat either request or restore their
116
- wallet authority. Already submitted transactions remain readable by their digest.
117
- Historical service-recovery cards retain their recorded outcomes; they grant
118
- no new restart input. See [setup troubleshooting](MCP_SETUP.md#wallet-connection-boundary).
119
-
120
- An interrupted wallet operation reports `progress.status: "unavailable"` and a
121
- bounded wait returns `waitOutcome: "unavailable"` with the recorded facts. It does
122
- not pretend that the operation completed or the wait timed out. A completed
123
- request returns its saved result immediately. The backend can still verify the
124
- known digest of an already submitted transaction without WalletConnect. No
125
- financial request is replayed when reading or recovering results.
126
-
127
- A failed disconnect means disconnection was not confirmed. Inspect the connection
128
- in your wallet app and remove it there if it remains listed. Local service
129
- recovery does not verify remote removal. A card for an earlier successful
130
- connection may show that the connection is now unavailable; that is not proof
131
- that its original pairing failed.
132
-
133
- Initialization is described neutrally. A pending card command shows that its
134
- response has not arrived yet; a pending disconnection can show the app-restart
135
- procedure without declaring a timeout or failure. These notices do not diagnose a hung service,
136
- assert admission, or automatically send another command. The same-request check
137
- takes priority when a signing request's delivery is uncertain. Review messages
138
- preserve whether preparation was invalidated by wallet selection, a requested
139
- disconnect, multiple-connection conflict, or service loss. Historical messages
140
- retain their original cause.
8
+ ## One connection, fixed addresses
9
+
10
+ Settings → Wallet networks specifies the networks requested on the next connection.
11
+ The default is Sui. Supported address networks are Sui (`sui:mainnet`), Ethereum
12
+ (`eip155:1`) and Solana (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`), all mainnet.
13
+ Only Sui supports asset reads, transaction review, signing and submission. Address
14
+ support on another chain is not bridge execution or other-chain signing.
15
+
16
+ There is one current product connection. It supplies at most one fixed address
17
+ per chain. Change the wallet, account, address or approved network scope by
18
+ disconnecting, waiting for confirmed removal and connecting again. Historical
19
+ connection records are retained for existing transaction references; they are
20
+ not simultaneous connections or account choices. Connect contains no chain or
21
+ account selectors and offers no additional-connection action.
22
+ Connect and Disconnect are separate one-purpose cards. `session_open_wallet_connection_card`
23
+ opens a connection request with no intent selector. Its initial authenticated UI
24
+ confirmation admits one pairing request. `session_open_wallet_disconnection_card`
25
+ opens a confirmation for the exact current session. Ordinary calls never apply
26
+ these effects. If there is no current session to disconnect, the gateway returns
27
+ `no_session_to_disconnect` without creating a card or wallet operation.
28
+ Disconnection does not revoke onchain permissions.
29
+
30
+ Every ended Connect or Disconnect card contains its recorded result, time,
31
+ wallet name when available, and network approval results. It contains no addresses,
32
+ QR code or further operation controls. The result does not claim that a past
33
+ approval is still a current connection. Read current fixed addresses through
34
+ `session_get_interaction_status`; saved history and transaction targets keep their
35
+ own exact addresses. Changing current state never rewrites an ended card.
36
+
37
+ The request uses saved networks as optional namespaces. Sui requests
38
+ `sui_signTransaction`, `accountsChanged` and `chainChanged`; Ethereum and Solana
39
+ request addresses with no financial methods. An empty saved network set disables
40
+ new requests. Changing Settings affects only future connections, not a request
41
+ already admitted or an approved connection. Saving a changed scope ends unsent
42
+ Connect cards that captured different networks; they never reopen when the setting
43
+ returns to its earlier value.
44
+
45
+ Only requested, valid returned accounts are used. Each requested chain records
46
+ one immutable result: a bound address, not approved, multiple accounts, or invalid
47
+ response. One valid distinct address binds automatically. Multiple distinct
48
+ addresses make only that chain unavailable; none is chosen silently. Other valid
49
+ returned chains remain usable. A later grant update cannot replace a fixed
50
+ address or fill a missing result. To obtain a different result, reconnect.
51
+ An omitted chain is not proof of permanent wallet non-support.
52
+
53
+ Each card admits at most one fixed operation and keeps one final result. SDK
54
+ settlement is a separate current fact; it does not reopen or rewrite that result.
55
+ Use the [Session Tools API](MCP_TOOLS.md#session-tools) for exact card/operation
56
+ reads and bounded waits. Opening a model-facing gateway grants no wallet effect;
57
+ the authenticated UI initiates the permitted operation. Frame recreation never
58
+ repeats pairing. QR credentials remain private UI metadata.
59
+
60
+ Cancel or Stop permanently ends that card's input and hides its QR. SDK cleanup
61
+ continues independently; late approval cannot create address or signing authority.
62
+ Cleanup completion never reopens the card or starts a new request. A new user
63
+ request needs a new card. A timeout, SDK exit or late response is not user
64
+ cancellation. Failed disconnection does not prove remote removal; a retained
65
+ session can still be explicitly disconnected from a new exact-target Disconnect card.
66
+ Recovery uses current session evidence separately from that recorded failure.
67
+ A settled attempt without approval or a recorded session reference has no
68
+ session when current-run ownership is confirmed, no connection work remains and
69
+ no unrecorded SDK session is retained. It does not require repeated status checks.
70
+ Pending approval or cleanup, a missing observation for a recorded session, and
71
+ unavailable service remain unconfirmed. Once absence is confirmed and pending
72
+ cleanup ends, the user can request a new Connect card. An ended card never regains
73
+ input. An existing Review tied to the ended
74
+ connection needs a new Review after reconnection; a declined connection alone
75
+ does not require a transaction Review.
76
+
77
+ Disconnect confirmation binds the exact connection, networks and affected
78
+ pending approvals. Changed impact requires fresh confirmation. Pending connection
79
+ or cleanup I/O blocks another Connect even if the stored result is stopped,
80
+ failed or expired. Only current-run absence confirmation plus settled I/O releases
81
+ that constraint. An idle or historical row alone cannot establish absence.
82
+
83
+ `session_get_interaction_status` exposes singular `connection`, `requestedChains`,
84
+ `canDisconnect` and the last `walletObservation`. `assetReadAccount` describes
85
+ whether the fixed Sui address is currently available for implicit asset reads.
86
+ `account_get_active_account` reports its saved read context, not live eligibility
87
+ or signing permission. Explicit-address reads remain public and do not select
88
+ an account. Settings can clear the saved read address without changing the wallet,
89
+ fixed addresses or transaction targets; this suppression survives restart of the
90
+ same connection. A fresh explicit connection can supply a new read address.
91
+
92
+ Current service availability, exact session presence, data generation, fixed
93
+ address and per-chain grant must all match for new financial input. Chain-local
94
+ changes invalidate that chain's old authority irreversibly; another chain's change
95
+ does not invalidate an unchanged Sui grant. A Review remains bound to its original
96
+ connection and account after reconnection. A new wallet needs a new Review.
97
+
98
+ An unrecorded SDK session is never adopted by address, order or recency. It blocks
99
+ new connection and financial input while saved facts remain readable. Remove
100
+ unwanted retained sessions in the wallet app and check status. An already admitted
101
+ transaction retains its own exact grant and submission checks. Restarting does not
102
+ approve an unrecorded session or prove its removal.
103
+
104
+ The backend owns the WalletConnect SDK in a child process with private session
105
+ storage. The parent owns SQLite admission, verification, submission and chain
106
+ observation. An initialization or observation failure disables affected wallet
107
+ operations, not saved result reads, and is never reported as wallet rejection or
108
+ chain failure. Startup diagnostics omit credentials and SDK error bodies.
109
+ The product supplies its public project identifier without user configuration;
110
+ shared Relay limits can affect availability.
111
+
112
+ Settings → Troubleshooting owns explicit connection-service restart. The user
113
+ confirms the run and affected requests. Restart waits for actual old-child exit,
114
+ new-run reservation and a ready observation. It revokes unsubmitted signing
115
+ authority; late signatures cannot submit. Submitted transactions keep the same
116
+ digest and result observation. A new Settings operation may supersede a pending
117
+ startup without erasing a known failure.
118
+
119
+ Recovery reconciles only the retained current topic. A missing snapshot entry is
120
+ checked through the existing SDK session check; it is not assumed absent. A normal
121
+ approved connection in the current data generation can regain usage after a new
122
+ ready run. A stopped, terminal or older-generation connection receives cleanup
123
+ ownership only. Its original result, fixed addresses and read-address suppression
124
+ remain unchanged. Confirmed absence releases stale occupancy, including records
125
+ from an earlier owner; it does not replay a connection or financial effect.
126
+ An unadmitted purpose card is not ended merely by an SDK run change; its original target and input deadline remain fixed. Ended cards are not reevaluated.
127
+
128
+ An approved SDK response is first retained privately for exact-session cleanup.
129
+ That retention alone creates no usable connection, address history or signing
130
+ authority. The connection and its fixed addresses become usable only after the
131
+ success result commits. If that publication fails, the session is cleaned up or
132
+ retained for explicit Disconnect; later reads do not retry the failed connection
133
+ as a success or repeat remote disconnection. A duplicate response for the same
134
+ already completed approval preserves that result and does not disconnect it.
135
+
136
+ A new owner stops interrupted connection approval and records unconfirmed
137
+ disconnection as failed. It expires old input and never replays financial work.
138
+ Pending SDK cleanup remains visible separately from immutable results. Bounded
139
+ waits report actual progress, including unavailable service, rather than implying
140
+ completion or remote cancellation. Known submitted digests remain readable without
141
+ WalletConnect. If Settings or the parent cannot be reached, stop all participating
142
+ MCP connections so the shared parent exits before reopening; a peer/window closing
143
+ alone may leave it alive. See [setup troubleshooting](MCP_SETUP.md#wallet-connection-boundary).
141
144
 
142
145
  ## Transaction approval
143
146
 
144
- A default address is qualified by the connection through which it was selected.
145
- If that connection ends and another connection approves the same address,
146
- choose Use address in the remaining connection's card before using it as the
147
- default or preparing a new review. The saved address remains readable history.
148
- A restored connection with the same ID retains its selection; a cleared or
149
- source-less selection is never inferred from matching addresses. New explicit
150
- connections that approve one address still select it automatically.
151
-
152
- The backend publishes the current usable connection and default-address
153
- eligibility. A recorded connection whose expiry has passed is not an additional
154
- usable wallet, even before the next SDK observation updates its record.
155
- Recorded targets remain available for appropriate disconnection; they do not
156
- block the sole usable connection's address selection or review choices.
157
-
158
- A single available wallet/account is displayed without a selection dropdown.
159
- A permitted live Review card automatically prepares and renews verified conditions for that target. Multiple valid wallet connections block preparation and signing; resolve the conflict in Connect. Several approved addresses inside the single wallet require address selection there. A failed computation offers Retry review rather than repeating automatically. The explicit approval button selects the displayed transaction revision; automatic preparation never requests a signature. Backend
160
- account, connection, revision and material checks remain authoritative.
161
-
162
- An existing review keeps its original account binding. Preparing or updating it
163
- requires that account to be the selected read account as well as an approved
164
- account on the chosen connection. If read context changes from A to B, select A
165
- again to update the same review, or request a new review for B. The card explains
166
- the current selection restriction separately from saved review messages, which
167
- can record a preparation failure or connection change. A refused incompatible
168
- selection starts no preparation and records no failed review. Read context alone does not revoke already verified A signing
169
- evidence or alter an admitted request.
147
+ The current fixed Sui address must have a usable exact connection for a new
148
+ Review. Clearing its saved read context does not change that transaction target.
149
+ SDK restoration can recover the same approved current-generation connection;
150
+ backup restore cannot activate an account or restore wallet authority.
151
+
152
+ A new Sui review uses the one current fixed account and connection, with no
153
+ public account/connection selector. An unavailable target is reported before
154
+ creating an empty review. The initial card already fixes the account and
155
+ connection before preparation. Its target remains visible through preparation
156
+ failure, read-address clearing and temporary unavailability. Disconnecting and reconnecting cannot move that review to the
157
+ replacement connection, even for the same address. Start a new Review instead.
158
+ The normal card shows its target without a selector and prepares or renews
159
+ evidence when permitted. Only Request wallet approval and approval in the wallet
160
+ authorize the transaction.
170
161
 
171
162
  Preparation execution and its stored outcome are separate. If execution has
172
163
  ended but both success and failure writes failed, the next current-state read
@@ -190,8 +181,11 @@ before admission, update the review; no signature request is sent. Once admitted
190
181
  the transaction remains fixed and the saved signing deadline applies. Reading
191
182
  or recovering an admitted attempt does not require a fresh quote or send it again.
192
183
 
193
- Wallet account/chain selection changes and connection conflicts invalidate affected unadmitted review
194
- data and pending submission permission in the same connection-change transaction.
184
+ Changes to the target Sui grant or connection lifecycle invalidate affected
185
+ unadmitted review material and pending submission permission atomically. Other
186
+ chain grants, display metadata and list order do not invalidate Sui authority.
187
+ Per-chain revisions remain monotonic even if a grant changes and later returns
188
+ to the earlier value. Unknown event scope invalidates the entire connection.
195
189
  If that write fails, wallet operations are disabled until service recovery; a late
196
190
  signature cannot continue under an unrecorded old permission.
197
191
  Before submission, an explicit user stop, an SDK connection change and a
@@ -201,7 +195,9 @@ After submission, connection updates and disconnect requests do not stop
201
195
  independent chain observation, including a lookup that has not started yet.
202
196
  Only the explicit transaction `stop_waiting` action stops that observation;
203
197
  later connection events neither resume it nor extend its deadline. An explicit
204
- result read can still inspect the same digest. No event resends the transaction.
198
+ result read through a new management card can still inspect the same digest.
199
+ An ended card cannot resume observation. A new exact-attempt result card can
200
+ perform one lookup; its final recorded result also stays fixed. No event resends the transaction.
205
201
  Callbacks already dispatched to submit or read a transaction may still record
206
202
  verified facts and settle their own pending flags while the same DB owner is
207
203
  valid. Wallet failure alone does not end an SDK promise. Server shutdown, owner
@@ -236,8 +232,8 @@ SDK sessions may be reconciled with existing connection records; abandoned
236
232
  pairings and financial requests are not replayed. An unknown outcome may later
237
233
  be resolved by reading the known transaction digest.
238
234
 
239
- Data replacement is refused while signature/submission callbacks or initial
240
- chain observation remain unsettled. Removing finished local records cannot
235
+ Data replacement is refused while admitted management operations, their SDK
236
+ cleanup, signature/submission callbacks or initial chain observation remain unsettled. Removing finished local records cannot
241
237
  cancel or reverse an on-chain transaction. Public export/import never restores
242
238
  card permissions, SDK secrets, private request authority or live pending work.
243
239
  Local data replacement does not revoke the wallet app's connection approval.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zktx.io/sui-mcp",
3
- "version": "0.6.2",
3
+ "version": "0.8.0",
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",
@@ -2,7 +2,7 @@
2
2
 
3
3
  This file is a protocol reference for AI and human readers. It is not a runtime registry, not a supported-protocol list, not a live liquidity source, not a route recommendation source, and not a signing-readiness signal.
4
4
 
5
- Current product support is declared by `read.get_server_status`, `read.list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note does not expose margin support by itself.
5
+ Current product support is declared by `read_get_server_status`, `read_list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note does not expose margin support by itself.
6
6
 
7
7
  DeepBook Margin is treated as mainnet protocol notes for Sui MCP.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  This file is a protocol reference for AI and human readers. It is not a runtime registry, not a supported-protocol list, not a live liquidity source, not a route recommendation source, and not a signing-readiness signal.
4
4
 
5
- Current product support is declared by `read.get_server_status`, `read.list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note only explains DeepBookV3 protocol concepts that those runtime surfaces may reference.
5
+ Current product support is declared by `read_get_server_status`, `read_list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note only explains DeepBookV3 protocol concepts that those runtime surfaces may reference.
6
6
 
7
7
  DeepBookV3 is the first protocol domain for Sui MCP.
8
8
 
@@ -15,7 +15,7 @@ Protocol concepts referenced by current runtime evidence include:
15
15
 
16
16
  DeepBook orderbook, raw-quantity quote, and display-amount quote reads use an internal SDK simulation sender placeholder. They use `client.core.simulateTransaction` and do not require wallet connection because these market reads are not wallet-account reads. These read queries are separate from review-time simulation of the exact transaction material.
17
17
 
18
- Signable swap review for the account-bound DeepBook swap route is part of current runtime support; `read.list_supported_protocols` and the concrete MCP tool responses are the authoritative status. The internal Review card displays account-bound evidence after the backend validates the pinned registry, refreshes the live quote, resolves objects, and simulates the exact stored material with validation checks enabled. `ready_for_wallet_review` describes that evidence, not signing authority.
18
+ Signable swap review for the account-bound DeepBook swap route is part of current runtime support; `read_list_supported_protocols` and the concrete MCP tool responses are the authoritative status. The internal Review card displays account-bound evidence after the backend validates the pinned registry, refreshes the live quote, resolves objects, and simulates the exact stored material with validation checks enabled. `ready_for_wallet_review` describes that evidence, not signing authority.
19
19
 
20
20
  Out of scope:
21
21