@mysten-incubation/suipay-mcp 0.3.0-dev.16 → 0.3.0-dev.17
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.17` 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.17
|
|
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.17
|
|
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.17 --local
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
`SUIPAY_MCP_TARGET=local|dev` selects the same preset. Explicit
|
package/dist/bin/suipay.js
CHANGED
|
@@ -5831,6 +5831,8 @@ var CONTEXT_ALLOWLIST = /* @__PURE__ */ new Set([
|
|
|
5831
5831
|
"seedId",
|
|
5832
5832
|
"grantId",
|
|
5833
5833
|
"grantObjectId",
|
|
5834
|
+
"policyId",
|
|
5835
|
+
"onChainPolicyId",
|
|
5834
5836
|
"sameGrantObjectId",
|
|
5835
5837
|
"verifiedGrant",
|
|
5836
5838
|
"poolObjectId",
|
|
@@ -10896,6 +10898,22 @@ async function settlePreparedMcpPayment(args) {
|
|
|
10896
10898
|
});
|
|
10897
10899
|
}
|
|
10898
10900
|
|
|
10901
|
+
// src/mcp-client-header.ts
|
|
10902
|
+
var MCP_CLIENT_HEADER = "x-suipay-client";
|
|
10903
|
+
var MCP_CLIENT_HEADER_VALUE = "mcp";
|
|
10904
|
+
function withMcpClientFetch(base = fetch) {
|
|
10905
|
+
return (input, init) => {
|
|
10906
|
+
const headers = new Headers(input instanceof Request ? input.headers : void 0);
|
|
10907
|
+
if (init?.headers) {
|
|
10908
|
+
new Headers(init.headers).forEach((value, key) => headers.set(key, value));
|
|
10909
|
+
}
|
|
10910
|
+
if (!headers.has(MCP_CLIENT_HEADER)) {
|
|
10911
|
+
headers.set(MCP_CLIENT_HEADER, MCP_CLIENT_HEADER_VALUE);
|
|
10912
|
+
}
|
|
10913
|
+
return base(input, { ...init, headers });
|
|
10914
|
+
};
|
|
10915
|
+
}
|
|
10916
|
+
|
|
10899
10917
|
// ../sdk/dist/agent-sdk/delegate-agent.js
|
|
10900
10918
|
import { normalizeSuiAddress as normalizeSuiAddress12 } from "@mysten/sui/utils";
|
|
10901
10919
|
|
|
@@ -12701,7 +12719,7 @@ async function prepareSpendAccountPayment(args) {
|
|
|
12701
12719
|
...refundConfigInitialSharedVersion ? { refundConfigInitialSharedVersion } : {}
|
|
12702
12720
|
});
|
|
12703
12721
|
};
|
|
12704
|
-
const rawFetch = deps.fetchImpl ?? fetch;
|
|
12722
|
+
const rawFetch = withMcpClientFetch(deps.fetchImpl ?? fetch);
|
|
12705
12723
|
const wrappedFetch = (input, init) => {
|
|
12706
12724
|
const probeUrl = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
|
|
12707
12725
|
if (probeUrl === request.url || probeUrl === args.url) {
|
|
@@ -13896,7 +13914,7 @@ async function pay(args, cfg, deps = {}) {
|
|
|
13896
13914
|
cfg,
|
|
13897
13915
|
...intent.dialect ? { preferredDialect: intent.dialect } : {},
|
|
13898
13916
|
deps: {
|
|
13899
|
-
|
|
13917
|
+
fetchImpl: withMcpClientFetch(deps.fetchImpl ?? fetch),
|
|
13900
13918
|
...trace ? { trace } : {},
|
|
13901
13919
|
...deps.resolveExclusionRegistry ? { resolveExclusionRegistry: deps.resolveExclusionRegistry } : {},
|
|
13902
13920
|
...deps.buildPayKind ? { buildPayKind: deps.buildPayKind } : liveKindBuilder ? {
|
|
@@ -13948,7 +13966,9 @@ async function pay(args, cfg, deps = {}) {
|
|
|
13948
13966
|
cfg: { gatewayUrl: cfg.gatewayUrl },
|
|
13949
13967
|
deps: {
|
|
13950
13968
|
...deps.agentHeld.payerDeps,
|
|
13951
|
-
|
|
13969
|
+
fetchImpl: withMcpClientFetch(
|
|
13970
|
+
deps.agentHeld.payerDeps.fetchImpl ?? deps.fetchImpl ?? fetch
|
|
13971
|
+
)
|
|
13952
13972
|
}
|
|
13953
13973
|
});
|
|
13954
13974
|
return renderSettled(settled);
|
|
@@ -14175,7 +14195,7 @@ async function stdioPayerAndReader(cfg, deps) {
|
|
|
14175
14195
|
gatewayUrl,
|
|
14176
14196
|
keypair,
|
|
14177
14197
|
...select ? { select } : {},
|
|
14178
|
-
|
|
14198
|
+
fetchImpl: withMcpClientFetch(deps.fetchImpl ?? fetch),
|
|
14179
14199
|
...cfg.rpcUrl ? { fullnodeUrl: cfg.rpcUrl } : {}
|
|
14180
14200
|
});
|
|
14181
14201
|
if (!built.ok) {
|
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-VNC7KWFM.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-OZSWGGG4.js";
|
|
30
30
|
export {
|
|
31
31
|
MCP_TARGET_PRESETS,
|
|
32
32
|
PACKAGE_NAME,
|
package/package.json
CHANGED