@zktx.io/sui-mcp 0.5.0 → 0.6.1

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 (138) hide show
  1. package/README.md +21 -21
  2. package/dist/adapters/adapterPromptSurfaces.js +0 -20
  3. package/dist/adapters/deepbook/deepbookQuotePolicy.js +0 -4
  4. package/dist/adapters/deepbook/deepbookReviewEvidence.js +0 -9
  5. package/dist/adapters/deepbook/deepbookTransactionMaterialProducer.js +0 -9
  6. package/dist/adapters/intentPlanFactories.js +0 -6
  7. package/dist/core/action/contractNameRegistry.js +0 -53
  8. package/dist/core/action/forbiddenFields.js +0 -4
  9. package/dist/core/action/ptbVisualizationProducer.js +0 -3
  10. package/dist/core/action/receiptPtbGraph.js +0 -17
  11. package/dist/core/action/reviewTimeSimulationEvidence.js +0 -4
  12. package/dist/core/action/signableAdapterContract.js +0 -5
  13. package/dist/core/action/suiChainReceiptMapping.js +0 -18
  14. package/dist/core/action/suiChainReceiptReader.js +1 -21
  15. package/dist/core/action/suiChainReceiptVerifier.js +0 -10
  16. package/dist/core/action/transactionFunding.js +0 -7
  17. package/dist/core/action/types.js +0 -1
  18. package/dist/core/action/walletReviewContractAssembler.js +0 -2
  19. package/dist/core/activity/localDataService.js +65 -52
  20. package/dist/core/activity/localDataValidation.js +1 -3
  21. package/dist/core/activity/sqliteActivityStore.js +24 -24
  22. package/dist/core/activity/sqliteActivityStoreRows.js +0 -2
  23. package/dist/core/activity/sqliteActivityStoreSchema.js +81 -14
  24. package/dist/core/preferences/sqlitePreferencesRepository.js +5 -3
  25. package/dist/core/read/deepbookReadHelpers.js +0 -2
  26. package/dist/core/read/deepbookRegistry.js +0 -19
  27. package/dist/core/read/deepbookUsdcChartService.js +0 -2
  28. package/dist/core/read/readCardResult.js +0 -2
  29. package/dist/core/read/readService.js +0 -19
  30. package/dist/core/read/readServiceTypes.js +0 -2
  31. package/dist/core/session/cardSession.js +1 -5
  32. package/dist/core/session/cardSessionStore.js +54 -7
  33. package/dist/core/session/reviewValidity.js +0 -3
  34. package/dist/core/session/sessionRecordStore.js +0 -1
  35. package/dist/core/session/sessionStore.js +0 -32
  36. package/dist/core/session/settingsFileIdentity.js +9 -0
  37. package/dist/core/session/settingsFileProtocol.js +20 -0
  38. package/dist/core/session/settingsFileStore.js +337 -0
  39. package/dist/core/session/settingsInputError.js +32 -0
  40. package/dist/core/session/settingsOperation.js +220 -0
  41. package/dist/core/session/settingsPreparationSql.js +13 -0
  42. package/dist/core/session/settingsWorkflow.js +1183 -0
  43. package/dist/core/session/sqliteCardStore.js +0 -2
  44. package/dist/core/session/sqliteSessionStore.js +0 -51
  45. package/dist/core/session/sqliteSettingsWorkflowStore.js +453 -0
  46. package/dist/core/session/sqliteTransactionMaterialStore.js +0 -11
  47. package/dist/core/session/sqliteWalletWorkflowStore.js +160 -66
  48. package/dist/core/session/status.js +2 -4
  49. package/dist/core/session/transactionMaterialStore.js +0 -4
  50. package/dist/core/session/transactionRequest.js +0 -4
  51. package/dist/core/session/walletConnection.js +26 -10
  52. package/dist/core/session/walletWorkflow.js +70 -30
  53. package/dist/core/session/workflowState.js +14 -14
  54. package/dist/core/session/workflowView.js +18 -8
  55. package/dist/core/suiAddress.js +0 -5
  56. package/dist/core/suiEndpoint.js +0 -3
  57. package/dist/mcp/prompts.js +0 -12
  58. package/dist/mcp/responseGuidance.js +10 -5
  59. package/dist/mcp/schemas.js +0 -3
  60. package/dist/mcp/serverInfo.js +3 -4
  61. package/dist/mcp/toolNames.js +2 -2
  62. package/dist/mcp/tools/account/index.js +1 -19
  63. package/dist/mcp/tools/action/prepareSuiActionReview.js +0 -6
  64. package/dist/mcp/tools/read/readToolHelpers.js +5 -4
  65. package/dist/mcp/tools/read/serverStatusTools.js +0 -1
  66. package/dist/mcp/tools/session/executionResultTools.js +2 -2
  67. package/dist/mcp/tools/session/shared.js +1 -2
  68. package/dist/mcp/tools/session/statusTools.js +4 -5
  69. package/dist/mcp/tools/settings/index.js +8 -28
  70. package/dist/mcp-app/account.html +14 -14
  71. package/dist/mcp-app/account.notices.txt +1 -1
  72. package/dist/mcp-app/chart.html +9 -9
  73. package/dist/mcp-app/chart.notices.txt +1 -1
  74. package/dist/mcp-app/connect.html +14 -14
  75. package/dist/mcp-app/connect.notices.txt +1 -1
  76. package/dist/mcp-app/receipt.html +1298 -1463
  77. package/dist/mcp-app/receipt.notices.txt +226 -1204
  78. package/dist/mcp-app/review.html +1298 -1463
  79. package/dist/mcp-app/review.notices.txt +226 -1204
  80. package/dist/mcp-app/settings.html +3133 -0
  81. package/dist/mcp-app/settings.notices.txt +973 -0
  82. package/dist/mcp-ui/contracts.js +8 -2
  83. package/dist/mcp-ui/readCards.js +1 -1
  84. package/dist/mcp-ui/tools.js +34 -4
  85. package/dist/review-server/server.js +3 -51
  86. package/dist/runtime/application.js +41 -14
  87. package/dist/runtime/config.js +0 -2
  88. package/dist/runtime/localSettingsService.js +23 -2
  89. package/dist/runtime/logger.js +0 -2
  90. package/dist/runtime/reviewServerAcquire.js +1 -18
  91. package/dist/runtime/runtimeTermination.js +1 -4
  92. package/dist/runtime/shared/authenticatedFetch.js +2 -4
  93. package/dist/runtime/shared/control.js +4 -7
  94. package/dist/runtime/shared/dataAccess.js +0 -2
  95. package/dist/runtime/shared/http.js +14 -0
  96. package/dist/runtime/shared/mcpHttp.js +6 -6
  97. package/dist/runtime/shared/ownerLease.js +0 -4
  98. package/dist/runtime/shared/server.js +1 -2
  99. package/dist/runtime/shared/stdio.js +2 -5
  100. package/dist/runtime/smokeMainnetRead.js +0 -3
  101. package/dist/runtime/smokeReview.js +0 -4
  102. package/dist/runtime/start.js +0 -2
  103. package/dist/runtime/suiTransactionGraphqlMapping.js +0 -2
  104. package/dist/runtime/suiTransactionGraphqlQueries.js +0 -3
  105. package/dist/runtime/walletConnectConfig.js +0 -2
  106. package/dist/runtime/walletConnectStorage.js +2 -10
  107. package/dist/runtime/walletConnectTransport.js +0 -11
  108. package/dist/runtime/walletSdkChildRuntime.js +2 -6
  109. package/dist/runtime/walletSdkIpc.js +2 -1
  110. package/dist/runtime/walletSdkProcess.js +3 -8
  111. package/docs/AGENT_BEHAVIOR.md +45 -15
  112. package/docs/LOCAL_DB_ARCHITECTURE.md +145 -22
  113. package/docs/MCP_SETUP.md +99 -39
  114. package/docs/MCP_TOOLS.md +288 -24
  115. package/docs/SDK_API.md +63 -10
  116. package/docs/UTILITY_INDEX.md +9 -6
  117. package/docs/WALLET_CONNECTION.md +32 -10
  118. package/package.json +22 -8
  119. package/dist/core/activity/schemaVersion.js +0 -2
  120. package/dist/core/session/keyedRecordStore.js +0 -18
  121. package/dist/core/session/settingsSession.js +0 -1
  122. package/dist/core/session/settingsSessions.js +0 -45
  123. package/dist/review-app/brand-dark.svg +0 -1
  124. package/dist/review-app/brand-light.svg +0 -1
  125. package/dist/review-app/favicon.svg +0 -1
  126. package/dist/review-app/settings.css +0 -1
  127. package/dist/review-app/settings.js +0 -1
  128. package/dist/review-app/ui.css +0 -809
  129. package/dist/review-server/assets.js +0 -48
  130. package/dist/review-server/html.js +0 -45
  131. package/dist/review-server/http.js +0 -47
  132. package/dist/review-server/middleware/reviewToken.js +0 -7
  133. package/dist/review-server/settingsApi.js +0 -158
  134. package/docs/AGENT_DEVELOPMENT_POLICY.md +0 -815
  135. package/docs/FRONTEND_POLICY.md +0 -534
  136. package/docs/golden-scenarios/BEHAVIOR_MATRIX.md +0 -166
  137. package/docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md +0 -161
  138. package/docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md +0 -259
@@ -1,166 +0,0 @@
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.
@@ -1,161 +0,0 @@
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.
@@ -1,259 +0,0 @@
1
- # Intent Evidence Matrix
2
-
3
- This matrix is a current-release release review checklist for AI clients. It tests whether the implemented read and review surfaces let a user get a concise, useful answer before any transaction-building or signing work.
4
-
5
- The goal is not to push the user toward a review session. The goal is to verify that current intent evidence is easy for AI clients to consume, summarize, and explain without claiming that the product can do unsupported work such as autonomous execution, signing readiness, route recommendation, fiat cash-out, or P&L.
6
-
7
- For deterministic natural-language USD-denominated replay scenarios, required MCP tool paths, expected answer shapes, and manual client observation fields, see `docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md`.
8
-
9
- Before running the question corpus, call `read.get_server_status` and record:
10
-
11
- - `packageName`;
12
- - `version`;
13
- - `evidencePolicy.version`;
14
- - `network`;
15
- - `implementedToolsCount`.
16
-
17
- Use the returned numeric `implementedToolsCount` field instead of hand-counting the tool array.
18
-
19
- If the status does not include the expected evidence policy, the client may be attached to the wrong MCP build and the observation is not a valid release gate result.
20
-
21
- ## Standard Clauses
22
-
23
- Use these clauses, or equivalent wording with the same meaning, when the answer needs the corresponding boundary.
24
-
25
- Bounded activity page:
26
- This is a bounded provider page, not complete wallet history.
27
-
28
- Affected vs sent:
29
- Affected activity means the account appeared in returned transaction effects; it does not mean the account sent the transaction.
30
-
31
- Summary-first path:
32
- Use summary output first; inspect full details only when the user asks for transaction-level facts.
33
-
34
- Requested account facts:
35
- For wallet/account-specific balance questions, use `requestedAccountTransactionFacts`, `requestedAccount.coinFlows`, and `transactions[].requestedAccountEffect` before transaction-wide aggregates. These fields are raw integer facts scoped to the requested account.
36
-
37
- Incomplete balance evidence:
38
- `accountBalanceChangeEvidence: "incomplete_account_balance_changes"` or `"account_balance_changes_unavailable"` is not zero-balance evidence.
39
-
40
- `accountBalanceChangeInferencePolicy: "do_not_infer_from_transaction_context"` means the requested account amount must not be inferred from transaction-level context, visible recipient patterns, or current wallet balances. Do not describe it as likely or almost certain.
41
-
42
- Only `no_account_balance_changes_returned` with complete details supports saying no requested-account balance change was returned.
43
-
44
- Transaction context:
45
- Live scan and live-summary rows use `transactionContext` for transaction-level calls, objects, events, gas, truncation, and protocol labels. It intentionally omits transaction-wide balance-change aggregates.
46
-
47
- Compact facts:
48
- Inspect and stored-summary rows can include `compact`.
49
-
50
- `compact.factScope: "transaction"` and `compact.requestedAccountScoped: false` mean compact balance changes, object changes, events, and gas are transaction-level facts.
51
-
52
- Compact balance changes can aggregate repeated ownerless raw changes with `count`; `analysis.coinFlows` is a transaction/page aggregate, not wallet-specific evidence.
53
-
54
- Raw display boundary:
55
- Do not convert raw token amounts into display units unless the response includes verified decimals for that asset.
56
-
57
- Wallet snapshot boundary:
58
- Wallet balance reads are current coin-balance snapshots, not transaction history, receipt proof for a specific digest, acquisition source, object provenance, P&L, or cost basis.
59
-
60
- Intent evidence boundary:
61
- Intent evidence is pre-transaction evidence summary. It is not payment execution, settlement-token selection, route recommendation, transaction building, signing readiness, fiat USD cash-out, P&L, or cost basis.
62
-
63
- Settlement asset coverage:
64
- `responseSummary` is the response field for current settlement-asset total, covered-by-settlement-asset-balance, and settlement-asset shortfall statements inside the supported settlement asset group.
65
-
66
- When no target settlement asset is selected, `responseEvidence.primaryEvidenceFields` limits response evidence to `responseSummary`.
67
-
68
- When `responseEvidence.mode` is `selected_target_context`, use the response fields listed in `userAnswerUse.answerFields`, including `responseSummary`, `selectedTarget`, `candidateConversions`, and `requiredUserChoices`.
69
-
70
- Direct pool quote evidence is present 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`.
71
-
72
- Settlement asset coverage is not settlement-token selection, payment execution readiness, gas readiness, route-dependent payment support, or signing readiness.
73
-
74
- Settlement asset group boundary:
75
- USD-denominated settlement asset groups are pinned SDK registry evidence, not fiat USD support, live liquidity, or a complete stablecoin universe.
76
-
77
- Stored facts:
78
- Stored summaries are local normalized facts, not a background index or complete history.
79
-
80
- Quote evidence:
81
- Quote evidence is not payment coverage, shortfall contribution, final min-out, or signing input.
82
-
83
- Quote impact boundary:
84
- DeepBook quote output is not effective price, price impact, mid-price slippage, venue comparison, best route, or route recommendation evidence.
85
-
86
- Fiat cash-out boundary:
87
- A USDC quote is not a fiat USD cash-out estimate, external USDC/USD market lookup, or peg assumption.
88
-
89
- P&L unsupported:
90
- Profit, tax, performance, and cost-basis calculations are not Sui MCP surfaces. Do not provide a profit formula or hypothetical profit example, even when the user supplies an assumed acquisition price.
91
-
92
- Display intent:
93
- Display intent is proposal context, not a raw signing amount.
94
-
95
- Review evidence:
96
- Review evidence explains what was checked; it is not signing readiness or a safety guarantee.
97
-
98
- Wallet identity:
99
- Wallet identity is active account read context, not login, custody, or transaction authorization.
100
-
101
- Protocol labels:
102
- Protocol labels are conservative activity labels, not protocol support, position inventory, P&L, route quality, signing data, or signing readiness.
103
-
104
- ## Current Release Questions
105
-
106
- `What is 1 SUI worth?`
107
- Use `read.get_deepbook_mid_price` with `poolKey: "SUI_USDC"`.
108
- Answer with DeepBook SUI/USDC, `fetchedAt`, and not-global-market-price boundary.
109
- Do not ask for a wallet, start a review session, recommend a route, or imply signing readiness.
110
-
111
- `If I sell 10 SUI, how many USDC do I get?`
112
- Use `read.quote_deepbook_display_amount` after pool and direction are clear.
113
- Include source input, pool, direction, quote asset, and `fetchedAt`.
114
- Do not provide final min-out, transaction-building input, route quality, or signing readiness.
115
-
116
- `If I sell 10 SUI, how many dollars do I get?`
117
- Do not quote until the user selects a registered DeepBook quote asset or pool, or asks for wallet-scoped USD-denominated intent evidence.
118
- If the user chooses a pool such as SUI/USDC, call `read.quote_deepbook_display_amount`.
119
- Say Sui MCP cannot turn "dollars" into fiat USD or silently choose USDC/USDT.
120
- Ask whether the user wants a specific DeepBook USD-denominated quote token/pool or wallet-scoped settlement-asset-group evidence.
121
- Do not provide a silent USDC/USDT default, USDC/USD peg conversion, web or finance lookup, bank cash-out estimate, final min-out, route quality, or signing readiness.
122
-
123
- `If I sell some SUI, how much do I get?`
124
- Clarify the source amount. Give examples such as `1 SUI` or `10 SUI`.
125
- Do not map vague words to a fixed amount or percent.
126
-
127
- `What is in my wallet?`
128
- Use `session.get_interaction_status.assetReadAccount` if available; otherwise ask for a Sui address for an address-capable read. Open Connect only when the user requests connection. A stored selection does not prove a usable connection or signing authority.
129
-
130
- `Show balances for this address: 0x...`
131
- Use `read.summarize_wallet_assets` or `read.classify_wallet_assets` with `account`.
132
- Include snapshot time and explicit address scope.
133
- Do not imply ownership proof, active account context, or wallet authorization.
134
-
135
- `Summarize the latest 5 transactions for this wallet.`
136
- Use `read.summarize_sui_activity_scan` first.
137
- Answer with a short table or bullets.
138
- Include relationship, requested-account raw flows when discussing the wallet's own changes, bounded page status, and continuation/coverage if returned.
139
- Do not return full raw JSON, claim complete history, inspect unnecessary details, or treat `analysis.coinFlows` as wallet-specific.
140
-
141
- `Show details for the first transaction.`
142
- Use `read.inspect_sui_transaction` for the digest, or scan details when already present.
143
- Include digest, status, sender, key Move calls, and available raw balance/gas facts.
144
- Do not infer missing fields when details are absent or truncated.
145
-
146
- `Did this wallet send it, or was it only affected?`
147
- Use returned `relationship` and transaction sender facts.
148
- Distinguish sent from affected.
149
- Use the affected-vs-sent clause when relationship is affected.
150
-
151
- `Show all older transactions too.`
152
- Continue with cursor only if available.
153
- Explain continuation and coverage.
154
- Do not claim pagination proves complete history.
155
-
156
- `Which DeFi protocols did I use recently?`
157
- Use `read.summarize_sui_activity_scan`, or stored summary if the user asks for stored facts.
158
- Use conservative protocol labels and limitations.
159
- Do not infer position inventory, P&L, supported-protocol list, or signing readiness.
160
-
161
- `How much profit did I make?`
162
- Unsupported.
163
- Explain P&L is not a Sui MCP surface.
164
- Offer available raw activity, balance snapshots, or quote evidence if useful.
165
- Do not provide P&L, tax, performance, profit calculation, cost-basis formula, or hypothetical profit example.
166
-
167
- `Can you calculate my profit if I bought 10 SUI for 10 USDC?`
168
- Unsupported.
169
- Explain that an assumed acquisition price still does not turn Sui MCP into a P&L or accounting surface.
170
- State available quote proceeds or raw activity evidence only if already fetched.
171
- Do not provide a profit calculation, cost-basis formula, hypothetical example, or tax/accounting interpretation.
172
-
173
- `Recommend the best route.`
174
- Unsupported.
175
- Offer scoped quote facts when source amount and pool can be specified.
176
- Do not provide best route, ranking, route quality, or settlement choice.
177
-
178
- `Can I cover a 1000 dollar payment?`
179
- Call `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` with `intentKind: "cover_payment_like_amount"`, `denomination: "dollar"`, and `requiredDisplayAmount: "1000"`.
180
- Answer from `responseSummary`: covered, shortfall, or unavailable.
181
- Ask only for returned `responseSummary.requiredUserChoices`.
182
- Do not silently select USDC/USDT, claim fiat USD cash-out, route-dependent payment support, gas readiness, transaction building, or signing readiness.
183
-
184
- `Can I pay for this 1000-dollar item?`
185
- Use the same intent-evidence path as `Can I cover a 1000 dollar payment?`.
186
- Answer intent evidence first, then ask only for required user choices returned by `responseSummary`.
187
- Do not silently select USDC/USDT, claim fiat USD cash-out, route-dependent payment support, transaction building, or signing readiness.
188
-
189
- `How much are my USD-denominated assets together?`
190
- Call `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` with `intentKind: "summarize_settlement_asset_group_balance"` and `denomination: "dollar"`.
191
- Report current settlement-asset total only from `responseSummary.conclusionKind: "current_settlement_asset_total"`.
192
- Do not invent a payment target, silently select USDC/USDT, claim fiat USD cash-out, recommend a route, build a transaction, or imply signing readiness.
193
-
194
- `Which USD-denominated asset is highest or lowest right now?`
195
- Call `read.list_settlement_asset_groups`, then `read.summarize_settlement_asset_group_parity` with `denomination: "dollar"`.
196
- Report available asset group parity max/min and, if useful, mean/median.
197
- State that the reference asset is only a measurement reference.
198
- Do not turn parity into settlement-token selection, fiat USD cash-out, USDC/USD peg assumption, payment readiness, best route, transaction building, or signing readiness.
199
-
200
- `What is the shortfall?`
201
- If a target amount is already established, call `read.preview_intent_evidence` with that amount.
202
- Otherwise clarify the missing target amount.
203
- Report `responseSummary.shortfallDisplayAmount` only when `conclusionKind` is `shortfall_in_settlement_asset_balance`.
204
- Report zero shortfall only when `conclusionKind` is `covered_by_settlement_asset_balance`.
205
- Do not guess the amount, silently choose a settlement token, choose source assets, rank routes, claim gas readiness, claim payment execution readiness, or imply signing readiness.
206
-
207
- `If USDC is short, can I fill it?`
208
- Use `read.preview_intent_evidence` with the established `requiredDisplayAmount`, `targetAssetSymbol: "USDC"`, and `targetAssetSelectionSource: "user_explicit"` or `"prior_user_explicit_context"` according to the user's wording.
209
- Distinguish settlement-asset aggregate shortfall from `selectedTarget.shortfallDisplayAmount`.
210
- Ask only for returned choices.
211
- Do not set a target source for an agent-inferred target. Do not count non-group quote proceeds as payment coverage, auto-select source assets, rank routes, claim route-dependent payment support, or imply signing readiness.
212
-
213
- `Prepare selling 10 SUI.`
214
- Use `action.prepare_sui_action_review` and present the internal Review card.
215
- Explain returned checks; only an explicit card selection and wallet approval
216
- can authorize the backend request. Do not return bytes, signing readiness or
217
- an execution claim from preparation alone.
218
-
219
- `Tell me this review session status.`
220
- Use `session.get_review_status` or `read.get_review_session_detail`.
221
- Report current status and checks returned by the review layer.
222
- Do not give a safety guarantee or signing-readiness claim when status is blocked.
223
-
224
- `Connect my wallet.`
225
- Use `session.create_wallet_connection` with `intent: connect`, then read or wait on its cardId.
226
- Its authenticated View starts pairing only after confirming permission and current eligibility. A manage card instead waits for the user to choose Connect wallet. Confirm the usable default through `assetReadAccount`; an ordinary tool call or wait does not pair.
227
- Do not call it login, permanent authorization, or transaction permission.
228
-
229
- `Can I sign now?`
230
- Use review status only.
231
- A `ready_for_wallet_review` status with emitted transaction review data means
232
- the evidence is available to inspect, not that input permission or wallet
233
- eligibility is current. Request wallet approval must be offered by the current
234
- authenticated Review card, and the user must approve that exact transaction
235
- in their own wallet. If the
236
- review is blocked, explain the returned missing or failed review evidence.
237
- Do not use safe-to-sign language, do not return transaction material, and do
238
- not describe MCP output as signing data.
239
-
240
- `Cancel the transaction I just sent.`
241
- Unsupported.
242
- Explain submitted onchain transactions cannot be canceled by this toolkit.
243
- Offer digest inspection when a digest is available.
244
-
245
- ## Manual Client Observation Requirement
246
-
247
- Release review should record at least one client observation file before claiming that a specific external AI client build followed this matrix unaided. The deterministic MCP replay tests are the product evidence-policy gate; manual observation files are client-behavior evidence. Each observation row should capture:
248
-
249
- - client name and date,
250
- - `read.get_server_status` package version, evidence policy version, and `implementedToolsCount`,
251
- - prompt,
252
- - tool path used,
253
- - whether the client used the summary-first path,
254
- - whether the client had to inspect raw tool-result files or run shell/JQ processing,
255
- - answer length class,
256
- - missing or incorrect standard clauses,
257
- - follow-up fix needed.
258
-
259
- Observation files belong in ignored local planning notes because they are local client evidence. Durable failures found from those observations must be promoted to code, docs, tests, or this matrix.