@stelis/say-ur-intent 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,27 @@
1
1
  # Say Ur Intent
2
2
 
3
- Say Ur Intent is a local-first, evidence-first Sui intent toolkit for AI clients.
3
+ Say Ur Intent is a local-first Sui review and evidence layer for AI clients.
4
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
5
+ It turns a supported AI-requested Sui action into a local review page where the
6
+ user reads the transaction summary, inspects the transaction (PTB) as a graph,
7
+ and signs in their own wallet. The AI client never receives signing authority or
8
+ executable transaction bytes.
9
+
10
+ ![Say Ur Intent local review page](https://raw.githubusercontent.com/stelis-dev/say-ur-intent/main/assets/review-page.png)
11
+
12
+ *The local review page: deterministic review checks, review-time simulation
13
+ evidence, and the transaction shown as a labeled PTB graph — what the user
14
+ reviews before signing in their own wallet.*
15
+
16
+ For natural-language Sui DeFi questions, the current release also returns
17
+ verified, AI-readable evidence before any transaction is built. That answer path
18
+ stays separate from account-bound swap review, where the review server builds
8
19
  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.
20
+ stage completes, the local review page offers a digest-gated byte handoff,
21
+ user-controlled wallet signing, and execution-receipt recording. MCP responses
22
+ never sign, execute, or return transaction bytes; the only transaction-byte path
23
+ is the same-machine, digest-gated wallet handoff initiated from the local review
24
+ page.
12
25
 
13
26
  Users can ask ordinary questions:
14
27
 
@@ -36,17 +49,19 @@ Say Ur Intent is one product, but it must be read at three distinct layers. Do n
36
49
 
37
50
  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
51
 
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.
52
+ DeepBook and FlowX are the current Sui liquidity and price sources in this
53
+ release: DeepBook provides scoped conversion, price, and orderbook evidence, and
54
+ FlowX provides indicative CLMM route quotes. Wallet and Sui balance reads
55
+ describe held assets. They do not define the whole product.
42
56
 
43
57
  Say Ur Intent does not custody funds, hold private keys, or autonomously trade
44
58
  on behalf of users.
45
59
  By current design, it does not rank venues, choose routes, make best-price
46
60
  recommendations, or silently choose settlement tokens for users.
47
61
 
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.
62
+ The current release can build local unsigned transaction material inside the
63
+ account-bound DeepBook and FlowX swap review paths. It does not expose
64
+ transaction bytes.
50
65
  Wallet signing is user-controlled on the local review page after a
51
66
  digest-gated handoff; MCP responses never request signatures, provide signing
52
67
  readiness, or execute payments.
@@ -64,8 +79,8 @@ The current release flow is:
64
79
  The user states an intent in natural language.
65
80
  Say Ur Intent resolves the supported Sui mainnet evidence surface.
66
81
  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.
82
+ Supported swap transaction material build is an account-bound review step, not
83
+ part of the natural-language intent evidence answer.
69
84
  ```
70
85
 
71
86
  The current release implements intent evidence for supported Sui mainnet reads.
@@ -104,7 +119,7 @@ The current release can run as a local stdio MCP server and expose mainnet Sui D
104
119
  - user-requested bounded Sui transaction digest lookup, account activity scans, sent-function activity scans with known-wallet-only persistence, and stored normalized activity summaries;
105
120
  - 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;
106
121
  - local Say Ur Intent review evidence and review-session status reads;
107
- - account-bound DeepBook and FlowX 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.
122
+ - account-bound DeepBook and FlowX 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. MCP responses never sign, execute, or return transaction bytes; transaction bytes flow only through the same-machine, digest-gated wallet handoff initiated from the local review page.
108
123
 
109
124
  It also includes:
110
125
 
@@ -131,7 +146,7 @@ payloads before storage, and records why the review is non-signable.
131
146
 
132
147
  Blocked signing is session-scoped: a review session stays blocked while
133
148
  required review evidence is missing for that session (for example
134
- `wallet_review_contract_emit_missing`). When account-bound DeepBook swap
149
+ `wallet_review_contract_emit_missing`). When an account-bound supported swap
135
150
  review completes local transaction material, digest binding, object ownership,
136
151
  quote/policy provenance, human-readable review evidence, and review-time
137
152
  simulation evidence, the review layer emits a schema-validated
@@ -148,11 +163,11 @@ The signable adapter and PTB visualization boundary is documented in
148
163
  `WalletReviewAdapterContract` as pre-signing review evidence when every
149
164
  required evidence stage is complete; the contract carries the transaction
150
165
  commitment hash only.
151
- The runtime path does not make wallet signing available.
152
- It does not make wallet handoff available.
153
- It does not make payment execution available.
154
- It does not make executable transaction material available.
155
- It does not make signing readiness available.
166
+
167
+ Wallet signing and the digest-gated byte handoff happen only on the local
168
+ review page through the user's own wallet, never through MCP responses. MCP
169
+ responses do not return executable transaction material or signing data, and
170
+ do not provide signing readiness.
156
171
 
157
172
  Fiat cash-out, P&L, tax, and cost-basis support are not part of the current release.
158
173
 
@@ -299,24 +314,33 @@ AI client answer behavior must be mirrored in runtime-facing instructions, resou
299
314
  - `docs/LOCAL_DB_ARCHITECTURE.md`: local SQLite storage boundaries for maintainers.
300
315
  - `docs/SDK_API.md`: pinned SDK API notes and source-verification boundaries.
301
316
  - `docs/FRONTEND_POLICY.md`: review-app frontend implementation policy for coding agents.
302
- - `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.
317
+ - `docs/SIGNABLE_ADAPTER_CONTRACT.md`: wallet-review adapter and PTB visualization contract. It defines the pre-signing review evidence and commitment boundary; wallet signing still happens only through the local review page, not through MCP.
303
318
  - `AGENTS.md`: root repository development contract and non-negotiable product boundaries for coding agents working on this codebase.
304
319
  - `docs/AGENT_DEVELOPMENT_POLICY.md`: detailed binding development, review, documentation, source-of-truth, and completion policies for coding agents.
305
320
 
306
321
  ## Contract Name Registry
307
322
 
308
- The PTB visualization on the review page can show a registered Move Registry
309
- (MVR) package name in place of a raw package address (for example
310
- `@deepbook/core`), with a toggle back to the raw address and a copyable Mermaid
311
- source that keeps raw addresses. The name is a package identity label only, not a
312
- safety, trust, route-quality, or signing-readiness signal.
323
+ The PTB visualization on the review page can show human-readable labels in place
324
+ of raw addresses, with a toggle back to raw addresses and a copyable Mermaid
325
+ source that always keeps raw addresses. A label is identity display only, not a
326
+ safety, trust, route-quality, or signing-readiness signal, and only registered
327
+ addresses are relabeled.
328
+
329
+ Two pinned, context-aware registries in
330
+ [`src/core/action/contractNameRegistry.ts`](src/core/action/contractNameRegistry.ts)
331
+ drive this:
332
+
333
+ - packages, relabeled only in `<address>::` path position — the DeepBook swap
334
+ package by its Move Registry (MVR) name `@deepbook/core`, and the Sui framework
335
+ packages by their Move aliases (`std`, `sui`, `sui_system`);
336
+ - well-known Sui system objects, relabeled only as a bare object id — `Clock`,
337
+ `SuiSystemState`, `Random`, `DenyList`, `CoinRegistry`, and the address-based
338
+ balance `AccumulatorRoot`.
313
339
 
314
340
  If you maintain a Sui DeFi protocol that has a registered MVR name and want its
315
341
  package to display that name in the review graph, open a pull request adding your
316
- mainnet package address and MVR name to
317
- [`src/core/action/contractNameRegistry.ts`](src/core/action/contractNameRegistry.ts).
318
- Only packages listed in this registry are relabeled; every other package keeps
319
- its raw address.
342
+ mainnet package address and MVR name to the package registry. Every unregistered
343
+ address keeps its raw form.
320
344
 
321
345
  ## For Maintainers
322
346
 
@@ -10,7 +10,7 @@ It is not the contributor rulebook and it is not enforcement. Development rules
10
10
 
11
11
  | Surface | Status | Behavior |
12
12
  | --- | --- | --- |
13
- | Sui mainnet state reads | Current | Use read tools for supported balances, DeepBook pools, token registry metadata, mid-price snapshots, orderbook context, raw-quantity quotes, and DeepBook account inventory. |
13
+ | Sui mainnet state reads | Current | Use read tools for supported balances, DeepBook pools, FlowX pools, token registry metadata, mid-price snapshots, orderbook context, raw-quantity quotes, and DeepBook account inventory. |
14
14
  | DeepBook and FlowX swap review sessions | Digest-gated handoff; user-controlled signing on the review page | A review URL can be created. The review URL displays the proposal and local review evidence. The account-bound review can build local unsigned DeepBook or FlowX swap transaction material inside the review server, internally bind a Sui transaction digest to that stored material, and derive object ownership, quote/policy provenance, human-readable review facts, and review-time simulation evidence from the same private review artifacts. This release does not provide a sign action, signing data, MCP-visible transaction bytes, or signing readiness. The local review page requests a digest-gated byte handoff for a `ready_for_wallet_review` state, then the user signs in their own wallet and the page records the execution receipt. |
15
15
  | External proposal review sessions | Non-signable review in the current release | `action.prepare_external_proposal_review` can create a review URL from a structured external payment or Sui action proposal. Treat the proposal as untrusted display and review context only. It does not build, verify, simulate, sign, or execute transaction material. |
16
16
  | Wallet signing | User-controlled on the local review page | MCP tools do not return signing readiness, signing data, or executable transaction bytes. Signing and execution happen only in the user's wallet from the local review page after the digest-gated handoff; results are recorded as execution receipts keyed by the review session. |
@@ -154,13 +154,13 @@ transaction material. Do not treat it as route selection. Do not treat it as
154
154
  settlement-token selection. Do not treat it as payment execution readiness. Do
155
155
  not treat it as signing data or signing readiness.
156
156
 
157
- After a DeepBook review session is wallet-account bound, `session.get_review_status` can include review-state checks, `reviewState.adapterLifecycle`, `reviewState.humanReadableReview`, and `reviewState.simulation`. The review page renders those fields as local review evidence.
157
+ After a DeepBook or FlowX review session is wallet-account bound, `session.get_review_status` can include review-state checks, `reviewState.adapterLifecycle`, `reviewState.humanReadableReview`, and `reviewState.simulation`. The review page renders those fields as local review evidence.
158
158
 
159
- Use `reviewState.adapterLifecycle.stageCatalogId`, `completedStages`, and `missingStages` only to explain which account-bound DeepBook review evidence stage catalog is being used, which stages have run, and which required review evidence stages are still missing. If `transaction_material_build_or_verify` is completed, say only that the review server built local unsigned transaction material and kept bytes internal. If `digest_commitment` is completed, say only that the review server internally bound a Sui transaction digest to that stored local material. If `object_ownership` is completed, say only that the review server derived object ownership evidence from the stored local material and Sui owner/type reads. If `review_time_simulation` is completed, say only that the review server simulated the stored local unsigned material with checks enabled and exposed a redacted simulation summary. `reviewState.humanReadableReview` is valid only after `human_readable_review` is completed and not missing; `reviewState.simulation` is valid only after `review_time_simulation` is completed and not missing. Do not provide or infer transaction bytes, signing data, signing readiness, or execution readiness from those stages. This lifecycle stops at review-time simulation; the digest-gated byte handoff follows an emitted contract, while wallet signing and execution receipt happen on the local review page under the user's control. Use those checks to explain what the local review layer verified before signing. Do not describe them as wallet readiness, signing readiness, route quality, execution safety, or public transaction bytes. The MCP layer never signs, executes, or returns transaction bytes.
159
+ Use `reviewState.adapterLifecycle.stageCatalogId`, `completedStages`, and `missingStages` only to explain which account-bound DeepBook or FlowX review evidence stage catalog is being used, which stages have run, and which required review evidence stages are still missing. If `transaction_material_build_or_verify` is completed, say only that the review server built local unsigned transaction material and kept bytes internal. If `digest_commitment` is completed, say only that the review server internally bound a Sui transaction digest to that stored local material. If `object_ownership` is completed, say only that the review server derived object ownership evidence from the stored local material and Sui owner/type reads. If `review_time_simulation` is completed, say only that the review server simulated the stored local unsigned material with checks enabled and exposed a redacted simulation summary. `reviewState.humanReadableReview` is valid only after `human_readable_review` is completed and not missing; `reviewState.simulation` is valid only after `review_time_simulation` is completed and not missing. Do not provide or infer transaction bytes, signing data, signing readiness, or execution readiness from those stages. This lifecycle stops at review-time simulation; the digest-gated byte handoff follows an emitted contract, while wallet signing and execution receipt happen on the local review page under the user's control. Use those checks to explain what the local review layer verified before signing. Do not describe them as wallet readiness, signing readiness, route quality, execution safety, or public transaction bytes. The MCP layer never signs, executes, or returns transaction bytes.
160
160
 
161
161
  Use `reviewState.humanReadableReview` only as displayable review facts projected
162
- from verified local review evidence. Its `kind` currently identifies the first
163
- swap review projection. Its `assetFlow` raw amounts, coin types, decimals,
162
+ from verified local review evidence. Its `kind` currently identifies the shared
163
+ DeepBook and FlowX swap review projection. Its `assetFlow` raw amounts, coin types, decimals,
164
164
  minimum output, fee facts, target pool, and direction are derived from the
165
165
  material-bound quote policy evidence, while object ownership is cited only as
166
166
  review evidence from stored transaction material and Sui owner/type reads.
@@ -185,9 +185,10 @@ review-time simulation to one transaction commitment hash. It is not
185
185
  transaction bytes, not signing data, not signing readiness, not wallet
186
186
  handoff, not execution readiness, and not a route recommendation. If the
187
187
  review is blocked on `wallet_review_contract_emit_missing`, say that contract
188
- assembly declined and use the failed
189
- `deepbook_wallet_review_contract_emit_missing` check message for the concrete
190
- reason.
188
+ assembly declined and use the failed adapter-prefixed emit-missing check message
189
+ for the concrete reason: `deepbook_wallet_review_contract_emit_missing` for a
190
+ DeepBook review and `flowx_wallet_review_contract_emit_missing` for a FlowX
191
+ review.
191
192
 
192
193
  If a response includes a `PtbVisualizationArtifact`, answer from its Mermaid
193
194
  text, diagnostics, `generatedAt`, `source`, and `unsupportedUse` fields only
package/docs/MCP_SETUP.md CHANGED
@@ -542,7 +542,13 @@ If the user supplied a specific Sui address for `read.summarize_wallet_assets` o
542
542
 
543
543
  ### NPM command returns 404
544
544
 
545
- The package is not published yet in this repository state. Use Developer Checkout Setup or `npm run release:check` for packed-package testing until publication.
545
+ `@stelis/say-ur-intent` is published to npm, so a 404 is not a "package does not
546
+ exist" state. Treat it as a transient registry/network reachability issue, a
547
+ mistyped package name, or a request for a version that does not exist: confirm
548
+ the spelling, check `npm view @stelis/say-ur-intent version`, retry after any
549
+ registry/proxy outage clears, and ensure no private/alternate npm registry is
550
+ configured. Developer Checkout Setup or `npm run release:check` remains an
551
+ option for testing local changes, not a substitute for an unpublished package.
546
552
 
547
553
  ## Client Snippets
548
554
 
@@ -4,10 +4,10 @@ This document defines the contract boundary for wallet-review adapters.
4
4
  It is a product and implementation contract, not a current feature announcement.
5
5
 
6
6
  The current release can build local unsigned transaction material for the
7
- account-bound DeepBook swap review stage and internally bind a Sui transaction
8
- digest to that stored material. The byte handoff to the same-machine browser
9
- is gated on recomputed-digest equality, and the review page offers
10
- user-controlled wallet signing with execution receipts recorded on the
7
+ account-bound DeepBook swap and FlowX swap review stages and internally bind a
8
+ Sui transaction digest to that stored material. The byte handoff to the
9
+ same-machine browser is gated on recomputed-digest equality, and the review page
10
+ offers user-controlled wallet signing with execution receipts recorded on the
11
11
  session. No MCP tool returns
12
12
  transaction bytes, signing data, signing readiness, executable transaction
13
13
  material, or payment execution readiness.
@@ -18,7 +18,7 @@ The source-level schema for this contract lives in
18
18
  ## Current Status
19
19
 
20
20
  The contract schema is implemented in TypeScript and Zod, and the runtime
21
- DeepBook account-bound swap review emits it. When the account-bound review
21
+ DeepBook and FlowX account-bound swap reviews emit it. When an account-bound review
22
22
  completes every evidence stage (local unsigned transaction material, internal
23
23
  digest commitment, object ownership, quote/policy provenance, human-readable
24
24
  review facts, and review-time simulation), the review layer assembles those
@@ -118,11 +118,12 @@ and it serves the same-machine browser only. After the gate passes, the
118
118
  review page requests the wallet signature; the signature, execution, and
119
119
  receipt stay user-controlled and never flow through the MCP layer.
120
120
 
121
- The current release builds local unsigned DeepBook swap transaction material
122
- inside account-bound review, binds a Sui transaction digest to the stored
123
- material, hands the digest-verified bytes to the same-machine browser, and
124
- lets the user sign and execute in their wallet with the receipt recorded on
125
- the review session. The MCP layer never requests signatures or executes.
121
+ The current release builds local unsigned DeepBook swap and FlowX swap
122
+ transaction material inside account-bound review, binds a Sui transaction digest
123
+ to the stored material, hands the digest-verified bytes to the same-machine
124
+ browser, and lets the user sign and execute in their wallet with the receipt
125
+ recorded on the review session. The MCP layer never requests signatures or
126
+ executes.
126
127
 
127
128
  ## Adapter Contract
128
129
 
@@ -275,6 +276,17 @@ emitted wallet review contract as `reviewState.ptbVisualization`. PTB
275
276
  visualization stays visualization-only evidence: it is not a runtime
276
277
  transaction builder, not wallet handoff, and not a signing-readiness surface.
277
278
 
279
+ The producer emits the Mermaid flowchart as two parallel streams. `mermaid.text`
280
+ keeps raw package addresses for audit and copy. `mermaid.namedText` is a second
281
+ relabeled stream produced by `applyContractNamesToMermaid`
282
+ (`src/core/action/ptbVisualizationProducer.ts`,
283
+ `src/core/action/contractNameRegistry.ts`): it labels registered packages
284
+ (`@deepbook/core`; the Sui framework `std`/`sui`/`sui_system`) and well-known
285
+ objects (`SuiSystemState`, `Clock`, `Random`, `DenyList`, `CoinRegistry`,
286
+ `AccumulatorRoot`) while keeping the raw addresses available. These names are a
287
+ display label, not a safety, ownership, or trust signal, and the on-chain Move
288
+ Registry name is not yet verified on chain.
289
+
278
290
  ## Adapter Registration And Stage Vocabulary
279
291
 
280
292
  Review adapters register through `ReviewAdapterDescriptor` entries in
@@ -50,10 +50,11 @@ truth, shows it in the header, and never connects a wallet itself. For the
50
50
  signing step it relies on dapp-kit autoconnect restoring the signer on the
51
51
  same fixed-port origin where the wallet was connected. That review origin is a
52
52
  single per-machine port (default 8765, overridable per registration with
53
- SAY_UR_INTENT_REVIEW_PORT): when a newer server instance finds the port already
54
- held by a previous Say Ur Intent review server, it stops that previous instance
55
- and takes the port over so the most recently started client owns the one
56
- origin, and a port held by any other process is never taken over. The record is
53
+ SAY_UR_INTENT_REVIEW_PORT): when a second Say Ur Intent instance finds the port
54
+ already held by a healthy Say Ur Intent review peer, it does not stop that peer
55
+ and does not start a port war; it defers to the peer on the shared origin and
56
+ takes the origin over only when that owner exits. A port held by any other
57
+ (non-Say-Ur-Intent) process is never taken over. The record is
57
58
  read context and wallet preference only; it is not signing authorization.
58
59
 
59
60
  ## Status Model
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stelis/say-ur-intent",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "mcpName": "io.github.stelis-dev/say-ur-intent",
5
5
  "description": "Say Ur Intent is a local-first toolkit for helping AI applications and users inspect Sui DeFi actions before execution.",
6
6
  "license": "MIT",