@cmdoss/suipay-mcp 0.2.2-dev.2 → 0.2.2-dev.21

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,15 +5,21 @@ 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 `@cmdoss/suipay-mcp@0.2.2` in MCP config. `1.0.1` remains on the
9
- registry as a historical release; do not install it for new agents.
8
+ Pin `@cmdoss/suipay-mcp@0.2.2-dev.21` in MCP config for the `latest` dist-tag.
9
+ `npx -y @cmdoss/suipay-mcp@dev` tracks the `dev` prerelease line.
10
+ `1.0.1` remains on the registry as a historical release; do not install it
11
+ for new agents.
10
12
 
11
13
  ## Install
12
14
 
13
15
  ```bash
14
- claude mcp add --scope user suipay -- npx -y @cmdoss/suipay-mcp@0.2.2
16
+ claude mcp add --scope user suipay -- npx -y @cmdoss/suipay-mcp@0.2.2-dev.21
15
17
  ```
16
18
 
19
+ `@dev` installs the Railway-dev gateway/console defaults. A workspace
20
+ checkout still defaults to localhost. `SUIPAY_GATEWAY_URL` and
21
+ `SUIPAY_CONSOLE_URL` always override.
22
+
17
23
  No wallet secret belongs in this command or MCP config. There is no
18
24
  Sign-In With Sui (SIWS) step. To reuse an existing delegate seed locally,
19
25
  set `SUIPAY_MCP_KEY` (64-hex or `suiprivkey1…`) in the MCP env — never in
@@ -51,7 +57,7 @@ missing, expired, or revoked.
51
57
  | Tool | Purpose |
52
58
  | --- | --- |
53
59
  | `discover` | Search live gateway resources. After login: `name`, `path`, `url`, `targetHash`, catalog price, and `affordable` (can this session cover one call — not authorization). `pay({ url })` still settles |
54
- | `pay` | Fetch resource, prepare `spend_account` settlement, settle when this process holds the grant key. POST `json` is the paid body. Optional stdio `file` + `fileField` fill one JSON key from a local file as canonical base64 (Walrus `contentBase64`); hosted `/mcp` refuses `file` |
60
+ | `pay` | Fetch resource, prepare `spend_account` settlement, settle when this process holds the grant key. POST `json` is the paid body. Optional stdio `file` + `fileField` fill one JSON key from a local file as canonical base64 (Walrus `contentBase64`); requires `SUIPAY_MCP_FILE_ROOT`; hosted `/mcp` refuses `file` |
55
61
  | `receipts` | List settlement receipts, optionally by challenge ID |
56
62
  | `access_context` | Report current session / delegate / policy state (no secret material) |
57
63
  | `suipay_login` | Mint or reuse the local delegate key and return a clickable console URL (does not wait for the wallet). Default target is Railway suipay-dev; pass `target: "local"` for the laptop stack |
@@ -76,18 +82,30 @@ json: {"prompt":"a cat"}
76
82
  maxAmount: 50000
77
83
  ```
78
84
 
79
- To store local bytes (Walrus), do not paste base64. Name the file and field:
85
+ To store local bytes (Walrus), do not paste base64. Name the file and field.
86
+ Set `SUIPAY_MCP_FILE_ROOT` to an absolute directory; `file` must resolve inside
87
+ it (unset disables attach). Paths under `~/.suipay` are refused even if that
88
+ directory falls inside the root.
80
89
 
81
90
  ```
82
- url: https://gateway.example/v1/storage/store
91
+ Pay this SuiPay resource with the suipay MCP `pay` tool. Do not write SDK code.
92
+
93
+ url: https://gateway.example/v1/walrus/store
83
94
  method: POST
84
95
  json: {"contentType":"text/plain"}
85
96
  file: /absolute/path/to/note.txt
86
97
  fileField: contentBase64
98
+ maxAmount: 50000
87
99
  ```
88
100
 
89
- `pay` uses SDK `createPayer` internally. A delivered image is returned as an MCP
90
- image block, not as a base64 wall in the JSON summary.
101
+ `pay` uses SDK `createPayer` internally. When this process settles, a binary
102
+ body is written once under `~/.suipay/deliveries/` and named first in the
103
+ JSON as `savedTo` (absolute path) and `savedToUrl` (`file://`). Hosted `/mcp`
104
+ is prepare-only and does not write a buyer file. Any MIME — image, audio,
105
+ pdf, octet-stream. JSON stays compact (no base64 wall). An MCP `image` block
106
+ is an extra display hint when the type is `image/*`; hosts such as Claude
107
+ Code's TUI may not render it. Always quote `savedTo` when present. If
108
+ `savedTo` is null, quote `saveError` and do not call `pay` again.
91
109
 
92
110
  ## Targets
93
111
 
@@ -100,10 +118,10 @@ Default is Railway **suipay-dev**. `--local` / `target: "local"` is laptop-only.
100
118
 
101
119
  ```bash
102
120
  # Railway suipay-dev (default)
103
- npx @cmdoss/suipay-mcp@0.2.2
121
+ npx @cmdoss/suipay-mcp@0.2.2-dev.21
104
122
 
105
123
  # Laptop stack
106
- npx @cmdoss/suipay-mcp@0.2.2 --local
124
+ npx @cmdoss/suipay-mcp@0.2.2-dev.21 --local
107
125
  ```
108
126
 
109
127
  `SUIPAY_MCP_TARGET=local|dev` selects the same preset. Explicit
@@ -163,4 +181,8 @@ node packages/mcp/dist/bin/suipay.js
163
181
  Binary writes status banner to stderr only. Stdout stays reserved for
164
182
  MCP protocol.
165
183
 
166
- Do not publish `@cmdoss/suipay-mcp` from this change.
184
+ Publishing is the `release-npm` workflow: merge to `dev` publishes
185
+ `@cmdoss/suipay-mcp@<version>-dev.N` with dist-tag `dev` (OIDC, pack gate,
186
+ provenance). `latest` is a gated dispatch from `main` (`dry_run` default
187
+ true). Do not `npm publish` from a laptop. See
188
+ [`docs/guide/npm-release.md`](../../docs/guide/npm-release.md).
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "../chunk-AFEXT5X4.js";
5
- import "../chunk-62LFIYB7.js";
4
+ } from "../chunk-IBRMIXCG.js";
5
+ import "../chunk-6VFKI2BY.js";
6
6
 
7
7
  // src/bin/suipay.ts
8
8
  main().catch((err) => {