warpmetal 0.3.0 → 0.4.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.
- package/README.md +56 -7
- package/package.json +2 -2
- package/skills/warpmetal/SKILL.md +44 -22
- package/skills/warpmetal/agents/openai.yaml +2 -2
- package/skills/warpmetal/references/cli-reference.md +28 -4
- package/skills/warpmetal/references/payments.md +110 -0
- package/skills/warpmetal/references/safety.md +20 -7
- package/src/cli.js +134 -24
- package/src/payment.js +769 -0
- package/src/state.js +55 -1
package/README.md
CHANGED
|
@@ -4,8 +4,10 @@ The official command-line client and portable Agent Skill for WarpMetal.
|
|
|
4
4
|
|
|
5
5
|
The CLI uses the public API at `https://api.warpmetal.com`, stores generated
|
|
6
6
|
WarpMetal credentials in a user-private state file, and never reads or stores
|
|
7
|
-
wallet private keys or SSH private-key contents. Version 0.
|
|
8
|
-
|
|
7
|
+
wallet private keys or SSH private-key contents. Version 0.4 adds a guarded
|
|
8
|
+
x402api Agent Wallet handoff: WarpMetal writes the exact credential-free payment
|
|
9
|
+
request, explains the next commands to an agent, validates the returned payment
|
|
10
|
+
artifact, and submits it without absorbing wallet custody.
|
|
9
11
|
|
|
10
12
|
## Distribution
|
|
11
13
|
|
|
@@ -21,9 +23,16 @@ remains the stable executable API.
|
|
|
21
23
|
|
|
22
24
|
## Install
|
|
23
25
|
|
|
26
|
+
WarpMetal supports Node.js 20 and 22. The separate x402api Agent Wallet
|
|
27
|
+
requires Node.js 22; it is not a WarpMetal package dependency. Install the
|
|
28
|
+
published wallet CLI with the exact version WarpMetal reports:
|
|
29
|
+
|
|
24
30
|
```sh
|
|
25
31
|
npm install --global warpmetal
|
|
26
32
|
warpmetal --help
|
|
33
|
+
|
|
34
|
+
npm install --global @x402api/agent-wallet-cli@0.2.1
|
|
35
|
+
x402api help --json
|
|
27
36
|
```
|
|
28
37
|
|
|
29
38
|
Install the bundled skill for supported coding agents:
|
|
@@ -58,6 +67,44 @@ Pass `--json` for structured, secret-redacted output. Use
|
|
|
58
67
|
`WARPMETAL_API_URL` for an alternate API origin and `WARPMETAL_HOME` for an
|
|
59
68
|
alternate state directory.
|
|
60
69
|
|
|
70
|
+
## Pay through the x402api Agent Wallet
|
|
71
|
+
|
|
72
|
+
After preparing an order, request its live payment challenge:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
warpmetal checkout challenge --task <taskId> --json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
On HTTP 402 the CLI returns exact `paymentTerms`, the pinned
|
|
79
|
+
`@x402api/agent-wallet-cli` package contract, and argv arrays under
|
|
80
|
+
`paymentWorkflow`. It also writes an owner-only request envelope that contains
|
|
81
|
+
the exact checkout URL and body but no WarpMetal credential. The published
|
|
82
|
+
launch wallet accepts sponsored Base USDC and sponsored Solana USDC/USDT only;
|
|
83
|
+
the returned terms identify compatible alternatives and confirm that the buyer
|
|
84
|
+
does not need ETH or SOL. After inspecting the terms and approving payment,
|
|
85
|
+
invoke the returned authorization argv with a dedicated wallet name:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
x402api payment authorize \
|
|
89
|
+
--wallet <wallet-name> \
|
|
90
|
+
--request-envelope <path-returned-by-warpmetal> \
|
|
91
|
+
--artifact-out <path-returned-by-warpmetal> \
|
|
92
|
+
--json
|
|
93
|
+
|
|
94
|
+
warpmetal checkout submit \
|
|
95
|
+
--task <taskId> \
|
|
96
|
+
--payment-artifact <owner-only-artifact-path> \
|
|
97
|
+
--wait \
|
|
98
|
+
--json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The x402api Agent Wallet is a separate, merchant-neutral executable. Install
|
|
102
|
+
its matching `x402api-pay` skill with `x402api skill install --output <agent-skill-directory>/x402api-pay --json`.
|
|
103
|
+
Do not use `x402api pay`, `payment submit`, or `payment reconcile` for WarpMetal:
|
|
104
|
+
checkout requires the private WarpMetal owner token, so x402api authorizes and
|
|
105
|
+
WarpMetal submits. WarpMetal keeps `--payment-signature-file` for another
|
|
106
|
+
compatible external signer.
|
|
107
|
+
|
|
61
108
|
## Security boundary
|
|
62
109
|
|
|
63
110
|
- Order and access tokens are never printed; they are written to
|
|
@@ -68,8 +115,9 @@ alternate state directory.
|
|
|
68
115
|
- WarpMetal applies key-only OpenSSH configuration on initial provisioning and
|
|
69
116
|
every OS reload. Password and keyboard-interactive login are disabled; never
|
|
70
117
|
request, store, or expect a VPS login password.
|
|
71
|
-
- The CLI
|
|
72
|
-
|
|
118
|
+
- The CLI writes x402api-compatible request envelopes and accepts validated
|
|
119
|
+
x402api payment artifacts or a compatible external `PAYMENT-SIGNATURE` file.
|
|
120
|
+
Wallet key management and signing remain outside this package.
|
|
73
121
|
- Destructive or state-changing commands require explicit confirmations and
|
|
74
122
|
generate idempotency keys by default.
|
|
75
123
|
- Runtime bootstrap credentials remain memory-only. Signed supervisor bundles
|
|
@@ -82,9 +130,10 @@ Wallet key management and signing remain outside this package.
|
|
|
82
130
|
delete their workspace after 15 minutes to 24 hours.
|
|
83
131
|
- Guarded reload powers the server off first. Runtime-enabled reload requires a
|
|
84
132
|
second acknowledgment, after which the CLI guides supervisor reinstall and
|
|
85
|
-
pinned connection-profile refresh.
|
|
86
|
-
verified
|
|
87
|
-
|
|
133
|
+
pinned connection-profile refresh. Post-reload owner SSH host keys must be
|
|
134
|
+
independently verified because the provider may rotate or preserve them;
|
|
135
|
+
update `known_hosts` only when the verified key changed. Erased workspaces
|
|
136
|
+
are never described as recoverable.
|
|
88
137
|
|
|
89
138
|
## Agent Runtime example
|
|
90
139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warpmetal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Agent-safe CLI and skill for purchasing and managing WarpMetal VPS servers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">=20.0.0"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"check": "node --check bin/warpmetal.js && node --check src/api.js && node --check src/args.js && node --check src/cli.js && node --check src/connection.js && node --check src/errors.js && node --check src/install-skill.js && node --check src/installer.js && node --check src/runtime.js && node --check src/ssh.js && node --check src/state.js && node --check src/version.js",
|
|
19
|
+
"check": "node --check bin/warpmetal.js && node --check src/api.js && node --check src/args.js && node --check src/cli.js && node --check src/connection.js && node --check src/errors.js && node --check src/install-skill.js && node --check src/installer.js && node --check src/payment.js && node --check src/runtime.js && node --check src/ssh.js && node --check src/state.js && node --check src/version.js",
|
|
20
20
|
"test": "node --test",
|
|
21
21
|
"prepack": "npm run check && npm test"
|
|
22
22
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: warpmetal
|
|
3
|
-
description: Safely purchase and manage WarpMetal VPS servers and Agent Runtime sandboxes with the official warpmetal CLI. Use when a shell-capable agent needs live VPS discovery, x402 ordering, provisioning, server management, optional runtime installation, fixed-size sandbox creation, persistent or temporary lifetime, per-agent SSH access, sandbox connection, access revocation, or workspace deletion.
|
|
3
|
+
description: Safely purchase and manage WarpMetal VPS servers and Agent Runtime sandboxes with the official warpmetal CLI, including x402api Agent Wallet payment handoff. Use when a shell-capable agent needs live VPS discovery, x402 payment authorization, ordering, provisioning, server management, optional runtime installation, fixed-size sandbox creation, persistent or temporary lifetime, per-agent SSH access, sandbox connection, access revocation, or workspace deletion.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# WarpMetal
|
|
@@ -19,12 +19,15 @@ with ad hoc HTTP commands.
|
|
|
19
19
|
authorizing payment, using an SSH identity, or changing a server.
|
|
20
20
|
5. Read [references/cli-reference.md](references/cli-reference.md) when choosing
|
|
21
21
|
a command or interpreting an exit code.
|
|
22
|
-
6. Read [references/
|
|
22
|
+
6. Read [references/payments.md](references/payments.md) before creating or
|
|
23
|
+
funding a wallet, authorizing payment, or resolving an ambiguous attempt.
|
|
24
|
+
7. Read [references/runtime.md](references/runtime.md) before requesting,
|
|
23
25
|
installing, accessing, expiring, or deleting Agent Runtime sandboxes.
|
|
24
26
|
|
|
25
|
-
Never read, print, summarize, upload, or commit the WarpMetal state file
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
Never read, print, summarize, upload, or commit the WarpMetal state file,
|
|
28
|
+
x402api keystore, password file, payment request envelope, or payment artifact.
|
|
29
|
+
Never read an SSH private-key file. Pass private paths only to commands designed
|
|
30
|
+
to use them. Never request or handle a wallet seed phrase or private key.
|
|
28
31
|
|
|
29
32
|
WarpMetal provisions and reloads servers with key-only OpenSSH access. Password
|
|
30
33
|
and keyboard-interactive login are disabled, including for root. Never request,
|
|
@@ -64,26 +67,44 @@ open the state file to retrieve the credential.
|
|
|
64
67
|
|
|
65
68
|
## Authorize payment
|
|
66
69
|
|
|
67
|
-
Run `warpmetal checkout challenge --task <taskId> --json
|
|
68
|
-
x402 terms
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
Run `warpmetal checkout challenge --task <taskId> --json`. The CLI validates
|
|
71
|
+
the live x402 terms, writes an owner-only credential-free request envelope, and
|
|
72
|
+
returns `paymentTerms` plus exact `paymentWorkflow.authorize.argv` and
|
|
73
|
+
`paymentWorkflow.submit.argv` arrays. Do not reconstruct those commands or
|
|
74
|
+
open either file.
|
|
75
|
+
|
|
76
|
+
Show the user the exact amount, asset, network, recipient, profile, and maximum
|
|
77
|
+
authorization lifetime from `paymentTerms`; obtain explicit approval before
|
|
78
|
+
signing or submission. Follow [references/payments.md](references/payments.md)
|
|
79
|
+
to install the exact `paymentWorkflow.signerPackage.spec`, verify the V1
|
|
80
|
+
machine contract, install its matching `x402api-pay` skill, and select or fund
|
|
81
|
+
a dedicated network-specific wallet. Require `agentWalletSupported: true`,
|
|
82
|
+
`sponsoredNetworkFee: true`, and `buyerNativeFeeRequired: false` on the chosen
|
|
83
|
+
live term. Never fall back to a historical buyer-funded or TRON profile.
|
|
84
|
+
|
|
85
|
+
After approval, invoke the returned authorize argv once. The separate
|
|
86
|
+
`x402api` executable owns the wallet, validates the envelope, and writes the
|
|
87
|
+
payment artifact. Then invoke the returned submit argv, equivalent to:
|
|
75
88
|
|
|
76
89
|
```sh
|
|
77
90
|
warpmetal checkout submit \
|
|
78
91
|
--task <taskId> \
|
|
79
|
-
--payment-
|
|
92
|
+
--payment-artifact <owner-only-artifact-path> \
|
|
80
93
|
--wait \
|
|
81
94
|
--json
|
|
82
95
|
```
|
|
83
96
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
97
|
+
Do not use `x402api pay`, `x402api payment submit`, or `x402api payment
|
|
98
|
+
reconcile` for this checkout. Those commands submit credential-free requests,
|
|
99
|
+
but WarpMetal must add its private owner token locally.
|
|
100
|
+
|
|
101
|
+
WarpMetal verifies that the artifact matches the exact saved request and an
|
|
102
|
+
advertised sponsored requirement, gas reservation, resource, extensions, and
|
|
103
|
+
buyer payment identifier before sending its signature. The legacy
|
|
104
|
+
`--payment-signature-file` input remains available for another compatible
|
|
105
|
+
external signer. If a signed request returns a replacement challenge, use the
|
|
106
|
+
new CLI-produced workflow and request approval again when terms changed. On
|
|
107
|
+
`manual_review` or an ambiguous attempt, stop and never create another payment.
|
|
87
108
|
|
|
88
109
|
## Provision and manage
|
|
89
110
|
|
|
@@ -137,11 +158,12 @@ warpmetal server reload \
|
|
|
137
158
|
|
|
138
159
|
The CLI requires the recovery owner credential so it can keep polling after
|
|
139
160
|
reload revokes SSH-derived access tokens. On success, reinstall Agent Runtime
|
|
140
|
-
only after verifying the
|
|
141
|
-
through a trusted provider or console channel
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
161
|
+
only after verifying the post-reload owner-facing SSH host-key fingerprint
|
|
162
|
+
through a trusted provider or console channel. The provider may rotate or
|
|
163
|
+
preserve the key; update `known_hosts` only when the verified key changed and
|
|
164
|
+
never bypass a mismatch. Then wait for grants to become applied and refresh
|
|
165
|
+
every connection profile with `sandbox access refresh --confirm REFRESH`
|
|
166
|
+
before connecting. Do not fall back to raw API calls for deletion, networking,
|
|
145
167
|
renewal, or another unsupported mutation.
|
|
146
168
|
|
|
147
169
|
## Use Agent Runtime
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "WarpMetal VPS"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use $warpmetal to
|
|
3
|
+
short_description: "Purchase and manage WarpMetal compute safely"
|
|
4
|
+
default_prompt: "Use $warpmetal to purchase a VPS through the guarded x402 wallet handoff and manage isolated agent sandboxes safely."
|
|
@@ -33,11 +33,14 @@ warpmetal order prepare \
|
|
|
33
33
|
[--idempotency-key <key>] \
|
|
34
34
|
--json
|
|
35
35
|
|
|
36
|
-
warpmetal checkout challenge
|
|
36
|
+
warpmetal checkout challenge \
|
|
37
|
+
--task <taskId> \
|
|
38
|
+
[--request-envelope-out <path>] \
|
|
39
|
+
--json
|
|
37
40
|
|
|
38
41
|
warpmetal checkout submit \
|
|
39
42
|
--task <taskId> \
|
|
40
|
-
--payment-signature-file <path> \
|
|
43
|
+
(--payment-artifact <path> | --payment-signature-file <path>) \
|
|
41
44
|
[--wait] [--timeout-seconds <n>] \
|
|
42
45
|
--json
|
|
43
46
|
|
|
@@ -47,8 +50,29 @@ warpmetal order status \
|
|
|
47
50
|
--json
|
|
48
51
|
```
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
On HTTP 402, `checkout challenge` validates and displays exact payment terms,
|
|
54
|
+
writes a credential-free x402api V1 request envelope with owner-only
|
|
55
|
+
permissions, and returns the exact pinned wallet package, V1 contract probe,
|
|
56
|
+
matching wallet-skill install, authorization, and WarpMetal submission argv
|
|
57
|
+
arrays. The default envelope and suggested artifact paths live under the
|
|
58
|
+
private WarpMetal state directory. An explicit output path must not already
|
|
59
|
+
contain different content.
|
|
60
|
+
|
|
61
|
+
The current integration targets `@x402api/agent-wallet-cli@0.2.1`. A compatible
|
|
62
|
+
live term is marked `agentWalletSupported: true` and must use the sponsored
|
|
63
|
+
Base USDC or Solana USDC/USDT launch profile with buyer native fees disabled.
|
|
64
|
+
WarpMetal rejects a challenge with no compatible sponsored term. Because the
|
|
65
|
+
checkout is authenticated, do not substitute `x402api pay`, `payment submit`,
|
|
66
|
+
or `payment reconcile` for the returned WarpMetal submission command.
|
|
67
|
+
|
|
68
|
+
`--payment-artifact` accepts the owner-only JSON artifact produced by a
|
|
69
|
+
compatible pinned x402api Agent Wallet release. WarpMetal validates its request
|
|
70
|
+
and payment-requirement digests, resource, extensions, buyer payment identifier,
|
|
71
|
+
signature, sponsorship expiry, file type, and permissions before submission.
|
|
72
|
+
It reports only safe attempt metadata. The compatibility
|
|
73
|
+
`--payment-signature-file` input must contain one HTTP header value. WarpMetal
|
|
74
|
+
never creates, imports, reads, or stores wallet keys and does not sign x402
|
|
75
|
+
challenges itself. See [payments.md](payments.md).
|
|
52
76
|
|
|
53
77
|
## Server management
|
|
54
78
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# WarpMetal payment workflow
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Trust boundary
|
|
6
|
+
- Wallet setup and funding
|
|
7
|
+
- Exact purchase workflow
|
|
8
|
+
- Retries and recovery
|
|
9
|
+
|
|
10
|
+
## Trust boundary
|
|
11
|
+
|
|
12
|
+
WarpMetal is the merchant tool. It owns product selection, the private owner
|
|
13
|
+
credential, exact checkout bytes, submission, provisioning, and fulfillment.
|
|
14
|
+
The separate x402api Agent Wallet owns encrypted network keys, balance checks,
|
|
15
|
+
payment authorization, and durable payment attempts. Never merge their state
|
|
16
|
+
files or pass a WarpMetal credential to `x402api`.
|
|
17
|
+
|
|
18
|
+
WarpMetal runs on Node.js 20 or 22. The x402api Agent Wallet currently requires
|
|
19
|
+
Node.js 22. Use the exact published package reported by
|
|
20
|
+
`paymentWorkflow.signerPackage.spec`; the current contract is
|
|
21
|
+
`@x402api/agent-wallet-cli@0.2.1`. Do not add it as a WarpMetal dependency,
|
|
22
|
+
install executable wallet code from an unpinned repository URL, or substitute
|
|
23
|
+
a similarly named package.
|
|
24
|
+
|
|
25
|
+
The wallet package ships its own version-matched `x402api-pay` skill. Install
|
|
26
|
+
that skill into the directory used by Codex, Claude Code, or another portable
|
|
27
|
+
Agent Skills runtime with the returned `paymentWorkflow.walletSkill.install.argv`.
|
|
28
|
+
The command refuses to overwrite an existing directory; do not delete an old
|
|
29
|
+
skill automatically.
|
|
30
|
+
|
|
31
|
+
## Wallet setup and funding
|
|
32
|
+
|
|
33
|
+
1. Install the exact `paymentWorkflow.signerPackage.install.argv` under Node
|
|
34
|
+
22. Run `command -v x402api` and the returned
|
|
35
|
+
`paymentWorkflow.signerContract.probe.argv`. Require contract version 1.
|
|
36
|
+
2. Ensure an operator configured `X402API_WALLET_PASSWORD_FILE` as an owner-only
|
|
37
|
+
file, or is supervising `--password-stdin`. Never read either value.
|
|
38
|
+
3. Use `x402api wallet list --json` and reuse a dedicated persistent wallet for
|
|
39
|
+
the exact challenge network.
|
|
40
|
+
4. Create a wallet only with explicit approval. Keep Base and Solana wallets
|
|
41
|
+
separate; never import the owner's primary seed or key. TRON wallet
|
|
42
|
+
management exists, but the published launch payer cannot authorize TRON.
|
|
43
|
+
5. Use `x402api wallet balance --wallet <name> --json`. If funding is short,
|
|
44
|
+
show the public address, exact network, token, and atomic deficit. The owner
|
|
45
|
+
funds the token address from a wallet they control. Sponsored launch
|
|
46
|
+
payments never ask the buyer to fund ETH or SOL.
|
|
47
|
+
|
|
48
|
+
Treat the dedicated wallet's funded balance as spend authority available to
|
|
49
|
+
the agent, bounded by any wallet-local maximum payment policy. WarpMetal still
|
|
50
|
+
requires explicit approval immediately before its payment authorization and
|
|
51
|
+
submission workflow.
|
|
52
|
+
|
|
53
|
+
## Exact purchase workflow
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
warpmetal checkout challenge --task <taskId> --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Read only the returned safe JSON. Confirm `paymentTerms`, then use the exact
|
|
60
|
+
argv arrays returned under `paymentWorkflow`:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
paymentWorkflow.authorize.argv
|
|
64
|
+
x402api payment authorize --wallet <wallet-name>
|
|
65
|
+
--request-envelope <owner-only-request-path>
|
|
66
|
+
--artifact-out <owner-only-artifact-path> --json
|
|
67
|
+
|
|
68
|
+
paymentWorkflow.submit.argv
|
|
69
|
+
warpmetal checkout submit --task <taskId>
|
|
70
|
+
--payment-artifact <owner-only-artifact-path> --wait --json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Replace only `<wallet-name>` after selecting the wallet for the advertised
|
|
74
|
+
network. Do not parse, rewrite, copy, or display the request envelope or payment
|
|
75
|
+
artifact. The envelope excludes the WarpMetal owner token; the artifact holds
|
|
76
|
+
the complete payment signature and remains owner-only.
|
|
77
|
+
|
|
78
|
+
Choose only a term marked `agentWalletSupported: true`,
|
|
79
|
+
`sponsoredNetworkFee: true`, and `buyerNativeFeeRequired: false`. The supported
|
|
80
|
+
launch profiles are sponsored Base USDC and sponsored Solana USDC/USDT, bound
|
|
81
|
+
by the strict `com.x402api.gas-sponsorship` extension. Stop on an expired gas
|
|
82
|
+
reservation or any buyer-funded, unsupported, or unbound alternative.
|
|
83
|
+
|
|
84
|
+
Do not replace the two-stage workflow with `x402api pay`, `payment submit`, or
|
|
85
|
+
`payment reconcile`. Those wallet commands can submit an exact credential-free
|
|
86
|
+
endpoint; WarpMetal checkout requires a private owner token that must never
|
|
87
|
+
enter the wallet envelope. Use x402api only for authorization and WarpMetal for
|
|
88
|
+
submission and merchant reconciliation.
|
|
89
|
+
|
|
90
|
+
WarpMetal rejects an artifact whose request digest, selected payment
|
|
91
|
+
requirement, resource, extension set, buyer payment identifier, signature,
|
|
92
|
+
expiry, sponsorship lifetime, file type, or permissions do not match the saved
|
|
93
|
+
challenge. Keep `--payment-signature-file` only as a compatibility path for
|
|
94
|
+
another external signer.
|
|
95
|
+
|
|
96
|
+
## Retries and recovery
|
|
97
|
+
|
|
98
|
+
- `payment_pending` or `payment_finalizing`: keep the same checkout bytes and
|
|
99
|
+
artifact. `--wait` performs bounded retries with that exact authorization.
|
|
100
|
+
- Timeout or process restart after authorization: use the saved x402api attempt
|
|
101
|
+
ID and artifact. Reconcile with WarpMetal and reuse its submit argv. Never
|
|
102
|
+
authorize again merely because submission is unknown.
|
|
103
|
+
- Signed HTTP 402: the artifact was definitively rejected. Run the WarpMetal
|
|
104
|
+
challenge flow again, inspect the replacement terms, and authorize one new
|
|
105
|
+
artifact only when the protocol and approval allow it.
|
|
106
|
+
- `manual_review`: payment or fulfillment may be final. Stop all payment and
|
|
107
|
+
mutation retries.
|
|
108
|
+
- Expired or corrupt artifact, changed request digest, unexpected recipient,
|
|
109
|
+
unsupported network, asset, profile, sponsorship error, or request-binding
|
|
110
|
+
mismatch: stop instead of falling back or asking the buyer to fund ETH/SOL.
|
|
@@ -34,8 +34,15 @@
|
|
|
34
34
|
- Give each agent a distinct sandbox-specific SSH key and grant. Never reuse
|
|
35
35
|
the owner host key or one agent key across multiple sandboxes.
|
|
36
36
|
- Never request, read, transmit, or store a wallet seed phrase or private key.
|
|
37
|
-
-
|
|
38
|
-
|
|
37
|
+
- Install only the exact `@x402api/agent-wallet-cli` version and matching
|
|
38
|
+
bundled `x402api-pay` skill reported by WarpMetal. Never substitute an
|
|
39
|
+
unpinned repository checkout or similarly named wallet package.
|
|
40
|
+
- Never read or display an x402api password file, encrypted keystore, request
|
|
41
|
+
envelope, payment artifact, or complete payment signature. Pass only their
|
|
42
|
+
paths to the documented commands.
|
|
43
|
+
- Never put a token, payment signature, payment artifact, wallet password,
|
|
44
|
+
private key, or state-file content in a prompt, URL, log, screenshot, source
|
|
45
|
+
file, or shell argument.
|
|
39
46
|
|
|
40
47
|
## Required confirmations
|
|
41
48
|
|
|
@@ -58,9 +65,11 @@ one lifecycle operation. When Agent Runtime is enabled, also require
|
|
|
58
65
|
`acknowledgeAgentRuntimeReset`: all sandbox workspaces are permanently erased,
|
|
59
66
|
the supervisor identity is revoked, desired sandboxes are recreated empty
|
|
60
67
|
after reinstall, and all pinned profiles require refresh. Use only the guarded
|
|
61
|
-
CLI command and stop on `manual_review`. Reload
|
|
62
|
-
SSH host
|
|
63
|
-
|
|
68
|
+
CLI command and stop on `manual_review`. Reload invalidates the prior
|
|
69
|
+
owner-facing SSH host-key trust decision; the provider may rotate or preserve
|
|
70
|
+
the key. Verify the post-reload fingerprint through a trusted provider or
|
|
71
|
+
console channel, change `known_hosts` only when the verified key changed, and
|
|
72
|
+
never disable host-key checking.
|
|
64
73
|
|
|
65
74
|
An order preparation is unpaid but consumes a limited prepared-order slot.
|
|
66
75
|
Confirm the plan, hostname, OS, and public key before preparing it.
|
|
@@ -69,9 +78,13 @@ Confirm the plan, hostname, OS, and public key before preparing it.
|
|
|
69
78
|
|
|
70
79
|
- Reuse the same idempotency key only for the exact same logical request.
|
|
71
80
|
- For `payment_pending`, retry the exact checkout body and the exact same
|
|
72
|
-
payment
|
|
81
|
+
payment artifact. Do not create a replacement payment.
|
|
73
82
|
- A signed HTTP 402 rejects that signature. Use the new live challenge for one
|
|
74
|
-
replacement authorization.
|
|
83
|
+
replacement authorization after checking the new terms and approval.
|
|
84
|
+
- On timeout or restart after wallet authorization, reuse the saved x402api
|
|
85
|
+
attempt and artifact through WarpMetal. Never authorize again merely because
|
|
86
|
+
submission or fulfillment is uncertain, and never send the private owner
|
|
87
|
+
token through `x402api pay`, `payment submit`, or `payment reconcile`.
|
|
75
88
|
- Treat `manual_review` as terminal. Do not pay again and do not repeat the
|
|
76
89
|
mutation.
|
|
77
90
|
- Treat HTTP 202 as accepted or pending, never as proof of success. Poll the
|