@cosmicstack/mercury-agent 0.3.4 → 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 +26 -6
- package/dist/index.js +920 -287
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
Runs 24/7 from CLI or Telegram.
|
|
10
|
+
Runs 24/7 from CLI or Telegram. 31 built-in tools. Extensible skills. Asks before it acts.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
@@ -136,8 +136,9 @@ Type these during a conversation — they don't consume API tokens. Work on both
|
|
|
136
136
|
|
|
137
137
|
| Category | Tools |
|
|
138
138
|
|----------|-------|
|
|
139
|
-
| **Filesystem** | `read_file`, `write_file`, `create_file`, `edit_file`, `list_dir`, `delete_file`, `send_file` |
|
|
140
|
-
| **Shell** | `run_command`, `approve_command` |
|
|
139
|
+
| **Filesystem** | `read_file`, `write_file`, `create_file`, `edit_file`, `list_dir`, `delete_file`, `send_file`, `approve_scope` |
|
|
140
|
+
| **Shell** | `run_command`, `cd`, `approve_command` |
|
|
141
|
+
| **Messaging** | `send_message` |
|
|
141
142
|
| **Git** | `git_status`, `git_diff`, `git_log`, `git_add`, `git_commit`, `git_push` |
|
|
142
143
|
| **Web** | `fetch_url` |
|
|
143
144
|
| **Skills** | `install_skill`, `list_skills`, `use_skill` |
|
|
@@ -151,6 +152,15 @@ Type these during a conversation — they don't consume API tokens. Work on both
|
|
|
151
152
|
| **CLI** | Readline prompt, real-time text streaming, markdown rendering, file display |
|
|
152
153
|
| **Telegram** | HTML formatting, file uploads (photos, audio, video, documents), typing indicators, `/budget` commands |
|
|
153
154
|
|
|
155
|
+
### Telegram Pairing
|
|
156
|
+
|
|
157
|
+
Mercury uses a **single-owner pairing model** — only one Telegram account can be paired at a time.
|
|
158
|
+
|
|
159
|
+
- **Unpaired bots** only process `/start` or `/pair`. All other messages are ignored. This prevents unauthorized access.
|
|
160
|
+
- **To pair:** Send `/start` to your Mercury bot in a private chat. The bot records your user ID and chat ID.
|
|
161
|
+
- **To unpair:** Send `/unpair` to remove the pairing.
|
|
162
|
+
- Mercury only works in private (one-to-one) chats. Group messages are ignored.
|
|
163
|
+
|
|
154
164
|
## Scheduler
|
|
155
165
|
|
|
156
166
|
- **Recurring**: `schedule_task` with cron expressions (`0 9 * * *` for daily at 9am)
|
|
@@ -165,6 +175,7 @@ All runtime data lives in `~/.mercury/` — not in your project directory.
|
|
|
165
175
|
| Path | Purpose |
|
|
166
176
|
|------|---------|
|
|
167
177
|
| `~/.mercury/mercury.yaml` | Main config (providers, channels, budget) |
|
|
178
|
+
| `~/.mercury/.env` | API keys and tokens (loaded alongside project .env) |
|
|
168
179
|
| `~/.mercury/soul/*.md` | Agent personality (soul, persona, taste, heartbeat) |
|
|
169
180
|
| `~/.mercury/permissions.yaml` | Capabilities and approval rules |
|
|
170
181
|
| `~/.mercury/skills/` | Installed skills |
|
|
@@ -178,9 +189,18 @@ All runtime data lives in `~/.mercury/` — not in your project directory.
|
|
|
178
189
|
|
|
179
190
|
Configure multiple LLM providers. Mercury tries them in order and falls back automatically:
|
|
180
191
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
| Provider | Default Model | API Key | Notes |
|
|
193
|
+
|----------|--------------|---------|-------|
|
|
194
|
+
| **DeepSeek** | deepseek-chat | `DEEPSEEK_API_KEY` | Default, cost-effective |
|
|
195
|
+
| **OpenAI** | gpt-4o-mini | `OPENAI_API_KEY` | GPT-4o, o3, etc. |
|
|
196
|
+
| **Anthropic** | claude-sonnet-4 | `ANTHROPIC_API_KEY` | Claude Sonnet, Haiku, Opus |
|
|
197
|
+
| **Grok (xAI)** | grok-4 | `GROK_API_KEY` | OpenAI-compatible endpoint |
|
|
198
|
+
| **Ollama Cloud** | gpt-oss:120b | `OLLAMA_CLOUD_API_KEY` | Remote Ollama via API |
|
|
199
|
+
| **Ollama Local** | gpt-oss:20b | No key needed | Local Ollama instance |
|
|
200
|
+
|
|
201
|
+
When a provider fails, Mercury automatically tries the next one. It remembers the last successful provider and starts there on the next request.
|
|
202
|
+
|
|
203
|
+
> **More providers incoming** — Google Gemini, Mistral, and others are on the roadmap. Mercury's OpenAI-compatible architecture also supports custom endpoints via base URL configuration.
|
|
184
204
|
|
|
185
205
|
## Architecture
|
|
186
206
|
|