Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

release: 1.4.0 — Steady Mercury (paperwork, docs, Node-20 upgrade guards)

Salman Qureshi0bda948b3e56
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d1be500..f310c9a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,22 @@
# Changelog
-## Unreleased — one runtime (ADR-024)
+## 1.4.0 — Steady Mercury
+
+The release where Mercury stays out of your way. One process runs the fleet and your channels; the terminal just attaches to it — instantly. Bots do real work, deliver files you can find, stay online without burning tokens, and can be run from a phone. The 1.3.1 "Honest Mercury" line (chat that answers, "done" that means verified, security fixes) was never published on its own and ships here.
+
+### Upgrading
+
+- **Node.js 22 or newer is required for npm installs.** Standalone binaries carry their own runtime — nothing to do. On npm: run `node -v` first; on Node 20, `nvm install 22 && nvm alias default 22`, then `npm i -g @cosmicstack/mercury-agent`. `mercury upgrade` now checks this before it removes anything, and the package refuses to install on an older Node with a readable message instead of installing something that will not start.
+- **Your login service is re-pointed automatically** the first time the new build launches (it used to keep starting the old install). `mercury doctor` shows *Login service: points at this install*.
+- **First start moves bot outputs** from `~/.mercury/bots/outputs/` to `~/Documents/Mercury/<Bot name>/` (one-way; the old folder gets a README saying where things went).
+- No config migrations. `~/.mercury` (config, bots, memory, Telegram pairing) carries over untouched.
+
+### Known limitations
+
+- Launching `mercury` now attaches to the daemon (ADR-024), and the attach TUI does not yet have bot threads (`/bots open`) or the `/telegram`, `/discord`, `/slack` menus — use `/bots send <id> <message>` and `mercury telegram ...` from the shell, or `mercury code` for the in-process TUI. Closing this gap is the first item of the next release.
+- Bots still share the daemon's thread with the main agent: bounded (turn caps, async tools) but not isolated. `/api/health.loopLag` tells you if it ever matters.
+
+### One runtime (ADR-024)
- **git tools no longer hold the runtime.** `git_status/log/diff/add/commit/push` (and `/code diff`) ran git synchronously — a push over a slow link froze Telegram, every bot and the attach TUI for up to 60 s. They now run async; errors and output are unchanged.
- **Windows service drift** is detected too (Task Scheduler XML and the Run key are read back), so a stale autostart is re-pointed on every platform.
@@ -9,25 +25,25 @@
- **Attach waits for a booting daemon** (token not written yet, token rotated at bind) instead of failing on the first read.
- **Event-loop stall monitor**: `/api/health` reports `loopLag` (p99 / worst stall over the last 10 s) and stalls ≥250 ms are logged with a warning, so lag is a number, not a feeling.
-## Unreleased — instant attach
+### Instant attach
- **Slash commands no longer show "Processing".** `/memory`, `/bots`, `/help` and friends are answered without the model; the turn indicator and heartbeat are raised only when a command actually falls through to a model turn. (`/memory` opens a menu that stays open as long as you use it — with the spinner up it looked like a hung agent.)
- **`mercury` attaches instantly to a running daemon.** The daemon binds its web listener *first* at boot (channels and bots come after), an unauthenticated loopback `/api/health` answers with pid/version/booting, and the launcher polls every 250 ms instead of 750 ms. A port owned by another process (an old global install, another Mercury) is now reported in one line — *Port 6174 is owned by another Mercury (PID …) — stop it or set web.port* — instead of a 15-second wait followed by a pointless restart. The web server also retries a busy port for 5 s, so a restart right after a stop no longer loses the dashboard.
-## Unreleased — bots in your pocket (ADR-023)
+### Bots in your pocket (ADR-023)
- **Onboarding from Telegram.** `/bots create <id> "Name" "Description"` in Telegram (or the web chat) now runs the same flow as the TUI: your next message is the persona (keep as-is or convert to the template), then permissions tier, solo vs fleet, and the daily budget — each a tap on Telegram's native buttons that settle in place. Every reply lands in the chat that asked; nothing is lost to the TUI-only bot thread any more.
- **Telegram controls.** `/bots` and `/bot` are in Telegram's command menu; the roster arrives with buttons — Stop/Start, Run and Runs per bot, plus Cost, Outputs, Doctor and Stop all for the fleet. A tap runs the slash command behind it as if you had typed it (same permissions, same reply). `/bots outputs` carries a 📎 button per delivered file.
- **Files, not paths.** A task asked for from Telegram (or any remote chat) comes back with its delivered files attached. `/bots fetch <id> [name|latest]` sends one on demand.
- **`/bots doctor`** runs the fleet health check from any chat; **`/bots help`** lists the commands. The TUI's slash completion, the busy-mode `/help`, and the docs now list every `/bots` subcommand.
-## Unreleased — bots stay online
+### Bots stay online
- **Idle, never dead.** A routine that keeps producing nothing is cooled down instead of parked: 6 hours, doubling to 24, then it resumes by itself (`/bots start` resumes it now). Budget pauses lift at midnight and queued work is pumped then.
- **Declared cadence is honoured.** A schedule in `bot.yaml` runs as written; the 30-minute floor applies only to routines a bot creates for itself.
- **Doctor `stale` check** flags a bot whose routine has not fired in twice its cadence; the roster shows when a cooled-down routine resumes.
-## Unreleased — see what the bots cost and did (ADR-022)
+### See what the bots cost and did (ADR-022)
- **`/bots cost [days]`** — token spend per bot and per fleet: today against the cap, the window's runs, failures, deliveries and empty runs. Also `GET /api/bots-cost`.
- **`/bots show <id> [runId]`** — what a run actually did: the tool trace, delivered files, the reply, and a flag when the reply claimed more than the trace shows. Also `GET /api/bots/:id/runs[/:runId]`.
@@ -36,7 +52,7 @@
- **Onboarding budget presets** — `light` (1M/day), `standard` (the default, 5M), `heavy` (20M), a number, or `none`; the step also tells you where the bot's results will appear.
- `GET /api/bots/:id/tasks` lists a lead's delegated tasks.
-## Unreleased — fleets that coordinate (ADR-021)
+### Fleets that coordinate (ADR-021)
Wave 2 of the bots work: how a lead hands out work and gets it back, how a bot remembers, and how a fleet's standard job runs without a lead turn between every step.
@@ -46,7 +62,7 @@ Wave 2 of the bots work: how a lead hands out work and gets it back, how a bot r
- **Cheaper crew.** `bots.fleets.crewProvider` routes crew bots without a provider of their own to a cheaper lane; leads keep the default.
- `/bots tasks <leadId>` shows a lead's open and recent tasks from the TUI.
-## Unreleased — bots that do work (ADR-020)
+### Bots that do work (ADR-020)
An audit of eleven days of real fleets found bots spending 617M input tokens (a median turn of 750k, the largest 6.6M), failing 38% of runs, and mostly writing notes about earlier runs. This wave gives every bot turn a governor, every routine a gate, every run an outcome verdict, and every owner a folder they can find.
@@ -61,7 +77,7 @@ An audit of eleven days of real fleets found bots spending 617M input tokens (a
- **Journal v2.** Real turn start, steps, tool calls, peak prompt size, outcome and delivered paths per run, plus a compact transcript per run (last 50 kept). `/bots journal` shows them; `mercury bots doctor` flags bots whose unattended runs mostly produce nothing, paused routines, and write access to the whole home directory.
- Bot file tools and shell commands now resolve relative paths inside the bot's workspace, never the daemon's working directory. The roster scan ignores profile copies in `sandbox/` and `outputs/`.
-## Unreleased — ink 8
+### Ink 8
Mercury's terminal renderer moves from a heavily patched ink 5.2.1 to ink 8.0.0, which now does most of that work itself.
@@ -71,11 +87,11 @@ Mercury's terminal renderer moves from a heavily patched ink 5.2.1 to ink 8.0.0,
- **Smaller patch** — four Mercury hunks remain (Static `itemKey`, freeze gate, live-region guard, cursor anchor); the rest are upstream. See `docs/ink-patch.md` and ADR-019.
- React 19.3.
-## 1.3.1 — Honest Mercury
+### Honest Mercury — the 1.3.1 line (never published; folded into 1.4.0)
The release where Mercury stops pretending. Chat answers instead of forcing tool rounds, "done" means a check actually passed, every channel shows the same evidence, and the terminal UI takes paste, Esc and IME like a real editor. Built from a full audit (`ROADMAP.md`); every change below is covered by tests, including a replay eval harness that drives the real agent loop.
-### Conversation and feedback
+#### Conversation and feedback
- **Chat is no longer forced through tool rounds** — the Mercury Code narration guard and verification gate ran in plain chat, so "make me a workout plan" could trigger up to ten tool-only rounds and end with "I couldn't get started". Both now run in execute mode only.
- **Done means verified** — a build/test/typecheck counts as evidence only when it exits clean (timeouts and kills are failures) and runs after the last edit; otherwise the task pauses with "the last check didn't pass" instead of "Task complete". Streamed turns now reach this gate too (they reported no finish reason and skipped it).
@@ -84,7 +100,7 @@ The release where Mercury stops pretending. Chat answers instead of forcing tool
- **`/new`** on every channel — fresh conversation, memory kept (#38).
- **Telegram prompts** — timeouts say what they defaulted to, taps settle the card, keyboards are removed (#23).
-### Context, memory and speed
+#### Context, memory and speed
- **Context window v2** — history is budgeted by tokens and includes a compact per-turn tool trace, so the next turn knows what was read and written. Retrieved memory goes into a per-turn system block instead of fake dialogue.
- **Prompt caching** — the stable system prompt carries an Anthropic cache marker and no longer changes every minute.
@@ -93,27 +109,27 @@ The release where Mercury stops pretending. Chat answers instead of forcing tool
- **Long builds** — `run_command` reports progress so a 10-minute build is not killed as a stalled provider, and stops its child when the turn is interrupted.
- **Tool results** — read from the AI SDK v6 `output` field, so failing-loop detection works.
-### Terminal UI
+#### Terminal UI
- **Paste** — multi-line and bracketed paste; Shift+Enter inserts a newline.
- **Esc interrupts a turn; Ctrl+C clears input**, double-tap to quit.
- **Concurrent prompts queue** instead of overwriting each other.
- **Smoother streaming** — fence-aligned tail rendering, one shared tick, async git header, correct repaint on resize; grapheme-aware cursor for emoji and CJK; history persists to `~/.mercury/history`.
-### Platforms
+#### Platforms
- **Windows** — service install via Task Scheduler XML with an HKCU Run fallback (#13); graceful stop and upgrade; wizard no longer exits silently on closed stdin (#64); update check over HTTPS.
- **Termux** — detected on `android`; `mercury service install` writes a Termux:Boot script.
- **Bots** — retried jobs can no longer run twice; a fleet lead's synthesis reaches its thread; "needs you" survives restarts.
-### Engineering
+#### Engineering
- **Agent split** — command handlers moved to `src/core/commands/`; one step handler instead of four copies; `agent.ts` from 8,362 to about 5,000 lines.
- **Replay eval harness** (`npm run eval`) in CI.
- **CI** — binary smoke tests per OS (built, run and discarded, never published), installer and script checks, Node 24, linux-arm64, ESLint ratchet (provisional baseline), vendored-Ink integrity check.
-### Security
+#### Security
- **Argv-lane auto-approval** (ADR-016) — auto-approved commands no longer go through a shell or `PATH`: they must tokenize to plain argv, use an allowlisted program with an allowed flag set, stay inside the workspace, and run via `execFile` on a binary resolved from pinned system directories with a minimal environment (#103). Everything else is shown to the user for approval. Some read-only one-liners (pipelines, `&&` chains) now prompt; see `SECURITY.md`.
- **Reads are authorised against the real file** — symlink targets must be in scope, hard-linked files prompt, and `read_file` verifies the opened file is the one that was checked (#104).
@@ -124,7 +140,7 @@ The release where Mercury stops pretending. Chat answers instead of forcing tool
- **SSRF guard** — unchanged; see the 1.2.3 entry below (hardened in 1.3.0 by #121 and #124; response record in `docs/security/ssrf-108-response.md`).
- **Disclosure process** — `SECURITY.md` added (private reporting, response targets, scope); issue-closure and advisory drafts in `docs/security/2026-10-backlog-closure.md`.
-### Fixed
+#### Fixed
- **SQLite in the standalone binaries and on toolchain-less installs** (ROADMAP P1.9, #96, ADR-018) — the binaries bundled better-sqlite3's JavaScript but never its native addon, so every SQLite probe failed inside them: Second Brain was silently disabled and bots/boards fell back to JSON. A shared driver (`src/utils/sqlite-driver.ts`) now selects **better-sqlite3 → bun:sqlite → node:sqlite → JSON**: binaries use Bun's embedded engine, Node ≥ 22.13 installs work without a compiler via `node:sqlite`, and the better-sqlite3 path is untouched. Second Brain, the bots queue, boards and the cloud pool-search cache all go through it; the pool cache now degrades to uncached instead of throwing when no engine loads. New `mercury doctor --storage` prints the active backend (with why the others were rejected), every database file, its size and row counts, and warns loudly when storage is JSON-only. `MERCURY_SQLITE_BACKEND=better-sqlite3|bun:sqlite|node:sqlite|json` forces a backend. Contract tests run the same assertions against every engine the process can load (`src/utils/sqlite-driver.test.ts`).
- **Patched ink is bundled, not post-installed** (ROADMAP P2.4, ADR-017) — the TUI's ink fixes no longer depend on `postinstall`: `vendor/ink` (stock ink 5.2.1 + the patch set, regenerated by `scripts/vendor-ink.cjs`) is bundled into `dist`, so `--ignore-scripts` installs, Termux and the standalone binaries all run the patched renderer. `mercury doctor` reports "Ink TUI patch: vendored". Hunk-by-hunk rationale: `docs/ink-patch.md`.
diff --git a/README.md b/README.md
index 62ea711b..99f65e89 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@
</p>
<p align="center">
- <strong>🔖 Current Stable: v1.3.0 — Mercury Bots</strong>
+ <strong>🔖 Current Stable: v1.4.0 — Steady Mercury</strong>
</p>
<p align="center">
@@ -44,7 +44,7 @@ curl -fsSL https://mercuryagent.sh/install.sh | sh
irm https://mercuryagent.sh/install.ps1 | iex
```
-Or via npm if you already have Node.js 22+:
+Or via npm if you already have **Node.js 22+** (required since 1.4.0 — binaries carry their own runtime):
```bash
npx @cosmicstack/mercury-agent
@@ -434,7 +434,7 @@ Output is **versioned** so older builds are never overwritten:
```
release/
├── latest → symlink to most-recent version
-├── v1.3.0/
+├── v1.4.0/
│ ├── mercury-macos-arm64
│ ├── mercury-macos-x64
│ ├── mercury-linux-x64
diff --git a/package-lock.json b/package-lock.json
index 9a2c2465..c8c6f0d2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@cosmicstack/mercury-agent",
- "version": "1.3.1",
+ "version": "1.4.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@cosmicstack/mercury-agent",
- "version": "1.3.1",
+ "version": "1.4.0",
"license": "MIT",
"dependencies": {
"@ai-sdk/anthropic": "^3.0.71",
diff --git a/package.json b/package.json
index 2f622f0f..e9537718 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@cosmicstack/mercury-agent",
- "version": "1.3.1",
+ "version": "1.4.0",
"description": "Soul-driven AI agent with Second Brain memory, permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI or Telegram.",
"type": "module",
"main": "dist/index.js",
@@ -8,6 +8,7 @@
"mercury": "./dist/index.js"
},
"scripts": {
+ "preinstall": "node -e \"if(!process.versions.bun&&+process.versions.node.split('.')[0]<22){console.error('\\nMercury needs Node.js 22 or newer — this is '+process.version+'.\\n Upgrade Node: nvm install 22 && nvm alias default 22 (or https://nodejs.org)\\n Then install again with that Node.\\n');process.exit(1)}\"",
"build:ui": "cd ui && npm run build",
"build": "tsup && node scripts/post-build.cjs",
"build:bin": "npm run build && node scripts/build-bin.cjs",
diff --git a/src/index.ts b/src/index.ts
index a2523bf2..1049c262 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -4896,6 +4896,21 @@ serviceCmd
console.log(chalk.dim(` Latest: v${latestVersion}`));
+ // Never remove a working install for one this Node cannot run: the old
+ // package is gone before `npm i -g` prints its engines warning.
+ if (!process.versions.bun) {
+ let required = '';
+ try { required = execSync(`npm view @cosmicstack/mercury-agent@${latestVersion} engines.node`, { encoding: 'utf-8' }).trim(); } catch { /* unknown — proceed */ }
+ const need = Number((required.match(/(\d+)/) || [])[1] || 0);
+ const have = Number(process.versions.node.split('.')[0]);
+ if (need && have < need) {
+ console.log(chalk.red(` ✗ v${latestVersion} needs Node.js ${need}+ — this is Node ${process.version}. Nothing was changed.`));
+ console.log(chalk.dim(` Upgrade Node first: nvm install ${need} && nvm alias default ${need}`));
+ console.log(chalk.dim(' Then reinstall: npm i -g @cosmicstack/mercury-agent'));
+ console.log('');
+ return;
+ }
+ }
if (latestVersion === pkgVersion) {
console.log(chalk.green(` ✓ Already on the latest version (v${pkgVersion})`));
console.log('');
diff --git a/website/docs/getting-started/platforms/termux.mdx b/website/docs/getting-started/platforms/termux.mdx
index 64c2eaa7..65d8e1c2 100644
--- a/website/docs/getting-started/platforms/termux.mdx
+++ b/website/docs/getting-started/platforms/termux.mdx
@@ -26,7 +26,7 @@ npm i -g @cosmicstack/mercury-agent
mercury
```
-`nodejs-lts` provides Node 20+ and npm. Python, Make, Clang, and pkg-config are required when npm needs to build native dependencies such as `better-sqlite3` for Android's bionic libc. Do not use Mercury's standalone Linux binary on Termux.
+`nodejs-lts` provides Node 22+ (required since 1.4.0) and npm. Python, Make, Clang, and pkg-config are required when npm needs to build native dependencies such as `better-sqlite3` for Android's bionic libc. Do not use Mercury's standalone Linux binary on Termux.
### Storage access (optional but recommended)
diff --git a/website/docs/getting-started/platforms/windows.mdx b/website/docs/getting-started/platforms/windows.mdx
index 789daadb..dc770bb0 100644
--- a/website/docs/getting-started/platforms/windows.mdx
+++ b/website/docs/getting-started/platforms/windows.mdx
@@ -40,7 +40,7 @@ npm i -g @cosmicstack/mercury-agent
mercury
```
-Requires **Node.js 20+**. Install from [nodejs.org](https://nodejs.org) or via [`winget install OpenJS.NodeJS.LTS`](https://winget.run/pkg/OpenJS/NodeJS.LTS).
+Requires **Node.js 22+** (since 1.4.0). Install from [nodejs.org](https://nodejs.org) or via [`winget install OpenJS.NodeJS.LTS`](https://winget.run/pkg/OpenJS/NodeJS.LTS).
## Pinning a version
diff --git a/website/docs/releases/1.4.0.mdx b/website/docs/releases/1.4.0.mdx
new file mode 100644
index 00000000..2482afd8
--- /dev/null
+++ b/website/docs/releases/1.4.0.mdx
@@ -0,0 +1,95 @@
+---
+title: "v1.4.0 — Steady Mercury"
+sidebar_label: "v1.4.0"
+description: "One process runs the fleet and your channels; the terminal attaches to it instantly. Bots do real work, deliver files you can find, stay online without burning tokens, and run from your phone. Node 22, patched Ink 8, and the whole unpublished 1.3.1 line."
+keywords: [mercury, mercury-agent, release, 1.4.0, bots, fleet, telegram, node 22, ink, attach, daemon]
+---
+
+import Head from '@docusaurus/Head';
+
+<Head>
+ <meta property="og:title" content="Mercury Agent v1.4.0 — Steady Mercury" />
+ <meta property="og:description" content="One runtime · Instant attach · Bots that do work and stay online · Fleets with typed tasks · Telegram control · Node 22 + patched Ink 8" />
+ <meta property="og:type" content="article" />
+ <meta property="og:url" content="https://mercuryagent.sh/docs/releases/1.4.0" />
+ <meta property="og:site_name" content="Mercury Agent — Soul-driven" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@mercuryagent" />
+ <meta name="twitter:title" content="Mercury Agent v1.4.0 — Steady Mercury" />
+ <meta name="twitter:description" content="One runtime · Instant attach · Bots that do work and stay online · Fleets with typed tasks · Telegram control · Node 22 + patched Ink 8" />
+ <link rel="canonical" href="https://mercuryagent.sh/docs/releases/1.4.0" />
+</Head>
+
+# v1.4.0 — Steady Mercury
+
+> **The release where Mercury stays out of your way.**
+
+`1.4.0` is about the shape of the thing: **one process** runs your bots and your channels, and the terminal is a window onto it — open in under a second, closed without consequence. Bots now **do work** instead of writing notes about work, **deliver files** where you can find them, **stay online** without burning tokens, and can be run **from your phone**. Underneath, Node 22 and a patched Ink 8 renderer; alongside, everything from the unpublished 1.3.1 "Honest Mercury" line — chat that answers, "done" that means verified, and six security fixes.
+
+## At a glance
+
+| | |
+|---|---|
+| **One runtime** (ADR-024) | The daemon owns channels, bots and the web port; `mercury` attaches to it. No second copy of the fleet in your terminal. |
+| **Instant attach** | Listener binds first at boot; `/api/health` answers with pid/version; a foreign process on the port is named, not restarted around. |
+| **Bots that do work** (ADR-020) | Per-turn caps, outcome judged from the tool trace, daily budgets on by default, deliverables in `~/Documents/Mercury/<Bot>/`. |
+| **Fleets that coordinate** (ADR-021) | Typed tasks with one digest wake, pipelines as data, bots that remember. |
+| **Operate the fleet** (ADR-022) | `/bots cost`, `/bots show`, `/bots stop all`, DLQ clear, budget presets. |
+| **Bots in your pocket** (ADR-023) | Telegram command menu, tappable roster, files pushed to the chat, onboarding with native buttons. |
+| **Bots stay online** | No-outcome routines cool down and auto-resume; declared cadence honoured; `doctor` flags stale bots. |
+| **Node 22 + Ink 8** | Required for npm installs; binaries unaffected. Four Mercury hunks on Ink 8, upstreaming. |
+
+## One runtime — the terminal attaches
+
+Launching `mercury` with no daemon used to spawn one **and** boot a second full runtime in the terminal. Both ran the fleet on one queue, both polled Telegram (409 conflicts), and the terminal copy ran every bot turn on the thread that paints your keystrokes. Now the terminal spawns the daemon and attaches; a foreground runtime beside a live daemon (`mercury code`) is a terminal for the main agent only. The event loop is measured: `/api/health.loopLag`, and stalls ≥250 ms are logged.
+
+Your **login service follows the install**: after a reinstall (npm → binary, stable → dev, new Node) the old LaunchAgent/systemd unit/Task used to keep resurrecting the old daemon. Mercury now re-points it on launch, on macOS, Linux and Windows. `mercury doctor` → *Login service: points at this install*.
+
+## Bots that do work
+
+- **Caps and compaction** — 300k tokens / 20 min per turn; context compacted automatically.
+- **Judged by the trace** — a run is `deliverable`, `action`, `delegated`, `message` or `none`; a reply that claims more than the trace shows is flagged.
+- **Budgets by default** — 5M tokens/day per bot, 20M per fleet; warned at 80%, paused until tomorrow at 100%.
+- **Deliverables you can find** — `bot_deliver` files land in `~/Documents/Mercury/<Bot name>/`, finals on top, crew work under `work/`, README index. Legacy outputs migrate on first start.
+- **Routines honoured** — a bot.yaml cadence runs as written; bot-created routines ≥30 min; three empty runs cool a routine down (6 h → 24 h) and it resumes by itself.
+
+## Fleets that coordinate
+
+`fleet_delegate` hands several typed tasks to the crew and wakes the lead **once** with a digest. Pipelines are data in `bot.yaml` (`research → draft → check → package`), stages chain themselves, finals are promoted. Every turn starts with a digest of the last five runs and the bot's own working-state note; durable facts go into the bot's memory.
+
+## Operate it — from the terminal or a phone
+
+`/bots cost [days]`, `/bots show <id> [runId]`, `/bots stop all` / `start all`, `/bots dlq clear`, `/bots doctor`, `/bots outputs`, `/bots fetch`. On **Telegram**: `/bots` and `/bot` in the command menu; the roster arrives with **Stop/Start · Run · Runs** per bot and **Cost · Outputs · Doctor · Stop all** — a tap runs the real command. Delivered files come back to the chat as attachments. `/bots create` on Telegram runs the full onboarding — persona, permissions tier, solo/fleet, budget — as native buttons that settle in place.
+
+## Honest Mercury — the 1.3.1 line, folded in
+
+Never published on its own; everything from it ships here: chat no longer forced through tool rounds, "done" means a check actually passed, one feedback contract on every channel, `/trace`, `/new` everywhere, context window v2, memory bounds, Telegram prompt timeouts that say what they defaulted to, per-agent permission contexts, the replay eval harness, and six published security advisories (GHSA-hj5j-2689-x8r2, -xc4h-859q-mq79, -gc84-h2g2-h54w, -h2c6-h3vx-mqwh, -qjx7-rw28-6hxq, -r27w-9m8h-qwg8).
+
+## Node 22 and a patched Ink 8
+
+Mercury's terminal renderer moves to **Ink 8 + React 19**, which needs **Node 22**. Stock Ink's `<Static>` is positional — a bounded transcript remounted the whole subtree every frame — and tall frames stamped copies into scrollback on every repaint. Mercury vendors Ink 8 with four hunks (keyed static, scrollback guard, freeze gate, IME cursor anchor), verified in CI as *tarball + hunks*, and is proposing them upstream from [cosmicstack-labs/ink](https://github.com/cosmicstack-labs/ink).
+
+## Known limitations
+
+- The attach TUI (what `mercury` now opens) does not yet have bot threads (`/bots open`) or the `/telegram` / `/discord` / `/slack` menus. Use `/bots send <id> <message>`, `mercury telegram …` from the shell, or `mercury code` for the in-process TUI. First item of the next release.
+- Bots share the daemon's thread with the main agent — bounded, not isolated. `loopLag` will tell you if it ever matters.
+
+## Upgrade
+
+**Standalone binaries** — nothing to think about:
+
+```bash
+curl -fsSL https://mercuryagent.sh/install.sh | sh # macOS / Linux
+irm https://mercuryagent.sh/install.ps1 | iex # Windows
+```
+
+**npm** — check Node first:
+
+```bash
+node -v # must be 22+
+nvm install 22 && nvm alias default 22 # if it is not
+npm i -g @cosmicstack/[email protected]
+mercury # re-points your login service, migrates bot outputs, attaches
+```
+
+`mercury upgrade` checks the Node requirement before it removes anything; the package refuses to install on an older Node with a readable message. `~/.mercury` carries over untouched.
diff --git a/website/docs/releases/releases.mdx b/website/docs/releases/releases.mdx
index 33bb7ccc..8ff24701 100644
--- a/website/docs/releases/releases.mdx
+++ b/website/docs/releases/releases.mdx
@@ -9,6 +9,7 @@ This section tracks Mercury release notes by version.
## Available release notes
+- [**v1.4.0 — Steady Mercury**](/docs/releases/1.4.0) — One runtime, instant attach, bots that do work and stay online, fleets with typed tasks and pipelines, Telegram control with buttons and files, Node 22 and a patched Ink 8 — plus the whole unpublished 1.3.1 "Honest Mercury" line.
- [**v1.3.0 — Mercury Bots**](/docs/releases/1.3.0) — Mercury becomes a fleet: persistent persona-scoped bots with private sandboxes and durable queues, lead bots that recruit their own crews, portable bundles, a web cockpit, and honest failure observability.
- [**v1.2.3 — Unstoppable Mercury**](/docs/releases/1.2.3) — Mercury Code stops dying and starts telling the truth: completion contract, AUTO mode, the mechanical escalation harness, compact-on-pressure, live plan checklist, wheel scrolling, and security hardening.
- [**v1.2.0 — Cloudy Mercury**](/docs/releases/1.2.0) — Mercury Cloud: terminal pairing, JWT auth with self-recovery, Cloud WebSocket, shared memory pool search. Cross-platform fixes for Windows and Termux. Patch set 1.2.0 → 1.2.1 → 1.2.2.
diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts
index 5f3fb1df..ea4008f8 100644
--- a/website/docusaurus.config.ts
+++ b/website/docusaurus.config.ts
@@ -102,8 +102,8 @@ const config: Config = {
},
// Bump with every release, together with RELEASE in src/components/Home/data.ts.
announcementBar: {
- id: 'release-1-3-0',
- content: '☿ Mercury 1.3.0, <strong>Mercury Bots</strong>, is out: persistent agents that work as a fleet. <a href="/docs/releases/1.3.0">Read the release notes →</a>',
+ id: 'release-1-4-0',
+ content: '☿ Mercury 1.4.0, <strong>Steady Mercury</strong>, is out: one runtime, instant attach, bots that stay online and deliver. <a href="/docs/releases/1.4.0">Read the release notes →</a>',
isCloseable: true,
},
navbar: {
diff --git a/website/sidebars.ts b/website/sidebars.ts
index e79c3050..daa73c79 100644
--- a/website/sidebars.ts
+++ b/website/sidebars.ts
@@ -79,6 +79,7 @@ const sidebars: SidebarsConfig = {
collapsed: false,
items: [
'releases/releases',
+ 'releases/1.4.0',
'releases/1.3.0',
'releases/1.2.3',
'releases/1.2.0',
diff --git a/website/src/components/Home/data.ts b/website/src/components/Home/data.ts
index bef7766c..72ffc7ae 100644
--- a/website/src/components/Home/data.ts
+++ b/website/src/components/Home/data.ts
@@ -12,7 +12,7 @@ export const NPM_URL = 'https://www.npmjs.com/package/@cosmicstack/mercury-agent
export const SKILLS_URL = 'https://skills.mercuryagent.sh';
/** Bump on release, together with the announcement bar in docusaurus.config.ts. */
-export const RELEASE = { version: '1.3.0', name: 'Mercury Bots', notes: '/docs/releases/1.3.0' };
+export const RELEASE = { version: '1.4.0', name: 'Steady Mercury', notes: '/docs/releases/1.4.0' };
export const SEO = {
title: 'Mercury Agent: the soul-driven AI agent, loyal only to you',
@@ -32,7 +32,7 @@ export type TermLine = {
export const HERO_SCRIPT: TermLine[] = [
{ k: 'cmd', t: 'mercury' },
- { k: 'dim', t: '☿ Mercury 1.3.0 · deepseek-chat · Ask Me mode' },
+ { k: 'dim', t: '☿ Mercury 1.4.0 · deepseek-chat · Ask Me mode' },
{ k: 'gap', t: '' },
{ k: 'in', t: 'tidy CHANGELOG for 1.3.1, push it, and open a PR' },
{ k: 'ok', t: 'git_status', n: 'read · no prompt' },
diff --git a/website/static/install-dev.sh b/website/static/install-dev.sh
index 4861391e..82e17164 100755
--- a/website/static/install-dev.sh
+++ b/website/static/install-dev.sh
@@ -14,13 +14,11 @@
set -eu
-CHANNEL_ENV="MERCURY_CHANNEL=dev"
-
# Running inside a repo checkout: prefer the sibling stable installer.
# (POSIX sh has no "$0"-safe dirname in every case; guard rather than trust.)
case "$0" in
*/*)
- here=$(CDPATH= cd -- "$(dirname -- "$0")" 2>/dev/null && pwd || true)
+ here=$(CDPATH='' cd -- "$(dirname -- "$0")" 2>/dev/null && pwd) || here=""
;;
*)
here=""
@@ -32,7 +30,7 @@ fi
# Otherwise pull the stable installer from the always-current site URL.
# The MERCURY_CHANNEL env var is set in the child shell's environment, so it
-# flows through the pipe into install.sh.
+# flows through the pipe into install.sh (as do MERCURY_INSTALL and friends).
if command -v curl >/dev/null 2>&1; then
curl -fsSL https://mercuryagent.sh/install.sh | env MERCURY_CHANNEL=dev sh
elif command -v wget >/dev/null 2>&1; then