@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.
- package/LICENSE +21 -0
- package/LICENSES/@mysten-bcs-2.0.5-Apache-2.0.txt +205 -0
- package/LICENSES/@mysten-sui-2.17.0-Apache-2.0.txt +201 -0
- package/LICENSES/@mysten-utils-0.3.3-Apache-2.0.txt +205 -0
- package/LICENSES/fancy-canvas-2.1.0-MIT.txt +7 -0
- package/LICENSES/lightweight-charts-5.2.0-NOTICE.txt +2 -0
- package/README.md +288 -0
- package/dist/adapters/adapterLifecycleValidators.js +5 -0
- package/dist/adapters/adapterPromptSurfaces.js +60 -0
- package/dist/adapters/deepbook/deepbookHumanReviewProducer.js +178 -0
- package/dist/adapters/deepbook/deepbookQuotePolicy.js +112 -0
- package/dist/adapters/deepbook/deepbookReviewEvidence.js +507 -0
- package/dist/adapters/deepbook/deepbookReviewLifecycle.js +85 -0
- package/dist/adapters/deepbook/deepbookSwapIntent.js +79 -0
- package/dist/adapters/deepbook/deepbookTransactionMaterialProducer.js +254 -0
- package/dist/adapters/intentPlanFactories.js +51 -0
- package/dist/adapters/reviewAdapters.js +47 -0
- package/dist/core/action/adapterLifecycleValidation.js +12 -0
- package/dist/core/action/contractNameRegistry.js +151 -0
- package/dist/core/action/forbiddenFields.js +43 -0
- package/dist/core/action/humanReadableReviewEvidence.js +193 -0
- package/dist/core/action/humanReadableReviewProjectionVerifier.js +29 -0
- package/dist/core/action/ptbVisualizationProducer.js +71 -0
- package/dist/core/action/receiptPtbGraph.js +29 -0
- package/dist/core/action/reviewCheckResults.js +6 -0
- package/dist/core/action/reviewStateValidation.js +11 -0
- package/dist/core/action/reviewTimeSimulationEvidence.js +470 -0
- package/dist/core/action/schemas.js +491 -0
- package/dist/core/action/signableAdapterContract.js +998 -0
- package/dist/core/action/suiChainReceiptEvidence.js +106 -0
- package/dist/core/action/suiChainReceiptMapping.js +107 -0
- package/dist/core/action/suiChainReceiptReader.js +211 -0
- package/dist/core/action/suiChainReceiptVerifier.js +178 -0
- package/dist/core/action/swapHumanReadableReviewProjection.js +130 -0
- package/dist/core/action/swapQuotePolicyEvidence.js +271 -0
- package/dist/core/action/transactionFunding.js +244 -0
- package/dist/core/action/transactionObjectOwnershipEvidence.js +256 -0
- package/dist/core/action/transactionObjectOwnershipProducer.js +323 -0
- package/dist/core/action/types.js +33 -0
- package/dist/core/action/walletReviewContractAssembler.js +286 -0
- package/dist/core/activity/accountAssetTimeline.js +157 -0
- package/dist/core/activity/accountAssetTimelineUsdcReferences.js +120 -0
- package/dist/core/activity/activityStore.js +16 -0
- package/dist/core/activity/externalActivityCoverage.js +76 -0
- package/dist/core/activity/externalActivityTransactionStream.js +82 -0
- package/dist/core/activity/localDataService.js +296 -0
- package/dist/core/activity/localDataTypes.js +11 -0
- package/dist/core/activity/localDataValidation.js +439 -0
- package/dist/core/activity/schemaVersion.js +2 -0
- package/dist/core/activity/sqliteActivityStore.js +1068 -0
- package/dist/core/activity/sqliteActivityStoreRows.js +389 -0
- package/dist/core/activity/sqliteActivityStoreSchema.js +367 -0
- package/dist/core/activity/sqliteActivityStoreTypes.js +5 -0
- package/dist/core/activity/suiFunctionTarget.js +43 -0
- package/dist/core/activity/transactionActivityAccountEffects.js +186 -0
- package/dist/core/activity/transactionActivityAnalysis.js +295 -0
- package/dist/core/activity/transactionActivityClassifier.js +306 -0
- package/dist/core/activity/transactionActivityDetails.js +229 -0
- package/dist/core/activity/transactionActivityProtocolRules.js +218 -0
- package/dist/core/activity/transactionActivityScanPolicy.js +170 -0
- package/dist/core/activity/transactionActivityService.js +379 -0
- package/dist/core/activity/transactionActivityTypes.js +18 -0
- package/dist/core/eventlog/sink.js +35 -0
- package/dist/core/evidence/settlementFamilies.js +85 -0
- package/dist/core/evidence/userAnswerUse.js +1 -0
- package/dist/core/numeric/rawU64.js +63 -0
- package/dist/core/preferences/preferencesStore.js +26 -0
- package/dist/core/preferences/sqlitePreferencesRepository.js +136 -0
- package/dist/core/proposal/externalProposalReview.js +347 -0
- package/dist/core/proposal/schemas.js +208 -0
- package/dist/core/proposal/types.js +35 -0
- package/dist/core/read/amounts.js +14 -0
- package/dist/core/read/coinMetadata.js +60 -0
- package/dist/core/read/deepbookOfficialIndexerSource.js +373 -0
- package/dist/core/read/deepbookRawQuoteClient.js +86 -0
- package/dist/core/read/deepbookReadHelpers.js +321 -0
- package/dist/core/read/deepbookRegistry.js +157 -0
- package/dist/core/read/deepbookSourceOwners.js +159 -0
- package/dist/core/read/deepbookUsdcChartService.js +342 -0
- package/dist/core/read/intentEvidenceResponseFormatting.js +228 -0
- package/dist/core/read/readCardInputs.js +19 -0
- package/dist/core/read/readCardResult.js +40 -0
- package/dist/core/read/readResponseGuidance.js +402 -0
- package/dist/core/read/readService.js +1639 -0
- package/dist/core/read/readServiceTypes.js +88 -0
- package/dist/core/read/settlementParityFormatting.js +82 -0
- package/dist/core/read/walletReadHelpers.js +99 -0
- package/dist/core/review/reviewChecks.js +45 -0
- package/dist/core/review/reviewComputation.js +38 -0
- package/dist/core/review/reviewComputationResult.js +87 -0
- package/dist/core/session/cardSession.js +31 -0
- package/dist/core/session/cardSessionStore.js +204 -0
- package/dist/core/session/keyedRecordStore.js +18 -0
- package/dist/core/session/liveReviewSessionContract.js +3 -0
- package/dist/core/session/localSession.js +31 -0
- package/dist/core/session/privateReviewArtifacts.js +75 -0
- package/dist/core/session/reviewValidity.js +49 -0
- package/dist/core/session/sessionErrors.js +9 -0
- package/dist/core/session/sessionRecordStore.js +40 -0
- package/dist/core/session/sessionStore.js +655 -0
- package/dist/core/session/settingsSession.js +1 -0
- package/dist/core/session/settingsSessions.js +45 -0
- package/dist/core/session/sqliteCardStore.js +88 -0
- package/dist/core/session/sqliteSessionStore.js +213 -0
- package/dist/core/session/sqliteTransactionMaterialStore.js +64 -0
- package/dist/core/session/sqliteWalletWorkflowStore.js +821 -0
- package/dist/core/session/status.js +60 -0
- package/dist/core/session/transactionMaterialStore.js +221 -0
- package/dist/core/session/transactionRequest.js +72 -0
- package/dist/core/session/wait.js +79 -0
- package/dist/core/session/walletConnection.js +92 -0
- package/dist/core/session/walletRuntime.js +38 -0
- package/dist/core/session/walletWorkflow.js +608 -0
- package/dist/core/session/workflowState.js +80 -0
- package/dist/core/session/workflowView.js +150 -0
- package/dist/core/suiAddress.js +18 -0
- package/dist/core/suiEndpoint.js +72 -0
- package/dist/mcp/activeAccountResponse.js +24 -0
- package/dist/mcp/prompts.js +146 -0
- package/dist/mcp/registerTool.js +19 -0
- package/dist/mcp/resources.js +72 -0
- package/dist/mcp/responseGuidance.js +326 -0
- package/dist/mcp/result.js +17 -0
- package/dist/mcp/schemas.js +11 -0
- package/dist/mcp/server.js +32 -0
- package/dist/mcp/serverInfo.js +131 -0
- package/dist/mcp/toolErrors.js +118 -0
- package/dist/mcp/toolNames.js +58 -0
- package/dist/mcp/tools/account/index.js +44 -0
- package/dist/mcp/tools/action/prepareSuiActionReview.js +126 -0
- package/dist/mcp/tools/read/commonSchemas.js +43 -0
- package/dist/mcp/tools/read/deepbookReadTools.js +686 -0
- package/dist/mcp/tools/read/index.js +14 -0
- package/dist/mcp/tools/read/readToolHelpers.js +97 -0
- package/dist/mcp/tools/read/reviewActivityTools.js +179 -0
- package/dist/mcp/tools/read/serverStatusTools.js +100 -0
- package/dist/mcp/tools/read/transactionActivityOutput.js +371 -0
- package/dist/mcp/tools/read/transactionActivityTools.js +858 -0
- package/dist/mcp/tools/read/walletReadTools.js +734 -0
- package/dist/mcp/tools/session/executionResultTools.js +44 -0
- package/dist/mcp/tools/session/index.js +8 -0
- package/dist/mcp/tools/session/shared.js +36 -0
- package/dist/mcp/tools/session/statusTools.js +69 -0
- package/dist/mcp/tools/session/walletConnectionTools.js +69 -0
- package/dist/mcp/tools/settings/index.js +66 -0
- package/dist/mcp-app/account.html +3133 -0
- package/dist/mcp-app/account.notices.txt +973 -0
- package/dist/mcp-app/chart.html +3354 -0
- package/dist/mcp-app/chart.notices.txt +1194 -0
- package/dist/mcp-app/connect.html +3179 -0
- package/dist/mcp-app/connect.notices.txt +1012 -0
- package/dist/mcp-app/receipt.html +8430 -0
- package/dist/mcp-app/receipt.notices.txt +3549 -0
- package/dist/mcp-app/review.html +8430 -0
- package/dist/mcp-app/review.notices.txt +3549 -0
- package/dist/mcp-ui/contracts.js +31 -0
- package/dist/mcp-ui/readCards.js +28 -0
- package/dist/mcp-ui/tools.js +134 -0
- package/dist/review-app/brand-dark.svg +1 -0
- package/dist/review-app/brand-light.svg +1 -0
- package/dist/review-app/favicon.svg +1 -0
- package/dist/review-app/settings.css +1 -0
- package/dist/review-app/settings.js +1 -0
- package/dist/review-app/ui.css +809 -0
- package/dist/review-server/assets.js +48 -0
- package/dist/review-server/html.js +45 -0
- package/dist/review-server/http.js +47 -0
- package/dist/review-server/middleware/hostOrigin.js +48 -0
- package/dist/review-server/middleware/reviewToken.js +7 -0
- package/dist/review-server/reviewServerPolicy.js +1 -0
- package/dist/review-server/server.js +72 -0
- package/dist/review-server/settingsApi.js +158 -0
- package/dist/runtime/application.js +203 -0
- package/dist/runtime/config.js +97 -0
- package/dist/runtime/localSettingsService.js +198 -0
- package/dist/runtime/logger.js +66 -0
- package/dist/runtime/reviewDependencies.js +58 -0
- package/dist/runtime/reviewServerAcquire.js +93 -0
- package/dist/runtime/runtimeTermination.js +60 -0
- package/dist/runtime/shared/authenticatedFetch.js +127 -0
- package/dist/runtime/shared/control.js +93 -0
- package/dist/runtime/shared/dataAccess.js +66 -0
- package/dist/runtime/shared/mcpHttp.js +84 -0
- package/dist/runtime/shared/ownerLease.js +50 -0
- package/dist/runtime/shared/server.js +98 -0
- package/dist/runtime/shared/stdio.js +113 -0
- package/dist/runtime/smokeMainnetRead.js +391 -0
- package/dist/runtime/smokeMainnetReadAssertions.js +306 -0
- package/dist/runtime/smokeReview.js +40 -0
- package/dist/runtime/start.js +90 -0
- package/dist/runtime/suiEndpoint.js +97 -0
- package/dist/runtime/suiTransactionGraphqlMapping.js +200 -0
- package/dist/runtime/suiTransactionGraphqlQueries.js +231 -0
- package/dist/runtime/suiTransactionGraphqlSource.js +148 -0
- package/dist/runtime/walletConnectConfig.js +3 -0
- package/dist/runtime/walletConnectStorage.js +99 -0
- package/dist/runtime/walletConnectTransport.js +128 -0
- package/dist/runtime/walletSdkChild.js +3 -0
- package/dist/runtime/walletSdkChildRuntime.js +160 -0
- package/dist/runtime/walletSdkIpc.js +26 -0
- package/dist/runtime/walletSdkProcess.js +358 -0
- package/docs/AGENT_BEHAVIOR.md +524 -0
- package/docs/AGENT_DEVELOPMENT_POLICY.md +815 -0
- package/docs/FRONTEND_POLICY.md +534 -0
- package/docs/LOCAL_DB_ARCHITECTURE.md +381 -0
- package/docs/MCP_SETUP.md +742 -0
- package/docs/MCP_TOOLS.md +1318 -0
- package/docs/SDK_API.md +206 -0
- package/docs/SIGNABLE_ADAPTER_CONTRACT.md +396 -0
- package/docs/TRANSACTION_ACTIVITY_LOG.md +194 -0
- package/docs/UTILITY_INDEX.md +275 -0
- package/docs/WALLET_CONNECTION.md +238 -0
- package/docs/golden-scenarios/BEHAVIOR_MATRIX.md +166 -0
- package/docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md +161 -0
- package/docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md +259 -0
- package/package.json +79 -0
- package/protocols/deepbook-margin.md +15 -0
- package/protocols/deepbook-v3.md +24 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Wallet Connection
|
|
2
|
+
|
|
3
|
+
WalletConnect provides approved Sui mainnet account context and a transport for
|
|
4
|
+
individual wallet requests. It is not login, proof of address ownership, custody, or standing permission to transact. Frontend behavior is defined in
|
|
5
|
+
[Frontend Policy](FRONTEND_POLICY.md); tools are in [MCP Tools](MCP_TOOLS.md).
|
|
6
|
+
|
|
7
|
+
## Connection and read account
|
|
8
|
+
|
|
9
|
+
`session.create_wallet_connection` takes an intent: `connect`, `disconnect` or `manage` (the default). A connect-intent card automatically starts one pairing after the View confirms current state with its UI permission, unless a connection or operation already exists. Manage opens connection controls without starting pairing; Connect wallet starts it only after the user clicks. Disconnect opens target-specific confirmation when one connection is available; the user chooses Confirm disconnect or returns with Back. No model-facing call can disconnect or request a signature. Public saved reads never start pairing. QR data stays in UI metadata bound to the exact card, connection and revision; reopening a waiting card preserves that pairing.
|
|
10
|
+
|
|
11
|
+
Sui MCP uses one wallet connection at a time across all clients sharing a
|
|
12
|
+
data directory. That connection can approve several Sui mainnet addresses; other
|
|
13
|
+
chains are not supported. The same connection rule controls displayed actions,
|
|
14
|
+
restoration, SDK observations and atomic SQLite admission. An unexpired connected wallet, pending approval or pending disconnection
|
|
15
|
+
prevents another pairing, including requests from different cards. A competing
|
|
16
|
+
card retains its own permission and reports the existing connection; it does not
|
|
17
|
+
inherit another card's QR or waiting controls. A failed connection attempt needs
|
|
18
|
+
an explicit retry even if the other connection later ends. If multiple valid connections are saved, none is selected for account use,
|
|
19
|
+
review preparation or signing. The Connect card shows each exact target for
|
|
20
|
+
user-confirmed disconnection. After recorded disconnections leave one valid
|
|
21
|
+
connection and no pending connection operation, that connection becomes usable;
|
|
22
|
+
with none remaining, a new pairing is allowed. Terminal history alone does not
|
|
23
|
+
block it. A failed disconnect remains unconfirmed in the wallet app; its SDK
|
|
24
|
+
session cannot revive the failed product record.
|
|
25
|
+
|
|
26
|
+
The backend validates accounts, Sui mainnet namespace, methods and expiry before
|
|
27
|
+
recording a connection. A single wallet-approved account can become read context
|
|
28
|
+
from an explicit connection; multiple approved accounts require an explicit
|
|
29
|
+
selection. The active read account is stored in SQLite until changed or cleared.
|
|
30
|
+
SDK restoration and status reads never undo a user clearing that context. The stored selection is separate from its eligibility as a default for current asset reads. Implicit asset reads require a usable current wallet connection for the selected address; disconnection, expiry, pending disconnection, multiple-connection conflict or unavailable wallet state removes that default. Tools with an `account` input may still read an explicit address; connected-account-only tools require connection/account selection or recovery of wallet availability. Explicit-address public reads and saved transaction/activity reads remain available. `session.get_interaction_status.assetReadAccount` supplies that default-account decision alongside `connections` and `walletAvailability`.
|
|
31
|
+
|
|
32
|
+
| Connection state | Available behavior |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| Unsubmitted card | Automatic pairing for connect intent; manual Connect wallet for manage intent; address selection and target-specific disconnect when permitted |
|
|
35
|
+
| Multiple valid saved connections | Resolve through target-specific disconnect; no new pairing, address use, review preparation or signature |
|
|
36
|
+
| awaiting_approval | Same private QR and approval observation; Stop connecting |
|
|
37
|
+
| connected | View approved accounts and expiry; a new card may select another operation |
|
|
38
|
+
| rejected / failed / expired / stopped / disconnected | View the recorded outcome; new operations need a new card |
|
|
39
|
+
|
|
40
|
+
`session.get_interaction_status` reports the last confirmed wallet-service observation and stored connections. SDK events and command checks apply review/request invalidation through the same database owner. An ordinary status read does not wait for a fresh SDK request, change the selected account or start a wallet operation. `walletObservation` identifies the local service run, observation order and check time; it is not proof of the wallet app's current screen or online status. See the [interaction API](MCP_TOOLS.md) for the response contract.
|
|
41
|
+
|
|
42
|
+
An admitted disconnect is a pending card operation, distinct from the last
|
|
43
|
+
confirmed connection state. The same connection cannot be selected for another
|
|
44
|
+
operation while disconnection is pending. Cards and wait tools observe its
|
|
45
|
+
stored completion or failure; a connected-session update is not completion of
|
|
46
|
+
the disconnect. A restart does not replay an unfinished disconnect or restore
|
|
47
|
+
that connection as usable. The wallet app may still retain the connection.
|
|
48
|
+
|
|
49
|
+
If the SDK disconnect ends but its local completion write fails, current reads
|
|
50
|
+
settle the operation once storage recovers. An available SDK with no such session
|
|
51
|
+
confirms local disconnection; an unavailable SDK or retained session produces an
|
|
52
|
+
unconfirmed failure and wallet-app guidance. Reading never repeats disconnect.
|
|
53
|
+
Approval storage failure can also leave a connection in the wallet app. Local
|
|
54
|
+
failure or expiry does not prove remote revocation; remove retained connections
|
|
55
|
+
in the wallet app. No fixed cleanup period is promised, and an SDK session alone
|
|
56
|
+
never restores product authority.
|
|
57
|
+
|
|
58
|
+
Chat navigation and frame recreation are not transitions. Local stopping does
|
|
59
|
+
not claim that a remote wallet dialog closed. A late approval cannot revive a
|
|
60
|
+
stopped connection. An unavailable backend wallet service keeps ordinary reads
|
|
61
|
+
available and makes connection cards unavailable with an explicit explanation.
|
|
62
|
+
|
|
63
|
+
The product supplies its public WalletConnect project identifier without user
|
|
64
|
+
configuration or an override. Shared Relay service limits can affect connection
|
|
65
|
+
availability across installations. An initialization failure does not establish
|
|
66
|
+
that the user omitted a setting or that a transaction failed. A failure to
|
|
67
|
+
restore saved connections or subscribe to wallet changes disables wallet operations until the wallet service is recovered;
|
|
68
|
+
it cannot leave signing available without account/chain change observation.
|
|
69
|
+
Stored review, request and verified execution facts remain readable through
|
|
70
|
+
session tools and cards as well as ordinary evidence tools. `walletAvailability`
|
|
71
|
+
describes the backend wallet dependency; it is not connection approval or
|
|
72
|
+
transaction authorization. An unavailable dependency does not erase a saved
|
|
73
|
+
result or prove chain failure. Startup diagnostics contain safe failure stages,
|
|
74
|
+
not the project ID, SDK error bodies or wallet credentials.
|
|
75
|
+
|
|
76
|
+
The wallet SDK runs in a separate child process. The parent retains database
|
|
77
|
+
authority, transaction verification, submission and chain-result observation.
|
|
78
|
+
An unresponsive wallet service does not prevent ordinary reads or access to
|
|
79
|
+
stored results. Normal startup is shown as initialization, not as a wallet
|
|
80
|
+
rejection. No implicit asset account is offered until the current service run
|
|
81
|
+
confirms a usable connection.
|
|
82
|
+
|
|
83
|
+
There is no card or Settings control for restarting the connection service.
|
|
84
|
+
If the service stops or a disconnection remains unresponsive, fully quit all
|
|
85
|
+
apps using Sui MCP, then reopen them. Closing a non-owning app or only a
|
|
86
|
+
window does not stop the shared backend; another open client may take over.
|
|
87
|
+
Confirm the new service is available before starting a new wallet operation.
|
|
88
|
+
This does not guarantee that a relay responds or that a connection is removed
|
|
89
|
+
in your wallet app. Multiple saved connections are resolved through their
|
|
90
|
+
individual Disconnect controls, not by assuming an app restart clears them.
|
|
91
|
+
|
|
92
|
+
A new owner records interrupted connection approval as stopped and unconfirmed
|
|
93
|
+
disconnection as failed. It does not repeat either request or restore their
|
|
94
|
+
wallet authority. Already submitted transactions remain readable by their digest.
|
|
95
|
+
Historical service-recovery cards retain their recorded outcomes; they grant
|
|
96
|
+
no new restart input. See [setup troubleshooting](MCP_SETUP.md#wallet-connection-boundary).
|
|
97
|
+
|
|
98
|
+
An interrupted wallet operation reports `progress.status: "unavailable"` and a
|
|
99
|
+
bounded wait returns `waitOutcome: "unavailable"` with the recorded facts. It does
|
|
100
|
+
not pretend that the operation completed or the wait timed out. A completed
|
|
101
|
+
request returns its saved result immediately. The backend can still verify the
|
|
102
|
+
known digest of an already submitted transaction without WalletConnect. No
|
|
103
|
+
financial request is replayed when reading or recovering results.
|
|
104
|
+
|
|
105
|
+
A failed disconnect means disconnection was not confirmed. Inspect the connection
|
|
106
|
+
in your wallet app and remove it there if it remains listed. Local service
|
|
107
|
+
recovery does not verify remote removal. A card for an earlier successful
|
|
108
|
+
connection may show that the connection is now unavailable; that is not proof
|
|
109
|
+
that its original pairing failed.
|
|
110
|
+
|
|
111
|
+
Initialization is described neutrally. A pending card command shows that its
|
|
112
|
+
response has not arrived yet; a pending disconnection can show the app-restart
|
|
113
|
+
procedure without declaring a timeout or failure. These notices do not diagnose a hung service,
|
|
114
|
+
assert admission, or automatically send another command. The same-request check
|
|
115
|
+
takes priority when a signing request's delivery is uncertain. Review messages
|
|
116
|
+
preserve whether preparation was invalidated by wallet selection, a requested
|
|
117
|
+
disconnect, multiple-connection conflict, or service loss. Historical messages
|
|
118
|
+
retain their original cause.
|
|
119
|
+
|
|
120
|
+
## Transaction approval
|
|
121
|
+
|
|
122
|
+
A default address is qualified by the connection through which it was selected.
|
|
123
|
+
If that connection ends and another connection approves the same address,
|
|
124
|
+
choose Use address in the remaining connection's card before using it as the
|
|
125
|
+
default or preparing a new review. The saved address remains readable history.
|
|
126
|
+
A restored connection with the same ID retains its selection; a cleared or
|
|
127
|
+
source-less selection is never inferred from matching addresses. New explicit
|
|
128
|
+
connections that approve one address still select it automatically.
|
|
129
|
+
|
|
130
|
+
The backend publishes the current usable connection and default-address
|
|
131
|
+
eligibility. A recorded connection whose expiry has passed is not an additional
|
|
132
|
+
usable wallet, even before the next SDK observation updates its record.
|
|
133
|
+
Recorded targets remain available for appropriate disconnection; they do not
|
|
134
|
+
block the sole usable connection's address selection or review choices.
|
|
135
|
+
|
|
136
|
+
A single available wallet/account is displayed without a selection dropdown.
|
|
137
|
+
A permitted live Review card automatically prepares and renews verified conditions for that target. Multiple valid wallet connections block preparation and signing; resolve the conflict in Connect. Several approved addresses inside the single wallet require address selection there. A failed computation offers Retry review rather than repeating automatically. The explicit approval button selects the displayed transaction revision; automatic preparation never requests a signature. Backend
|
|
138
|
+
account, connection, revision and material checks remain authoritative.
|
|
139
|
+
|
|
140
|
+
An existing review keeps its original account binding. Preparing or updating it
|
|
141
|
+
requires that account to be the selected read account as well as an approved
|
|
142
|
+
account on the chosen connection. If read context changes from A to B, select A
|
|
143
|
+
again to update the same review, or request a new review for B. The card explains
|
|
144
|
+
the current selection restriction separately from saved review messages, which
|
|
145
|
+
can record a preparation failure or connection change. A refused incompatible
|
|
146
|
+
selection starts no preparation and records no failed review. Read context alone does not revoke already verified A signing
|
|
147
|
+
evidence or alter an admitted request.
|
|
148
|
+
|
|
149
|
+
Preparation execution and its stored outcome are separate. If execution has
|
|
150
|
+
ended but both success and failure writes failed, the next current-state read
|
|
151
|
+
records the failed update once storage recovers. It does not recompute evidence;
|
|
152
|
+
another update requires an explicit user action. A still-running computation is
|
|
153
|
+
not failed merely because its result is not yet available.
|
|
154
|
+
|
|
155
|
+
Review cards display account-bound verified evidence. Only a current review,
|
|
156
|
+
matching live wallet account and explicit user action may admit a signing
|
|
157
|
+
request. The backend uses `sui_signTransaction` with the stored BCS transaction
|
|
158
|
+
encoded as base64, checks the returned bytes' digest and signature against the
|
|
159
|
+
admitted account, then submits once. No browser signer, sign-and-execute fallback
|
|
160
|
+
or automatic retry is used. A wallet lacking that method cannot sign through
|
|
161
|
+
this path. Actual compatibility requires that wallet's successful normal flow;
|
|
162
|
+
namespace advertising alone does not prove it.
|
|
163
|
+
|
|
164
|
+
The backend verifies the stored material and rechecks its exact identity,
|
|
165
|
+
review revision, bytes and expiry in the admission transaction. A displayed
|
|
166
|
+
signature choice cannot extend the quote's validity. If the material expires
|
|
167
|
+
before admission, update the review; no signature request is sent. Once admitted,
|
|
168
|
+
the transaction remains fixed and the saved signing deadline applies. Reading
|
|
169
|
+
or recovering an admitted attempt does not require a fresh quote or send it again.
|
|
170
|
+
|
|
171
|
+
Wallet account/chain selection changes and connection conflicts invalidate affected unadmitted review
|
|
172
|
+
data and pending submission permission in the same connection-change transaction.
|
|
173
|
+
If that write fails, wallet operations are disabled until service recovery; a late
|
|
174
|
+
signature cannot continue under an unrecorded old permission.
|
|
175
|
+
Before submission, an explicit user stop, an SDK connection change and a
|
|
176
|
+
requested disconnect record distinct reasons. A disconnect request does not
|
|
177
|
+
claim completed disconnection. The first terminal reason is retained.
|
|
178
|
+
After submission, connection updates and disconnect requests do not stop
|
|
179
|
+
independent chain observation, including a lookup that has not started yet.
|
|
180
|
+
Only the explicit transaction `stop_waiting` action stops that observation;
|
|
181
|
+
later connection events neither resume it nor extend its deadline. An explicit
|
|
182
|
+
result read can still inspect the same digest. No event resends the transaction.
|
|
183
|
+
Callbacks already dispatched to submit or read a transaction may still record
|
|
184
|
+
verified facts and settle their own pending flags while the same DB owner is
|
|
185
|
+
valid. Wallet failure alone does not end an SDK promise. Server shutdown, owner
|
|
186
|
+
replacement and data-generation changes still reject stale continuations.
|
|
187
|
+
|
|
188
|
+
A request records one of `awaiting_signature`, `submitting`,
|
|
189
|
+
`awaiting_chain_result`, `stopped`, `request_failed`, `outcome_unknown`, or
|
|
190
|
+
`completed`. Only completed requests contain a separately verified chain
|
|
191
|
+
success/failure result. Timeout, wallet rejection and lost RPC replies do not
|
|
192
|
+
prove chain failure. Result reads observe the same digest. Management requires
|
|
193
|
+
an exact review session and attempt and cannot refresh or sign a new review.
|
|
194
|
+
|
|
195
|
+
The stored `submitting` state already identifies an admitted submission attempt.
|
|
196
|
+
It remains observable and protected during the original observation window even
|
|
197
|
+
if the post-submission write fails. Observation can finish before the submission
|
|
198
|
+
callback returns. A late callback cannot reopen a completed or unknown outcome,
|
|
199
|
+
extend that window, or submit again. Actual pending callbacks continue to protect
|
|
200
|
+
data replacement even after a result is recorded.
|
|
201
|
+
|
|
202
|
+
## Ownership and persistence
|
|
203
|
+
|
|
204
|
+
One backend owns a data directory and its WalletConnect SDK. Authenticated local
|
|
205
|
+
clients share that owner. A second owner is refused even on another port.
|
|
206
|
+
Private SDK connection/session keys reside in an OS-user-only store separate
|
|
207
|
+
from public activity backup. Request history, pending messages and unknown
|
|
208
|
+
resend namespaces are volatile. The SDK storage stays alive until the owner
|
|
209
|
+
process exits; no unsupported complete in-process SDK disposal is assumed.
|
|
210
|
+
|
|
211
|
+
A new owner preserves completed facts, expires old unsubmitted input, and marks
|
|
212
|
+
interrupted requests outcome_unknown without replaying them. Known approved
|
|
213
|
+
SDK sessions may be reconciled with existing connection records; abandoned
|
|
214
|
+
pairings and financial requests are not replayed. An unknown outcome may later
|
|
215
|
+
be resolved by reading the known transaction digest.
|
|
216
|
+
|
|
217
|
+
Data replacement is refused while signature/submission callbacks or initial
|
|
218
|
+
chain observation remain unsettled. Removing finished local records cannot
|
|
219
|
+
cancel or reverse an on-chain transaction. Public export/import never restores
|
|
220
|
+
card permissions, SDK secrets, private request authority or live pending work.
|
|
221
|
+
Local data replacement does not revoke the wallet app's connection approval.
|
|
222
|
+
If a connection is no longer present in the product database, remove it in the
|
|
223
|
+
wallet app; see [local data setup](MCP_SETUP.md#local-data-format).
|
|
224
|
+
|
|
225
|
+
## Balance forms in a swap review
|
|
226
|
+
|
|
227
|
+
A wallet can hold tokens as coin objects, address balances, or both. The backend
|
|
228
|
+
uses the supported adapter's SDK to construct the transaction and verifies the
|
|
229
|
+
funding form present in the stored material. Review details identify whether gas
|
|
230
|
+
uses SUI coin objects, address balance, or an address-balance reservation with
|
|
231
|
+
coin objects. A reservation is a limit, not a completed debit.
|
|
232
|
+
|
|
233
|
+
The selected account must fund both the swap and its gas. A positive total wallet
|
|
234
|
+
balance does not by itself prove that a particular withdrawal is covered. Source
|
|
235
|
+
read failures and unsupported funding are not reported as confirmed insufficient
|
|
236
|
+
funds. Balances can change after review; simulation and successful connection do
|
|
237
|
+
not guarantee that the wallet will accept or the chain will execute a transaction.
|
|
238
|
+
Every signature still requires the user's explicit card action and wallet approval.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Behavior Golden Scenarios
|
|
2
|
+
|
|
3
|
+
These scenarios document expected response classes for manual release review. They are not Claude, Codex, or Cursor execution results.
|
|
4
|
+
|
|
5
|
+
For current-release intent evidence checks that compare user prompts, preferred tool paths, standard answer clauses, and manual client observations, see `docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md`.
|
|
6
|
+
|
|
7
|
+
For the deterministic MCP replay contract behind Korean USD-denominated coverage, total, and shortfall questions, see `docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md`.
|
|
8
|
+
|
|
9
|
+
Manual client runs should call `read.get_server_status` first and record the package version, `evidencePolicy.version`, and `implementedToolsCount` before running the question rows.
|
|
10
|
+
|
|
11
|
+
## Current Release Intent Evidence Corpus
|
|
12
|
+
|
|
13
|
+
These scenarios translate the internal intent corpus into English release-review prompts.
|
|
14
|
+
|
|
15
|
+
Current-release intent evidence answers can answer evidence questions without creating route recommendations, payment support, portfolio plans, P&L, transaction material, or signing readiness. Account-bound DeepBook review has a separate local transaction-material build path that is not part of these intent evidence answer rows.
|
|
16
|
+
|
|
17
|
+
For current asset reads, use the connection-qualified default from `assetReadAccount`, or an explicit Sui address supplied by the user. A stored active address alone is insufficient.
|
|
18
|
+
|
|
19
|
+
`What is 10 SUI worth?`
|
|
20
|
+
Class: `answer_only`.
|
|
21
|
+
Use `read.get_deepbook_mid_price` with a disclosed DeepBook SUI quote pool such as `SUI_USDC`.
|
|
22
|
+
Use `read.list_deepbook_pools` only when the pool is ambiguous.
|
|
23
|
+
Expose DeepBook pool, mid price, quote asset, and `fetchedAt`.
|
|
24
|
+
Do not present this as a global market price, route recommendation, settlement choice, or signing readiness.
|
|
25
|
+
|
|
26
|
+
`If I sell 10 SUI, how many dollars do I get?`
|
|
27
|
+
Class: `clarify_or_intent_evidence`.
|
|
28
|
+
Do not quote until the user selects a registered DeepBook quote asset or pool, or asks for wallet-scoped USD-denominated intent evidence.
|
|
29
|
+
If the user chooses a pool such as SUI/USDC, call `read.quote_deepbook_display_amount`.
|
|
30
|
+
Expose source input, missing quote-token or pool choice, fiat cash-out boundary, and available intent-evidence path when account context exists.
|
|
31
|
+
Do not silently choose USDC or USDT, infer inverse output-target quotes, use web/finance lookup for USDC/USD, assume the USDC/USD peg, or present fiat cash-out, final min-out, route quality, funding readiness, or signing readiness.
|
|
32
|
+
|
|
33
|
+
`What can I sell?`
|
|
34
|
+
Class: `wallet_asset_read`.
|
|
35
|
+
Use active account context or explicit address, then call `read.classify_wallet_assets`.
|
|
36
|
+
Expose returned zero/nonzero coin-balance classes, gas asset context, DeepBook token registry matches, and `uninspectedAssetClasses`.
|
|
37
|
+
Do not treat staked, locked, DeepBook manager, LP, vault, NFT, object, unsupported, or unknown classes as zero balances or sellable candidates.
|
|
38
|
+
|
|
39
|
+
`Sell DEEP for USDC.`
|
|
40
|
+
Class: `clarify_or_quote_context`.
|
|
41
|
+
Ask for a source amount before quoting.
|
|
42
|
+
After source amount and pool are explicit, call `read.quote_deepbook_display_amount`.
|
|
43
|
+
Use `read.classify_wallet_assets` only for scoped wallet context.
|
|
44
|
+
Do not assume amount, choose a route, run inverse quotes, create a review session, or treat DeepBook manager inventory as spendable.
|
|
45
|
+
|
|
46
|
+
`Make $1000.`
|
|
47
|
+
Class: `intent_evidence_with_choices`.
|
|
48
|
+
Use `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` when active account or explicit address context is available.
|
|
49
|
+
Ask only for choices returned by `responseSummary`.
|
|
50
|
+
Do not silently choose USDC or USDT, treat USDC as fiat USD, choose source assets, rank routes, or prepare signing.
|
|
51
|
+
|
|
52
|
+
`Can I cover a 1000 dollar payment?`
|
|
53
|
+
Class: `intent_evidence_with_choices`.
|
|
54
|
+
Use `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` with `intentKind: "cover_payment_like_amount"`, `denomination: "dollar"`, and `requiredDisplayAmount: "1000"`.
|
|
55
|
+
Expose `responseSummary`, settlement-asset coverage basis, settlement-asset shortfall when available, required user choices, and unsupported payment/signing boundaries.
|
|
56
|
+
Do not silently choose USDC or USDT, claim fiat USD cash-out, route-dependent payment support, gas readiness, transaction building, or signing readiness.
|
|
57
|
+
|
|
58
|
+
`Can I pay for this $1000 item?`
|
|
59
|
+
Use the same `intent_evidence_with_choices` path as `Can I cover a 1000 dollar payment?`.
|
|
60
|
+
Do not claim fiat USD cash-out, route-dependent payment support, gas completeness, transaction building, or signing readiness.
|
|
61
|
+
|
|
62
|
+
`How much are my USD-denominated assets together?`
|
|
63
|
+
Class: `intent_evidence_total_only`.
|
|
64
|
+
Use `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` with `intentKind: "summarize_settlement_asset_group_balance"` and `denomination: "dollar"`.
|
|
65
|
+
Expose `responseSummary.conclusionKind: "current_settlement_asset_total"` and current display total when available.
|
|
66
|
+
Do not invent a target amount, silently choose USDC or USDT, treat the total as fiat USD cash-out, recommend a route, claim payment readiness, produce transaction material, or imply signing readiness.
|
|
67
|
+
|
|
68
|
+
`Which stablecoin-like asset is highest or lowest?`
|
|
69
|
+
Class: `settlement_asset_group_parity`.
|
|
70
|
+
Use `read.list_settlement_asset_groups`, then `read.summarize_settlement_asset_group_parity` with `denomination: "dollar"`.
|
|
71
|
+
Expose `responseSummary.referenceAssetRole`, min/max/mean/median statistics, and unsupported boundaries.
|
|
72
|
+
Do not treat the reference asset as settlement selection, fiat USD value, peg assumption, payment readiness, route recommendation, transaction material, or signing readiness.
|
|
73
|
+
|
|
74
|
+
`What is the shortfall?`
|
|
75
|
+
Class: `intent_evidence_with_context_or_clarify`.
|
|
76
|
+
If a target amount was already established, use `read.preview_intent_evidence` with that amount and answer from `responseSummary`.
|
|
77
|
+
If not, ask for the missing target amount.
|
|
78
|
+
Do not guess the missing amount, silently choose a settlement token, choose source assets, rank routes, claim gas readiness, prepare signing, or produce transaction material.
|
|
79
|
+
|
|
80
|
+
`Make it 100 SUI.`
|
|
81
|
+
Class: `blocked_with_context`.
|
|
82
|
+
Use `read.classify_wallet_assets` only for current coin context when active account or explicit address is available.
|
|
83
|
+
Do not create a portfolio target, rebalance plan, source selection, route recommendation, or review session.
|
|
84
|
+
|
|
85
|
+
`Keep 100 SUI and convert the rest.`
|
|
86
|
+
Class: `blocked_with_context`.
|
|
87
|
+
Use `read.classify_wallet_assets` only for current coin context when active account or explicit address is available.
|
|
88
|
+
Do not infer gas reserve, sell source, route, reserve policy, transaction material, or signing readiness.
|
|
89
|
+
|
|
90
|
+
`If USDC is short, sell another token to fill it.`
|
|
91
|
+
Class: `intent_evidence_with_choices`.
|
|
92
|
+
Use `read.preview_intent_evidence` with `targetAssetSymbol: "USDC"` and `targetAssetSelectionSource: "user_explicit"` when active account or explicit address context is available.
|
|
93
|
+
Expose selected target shortfall, `selectedTarget.selectionSource`, settlement-asset candidate conversion evidence or quote-unavailable reasons, and required user choices.
|
|
94
|
+
Do not set target provenance for an AI-inferred target. Do not auto-pick assets to sell, rank routes, merge non-group quote proceeds into coverage, treat uninspected assets as funding sources, or prepare signing.
|
|
95
|
+
|
|
96
|
+
## General Behavior Scenarios
|
|
97
|
+
|
|
98
|
+
`What is 1 SUI worth?`
|
|
99
|
+
Class: `answer_only`.
|
|
100
|
+
Call `read.get_deepbook_mid_price` with `poolKey: "SUI_USDC"` for Sui MCP verified context.
|
|
101
|
+
Answer as DeepBook SUI/USDC mid price at `fetchedAt`, not as the global market price.
|
|
102
|
+
Do not use external web data unless the user explicitly asks for non-product market context.
|
|
103
|
+
Do not ask for a wallet or push a review session.
|
|
104
|
+
|
|
105
|
+
`If I sell 10 SUI, how many dollars do I get?`
|
|
106
|
+
Class: `clarify_or_intent_evidence`.
|
|
107
|
+
Say Sui MCP cannot turn "dollars" into fiat USD or silently choose USDC/USDT.
|
|
108
|
+
Ask whether the user wants a specific DeepBook USD-denominated quote token/pool or wallet-scoped settlement-asset-group evidence.
|
|
109
|
+
If the user chooses SUI/USDC, answer as a DeepBook SUI/USDC quote at `fetchedAt`.
|
|
110
|
+
Do not convert USDC to fiat USD cash-out, assume the USDC/USD peg, or use web/finance lookup unless the user explicitly asks for outside product market context.
|
|
111
|
+
Do not present it as a global USD price, route recommendation, price-impact calculation, final min-out, funding readiness, or signing readiness.
|
|
112
|
+
|
|
113
|
+
`How much do I have?`
|
|
114
|
+
Class: `clarify`.
|
|
115
|
+
Check `session.get_interaction_status.assetReadAccount`. If no usable default is available, ask for a Sui address for tools that accept `account`. Open Connect only when the user requests connection.
|
|
116
|
+
|
|
117
|
+
`Connect my wallet.`
|
|
118
|
+
Class: `tool_wait`.
|
|
119
|
+
Call `session.create_wallet_connection` with `intent: connect` and present the internal Connect card. Its authenticated View starts one pairing after checking current state; the ordinary tool call or wait does not. Read or wait using its cardId. A connection is account context, not transaction approval or login.
|
|
120
|
+
Use `session.get_interaction_status.assetReadAccount` before announcing a usable default address. Resolve `connectionConflict` through user-confirmed targeted disconnection; never pick a wallet silently.
|
|
121
|
+
On `timed_out`, say the wallet connection is still pending, not failed.
|
|
122
|
+
|
|
123
|
+
`I want to buy $10 worth of SUI.`
|
|
124
|
+
Class: `present_options`.
|
|
125
|
+
Do not claim a supported buy flow or provide investment advice.
|
|
126
|
+
Explain that dollar-denominated intent needs a supported stablecoin and amount unit.
|
|
127
|
+
Offer read-only DeepBook quote options and disclose that signing remains blocked.
|
|
128
|
+
|
|
129
|
+
`Sell a little.`
|
|
130
|
+
Class: `clarify`.
|
|
131
|
+
Ask for a concrete amount and provide examples.
|
|
132
|
+
Do not map vague quantity words to a fixed percent.
|
|
133
|
+
|
|
134
|
+
`Sell half.`
|
|
135
|
+
Class: `clarify`.
|
|
136
|
+
Explain that balance-relative swap amounts are unsupported and ask for an explicit source amount. Do not promise a spendable-balance calculation or start pairing to resolve that unsupported input.
|
|
137
|
+
|
|
138
|
+
`5`
|
|
139
|
+
Class: `clarify`.
|
|
140
|
+
Ask which unit the user means: SUI, another asset, or a USD-denominated amount.
|
|
141
|
+
If they mean dollars or stablecoins, use settlement-asset-group evidence before asking for a specific token.
|
|
142
|
+
|
|
143
|
+
`Keep it from getting expensive.`
|
|
144
|
+
Class: `clarify`.
|
|
145
|
+
Ask for a price/slippage limit or explain the default only when a supported action flow applies.
|
|
146
|
+
|
|
147
|
+
`Is this transaction safe?`
|
|
148
|
+
Class: `redirect_unsupported`.
|
|
149
|
+
Do not guarantee safety.
|
|
150
|
+
Summarize concrete review facts or say a review is blocked/unavailable.
|
|
151
|
+
|
|
152
|
+
`Tell me when the price drops.`
|
|
153
|
+
Class: `redirect_unsupported`.
|
|
154
|
+
Say alerts are unsupported and offer a one-time read.
|
|
155
|
+
|
|
156
|
+
`Let's buy Bitcoin too.`
|
|
157
|
+
Class: `redirect_unsupported`.
|
|
158
|
+
Say only Sui mainnet surfaces are exposed.
|
|
159
|
+
|
|
160
|
+
`What happened to the thing from before?`
|
|
161
|
+
Class: `clarify`.
|
|
162
|
+
Ask for the `reviewSessionId` unless a recent-session feature exists.
|
|
163
|
+
|
|
164
|
+
## Manual Client Results
|
|
165
|
+
|
|
166
|
+
No client observations are recorded in this matrix. Release checks can record Claude, Codex, or Cursor observations in an ignored local result file and promote durable failures to `docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md`, product docs, tests, or code.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Intent Evidence Golden Answers
|
|
2
|
+
|
|
3
|
+
This document records the expected answer reference for the deterministic intent-evidence replay scenarios. It is a release-review reference for AI clients, not a transcript of live Claude, Codex, Cursor, or other client runs.
|
|
4
|
+
|
|
5
|
+
The deterministic source of truth is `test/fixtures/intentEvidenceScenarios.ts`.
|
|
6
|
+
|
|
7
|
+
It owns:
|
|
8
|
+
|
|
9
|
+
- exact prompts;
|
|
10
|
+
- MCP tool path;
|
|
11
|
+
- tool input;
|
|
12
|
+
- expected evidence fields;
|
|
13
|
+
- forbidden claims.
|
|
14
|
+
|
|
15
|
+
Korean prompt text is stored there with Unicode escapes. That keeps repo-visible test prose in English while the Korean dollar-word alias remains covered by tests.
|
|
16
|
+
|
|
17
|
+
## Required Status Check
|
|
18
|
+
|
|
19
|
+
Before judging any client answer, call `read.get_server_status` and record these fields:
|
|
20
|
+
|
|
21
|
+
| Field | Required meaning |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `packageName` | The client is connected to the expected Sui MCP package. |
|
|
24
|
+
| `version` | The package build under observation. |
|
|
25
|
+
| `evidencePolicy.version` | The evidence policy version used for the answer. |
|
|
26
|
+
| `network` | Must be `mainnet`. |
|
|
27
|
+
| `implementedToolsCount` | The server-provided implemented tool count; do not hand-count tools. |
|
|
28
|
+
|
|
29
|
+
If the status call is missing `evidencePolicy.version`, the observation is not valid release evidence.
|
|
30
|
+
|
|
31
|
+
## Deterministic Replay Scenarios
|
|
32
|
+
|
|
33
|
+
Each row uses this tool path:
|
|
34
|
+
|
|
35
|
+
1. `read.get_server_status`
|
|
36
|
+
2. `read.list_settlement_asset_groups`
|
|
37
|
+
3. `read.preview_intent_evidence`
|
|
38
|
+
|
|
39
|
+
`korean_dollar_payment_coverage`
|
|
40
|
+
Category: Korean USD-denominated payment coverage.
|
|
41
|
+
Input: `intentKind: "cover_payment_like_amount"`, Korean dollar alias, and `requiredDisplayAmount: "1000"`.
|
|
42
|
+
Expected status: `responseSummary.conclusionKind: "covered_by_settlement_asset_balance"`.
|
|
43
|
+
Answer shape: say the current settlement-asset wallet coin-balance snapshot covers the requested display amount. Ask only for `responseSummary.requiredUserChoices`.
|
|
44
|
+
|
|
45
|
+
`korean_dollar_balance_total`
|
|
46
|
+
Category: Korean USD-denominated balance total.
|
|
47
|
+
Input: `intentKind: "summarize_settlement_asset_group_balance"` with Korean dollar alias.
|
|
48
|
+
Expected status: `responseSummary.conclusionKind: "current_settlement_asset_total"`.
|
|
49
|
+
Answer shape: report the current settlement-asset total only. Do not invent a payment target or settlement token.
|
|
50
|
+
|
|
51
|
+
`korean_dollar_shortfall_with_prior_target`
|
|
52
|
+
Category: Korean USD-denominated shortfall with a prior target amount.
|
|
53
|
+
Input: `intentKind: "cover_payment_like_amount"`, Korean dollar alias, and `requiredDisplayAmount: "1000"` from prior conversation context.
|
|
54
|
+
Expected status: `responseSummary.conclusionKind: "shortfall_in_settlement_asset_balance"`.
|
|
55
|
+
Answer shape: report `responseSummary.shortfallDisplayAmount` as the settlement-asset shortfall. Ask only for `responseSummary.requiredUserChoices`.
|
|
56
|
+
|
|
57
|
+
`quote_detour_shortfall_guard`
|
|
58
|
+
Category: USD-denominated payment coverage after extra SUI/NS quote calls.
|
|
59
|
+
Input: `read.preview_intent_evidence` for a 1000 dollar target, then separate SUI/USDC and NS/USDC quote calls.
|
|
60
|
+
Expected status: `responseSummary.currentDisplayAmount: "278.890119"` and `responseSummary.shortfallDisplayAmount: "721.109881"`.
|
|
61
|
+
|
|
62
|
+
Allowed conclusion:
|
|
63
|
+
Use only the `responseSummary` result:
|
|
64
|
+
|
|
65
|
+
- current settlement-asset amount `278.890119`;
|
|
66
|
+
- required amount `1000`;
|
|
67
|
+
- settlement-asset shortfall `721.109881`.
|
|
68
|
+
|
|
69
|
+
Forbidden conclusions:
|
|
70
|
+
|
|
71
|
+
- Do not conclude that other assets were considered.
|
|
72
|
+
- Do not conclude that everything can be converted.
|
|
73
|
+
- Do not conclude that quote outputs can be combined.
|
|
74
|
+
- Do not conclude that the account is still short after adding quote outputs.
|
|
75
|
+
- Do not use `569.01226` or another quote-combined amount as the shortfall.
|
|
76
|
+
|
|
77
|
+
Required evidence fields:
|
|
78
|
+
|
|
79
|
+
- `responseSummary.answerCompleteness.requiredAnswerFields`
|
|
80
|
+
- `responseSummary.doNotCallQuoteToolsForThisQuestion`
|
|
81
|
+
- `responseSummary.separateQuoteOutputs`
|
|
82
|
+
- `quantitySemantics.doNotCombineWithPaymentAnswer`
|
|
83
|
+
- `userAnswerUse.followUp.answerFields: ["responseSummary"]`
|
|
84
|
+
|
|
85
|
+
Answer shape: use `responseSummary` for the current amount and shortfall. Treat the SUI/NS quote outputs as separate price estimates because the required evidence fields say they are not used for the payment amount or shortfall amount.
|
|
86
|
+
|
|
87
|
+
`explicit_usdc_shortfall`
|
|
88
|
+
Category: user-explicit selected target shortfall.
|
|
89
|
+
Input: `intentKind: "cover_payment_like_amount"`, `denomination: "dollar"`, established `requiredDisplayAmount`, `targetAssetSymbol: "USDC"`, and `targetAssetSelectionSource: "user_explicit"` or `"prior_user_explicit_context"`.
|
|
90
|
+
Expected status: `responseEvidence.mode: "selected_target_context"` and `selectedTarget.selectionSource` matches the input source.
|
|
91
|
+
Answer shape: distinguish `selectedTarget.shortfallDisplayAmount` from the settlement-asset aggregate shortfall. Ask only for returned `requiredUserChoices`.
|
|
92
|
+
|
|
93
|
+
## Required Evidence Fields
|
|
94
|
+
|
|
95
|
+
For these settlement-asset answers without a selected target settlement asset, `responseEvidence.mode` must be `settlement_asset_only`.
|
|
96
|
+
|
|
97
|
+
`responseEvidence.primaryEvidenceFields` must be exactly:
|
|
98
|
+
|
|
99
|
+
- `responseSummary`
|
|
100
|
+
|
|
101
|
+
The user-facing response should use `responseSummary` only. Other packet fields may be source or diagnostic evidence, but they must not become a settlement-token choice, a route, or signing readiness.
|
|
102
|
+
|
|
103
|
+
When the response includes `userAnswerUse`, `userAnswerUse.answerFields` is the response-local copy of this answer path.
|
|
104
|
+
|
|
105
|
+
Selected-target answers are allowed only when the user explicitly selected the target settlement asset.
|
|
106
|
+
|
|
107
|
+
For selected-target answers, use the fields listed in `userAnswerUse.answerFields`, including `responseSummary`, `selectedTarget`, `candidateConversions`, and `requiredUserChoices`.
|
|
108
|
+
|
|
109
|
+
Direct pool quote evidence is part of a selected-target answer only when the same response lists `direct_pool_quote_evidence` in `responseEvidence.supportedResponseClaims` and `direct_pool_quote_evidence_for_user_selected_target` in `userAnswerUse.canAnswer`.
|
|
110
|
+
|
|
111
|
+
`targetAssetSymbol` without `targetAssetSelectionSource` must fail or remain unselected.
|
|
112
|
+
|
|
113
|
+
Clients must not use `targetAssetSelectionSource` for an AI-inferred target.
|
|
114
|
+
|
|
115
|
+
Separate quote tool results from SUI, WAL, RWA, or other non-group assets must not be counted as payment coverage or shortfall evidence.
|
|
116
|
+
|
|
117
|
+
## Standard Clauses
|
|
118
|
+
|
|
119
|
+
Use equivalent wording with the same meaning:
|
|
120
|
+
|
|
121
|
+
| Evidence result | Standard clause |
|
|
122
|
+
| --- | --- |
|
|
123
|
+
| `responseSummary.conclusionKind: "covered_by_settlement_asset_balance"` | Based on the current settlement-asset wallet coin-balance snapshot, the requested display amount is covered. |
|
|
124
|
+
| `responseSummary.conclusionKind: "shortfall_in_settlement_asset_balance"` | Based on the current settlement-asset wallet coin-balance snapshot, the settlement-asset shortfall is `<shortfallDisplayAmount>`. |
|
|
125
|
+
| `responseSummary.conclusionKind: "current_settlement_asset_total"` | The current settlement-asset wallet coin-balance total is `<currentDisplayAmount>` display units. |
|
|
126
|
+
| Any settlement-asset answer | This is pre-transaction intent evidence only, not payment execution readiness, gas readiness, transaction building, or signing readiness. |
|
|
127
|
+
| Returned `responseSummary.requiredUserChoices` | Ask only for the missing decisions returned by the evidence report. |
|
|
128
|
+
|
|
129
|
+
## Forbidden Claims
|
|
130
|
+
|
|
131
|
+
Client answers for these rows must not claim or imply:
|
|
132
|
+
|
|
133
|
+
- USDC, USDT, or any other settlement-token selection unless the user selected that target asset.
|
|
134
|
+
- USDC equals fiat USD or a fiat USD cash-out estimate.
|
|
135
|
+
- Best route, route quality, route-dependent payment support, or venue comparison.
|
|
136
|
+
- Gas readiness, payment execution readiness, transaction building, signing data, or signing readiness.
|
|
137
|
+
- P&L, profit, tax, performance, or cost-basis calculations.
|
|
138
|
+
- Source-asset selection for filling a shortfall.
|
|
139
|
+
|
|
140
|
+
## Manual Client Observation
|
|
141
|
+
|
|
142
|
+
Manual Claude/Codex observations should reuse the deterministic replay scenarios and record whether the client followed the expected answer reference. A release observation row should include:
|
|
143
|
+
|
|
144
|
+
| Field | Required content |
|
|
145
|
+
| --- | --- |
|
|
146
|
+
| Client | Client name and version when available. |
|
|
147
|
+
| Date | Observation date. |
|
|
148
|
+
| Status fields | `packageName`, `version`, `evidencePolicy.version`, `network`, and `implementedToolsCount`. |
|
|
149
|
+
| Prompt | The exact prompt category or fixture scenario id. |
|
|
150
|
+
| Tool path used | Tools called by the client, in order. |
|
|
151
|
+
| Response evidence | Whether the answer used only `responseEvidence.primaryEvidenceFields` for the conclusion. |
|
|
152
|
+
| Forbidden claim check | Any settlement-token, fiat USD, route, P&L, transaction-building, or signing-readiness leakage. |
|
|
153
|
+
| Follow-up | Whether the fix belongs in evidence report fields, MCP/API docs, agent behavior docs, or the client prompt. |
|
|
154
|
+
|
|
155
|
+
Do not treat a manual observation as stronger than the deterministic MCP replay test. Manual observations show client behavior for a specific client build; the replay test guards the product evidence policy.
|
|
156
|
+
|
|
157
|
+
Current manual observation status: no Claude, Codex, Cursor, or other AI-client observation rows are recorded for this deterministic policy yet.
|
|
158
|
+
|
|
159
|
+
Until such rows are recorded, release review should treat manual client behavior as unobserved.
|
|
160
|
+
|
|
161
|
+
The deterministic MCP replay test can still satisfy the product evidence policy. A separate manual observation is needed only before claiming that a specific AI client build followed the policy unaided.
|