@cosmicstack/mercury-agent 0.4.0 → 0.5.0

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
@@ -7,7 +7,7 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- Runs 24/7 from CLI or Telegram. 21 built-in tools. Extensible skills. Asks before it acts.
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">
@@ -110,6 +110,13 @@ In daemon mode, Telegram becomes your primary channel — CLI is log-only since
110
110
  | `mercury setup` | Re-run the setup wizard |
111
111
  | `mercury status` | Show config and daemon status |
112
112
  | `mercury help` | Show full manual |
113
+ | `mercury telegram list` | List approved and pending Telegram users |
114
+ | `mercury telegram approve <code\|id>` | Approve a pairing code or pending request |
115
+ | `mercury telegram reject <id>` | Reject a pending Telegram access request |
116
+ | `mercury telegram remove <id>` | Remove an approved Telegram user |
117
+ | `mercury telegram promote <id>` | Promote a Telegram member to admin |
118
+ | `mercury telegram demote <id>` | Demote a Telegram admin to member |
119
+ | `mercury telegram reset` | Clear all Telegram access and start fresh |
113
120
  | `mercury service install` | Install as system service (auto-start on boot) |
114
121
  | `mercury service uninstall` | Uninstall system service |
115
122
  | `mercury service status` | Show system service status |
@@ -136,8 +143,9 @@ Type these during a conversation — they don't consume API tokens. Work on both
136
143
 
137
144
  | Category | Tools |
138
145
  |----------|-------|
139
- | **Filesystem** | `read_file`, `write_file`, `create_file`, `edit_file`, `list_dir`, `delete_file`, `send_file` |
140
- | **Shell** | `run_command`, `approve_command` |
146
+ | **Filesystem** | `read_file`, `write_file`, `create_file`, `edit_file`, `list_dir`, `delete_file`, `send_file`, `approve_scope` |
147
+ | **Shell** | `run_command`, `cd`, `approve_command` |
148
+ | **Messaging** | `send_message` |
141
149
  | **Git** | `git_status`, `git_diff`, `git_log`, `git_add`, `git_commit`, `git_push` |
142
150
  | **Web** | `fetch_url` |
143
151
  | **Skills** | `install_skill`, `list_skills`, `use_skill` |
@@ -148,8 +156,20 @@ Type these during a conversation — they don't consume API tokens. Work on both
148
156
 
149
157
  | Channel | Features |
150
158
  |---------|----------|
151
- | **CLI** | Readline prompt, real-time text streaming, markdown rendering, file display |
152
- | **Telegram** | HTML formatting, file uploads (photos, audio, video, documents), typing indicators, `/budget` commands |
159
+ | **CLI** | Readline prompt, arrow-key command menus, real-time text streaming, markdown rendering |
160
+ | **Telegram** | HTML formatting, file uploads, typing indicators, multi-user access with admin/member roles |
161
+
162
+ ### Telegram Access
163
+
164
+ Mercury uses an **organization access model** with admins and members.
165
+
166
+ - **First-time setup:** Send `/start` to your bot, receive a pairing code, enter it in the CLI with `mercury telegram approve <code>`. You become the first admin.
167
+ - **Additional users:** Send `/start` to request access. Admins approve or reject from the CLI.
168
+ - **Roles:** Admins can approve/reject requests, promote/demote users, and reset access. Members can chat with Mercury.
169
+ - **Reset:** Admins can send `/unpair` in Telegram or run `mercury telegram reset` in the CLI to clear all access and start fresh.
170
+ - Private chats only — group messages are always ignored.
171
+
172
+ CLI commands: `mercury telegram list|approve|reject|remove|promote|demote|reset`
153
173
 
154
174
  ## Scheduler
155
175
 
@@ -165,6 +185,7 @@ All runtime data lives in `~/.mercury/` — not in your project directory.
165
185
  | Path | Purpose |
166
186
  |------|---------|
167
187
  | `~/.mercury/mercury.yaml` | Main config (providers, channels, budget) |
188
+ | `~/.mercury/.env` | API keys and tokens (loaded alongside project .env) |
168
189
  | `~/.mercury/soul/*.md` | Agent personality (soul, persona, taste, heartbeat) |
169
190
  | `~/.mercury/permissions.yaml` | Capabilities and approval rules |
170
191
  | `~/.mercury/skills/` | Installed skills |
@@ -178,12 +199,18 @@ All runtime data lives in `~/.mercury/` — not in your project directory.
178
199
 
179
200
  Configure multiple LLM providers. Mercury tries them in order and falls back automatically:
180
201
 
181
- - **DeepSeek** default, cost-effective
182
- - **OpenAI** — GPT-4o-mini and others
183
- - **Anthropic** Claude and others
184
- - **Grok / xAI** OpenAI-compatible Grok models
185
- - **Ollama Cloud** remote Ollama models via API key
186
- - **Ollama Local** models running on your local Ollama instance
202
+ | Provider | Default Model | API Key | Notes |
203
+ |----------|--------------|---------|-------|
204
+ | **DeepSeek** | deepseek-chat | `DEEPSEEK_API_KEY` | Default, cost-effective |
205
+ | **OpenAI** | gpt-4o-mini | `OPENAI_API_KEY` | GPT-4o, o3, etc. |
206
+ | **Anthropic** | claude-sonnet-4 | `ANTHROPIC_API_KEY` | Claude Sonnet, Haiku, Opus |
207
+ | **Grok (xAI)** | grok-4 | `GROK_API_KEY` | OpenAI-compatible endpoint |
208
+ | **Ollama Cloud** | gpt-oss:120b | `OLLAMA_CLOUD_API_KEY` | Remote Ollama via API |
209
+ | **Ollama Local** | gpt-oss:20b | No key needed | Local Ollama instance |
210
+
211
+ When a provider fails, Mercury automatically tries the next one. It remembers the last successful provider and starts there on the next request.
212
+
213
+ > **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.
187
214
 
188
215
  ## Architecture
189
216