warpmetal 0.4.0 → 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 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,21 @@ 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 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
+
101
124
  The x402api Agent Wallet is a separate, merchant-neutral executable. Install
102
125
  its matching `x402api-pay` skill with `x402api skill install --output <agent-skill-directory>/x402api-pay --json`.
103
126
  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.1",
4
4
  "description": "Agent-safe CLI and skill for purchasing and managing WarpMetal VPS servers",
5
5
  "type": "module",
6
6
  "bin": {
@@ -73,16 +73,24 @@ returns `paymentTerms` plus exact `paymentWorkflow.authorize.argv` and
73
73
  `paymentWorkflow.submit.argv` arrays. Do not reconstruct those commands or
74
74
  open either file.
75
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`,
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`,
82
89
  `sponsoredNetworkFee: true`, and `buyerNativeFeeRequired: false` on the chosen
83
90
  live term. Never fall back to a historical buyer-funded or TRON profile.
84
91
 
85
- After approval, invoke the returned authorize argv once. The separate
92
+ After interactive confirmation or autonomous policy validation, invoke the
93
+ returned authorize argv once. The separate
86
94
  `x402api` executable owns the wallet, validates the envelope, and writes the
87
95
  payment artifact. Then invoke the returned submit argv, equivalent to:
88
96
 
@@ -103,8 +111,10 @@ advertised sponsored requirement, gas reservation, resource, extensions, and
103
111
  buyer payment identifier before sending its signature. The legacy
104
112
  `--payment-signature-file` input remains available for another compatible
105
113
  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.
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.
108
118
 
109
119
  ## Provision and manage
110
120
 
@@ -37,18 +37,43 @@ 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.
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.
47
62
 
48
63
  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.
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.
52
77
 
53
78
  ## Exact purchase workflow
54
79
 
@@ -102,7 +127,8 @@ another external signer.
102
127
  authorize again merely because submission is unknown.
103
128
  - Signed HTTP 402: the artifact was definitively rejected. Run the WarpMetal
104
129
  challenge flow again, inspect the replacement terms, and authorize one new
105
- artifact only when the protocol and approval allow it.
130
+ artifact only when the protocol and current interactive or autonomous
131
+ payment authority allow it.
106
132
  - `manual_review`: payment or fulfillment may be final. Stop all payment and
107
133
  mutation retries.
108
134
  - 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
 
@@ -44,9 +44,10 @@
44
44
  private key, or state-file content in a prompt, URL, log, screenshot, source
45
45
  file, or shell argument.
46
46
 
47
- ## Required confirmations
47
+ ## Interactive confirmations and autonomous payment authority
48
48
 
49
- Obtain explicit user approval immediately before:
49
+ When a human is actively directing the current task in a conversation, obtain
50
+ explicit approval immediately before:
50
51
 
51
52
  - installing the CLI or skill;
52
53
  - installing or repairing the Agent Runtime supervisor;
@@ -58,6 +59,16 @@ Obtain explicit user approval immediately before:
58
59
  - revoking a sandbox access grant; and
59
60
  - any destructive reload, sandbox deletion, or replacement-key operation.
60
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
+
61
72
  A reload requires both `confirm: "ERASE"` and `powerOffFirst: true`. Treat
62
73
  `powerOffFirst` as explicit authorization for WarpMetal to shut down the
63
74
  server, wait until it is powered off, and then erase and reinstall it inside
@@ -80,7 +91,8 @@ Confirm the plan, hostname, OS, and public key before preparing it.
80
91
  - For `payment_pending`, retry the exact checkout body and the exact same
81
92
  payment artifact. Do not create a replacement payment.
82
93
  - A signed HTTP 402 rejects that signature. Use the new live challenge for one
83
- replacement authorization after checking the new terms and approval.
94
+ replacement authorization after checking the new terms against the current
95
+ interactive or autonomous payment authority.
84
96
  - On timeout or restart after wallet authorization, reuse the saved x402api
85
97
  attempt and artifact through WarpMetal. Never authorize again merely because
86
98
  submission or fulfillment is uncertain, and never send the private owner