@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
|
@@ -33,7 +33,7 @@ User-requested bounded transaction scans can store normalized facts only when a
|
|
|
33
33
|
|
|
34
34
|
The default Sui mainnet gRPC and GraphQL endpoints are stored in the local SQLite settings table on first run.
|
|
35
35
|
|
|
36
|
-
To inspect settings or change local data, ask for the internal Settings card. Ordinary MCP creates an unsubmitted card or reads settings; scoped app-only
|
|
36
|
+
To inspect settings or change local data, ask for the internal Settings card. Ordinary MCP creates an unsubmitted card or reads settings; scoped app-only user input applies changes. Endpoint changes, data replacement and service restart require their concrete impact confirmation. No external page or Settings HTTP API exists.
|
|
37
37
|
|
|
38
38
|
Endpoint changes apply after the MCP server restarts.
|
|
39
39
|
|
|
@@ -84,8 +84,7 @@ WAL mode can create companion files next to the main database, such as `sui-mcp.
|
|
|
84
84
|
|
|
85
85
|
## Tables
|
|
86
86
|
|
|
87
|
-
- `accounts`: normalized
|
|
88
|
-
- `active_account_context`: a single-row read context. It can point to one active account or be cleared.
|
|
87
|
+
- `accounts`: normalized `(chain_id, address)` identities and first/last use timestamps for supported mainnets.
|
|
89
88
|
- `review_sessions`: review session header, current status, full action plan JSON, and materialized requested intent JSON when present.
|
|
90
89
|
- `review_state_snapshots`: append-only account-bound `ReviewState` snapshots with status and reason columns for queryability.
|
|
91
90
|
- `review_status_transitions`: append-only review lifecycle timing for funnel and review-timing analysis.
|
|
@@ -93,20 +92,21 @@ WAL mode can create companion files next to the main database, such as `sui-mcp.
|
|
|
93
92
|
- `review_executions`: verified chain success/failure, keyed by `attempt_id` and bound to review session, account, plan and digest. Wallet rejection and uncertainty never create a chain failure row.
|
|
94
93
|
- `external_activity_scans`: user-requested digest lookups, bounded account scans, or sent-function scans, including request window, endpoint host, chain identifier, continuation metadata, coverage signals, and internal scan-kind provenance.
|
|
95
94
|
- `external_activity_transactions`: normalized Sui transaction facts linked to a known local account and the first/last scan that observed them. The optional detail JSON stores typed facts such as capped Move call targets, raw balance changes, object changes, event summaries, gas raw cost fields, execution errors, and truncation flags when GraphQL returns them. Each stored detail JSON value is capped at 64 KiB.
|
|
96
|
-
- `local_settings`: allowlisted local settings. The
|
|
95
|
+
- `local_settings`: allowlisted local settings. The keys are `suiGrpcUrl`, `suiGraphqlUrl` and `walletConnectionChains`, stored as JSON. Endpoints apply after restart; requested networks apply only to new connections.
|
|
97
96
|
- `coin_metadata_cache`: account-independent positive cache for Sui coin metadata used only to format wallet balance display amounts. Rows are keyed by normalized coin type and verified mainnet chain identifier, expire after 24 hours, and are excluded from local data export/import. Read or write failures for this cache block affected wallet unit reads with `metadata_cache_unavailable`; they are not reported as unavailable token decimals.
|
|
98
97
|
|
|
99
|
-
The following live session tables hold runtime session state in the shared database so
|
|
98
|
+
The following live session tables hold runtime session state in the shared database so the shared backend can serve cards and sessions created by participating clients (see [Shared local server](#shared-local-server)):
|
|
100
99
|
|
|
101
100
|
- `live_review_sessions`: the live review session record — status, bound
|
|
102
|
-
account, preparation/
|
|
101
|
+
account, preparation/Sui grant revision, current attempt reference,
|
|
103
102
|
plan/review-state JSON, timestamps, revision and write-contract marker —
|
|
104
103
|
keyed by session id.
|
|
105
104
|
- `live_private_review_artifacts`: per-session private review evidence (the transaction-material handle, its digest commitment, and derived evidence), cascade-deleted with its review session.
|
|
106
105
|
- `live_transaction_materials`: locally built unsigned transaction bytes stored as a BLOB behind a redacted handle, with a TTL; retained for the admitted request. Terminal request cleanup removes only material still owned by that revision, preserving newer preparation. Owner replacement deletes old private material while retaining immutable review and chain-result evidence.
|
|
107
|
-
- `live_wallet_connections`:
|
|
106
|
+
- `live_wallet_connections`: connection history and at most one current row, enforced by nullable `current_slot` (NULL or 1) and UNIQUE. The row owns its admission `data_epoch`, private topic, immutable requested scope/`chainResults`, current grants, per-chain grant revisions and `read_address_cleared`. Fixed addresses use chain/address identity, not replaceable public account IDs.
|
|
107
|
+
- `wallet_connection_operations`: at most one Connect/Disconnect operation per card (unique card_id), exact input, owner/run/data epoch, deadline, immutable result and pending SDK settlement. Operation identity is distinct from connection identity.
|
|
108
108
|
- `live_read_cards`: public card state with private permission hash, scope, operation and CAS revision.
|
|
109
|
-
- `settings_operations`: one draft/upload/preparation/admission/result identity per Settings card, with owner/data epoch, user-data revision, fingerprint and SDK supersession
|
|
109
|
+
- `settings_operations`: one draft/upload/preparation/admission/result identity per ordinary Settings card; read-only status and new backup-delivery cards reference that operation rather than duplicating it, with owner/data epoch, user-data revision, fingerprint and SDK supersession facts. Wallet network saving binds the selected and previously displayed networks, applies the setting and records its result atomically. A download stores its typed snapshot lifetime and per-attempt delivery reports in private `preparation_json`, separately from the immutable result. Updating delivery never reserializes a terminal `result_json`.
|
|
110
110
|
- `settings_files`: private file identity, original operation, upload/export role, generated paths, lengths/hash, chunk reservation and seal/invalidation/cleanup state. `cleanup_operation_id` separately names the operation responsible for cleanup; replacement can transfer that responsibility without changing the file identity, public path or input eligibility.
|
|
111
111
|
- `settings_control`: current data epoch/user-data revision, one final-operation slot, one file-I/O reservation and the SDK input block owner. These are semantic state/authority facts, not release-version counters.
|
|
112
112
|
|
|
@@ -116,7 +116,7 @@ Database columns use snake_case. MCP and HTTP JSON fields use camelCase, so the
|
|
|
116
116
|
|
|
117
117
|
Table relationships:
|
|
118
118
|
|
|
119
|
-
- `
|
|
119
|
+
- `accounts` has an id primary key and unique `(chain_id,address)`. Sui financial history references Sui account rows; another chain cannot become a Sui history or signer target. There is no mutable per-chain default selector.
|
|
120
120
|
- `review_state_snapshots`, `review_status_transitions`, and `review_executions` point to `review_sessions.id` through `review_session_id` and can also point to `accounts.id` through `account_id`.
|
|
121
121
|
- `external_activity_scans.account_id` points to `accounts.id`. It records which known local account the user-requested lookup or scan was scoped to.
|
|
122
122
|
- `external_activity_transactions.account_id` points to `accounts.id`, and `first_scan_id` / `last_scan_id` point to `external_activity_scans.scan_id`. `known_sender_account_id` points to `accounts.id` only when the sender is also a known local account. Non-known party account addresses are not stored; normalized detail JSON keeps account-owner and event-sender fields only when they match the known local account.
|
|
@@ -144,24 +144,34 @@ never recreates that result from a callback after deleting it. Rollback
|
|
|
144
144
|
preserves the prior data, permissions and admission state.
|
|
145
145
|
The private `live_wallet_connections` service journal remains because replacing
|
|
146
146
|
user data does not end SDK sessions. It cannot restore old card permissions or
|
|
147
|
-
transaction authority and is not imported from a backup. Reset
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
transaction authority and is not imported from a backup. Reset/import advance the data generation and restore no active wallet context.
|
|
148
|
+
The retained connection is available for cleanup only; a new explicit connection
|
|
149
|
+
is required for new financial input. Outstanding connection SDK callbacks also block replacement.
|
|
150
150
|
|
|
151
151
|
User-data and wallet/request writers invalidate affected preparations and
|
|
152
|
-
increment their card revision in the same transaction. The trigger and `settings_back`
|
|
152
|
+
increment their active card revision in the same transaction; they never update a closed card. The trigger and `settings_back`
|
|
153
153
|
reuse one SQL transition: a complete, sealed, non-invalidated upload belonging
|
|
154
154
|
to that operation returns to sealed; other preparations return to draft. Old
|
|
155
155
|
confirmations cannot apply. Backup checking and final I/O still verify physical content;
|
|
156
156
|
a manifest alone is not proof of a valid file.
|
|
157
157
|
|
|
158
|
+
Settings operation writes atomically invalidate an upload when its input is
|
|
159
|
+
replaced, its draft changes away from import, or its use ends. The file keeps its
|
|
160
|
+
identity and cleanup owner until physical cleanup succeeds. Back that preserves
|
|
161
|
+
an eligible selected upload does not invalidate it. Filesystem cleanup runs after
|
|
162
|
+
the stored effect/result; cleanup failure cannot repeat that effect or replace
|
|
163
|
+
its immutable result.
|
|
164
|
+
|
|
158
165
|
A `download_backup` admission consumes one card input and captures one local-data
|
|
159
166
|
snapshot in the same SQLite transaction. The export role and exact generated
|
|
160
167
|
`.settings-staging/<fileId>.download` namespace identify its private file; an
|
|
161
168
|
export role or display name alone is insufficient. File bytes are not stored
|
|
162
169
|
in operation JSON or nested in exported local data. Physical write, fsync, length and SHA checks
|
|
163
|
-
finish before the snapshot becomes available
|
|
164
|
-
|
|
170
|
+
finish before the snapshot becomes available; readiness does not end its card.
|
|
171
|
+
Delivery attempts bind their owning card IDs in the existing journal. The card
|
|
172
|
+
closes with its Host report, verified local publication, expiry, failure or Cancel.
|
|
173
|
+
A new explicit delivery uses a new card, the exact same file and original TTL.
|
|
174
|
+
Late reports update the domain journal without altering an ended card.
|
|
165
175
|
|
|
166
176
|
An exact unsupported download report can atomically reserve final/file I/O and
|
|
167
177
|
admit local publication of that same snapshot. An earlier possibly handled
|
|
@@ -177,8 +187,8 @@ is committed before exclusive same-volume hard-link publication. The source and
|
|
|
177
187
|
target must name the recorded file and pass size/SHA checks before `saved` is
|
|
178
188
|
committed. Existing destinations are never overwritten or removed. Private
|
|
179
189
|
unlink follows that result and actual descriptor closure; the final file has
|
|
180
|
-
no automatic expiry.
|
|
181
|
-
|
|
190
|
+
no automatic expiry. Private cleanup validates the exact `.download` row identity and never removes
|
|
191
|
+
a user backup.
|
|
182
192
|
|
|
183
193
|
Unknown file effects remain `saving`, retaining their source and reservations.
|
|
184
194
|
A failed DB result write retains the ended physical outcome for settlement.
|
|
@@ -213,7 +223,7 @@ cleanup stays visible. Another operation's reservation is never released.
|
|
|
213
223
|
An explicit same-result read may finish its cleanup or verify an existing
|
|
214
224
|
published export, never regenerate a backup, repeat Host delivery, reapply data
|
|
215
225
|
or replace an SDK run. Files/permissions/SDK credentials/private transaction
|
|
216
|
-
material are excluded from public backups. Clearing the
|
|
226
|
+
material are excluded from public backups. Clearing the saved read address does
|
|
217
227
|
not invalidate account-independent coin metadata or disconnect the wallet.
|
|
218
228
|
|
|
219
229
|
Non-terminal review session expiry is recorded lazily when the session is read or mutated after its TTL. Review-session expiry has no background worker; private download retention uses the separate owner timer described above.
|
|
@@ -228,7 +238,11 @@ All state-writing MCP callers use this owner, including reads that save activity
|
|
|
228
238
|
|
|
229
239
|
### Read cards
|
|
230
240
|
|
|
231
|
-
`live_read_cards` owns the card kind (account, receipt, chart, connect or
|
|
241
|
+
`live_read_cards` owns the card kind (account, receipt, chart, connect, disconnect, review or settings), permission hash, backend owner, revision, original/accepted input, state/reason and saved result or scoped workflow operation reference. Domain request state remains in its existing journal. At closure, a typed public
|
|
242
|
+
result is saved atomically in live_read_cards.result_json. A database trigger
|
|
243
|
+
rejects updates to closed rows. Domain callbacks skip them; closed reads return
|
|
244
|
+
only that saved result, not current wallet or Settings projections. Connect and
|
|
245
|
+
Disconnect terminal results exclude addresses and QR data. Admission and result writes use conditional updates. Expiry is applied by the backend to unsubmitted input; a View timer only requests state. Frame recreation and chat navigation perform no close transition. The backend rejects late writes after local data replacement or owner changes, and recovery closes unfinished cards without repeating their source query.
|
|
232
246
|
|
|
233
247
|
The same record contains a model-safe result and, for receipts, separately validated UI-only input values and PTB display data. They are projections of one source read. They are not activity evidence or serialized signing material. Public saved resources exclude the private partition, and product backups exclude card records and permission hashes entirely.
|
|
234
248
|
|
|
@@ -279,49 +293,61 @@ perform a current session check. After digest, signer and mainnet verification,
|
|
|
279
293
|
the parent performs a final session check before the synchronous submission CAS
|
|
280
294
|
and dispatch. A later remote event is not presumed already known.
|
|
281
295
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
296
|
+
Connect accepts no service-restart input; Settings owns that operation. Parent
|
|
297
|
+
recovery closes old card input and settles interrupted management outcomes without
|
|
298
|
+
replaying effects. Pending SDK work is released only after actual child exit or
|
|
299
|
+
confirmed acquisition of its private store by a new child. Parent verification,
|
|
300
|
+
submission and lookup retain their independent completion guards.
|
|
301
|
+
|
|
302
|
+
Recovery evaluates the one current slot against a fresh SDK run, including rows
|
|
303
|
+
from a previous owner or data generation. Missing exact topics require the SDK
|
|
304
|
+
session check before absence is recorded. Confirmed absence plus settled I/O
|
|
305
|
+
releases occupancy; a stale connected row is not a permanent lock. A valid approved
|
|
306
|
+
current-generation session can regain usage. Terminal, unusable or older-generation
|
|
307
|
+
sessions receive cleanup ownership only, allowing exact Disconnect without granting
|
|
308
|
+
financial authority. Immutable results and read-address suppression remain intact.
|
|
309
|
+
Unknown SDK sessions are never adopted and block new pairing/financial inputs.
|
|
310
|
+
|
|
311
|
+
Fixed identity is `(chainId, normalizedAddress)`. Import/reset account-ID reuse
|
|
312
|
+
cannot retarget private connections. Public backups contain address history,
|
|
313
|
+
records and settings, excluding selectors, private grants, operations and authority.
|
|
314
|
+
Data replacement increments the generation and does not activate restored accounts.
|
|
315
|
+
The retained private session can be disconnected without rewriting its old epoch.
|
|
316
|
+
Settings Clear saved read address changes only `read_address_cleared`; reconciling
|
|
317
|
+
the same session does not reset it. Another explicit connection supplies new facts.
|
|
318
|
+
|
|
319
|
+
The store reads the current supervisor snapshot inside evaluation and atomic
|
|
320
|
+
admission. Missing inspection is not an empty service. `canDisconnect` qualifies
|
|
321
|
+
the current exact target, while `usableConnectionId` qualifies its transaction
|
|
322
|
+
usage. Reconciliation notices reveal no private topic. Pending approval publication
|
|
323
|
+
is not reported as an unexpected session. Current slot transfer, new connection,
|
|
324
|
+
operation and card admission commit or roll back together before SDK I/O.
|
|
325
|
+
|
|
326
|
+
Management admission publishes its exact operation and affected current card
|
|
327
|
+
facts atomically. Scoped grant/impact revisions reject conflicting input,
|
|
328
|
+
while an unrelated chain update does not reject a still-valid Sui target.
|
|
329
|
+
Publication failure rolls back admission before SDK I/O. A reconnection cannot
|
|
330
|
+
retarget a bound Review. Grant changes invalidate only the affected chain. Admission consumes the card's one operation. Its final result closes input;
|
|
331
|
+
no later connection state can attach another effect.
|
|
332
|
+
|
|
333
|
+
After an SDK approval arrives, its exact operation, connection, run and data
|
|
334
|
+
generation own private topic retention before success publication. Retention
|
|
335
|
+
grants cleanup ownership only. Connection approval, immutable chain results,
|
|
336
|
+
address history and the operation's success result then commit in one transaction.
|
|
337
|
+
A failed success publication rolls those public effects back without discarding
|
|
338
|
+
the retained cleanup target. A duplicate response for the same completed operation
|
|
339
|
+
and topic reads its saved result without changing addresses or read suppression.
|
|
340
|
+
An unrelated topic is neither adopted nor disconnected.
|
|
341
|
+
|
|
342
|
+
If cleanup ownership cannot yet be recorded, the workflow retains the private
|
|
343
|
+
response and cleanup-only write in its existing per-operation pending writes.
|
|
344
|
+
Its callback is not settled merely because the response arrived. Once retention
|
|
345
|
+
and cleanup are resolved, database retries never repeat remote disconnection or
|
|
346
|
+
retry failed success publication. Unconfirmed remote removal remains an exact
|
|
347
|
+
cleanup target for explicit Disconnect; it is not successful absence or financial
|
|
348
|
+
authority. Owner/run/data-generation changes fence the old callback. If no topic
|
|
349
|
+
could be retained before the parent exits, recovery cannot infer its ownership:
|
|
350
|
+
the resulting unrecorded session blocks new pairing and financial input.
|
|
325
351
|
|
|
326
352
|
Service-loss authority revocation is retained against its SDK run and data
|
|
327
353
|
generation until it commits. Current wallet-state reads retry that database
|
|
@@ -354,9 +380,9 @@ This is not availability during an unreadable database or a bypass of authority
|
|
|
354
380
|
revocation failures.
|
|
355
381
|
|
|
356
382
|
Connection facts and workflow maintenance have separate internal contracts.
|
|
357
|
-
`readConnectionFacts(at)` collects recorded
|
|
383
|
+
`readConnectionFacts(at)` collects the current recorded connection, current-run SDK presence,
|
|
358
384
|
pending work and read-address provenance from one SQLite read snapshot. The
|
|
359
|
-
shared
|
|
385
|
+
shared qualification projection computes eligibility from those
|
|
360
386
|
facts; they do not update requests, expire connections or repair callbacks.
|
|
361
387
|
Settings general facts use this diagnostic path and stored counts, so another
|
|
362
388
|
request's refused deadline write does not prevent opening or reading Settings.
|
|
@@ -409,7 +435,7 @@ running. `ReviewSession.preparationError`, stored in `live_review_sessions.prepa
|
|
|
409
435
|
is a saved review message: it can record a failed preparation or invalidation
|
|
410
436
|
caused by a wallet connection change. Its presence does not prove that a
|
|
411
437
|
computation ran. The View labels it Earlier review message and keeps it distinct
|
|
412
|
-
from current
|
|
438
|
+
from current wallet-availability guidance and a command delivery failure. These
|
|
413
439
|
fields describe different facts; none grants action or retry authority.
|
|
414
440
|
|
|
415
441
|
Signature admission independently checks the current material handle, expiry,
|
|
@@ -420,9 +446,9 @@ Revision-specific evidence validity does not remove session/account pending-work
|
|
|
420
446
|
or data-replacement protections. Mandatory activity rows commit with the state;
|
|
421
447
|
optional event-log failures do not roll back that commit or repeat an operation.
|
|
422
448
|
|
|
423
|
-
Review preparation
|
|
424
|
-
|
|
425
|
-
|
|
449
|
+
Review preparation checks the immutable bound account against the current fixed
|
|
450
|
+
connection and explicit app input before writing preparation state. Saved read
|
|
451
|
+
context suppression does not alter that target. A target mismatch is a current
|
|
426
452
|
restriction, not a stored preparation error or an activity transition.
|
|
427
453
|
|
|
428
454
|
Request interruption consumes both its internal origin and the request phase.
|
|
@@ -466,9 +492,12 @@ and public backup export also read recorded facts without advancing live
|
|
|
466
492
|
requests or treating imported history as authority. Replacement warnings do not
|
|
467
493
|
claim an earlier stored-counts snapshot is the number being deleted now.
|
|
468
494
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
495
|
+
Workflow `pendingOperation` is derived from the current connection's one running
|
|
496
|
+
or SDK-pending operation, carrying its identity, action, status and settlement
|
|
497
|
+
flag. It uses the same read transaction as the card result. This summary creates
|
|
498
|
+
no new persisted state or authority. A completed disconnect with pending
|
|
499
|
+
settlement stays completed; only a running disconnect is in progress. Connection
|
|
500
|
+
updates preserve the original operation result and card input lifetime.
|
|
472
501
|
|
|
473
502
|
### Current format and backups
|
|
474
503
|
|
|
@@ -480,13 +509,13 @@ With a new empty data directory, users configure account context and endpoints;
|
|
|
480
509
|
|
|
481
510
|
## Boundaries
|
|
482
511
|
|
|
483
|
-
The active account is
|
|
512
|
+
The active account is the current connection's saved Sui read context. It is not signing authorization, login, custody or proof of ownership. Settings can suppress this context without changing the connection's fixed address or requests. Changing the wallet address requires disconnecting and reconnecting. Accounts retained in history are not current choices.
|
|
484
513
|
|
|
485
514
|
NDJSON event logs remain optional audit/debug logs. They are not the product activity source of truth. User-facing activity summaries read from SQLite. Event log write failures do not fail product session transitions or SQLite evidence writes.
|
|
486
515
|
|
|
487
516
|
Raw session tokens are not stored in SQLite. Live session records store token hashes for validation; this private state is separate from activity evidence and product backups. The activity-store evidence input types do not accept session token material, and review evidence JSON is checked with the same forbidden-field-name policy used for MCP output. Transaction bytes, signatures, serialized signing material, token-hash/session-token-like fields, seeds, mnemonics, and private-key-like field names are rejected before write. External proposal ingestion also rejects recognized Sui private-key strings, valid English BIP39 mnemonic phrases, obvious sensitive markers, and suspicious raw secret-like payloads before storing the sanitized requested intent. Generic asset metadata such as token symbols remains allowed.
|
|
488
517
|
|
|
489
|
-
The local settings table is not a secret store. It stores only allowlisted local preferences such as the Sui mainnet gRPC and GraphQL endpoints. It must not store database paths, tokens, credentials, private keys, mnemonics, seeds, or arbitrary API keys. Environment overrides such as `
|
|
518
|
+
The local settings table is not a secret store. It stores only allowlisted local preferences such as the Sui mainnet gRPC and GraphQL endpoints. It must not store database paths, tokens, credentials, private keys, mnemonics, seeds, or arbitrary API keys. Environment overrides such as `SUI_MCP_GRPC_URL` and `SUI_MCP_GRAPHQL_URL` can temporarily supersede stored endpoints without mutating the database.
|
|
490
519
|
|
|
491
520
|
Review intent capture follows one adapter convention: if an adapter wants the original requested intent materialized for activity queries, it must place that object at `ActionPlan.adapterData.requestedIntent`. The full `plan_json` remains the canonical action plan, and `intent_json` is only the query-friendly copy of that adapter-supplied intent.
|
|
492
521
|
|
|
@@ -498,7 +527,6 @@ address withdrawals, gas reservations, and their observed balance/epoch facts.
|
|
|
498
527
|
They are deeply copied and revalidated before admission, and are excluded from
|
|
499
528
|
public backup.
|
|
500
529
|
|
|
501
|
-
|
|
502
|
-
removes private material; a new review recomputes it. Historical public reviews,
|
|
530
|
+
Owner recovery removes private material; a new review recomputes funding proof. Historical public reviews,
|
|
503
531
|
admitted request facts, chain results and backup remain readable. Reading history
|
|
504
532
|
does not re-query funding or confer new signing authority.
|