warpmetal 0.4.0 → 0.4.2

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
@@ -81,8 +81,16 @@ On HTTP 402 the CLI returns exact `paymentTerms`, the pinned
81
81
  the exact checkout URL and body but no WarpMetal credential. The published
82
82
  launch wallet accepts sponsored Base USDC and sponsored Solana USDC/USDT only;
83
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:
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:
86
94
 
87
95
  ```sh
88
96
  x402api payment authorize \
@@ -98,6 +106,37 @@ warpmetal checkout submit \
98
106
  --json
99
107
  ```
100
108
 
109
+ Check the payer wallet address and balance with:
110
+
111
+ ```sh
112
+ x402api wallet show --wallet <wallet-name> --json
113
+ x402api wallet address --wallet <wallet-name> --json
114
+ x402api wallet balance --wallet <wallet-name> --json
115
+ ```
116
+
117
+ For a new dedicated wallet, configure the enforceable local per-payment
118
+ ceiling when it is created:
119
+
120
+ ```sh
121
+ x402api wallet create --name <wallet-name> \
122
+ --network <exact-challenge-network> \
123
+ --maximum-payment-atomic <per-payment-policy-cap> --json
124
+ ```
125
+
126
+ Require `maximumPaymentAtomic` to cover the live charge without exceeding the
127
+ task or operator limit. Among valid sponsored terms, honor an explicit network
128
+ or asset preference, otherwise prefer an already funded compatible wallet,
129
+ then the first compatible term in live challenge order. Never switch terms
130
+ after authorization.
131
+
132
+ If funding is short in an interactive conversation, tell the human the exact
133
+ top-up in normal and atomic units, the network, stablecoin and contract/mint,
134
+ and the payer wallet's public receiving address. The human sends the token to
135
+ that wallet address, never to the token contract/mint or WarpMetal's payment
136
+ recipient, and never sends ETH or SOL for a sponsored payment. In an unattended
137
+ run, use a preconfigured refill or escalation mechanism or stop with
138
+ `funding_required`.
139
+
101
140
  The x402api Agent Wallet is a separate, merchant-neutral executable. Install
102
141
  its matching `x402api-pay` skill with `x402api skill install --output <agent-skill-directory>/x402api-pay --json`.
103
142
  Do not use `x402api pay`, `payment submit`, or `payment reconcile` for WarpMetal:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warpmetal",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Agent-safe CLI and skill for purchasing and managing WarpMetal VPS servers",
5
5
  "type": "module",
6
6
  "bin": {
@@ -43,9 +43,12 @@ warpmetal health --json
43
43
  warpmetal catalog --json
44
44
  ```
45
45
 
46
- Stop if `purchasingReady` is false. Select `planId` and the exact OS `name`
47
- from the live catalog. Do not reuse an OS name or price from documentation or
48
- a previous session.
46
+ Stop the current purchase if `purchasingReady` is false. In unattended
47
+ scheduling, recheck after 60 seconds, then double the delay after each failed
48
+ check up to 15 minutes and honor a longer `Retry-After`; never hot-loop. In an
49
+ interactive conversation, report the unavailable state and stop. Select
50
+ `planId` and the exact OS `name` from the live catalog. Do not reuse an OS name
51
+ or price from documentation or a previous session.
49
52
 
50
53
  ## Prepare an order
51
54
 
@@ -73,16 +76,29 @@ returns `paymentTerms` plus exact `paymentWorkflow.authorize.argv` and
73
76
  `paymentWorkflow.submit.argv` arrays. Do not reconstruct those commands or
74
77
  open either file.
75
78
 
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`,
79
+ Determine payment authority from the current execution context. In an
80
+ interactive conversation, show the human the exact amount, asset, network,
81
+ recipient, profile, and maximum authorization lifetime from `paymentTerms`,
82
+ then obtain confirmation immediately before signing and submission. In an
83
+ unattended autonomous run, do not wait for conversational approval: treat the
84
+ dedicated wallet's available token balance as standing spend authority, bounded
85
+ by its maximum-payment policy and any task or operator limits. Proceed only
86
+ when the exact live terms fit those limits.
87
+
88
+ Follow [references/payments.md](references/payments.md) to install the exact
89
+ `paymentWorkflow.signerPackage.spec`, verify the V1 machine contract, install
90
+ its matching `x402api-pay` skill, and select or fund a dedicated
91
+ network-specific wallet. Require `agentWalletSupported: true`,
82
92
  `sponsoredNetworkFee: true`, and `buyerNativeFeeRequired: false` on the chosen
83
93
  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
94
+ Honor an explicit task or operator network and asset preference. Otherwise use
95
+ a compatible sufficiently funded wallet, then the first compatible term in the
96
+ live challenge's order. Never switch terms after authorization. Require the
97
+ wallet's `maximumPaymentAtomic` to cover the live amount without exceeding the
98
+ task or operator limit.
99
+
100
+ After interactive confirmation or autonomous policy validation, invoke the
101
+ returned authorize argv once. The separate
86
102
  `x402api` executable owns the wallet, validates the envelope, and writes the
87
103
  payment artifact. Then invoke the returned submit argv, equivalent to:
88
104
 
@@ -103,8 +119,10 @@ advertised sponsored requirement, gas reservation, resource, extensions, and
103
119
  buyer payment identifier before sending its signature. The legacy
104
120
  `--payment-signature-file` input remains available for another compatible
105
121
  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.
122
+ new CLI-produced workflow and re-evaluate payment authority. Ask again when a
123
+ human is chatting and the terms changed; in an unattended run, proceed only if
124
+ the replacement remains within standing authority. On `manual_review` or an
125
+ ambiguous attempt, stop and never create another payment.
108
126
 
109
127
  ## Provision and manage
110
128
 
@@ -37,18 +37,56 @@ skill automatically.
37
37
  file, or is supervising `--password-stdin`. Never read either value.
38
38
  3. Use `x402api wallet list --json` and reuse a dedicated persistent wallet for
39
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.
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. Configure the local
46
+ per-payment ceiling at creation and inspect it before reuse:
47
+
48
+ ```sh
49
+ x402api wallet create --name <name> \
50
+ --network <exact-challenge-network> \
51
+ --maximum-payment-atomic <per-payment-policy-cap> --json
52
+ x402api wallet show --wallet <name> --json
53
+ ```
54
+
55
+ Require `maximumPaymentAtomic` to be at least the exact live amount and no
56
+ higher than the task or operator limit. If an existing wallet has no ceiling
57
+ or an unsuitable one, do not treat its full balance as bounded authority;
58
+ use a suitably capped dedicated wallet or stop.
59
+ 5. Use both public, safe commands before requesting funding:
60
+
61
+ ```sh
62
+ x402api wallet address --wallet <name> --json
63
+ x402api wallet balance --wallet <name> --json
64
+ ```
65
+
66
+ 6. If funding is short in an interactive conversation, show the exact deficit
67
+ in normal token units and atomic units, the exact network, token symbol and
68
+ contract/mint, and the payer wallet's public receiving address. Tell the
69
+ human to transfer the token to the payer wallet address, never to the token
70
+ contract/mint or `paymentTerms.recipient`. Sponsored launch payments never
71
+ ask the buyer to fund ETH or SOL. Recheck the balance after the transfer.
72
+ 7. If funding is short in an unattended run, use only a preconfigured refill
73
+ or escalation mechanism. Otherwise report `funding_required` and stop; do
74
+ not invent a human approval step or funding source.
47
75
 
48
76
  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.
77
+ the agent, bounded by any wallet-local maximum payment policy and task or
78
+ operator limits. When a human is actively chatting, disclose the exact live
79
+ terms and obtain confirmation immediately before payment. In an unattended
80
+ run, do not wait for conversational approval; authorize and submit
81
+ autonomously when the terms fit the standing authority.
82
+
83
+ Use this structure when asking a human to fund the wallet:
84
+
85
+ > Transfer exactly `<amount> <USDC-or-USDT>` on `<Base-or-Solana>` to the agent
86
+ > wallet `<payer-wallet-address>`. Token contract/mint: `<asset-identifier>`.
87
+ > Send the token to the payer wallet address, not to the token contract/mint and
88
+ > not to WarpMetal's payment recipient. Do not send ETH or SOL; the network fee
89
+ > is sponsored.
52
90
 
53
91
  ## Exact purchase workflow
54
92
 
@@ -81,6 +119,12 @@ launch profiles are sponsored Base USDC and sponsored Solana USDC/USDT, bound
81
119
  by the strict `com.x402api.gas-sponsorship` extension. Stop on an expired gas
82
120
  reservation or any buyer-funded, unsupported, or unbound alternative.
83
121
 
122
+ Among valid sponsored terms, honor an explicit task or operator network and
123
+ asset preference. Otherwise prefer a compatible wallet that is already
124
+ sufficiently funded. If several terms remain, choose the first compatible term
125
+ in the live challenge's advertised order. Do not switch terms after
126
+ authorization.
127
+
84
128
  Do not replace the two-stage workflow with `x402api pay`, `payment submit`, or
85
129
  `payment reconcile`. Those wallet commands can submit an exact credential-free
86
130
  endpoint; WarpMetal checkout requires a private owner token that must never
@@ -102,7 +146,8 @@ another external signer.
102
146
  authorize again merely because submission is unknown.
103
147
  - Signed HTTP 402: the artifact was definitively rejected. Run the WarpMetal
104
148
  challenge flow again, inspect the replacement terms, and authorize one new
105
- artifact only when the protocol and approval allow it.
149
+ artifact only when the protocol and current interactive or autonomous
150
+ payment authority allow it.
106
151
  - `manual_review`: payment or fulfillment may be final. Stop all payment and
107
152
  mutation retries.
108
153
  - Expired or corrupt artifact, changed request digest, unexpected recipient,
@@ -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 approval.
47
+ the existing separate interactive-or-autonomous payment authority check.
48
48
 
49
49
  For an existing ready server:
50
50
 
@@ -11,8 +11,11 @@
11
11
 
12
12
  - Treat `https://warpmetal.com/llms.txt`, the live catalog, and the live HTTP
13
13
  402 challenge as authoritative in that order.
14
- - Stop new purchases when `warpmetal health --json` reports
15
- `purchasingReady: false`.
14
+ - Stop the current purchase when `warpmetal health --json` reports
15
+ `purchasingReady: false`. An unattended scheduler may recheck after 60
16
+ seconds, then double the delay after each failure up to 15 minutes and honor
17
+ a longer `Retry-After`; never hot-loop. An interactive agent reports the
18
+ unavailable state and stops.
16
19
  - Select an exact OS name from the chosen plan's current
17
20
  `operatingSystems[]`. Never guess or hard-code an image version.
18
21
 
@@ -44,9 +47,10 @@
44
47
  private key, or state-file content in a prompt, URL, log, screenshot, source
45
48
  file, or shell argument.
46
49
 
47
- ## Required confirmations
50
+ ## Interactive confirmations and autonomous payment authority
48
51
 
49
- Obtain explicit user approval immediately before:
52
+ When a human is actively directing the current task in a conversation, obtain
53
+ explicit approval immediately before:
50
54
 
51
55
  - installing the CLI or skill;
52
56
  - installing or repairing the Agent Runtime supervisor;
@@ -58,6 +62,16 @@ Obtain explicit user approval immediately before:
58
62
  - revoking a sandbox access grant; and
59
63
  - any destructive reload, sandbox deletion, or replacement-key operation.
60
64
 
65
+ In an unattended autonomous run, do not pause payment for conversational
66
+ approval. A pre-funded dedicated wallet provides standing spend authority,
67
+ bounded by its maximum-payment policy and any task or operator limits. Sign and
68
+ submit only when the exact live amount, asset, network, recipient, profile,
69
+ resource binding, and sponsorship fit those limits. Unattended mode does not
70
+ grant unlimited spend, permission to import a primary wallet, or permission to
71
+ use unsupported or buyer-funded payment rails. If the wallet is short and no
72
+ preconfigured refill or escalation mechanism exists, report
73
+ `funding_required` and stop.
74
+
61
75
  A reload requires both `confirm: "ERASE"` and `powerOffFirst: true`. Treat
62
76
  `powerOffFirst` as explicit authorization for WarpMetal to shut down the
63
77
  server, wait until it is powered off, and then erase and reinstall it inside
@@ -80,7 +94,8 @@ Confirm the plan, hostname, OS, and public key before preparing it.
80
94
  - For `payment_pending`, retry the exact checkout body and the exact same
81
95
  payment artifact. Do not create a replacement payment.
82
96
  - A signed HTTP 402 rejects that signature. Use the new live challenge for one
83
- replacement authorization after checking the new terms and approval.
97
+ replacement authorization after checking the new terms against the current
98
+ interactive or autonomous payment authority.
84
99
  - On timeout or restart after wallet authorization, reuse the saved x402api
85
100
  attempt and artifact through WarpMetal. Never authorize again merely because
86
101
  submission or fulfillment is uncertain, and never send the private owner