@heyamiko/amiko-cli 0.7.8 → 0.7.10

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
@@ -1,4 +1,4 @@
1
- # @heyamiko/amiko-cli (v0.7.8)
1
+ # @heyamiko/amiko-cli (v0.7.10)
2
2
 
3
3
  Manage wallets, credits, swaps, and MPP marketplace services from the terminal. Works for both human users and AI agents running on OpenClaw.
4
4
 
@@ -189,6 +189,25 @@ amiko service call POST /v1/music/plan '{"prompt":"Epic orchestral piece"}'
189
189
 
190
190
  Audio and image endpoints upload to Supabase Storage and return permanent URLs.
191
191
 
192
+ ## Confirmation Gate for Paid Commands
193
+
194
+ Every paid command (`image`, `search`, `amazon search`, `service tts`, `service stt`, `service chat`, `service call`, `credits topup`) requires explicit approval before spending:
195
+
196
+ - **Human, interactive shell** — the command prints the cost and prompts `Proceed? [y/N]`. Answer `y` to run.
197
+ - **Agent / non-interactive shell** — the command *refuses* to run without `--yes`, with a message telling the agent what to do:
198
+
199
+ ```
200
+ Refusing to run without --yes (non-interactive shell detected).
201
+
202
+ This command will cost 5 AMIKO.
203
+ Action: Generate image: a sunset over mountains
204
+
205
+ Quote the cost to the user, get their explicit approval, then re-run with --yes:
206
+ amiko image "a sunset over mountains" --yes
207
+ ```
208
+
209
+ This makes cost confirmation effectively mandatory regardless of which model drives the agent — weak models can no longer silently burn tokens by ignoring the skill docs.
210
+
192
211
  ## Error Output
193
212
 
194
213
  When a paid command fails (payment already sent, but the upstream service returned 4xx/5xx), the CLI prints the actual upstream response body so you can see the real failure reason:
@@ -221,10 +240,21 @@ amiko wallet fund # fund via Tempo dashboard
221
240
  amiko discovery # MPP service info + pricing
222
241
  amiko config show # view config
223
242
  amiko config set <key> <value> # set config value
224
- amiko update # update CLI to latest
243
+ amiko update # update CLI to latest (full twin refresh — no restart needed)
225
244
  amiko --help # all commands
226
245
  ```
227
246
 
247
+ ### `amiko update` on twins
248
+
249
+ On Claude/Amiko twin containers, the CLI is persisted to `/data/.amiko-cli/` so updates survive restarts, and `/usr/local/bin/amiko` is symlinked into that directory. Running `amiko update`:
250
+
251
+ 1. `npm install -g @heyamiko/amiko-cli@latest` (global package update)
252
+ 2. If `/data/.amiko-cli/` exists (i.e. we're on a twin), copy the new package over it
253
+ 3. Refresh the `/usr/local/bin/amiko` symlink
254
+ 4. Copy the updated `skills/SKILL.md` to both `/data/.openclaw/skills/amiko-cli/` and `/data/.openclaw/workspace/skills/amiko-cli/` so the agent sees the new docs immediately
255
+
256
+ The result is a one-shot upgrade — no container redeploy required. On non-twin machines (local dev, CI) step (2)–(4) are skipped.
257
+
228
258
  ## Agent Integration (OpenClaw)
229
259
 
230
260
  ### Install as OpenClaw plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.7.8",
3
+ "version": "0.7.10",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/SKILL.md CHANGED
@@ -15,8 +15,8 @@ The `amiko` CLI is installed globally. Auth and payments are automatic via `.ami
15
15
 
16
16
  ## Critical Rules
17
17
 
18
- 1. **Always confirm the price with the user BEFORE running any paid command.** This is non-negotiable. For every one of: `topup`, `search`, `image`, `amazon search`, `service call`, `service tts`, `swap send` — you must first quote the exact cost in the relevant unit (AMIKO, $USD, or gas), wait for the user's explicit "yes" / "go ahead" / "do it", and only then run the command. Do not pre-empt; do not batch multiple paid calls; do not use `--yes` unless the user has just approved this specific call.
19
- 2. **After every paid command, report the remaining balance to the user.** The CLI now prints a `Balance: N credits (~$X.XX)` line at the end of every paid command. Include that figure in your reply so the user knows what they have left.
18
+ 1. **Every paid command is hard-gated on `--yes` in a non-interactive shell.** The CLI will *refuse* to run `image`, `search`, `amazon search`, `service call`, `service tts`, `service stt`, `service chat`, or `credits topup` unless you pass `--yes`. The refusal is loud: it prints the cost and the command you should re-run with `--yes` appended. This means: **you must first quote the cost to the user, get their explicit approval, and only then append `--yes`**. If the user didn't approve, do not add `--yes`.
19
+ 2. **After every paid command, report the remaining balance to the user.** The CLI prints a `Balance: N credits (~$X.XX)` line at the end of every paid command — include that figure in your reply so the user knows what they have left.
20
20
  3. **Never retry a failed command.** If a command returns an error, report it and stop. Every paid call costs tokens even on failure.
21
21
  4. **Never suggest `amiko login` or `amiko connect`.** These commands don't exist. Auth is automatic via `.amiko.json`.
22
22
  5. **Check balance before expensive operations.** Run `amiko credits balance` first if unsure about funds.
@@ -147,7 +147,7 @@ amiko bridge send 10 --from solana --to tempo # execute bridge
147
147
  amiko wallet balance [address] # USDC.e balance on Tempo
148
148
  amiko discovery # MPP service info + pricing
149
149
  amiko config show # view config
150
- amiko update # update CLI to latest
150
+ amiko update # update CLI to latest (on twins: also refreshes /data, symlink, skill)
151
151
  amiko --help # all commands
152
152
  ```
153
153