@stripe/link-cli 0.8.3 → 0.10.0

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.
Files changed (3) hide show
  1. package/README.md +16 -2
  2. package/dist/cli.js +1934 -966
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -63,11 +63,12 @@ Link CLI can run as a local MCP server. Add the following to your MCP client con
63
63
  Use `serve` to expose link-cli as an MCP endpoint over HTTP. This is useful for remote or containerised agents that can't launch a local subprocess.
64
64
 
65
65
  ```bash
66
- link-cli serve # listens on port 54321 by default
66
+ link-cli serve # binds 127.0.0.1:54321 (loopback only)
67
67
  link-cli serve --port 8080
68
+ link-cli serve --host 0.0.0.0 # expose beyond localhost (see warning below)
68
69
  ```
69
70
 
70
- The MCP endpoint is available at `/mcp` on the chosen port.
71
+ The server only handles the `/mcp` endpoint (and `/.well-known/skills/` discovery); any other path returns `404`. It binds to `127.0.0.1` by default so only the local host can reach it. Anyone who can reach the port can use this CLI's authenticated Link session, so only override `--host` on a trusted, isolated network — doing so prints a warning.
71
72
 
72
73
  ## Quickstart
73
74
 
@@ -140,6 +141,19 @@ Easily approve requests with the [Link app](https://link.com/download).
140
141
  --total "type:total,display_text:Total,amount:12000"
141
142
  ```
142
143
 
144
+ #### Approval details
145
+
146
+ For delegated/pre-approved flows, pass `--approval-detail` with a JSON object describing how the user approved the request. Required fields: `approved_at` (unix timestamp), `approval_method` (`click`, `programmatic`, or `voice`), `app_name`, `external_user_id`. Optional: `ip_address`, `user_agent`, `device_type` (`mobile` or `web`), `agent_log_id`, `external_user_name`, `external_session_id`, `authentication_method` (`biometric_face`, `biometric_fingerprint`, or `passkey`).
147
+
148
+ In CLI mode, pass as a JSON string:
149
+
150
+ ```bash
151
+ link-cli spend-request create ... \
152
+ --approval-detail '{"approved_at":1720000000,"approval_method":"click","app_name":"MyApp","external_user_id":"usr_123"}'
153
+ ```
154
+
155
+ In MCP/agent mode, pass as a structured object.
156
+
143
157
  #### Credential types
144
158
 
145
159
  By default, a spend request provisions a virtual card. For merchants that support the [Machine Payments Protocol](https://mpp.dev) (HTTP 402) and the Stripe payment method, instead pass `--credential-type "shared_payment_token"`.