@stelis/say-ur-intent 0.0.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/README.md +425 -0
- package/docs/AGENT_BEHAVIOR.md +462 -0
- package/docs/AGENT_DEVELOPMENT_POLICY.md +740 -0
- package/docs/FRONTEND_POLICY.md +234 -0
- package/docs/LOCAL_DB_ARCHITECTURE.md +85 -0
- package/docs/MCP_SETUP.md +496 -0
- package/docs/MCP_TOOLS.md +893 -0
- package/docs/SDK_API.md +116 -0
- package/docs/SIGNABLE_ADAPTER_CONTRACT.md +358 -0
- package/docs/TRANSACTION_ACTIVITY_LOG.md +182 -0
- package/docs/UTILITY_INDEX.md +180 -0
- package/docs/WALLET_IDENTITY.md +194 -0
- package/docs/golden-scenarios/BEHAVIOR_MATRIX.md +169 -0
- package/docs/golden-scenarios/INTENT_EVIDENCE_GOLDEN_ANSWERS.md +161 -0
- package/docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md +254 -0
- package/package.json +73 -0
- package/protocols/deepbook-margin.md +15 -0
- package/protocols/deepbook-v3.md +24 -0
|
@@ -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 Say Ur Intent 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.
|
|
@@ -0,0 +1,254 @@
|
|
|
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 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 `accountBalanceChangeAbsenceProven: true` or complete evidence with `no_account_balance_changes_returned` proves 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 Say Ur Intent 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 Say Ur Intent 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 active account context if set; otherwise start the wallet identity flow.
|
|
129
|
+
Explain the active account read-context boundary.
|
|
130
|
+
Do not ask for a manual address for an active-wallet question or imply login/signing authorization.
|
|
131
|
+
|
|
132
|
+
`Show balances for this address: 0x...`
|
|
133
|
+
Use `read.summarize_wallet_assets` or `read.classify_wallet_assets` with `account`.
|
|
134
|
+
Include snapshot time and explicit address scope.
|
|
135
|
+
Do not imply ownership proof, active account context, or wallet authorization.
|
|
136
|
+
|
|
137
|
+
`Summarize the latest 5 transactions for this wallet.`
|
|
138
|
+
Use `read.summarize_sui_activity_scan` first.
|
|
139
|
+
Answer with a short table or bullets.
|
|
140
|
+
Include relationship, requested-account raw flows when discussing the wallet's own changes, bounded page status, and continuation/coverage if returned.
|
|
141
|
+
Do not return full raw JSON, claim complete history, inspect unnecessary details, or treat `analysis.coinFlows` as wallet-specific.
|
|
142
|
+
|
|
143
|
+
`Show details for the first transaction.`
|
|
144
|
+
Use `read.inspect_sui_transaction` for the digest, or scan details when already present.
|
|
145
|
+
Include digest, status, sender, key Move calls, and available raw balance/gas facts.
|
|
146
|
+
Do not infer missing fields when details are absent or truncated.
|
|
147
|
+
|
|
148
|
+
`Did this wallet send it, or was it only affected?`
|
|
149
|
+
Use returned `relationship` and transaction sender facts.
|
|
150
|
+
Distinguish sent from affected.
|
|
151
|
+
Use the affected-vs-sent clause when relationship is affected.
|
|
152
|
+
|
|
153
|
+
`Show all older transactions too.`
|
|
154
|
+
Continue with cursor only if available.
|
|
155
|
+
Explain continuation and coverage.
|
|
156
|
+
Do not claim pagination proves complete history.
|
|
157
|
+
|
|
158
|
+
`Which DeFi protocols did I use recently?`
|
|
159
|
+
Use `read.summarize_sui_activity_scan`, or stored summary if the user asks for stored facts.
|
|
160
|
+
Use conservative protocol labels and limitations.
|
|
161
|
+
Do not infer position inventory, P&L, supported-protocol list, or signing readiness.
|
|
162
|
+
|
|
163
|
+
`How much profit did I make?`
|
|
164
|
+
Unsupported.
|
|
165
|
+
Explain P&L is not a Say Ur Intent surface.
|
|
166
|
+
Offer available raw activity, balance snapshots, or quote evidence if useful.
|
|
167
|
+
Do not provide P&L, tax, performance, profit calculation, cost-basis formula, or hypothetical profit example.
|
|
168
|
+
|
|
169
|
+
`Can you calculate my profit if I bought 10 SUI for 10 USDC?`
|
|
170
|
+
Unsupported.
|
|
171
|
+
Explain that an assumed acquisition price still does not turn Say Ur Intent into a P&L or accounting surface.
|
|
172
|
+
State available quote proceeds or raw activity evidence only if already fetched.
|
|
173
|
+
Do not provide a profit calculation, cost-basis formula, hypothetical example, or tax/accounting interpretation.
|
|
174
|
+
|
|
175
|
+
`Recommend the best route.`
|
|
176
|
+
Unsupported.
|
|
177
|
+
Offer scoped quote facts when source amount and pool can be specified.
|
|
178
|
+
Do not provide best route, ranking, route quality, or settlement choice.
|
|
179
|
+
|
|
180
|
+
`Can I cover a 1000 dollar payment?`
|
|
181
|
+
Call `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` with `intentKind: "cover_payment_like_amount"`, `denomination: "dollar"`, and `requiredDisplayAmount: "1000"`.
|
|
182
|
+
Answer from `responseSummary`: covered, shortfall, or unavailable.
|
|
183
|
+
Ask only for returned `responseSummary.requiredUserChoices`.
|
|
184
|
+
Do not silently select USDC/USDT, claim fiat USD cash-out, route-dependent payment support, gas readiness, transaction building, or signing readiness.
|
|
185
|
+
|
|
186
|
+
`Can I pay for this 1000-dollar item?`
|
|
187
|
+
Use the same intent-evidence path as `Can I cover a 1000 dollar payment?`.
|
|
188
|
+
Answer intent evidence first, then ask only for required user choices returned by `responseSummary`.
|
|
189
|
+
Do not silently select USDC/USDT, claim fiat USD cash-out, route-dependent payment support, transaction building, or signing readiness.
|
|
190
|
+
|
|
191
|
+
`How much are my USD-denominated assets together?`
|
|
192
|
+
Call `read.list_settlement_asset_groups`, then `read.preview_intent_evidence` with `intentKind: "summarize_settlement_asset_group_balance"` and `denomination: "dollar"`.
|
|
193
|
+
Report current settlement-asset total only from `responseSummary.conclusionKind: "current_settlement_asset_total"`.
|
|
194
|
+
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.
|
|
195
|
+
|
|
196
|
+
`Which USD-denominated asset is highest or lowest right now?`
|
|
197
|
+
Call `read.list_settlement_asset_groups`, then `read.summarize_settlement_asset_group_parity` with `denomination: "dollar"`.
|
|
198
|
+
Report available asset group parity max/min and, if useful, mean/median.
|
|
199
|
+
State that the reference asset is only a measurement reference.
|
|
200
|
+
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.
|
|
201
|
+
|
|
202
|
+
`What is the shortfall?`
|
|
203
|
+
If a target amount is already established, call `read.preview_intent_evidence` with that amount.
|
|
204
|
+
Otherwise clarify the missing target amount.
|
|
205
|
+
Report `responseSummary.shortfallDisplayAmount` only when `conclusionKind` is `shortfall_in_settlement_asset_balance`.
|
|
206
|
+
Report zero shortfall only when `conclusionKind` is `covered_by_settlement_asset_balance`.
|
|
207
|
+
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.
|
|
208
|
+
|
|
209
|
+
`If USDC is short, can I fill it?`
|
|
210
|
+
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.
|
|
211
|
+
Distinguish settlement-asset aggregate shortfall from `selectedTarget.shortfallDisplayAmount`.
|
|
212
|
+
Ask only for returned choices.
|
|
213
|
+
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.
|
|
214
|
+
|
|
215
|
+
`Prepare selling 10 SUI.`
|
|
216
|
+
Use `action.prepare_sui_action_review`.
|
|
217
|
+
Return the review URL and blocked signing boundary.
|
|
218
|
+
Do not return transaction bytes, signing readiness, or execution claims.
|
|
219
|
+
|
|
220
|
+
`Tell me this review session status.`
|
|
221
|
+
Use `session.get_review_status` or `read.get_review_session_detail`.
|
|
222
|
+
Report current status and checks returned by the review layer.
|
|
223
|
+
Do not give a safety guarantee or signing-readiness claim when status is blocked.
|
|
224
|
+
|
|
225
|
+
`Connect my wallet.`
|
|
226
|
+
Use `session.create_wallet_identity`, then wait or poll.
|
|
227
|
+
Return the same-machine browser URL and active account read context after connection.
|
|
228
|
+
Do not call it login, permanent authorization, or transaction permission.
|
|
229
|
+
|
|
230
|
+
`Can I sign now?`
|
|
231
|
+
Use review status only.
|
|
232
|
+
Explain that wallet signing remains blocked in the current release and is deliberately sequenced later.
|
|
233
|
+
Do not use safe-to-sign language or transaction material.
|
|
234
|
+
|
|
235
|
+
`Cancel the transaction I just sent.`
|
|
236
|
+
Unsupported.
|
|
237
|
+
Explain submitted onchain transactions cannot be canceled by this toolkit.
|
|
238
|
+
Offer digest inspection when a digest is available.
|
|
239
|
+
|
|
240
|
+
## Manual Client Observation Requirement
|
|
241
|
+
|
|
242
|
+
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:
|
|
243
|
+
|
|
244
|
+
- client name and date,
|
|
245
|
+
- `read.get_server_status` package version, evidence policy version, and `implementedToolsCount`,
|
|
246
|
+
- prompt,
|
|
247
|
+
- tool path used,
|
|
248
|
+
- whether the client used the summary-first path,
|
|
249
|
+
- whether the client had to inspect raw tool-result files or run shell/JQ processing,
|
|
250
|
+
- answer length class,
|
|
251
|
+
- missing or incorrect standard clauses,
|
|
252
|
+
- follow-up fix needed.
|
|
253
|
+
|
|
254
|
+
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.
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stelis/say-ur-intent",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Say Ur Intent is a local-first toolkit for helping AI applications and users inspect Sui DeFi actions before execution.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"say-ur-intent": "./dist/runtime/start.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"README.md",
|
|
13
|
+
"docs/",
|
|
14
|
+
"protocols/deepbook-v3.md",
|
|
15
|
+
"protocols/deepbook-margin.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"sui",
|
|
22
|
+
"deepbook",
|
|
23
|
+
"sui-defi-review",
|
|
24
|
+
"wallet-review"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/stelis-dev/say-ur-intent.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/stelis-dev/say-ur-intent/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/stelis-dev/say-ur-intent#readme",
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public",
|
|
36
|
+
"tag": "next"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
40
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && vite build",
|
|
41
|
+
"prepublishOnly": "npm run release:check",
|
|
42
|
+
"release:check": "tsx scripts/release-check.ts",
|
|
43
|
+
"smoke:mainnet": "node dist/runtime/smokeMainnetRead.js",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
46
|
+
"generate:deepbook-registry": "tsx scripts/generate-deepbook-registry.ts",
|
|
47
|
+
"generate:flowx-registry": "tsx scripts/generate-flowx-registry.ts"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@flowx-finance/sdk": "2.1.0",
|
|
51
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
52
|
+
"@mysten/dapp-kit-core": "1.3.2",
|
|
53
|
+
"@mysten/deepbook-v3": "1.3.6",
|
|
54
|
+
"@mysten/sui": "2.17.0",
|
|
55
|
+
"@scure/bip39": "2.2.0",
|
|
56
|
+
"@stelis/agent-q-provider-sui": "0.0.5",
|
|
57
|
+
"@zktx.io/ptb-model": "0.5.0",
|
|
58
|
+
"better-sqlite3": "12.9.0",
|
|
59
|
+
"mermaid": "11.12.0",
|
|
60
|
+
"zod": "4.4.3"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/better-sqlite3": "7.6.13",
|
|
64
|
+
"@types/node": "25.6.2",
|
|
65
|
+
"tsx": "4.21.0",
|
|
66
|
+
"typescript": "6.0.3",
|
|
67
|
+
"vite": "8.0.11",
|
|
68
|
+
"vitest": "4.1.5"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=22"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# DeepBook Margin
|
|
2
|
+
|
|
3
|
+
This file is a protocol reference for AI and human readers. It is not a runtime registry, not a supported-protocol list, not a live liquidity source, not a route recommendation source, and not a signing-readiness signal.
|
|
4
|
+
|
|
5
|
+
Current product support is declared by `read.get_server_status`, `read.list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note does not expose margin support by itself.
|
|
6
|
+
|
|
7
|
+
DeepBook Margin is treated as mainnet protocol notes for Say Ur Intent.
|
|
8
|
+
|
|
9
|
+
This note covers these protocol topics only:
|
|
10
|
+
|
|
11
|
+
- Protocol notes only.
|
|
12
|
+
- No MCP read tools expose margin pool, collateral, borrow, liquidation, or interest data in this release.
|
|
13
|
+
- No signable margin action.
|
|
14
|
+
|
|
15
|
+
Signable margin review requires a separate adapter and explicit deterministic checks for liquidation and borrow risk.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DeepBookV3
|
|
2
|
+
|
|
3
|
+
This file is a protocol reference for AI and human readers. It is not a runtime registry, not a supported-protocol list, not a live liquidity source, not a route recommendation source, and not a signing-readiness signal.
|
|
4
|
+
|
|
5
|
+
Current product support is declared by `read.get_server_status`, `read.list_supported_protocols`, concrete MCP tool schemas, and concrete MCP tool responses. This note only explains DeepBookV3 protocol concepts that those runtime surfaces may reference.
|
|
6
|
+
|
|
7
|
+
DeepBookV3 is the first protocol domain for Say Ur Intent.
|
|
8
|
+
|
|
9
|
+
Protocol concepts referenced by current runtime evidence include:
|
|
10
|
+
|
|
11
|
+
- Mainnet package and pool metadata through the pinned `@mysten/deepbook-v3` SDK constants.
|
|
12
|
+
- Read-only protocol and pool listing.
|
|
13
|
+
- Read-only orderbook context through pinned DeepBook SDK simulation reads.
|
|
14
|
+
- Read-only raw-quantity and display-amount quotes through pinned DeepBook SDK simulation reads.
|
|
15
|
+
|
|
16
|
+
DeepBook orderbook, raw-quantity quote, and display-amount quote reads use an internal SDK simulation sender placeholder. They do not require wallet connection because these market reads are not wallet-account reads.
|
|
17
|
+
|
|
18
|
+
Not yet implemented:
|
|
19
|
+
|
|
20
|
+
- Signable swap review.
|
|
21
|
+
- Limit or market order review.
|
|
22
|
+
- Wallet signing or execution.
|
|
23
|
+
|
|
24
|
+
No DeepBook transaction should be exposed as signable until registry validation, live quote refresh, object resolution, and `client.core.simulateTransaction` review are implemented.
|