@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Stelis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
# Say Ur Intent
|
|
2
|
+
|
|
3
|
+
Say Ur Intent is a local-first, evidence-first Sui intent toolkit for AI clients.
|
|
4
|
+
|
|
5
|
+
For natural-language Sui DeFi questions, the current release returns verified,
|
|
6
|
+
AI-readable evidence before transaction creation. That answer path remains
|
|
7
|
+
separate from account-bound DeepBook review, where the review server builds
|
|
8
|
+
local unsigned transaction material internally and, once every review evidence
|
|
9
|
+
stage completes, the local review page offers a digest-gated handoff,
|
|
10
|
+
user-controlled wallet signing, and execution-receipt recording. The MCP layer
|
|
11
|
+
and review API never sign, execute, or return transaction bytes.
|
|
12
|
+
|
|
13
|
+
Users can ask ordinary questions:
|
|
14
|
+
|
|
15
|
+
- "Can I cover a 1000 dollar payment with my assets?"
|
|
16
|
+
- "How much are my USD-denominated assets together?"
|
|
17
|
+
- "What is the shortfall?"
|
|
18
|
+
|
|
19
|
+
The broader product direction does not stop at pre-execution review. From
|
|
20
|
+
verified evidence, Say Ur Intent aims to carry an AI client's or MCP server's Sui
|
|
21
|
+
payment or action request through a human-readable local review and on to
|
|
22
|
+
user-controlled wallet signing and execution receipt evidence — only after Say Ur
|
|
23
|
+
Intent independently builds or verifies the transaction material. The three
|
|
24
|
+
layers below state what is implemented today, what is deliberately sequenced
|
|
25
|
+
next, and what stays permanently out of scope. For any
|
|
26
|
+
such request, Say Ur Intent explains what current verified evidence supports, what
|
|
27
|
+
choices remain with the user, and what claims are unsupported.
|
|
28
|
+
|
|
29
|
+
## Product Direction in Three Layers
|
|
30
|
+
|
|
31
|
+
Say Ur Intent is one product, but it must be read at three distinct layers. Do not collapse them:
|
|
32
|
+
|
|
33
|
+
- **Implemented today:** Sui mainnet evidence, local review, and the first signable review adapter for the DeepBook swap route. The account-bound DeepBook swap review builds unsigned transaction material into a local in-process material store, internally binds a Sui transaction digest to that stored material, derives object ownership, quote/policy provenance, human-readable review facts, and review-time simulation evidence from the same private review artifacts, emits a schema-validated wallet review contract with a PTB visualization on a `ready_for_wallet_review` state, and serves a digest-gated byte handoff to the same-machine review page for user-controlled wallet signing with execution receipts recorded on the session. MCP responses do not contain transaction bytes, signing data, or signing readiness.
|
|
34
|
+
- **Deliberately sequenced next (planned order, ships only after verified review):** server-side receipt verification against chain state, additional protocol adapters registered through the descriptor contract (protocol names appear only after a concrete support decision), and richer local analysis views. Each step ships only from independently built or verified transaction material with a human-readable local review.
|
|
35
|
+
- **Never (permanently unsupported at every layer):** no private-key custody, no MCP or AI autonomous execution, no forwarding of opaque external transaction bytes to a wallet, no silent settlement-token or route choice, no fiat cash-out, no P&L, no peg guarantee.
|
|
36
|
+
|
|
37
|
+
In one sentence: Say Ur Intent is a local-first Sui intent evidence and review layer that progresses from verified evidence to user-controlled wallet signing only after Say Ur Intent independently builds or verifies the transaction material and shows a human-readable local review.
|
|
38
|
+
|
|
39
|
+
DeepBook is the current Sui source for liquidity and price facts in this release.
|
|
40
|
+
Wallet and Sui balance reads describe held assets. DeepBook provides scoped
|
|
41
|
+
conversion and price evidence. DeepBook does not define the whole product.
|
|
42
|
+
|
|
43
|
+
Say Ur Intent does not custody funds, hold private keys, or autonomously trade
|
|
44
|
+
on behalf of users.
|
|
45
|
+
By current design, it does not rank venues, choose routes, make best-price
|
|
46
|
+
recommendations, or silently choose settlement tokens for users.
|
|
47
|
+
|
|
48
|
+
The current release can build local unsigned transaction material only inside the
|
|
49
|
+
account-bound DeepBook swap review path. It does not expose transaction bytes.
|
|
50
|
+
Wallet signing is user-controlled on the local review page after a
|
|
51
|
+
digest-gated handoff; MCP responses never request signatures, provide signing
|
|
52
|
+
readiness, or execute payments.
|
|
53
|
+
|
|
54
|
+
Current review sessions are local evidence-review records only. DeepBook review
|
|
55
|
+
state may show that local transaction material was built, internally bound to a
|
|
56
|
+
Sui transaction digest, and used to derive object ownership, quote/policy
|
|
57
|
+
provenance, human-readable review facts, and review-time simulation evidence.
|
|
58
|
+
Review sessions do not contain
|
|
59
|
+
public transaction bytes, signing requests, or executable wallet actions.
|
|
60
|
+
|
|
61
|
+
The current release flow is:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
The user states an intent in natural language.
|
|
65
|
+
Say Ur Intent resolves the supported Sui mainnet evidence surface.
|
|
66
|
+
The AI answers only from returned evidence and boundaries.
|
|
67
|
+
DeepBook transaction material build is an account-bound review step, not part of
|
|
68
|
+
the natural-language intent evidence answer.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The current release implements intent evidence for supported Sui mainnet reads.
|
|
72
|
+
It can also create a read-only, non-signable local review session from a
|
|
73
|
+
structured external payment or Sui action proposal. External proposal ingestion
|
|
74
|
+
does not trust external transaction material or send anything for wallet signing.
|
|
75
|
+
|
|
76
|
+
Key terms used below:
|
|
77
|
+
|
|
78
|
+
- Sui: the mainnet blockchain whose DeFi state this project reads.
|
|
79
|
+
- MCP: Model Context Protocol, the tool-calling interface used by AI clients.
|
|
80
|
+
- DeepBook: Sui's onchain order book protocol.
|
|
81
|
+
- SDK: Software Development Kit, a version-pinned library dependency used by this repository.
|
|
82
|
+
- gRPC and GraphQL: Sui SDK transports used by this runtime for mainnet reads.
|
|
83
|
+
- dApp Kit: Sui's wallet connection library for web apps.
|
|
84
|
+
- stdio: standard input/output, the local transport used by MCP clients to talk to this server.
|
|
85
|
+
- Stelis: the GitHub and npm namespace for this package. Say Ur Intent is the product and runtime name.
|
|
86
|
+
|
|
87
|
+
For setup, see [docs/MCP_SETUP.md](docs/MCP_SETUP.md).
|
|
88
|
+
For the MCP API reference, see [docs/MCP_TOOLS.md](docs/MCP_TOOLS.md).
|
|
89
|
+
For the AI-client answer playbook, see [docs/AGENT_BEHAVIOR.md](docs/AGENT_BEHAVIOR.md).
|
|
90
|
+
For manual maintainer and developer utilities, see [docs/UTILITY_INDEX.md](docs/UTILITY_INDEX.md).
|
|
91
|
+
|
|
92
|
+
User-question flows for USD-denominated coverage, balance totals, and shortfall answers live in [docs/AGENT_BEHAVIOR.md](docs/AGENT_BEHAVIOR.md). The response fields for those answers live in [docs/MCP_TOOLS.md](docs/MCP_TOOLS.md).
|
|
93
|
+
|
|
94
|
+
## How Product Quality Improves: Three Axes
|
|
95
|
+
|
|
96
|
+
Future quality work moves along three axes. They multiply rather than add,
|
|
97
|
+
so neglecting any one of them caps the value of the other two:
|
|
98
|
+
|
|
99
|
+
- **Axis 1 - intent, evidence, answer quality.** Understanding what the user
|
|
100
|
+
asked, routing it to the right tool (prompt surfaces, `userAnswerUse`
|
|
101
|
+
response guidance), and answering only from verified mainnet evidence -
|
|
102
|
+
including saying plainly when a question cannot be answered from the
|
|
103
|
+
returned evidence. This axis is never finished; it is sharpened
|
|
104
|
+
continuously.
|
|
105
|
+
- **Axis 2 - protocol breadth.** Additional protocol adapters registered
|
|
106
|
+
through the descriptor contract (protocol names appear only after a
|
|
107
|
+
concrete support decision). Breadth is a multiplier, not a list: with a
|
|
108
|
+
second protocol, action routing starts doing real work (the bare action
|
|
109
|
+
prompt asks the user to choose a venue instead of routing silently), and
|
|
110
|
+
the execution-trust foundation proves it is not single-protocol.
|
|
111
|
+
- **Axis 3 - execution-trust foundation.** The guarantee that what the user
|
|
112
|
+
reviewed is exactly what gets signed, held under any wallet and any signing
|
|
113
|
+
speed: the review-session state machine, the one-transaction-per-session
|
|
114
|
+
handoff lock, sign-only wallets and slow hardware signers, review-page
|
|
115
|
+
security headers, and runtime lifecycle stability. Packaging and runtime
|
|
116
|
+
operability belong here too. This axis is the product differentiator, so
|
|
117
|
+
it is tracked as its own axis rather than as a side effect of feature work.
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
axis 1 (intent-evidence quality) --+
|
|
121
|
+
+--x axis 2 (protocol breadth) = product value
|
|
122
|
+
axis 3 (execution-trust base) --+
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Work that advances several axes at once - for example, a new adapter that
|
|
126
|
+
forces the intent entry point to generalize and re-proves the trust pipeline
|
|
127
|
+
on a second protocol - is preferred over work that advances one axis in
|
|
128
|
+
isolation.
|
|
129
|
+
|
|
130
|
+
## What Works Today
|
|
131
|
+
|
|
132
|
+
The current release can run as a local stdio MCP server and expose mainnet Sui DeFi evidence:
|
|
133
|
+
|
|
134
|
+
- wallet balances with verified display units;
|
|
135
|
+
- coin-balance classification;
|
|
136
|
+
- USD-denominated settlement asset groups derived from pinned DeepBook SDK registry metadata;
|
|
137
|
+
- intent evidence with response summaries for natural-language USD-denominated payment coverage, balance-total, and shortfall questions;
|
|
138
|
+
- DeepBook pools, tokens, mid price, orderbook context, raw quotes, display-amount quotes, and account inventory;
|
|
139
|
+
- user-requested bounded Sui transaction digest lookup, account activity scans, sent-function activity scans with known-wallet-only persistence, and stored normalized activity summaries;
|
|
140
|
+
- read-only external proposal review sessions that display proposed action, asset flow, recipient or target, freshness, missing evidence, user choices, unsupported claims, and non-signable reason;
|
|
141
|
+
- local Say Ur Intent review evidence and review-session status reads;
|
|
142
|
+
- account-bound DeepBook swap review progress through local unsigned transaction material build, internal Sui transaction digest binding, object ownership evidence, quote/policy provenance binding, human-readable review facts, and review-time simulation evidence; when every stage completes the review reaches `ready_for_wallet_review` and the local review page offers a digest-gated byte handoff, user-controlled wallet signing, and execution-receipt recording. The MCP layer and review API never sign, execute, or return transaction bytes.
|
|
143
|
+
|
|
144
|
+
It also includes:
|
|
145
|
+
|
|
146
|
+
- a local review server bound to `127.0.0.1`;
|
|
147
|
+
- a local SQLite store for active account read context and review evidence;
|
|
148
|
+
- MCP output checks that reject forbidden executable, signing, token, seed, and
|
|
149
|
+
key-material field names from responses.
|
|
150
|
+
|
|
151
|
+
## Current Limits
|
|
152
|
+
|
|
153
|
+
### Not Implemented Yet (Deliberately Sequenced)
|
|
154
|
+
|
|
155
|
+
The items in this section are deliberately sequenced roadmap steps, not product
|
|
156
|
+
refusals. Server-side receipt verification against chain state is not
|
|
157
|
+
implemented yet. The full analysis page is not implemented yet. Transaction
|
|
158
|
+
material build, contract emit, digest-gated wallet handoff, and user-controlled
|
|
159
|
+
signing are implemented for the account-bound DeepBook swap review, which
|
|
160
|
+
resolves its protocol through a plan-factory registry so further swap adapters
|
|
161
|
+
attach the same way. External proposal execution is not implemented.
|
|
162
|
+
|
|
163
|
+
External proposal ingestion is implemented only for read-only local review
|
|
164
|
+
sessions. It accepts structured proposal facts, rejects forbidden executable or
|
|
165
|
+
signing fields, recognized Sui private-key strings, valid English BIP39
|
|
166
|
+
mnemonic phrases, obvious sensitive markers, and suspicious raw secret-like
|
|
167
|
+
payloads before storage, and records why the review is non-signable.
|
|
168
|
+
|
|
169
|
+
Blocked signing is session-scoped: a review session stays blocked while
|
|
170
|
+
required review evidence is missing for that session (for example
|
|
171
|
+
`wallet_review_contract_emit_missing`). When account-bound DeepBook swap
|
|
172
|
+
review completes local transaction material, digest binding, object ownership,
|
|
173
|
+
quote/policy provenance, human-readable review evidence, and review-time
|
|
174
|
+
simulation evidence, the review layer emits a schema-validated
|
|
175
|
+
`WalletReviewAdapterContract` bound to the same transaction commitment on a
|
|
176
|
+
`ready_for_wallet_review` state. Wallet handoff is gated on a recomputed
|
|
177
|
+
digest matching that commitment, and the review page then offers
|
|
178
|
+
user-controlled wallet signing with the execution receipt recorded on the
|
|
179
|
+
session. Review-time simulation and the emitted contract are evidence about
|
|
180
|
+
stored local material only; they are not signing readiness, wallet readiness,
|
|
181
|
+
or execution readiness. They are not a user bypass state.
|
|
182
|
+
|
|
183
|
+
The signable adapter and PTB visualization boundary is documented in
|
|
184
|
+
`docs/SIGNABLE_ADAPTER_CONTRACT.md`. The runtime path emits
|
|
185
|
+
`WalletReviewAdapterContract` as pre-signing review evidence when every
|
|
186
|
+
required evidence stage is complete; the contract carries the transaction
|
|
187
|
+
commitment hash only.
|
|
188
|
+
The runtime path does not make wallet signing available.
|
|
189
|
+
It does not make wallet handoff available.
|
|
190
|
+
It does not make payment execution available.
|
|
191
|
+
It does not make executable transaction material available.
|
|
192
|
+
It does not make signing readiness available.
|
|
193
|
+
|
|
194
|
+
Fiat cash-out, P&L, tax, and cost-basis support are not part of the current release.
|
|
195
|
+
|
|
196
|
+
### Permanent Safety and Correctness Boundaries
|
|
197
|
+
|
|
198
|
+
These are product boundaries and must not be relaxed by ordinary feature work:
|
|
199
|
+
|
|
200
|
+
- Say Ur Intent does not custody funds, hold private keys, or autonomously trade.
|
|
201
|
+
- It does not treat USDC, USDT, or any USD-denominated settlement asset as fiat
|
|
202
|
+
USD, a bank cash-out amount, or a USDC/USD peg guarantee.
|
|
203
|
+
- It does not turn quote-only conversion candidates into payment coverage, shortfall evidence, funding readiness, payment execution readiness, or signing readiness.
|
|
204
|
+
|
|
205
|
+
### Out of Scope by Current Design
|
|
206
|
+
|
|
207
|
+
These product behaviors are out of scope in the current release by design:
|
|
208
|
+
|
|
209
|
+
- It does not silently choose USDC, USDT, or another settlement token for a
|
|
210
|
+
user. It can report supported settlement asset groups and can use a settlement
|
|
211
|
+
token only when the user selected it explicitly.
|
|
212
|
+
- It does not rank venues, choose routes, or make best-price recommendations.
|
|
213
|
+
|
|
214
|
+
### Quote Response Limits
|
|
215
|
+
|
|
216
|
+
Quote tools such as `read.quote_deepbook_action` and
|
|
217
|
+
`read.quote_deepbook_display_amount` return scoped quote facts and raw quote
|
|
218
|
+
evidence only.
|
|
219
|
+
|
|
220
|
+
Their semantics mark quote output as price evidence, not payment coverage or shortfall evidence. Coverage and shortfall answers come from `read.preview_intent_evidence.responseSummary`.
|
|
221
|
+
|
|
222
|
+
For quote responses alone, these conclusions are unsupported:
|
|
223
|
+
|
|
224
|
+
- payment coverage is not available;
|
|
225
|
+
- shortfall contribution is not available;
|
|
226
|
+
- route-dependent payment support is not available;
|
|
227
|
+
- final min-out values are not available;
|
|
228
|
+
- route recommendations are not available;
|
|
229
|
+
- venue comparisons are not available;
|
|
230
|
+
- effective-price claims are not available;
|
|
231
|
+
- price-impact calculations are not available;
|
|
232
|
+
- quote-vs-mid slippage is not available;
|
|
233
|
+
- fiat cash-out estimates are not available;
|
|
234
|
+
- external market lookups are not available;
|
|
235
|
+
- USDC/USD peg assumptions are not available;
|
|
236
|
+
- P&L is not available;
|
|
237
|
+
- cost basis is not available;
|
|
238
|
+
- actionable signing data is not available.
|
|
239
|
+
|
|
240
|
+
## Developer Checkout Quickstart
|
|
241
|
+
|
|
242
|
+
This package targets Node.js 22+. Node 22 or 24 LTS is recommended.
|
|
243
|
+
|
|
244
|
+
Use this path when you download the repository from GitHub and want to test the local build in an MCP client:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
git clone https://github.com/stelis-dev/say-ur-intent.git
|
|
248
|
+
cd say-ur-intent
|
|
249
|
+
npm install
|
|
250
|
+
npm run build
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
No Sui endpoint setup is required for the default path. For MCP stdio configuration from a local checkout, point the client at the built runtime:
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"command": "node",
|
|
258
|
+
"args": ["/absolute/path/to/say-ur-intent/dist/runtime/start.js"]
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Do not wrap the stdio server in a shell command that writes ordinary text to stdout. Stdout is reserved for MCP JSON-RPC messages; logs go to stderr.
|
|
263
|
+
|
|
264
|
+
Client-specific setup for Claude Code, Claude Desktop, Codex, and Cursor lives in [docs/MCP_SETUP.md](docs/MCP_SETUP.md). That file is the canonical setup guide; this README keeps only the short path.
|
|
265
|
+
|
|
266
|
+
To delegate local setup to an AI coding agent, tell it:
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
Register this repository as a local stdio MCP server using the built /absolute/path/to/say-ur-intent/dist/runtime/start.js file.
|
|
270
|
+
Use the default Sui mainnet endpoint unless I explicitly ask for a custom provider.
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
After the MCP server is connected, use [docs/MCP_SETUP.md](docs/MCP_SETUP.md#first-use-flow) for first-use setup, [docs/MCP_TOOLS.md](docs/MCP_TOOLS.md) for API fields and statuses, and [docs/AGENT_BEHAVIOR.md](docs/AGENT_BEHAVIOR.md) for user-question flow and response wording.
|
|
274
|
+
|
|
275
|
+
## Mainnet-Only Product Surface
|
|
276
|
+
|
|
277
|
+
Product docs, registry, AI responses, UX copy, and signable actions are mainnet-only.
|
|
278
|
+
|
|
279
|
+
Unsupported protocol experiments are not product functionality and are not included in the package docs, MCP resources, registry support lists, UX copy, or signable-action lists.
|
|
280
|
+
|
|
281
|
+
## Commands
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
npm install
|
|
285
|
+
npm run typecheck
|
|
286
|
+
npm run build
|
|
287
|
+
npm test
|
|
288
|
+
npm run release:check
|
|
289
|
+
npm run generate:deepbook-registry
|
|
290
|
+
npm run smoke:mainnet
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
`npm run generate:deepbook-registry` writes `registry/generated/deepbook-mainnet.json`, which is ignored by Git because generated registry data must include provenance and should be regenerated from the pinned SDK.
|
|
294
|
+
|
|
295
|
+
## MCP Tools
|
|
296
|
+
|
|
297
|
+
The canonical MCP API reference lives in [docs/MCP_TOOLS.md](docs/MCP_TOOLS.md).
|
|
298
|
+
|
|
299
|
+
The server also exposes `read.get_server_status`. It returns the package version, evidence policy version, `implementedToolsCount`, and implemented tool list at runtime.
|
|
300
|
+
|
|
301
|
+
DeepBook pool-price context is exposed through `read.get_deepbook_mid_price`. Use `docs/MCP_TOOLS.md` for the response fields and unsupported conclusions.
|
|
302
|
+
|
|
303
|
+
Tool names use dot prefixes because the MCP spec recommends ASCII letters, digits, underscore, hyphen, and dot for tool names. `action.prepare_sui_action_review` returns a `reviewSessionId` and `reviewUrl`; it does not return executable transaction bytes.
|
|
304
|
+
|
|
305
|
+
## Documentation Map
|
|
306
|
+
|
|
307
|
+
The server exposes only a subset of repository documents as MCP resources.
|
|
308
|
+
|
|
309
|
+
Runtime-facing MCP resources currently include:
|
|
310
|
+
|
|
311
|
+
- this README;
|
|
312
|
+
- `docs/MCP_SETUP.md`;
|
|
313
|
+
- `docs/MCP_TOOLS.md`;
|
|
314
|
+
- `docs/WALLET_IDENTITY.md`;
|
|
315
|
+
- `docs/AGENT_BEHAVIOR.md`;
|
|
316
|
+
- `protocols/deepbook-v3.md`;
|
|
317
|
+
- `protocols/deepbook-margin.md`.
|
|
318
|
+
|
|
319
|
+
Protocol resources are explanatory references. Current support is declared by `read.get_server_status`, `read.list_supported_protocols`, concrete tool schemas, and concrete tool responses, not by protocol Markdown alone.
|
|
320
|
+
|
|
321
|
+
Development-only or release-review documents can define contributor rules and checks.
|
|
322
|
+
|
|
323
|
+
AI client answer behavior must be mirrored in runtime-facing instructions, resources, prompts, schemas, or returned evidence fields before it is treated as product behavior.
|
|
324
|
+
|
|
325
|
+
- `README.md`: Public entry document: product purpose, current release boundary, setup path, and documentation map.
|
|
326
|
+
- `docs/MCP_SETUP.md`: Setup guide: installation, MCP client connection, first-use flow, settings, and troubleshooting.
|
|
327
|
+
- `docs/MCP_TOOLS.md`: API reference: tool contracts, response fields, statuses, follow-up fields, and output boundaries.
|
|
328
|
+
- `docs/AGENT_BEHAVIOR.md`: Answer playbook: user-question flows, tool selection, and response wording boundaries.
|
|
329
|
+
- `docs/WALLET_IDENTITY.md`: Wallet identity reference: active-account read context and same-machine capture boundaries.
|
|
330
|
+
- `protocols/deepbook-v3.md`: Protocol reference only; use MCP tool responses and read.list_supported_protocols for current support.
|
|
331
|
+
- `protocols/deepbook-margin.md`: Protocol reference only; no margin MCP read tools or signable actions are exposed in this release.
|
|
332
|
+
- `docs/golden-scenarios/INTENT_EVIDENCE_MATRIX.md`: current-release question, tool-path, and standard-answer matrix for AI client release review.
|
|
333
|
+
- `docs/golden-scenarios/BEHAVIOR_MATRIX.md`: broader behavior scenario matrix for supported and unsupported user prompts.
|
|
334
|
+
- `docs/TRANSACTION_ACTIVITY_LOG.md`: transaction activity evidence, storage, scan, and summary boundaries.
|
|
335
|
+
- `docs/UTILITY_INDEX.md`: manual maintainer and developer utilities. Utility rows are not MCP tools unless they explicitly name an MCP tool, and source-checkout scripts are not packaged product commands.
|
|
336
|
+
- `docs/LOCAL_DB_ARCHITECTURE.md`: local SQLite storage boundaries for maintainers.
|
|
337
|
+
- `docs/SDK_API.md`: pinned SDK API notes and source-verification boundaries.
|
|
338
|
+
- `docs/FRONTEND_POLICY.md`: review-app frontend implementation policy for coding agents.
|
|
339
|
+
- `docs/SIGNABLE_ADAPTER_CONTRACT.md`: wallet-review adapter and PTB visualization contract. The review layer emits the contract and a PTB visualization as pre-signing review evidence; not signing support.
|
|
340
|
+
- `AGENTS.md`: root repository development contract and non-negotiable product boundaries for coding agents working on this codebase.
|
|
341
|
+
- `docs/AGENT_DEVELOPMENT_POLICY.md`: detailed binding development, review, documentation, source-of-truth, and completion policies for coding agents.
|
|
342
|
+
|
|
343
|
+
## For Maintainers
|
|
344
|
+
|
|
345
|
+
This section is for people operating releases, running smoke checks, changing runtime storage, or debugging startup. Normal users and MCP client users can stop at the documentation map above.
|
|
346
|
+
|
|
347
|
+
### Mainnet Read Smoke
|
|
348
|
+
|
|
349
|
+
Normal quickstart use does not require Sui endpoint setup. The smoke script is a manual maintainer check for a specific mainnet provider:
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
export SUI_GRPC_URL="https://fullnode.mainnet.sui.io:443"
|
|
353
|
+
export SUI_GRAPHQL_URL="https://graphql.mainnet.sui.io/graphql" # optional override; default is the built-in mainnet GraphQL endpoint
|
|
354
|
+
export SMOKE_SUI_ADDRESS="0x..."
|
|
355
|
+
export SMOKE_DEEPBOOK_POOL_KEY="DEEP_SUI"
|
|
356
|
+
export SMOKE_QUOTE_AMOUNT="1000000000" # raw integer units; for SUI, 1000000000 = 1 SUI
|
|
357
|
+
# Optional: export SMOKE_INSPECT_DIGEST="..."
|
|
358
|
+
# Optional: export SMOKE_INSPECT_RANDOM_LATEST="true"
|
|
359
|
+
npm run build
|
|
360
|
+
npm run smoke:mainnet
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
`SUI_GRPC_URL` must be only scheme, host, and explicit port. Do not include credentials, a path, query string, or fragment.
|
|
364
|
+
`SMOKE_SUI_ADDRESS` must be a 32-byte hex Sui address, for example `0x` followed by 64 hex characters.
|
|
365
|
+
`SMOKE_INSPECT_DIGEST` is optional. Use a digest whose sender or returned balance-change owner is `SMOKE_SUI_ADDRESS` to exercise the stored digest-lookup path; otherwise the lookup can still return `ok` with `persistence.stored: false`.
|
|
366
|
+
`SMOKE_INSPECT_RANDOM_LATEST=true` is optional and only used when `SMOKE_INSPECT_DIGEST` is unset.
|
|
367
|
+
|
|
368
|
+
It samples one digest from the latest GraphQL transaction page and calls `read.inspect_sui_transaction` without passing the smoke address.
|
|
369
|
+
|
|
370
|
+
This checks current transaction-read shape without pinning a specific user address or exercising the stored relation path.
|
|
371
|
+
|
|
372
|
+
The smoke script currently calls:
|
|
373
|
+
|
|
374
|
+
- wallet assets;
|
|
375
|
+
- DeepBook orderbook;
|
|
376
|
+
- raw-quantity quote;
|
|
377
|
+
- `read.scan_sui_account_activity` for `SMOKE_SUI_ADDRESS` with limit 5;
|
|
378
|
+
- `read.summarize_sui_activity_scan` through active account context with limit 5.
|
|
379
|
+
|
|
380
|
+
If `SMOKE_FUNCTION_TARGET` is set to a full `package::module::function`, it also calls `read.scan_sui_function_activity` and `read.summarize_sui_function_activity_scan` with limit 5.
|
|
381
|
+
|
|
382
|
+
If unset, function activity smoke is recorded as not run with `notRunReason: "missing_env"`.
|
|
383
|
+
|
|
384
|
+
Empty activity pages are valid smoke outcomes. They are recorded with `rowCount: 0` and `emptyAccepted: true`.
|
|
385
|
+
|
|
386
|
+
If `SMOKE_INSPECT_DIGEST` is set, the script also calls `read.inspect_sui_transaction` for that digest and the smoke address.
|
|
387
|
+
|
|
388
|
+
DeepBook orderbook and raw-quantity quote reads use an internal mainnet SDK simulation sender placeholder, not a user's wallet. The display-amount quote path is covered by automated tests, not by this smoke script. This smoke script does not exercise account-bound DeepBook transaction-material build or digest binding; that path needs a separate funded-account material-build smoke before smoke results are treated as product-grade proof for that review stage.
|
|
389
|
+
|
|
390
|
+
Wallet asset summaries and active-account activity summaries use the smoke address through a wallet identity session created by the smoke script. Browser wallet behavior is checked separately.
|
|
391
|
+
|
|
392
|
+
Smoke result files record activity status, row count, source, window/order flags, persistence, and evidence summary only. They do not record raw GraphQL payloads, transaction bytes, signatures, raw transaction details, or compact transaction aggregates.
|
|
393
|
+
|
|
394
|
+
### Runtime Boundary
|
|
395
|
+
|
|
396
|
+
The runtime starts these local components:
|
|
397
|
+
|
|
398
|
+
- a local SQLite store;
|
|
399
|
+
- a mainnet guard for the configured Sui gRPC endpoint;
|
|
400
|
+
- the local review HTTP server on `127.0.0.1`;
|
|
401
|
+
- the stdio MCP transport.
|
|
402
|
+
|
|
403
|
+
The GraphQL endpoint is also mainnet-guarded when it is saved through settings, imported from a local-data backup, or first used by Sui activity tools.
|
|
404
|
+
|
|
405
|
+
Stdout is reserved for MCP JSON-RPC messages. Logs go to stderr.
|
|
406
|
+
|
|
407
|
+
### Local Data
|
|
408
|
+
|
|
409
|
+
The runtime creates a local SQLite file for account read context and Say Ur Intent review activity evidence. Users do not install a database server separately.
|
|
410
|
+
|
|
411
|
+
Override the app data directory only when needed:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
export SAY_UR_INTENT_DATA_DIR="/path/to/local/app-data"
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
The stored active account is for reading wallet state only. It does not let the toolkit sign transactions on your behalf.
|
|
418
|
+
|
|
419
|
+
User-requested bounded transaction scans can store normalized facts only when a transaction is related to a known local wallet. This product does not run a background or complete wallet history indexer.
|
|
420
|
+
|
|
421
|
+
The default Sui mainnet gRPC and GraphQL endpoints are stored in the local SQLite settings table on first run.
|
|
422
|
+
|
|
423
|
+
To inspect settings or change local data, ask your AI client to create a Say Ur Intent local settings session and open the returned settings URL in the same machine's system browser.
|
|
424
|
+
|
|
425
|
+
Endpoint changes apply after the MCP server restarts.
|