@mysten/docs 0.1.34 → 0.1.35

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.
@@ -4,14 +4,19 @@
4
4
 
5
5
  A validator is an analyzer used for policy checks. Create one with `createAnalyzer(...)`, return the
6
6
  issues it found, and pass it to `createSponsor({ validate })`. It declares the analyzers it reads
7
- through `dependencies` and reports one of three outcomes:
7
+ through `dependencies` and reports these outcomes:
8
8
 
9
9
  - **pass**: `{ result: null }` (or `{ result: [] }`);
10
10
  - **reject**: `{ result: [{ code, message }] }`: the transaction is well-formed but violates policy
11
11
  (`POLICY_REJECTED`);
12
+ - **partial**: `{ result: [{ code, message }], issues: [{ message }] }`: the validator found a
13
+ policy rejection but also hit an analysis issue, so sponsor validation reports both and treats the
14
+ overall reason as `ANALYSIS_FAILED`;
12
15
  - **couldn't analyze**: `{ issues: [{ message }] }` or `throw`: the analyzer itself couldn't decide
13
16
  (a failed lookup, an unreachable service), producing `ANALYSIS_FAILED`. This is the analyzer
14
- framework's own channel, so it propagates, and dependents don't run.
17
+ framework's own channel, so it propagates through strict dependencies. Sponsor validation treats
18
+ each configured validator independently, so one validator's analysis failure doesn't suppress
19
+ policy rejections from other validators.
15
20
 
16
21
  Reporting findings as the `result` (rather than through `issues`) is what keeps "violates policy"
17
22
  distinct from "couldn't be checked". There's no built-in "the sponsor must be paid" rule, because
@@ -44,8 +49,10 @@ expiration), which most validators read. Alongside it: `balanceFlows` (signed va
44
49
  `transactionResponse` (the dry-run, including effects), `commands`, `moveFunctions`, `objects`,
45
50
  `coins`, `inputs`, and `bytes`, plus the sponsor's `currentEpoch`, and any others the analyzer
46
51
  package adds (see [`@mysten/wallet-sdk`](https://www.npmjs.com/package/@mysten/wallet-sdk) for the
47
- full set). All are re-exported as `analyzers` (with `currentEpoch` and `createAnalyzer` alongside).
48
- A failed analyzer never reaches your `analyze`: it short-circuits to an `ANALYSIS_FAILED` rejection.
52
+ full set). All are re-exported as `analyzers` (with `currentEpoch`, `createAnalyzer`, and `optional`
53
+ alongside). A failed required analyzer never reaches your validator's `analyze`: that validator
54
+ contributes an `ANALYSIS_FAILED` issue while independent validators can still report policy
55
+ rejections.
49
56
 
50
57
  ## Loading data, and sharing it across validators
51
58
 
@@ -117,7 +124,7 @@ await sponsor.signAndExecuteTransaction({
117
124
 
118
125
  ## How it runs
119
126
 
120
- `createSponsor` makes every validator a dependency of **`sponsor.analyzer`**, and validation is just
127
+ `createSponsor` aggregates every validator through **`sponsor.analyzer`**, and validation is just
121
128
  `analyze({ check: sponsor.analyzer }, { transaction, client })`. The analyzer framework then
122
129
  handles:
123
130
 
@@ -127,13 +134,15 @@ handles:
127
134
  declare, because it falls out of the dependency graph.
128
135
  - **Deduped**: `data` and `balanceFlows` and so on resolve once even when many validators (and a
129
136
  host graph) depend on them.
130
- - **Propagated**: a failed analyzer becomes an `ANALYSIS_FAILED` rejection rather than reaching a
131
- validator with a broken value.
137
+ - **Independent failure reporting**: a failed validator becomes an `ANALYSIS_FAILED` entry in
138
+ `analysisIssues`, without suppressing policy rejections from validators that did run.
132
139
 
133
140
  When validation fails, the sponsor never signs and the method **returns**
134
- `{ $kind: 'Rejected', issues, reason }`, where `issues` lists every reason, and `reason` is
135
- `'POLICY_REJECTED'` or `'ANALYSIS_FAILED'`. To turn a rejection into a thrown error, the exported
136
- `SponsorValidationError` class takes `(issues, reason)`.
141
+ `{ $kind: 'Rejected', issues, policyIssues, analysisIssues, reason }`. `issues` preserves the
142
+ combined list for existing callers, while `policyIssues` and `analysisIssues` separate policy
143
+ rejections from checks that could not run. `reason` is `'POLICY_REJECTED'` when every reported issue
144
+ is policy-only and `'ANALYSIS_FAILED'` when any check could not run. To turn a rejection into a
145
+ thrown error, the exported `SponsorValidationError` class takes `(issues, reason)`.
137
146
 
138
147
  **`sponsor.analyzer`** is also the composable handle: drop it into any other `analyze()` graph and
139
148
  it contributes `SponsorRejection | null`, deduping its analyzers with that graph.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/docs",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "LLM-friendly documentation for the Sui TypeScript SDK ecosystem",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -28,28 +28,28 @@
28
28
  "next": "^16.2.9",
29
29
  "react": "^19.2.7",
30
30
  "react-dom": "^19.2.7",
31
- "@mysten/aws-kms-signer": "0.3.0",
32
- "@mysten/dapp-kit-react": "2.1.5",
31
+ "@mysten/aws-kms-signer": "0.3.1",
32
+ "@mysten/dapp-kit-core": "1.6.4",
33
33
  "@mysten/bcs": "2.1.0",
34
- "@mysten/dapp-kit-core": "1.6.3",
35
- "@mysten/dapp-kit": "1.1.3",
36
- "@mysten/deepbook-v3": "1.5.3",
37
- "@mysten/enoki": "1.2.1",
38
- "@mysten/kiosk": "1.3.3",
39
- "@mysten/enoki-connect": "1.1.3",
40
- "@mysten/gcp-kms-signer": "0.2.3",
41
- "@mysten/ledger-signer": "0.2.3",
42
- "@mysten/payment-kit": "0.2.3",
43
- "@mysten/seal": "1.2.3",
44
- "@mysten/signers": "1.1.3",
45
- "@mysten/slush-wallet": "1.1.3",
34
+ "@mysten/dapp-kit": "1.1.4",
35
+ "@mysten/dapp-kit-react": "2.1.6",
36
+ "@mysten/enoki": "1.2.2",
37
+ "@mysten/enoki-connect": "1.1.4",
38
+ "@mysten/kiosk": "1.3.4",
39
+ "@mysten/gcp-kms-signer": "0.2.4",
40
+ "@mysten/deepbook-v3": "1.5.4",
41
+ "@mysten/ledger-signer": "0.2.4",
42
+ "@mysten/signers": "1.1.4",
43
+ "@mysten/slush-wallet": "1.1.4",
44
+ "@mysten/suins": "1.2.4",
45
+ "@mysten/sui": "2.20.2",
46
46
  "@mysten/utils": "0.4.0",
47
- "@mysten/wallet-standard": "0.21.3",
48
- "@mysten/webcrypto-signer": "0.2.3",
49
- "@mysten/walrus": "1.2.3",
50
- "@mysten/zksend": "1.2.3",
51
- "@mysten/suins": "1.2.3",
52
- "@mysten/sui": "2.20.1"
47
+ "@mysten/wallet-standard": "0.21.4",
48
+ "@mysten/seal": "1.2.4",
49
+ "@mysten/payment-kit": "0.2.4",
50
+ "@mysten/walrus": "1.2.4",
51
+ "@mysten/webcrypto-signer": "0.2.4",
52
+ "@mysten/zksend": "1.2.4"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@tailwindcss/postcss": "^4.3.1",