@mysten-incubation/suipay-mcp 0.3.0-dev.7 → 0.3.0-dev.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
|
@@ -5,7 +5,7 @@ buyer-funded spend account. The buyer owns the account. The agent holds the
|
|
|
5
5
|
delegate key and can spend only under the on-chain grant (recipient bind,
|
|
6
6
|
per-payment cap, budget).
|
|
7
7
|
|
|
8
|
-
Pin `@mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
8
|
+
Pin `@mysten-incubation/suipay-mcp@0.3.0-dev.8` in MCP config for the `latest` dist-tag.
|
|
9
9
|
`npx -y @mysten-incubation/suipay-mcp@dev` tracks the `dev` prerelease line.
|
|
10
10
|
`1.0.1` remains on the registry as a historical release; do not install it
|
|
11
11
|
for new agents.
|
|
@@ -13,7 +13,7 @@ for new agents.
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
claude mcp add --scope user suipay -- npx -y @mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
16
|
+
claude mcp add --scope user suipay -- npx -y @mysten-incubation/suipay-mcp@0.3.0-dev.8
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
`@dev` installs the Railway-dev gateway/console defaults. A workspace
|
|
@@ -155,10 +155,10 @@ Default is Railway **suipay-dev**. `--local` / `target: "local"` is laptop-only.
|
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
157
|
# Railway suipay-dev (default)
|
|
158
|
-
npx @mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
158
|
+
npx @mysten-incubation/suipay-mcp@0.3.0-dev.8
|
|
159
159
|
|
|
160
160
|
# Laptop stack
|
|
161
|
-
npx @mysten-incubation/suipay-mcp@0.3.0-dev.
|
|
161
|
+
npx @mysten-incubation/suipay-mcp@0.3.0-dev.8 --local
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
`SUIPAY_MCP_TARGET=local|dev` selects the same preset. Explicit
|
package/dist/bin/suipay.js
CHANGED
|
@@ -13182,6 +13182,13 @@ function receiptChallengeId(receipt) {
|
|
|
13182
13182
|
return typeof id === "string" && id.length > 0 ? id : void 0;
|
|
13183
13183
|
}
|
|
13184
13184
|
var MCP_SAVE_ERROR = "delivery file was not written; do not call pay again";
|
|
13185
|
+
var MCP_EMPTY_DELIVERY = "the seller returned an empty delivery body; no file was written; do not call pay again";
|
|
13186
|
+
function deliverySaveError(cause, result) {
|
|
13187
|
+
const code = cause?.code;
|
|
13188
|
+
const reason = typeof code === "string" && /^E[A-Z0-9_]+$/.test(code) ? code : "file-system operation failed";
|
|
13189
|
+
const recovery = result.paid === true && result.txDigest ? `the body was not saved locally and cannot be re-fetched here; transaction digest ${result.txDigest} identifies the settlement for support` : "no confirmed transaction digest is available";
|
|
13190
|
+
return `${MCP_SAVE_ERROR}; cause: ${reason}; ${recovery}`;
|
|
13191
|
+
}
|
|
13185
13192
|
function paidResult(result) {
|
|
13186
13193
|
if (!isBinaryBody(result.body)) return text(result);
|
|
13187
13194
|
const body = result.body;
|
|
@@ -13191,6 +13198,7 @@ function paidResult(result) {
|
|
|
13191
13198
|
byteLength: body.byteLength
|
|
13192
13199
|
};
|
|
13193
13200
|
let savedTo;
|
|
13201
|
+
let saveError = MCP_EMPTY_DELIVERY;
|
|
13194
13202
|
try {
|
|
13195
13203
|
savedTo = saveDeliveredBody({
|
|
13196
13204
|
bytes: body.bytes,
|
|
@@ -13198,8 +13206,8 @@ function paidResult(result) {
|
|
|
13198
13206
|
digest: result.txDigest,
|
|
13199
13207
|
challengeId: receiptChallengeId(result.receipt)
|
|
13200
13208
|
});
|
|
13201
|
-
} catch {
|
|
13202
|
-
|
|
13209
|
+
} catch (cause) {
|
|
13210
|
+
saveError = deliverySaveError(cause, result);
|
|
13203
13211
|
}
|
|
13204
13212
|
const payload = savedTo ? {
|
|
13205
13213
|
savedTo,
|
|
@@ -13208,7 +13216,7 @@ function paidResult(result) {
|
|
|
13208
13216
|
body: shape
|
|
13209
13217
|
} : {
|
|
13210
13218
|
savedTo: null,
|
|
13211
|
-
saveError
|
|
13219
|
+
saveError,
|
|
13212
13220
|
saveErrorCode: "client.delivery_file_not_saved",
|
|
13213
13221
|
...result,
|
|
13214
13222
|
body: shape
|
package/dist/http.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadBootProfile,
|
|
3
3
|
main
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4275QE4A.js";
|
|
5
5
|
import {
|
|
6
6
|
MCP_TARGET_PRESETS,
|
|
7
7
|
PACKAGE_NAME,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
settlePreparedMcpPayment,
|
|
27
27
|
traceMcpHttpRequest,
|
|
28
28
|
verifySpendAccountPayReconstructs
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7KI45A7U.js";
|
|
30
30
|
export {
|
|
31
31
|
MCP_TARGET_PRESETS,
|
|
32
32
|
PACKAGE_NAME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten-incubation/suipay-mcp",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "SuiPay MCP — pay MPP-gated APIs from a spend-account grant with an agent-held delegate key.",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"tsup": "^8.0.0",
|
|
43
43
|
"typescript": "^6.0.3",
|
|
44
44
|
"vitest": "^4.1.10",
|
|
45
|
-
"@cmdoss/suipay-
|
|
46
|
-
"@cmdoss/suipay-
|
|
45
|
+
"@cmdoss/suipay-sdk": "0.1.0",
|
|
46
|
+
"@cmdoss/suipay-core": "0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsup",
|