@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.
- package/README.md +94 -52
- package/dist/adapters/adapterPromptSurfaces.js +1 -1
- package/dist/core/activity/localDataService.js +8 -21
- package/dist/core/activity/localDataValidation.js +22 -46
- package/dist/core/activity/sqliteAccountStore.js +46 -0
- package/dist/core/activity/sqliteActivityStore.js +65 -147
- package/dist/core/activity/sqliteActivityStoreSchema.js +42 -26
- package/dist/core/activity/transactionActivityService.js +2 -2
- package/dist/core/preferences/preferencesStore.js +2 -2
- package/dist/core/preferences/sqlitePreferencesRepository.js +10 -0
- package/dist/core/read/deepbookReadHelpers.js +1 -1
- package/dist/core/read/readResponseGuidance.js +6 -6
- package/dist/core/session/cardResult.js +41 -0
- package/dist/core/session/cardSession.js +1 -1
- package/dist/core/session/cardSessionStore.js +51 -19
- package/dist/core/session/chainAccounts.js +120 -0
- package/dist/core/session/sessionStore.js +4 -8
- package/dist/core/session/settingsFileProtocol.js +1 -1
- package/dist/core/session/settingsFileStore.js +3 -30
- package/dist/core/session/settingsOperation.js +27 -19
- package/dist/core/session/settingsWorkflow.js +161 -87
- package/dist/core/session/sqliteCardStore.js +34 -14
- package/dist/core/session/sqliteSessionStore.js +5 -5
- package/dist/core/session/sqliteSettingsWorkflowStore.js +135 -41
- package/dist/core/session/sqliteTransactionRequest.js +18 -0
- package/dist/core/session/sqliteWalletConnectionOperation.js +13 -0
- package/dist/core/session/sqliteWalletWorkflowStore.js +569 -333
- package/dist/core/session/status.js +2 -2
- package/dist/core/session/wait.js +6 -11
- package/dist/core/session/walletConnection.js +71 -46
- package/dist/core/session/walletConnectionOperations.js +24 -0
- package/dist/core/session/walletRuntime.js +7 -13
- package/dist/core/session/walletWorkflow.js +248 -99
- package/dist/core/session/workflowState.js +104 -38
- package/dist/core/session/workflowView.js +92 -101
- package/dist/mcp/activeAccountResponse.js +3 -0
- package/dist/mcp/prompts.js +10 -4
- package/dist/mcp/resources.js +1 -1
- package/dist/mcp/responseGuidance.js +7 -9
- package/dist/mcp/server.js +2 -2
- package/dist/mcp/serverInfo.js +21 -19
- package/dist/mcp/toolErrors.js +5 -3
- package/dist/mcp/toolNames.js +47 -46
- package/dist/mcp/tools/action/prepareSuiActionReview.js +13 -20
- package/dist/mcp/tools/read/deepbookReadTools.js +1 -1
- package/dist/mcp/tools/read/index.js +2 -2
- package/dist/mcp/tools/read/readToolHelpers.js +9 -7
- package/dist/mcp/tools/read/serverStatusTools.js +4 -5
- package/dist/mcp/tools/read/transactionActivityTools.js +3 -3
- package/dist/mcp/tools/session/executionResultTools.js +2 -2
- package/dist/mcp/tools/session/shared.js +2 -2
- package/dist/mcp/tools/session/statusTools.js +12 -10
- package/dist/mcp/tools/session/walletConnectionTools.js +29 -17
- package/dist/mcp/tools/settings/index.js +7 -4
- package/dist/mcp-app/account.html +7 -7
- package/dist/mcp-app/chart.html +3 -3
- package/dist/mcp-app/connect.html +13 -13
- package/dist/mcp-app/disconnect.html +3637 -0
- package/dist/mcp-app/disconnect.notices.txt +1480 -0
- package/dist/mcp-app/receipt.html +393 -393
- package/dist/mcp-app/review.html +459 -459
- package/dist/mcp-app/settings.html +7 -7
- package/dist/mcp-ui/contracts.js +3 -1
- package/dist/mcp-ui/tools.js +4 -4
- package/dist/runtime/application.js +3 -3
- package/dist/runtime/config.js +3 -6
- package/dist/runtime/localSettingsService.js +11 -8
- package/dist/runtime/shared/control.js +2 -2
- package/dist/runtime/smokeMainnetRead.js +23 -22
- package/dist/runtime/smokeReview.js +7 -7
- package/dist/runtime/start.js +1 -1
- package/dist/runtime/walletConnectTransport.js +16 -16
- package/dist/runtime/walletSdkChildRuntime.js +29 -12
- package/dist/runtime/walletSdkIpc.js +5 -4
- package/dist/runtime/walletSdkProcess.js +24 -8
- package/docs/AGENT_BEHAVIOR.md +149 -120
- package/docs/LOCAL_DB_ARCHITECTURE.md +103 -75
- package/docs/MCP_SETUP.md +365 -382
- package/docs/MCP_TOOLS.md +387 -271
- package/docs/SDK_API.md +23 -11
- package/docs/SIGNABLE_ADAPTER_CONTRACT.md +6 -6
- package/docs/TRANSACTION_ACTIVITY_LOG.md +11 -7
- package/docs/UTILITY_INDEX.md +66 -64
- package/docs/WALLET_CONNECTION.md +162 -166
- package/package.json +1 -1
- package/protocols/deepbook-margin.md +1 -1
- package/protocols/deepbook-v3.md +2 -2
package/docs/SDK_API.md
CHANGED
|
@@ -59,7 +59,7 @@ single serialized `CallToolResult` carrier validated with the pinned SDK
|
|
|
59
59
|
schema. Conflicting payloads or private metadata are rejected. Ordinary data
|
|
60
60
|
does not supply input permission, and saved resource links remain read-only.
|
|
61
61
|
|
|
62
|
-
`@modelcontextprotocol/ext-apps` is pinned to `2.0.3`, with the MCP client/core/server packages at `2.3.1` and Node transport at `2.1.1`. The server uses `registerAppTool`, `registerAppResource` and `getUiCapability`; the view uses `App` for host-mediated calls and teardown. Account, Receipt, Chart, Connect, Review and Settings are separate self-contained resources, so an account card does not load the PTB or chart renderer. Settings uses scoped app-only inputs for local actions and file transfer. The server keeps app-only permissions out of model content.
|
|
62
|
+
`@modelcontextprotocol/ext-apps` is pinned to `2.0.3`, with the MCP client/core/server packages at `2.3.1` and Node transport at `2.1.1`. The server uses `registerAppTool`, `registerAppResource` and `getUiCapability`; the view uses `App` for host-mediated calls and teardown. Account, Receipt, Chart, Connect, Disconnect, Review and Settings are separate self-contained resources, so an account card does not load the PTB or chart renderer. Settings uses scoped app-only inputs for local actions and file transfer. The server keeps app-only permissions out of model content.
|
|
63
63
|
|
|
64
64
|
Settings completes a selected upload's verification and restore preparation on
|
|
65
65
|
the backend. The card renders the stored `restoreCheck` result and collects one
|
|
@@ -71,9 +71,15 @@ needing a new check, a current confirmation and actual rejection. Definite
|
|
|
71
71
|
file/mainnet rejection is independent of local-data confirmation revision and
|
|
72
72
|
survives Back until explicit file selection changes. The View's current file-job
|
|
73
73
|
progress describes communication only; it cannot grant restoration authority.
|
|
74
|
+
An operation change that ends use of an upload records invalidation with the
|
|
75
|
+
stored effect/result. Physical cleanup follows without repeating that effect.
|
|
76
|
+
A valid file retained by Back remains eligible for another explicit check.
|
|
74
77
|
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
Download backup prepares one verified snapshot and calls `App.downloadFile`.
|
|
79
|
+
Only that function's exact method-not-found result selects local publication of
|
|
80
|
+
the same snapshot. A possibly handled earlier attempt requires explicit local-copy
|
|
81
|
+
consent. Host acknowledgment does not prove a save destination or disk storage;
|
|
82
|
+
Folder and File name identify only a verified local backup result.
|
|
77
83
|
|
|
78
84
|
The shared server uses the pinned MCP SDK Streamable HTTP transport behind authenticated loopback access. Stdio clients forward tool, resource and prompt requests with their original client identity and capabilities. The SDK limits each internal HTTP request body to 4 MiB, including its complete MCP JSON-RPC envelope and metadata. Oversized bodies are refused before tool or card dispatch. Card calls additionally have a 64 KiB envelope budget; ordinary MCP calls do not inherit that smaller limit. Restore uploads retain their 16 MiB file limit and are split into messages within the card budget. The SDK's internal HTTP batch guard does not expose a stdio batch feature. SDK HTTP errors expose the HTTP status separately from their local error code; the stdio forwarding boundary retains that numeric status in the MCP error. Handler cancellation and request identity use `context.mcpReq.signal` and `context.mcpReq.id`. The current private transport uses the SDK's default initialized connection behavior; it does not opt into automatic protocol probes or request retries.
|
|
79
85
|
|
|
@@ -142,7 +148,7 @@ Verified from `node_modules/@mysten/deepbook-v3/src/client.ts` and `node_modules
|
|
|
142
148
|
|
|
143
149
|
The `address` is used by the SDK as the transaction simulation sender for read queries. For sender-independent DeepBook orderbook, raw-quantity quote, and display-amount quote reads, Sui MCP supplies an internal mainnet placeholder address. This placeholder is not user identity and must not be represented as wallet authorization.
|
|
144
150
|
|
|
145
|
-
Account-bound DeepBook reads, such as `
|
|
151
|
+
Account-bound DeepBook reads, such as `read_summarize_deepbook_account_inventory`, use the active account address as the simulation sender. The product filters manager detail reads through on-chain `getBalanceManagerIds(owner)` discovery before calling account-bound detail methods; this is active read context, not signing authorization or custody.
|
|
146
152
|
|
|
147
153
|
Confirmed methods:
|
|
148
154
|
|
|
@@ -190,12 +196,12 @@ type BaseQuantityOut = {
|
|
|
190
196
|
};
|
|
191
197
|
```
|
|
192
198
|
|
|
193
|
-
The pinned SDK accepts `number | bigint` quote inputs. Its high-level quote query objects include an input echo field (`baseQuantity` or `quoteQuantity`) produced with `Number(inputRaw)`, plus display quote fields (`baseOut`, `quoteOut`, and `deepRequired`) produced after scalar division and `Number(...)` conversion. Sui MCP does not use those high-level query objects as the canonical quote source for adapter preparation. It uses the pinned SDK transaction builder quote functions, requests `client.core.simulateTransaction` command results, and parses raw `u64` return values. The simulated public Move entrypoint is `pool::get_quote_quantity_out` for base-to-quote reads and `pool::get_base_quantity_out` for quote-to-base reads; both delegate to `pool::get_quantity_out`, whose official Move source defines the return order as `base_quantity_out`, `quote_quantity_out`, and `deep_quantity_required`. Public `quote` fields are exact decimal display strings derived from those raw values through pinned DeepBook scalars; `rawQuote` carries the raw evidence. `
|
|
199
|
+
The pinned SDK accepts `number | bigint` quote inputs. Its high-level quote query objects include an input echo field (`baseQuantity` or `quoteQuantity`) produced with `Number(inputRaw)`, plus display quote fields (`baseOut`, `quoteOut`, and `deepRequired`) produced after scalar division and `Number(...)` conversion. Sui MCP does not use those high-level query objects as the canonical quote source for adapter preparation. It uses the pinned SDK transaction builder quote functions, requests `client.core.simulateTransaction` command results, and parses raw `u64` return values. The simulated public Move entrypoint is `pool::get_quote_quantity_out` for base-to-quote reads and `pool::get_base_quantity_out` for quote-to-base reads; both delegate to `pool::get_quantity_out`, whose official Move source defines the return order as `base_quantity_out`, `quote_quantity_out`, and `deep_quantity_required`. Public `quote` fields are exact decimal display strings derived from those raw values through pinned DeepBook scalars; `rawQuote` carries the raw evidence. `read_quote_deepbook_action` marks the input as raw `u64`, while `read_quote_deepbook_display_amount` marks the input as a source display amount converted to raw `u64`. Raw quote evidence is not an effective price, price-impact calculation, quote-vs-mid slippage calculation, venue comparison, best-route claim, fiat cash-out estimate, external market lookup, USDC/USD peg assumption, P&L, cost basis, final min-out, signing data, or signing readiness. The account-bound DeepBook review may derive a fresh raw quote policy from this evidence and use that derived policy for local unsigned transaction material build, while keeping bytes private to the backend until a scoped user selection admits a WalletConnect request for that reviewed revision. MCP and ordinary review-status outputs still do not contain transaction bytes, signing data, or signing readiness. When the digest commitment stage completes, it is derived from the locally stored transaction bytes through pinned SDK `Transaction.from(...).getDigest()` and remains an internal binding, not a public signing artifact.
|
|
194
200
|
|
|
195
201
|
## Runtime Boundary
|
|
196
202
|
|
|
197
203
|
- JSON-RPC client imports are not used.
|
|
198
|
-
- Sui gRPC and GraphQL endpoints are resolved from local SQLite settings by default. `
|
|
204
|
+
- Sui gRPC and GraphQL endpoints are resolved from local SQLite settings by default. `SUI_MCP_GRPC_URL` and `SUI_MCP_GRAPHQL_URL` are advanced temporary overrides and do not mutate stored settings.
|
|
199
205
|
- Sui gRPC URLs must include an explicit port and no credentials, path, query string, or fragment.
|
|
200
206
|
- Sui GraphQL URLs must use `https` and must not include credentials, query string, or fragment.
|
|
201
207
|
- The gRPC endpoint is verified during runtime startup. The GraphQL endpoint is verified when saved, imported, or first used by Sui activity tools.
|
|
@@ -207,7 +213,10 @@ The pinned SDK accepts `number | bigint` quote inputs. Its high-level quote quer
|
|
|
207
213
|
The SDK child initializes pinned SignClient with its public `storage` injection,
|
|
208
214
|
private session persistence, silent SDK logging and telemetry disabled. It uses
|
|
209
215
|
`connect`, `session.getAll`, `session_update/session_delete/session_expire` events,
|
|
210
|
-
and `request` on chain `sui:mainnet`, method `sui_signTransaction`.
|
|
216
|
+
and `request` on chain `sui:mainnet`, method `sui_signTransaction`. Connection
|
|
217
|
+
requests send the saved mainnet chain set as optional namespaces. The pinned SDK
|
|
218
|
+
already treats required namespaces as optional; the product directly supplies
|
|
219
|
+
the intended request shape. Ethereum/Solana requests contain no financial methods.
|
|
211
220
|
Pinned `session_event` does not update approved namespaces itself: account/chain
|
|
212
221
|
selection events explicitly invalidate stored review/submission authority even
|
|
213
222
|
when the approved account set stays unchanged. Requests carry
|
|
@@ -235,10 +244,13 @@ not own restart. A new explicit Settings operation can supersede a startup
|
|
|
235
244
|
still pending; known failure and its first timestamp remain immutable.
|
|
236
245
|
Late callbacks cannot reopen old authority or submit another transaction.
|
|
237
246
|
|
|
238
|
-
Snapshots
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
247
|
+
Snapshots separate session lifecycle revisions from per-chain grant revisions.
|
|
248
|
+
Presence/status changes affect all grants; an identified chain event affects only
|
|
249
|
+
that chain. Normalized account/method/event scope excludes list order and display
|
|
250
|
+
metadata. Within each SDK run, revisions are monotonic across change-and-revert. Source inspection failure disables the service instead of becoming an
|
|
251
|
+
empty session list. `accountsChanged` and `chainChanged` invalidate their chain
|
|
252
|
+
even if namespace values are unchanged; unknown event scope invalidates the
|
|
253
|
+
connection. The IPC proof and pre/post-signing checks carry the Sui grant revision. The final pre-submission session check
|
|
242
254
|
runs after asynchronous digest/signature/network checks. Responses from another
|
|
243
255
|
SDK run cannot satisfy that check or restore submission authority.
|
|
244
256
|
Actual target-wallet acceptance of the serialization is an integration
|
|
@@ -278,8 +278,8 @@ relabeled stream produced by `applyContractNamesToMermaid`
|
|
|
278
278
|
(`@deepbook/core`; the Sui framework `std`/`sui`/`sui_system`) and well-known
|
|
279
279
|
objects (`SuiSystemState`, `Clock`, `Random`, `DenyList`, `CoinRegistry`,
|
|
280
280
|
`AccumulatorRoot`) while keeping the raw addresses available. These names are a
|
|
281
|
-
display label, not a safety, ownership, or trust signal, and the
|
|
282
|
-
|
|
281
|
+
display label, not a safety, ownership, or trust signal, and the renderer does not perform a fresh Move Registry lookup or verify
|
|
282
|
+
current package identity from a display label.
|
|
283
283
|
|
|
284
284
|
## Adapter Registration And Stage Vocabulary
|
|
285
285
|
|
|
@@ -390,7 +390,7 @@ Different gas owners, sponsor withdrawals, unsupported reservation formats, and
|
|
|
390
390
|
unverified funding remain blocked. Supported adapters still require the same quote,
|
|
391
391
|
amount, ownership, human review, simulation, wallet approval, and digest checks.
|
|
392
392
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
BCS is compared privately and is never added to evidence, cards, backups or logs.
|
|
393
|
+
The current review producer uses `client.transactionExecutionService.simulateTransaction`.
|
|
394
|
+
A stored public record identifies the provider that produced its evidence; reading
|
|
395
|
+
that record does not select a simulation fallback or create new funding proof.
|
|
396
|
+
Returned BCS is compared privately and is never added to evidence, cards, backups or logs.
|
|
@@ -10,6 +10,10 @@ Sui MCP stores two kinds of local activity evidence:
|
|
|
10
10
|
- User-requested bounded Sui activity facts that were looked up through GraphQL and matched a known local wallet.
|
|
11
11
|
|
|
12
12
|
It does not run a background indexer and does not claim complete wallet history.
|
|
13
|
+
Activity reads accept an explicit Sui account or use the saved read address.
|
|
14
|
+
If that address is absent or cleared, the caller supplies an explicit account;
|
|
15
|
+
no wallet connection is required for that read. These filters neither restore
|
|
16
|
+
read context nor change a Review's fixed transaction target.
|
|
13
17
|
|
|
14
18
|
## Stored By Default
|
|
15
19
|
|
|
@@ -149,7 +153,7 @@ That analysis aggregates raw integer coin flows, gas totals, Move call targets,
|
|
|
149
153
|
|
|
150
154
|
It is not display conversion, P&L, position inventory, route quality, protocol support, transaction-building input, signing data, or signing readiness.
|
|
151
155
|
|
|
152
|
-
Use `
|
|
156
|
+
Use `read_inspect_sui_transaction` when a user needs the full normalized facts for a digest.
|
|
153
157
|
|
|
154
158
|
The runtime does not store non-known party account addresses inside persisted transaction rows or normalized detail facts. If a digest lookup or explicit-account scan is not related to a known local wallet, the result can be returned for the current request but is not persisted.
|
|
155
159
|
|
|
@@ -163,19 +167,19 @@ Complete account transaction history is not a product surface of this data.
|
|
|
163
167
|
|
|
164
168
|
AI clients may answer questions only from data the listed read tools return.
|
|
165
169
|
|
|
166
|
-
`
|
|
170
|
+
`read_summarize_sui_activity_scan` summarizes a live bounded scan without full details or transaction-wide balance-change aggregates in row context.
|
|
167
171
|
|
|
168
|
-
`
|
|
172
|
+
`read_scan_sui_function_activity` and `read_summarize_sui_function_activity_scan` reuse the same requested-account fact, transaction-context, analysis, and protocol label pipeline for transactions the selected account sent that called one full `package::module::function`.
|
|
169
173
|
|
|
170
174
|
They do not create a function-specific stored history, global function index, affected-object history, or complete dApp history.
|
|
171
175
|
|
|
172
|
-
`
|
|
176
|
+
`read_summarize_sui_account_activity` summarizes account-level stored normalized facts only.
|
|
173
177
|
|
|
174
178
|
It can include rows from account scans, digest lookups, or sent-function scans, and the scan kind remains provenance rather than a user query filter.
|
|
175
179
|
|
|
176
|
-
`
|
|
180
|
+
`read_get_account_asset_timeline` builds stored account asset net-flow bars from the same local normalized facts. Its requested UTC range is half-open: the start timestamp is included and the end timestamp is excluded.
|
|
177
181
|
|
|
178
|
-
It first checks stored scan coverage for the requested account and UTC range. If no stored scan can support the requested range for a known account, it returns `scan_needed` and points to `
|
|
182
|
+
It first checks stored scan coverage for the requested account and UTC range. If no stored scan can support the requested range for a known account, it returns `scan_needed` and points to `read_scan_sui_account_activity`; it does not start a scan by itself. If an explicit account is not a known local wallet in the activity store, it returns `account_not_known` and does not return `scanNeeded`.
|
|
179
183
|
|
|
180
184
|
Timeline output uses account-scoped raw balance-change facts only. `netFlowBars` are observed inflow/outflow bars, not held balances. The storage model does not store balance snapshots or balance anchors. The timeline response returns `balanceStatus: "unavailable_no_balance_anchor"` and empty `balanceBars`.
|
|
181
185
|
|
|
@@ -185,7 +189,7 @@ Provider retention and rate-limit behavior are endpoint/operator properties, not
|
|
|
185
189
|
|
|
186
190
|
Empty pages, bounded pages, and stored local summaries must not be treated as complete history.
|
|
187
191
|
|
|
188
|
-
When normalized details are missing or capped, use `transactionDetailAvailability` and the returned digest metadata with `
|
|
192
|
+
When normalized details are missing or capped, use `transactionDetailAvailability` and the returned digest metadata with `read_inspect_sui_transaction` instead of inventing missing fields.
|
|
189
193
|
|
|
190
194
|
Inspect responses can include live GraphQL detail fields for the current response.
|
|
191
195
|
|
package/docs/UTILITY_INDEX.md
CHANGED
|
@@ -17,33 +17,33 @@ Source-checkout scripts are not packaged product commands, MCP tools, review-tim
|
|
|
17
17
|
| Utility | Command / Tool | Status | Notes |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| DeepBook registry generation | `npm run generate:deepbook-registry` | Implemented | Generates ignored mainnet metadata from `@mysten/deepbook-v3@2.6.4` constants. |
|
|
20
|
-
| MCP server status | `
|
|
21
|
-
| Supported protocol list | `
|
|
22
|
-
| DeepBook pool list | `
|
|
23
|
-
| DeepBook token list | `
|
|
24
|
-
| Orderbook inspection | `
|
|
25
|
-
| DeepBook mid price | `
|
|
26
|
-
| DeepBook USDC price history | `
|
|
27
|
-
| DeepBook USDC price at time | `
|
|
28
|
-
| DeepBook USDC candle chart card | `
|
|
29
|
-
| Quote calculation | `
|
|
30
|
-
| Display amount quote | `
|
|
31
|
-
| DeepBook account inventory | `
|
|
32
|
-
| Wallet asset summary | `
|
|
33
|
-
| Wallet asset classification | `
|
|
34
|
-
| Settlement asset group list | `
|
|
35
|
-
| Intent evidence preview | `
|
|
36
|
-
| Review activity list | `
|
|
37
|
-
| Review funnel summary | `
|
|
38
|
-
| Review session detail | `
|
|
39
|
-
| Sui transaction digest lookup | `
|
|
40
|
-
| Sui account activity scan | `
|
|
41
|
-
| Live Sui activity scan summary | `
|
|
42
|
-
| Sui sent-function activity scan | `
|
|
43
|
-
| Live Sui sent-function activity summary | `
|
|
44
|
-
| Stored Sui activity summary | `
|
|
45
|
-
| Stored account asset timeline | `
|
|
46
|
-
| Local settings | `
|
|
20
|
+
| MCP server status | `read_get_server_status` | Implemented | Reports package version, evidence policy version, runtime, `implementedToolsCount`, resources, prompts, and implementation limits. |
|
|
21
|
+
| Supported protocol list | `read_list_supported_protocols` | Implemented | Reports product support levels. |
|
|
22
|
+
| DeepBook pool list | `read_list_deepbook_pools` | Implemented | Reads pinned SDK mainnet pool metadata. |
|
|
23
|
+
| DeepBook token list | `read_list_deepbook_tokens` | Implemented | Reads pinned SDK mainnet token metadata, registry pool references, and decimals derived from pinned scalar values. |
|
|
24
|
+
| Orderbook inspection | `read_inspect_deepbook_orderbook` | Implemented | Uses pinned DeepBook SDK simulation read methods over Sui gRPC with an internal sender placeholder; `ticks` is capped at 50. |
|
|
25
|
+
| DeepBook mid price | `read_get_deepbook_mid_price` | Implemented | Returns pinned SDK pool mid price snapshots. Not a global market price. |
|
|
26
|
+
| DeepBook USDC price history | `read_get_deepbook_usdc_price_history` | Implemented | Reads DeepBookV3 official Indexer USDC candle data for a requested official interval. Not a utility script, live quote, USD value, P&L, route recommendation, transaction-building input, or signing readiness. |
|
|
27
|
+
| DeepBook USDC price at time | `read_get_deepbook_usdc_price_at_time` | Implemented | Selects the DeepBookV3 official Indexer USDC candle for or nearest to one target UTC time. Not a utility script, live quote, USD value, P&L, route recommendation, transaction-building input, or signing readiness. |
|
|
28
|
+
| DeepBook USDC candle chart card | `ui_open_chart` | Implemented | Internal read-only MCP Apps card displaying official DeepBookV3 Indexer USDC-denominated candles through the shared server. Shows the selected pool, requested UTC range and candle limit with the saved result. Not a utility script, live feed, wallet connection, trading interface, fiat USD value, P&L, route recommendation, transaction-building input, or signing readiness. |
|
|
29
|
+
| Quote calculation | `read_quote_deepbook_action` | Implemented | Quotes raw integer DeepBook quantities with pinned SDK transaction builders and raw `u64` simulation return values. |
|
|
30
|
+
| Display amount quote | `read_quote_deepbook_display_amount` | Implemented | Converts explicit source display amounts through pinned DeepBook token units before quoting; returns exact decimal display quote strings plus raw quote evidence. Quote semantics mark payment coverage and shortfall contribution unavailable. |
|
|
31
|
+
| DeepBook account inventory | `read_summarize_deepbook_account_inventory` | Implemented | Reports display-like BalanceManager inventory. Not raw balance or signing readiness. |
|
|
32
|
+
| Wallet asset summary | `read_summarize_wallet_assets` | Implemented | Reads Sui coin balances for an explicit address or the active account with Sui gRPC `client.core.listBalances`; adds verified unit/display data when available; use `cursor` when `hasNextPage` is true. |
|
|
33
|
+
| Wallet asset classification | `read_classify_wallet_assets` | Implemented | Classifies returned coin balances by balanceStatus and roles. Other asset classes are explicit non-inspected boundaries. |
|
|
34
|
+
| Settlement asset group list | `read_list_settlement_asset_groups` | Implemented | Lists supported natural-language settlement asset groups derived from pinned DeepBook mainnet SDK registries. Not live liquidity, route recommendation, fiat cash-out, payment execution, or signing readiness. |
|
|
35
|
+
| Intent evidence preview | `read_preview_intent_evidence` | Implemented | Builds `responseSummary` for USD-denominated coverage, shortfall, or settlement-asset balance total. |
|
|
36
|
+
| Review activity list | `read_list_review_activity` | Implemented | Lists local Sui MCP review evidence for one account; not complete wallet transaction history. |
|
|
37
|
+
| Review funnel summary | `read_summarize_review_funnel` | Implemented | Summarizes local review lifecycle counts, current statuses, sparse-sample warnings, and review timing. |
|
|
38
|
+
| Review session detail | `read_get_review_session_detail` | Implemented | Returns a capped detail view of one stored review session with plan, state snapshots, transitions, and execution evidence. |
|
|
39
|
+
| Sui transaction digest lookup | `read_inspect_sui_transaction` | Implemented | Looks up one Sui transaction digest and stores normalized facts only when the transaction sender or a returned balance-change owner matches a known local wallet. |
|
|
40
|
+
| Sui account activity scan | `read_scan_sui_account_activity` | Implemented | Runs a bounded recent-to-older GraphQL scan with requested-account facts. Not complete history. |
|
|
41
|
+
| Live Sui activity scan summary | `read_summarize_sui_activity_scan` | Implemented | Summarizes a live bounded scan without full details. Not P&L, position inventory, or complete history. |
|
|
42
|
+
| Sui sent-function activity scan | `read_scan_sui_function_activity` | Implemented | Scans bounded sent transactions for one full `package::module::function`. Not global function history. |
|
|
43
|
+
| Live Sui sent-function activity summary | `read_summarize_sui_function_activity_scan` | Implemented | Summarizes bounded sent-function rows. Not P&L, route recommendation, or signing readiness. |
|
|
44
|
+
| Stored Sui activity summary | `read_summarize_sui_account_activity` | Implemented | Summarizes stored normalized Sui activity facts, including stored Move call, balance change, object/event, gas, execution error details, and optional protocol activity labels when evidence is available. |
|
|
45
|
+
| Stored account asset timeline | `read_get_account_asset_timeline` | Implemented | Builds stored local account asset net-flow bars and optional DeepBook USDC token-denominated candle references. Not held balances, complete wallet history, USD value, P&L, cost basis, route advice, transaction building, or signing readiness. |
|
|
46
|
+
| Local settings | `settings_create_local_settings_session`, `settings_get_local_settings` | Implemented | MCP opens an internal Settings card or reads settings. App-only preparation/confirmation owns changes, files and explicit connection-service recovery. Stored endpoints apply after all participating apps restart. |
|
|
47
47
|
| Release package check | `npm run release:check` | Maintainer, source checkout | Verifies metadata, tests/build, tarball assets/licenses and installed MCP/Settings startup. Requires network and loopback access; no wallet pairing, signing or publishing. |
|
|
48
48
|
| Mainnet read smoke | `npm run smoke:mainnet` | Manual | Runs selected mainnet read paths from built `dist/`. Build first. Not part of CI or `release:check`; see notes below. |
|
|
49
49
|
| Sui GraphQL function filter probe | `npm exec -- tsx scripts/sui-graphql-function-filter-probe.ts [--endpoint <mainnet-graphql-url>] [--sample-size <1-50>] [--timeout-ms <ms>]` | Manual, source evidence only | Runs a read-only Sui mainnet GraphQL source-shape probe for function-filter diagnostics; see notes below. |
|
|
@@ -58,15 +58,15 @@ installation, local loopback sockets, and reachable Sui mainnet endpoints are
|
|
|
58
58
|
required. Native SQLite must work both in the checkout and the installed package.
|
|
59
59
|
The source build and tests use Vite, Rolldown and Vitest's common Node ranges; the
|
|
60
60
|
installed package's Node runtime requirement is documented in MCP Setup.
|
|
61
|
-
The runtime uses its built-in endpoints unless `
|
|
61
|
+
The runtime uses its built-in endpoints unless `SUI_MCP_GRPC_URL` or `SUI_MCP_GRAPHQL_URL`
|
|
62
62
|
is supplied; the actual mainnet checks remain enabled.
|
|
63
63
|
|
|
64
64
|
The command checks metadata, types, tests, builds, package contents and licenses,
|
|
65
65
|
then launches the installed package through stdio MCP with a new data directory
|
|
66
66
|
and an independent port. It reads the registered tools and resources, creates a
|
|
67
|
-
Settings card only in that temporary database, and checks the
|
|
67
|
+
Settings card only in that temporary database, and checks the internal
|
|
68
68
|
HTML resources, app-only tools, scoped status and retired-route rejection. A scoped test card verifies
|
|
69
|
-
that Connect rejects
|
|
69
|
+
that Connect rejects unsupported restart input and a model call does not start pairing. The check
|
|
70
70
|
verifies the isolated SDK retains exclusive storage ownership until shutdown. It waits
|
|
71
71
|
for process termination before removing its installation. A termination failure preserves the temporary files for cleanup
|
|
72
72
|
after the process stops. It does not pair, sign, submit, publish, or mutate the
|
|
@@ -105,25 +105,25 @@ original workflow revision, so changes to this gate apply to subsequent releases
|
|
|
105
105
|
This is a manual maintainer check for a specific mainnet provider. Normal quickstart use does not require Sui endpoint setup. Run it for people operating releases or debugging mainnet read shape.
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
export
|
|
109
|
-
export
|
|
110
|
-
export
|
|
111
|
-
export
|
|
112
|
-
export
|
|
113
|
-
# Optional: export
|
|
114
|
-
# Optional: export
|
|
108
|
+
export SUI_MCP_GRPC_URL="https://fullnode.mainnet.sui.io:443"
|
|
109
|
+
export SUI_MCP_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" # optional override; default is the built-in mainnet GraphQL endpoint
|
|
110
|
+
export SUI_MCP_SMOKE_ADDRESS="0x..."
|
|
111
|
+
export SUI_MCP_SMOKE_DEEPBOOK_POOL_KEY="DEEP_SUI"
|
|
112
|
+
export SUI_MCP_SMOKE_QUOTE_AMOUNT="1000000000" # raw integer units; for SUI, 1000000000 = 1 SUI
|
|
113
|
+
# Optional: export SUI_MCP_SMOKE_INSPECT_DIGEST="..."
|
|
114
|
+
# Optional: export SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST="true"
|
|
115
115
|
npm run build
|
|
116
116
|
npm run smoke:mainnet
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
`
|
|
120
|
-
`
|
|
121
|
-
`
|
|
122
|
-
`
|
|
119
|
+
`SUI_MCP_GRPC_URL` must be only scheme, host, and explicit port. Do not include credentials, a path, query string, or fragment.
|
|
120
|
+
`SUI_MCP_SMOKE_ADDRESS` must be a 32-byte hex Sui address, for example `0x` followed by 64 hex characters.
|
|
121
|
+
`SUI_MCP_SMOKE_INSPECT_DIGEST` is optional. Use a digest whose sender or returned balance-change owner is `SUI_MCP_SMOKE_ADDRESS` to exercise the stored digest-lookup path; otherwise the lookup can still return `ok` with `persistence.stored: false`.
|
|
122
|
+
`SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST=true` is optional and only used when `SUI_MCP_SMOKE_INSPECT_DIGEST` is unset. It samples one digest from the latest GraphQL transaction page and calls `read_inspect_sui_transaction` without passing the smoke address. This checks current transaction-read shape without pinning a specific user address or exercising the stored relation path.
|
|
123
123
|
|
|
124
|
-
DeepBook orderbook and raw-quantity quote reads use an internal mainnet SDK simulation sender placeholder, not a user's wallet. The display-amount quote path is covered by automated tests, not by this smoke script.
|
|
124
|
+
DeepBook orderbook and raw-quantity quote reads use an internal mainnet SDK simulation sender placeholder, not a user's wallet. The display-amount quote path is covered by automated tests, not by this smoke script. Without the complete optional swap input group, the script does not run account-bound transaction-material computation or digest binding. See Optional account-bound review smoke for that explicit path; read-only success is not evidence that it ran.
|
|
125
125
|
|
|
126
|
-
Wallet and activity reads
|
|
126
|
+
Wallet and activity reads pass `SUI_MCP_SMOKE_ADDRESS` explicitly. All four live activity scan/summary calls require `accountSource: "explicit_filter"`. A temporary SQLite database stores known-account history for persistence and optional review computation, without creating a current wallet row or active read context. The script never creates a wallet connection, a review URL or an HTTP wallet result. Wallet approval is checked separately. This smoke script does not record raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
|
|
127
127
|
|
|
128
128
|
## Mainnet Read Smoke Notes
|
|
129
129
|
|
|
@@ -134,10 +134,10 @@ The smoke command calls:
|
|
|
134
134
|
- wallet assets;
|
|
135
135
|
- DeepBook orderbook;
|
|
136
136
|
- raw-quantity DeepBook quote;
|
|
137
|
-
- `
|
|
138
|
-
- `
|
|
139
|
-
- `
|
|
140
|
-
- sent-function activity tools when `
|
|
137
|
+
- `read_scan_sui_account_activity` for `SUI_MCP_SMOKE_ADDRESS` with limit 5;
|
|
138
|
+
- `read_summarize_sui_activity_scan` with the explicit `SUI_MCP_SMOKE_ADDRESS` and limit 5;
|
|
139
|
+
- `read_inspect_sui_transaction` when `SUI_MCP_SMOKE_INSPECT_DIGEST` is set;
|
|
140
|
+
- sent-function activity tools when `SUI_MCP_SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`.
|
|
141
141
|
|
|
142
142
|
Empty activity pages are valid smoke outcomes. They are recorded with `rowCount: 0` and `emptyAccepted: true`.
|
|
143
143
|
|
|
@@ -145,15 +145,16 @@ The result file records tool names, environment-variable presence, activity stat
|
|
|
145
145
|
|
|
146
146
|
It does not store raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
|
|
147
147
|
|
|
148
|
-
Activity scan and summary smoke paths fail if full transaction details or compact transaction aggregates are returned. The optional digest verifies storage only when its sender or returned balance-change owner is `
|
|
148
|
+
Activity scan and summary smoke paths fail if full transaction details or compact transaction aggregates are returned. The optional digest verifies storage only when its sender or returned balance-change owner is `SUI_MCP_SMOKE_ADDRESS`.
|
|
149
149
|
|
|
150
|
-
If `
|
|
150
|
+
If `SUI_MCP_SMOKE_INSPECT_RANDOM_LATEST=true` is set and no digest is provided, the script samples one latest GraphQL transaction digest and inspects it without an account argument.
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
The default read path does not call display-amount quote or DeepBook account
|
|
153
|
+
inventory. Account-bound review computation is separate within the same utility
|
|
154
|
+
and runs only for the complete explicit swap input group. That optional path
|
|
155
|
+
uses the known-account history already prepared in the temporary database; it does not create a live connection, card permission or signing authority. Use its recorded
|
|
156
|
+
status and evidence stages rather than treating read-path success as material
|
|
157
|
+
verification or wallet acceptance.
|
|
157
158
|
|
|
158
159
|
## Sui GraphQL Function Filter Probe Notes
|
|
159
160
|
|
|
@@ -228,11 +229,11 @@ It is not an MCP tool, not a CI check, not packaged product functionality, not r
|
|
|
228
229
|
- DeepBook mid-price outputs are pool snapshots. For `SUI_USDC`, the price is USDC per SUI.
|
|
229
230
|
- DeepBook mid prices are not fiat USD cash-out estimates, external market lookups, USDC/USD peg assumptions, effective quote prices, quote-vs-mid slippage, price-impact calculations, venue comparisons, best-route claims, P&L, cost basis, or route recommendations.
|
|
230
231
|
- DeepBook USDC price-history output reads DeepBookV3 official Indexer candle data for the requested official interval. It is MCP tool evidence, not a source-checkout utility, on-demand chain-history scan, live quote, historical mid price, global market price, USD value, user-account history, P&L, cost basis, route recommendation, transaction-building input, or signing-readiness signal.
|
|
231
|
-
- `
|
|
232
|
+
- `ui_open_chart` opens an internal read-only DeepBook USDC candle card. The server queries the official Indexer; the view does not fetch it directly. This is not a utility script, persistent price database, auto-refresh feed, live quote, trading interface, fiat USD value, user-account history, P&L, cost basis, route recommendation, transaction-building input or signing-readiness signal.
|
|
232
233
|
- USDC in DeepBook USDC price-history output is a token-denominated quote asset, not fiat USD and not a USDC/USD peg guarantee.
|
|
233
|
-
- `
|
|
234
|
+
- `read_quote_deepbook_action` amounts are raw integer quantities that fit the SDK `u64` quote input, not decimal display amounts. Quote responses include `rawQuote.kind: "deepbook_quote_raw_u64"` from simulated raw `u64` return values.
|
|
234
235
|
- `rawQuote.sourceMoveFunction` names the simulated public entrypoint. `rawQuote.returnValueSourceMoveFunction: "pool::get_quantity_out"` names the official Move function that defines the return-value order.
|
|
235
|
-
- `
|
|
236
|
+
- `read_quote_deepbook_display_amount` accepts only source-side display input amounts that convert to SDK `u64` quote inputs.
|
|
236
237
|
- Display quote public `quote` fields are exact decimal display strings derived from raw evidence. `rawQuote.directionalOutput.raw` is the direction-specific quote output before slippage policy.
|
|
237
238
|
- Quote `quantitySemantics` marks payment coverage, shortfall contribution, and route-dependent payment support unavailable and points coverage questions back to intent evidence.
|
|
238
239
|
- DeepBook account inventory quantities are display-like SDK `number` values and must not be used as raw amounts, funding sources, route liquidity, withdrawal readiness, transaction-building inputs, signing data, or signing readiness.
|
|
@@ -252,10 +253,10 @@ It is not an MCP tool, not a CI check, not packaged product functionality, not r
|
|
|
252
253
|
- Gas display facts, when returned, use `@mysten/sui MIST_PER_SUI`.
|
|
253
254
|
- Optional protocol activity labels are derived from normalized detail facts and are not a supported-protocol list or wallet position inventory.
|
|
254
255
|
- Sent-function activity tools are sender-scoped only: they report transactions the selected account sent that called one full `package::module::function`, not recipient-only activity, affected-object history, or global function history.
|
|
255
|
-
- `
|
|
256
|
+
- `read_summarize_sui_activity_scan` and `read_summarize_sui_function_activity_scan` summarize live bounded scan results. `read_summarize_sui_account_activity` summarizes stored local SQLite facts only.
|
|
256
257
|
- Sui GraphQL function filter probe output is source-shape evidence for function-filter diagnostics only.
|
|
257
258
|
- Do not treat the probe as a supported function diagnostics surface, complete dApp history, route quality evidence, wallet position inventory, transaction-building input, signing data, or signing readiness.
|
|
258
|
-
- Sui CLI transaction diagnostics can be compared with `
|
|
259
|
+
- Sui CLI transaction diagnostics can be compared with `read_inspect_sui_transaction` only at the fact category level.
|
|
259
260
|
- Comparable categories include digest/status/checkpoint/timestamp, Move call targets, object ids/types, event type strings, raw gas summary, and optional replay/trace-derived debug artifacts.
|
|
260
261
|
- Sui CLI transaction diagnostics are debug cross-check sources, not replacements for MCP normalized transaction facts and not review-time simulation.
|
|
261
262
|
- Sui CLI transaction diagnostics are source-checkout debug utilities only. They must stay allowlisted and read/debug-only.
|
|
@@ -266,13 +267,14 @@ It is not an MCP tool, not a CI check, not packaged product functionality, not r
|
|
|
266
267
|
|
|
267
268
|
### Optional account-bound review smoke
|
|
268
269
|
|
|
269
|
-
Set `
|
|
270
|
-
`
|
|
270
|
+
Set `SUI_MCP_SMOKE_SWAP_PROTOCOL`, `SUI_MCP_SMOKE_SWAP_FROM_SYMBOL`, `SUI_MCP_SMOKE_SWAP_TO_SYMBOL` and
|
|
271
|
+
`SUI_MCP_SMOKE_SWAP_AMOUNT_DISPLAY` together to opt into read-only account-bound review
|
|
271
272
|
computation. Protocol is explicitly `deep`; the smoke does not silently select a protocol.
|
|
272
|
-
A partially configured group is an error. `
|
|
273
|
+
A partially configured group is an error. `SUI_MCP_SMOKE_SWAP_MAX_SLIPPAGE_BPS` keeps the
|
|
273
274
|
existing explicit override. The script uses the same runtime review composition,
|
|
274
275
|
material store and evidence validation as the product, and records whether
|
|
275
276
|
transaction review data was emitted. This can involve mainnet simulation but
|
|
276
|
-
never wallet pairing, signing or submission. The temporary
|
|
277
|
-
|
|
277
|
+
never wallet pairing, signing or submission. The temporary database supplies
|
|
278
|
+
known-account history for that explicit address; it does not create a current
|
|
279
|
+
wallet connection, saved read context or proof of ownership. Without the complete
|
|
278
280
|
optional group, the result records that review computation was not run.
|