mercury-agent 0.5.1 → 0.5.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 +6 -5
- package/docs/runbooks/publish-checklist.md +9 -1
- package/package.json +1 -1
- package/resources/profiles/coding/mercury-profile.yaml +1 -1
- package/resources/profiles/general/mercury-profile.yaml +1 -1
- package/resources/profiles/research/mercury-profile.yaml +1 -1
- package/resources/templates/mercury.example.yaml +2 -2
- package/src/agent/container-entry.ts +1 -1
- package/src/agent/container-runner.ts +1 -2
- package/src/cli/mercury.ts +1 -1
- package/src/config.ts +1 -1
- package/src/main.ts +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Mercury is a personal AI assistant that lives where you chat. It connects to Wha
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
20
20
|
- **[Node.js](https://nodejs.org/)** >= 18 — Required for `npm install -g mercury-agent`
|
|
21
|
-
- **[Bun](https://bun.sh)** >= 1.
|
|
21
|
+
- **[Bun](https://bun.sh)** >= 1.2 — JavaScript runtime used by Mercury
|
|
22
22
|
- **[Docker](https://docs.docker.com/get-docker/)** — Required for running agent containers. On Linux, also install `docker-buildx` (`apt-get install docker-buildx`) — Docker Desktop includes it, but Docker Engine on Linux does not.
|
|
23
23
|
- **Windows users:** Mercury runs best under [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install). Install WSL2 with `wsl --install`, then install Bun and Docker inside it.
|
|
24
24
|
|
|
@@ -66,6 +66,8 @@ mercury run
|
|
|
66
66
|
mercury service install
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
> `mercury run` runs in the foreground (good for a first smoke test). For anything long-running, prefer `mercury service install` — it runs in the background and auto-restarts.
|
|
70
|
+
|
|
69
71
|
### Set up spaces and conversations
|
|
70
72
|
|
|
71
73
|
Mercury discovers conversations from incoming traffic. They start **unlinked** — you assign them to **spaces** (memory boundaries).
|
|
@@ -310,7 +312,7 @@ Optional project file **`mercury.yaml`** (or **`mercury.yml`**) supplies non-sec
|
|
|
310
312
|
| Variable | Default | Description |
|
|
311
313
|
|----------|---------|-------------|
|
|
312
314
|
| `MERCURY_DATA_DIR` | `.mercury` | Data directory |
|
|
313
|
-
| `MERCURY_MAX_CONCURRENCY` | `
|
|
315
|
+
| `MERCURY_MAX_CONCURRENCY` | `2` | Max concurrent runs |
|
|
314
316
|
| `MERCURY_PORT` | `8787` | API port |
|
|
315
317
|
| `MERCURY_BOT_USERNAME` | `mercury` | Bot display name |
|
|
316
318
|
| `MERCURY_LOG_LEVEL` | `info` | Log level |
|
|
@@ -335,7 +337,7 @@ Supported OAuth providers: Anthropic, GitHub Copilot, Google Gemini CLI, Antigra
|
|
|
335
337
|
| Variable | Default | Description |
|
|
336
338
|
|----------|---------|-------------|
|
|
337
339
|
| `MERCURY_MODEL_PROVIDER` | `anthropic` | Provider |
|
|
338
|
-
| `MERCURY_MODEL` | `claude-opus-4-
|
|
340
|
+
| `MERCURY_MODEL` | `claude-opus-4-8` | Model |
|
|
339
341
|
| `MERCURY_ANTHROPIC_API_KEY` | — | API key |
|
|
340
342
|
| `MERCURY_ANTHROPIC_OAUTH_TOKEN` | — | OAuth token (alternative) |
|
|
341
343
|
|
|
@@ -357,7 +359,7 @@ Supported OAuth providers: Anthropic, GitHub Copilot, Google Gemini CLI, Antigra
|
|
|
357
359
|
|
|
358
360
|
| Variable | Default | Description |
|
|
359
361
|
|----------|---------|-------------|
|
|
360
|
-
| `
|
|
362
|
+
| `MERCURY_AGENT_IMAGE` | `ghcr.io/avishai-tsabari/mercury-agent:latest` | Container image |
|
|
361
363
|
| `MERCURY_CONTAINER_TIMEOUT_MS` | `300000` | Container timeout (5 min) |
|
|
362
364
|
| `MERCURY_CONTAINER_RUNTIME` | `runc` | `runc` (default) or `runsc` ([gVisor](https://gvisor.dev)) |
|
|
363
365
|
| `MERCURY_CONTAINER_BWRAP_DOCKER_COMPAT` | `false` | Set `true` on Linux Docker Engine (see note below) |
|
|
@@ -413,7 +415,6 @@ mrctl config set trigger_patterns "@Bot,Bot"
|
|
|
413
415
|
|
|
414
416
|
## Docs
|
|
415
417
|
|
|
416
|
-
- **Remaining work:** [TODOS](docs/TODOS.md) — Security, reliability, and ops gaps
|
|
417
418
|
- **Platform setup:** [WhatsApp](docs/setup-whatsapp.md) · [Discord](docs/setup-discord.md) · [Slack](docs/setup-slack.md)
|
|
418
419
|
- [Configuration](docs/configuration.md) (mercury.yaml + env) · [PRD: config load](docs/prd-config-load.md)
|
|
419
420
|
- [Authentication](docs/auth/overview.md)
|
|
@@ -15,11 +15,19 @@ git add package.json
|
|
|
15
15
|
git commit -m "chore: bump version to $(node -p 'require("./package.json").version')"
|
|
16
16
|
git tag "v$(node -p 'require("./package.json").version')"
|
|
17
17
|
git push && git push --tags
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
# Publish to npm manually. npm 2FA requires an interactive one-time
|
|
20
|
+
# password, so this cannot run in CI — pass it inline (it expires in ~30s):
|
|
21
|
+
npm publish --otp=<code-from-authenticator>
|
|
19
22
|
```
|
|
20
23
|
|
|
21
24
|
Always tag and publish together — `package.json` is the single source of truth for both npm and GitHub.
|
|
22
25
|
|
|
26
|
+
**CI does not publish to npm.** Pushing a `v*` tag runs `bun run check` and creates a
|
|
27
|
+
GitHub Release (`.github/workflows/release.yml`), but the npm upload is a manual step
|
|
28
|
+
done by a maintainer from a local machine. Verify afterward with
|
|
29
|
+
`npm view mercury-agent version`.
|
|
30
|
+
|
|
23
31
|
## Beta testing on another machine
|
|
24
32
|
|
|
25
33
|
Use `--tag beta` to publish a test version without affecting the stable `latest` tag.
|
package/package.json
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
# model:
|
|
10
10
|
# chain:
|
|
11
11
|
# - provider: anthropic
|
|
12
|
-
# model: claude-
|
|
12
|
+
# model: claude-opus-4-8
|
|
13
13
|
# # Legacy single primary + optional fallback (when chain is omitted):
|
|
14
14
|
# # provider: anthropic
|
|
15
|
-
# # model: claude-
|
|
15
|
+
# # model: claude-opus-4-8
|
|
16
16
|
# # fallback_provider: openai
|
|
17
17
|
# # fallback: gpt-4o-mini
|
|
18
18
|
# # max_retries_per_leg: 2
|
|
@@ -29,8 +29,7 @@ import { ContainerError } from "./container-error.js";
|
|
|
29
29
|
* launching the inner container detached (`docker create` + `docker start`, no
|
|
30
30
|
* attach) is the only pattern that works through the Bun `fetch()`-based body-proxy
|
|
31
31
|
* the cloud agent lane goes through — the proxy cannot carry Docker's hijacked
|
|
32
|
-
* attach connection, so an attached run hangs to its idleTimeout
|
|
33
|
-
* docs/debug/major/2026-05-25-agent-lane-docker-run-wait-hang-no-chat-response.md).
|
|
32
|
+
* attach connection, so an attached run hangs to its idleTimeout.
|
|
34
33
|
*/
|
|
35
34
|
const INNER_IO_DIR = "/run/mercury-io";
|
|
36
35
|
|
package/src/cli/mercury.ts
CHANGED
package/src/config.ts
CHANGED
|
@@ -62,7 +62,7 @@ const schema = z.object({
|
|
|
62
62
|
|
|
63
63
|
// ─── AI Model ───────────────────────────────────────────────────────
|
|
64
64
|
modelProvider: z.string().default("anthropic"),
|
|
65
|
-
model: z.string().default("claude-opus-4-
|
|
65
|
+
model: z.string().default("claude-opus-4-8"),
|
|
66
66
|
modelFallbackProvider: z.string().optional(),
|
|
67
67
|
modelFallback: z.string().optional(),
|
|
68
68
|
/** JSON array of `{ provider, model }`. When set, overrides legacy primary+fallback pair. */
|
package/src/main.ts
CHANGED
|
@@ -90,7 +90,7 @@ async function main() {
|
|
|
90
90
|
// ─── Normalize data dir ownership ───────────────────────────────────────
|
|
91
91
|
// Host base image's default user has drifted historically; if the volume
|
|
92
92
|
// was written by a previous uid, SQLite can't reopen state.db for writes.
|
|
93
|
-
// Idempotent on matching ownership.
|
|
93
|
+
// Idempotent on matching ownership.
|
|
94
94
|
if (process.platform === "linux" && process.getuid?.() === 0) {
|
|
95
95
|
const dataDirPath = resolveProjectPath(config.dataDir);
|
|
96
96
|
if (existsSync(dataDirPath)) {
|