Mercury CLI
Documentation

Releases

1.0.0-beta.43

published 24 October 2026

  • Added Hyperstack, Verda and DigitalOcean to `/llmhost` alongside Runpod, Vast.ai, Lambda and Hugging Face: connect an API key (or Verda `Client ID:Client Secret`) from a model screen, `Vendor keys` or `More options →` → `Rent a GPU` so Hyperstack, Verda and DigitalOcean appear on the Rent screen with live stock and hourly prices across the 78 shipped recipes for 32 models in `assets/host/recipes.json` (docs/LLM-HOST.md)
  • Added a `Weights` source chooser on rental and stock-watch confirmations and a `Private recipes` file chooser in `/llmhost`: select `Weights` on `Confirm the hourly price` to choose `Hugging Face`, a `Private repository` (verifying shard paths, sizes and SHA-256 digests against the recipe manifest and downloading on the rented machine with your `/logins huggingface` sign-in before removing the token file), `This computer's Bank` (uploading your local bank over SSH), or a `Kept volume` on Runpod or Vast.ai, and open `Private recipes` from `More options →` or a private model screen to validate, preview and save a custom recipes JSON file (from an absolute path, `MERCURY_HOST_RECIPES_FILE` or `<config>/host/private-recipes.json`) in `<config>/host/recipes-file.json` (docs/LLM-HOST.md)
  • Added bundled FilmCraft (`0.12.0`), PhotoCraft (`0.14.0`) and LightCraft (`0.13.0`) extensions in `/extensions` with a shared installer and MCP bootstrap: each extension provides its skill (`/filmcraft:filmcraft`, `/photocraft:photocraft`, `/lightcraft:lightcraft`) and three bootstrap tools: `craft_status` to inspect the local installation without downloading or opening the app, `craft_install` to ask for confirmation with the version, byte size and destination before downloading and hash-verifying the application and CLI archives, and `craft_connect` to verify and attach to your open control-enabled window (`mode: "attach"`), launch the window (`mode: "launch"`), or start a separate headless session (docs/EXTENSIONS.md)
  • Added `mercury usage --history` to report input tokens, output tokens, cache-hit rate, estimated USD and unpriced turns across saved local transcripts grouped by UTC day, model and project: filter by `--days <N>` or `--project`, pass `--json` for the structured report, reuse a bounded local summary cache (up to 4,096 files and 32,768 hourly rows) alongside up to 4,096 hourly provider meter observations without contacting providers, and price DeepSeek turns by request start time against peak and half-price off-peak UTC hours and the 2026 holiday calendar (docs/AUTOMATION.md)
  • Added single-file restore, `Undo the rewind`, and a 500 MB file-history cap to `/rewind` and `mercury runner`: choose `Restore <file>` in `/rewind` (or `session/file_restore` with `action: "restore"` in `mercury runner`, with tracked `files` and `undo` reported in `fileCheckpoints` session facts) to restore one file at a checkpoint while leaving other files and the conversation untouched, choose `Undo the rewind` (or `action: "undo"`) before your next prompt to restore the pre-rewind bytes saved before a file restore, and inspect the 500 MB `<config>/file-history` usage and limit under `State cleanup` in `/health` (docs/SESSIONS.md)
  • Added adapter-requested `runInTerminal` execution, configurable `timeoutMs` stop waits and operation cancellation to the `Debug` tool: `runInTerminal` requests (both `integrated` and `external`) run through the session's `Bash` permission checks and guards as session-managed processes without opening a terminal window, stream stdout and stderr tagged `[debuggee]` into `Debug`'s output buffer, and terminate the process tree on `disconnect`; `launch`, `attach`, `continue`, stepping, `pause` and `restart` accept `timeoutMs` (default 10,000 ms, leaving the program running on timeout), and aborting a call cancels in-flight DAP requests and stop waits immediately (docs/DEBUGGER.md)
  • Added `lossless: true` on `Read`, clipped-line refusals on `Edit`, `Write` and `ChangeSet`, settled `parallel()` batches on `Eval`, and self-owned `TaskStop` for crewmates: `Read` accepts `lossless: true` with `offset` + `limit` or `ranges` to return complete lines past 2,000 characters within the token budget while `Edit`, `Write` and `ChangeSet` refuse to replace or overwrite a line that was clipped in `Read` or omitted in `Grep` (naming the exact `lossless: true` `Read` call), `Eval` `parallel()` accepts `settled: true` (`settled=True` in Python) to return input-ordered `{ ok, value | error }` records with `error.kind` (`permission`, `cancelled` or `error`) and `parallel.results`, and `TaskStop` allows a crewmate to stop its own background command (docs/CREW.md)
  • Changed GPU rental and cluster fault handling in `/llmhost` so no setup or runtime check terminates a rented machine on its own: when a rental or Runpod cluster hits an engine exit or out-of-memory error, 10 minutes of engine log silence past the setup budget, a weight download stall under 1 GB in 10 minutes, SSH key refusals past the setup deadline, five failed tunnel reconnects after setup, or a cluster node fault, Mercury pauses the record with the machine running, closes the local tunnel, and posts one notice naming the cause, the machine, the hourly rate still billing, and `Resume` or `Terminate` in `/llmhost`, while a background sweep every 5 minutes automatically terminates a rental only after 2 hours with no model request or 2 hours in an unanswered pause (docs/LLM-HOST.md)
  • Changed `Which model?`, rental rows, GGUF pre-rental checks, and tunnel link tracking in `/llmhost`: `Which model?` places `Machines I'm paying for` and `Vendor keys` at the top above `MODELS`, opens the cursor on the cheapest in-stock model, and sorts models by where they can run (already running on your machine, fits one of your computers, in stock at the lowest hourly price across connected providers, then out of stock or unconnected); pre-rental GGUF checks verify tensor dimensions (up to 4), `ggml` tensor types against the 35 supported types in `assets/host/llamacpp-engine.json` (alongside the OCI image digest and CUDA architectures `100;103;120`), and multi-shard split counts and duplicate tensor names; and `/llmhost` records tunnel link drops under `<config>/host/reliability/`, reuses a still-answering engine on `Resume setup` without restarting it or re-downloading weights, and sorts Vast.ai machines with prior link drops below unaffected machines (docs/LLM-HOST.md)
  • Changed rows, headers and status lines across `/llmhost`, `/logins`, `/model`, `/config`, `/health`, `/tasks`, `/extensions`, the turn spinner and context compaction: each screen states what you are looking at, what it costs and what to do next (with `MODEL`, `SIZE`, `BANKED`, `CHECK` and `VOLUME` columns on the Bank table and `OK`, `ATTENTION` and `FAILED` badges in `/health`), the turn spinner shows its verb (with 24 added desert phrases), elapsed time, `↓` token count, `~<N> tok/s` output rate and retry or reconnect count, and the context compaction row shows `compacting context`, `↓ ~<tokens>`, the progress bar and elapsed time (docs/LLM-HOST.md)
  • Changed the tool-call loop guard for crewmates and headless runs (`mercury run` and non-interactive `mercury runner` sessions): a second consecutive failed call with the same tool and canonical JSON arguments (including permission or hook refusals) warns the model with the error text to change its call, and a third consecutive identical failing call ends the turn once the round settles with `loop_stopped` naming the tool, the call's field names and value shapes (never the values) and the error, while interactive foreground sessions receive reminders only (docs/DURABILITY.md)
  • Changed `/lsp restart`, Windows `.cmd`/`.bat` execution, custom `responses` endpoints, and `/mercury-docs`: `/lsp restart [<server>]` waits for in-flight initialization, kills the full language-server process tree (including children behind Windows `.cmd` shims), refuses if survivor processes remain, and reports each server's stop outcome (`exited cleanly`, `exited with code <N>`, or `killed after <N> s`); Windows `.cmd` and `.bat` invocations run `cmd.exe /d /s /v:off /c` with verbatim quoting and percent-run escaping while refusing arguments `cmd.exe` would rewrite; custom `compat/` endpoints using the `responses` dialect send the session's `prompt_cache_key` in `/v1/responses` requests; and `/mercury-docs` bundles only git-tracked documentation files (docs/LANGUAGE-SERVICE.md)
  • Fixed post-ready engine out-of-memory handling and DeepSeek-V4.1-Flash-1017 recipes in `/llmhost`: when a running rental's engine exits after setup, Mercury reads the engine's startup token plan and last prefill or decode batch from `engine.log`, pauses the rental with the machine up and weights on disk, and answers chat requests immediately with the context tokens held versus the recipe budget and the `Resume` or `Tune` remedy; the shipped DeepSeek-V4.1-Flash-1017 SGLang recipes set `--chunked-prefill-size` (`2048` on 4× B200 with `--mem-fraction-static 0.78`, and `4096` on 4× H200 and 8× H200) and measured `kvBytesPerToken` (`11,624` bytes/token) for 1M-token context (docs/LLM-HOST.md)
  • Fixed per-operation vendor read error handling, Hugging Face OAuth scopes, Vast.ai SSH key retries, Runpod cluster confirmations, and silent engine startup waits in `/llmhost`: an HTTP 401 or 403 on Runpod or Vast.ai halts only the failed read operation (`volumes`, `stock` or `machines`) so a refused weights-disk read keeps your running machines listed while Hugging Face halts all reads for that token until the credential changes, `/logins huggingface` device-code sign-in requests `write-endpoints` for Inference Endpoints management, Vast.ai rentals that refuse SSH through the setup deadline attach Mercury's SSH public key to the instance and retry for up to 4 minutes before pausing, multi-node Runpod cluster confirmations omit the single-pod `Stop` storage sentence, and engine startup waits apply the 10-minute log-progress grace only after the engine prints new log lines (docs/LLM-HOST.md, docs/ENGINES.md)
  • Fixed `/model` and `/llmhost` on a read-only configuration directory and `/clear` when the previous model is unreachable: opening `/model` or `/llmhost` on a read-only configuration directory ignores `EACCES`, `EPERM` and `EROFS` when creating the host state directory so the picker opens cleanly, and running `/clear` when the previous chat's model cannot be reached starts the fresh chat on the default model with a one-line notice naming the unreachable model and `/model` (docs/SESSIONS.md)
  • Fixed MCP server teardown on headless exit, mid-flight MCP call aborts, session-start hook events on `mercury run --format rows`, and Windows Craft control-folder permissions: `stdio` MCP servers register a process-tree cleanup guard as soon as the transport is created so a `mercury run` session that exits during server startup terminates the child process tree and closes its pipes, an MCP tool call that is aborted, times out or loses its socket after the request could have been sent returns an error naming the interrupted or unknown outcome without replaying the call, `session.start` hook events emitted before the stream observer attaches are buffered and replayed to `mercury run --format rows`, and LightCraft and PhotoCraft apply the Windows per-user control-folder ACL once with a sanitised PowerShell environment (docs/AUTOMATION.md, docs/EXTENSIONS.md)