warpmetal 0.3.1 → 0.4.1
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 +75 -4
- package/package.json +2 -2
- package/skills/warpmetal/SKILL.md +48 -17
- package/skills/warpmetal/agents/openai.yaml +2 -2
- package/skills/warpmetal/references/cli-reference.md +28 -4
- package/skills/warpmetal/references/payments.md +136 -0
- package/skills/warpmetal/references/runtime.md +1 -1
- package/skills/warpmetal/references/safety.md +29 -6
- 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,67 @@ 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. Payment authority depends on execution context:
|
|
85
|
+
|
|
86
|
+
- When a human is actively chatting with the agent, show the exact live terms
|
|
87
|
+
and ask for confirmation immediately before authorizing and submitting.
|
|
88
|
+
- In an unattended run, a pre-funded dedicated wallet is standing spend
|
|
89
|
+
authority, bounded by its maximum-payment policy and any task or operator
|
|
90
|
+
limits. When the live terms fit those limits, authorize and submit without
|
|
91
|
+
waiting for conversational approval.
|
|
92
|
+
|
|
93
|
+
Then invoke the returned authorization argv with a dedicated wallet name:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
x402api payment authorize \
|
|
97
|
+
--wallet <wallet-name> \
|
|
98
|
+
--request-envelope <path-returned-by-warpmetal> \
|
|
99
|
+
--artifact-out <path-returned-by-warpmetal> \
|
|
100
|
+
--json
|
|
101
|
+
|
|
102
|
+
warpmetal checkout submit \
|
|
103
|
+
--task <taskId> \
|
|
104
|
+
--payment-artifact <owner-only-artifact-path> \
|
|
105
|
+
--wait \
|
|
106
|
+
--json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Check the payer wallet address and balance with:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
x402api wallet address --wallet <wallet-name> --json
|
|
113
|
+
x402api wallet balance --wallet <wallet-name> --json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If funding is short in an interactive conversation, tell the human the exact
|
|
117
|
+
top-up in normal and atomic units, the network, stablecoin and contract/mint,
|
|
118
|
+
and the payer wallet's public receiving address. The human sends the token to
|
|
119
|
+
that wallet address, never to the token contract/mint or WarpMetal's payment
|
|
120
|
+
recipient, and never sends ETH or SOL for a sponsored payment. In an unattended
|
|
121
|
+
run, use a preconfigured refill or escalation mechanism or stop with
|
|
122
|
+
`funding_required`.
|
|
123
|
+
|
|
124
|
+
The x402api Agent Wallet is a separate, merchant-neutral executable. Install
|
|
125
|
+
its matching `x402api-pay` skill with `x402api skill install --output <agent-skill-directory>/x402api-pay --json`.
|
|
126
|
+
Do not use `x402api pay`, `payment submit`, or `payment reconcile` for WarpMetal:
|
|
127
|
+
checkout requires the private WarpMetal owner token, so x402api authorizes and
|
|
128
|
+
WarpMetal submits. WarpMetal keeps `--payment-signature-file` for another
|
|
129
|
+
compatible external signer.
|
|
130
|
+
|
|
61
131
|
## Security boundary
|
|
62
132
|
|
|
63
133
|
- Order and access tokens are never printed; they are written to
|
|
@@ -68,8 +138,9 @@ alternate state directory.
|
|
|
68
138
|
- WarpMetal applies key-only OpenSSH configuration on initial provisioning and
|
|
69
139
|
every OS reload. Password and keyboard-interactive login are disabled; never
|
|
70
140
|
request, store, or expect a VPS login password.
|
|
71
|
-
- The CLI
|
|
72
|
-
|
|
141
|
+
- The CLI writes x402api-compatible request envelopes and accepts validated
|
|
142
|
+
x402api payment artifacts or a compatible external `PAYMENT-SIGNATURE` file.
|
|
143
|
+
Wallet key management and signing remain outside this package.
|
|
73
144
|
- Destructive or state-changing commands require explicit confirmations and
|
|
74
145
|
generate idempotency keys by default.
|
|
75
146
|
- Runtime bootstrap credentials remain memory-only. Signed supervisor bundles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warpmetal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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,54 @@ 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
|
+
Determine payment authority from the current execution context. In an
|
|
77
|
+
interactive conversation, show the human the exact amount, asset, network,
|
|
78
|
+
recipient, profile, and maximum authorization lifetime from `paymentTerms`,
|
|
79
|
+
then obtain confirmation immediately before signing and submission. In an
|
|
80
|
+
unattended autonomous run, do not wait for conversational approval: treat the
|
|
81
|
+
dedicated wallet's available token balance as standing spend authority, bounded
|
|
82
|
+
by its maximum-payment policy and any task or operator limits. Proceed only
|
|
83
|
+
when the exact live terms fit those limits.
|
|
84
|
+
|
|
85
|
+
Follow [references/payments.md](references/payments.md) to install the exact
|
|
86
|
+
`paymentWorkflow.signerPackage.spec`, verify the V1 machine contract, install
|
|
87
|
+
its matching `x402api-pay` skill, and select or fund a dedicated
|
|
88
|
+
network-specific wallet. Require `agentWalletSupported: true`,
|
|
89
|
+
`sponsoredNetworkFee: true`, and `buyerNativeFeeRequired: false` on the chosen
|
|
90
|
+
live term. Never fall back to a historical buyer-funded or TRON profile.
|
|
91
|
+
|
|
92
|
+
After interactive confirmation or autonomous policy validation, invoke the
|
|
93
|
+
returned authorize argv once. The separate
|
|
94
|
+
`x402api` executable owns the wallet, validates the envelope, and writes the
|
|
95
|
+
payment artifact. Then invoke the returned submit argv, equivalent to:
|
|
75
96
|
|
|
76
97
|
```sh
|
|
77
98
|
warpmetal checkout submit \
|
|
78
99
|
--task <taskId> \
|
|
79
|
-
--payment-
|
|
100
|
+
--payment-artifact <owner-only-artifact-path> \
|
|
80
101
|
--wait \
|
|
81
102
|
--json
|
|
82
103
|
```
|
|
83
104
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
105
|
+
Do not use `x402api pay`, `x402api payment submit`, or `x402api payment
|
|
106
|
+
reconcile` for this checkout. Those commands submit credential-free requests,
|
|
107
|
+
but WarpMetal must add its private owner token locally.
|
|
108
|
+
|
|
109
|
+
WarpMetal verifies that the artifact matches the exact saved request and an
|
|
110
|
+
advertised sponsored requirement, gas reservation, resource, extensions, and
|
|
111
|
+
buyer payment identifier before sending its signature. The legacy
|
|
112
|
+
`--payment-signature-file` input remains available for another compatible
|
|
113
|
+
external signer. If a signed request returns a replacement challenge, use the
|
|
114
|
+
new CLI-produced workflow and re-evaluate payment authority. Ask again when a
|
|
115
|
+
human is chatting and the terms changed; in an unattended run, proceed only if
|
|
116
|
+
the replacement remains within standing authority. On `manual_review` or an
|
|
117
|
+
ambiguous attempt, stop and never create another payment.
|
|
87
118
|
|
|
88
119
|
## Provision and manage
|
|
89
120
|
|
|
@@ -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,136 @@
|
|
|
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. In an interactive conversation, create a wallet only with explicit
|
|
41
|
+
approval. In an unattended run, create one only when the automation policy
|
|
42
|
+
already permits it and a secure password source is configured; otherwise
|
|
43
|
+
reuse a preconfigured wallet or stop. Keep Base and Solana wallets separate;
|
|
44
|
+
never import the owner's primary seed or key. TRON wallet management exists,
|
|
45
|
+
but the published launch payer cannot authorize TRON.
|
|
46
|
+
5. Use both public, safe commands before requesting funding:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
x402api wallet address --wallet <name> --json
|
|
50
|
+
x402api wallet balance --wallet <name> --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
6. If funding is short in an interactive conversation, show the exact deficit
|
|
54
|
+
in normal token units and atomic units, the exact network, token symbol and
|
|
55
|
+
contract/mint, and the payer wallet's public receiving address. Tell the
|
|
56
|
+
human to transfer the token to the payer wallet address, never to the token
|
|
57
|
+
contract/mint or `paymentTerms.recipient`. Sponsored launch payments never
|
|
58
|
+
ask the buyer to fund ETH or SOL. Recheck the balance after the transfer.
|
|
59
|
+
7. If funding is short in an unattended run, use only a preconfigured refill
|
|
60
|
+
or escalation mechanism. Otherwise report `funding_required` and stop; do
|
|
61
|
+
not invent a human approval step or funding source.
|
|
62
|
+
|
|
63
|
+
Treat the dedicated wallet's funded balance as spend authority available to
|
|
64
|
+
the agent, bounded by any wallet-local maximum payment policy and task or
|
|
65
|
+
operator limits. When a human is actively chatting, disclose the exact live
|
|
66
|
+
terms and obtain confirmation immediately before payment. In an unattended
|
|
67
|
+
run, do not wait for conversational approval; authorize and submit
|
|
68
|
+
autonomously when the terms fit the standing authority.
|
|
69
|
+
|
|
70
|
+
Use this structure when asking a human to fund the wallet:
|
|
71
|
+
|
|
72
|
+
> Transfer exactly `<amount> <USDC-or-USDT>` on `<Base-or-Solana>` to the agent
|
|
73
|
+
> wallet `<payer-wallet-address>`. Token contract/mint: `<asset-identifier>`.
|
|
74
|
+
> Send the token to the payer wallet address, not to the token contract/mint and
|
|
75
|
+
> not to WarpMetal's payment recipient. Do not send ETH or SOL; the network fee
|
|
76
|
+
> is sponsored.
|
|
77
|
+
|
|
78
|
+
## Exact purchase workflow
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
warpmetal checkout challenge --task <taskId> --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Read only the returned safe JSON. Confirm `paymentTerms`, then use the exact
|
|
85
|
+
argv arrays returned under `paymentWorkflow`:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
paymentWorkflow.authorize.argv
|
|
89
|
+
x402api payment authorize --wallet <wallet-name>
|
|
90
|
+
--request-envelope <owner-only-request-path>
|
|
91
|
+
--artifact-out <owner-only-artifact-path> --json
|
|
92
|
+
|
|
93
|
+
paymentWorkflow.submit.argv
|
|
94
|
+
warpmetal checkout submit --task <taskId>
|
|
95
|
+
--payment-artifact <owner-only-artifact-path> --wait --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Replace only `<wallet-name>` after selecting the wallet for the advertised
|
|
99
|
+
network. Do not parse, rewrite, copy, or display the request envelope or payment
|
|
100
|
+
artifact. The envelope excludes the WarpMetal owner token; the artifact holds
|
|
101
|
+
the complete payment signature and remains owner-only.
|
|
102
|
+
|
|
103
|
+
Choose only a term marked `agentWalletSupported: true`,
|
|
104
|
+
`sponsoredNetworkFee: true`, and `buyerNativeFeeRequired: false`. The supported
|
|
105
|
+
launch profiles are sponsored Base USDC and sponsored Solana USDC/USDT, bound
|
|
106
|
+
by the strict `com.x402api.gas-sponsorship` extension. Stop on an expired gas
|
|
107
|
+
reservation or any buyer-funded, unsupported, or unbound alternative.
|
|
108
|
+
|
|
109
|
+
Do not replace the two-stage workflow with `x402api pay`, `payment submit`, or
|
|
110
|
+
`payment reconcile`. Those wallet commands can submit an exact credential-free
|
|
111
|
+
endpoint; WarpMetal checkout requires a private owner token that must never
|
|
112
|
+
enter the wallet envelope. Use x402api only for authorization and WarpMetal for
|
|
113
|
+
submission and merchant reconciliation.
|
|
114
|
+
|
|
115
|
+
WarpMetal rejects an artifact whose request digest, selected payment
|
|
116
|
+
requirement, resource, extension set, buyer payment identifier, signature,
|
|
117
|
+
expiry, sponsorship lifetime, file type, or permissions do not match the saved
|
|
118
|
+
challenge. Keep `--payment-signature-file` only as a compatibility path for
|
|
119
|
+
another external signer.
|
|
120
|
+
|
|
121
|
+
## Retries and recovery
|
|
122
|
+
|
|
123
|
+
- `payment_pending` or `payment_finalizing`: keep the same checkout bytes and
|
|
124
|
+
artifact. `--wait` performs bounded retries with that exact authorization.
|
|
125
|
+
- Timeout or process restart after authorization: use the saved x402api attempt
|
|
126
|
+
ID and artifact. Reconcile with WarpMetal and reuse its submit argv. Never
|
|
127
|
+
authorize again merely because submission is unknown.
|
|
128
|
+
- Signed HTTP 402: the artifact was definitively rejected. Run the WarpMetal
|
|
129
|
+
challenge flow again, inspect the replacement terms, and authorize one new
|
|
130
|
+
artifact only when the protocol and current interactive or autonomous
|
|
131
|
+
payment authority allow it.
|
|
132
|
+
- `manual_review`: payment or fulfillment may be final. Stop all payment and
|
|
133
|
+
mutation retries.
|
|
134
|
+
- Expired or corrupt artifact, changed request digest, unexpected recipient,
|
|
135
|
+
unsupported network, asset, profile, sponsorship error, or request-binding
|
|
136
|
+
mismatch: stop instead of falling back or asking the buyer to fund ETH/SOL.
|
|
@@ -44,7 +44,7 @@ fields `name`, `size`, optional `lifetime`, and optional `expiresInSeconds`:
|
|
|
44
44
|
|
|
45
45
|
Pass it to `warpmetal order prepare --runtime-file <path>`. If it contains a
|
|
46
46
|
temporary sandbox, pass `--confirm TEMPORARY`. Preparing remains unpaid; keep
|
|
47
|
-
the existing separate payment
|
|
47
|
+
the existing separate interactive-or-autonomous payment authority check.
|
|
48
48
|
|
|
49
49
|
For an existing ready server:
|
|
50
50
|
|
|
@@ -34,12 +34,20 @@
|
|
|
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
|
+
## Interactive confirmations and autonomous payment authority
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
When a human is actively directing the current task in a conversation, obtain
|
|
50
|
+
explicit approval immediately before:
|
|
43
51
|
|
|
44
52
|
- installing the CLI or skill;
|
|
45
53
|
- installing or repairing the Agent Runtime supervisor;
|
|
@@ -51,6 +59,16 @@ Obtain explicit user approval immediately before:
|
|
|
51
59
|
- revoking a sandbox access grant; and
|
|
52
60
|
- any destructive reload, sandbox deletion, or replacement-key operation.
|
|
53
61
|
|
|
62
|
+
In an unattended autonomous run, do not pause payment for conversational
|
|
63
|
+
approval. A pre-funded dedicated wallet provides standing spend authority,
|
|
64
|
+
bounded by its maximum-payment policy and any task or operator limits. Sign and
|
|
65
|
+
submit only when the exact live amount, asset, network, recipient, profile,
|
|
66
|
+
resource binding, and sponsorship fit those limits. Unattended mode does not
|
|
67
|
+
grant unlimited spend, permission to import a primary wallet, or permission to
|
|
68
|
+
use unsupported or buyer-funded payment rails. If the wallet is short and no
|
|
69
|
+
preconfigured refill or escalation mechanism exists, report
|
|
70
|
+
`funding_required` and stop.
|
|
71
|
+
|
|
54
72
|
A reload requires both `confirm: "ERASE"` and `powerOffFirst: true`. Treat
|
|
55
73
|
`powerOffFirst` as explicit authorization for WarpMetal to shut down the
|
|
56
74
|
server, wait until it is powered off, and then erase and reinstall it inside
|
|
@@ -71,9 +89,14 @@ Confirm the plan, hostname, OS, and public key before preparing it.
|
|
|
71
89
|
|
|
72
90
|
- Reuse the same idempotency key only for the exact same logical request.
|
|
73
91
|
- For `payment_pending`, retry the exact checkout body and the exact same
|
|
74
|
-
payment
|
|
92
|
+
payment artifact. Do not create a replacement payment.
|
|
75
93
|
- A signed HTTP 402 rejects that signature. Use the new live challenge for one
|
|
76
|
-
replacement authorization
|
|
94
|
+
replacement authorization after checking the new terms against the current
|
|
95
|
+
interactive or autonomous payment authority.
|
|
96
|
+
- On timeout or restart after wallet authorization, reuse the saved x402api
|
|
97
|
+
attempt and artifact through WarpMetal. Never authorize again merely because
|
|
98
|
+
submission or fulfillment is uncertain, and never send the private owner
|
|
99
|
+
token through `x402api pay`, `payment submit`, or `payment reconcile`.
|
|
77
100
|
- Treat `manual_review` as terminal. Do not pay again and do not repeat the
|
|
78
101
|
mutation.
|
|
79
102
|
- Treat HTTP 202 as accepted or pending, never as proof of success. Poll the
|