@zktx.io/sui-mcp 0.5.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 (218) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSES/@mysten-bcs-2.0.5-Apache-2.0.txt +205 -0
  3. package/LICENSES/@mysten-sui-2.17.0-Apache-2.0.txt +201 -0
  4. package/LICENSES/@mysten-utils-0.3.3-Apache-2.0.txt +205 -0
  5. package/LICENSES/fancy-canvas-2.1.0-MIT.txt +7 -0
  6. package/LICENSES/lightweight-charts-5.2.0-NOTICE.txt +2 -0
  7. package/README.md +288 -0
  8. package/dist/adapters/adapterLifecycleValidators.js +5 -0
  9. package/dist/adapters/adapterPromptSurfaces.js +60 -0
  10. package/dist/adapters/deepbook/deepbookHumanReviewProducer.js +178 -0
  11. package/dist/adapters/deepbook/deepbookQuotePolicy.js +112 -0
  12. package/dist/adapters/deepbook/deepbookReviewEvidence.js +507 -0
  13. package/dist/adapters/deepbook/deepbookReviewLifecycle.js +85 -0
  14. package/dist/adapters/deepbook/deepbookSwapIntent.js +79 -0
  15. package/dist/adapters/deepbook/deepbookTransactionMaterialProducer.js +254 -0
  16. package/dist/adapters/intentPlanFactories.js +51 -0
  17. package/dist/adapters/reviewAdapters.js +47 -0
  18. package/dist/core/action/adapterLifecycleValidation.js +12 -0
  19. package/dist/core/action/contractNameRegistry.js +151 -0
  20. package/dist/core/action/forbiddenFields.js +43 -0
  21. package/dist/core/action/humanReadableReviewEvidence.js +193 -0
  22. package/dist/core/action/humanReadableReviewProjectionVerifier.js +29 -0
  23. package/dist/core/action/ptbVisualizationProducer.js +71 -0
  24. package/dist/core/action/receiptPtbGraph.js +29 -0
  25. package/dist/core/action/reviewCheckResults.js +6 -0
  26. package/dist/core/action/reviewStateValidation.js +11 -0
  27. package/dist/core/action/reviewTimeSimulationEvidence.js +470 -0
  28. package/dist/core/action/schemas.js +491 -0
  29. package/dist/core/action/signableAdapterContract.js +998 -0
  30. package/dist/core/action/suiChainReceiptEvidence.js +106 -0
  31. package/dist/core/action/suiChainReceiptMapping.js +107 -0
  32. package/dist/core/action/suiChainReceiptReader.js +211 -0
  33. package/dist/core/action/suiChainReceiptVerifier.js +178 -0
  34. package/dist/core/action/swapHumanReadableReviewProjection.js +130 -0
  35. package/dist/core/action/swapQuotePolicyEvidence.js +271 -0
  36. package/dist/core/action/transactionFunding.js +244 -0
  37. package/dist/core/action/transactionObjectOwnershipEvidence.js +256 -0
  38. package/dist/core/action/transactionObjectOwnershipProducer.js +323 -0
  39. package/dist/core/action/types.js +33 -0
  40. package/dist/core/action/walletReviewContractAssembler.js +286 -0
  41. package/dist/core/activity/accountAssetTimeline.js +157 -0
  42. package/dist/core/activity/accountAssetTimelineUsdcReferences.js +120 -0
  43. package/dist/core/activity/activityStore.js +16 -0
  44. package/dist/core/activity/externalActivityCoverage.js +76 -0
  45. package/dist/core/activity/externalActivityTransactionStream.js +82 -0
  46. package/dist/core/activity/localDataService.js +296 -0
  47. package/dist/core/activity/localDataTypes.js +11 -0
  48. package/dist/core/activity/localDataValidation.js +439 -0
  49. package/dist/core/activity/schemaVersion.js +2 -0
  50. package/dist/core/activity/sqliteActivityStore.js +1068 -0
  51. package/dist/core/activity/sqliteActivityStoreRows.js +389 -0
  52. package/dist/core/activity/sqliteActivityStoreSchema.js +367 -0
  53. package/dist/core/activity/sqliteActivityStoreTypes.js +5 -0
  54. package/dist/core/activity/suiFunctionTarget.js +43 -0
  55. package/dist/core/activity/transactionActivityAccountEffects.js +186 -0
  56. package/dist/core/activity/transactionActivityAnalysis.js +295 -0
  57. package/dist/core/activity/transactionActivityClassifier.js +306 -0
  58. package/dist/core/activity/transactionActivityDetails.js +229 -0
  59. package/dist/core/activity/transactionActivityProtocolRules.js +218 -0
  60. package/dist/core/activity/transactionActivityScanPolicy.js +170 -0
  61. package/dist/core/activity/transactionActivityService.js +379 -0
  62. package/dist/core/activity/transactionActivityTypes.js +18 -0
  63. package/dist/core/eventlog/sink.js +35 -0
  64. package/dist/core/evidence/settlementFamilies.js +85 -0
  65. package/dist/core/evidence/userAnswerUse.js +1 -0
  66. package/dist/core/numeric/rawU64.js +63 -0
  67. package/dist/core/preferences/preferencesStore.js +26 -0
  68. package/dist/core/preferences/sqlitePreferencesRepository.js +136 -0
  69. package/dist/core/proposal/externalProposalReview.js +347 -0
  70. package/dist/core/proposal/schemas.js +208 -0
  71. package/dist/core/proposal/types.js +35 -0
  72. package/dist/core/read/amounts.js +14 -0
  73. package/dist/core/read/coinMetadata.js +60 -0
  74. package/dist/core/read/deepbookOfficialIndexerSource.js +373 -0
  75. package/dist/core/read/deepbookRawQuoteClient.js +86 -0
  76. package/dist/core/read/deepbookReadHelpers.js +321 -0
  77. package/dist/core/read/deepbookRegistry.js +157 -0
  78. package/dist/core/read/deepbookSourceOwners.js +159 -0
  79. package/dist/core/read/deepbookUsdcChartService.js +342 -0
  80. package/dist/core/read/intentEvidenceResponseFormatting.js +228 -0
  81. package/dist/core/read/readCardInputs.js +19 -0
  82. package/dist/core/read/readCardResult.js +40 -0
  83. package/dist/core/read/readResponseGuidance.js +402 -0
  84. package/dist/core/read/readService.js +1639 -0
  85. package/dist/core/read/readServiceTypes.js +88 -0
  86. package/dist/core/read/settlementParityFormatting.js +82 -0
  87. package/dist/core/read/walletReadHelpers.js +99 -0
  88. package/dist/core/review/reviewChecks.js +45 -0
  89. package/dist/core/review/reviewComputation.js +38 -0
  90. package/dist/core/review/reviewComputationResult.js +87 -0
  91. package/dist/core/session/cardSession.js +31 -0
  92. package/dist/core/session/cardSessionStore.js +204 -0
  93. package/dist/core/session/keyedRecordStore.js +18 -0
  94. package/dist/core/session/liveReviewSessionContract.js +3 -0
  95. package/dist/core/session/localSession.js +31 -0
  96. package/dist/core/session/privateReviewArtifacts.js +75 -0
  97. package/dist/core/session/reviewValidity.js +49 -0
  98. package/dist/core/session/sessionErrors.js +9 -0
  99. package/dist/core/session/sessionRecordStore.js +40 -0
  100. package/dist/core/session/sessionStore.js +655 -0
  101. package/dist/core/session/settingsSession.js +1 -0
  102. package/dist/core/session/settingsSessions.js +45 -0
  103. package/dist/core/session/sqliteCardStore.js +88 -0
  104. package/dist/core/session/sqliteSessionStore.js +213 -0
  105. package/dist/core/session/sqliteTransactionMaterialStore.js +64 -0
  106. package/dist/core/session/sqliteWalletWorkflowStore.js +821 -0
  107. package/dist/core/session/status.js +60 -0
  108. package/dist/core/session/transactionMaterialStore.js +221 -0
  109. package/dist/core/session/transactionRequest.js +72 -0
  110. package/dist/core/session/wait.js +79 -0
  111. package/dist/core/session/walletConnection.js +92 -0
  112. package/dist/core/session/walletRuntime.js +38 -0
  113. package/dist/core/session/walletWorkflow.js +608 -0
  114. package/dist/core/session/workflowState.js +80 -0
  115. package/dist/core/session/workflowView.js +150 -0
  116. package/dist/core/suiAddress.js +18 -0
  117. package/dist/core/suiEndpoint.js +72 -0
  118. package/dist/mcp/activeAccountResponse.js +24 -0
  119. package/dist/mcp/prompts.js +146 -0
  120. package/dist/mcp/registerTool.js +19 -0
  121. package/dist/mcp/resources.js +72 -0
  122. package/dist/mcp/responseGuidance.js +326 -0
  123. package/dist/mcp/result.js +17 -0
  124. package/dist/mcp/schemas.js +11 -0
  125. package/dist/mcp/server.js +32 -0
  126. package/dist/mcp/serverInfo.js +131 -0
  127. package/dist/mcp/toolErrors.js +118 -0
  128. package/dist/mcp/toolNames.js +58 -0
  129. package/dist/mcp/tools/account/index.js +44 -0
  130. package/dist/mcp/tools/action/prepareSuiActionReview.js +126 -0
  131. package/dist/mcp/tools/read/commonSchemas.js +43 -0
  132. package/dist/mcp/tools/read/deepbookReadTools.js +686 -0
  133. package/dist/mcp/tools/read/index.js +14 -0
  134. package/dist/mcp/tools/read/readToolHelpers.js +97 -0
  135. package/dist/mcp/tools/read/reviewActivityTools.js +179 -0
  136. package/dist/mcp/tools/read/serverStatusTools.js +100 -0
  137. package/dist/mcp/tools/read/transactionActivityOutput.js +371 -0
  138. package/dist/mcp/tools/read/transactionActivityTools.js +858 -0
  139. package/dist/mcp/tools/read/walletReadTools.js +734 -0
  140. package/dist/mcp/tools/session/executionResultTools.js +44 -0
  141. package/dist/mcp/tools/session/index.js +8 -0
  142. package/dist/mcp/tools/session/shared.js +36 -0
  143. package/dist/mcp/tools/session/statusTools.js +69 -0
  144. package/dist/mcp/tools/session/walletConnectionTools.js +69 -0
  145. package/dist/mcp/tools/settings/index.js +66 -0
  146. package/dist/mcp-app/account.html +3133 -0
  147. package/dist/mcp-app/account.notices.txt +973 -0
  148. package/dist/mcp-app/chart.html +3354 -0
  149. package/dist/mcp-app/chart.notices.txt +1194 -0
  150. package/dist/mcp-app/connect.html +3179 -0
  151. package/dist/mcp-app/connect.notices.txt +1012 -0
  152. package/dist/mcp-app/receipt.html +8430 -0
  153. package/dist/mcp-app/receipt.notices.txt +3549 -0
  154. package/dist/mcp-app/review.html +8430 -0
  155. package/dist/mcp-app/review.notices.txt +3549 -0
  156. package/dist/mcp-ui/contracts.js +31 -0
  157. package/dist/mcp-ui/readCards.js +28 -0
  158. package/dist/mcp-ui/tools.js +134 -0
  159. package/dist/review-app/brand-dark.svg +1 -0
  160. package/dist/review-app/brand-light.svg +1 -0
  161. package/dist/review-app/favicon.svg +1 -0
  162. package/dist/review-app/settings.css +1 -0
  163. package/dist/review-app/settings.js +1 -0
  164. package/dist/review-app/ui.css +809 -0
  165. package/dist/review-server/assets.js +48 -0
  166. package/dist/review-server/html.js +45 -0
  167. package/dist/review-server/http.js +47 -0
  168. package/dist/review-server/middleware/hostOrigin.js +48 -0
  169. package/dist/review-server/middleware/reviewToken.js +7 -0
  170. package/dist/review-server/reviewServerPolicy.js +1 -0
  171. package/dist/review-server/server.js +72 -0
  172. package/dist/review-server/settingsApi.js +158 -0
  173. package/dist/runtime/application.js +203 -0
  174. package/dist/runtime/config.js +97 -0
  175. package/dist/runtime/localSettingsService.js +198 -0
  176. package/dist/runtime/logger.js +66 -0
  177. package/dist/runtime/reviewDependencies.js +58 -0
  178. package/dist/runtime/reviewServerAcquire.js +93 -0
  179. package/dist/runtime/runtimeTermination.js +60 -0
  180. package/dist/runtime/shared/authenticatedFetch.js +127 -0
  181. package/dist/runtime/shared/control.js +93 -0
  182. package/dist/runtime/shared/dataAccess.js +66 -0
  183. package/dist/runtime/shared/mcpHttp.js +84 -0
  184. package/dist/runtime/shared/ownerLease.js +50 -0
  185. package/dist/runtime/shared/server.js +98 -0
  186. package/dist/runtime/shared/stdio.js +113 -0
  187. package/dist/runtime/smokeMainnetRead.js +391 -0
  188. package/dist/runtime/smokeMainnetReadAssertions.js +306 -0
  189. package/dist/runtime/smokeReview.js +40 -0
  190. package/dist/runtime/start.js +90 -0
  191. package/dist/runtime/suiEndpoint.js +97 -0
  192. package/dist/runtime/suiTransactionGraphqlMapping.js +200 -0
  193. package/dist/runtime/suiTransactionGraphqlQueries.js +231 -0
  194. package/dist/runtime/suiTransactionGraphqlSource.js +148 -0
  195. package/dist/runtime/walletConnectConfig.js +3 -0
  196. package/dist/runtime/walletConnectStorage.js +99 -0
  197. package/dist/runtime/walletConnectTransport.js +128 -0
  198. package/dist/runtime/walletSdkChild.js +3 -0
  199. package/dist/runtime/walletSdkChildRuntime.js +160 -0
  200. package/dist/runtime/walletSdkIpc.js +26 -0
  201. package/dist/runtime/walletSdkProcess.js +358 -0
  202. package/docs/AGENT_BEHAVIOR.md +524 -0
  203. package/docs/AGENT_DEVELOPMENT_POLICY.md +815 -0
  204. package/docs/FRONTEND_POLICY.md +534 -0
  205. package/docs/LOCAL_DB_ARCHITECTURE.md +381 -0
  206. package/docs/MCP_SETUP.md +742 -0
  207. package/docs/MCP_TOOLS.md +1318 -0
  208. package/docs/SDK_API.md +206 -0
  209. package/docs/SIGNABLE_ADAPTER_CONTRACT.md +396 -0
  210. package/docs/TRANSACTION_ACTIVITY_LOG.md +194 -0
  211. package/docs/UTILITY_INDEX.md +275 -0
  212. package/docs/WALLET_CONNECTION.md +238 -0
  213. package/docs/golden-scenarios/BEHAVIOR_MATRIX.md +166 -0
  214. package/docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md +161 -0
  215. package/docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md +259 -0
  216. package/package.json +79 -0
  217. package/protocols/deepbook-margin.md +15 -0
  218. package/protocols/deepbook-v3.md +24 -0
@@ -0,0 +1,194 @@
1
+ # Transaction Activity Log
2
+
3
+ This document owns local transaction activity storage boundaries: what is stored, what is not stored, and which MCP tools can return live or stored activity facts.
4
+
5
+ It does not define setup steps, tool schemas, complete-history support, P&L, route recommendations, transaction-building input, signing data, or signing readiness.
6
+
7
+ Sui MCP stores two kinds of local activity evidence:
8
+
9
+ - Sui MCP review evidence from local review sessions.
10
+ - User-requested bounded Sui activity facts that were looked up through GraphQL and matched a known local wallet.
11
+
12
+ It does not run a background indexer and does not claim complete wallet history.
13
+
14
+ ## Stored By Default
15
+
16
+ Each review session stores its plan, optional sanitized requested intent,
17
+ preparation snapshots with review revision, and append-only transitions. The
18
+ first authenticated Review-card state read records opened once. Frame count or
19
+ model gateway creation does not establish user observation or approval.
20
+
21
+ Each final signature selection atomically records a `review_requests` attempt,
22
+ review/account/digest binding, immutable reviewed evidence, local request status,
23
+ timestamps and the session's explicit current-attempt reference. A subsequent
24
+ valid review revision can have another attempt; it does not overwrite history.
25
+ `review_executions` contains only a verified chain result for an exact attempt.
26
+ Its success/failure is distinct from request rejection, stopping or uncertainty.
27
+ Neither a lost submit reply nor a missing receipt is stored as chain failure.
28
+
29
+ The three review activity tools use that same distinction for filters, counts,
30
+ timing and detail. Totals count sessions; request and execution distributions
31
+ use the current referenced attempt. Historical stages are distinct-session
32
+ ever counts. First backend signature verification supplies timing, not request
33
+ start or RPC submission. Missing result/time remains absent or null. Repeated
34
+ reads, duplicate admission and same-state no-ops do not create new attempts or
35
+ new funnel events. Detail exposes current request plus capped earlier requests
36
+ and explicitly reports truncation. See [MCP Tools](MCP_TOOLS.md#stored-review-activity).
37
+
38
+ Current-format public backups retain these facts and validate account, plan,
39
+ review revision, attempt, digest, time and result relationships. They exclude
40
+ private card permissions, SDK secrets, submission authority, raw bytes and
41
+ signatures. Imported history is never a live request or management capability.
42
+ This is evidence about local Sui MCP reviews, not complete wallet history.
43
+
44
+ ## Stored When Requested
45
+
46
+ When the user requests a Sui transaction digest lookup or account activity scan, the runtime can store normalized external activity facts only if the transaction is tied to an address already present in the local `accounts` table.
47
+
48
+ A returned scan row is tied to a known local account only when the sender or a returned balance-change owner matches that account.
49
+
50
+ Other provider-returned rows can be used for the current response but are counted as skipped for storage.
51
+
52
+ Stored scan rows include:
53
+
54
+ - scan id
55
+ - scan kind: `digest_lookup`, `account_scan`, or `function_scan`
56
+ - known local account
57
+ - relationship: `affected` or `sent`
58
+ - input digest or bounded scan window
59
+ - request and response cursor metadata
60
+ - endpoint host and verified chain identifier
61
+ - fetched timestamp
62
+ - stored/skipped counts
63
+ - `hasMore`, `windowComplete`, and incomplete reason such as `ordering_unverified`
64
+
65
+ Stored transaction rows include:
66
+
67
+ - known local account
68
+ - digest
69
+ - relationship
70
+ - checkpoint when returned by the provider
71
+ - timestamp when returned by the provider
72
+ - status: `success`, `failure`, or `unknown`
73
+ - known sender account id only when the sender is also a known local account
74
+ - first and last scan ids
75
+ - first and last fetched timestamps
76
+ - normalized detail facts when returned by GraphQL:
77
+ - transaction kind
78
+ - capped Move call targets with package, module, and function
79
+ - raw coin balance changes in `amountRaw` signed integer strings, with the balance owner stored only when it is the known local account
80
+ - object changes with object id, change kind, and before/after object type when available
81
+ - event sequence, package, module, and event type, with the event sender stored only when it is the known local account
82
+ - gas cost summary raw integer string fields, including derived `netGasCostRaw`
83
+ - execution error message and structured abort location when available
84
+ - truncation flags for capped detail lists
85
+
86
+ `function_scan` is internal provenance for sent-function scans.
87
+
88
+ It is not a stored function-history query, a function index, or authority to filter stored summaries by function.
89
+
90
+ Rows without `function_scan` provenance remain `account_scan`. Stored summaries do not infer function targets from `account_scan` rows.
91
+
92
+ Live scan and live-summary rows expose these fields for requested-account raw balance-change facts:
93
+
94
+ - `requestedAccountTransactionFacts`;
95
+ - `requestedAccount.coinFlows`;
96
+ - `transactions[].requestedAccountEffect`.
97
+
98
+ Use those fields for wallet-specific asset-flow answers.
99
+
100
+ `requestedAccountTransactionFacts[]` is a flattened account-scoped row surface for AI client summaries.
101
+
102
+ It repeats the row digest, status, and sender metadata.
103
+
104
+ It carries account-scoped fields such as:
105
+
106
+ - `accountBalanceChangeEvidence`;
107
+ - `accountBalanceChangeInferencePolicy`;
108
+ - `accountBalanceChanges`;
109
+ - `accountCoinFlows`;
110
+ - `accountEffectLimitations`.
111
+
112
+ It also includes transaction-level `transactionContext` for calls, events, objects, gas, truncation, and protocol labels.
113
+
114
+ Live scan and live-summary `transactionContext` intentionally omits transaction-wide balance-change aggregates. This prevents repeated ownerless raw balance-change facts from being mistaken for a requested wallet's balance movement.
115
+
116
+ A row-level `requestedAccountEffect` has `scope: "requested_account"` plus `role`, `balanceChangeEvidence`, `accountBalanceChangeInferencePolicy`, `coinFlows`, and `limitations` fields for that transaction.
117
+
118
+ `incomplete_account_balance_changes` and `account_balance_changes_unavailable` are not zero-balance evidence.
119
+
120
+ Only `no_account_balance_changes_returned` with complete details supports saying no requested-account balance change was returned in that row.
121
+
122
+ `accountBalanceChangeInferencePolicy: "do_not_infer_from_transaction_context"` means transaction-level context, visible recipient patterns, current wallet balances, compact counts, or aggregate analysis must not be used to infer the requested account's amount.
123
+
124
+ Activity `quantitySemantics` marks `amountRaw`, `increaseRaw`, `decreaseRaw`, and `netRaw` fields as raw integer facts that require verified decimals or a returned display amount before display conversion.
125
+
126
+ If `requestedAccount.balanceChangeCompleteness` or a row-level `requestedAccountEffect.balanceChangeCompleteness` is `truncated` or `unavailable`, say the account-specific balance-change evidence is incomplete instead of presenting the returned rows as complete.
127
+
128
+ Inspect responses and stored-summary rows can expose a derived `compact` view when full or stored details are available.
129
+
130
+ Activity summary responses expose `transactionDetailAvailability` for the returned `transactions` rows. `transactions[].transactionContext`, `transactions[].compact`, and `transactions[].details` are listed in `userAnswerUse.answerFields` only when every returned transaction row has details. Mixed rows must be described from `transactionDetailAvailability` and row-specific fields, not as an all-row detail guarantee.
131
+
132
+ `compact.factScope: "transaction"` and `compact.requestedAccountScoped: false` mean compact balance, object, event, and gas fields summarize the transaction, not the requested wallet.
133
+
134
+ Repeated identical compact balance-change facts can be aggregated with `count`.
135
+
136
+ `analysis.coinFlows` is a transaction/page aggregate over returned normalized facts, not wallet-specific evidence.
137
+
138
+ Gas raw values are MIST.
139
+
140
+ `compact.gasCost.display` and `analysis.gas.netGasCost.display`, when present, are SUI display facts derived with `@mysten/sui MIST_PER_SUI`.
141
+
142
+ Protocol matches are computed from normalized detail facts at response time and can include `mvrName`/`packageSource` for package-derived evidence.
143
+
144
+ They are transaction activity labels only, not stored protocol decoder output, wallet position inventory, P&L, route recommendation, transaction-building input, signing data, or signing readiness.
145
+
146
+ Live and stored summary tools can also expose deterministic `analysis` over returned normalized facts.
147
+
148
+ That analysis aggregates raw integer coin flows, gas totals, Move call targets, object/event counts, failure details, and protocol counts keyed by `protocolMatches[].protocolId`.
149
+
150
+ It is not display conversion, P&L, position inventory, route quality, protocol support, transaction-building input, signing data, or signing readiness.
151
+
152
+ Use `read.inspect_sui_transaction` when a user needs the full normalized facts for a digest.
153
+
154
+ 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
+
156
+ ## Not Stored
157
+
158
+ This toolkit does not run automatic scans for any account.
159
+
160
+ It does not store raw GraphQL payloads, transaction bytes, signatures, BCS payloads, private or session material, balance snapshots, price observations, complete gas history, abandoned-reason logs, quote logs, or protocol decoder outputs.
161
+
162
+ Complete account transaction history is not a product surface of this data.
163
+
164
+ AI clients may answer questions only from data the listed read tools return.
165
+
166
+ `read.summarize_sui_activity_scan` summarizes a live bounded scan without full details or transaction-wide balance-change aggregates in row context.
167
+
168
+ `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
+
170
+ They do not create a function-specific stored history, global function index, affected-object history, or complete dApp history.
171
+
172
+ `read.summarize_sui_account_activity` summarizes account-level stored normalized facts only.
173
+
174
+ 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
+
176
+ `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
+
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 `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
+
180
+ 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
+
182
+ Optional `usdcReferences` read DeepBookV3 official Indexer USDC candle evidence for supported USDC-quoted assets. Those references are token-denominated USDC evidence only. They are not fiat USD value, a USDC/USD peg guarantee, P&L, tax, cost basis, route advice, transaction-building input, signing data, or signing readiness.
183
+
184
+ Provider retention and rate-limit behavior are endpoint/operator properties, not guarantees made by Sui MCP.
185
+
186
+ Empty pages, bounded pages, and stored local summaries must not be treated as complete history.
187
+
188
+ 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
+
190
+ Inspect responses can include live GraphQL detail fields for the current response.
191
+
192
+ Live scan and live-summary rows point to that digest path through `detailLookup` instead of returning full `details`.
193
+
194
+ Stored summaries return sanitized normalized details only, omit non-known party account addresses, and may include `lastScanIncompleteReason` when the last scan that touched a row had incomplete or unverified coverage.
@@ -0,0 +1,275 @@
1
+ # Utility Index
2
+
3
+ Utilities are reusable state inspection or reporting surfaces for AI agents, maintainers, and local development.
4
+
5
+ This document owns manual utility and script boundaries. It distinguishes source-checkout utilities from MCP tools and packaged product commands.
6
+
7
+ Tool behavior references live in `docs/MCP_TOOLS.md`. Installation and client setup live in `docs/MCP_SETUP.md`.
8
+
9
+ Rows that name MCP tools describe existing product tools.
10
+
11
+ Rows that name `npm` commands or `scripts/` files describe manual utility surfaces only.
12
+
13
+ Source-checkout scripts are not packaged product commands, MCP tools, review-time simulation, transaction builders, signing readiness signals, or wallet authorization evidence.
14
+
15
+ ## Implemented
16
+
17
+ | Utility | Command / Tool | Status | Notes |
18
+ | --- | --- | --- | --- |
19
+ | DeepBook registry generation | `npm run generate:deepbook-registry` | Implemented | Generates ignored mainnet metadata from `@mysten/deepbook-v3@1.3.6` constants. |
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 creates or reads local settings sessions. Settings mutations happen in the local settings page after token validation and apply after MCP server restart when they affect the endpoint. |
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
+ | 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
+ | 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. |
50
+ | Sui CLI transaction diagnostics | `npm exec -- tsx scripts/sui-cli-transaction-diagnostics.ts -- --help` | Manual, source checkout only | Allowlisted local `sui` CLI debug evidence. See notes below. |
51
+
52
+ ## Release Package Check
53
+
54
+ `npm run release:check` is a source-checkout maintainer command. Node 22 or newer,
55
+ installed development dependencies, npm registry access for a temporary tarball
56
+ installation, local loopback sockets, and reachable Sui mainnet endpoints are
57
+ required. Native SQLite must work both in the checkout and the installed package.
58
+ The runtime uses its built-in endpoints unless `SUI_GRPC_URL` or `SUI_GRAPHQL_URL`
59
+ is supplied; the actual mainnet checks remain enabled.
60
+
61
+ The command checks metadata, types, tests, builds, package contents and licenses,
62
+ then launches the installed package through stdio MCP with a new data directory
63
+ and an independent port. It reads the registered tools and resources, creates a
64
+ Settings session only in that temporary database, and checks the Settings HTML,
65
+ assets and authenticated status. A scoped test card verifies
66
+ that restart input is rejected and opening manage does not pair. The check
67
+ verifies the isolated SDK retains exclusive storage ownership until shutdown. It waits
68
+ for process termination before removing its installation. A termination failure preserves the temporary files for cleanup
69
+ after the process stops. It does not pair, sign, submit, publish, or mutate the
70
+ user's data. Success verifies this automated package boundary; real Host and
71
+ wallet integration checks remain separate release requirements.
72
+
73
+ ## Public npm Availability Before MCP Registry Registration
74
+
75
+ `node scripts/wait-for-npm-publication.ts` is a read-only source-checkout
76
+ maintainer/CI command. It requires Node 22.18 or newer with native TypeScript
77
+ support and public npm access; it needs no installed dependencies or npm token.
78
+ Run it from the checkout root. It reads `name`, `version` and `mcpName` from
79
+ `package.json` and requires matching metadata from that exact public npm version
80
+ endpoint before succeeding. It does not install, publish, approve a staged
81
+ package, change dist-tags, or call a wallet or Sui endpoint.
82
+
83
+ The publication workflow runs it after the npm job succeeds and before the MCP
84
+ publisher is installed or authenticated. HTTP 404, 429, 5xx and network failures
85
+ are retried within a 20-minute CI budget. This reuses the npm job's existing
86
+ 20-minute allowance; it is not a promise that npm scanning completes in that
87
+ time. Checks are 30 seconds apart (at most 40 requests), with a 10-second request
88
+ and response-body deadline matching the Registry's npm validator. A longer
89
+ `Retry-After` is respected within the overall budget. The Registry job retains
90
+ its original 10-minute registration allowance in addition to the wait, for a
91
+ 30-minute job limit.
92
+
93
+ Other HTTP errors, invalid JSON and mismatched or missing metadata fail the
94
+ check. A timeout also fails without attempting Registry registration. Check npm
95
+ availability and retry only the Registry job; re-uploading a version that is
96
+ still being scanned can produce a staged-version conflict. The script is not a
97
+ packaged command or MCP tool. Re-running an existing GitHub Actions run uses its
98
+ original workflow revision, so changes to this gate apply to subsequent releases.
99
+
100
+ ## Mainnet Read Smoke
101
+
102
+ 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.
103
+
104
+ ```bash
105
+ export SUI_GRPC_URL="https://fullnode.mainnet.sui.io:443"
106
+ export SUI_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" # optional override; default is the built-in mainnet GraphQL endpoint
107
+ export SMOKE_SUI_ADDRESS="0x..."
108
+ export SMOKE_DEEPBOOK_POOL_KEY="DEEP_SUI"
109
+ export SMOKE_QUOTE_AMOUNT="1000000000" # raw integer units; for SUI, 1000000000 = 1 SUI
110
+ # Optional: export SMOKE_INSPECT_DIGEST="..."
111
+ # Optional: export SMOKE_INSPECT_RANDOM_LATEST="true"
112
+ npm run build
113
+ npm run smoke:mainnet
114
+ ```
115
+
116
+ `SUI_GRPC_URL` must be only scheme, host, and explicit port. Do not include credentials, a path, query string, or fragment.
117
+ `SMOKE_SUI_ADDRESS` must be a 32-byte hex Sui address, for example `0x` followed by 64 hex characters.
118
+ `SMOKE_INSPECT_DIGEST` is optional. Use a digest whose sender or returned balance-change owner is `SMOKE_SUI_ADDRESS` to exercise the stored digest-lookup path; otherwise the lookup can still return `ok` with `persistence.stored: false`.
119
+ `SMOKE_INSPECT_RANDOM_LATEST=true` is optional and only used when `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.
120
+
121
+ 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. This smoke script does not exercise account-bound DeepBook transaction-material build or digest binding; that path needs a separate funded-account material-build smoke before smoke results are treated as product-grade proof for that review stage.
122
+
123
+ Wallet and activity reads use an explicitly synthetic active-account context in a temporary SQLite database. 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.
124
+
125
+ ## Mainnet Read Smoke Notes
126
+
127
+ Run `npm run build` first because `npm run smoke:mainnet` executes `dist/runtime/smokeMainnetRead.js`.
128
+
129
+ The smoke command calls:
130
+
131
+ - wallet assets;
132
+ - DeepBook orderbook;
133
+ - raw-quantity DeepBook quote;
134
+ - `read.scan_sui_account_activity` for `SMOKE_SUI_ADDRESS` with limit 5;
135
+ - `read.summarize_sui_activity_scan` through active account context with limit 5;
136
+ - `read.inspect_sui_transaction` when `SMOKE_INSPECT_DIGEST` is set;
137
+ - sent-function activity tools when `SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`.
138
+
139
+ Empty activity pages are valid smoke outcomes. They are recorded with `rowCount: 0` and `emptyAccepted: true`.
140
+
141
+ The result file records tool names, environment-variable presence, activity status, row counts, source method, window/order flags, persistence status, function-target presence, and evidence-boundary metrics.
142
+
143
+ It does not store raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
144
+
145
+ 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 `SMOKE_SUI_ADDRESS`.
146
+
147
+ If `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.
148
+
149
+ This smoke path does not call display-amount quote, DeepBook account inventory,
150
+ account-bound DeepBook transaction-material build, or internal digest binding. A
151
+ funded-account material-build smoke is a separate operator check before this
152
+ read smoke can be used as product-grade proof for the DeepBook review material
153
+ stage.
154
+
155
+ ## Sui GraphQL Function Filter Probe Notes
156
+
157
+ The GraphQL function filter probe is read-only source-shape evidence for function-filter diagnostics.
158
+
159
+ It verifies the endpoint chain identifier, samples recent public mainnet transaction details to obtain redacted filter values, and probes `TransactionFilter.function` combinations with account, object, kind, and checkpoint axes using `last: 1`.
160
+
161
+ It writes an ignored local source-probe note with:
162
+
163
+ - endpoint host;
164
+ - chain identifier;
165
+ - repository revision;
166
+ - git worktree state;
167
+ - Node version;
168
+ - pinned `@mysten/sui` version;
169
+ - schema hash;
170
+ - probe script hash;
171
+ - filter-key matrix;
172
+ - result classifications;
173
+ - capped row counts.
174
+
175
+ The output redacts sampled digests, addresses, objects, and functions.
176
+
177
+ It does not store raw GraphQL payloads, transaction bytes, signatures, raw transaction details, wallet position inventory, route quality, P&L, transaction-building inputs, signing data, or signing readiness.
178
+
179
+ Network failures and mainnet guard failures are inconclusive evidence, not unsupported filter-combination findings.
180
+
181
+ It is not an MCP tool, not packaged product functionality, not CI, and not a function diagnostics implementation.
182
+
183
+ ## Sui CLI Transaction Diagnostics Notes
184
+
185
+ The Sui CLI diagnostics utility can inspect a digest with allowlisted read/debug commands:
186
+
187
+ - `tx-block`;
188
+ - optional object inspection;
189
+ - optional local replay traces;
190
+ - optional gas profiles.
191
+
192
+ Run `npm exec -- tsx scripts/sui-cli-transaction-diagnostics.ts -- --help` for the full flag list.
193
+
194
+ Common flags include:
195
+
196
+ - `--object <objectId>`;
197
+ - `--gas-profile`;
198
+ - `--read-timeout-ms <ms>`;
199
+ - `--replay-timeout-ms <ms>`;
200
+ - `--analyze-timeout-ms <ms>`.
201
+
202
+ `--mainnet` selects exactly one existing Sui CLI env alias whose recorded chain id matches mainnet.
203
+
204
+ `--client-env` can select an explicit existing alias.
205
+
206
+ Both modes are read-only and do not switch or mutate CLI config.
207
+
208
+ CLI env aliases must not contain redaction marker word forms for private key, mnemonic, signature, signed transaction, transaction bytes, or `suiprivkey`-style markers using `-`, `_`, a space, or no separator.
209
+
210
+ Artifact paths must not contain `suiprivkey`-style markers; other redaction markers in paths are accepted and redacted in output.
211
+
212
+ The utility records source-versioned summaries, bounded redacted CLI-derived strings, artifact paths, and limitation provenance. It does not record raw CLI payloads.
213
+
214
+ It reports a limitation when the installed CLI version differs from the source-checked parser baseline.
215
+
216
+ It is not an MCP tool, not a CI check, not packaged product functionality, not review-time simulation, not wallet authorization, not signing readiness, not onchain transaction submission/execution, not route analysis, not P&L, and not complete-history evidence.
217
+
218
+ ## Rules
219
+
220
+ - Utility output should be JSON-first.
221
+ - Read-only utilities come before write/signable actions.
222
+ - Generated registry files are local policy/metadata, not live liquidity or execution truth.
223
+ - DeepBook token lists are pinned SDK registry metadata, not live token discovery or a complete Sui token list.
224
+ - Live read outputs include `fetchedAt` as ISO 8601 UTC.
225
+ - DeepBook mid-price outputs are pool snapshots. For `SUI_USDC`, the price is USDC per SUI.
226
+ - 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.
227
+ - 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.
228
+ - `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.
229
+ - USDC in DeepBook USDC price-history output is a token-denominated quote asset, not fiat USD and not a USDC/USD peg guarantee.
230
+ - `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.
231
+ - `rawQuote.sourceMoveFunction` names the simulated public entrypoint. `rawQuote.returnValueSourceMoveFunction: "pool::get_quantity_out"` names the official Move function that defines the return-value order.
232
+ - `read.quote_deepbook_display_amount` accepts only source-side display input amounts that convert to SDK `u64` quote inputs.
233
+ - 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.
234
+ - Quote `quantitySemantics` marks payment coverage, shortfall contribution, and route-dependent payment support unavailable and points coverage questions back to intent evidence.
235
+ - 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.
236
+ - Wallet balance display amounts are presentation-only and must come from returned `display` fields. Do not infer token decimals from symbols.
237
+ - Wallet balance reads are current coin-balance snapshots only. They are not transaction history, receipt proof for a specific digest, acquisition source, object provenance, P&L, cost basis, or signing data.
238
+ - `uninspectedAssetClasses` entries are explicit classifier-uninspected boundaries.
239
+ - They are not zero-balance claims, spendable asset facts, funding sources, route liquidity, payment readiness, portfolio completeness, transaction-building inputs, signing data, or signing readiness.
240
+ - Intent evidence previews map natural-language USD-denominated targets to pinned SDK settlement asset groups and current wallet balance snapshots.
241
+ - Use `userAnswerUse.answerFields` for intent evidence answers. Settlement-asset-only coverage, shortfall, or current-total answers use `responseSummary`; selected-target answers also use the selected-target fields listed in the response. Direct pool quote evidence is supported only when the same intent-evidence response lists `direct_pool_quote_evidence` in `responseEvidence.supportedResponseClaims` and `direct_pool_quote_evidence_for_user_selected_target` in `userAnswerUse.canAnswer`. Intent evidence previews do not choose settlement assets, quote best routes, evaluate gas reserve, execute payments, or create signing material.
242
+ - DeepBook read outputs identify SDK simulation reads through `source.simulation`.
243
+ - Review activity tools analyze local Sui MCP review evidence only. The optional `account` input is a read filter and does not change active account context.
244
+ - Sui activity scan tools are user-requested bounded reads. They store only normalized facts tied to known local wallets.
245
+ - Sui activity scans do not store raw provider payloads or non-known party account addresses. They do not claim complete wallet history, complete dApp history, P&L, signing readiness, transaction building, or route recommendations.
246
+ - Stored account asset timeline output reads only local normalized facts. It is an MCP tool response, not a source-checkout utility, background scanner, held-balance history, complete wallet history, USD value, P&L, tax, cost basis, route recommendation, transaction-building input, or signing-readiness signal.
247
+ - Activity `quantitySemantics` marks balance `amountRaw` and `*Raw` fields as raw integer facts requiring verified decimals or returned display amounts before display conversion.
248
+ - Account effect rows include `accountBalanceChangeInferencePolicy` so truncated or unavailable requested-account evidence cannot be filled from transaction-level context, visible recipient patterns, or current wallet balances.
249
+ - Gas display facts, when returned, use `@mysten/sui MIST_PER_SUI`.
250
+ - Optional protocol activity labels are derived from normalized detail facts and are not a supported-protocol list or wallet position inventory.
251
+ - 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.
252
+ - `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.
253
+ - Sui GraphQL function filter probe output is source-shape evidence for function-filter diagnostics only.
254
+ - 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.
255
+ - Sui CLI transaction diagnostics can be compared with `read.inspect_sui_transaction` only at the fact category level.
256
+ - 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.
257
+ - Sui CLI transaction diagnostics are debug cross-check sources, not replacements for MCP normalized transaction facts and not review-time simulation.
258
+ - Sui CLI transaction diagnostics are source-checkout debug utilities only. They must stay allowlisted and read/debug-only.
259
+ - Local replay output is debug evidence only. The utility is not an MCP tool, review-time simulation, wallet authorization, signing readiness, or onchain transaction submission/execution.
260
+ - When a review activity output has `lowSampleWarning: true`, report raw counts and avoid inferring behavior patterns.
261
+ - For review activity list output, `dataScope.recordCount` is the full matching local review count. The returned `activities` array can be shorter when `truncated.activities: true`.
262
+ - Local settings page actions mutate local settings or logical local data only. They do not execute transactions, sign, or create custody. MCP settings tools create a settings page session or read current settings.
263
+
264
+ ### Optional account-bound review smoke
265
+
266
+ Set `SMOKE_SWAP_PROTOCOL`, `SMOKE_SWAP_FROM_SYMBOL`, `SMOKE_SWAP_TO_SYMBOL` and
267
+ `SMOKE_SWAP_AMOUNT_DISPLAY` together to opt into read-only account-bound review
268
+ computation. Protocol is explicitly `deep`; the smoke does not silently select a protocol.
269
+ A partially configured group is an error. `SMOKE_SWAP_MAX_SLIPPAGE_BPS` keeps the
270
+ existing explicit override. The script uses the same runtime review composition,
271
+ material store and evidence validation as the product, and records whether
272
+ transaction review data was emitted. This can involve mainnet simulation but
273
+ never wallet pairing, signing or submission. The temporary active-account
274
+ fixture is not proof of a wallet connection or ownership. Without the complete
275
+ optional group, the result records that review computation was not run.