Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
Update docs for provider and Telegram flows
M Shehzenebbd07e18347
diff --git a/docs/docs.html b/docs/docs.htmlindex 1f02b64b..41db3448 100644--- a/docs/docs.html+++ b/docs/docs.html@@ -336,9 +336,12 @@<ul><li><strong>Your name</strong> — used by the agent to address you</li><li><strong>Agent name</strong> — defaults to "Mercury", customize it</li>- <li><strong>LLM API keys</strong> — at least one: DeepSeek, OpenAI, or Anthropic</li>- <li><strong>Telegram bot token</strong> — optional, for remote access</li>+ <li><strong>LLM providers</strong> — choose one or more: DeepSeek, OpenAI, Anthropic, Grok, Ollama Cloud, or Ollama Local</li>+ <li><strong>Model selection</strong> — after each valid key, Mercury fetches recommended chat models and lets you choose a default</li>+ <li><strong>Telegram bot token</strong> — optional, for remote access in private 1:1 chats</li></ul>+ <p>Provider keys are validated by format and then by fetching available models. If model discovery fails, Mercury asks you to re-enter the key instead of accepting random text.</p>+ <p>If you enable Telegram during first-time setup, Mercury starts a temporary pairing flow: send <code>/start</code> to your bot in Telegram, copy the pairing code you receive there, then paste that code into the CLI to finish setup.</p><p>All config is stored in <code>~/.mercury/</code> — nothing in your project directory.</p><div class="callout">@@ -461,7 +464,8 @@on any field to keep it unchanged, or type a new value to replace it.</p><ul><li><strong>API keys</strong> are shown masked: <code>sk-x••••4f2a</code></li>- <li><strong>Telegram token</strong> — type <code>none</code> to disable Telegram</li>+ <li><strong>Providers and models</strong> can be reselected; Mercury fetches models again for changed credentials</li>+ <li><strong>Telegram token</strong> — type <code>none</code> to disable Telegram, or paste a token to start the pairing-code flow</li><li><strong>Daily budget</strong> — change the token budget limit</li></ul><div class="terminal-inline">@@ -469,7 +473,7 @@</div><h2 id="in-chat">In-Chat Commands</h2>- <p>Type these during a conversation with Mercury — they work on both CLI and Telegram. They <strong>do not consume+ <p>Type these during a conversation with Mercury. Most work in both CLI and Telegram unless marked otherwise. They <strong>do not consumeAPI tokens</strong>.</p><table class="cmd-table"><thead>@@ -487,6 +491,46 @@<td>/status</td><td>Show agent name, provider, budget, and channels</td></tr>+ <tr>+ <td>/ or /menu</td>+ <td>CLI only: open the arrow-key command picker with Back and Exit options</td>+ </tr>+ <tr>+ <td>/telegram</td>+ <td>CLI only: open Telegram management with pending requests, approvals, roles, and reset actions</td>+ </tr>+ <tr>+ <td>/telegram pending</td>+ <td>CLI only: list pending Telegram access requests</td>+ </tr>+ <tr>+ <td>/telegram users</td>+ <td>CLI only: list approved Telegram admins and members</td>+ </tr>+ <tr>+ <td>/telegram approve <code|id></td>+ <td>CLI only: approve the first pairing code or a later Telegram access request</td>+ </tr>+ <tr>+ <td>/telegram reject <id></td>+ <td>CLI only: reject a pending Telegram access request</td>+ </tr>+ <tr>+ <td>/telegram remove <id></td>+ <td>CLI only: revoke an approved Telegram user</td>+ </tr>+ <tr>+ <td>/telegram promote <id></td>+ <td>CLI only: promote a Telegram member to admin</td>+ </tr>+ <tr>+ <td>/telegram demote <id></td>+ <td>CLI only: demote a Telegram admin to member</td>+ </tr>+ <tr>+ <td>/telegram reset</td>+ <td>CLI only: clear all Telegram access and restart pairing from scratch</td>+ </tr><tr><td>/tools</td><td>List all currently loaded tools</td>@@ -521,6 +565,10 @@</tr></tbody></table>+ <div class="callout">+ <div class="callout-title">Telegram pairing and access</div>+ <p>Telegram stays private 1:1 only. The first user sends <code>/start</code>, receives a pairing code in Telegram, and you approve that code from the CLI during setup. Later Telegram users also send <code>/start</code>, appear as pending requests, and can then be approved or rejected from the CLI <code>/telegram</code> menu.</p>+ </div><h2 id="daemon">Daemon Mode</h2><p>Mercury can run in the background so Telegram and scheduled tasks keep working after you close the terminal.</p>@@ -850,7 +898,7 @@</div><h2 id="tools">Built-in Tools</h2>- <p>Mercury has 21 built-in tools it can use during conversations. These are not CLI commands — the agent decides+ <p>Mercury has a built-in toolset it can use during conversations. These are not CLI commands — the agent decideswhen to call them.</p><h3>Filesystem</h3>@@ -898,6 +946,29 @@<td>Send file to user (Telegram upload)</td><td>path</td></tr>+ <tr>+ <td>approve_scope</td>+ <td>Request read/write access to a directory</td>+ <td>path, mode</td>+ </tr>+ </tbody>+ </table>++ <h3>Messaging</h3>+ <table class="cmd-table">+ <thead>+ <tr>+ <th>Tool</th>+ <th>What it does</th>+ <th>Parameters</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td>send_message</td>+ <td>Send a message to approved Telegram recipients</td>+ <td>content</td>+ </tr></tbody></table>@@ -1081,7 +1152,12 @@<li><strong>DeepSeek</strong> — default, cost-effective</li><li><strong>OpenAI</strong> — GPT-4o-mini and others</li><li><strong>Anthropic</strong> — Claude and others</li>+ <li><strong>Grok</strong> — xAI chat models</li>+ <li><strong>Ollama Cloud</strong> — hosted Ollama models with API key auth</li>+ <li><strong>Ollama Local</strong> — your local Ollama server with base URL + model</li></ul>+ <p>During onboarding, Mercury lets you choose one or more providers first. After each valid credential, it fetches a short list of recommended chat-capable models, lets you pick one with arrow keys, and still allows manual model entry when needed.</p>+ <p>Default selection rules are simple: if only one provider is configured, that provider becomes the default; if several are configured, Mercury asks you which one should be the default, with DeepSeek preselected when available.</p><p>When a provider fails, Mercury automatically tries the next one. It remembers the last successful provider andstarts there on the next request.</p>@@ -1181,4 +1257,4 @@</script></body>-</html>\ No newline at end of file+</html>diff --git a/docs/index.html b/docs/index.htmlindex 6dd61a20..c4acb287 100644--- a/docs/index.html+++ b/docs/index.html@@ -6,7 +6,7 @@<meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Mercury — Soul-Driven AI Agent with Permission Guardrails | Cosmic Stack</title><meta name="description"- content="The AI agent that asks before it acts. Permission guardrails, token efficiency, full control, and GitHub companion. Runs 24/7 from CLI or Telegram. 26 built-in tools, skill system, scheduling.">+ content="The AI agent that asks before it acts. Permission guardrails, token efficiency, full control, and GitHub companion. Runs 24/7 from CLI or Telegram with multi-provider onboarding, model selection, skills, and scheduling."><meta name="author" content="Cosmic Stack"><meta name="robots" content="index, follow"><meta name="keywords"@@ -17,7 +17,7 @@<!-- Open Graph --><meta property="og:title" content="Mercury — Soul-Driven AI Agent with Permission Guardrails"><meta property="og:description"- content="The AI agent that asks before it acts. Permission guardrails, token efficiency, and full control. Runs 24/7 from CLI or Telegram.">+ content="The AI agent that asks before it acts. Permission guardrails, token efficiency, and full control. Runs 24/7 from CLI or Telegram with multi-provider onboarding and model selection."><meta property="og:type" content="website"><meta property="og:url" content="https://mercury.cosmicstack.org"><meta property="og:image" content="https://mercury.cosmicstack.org/card.png">@@ -32,7 +32,7 @@<meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="Mercury — Soul-Driven AI Agent with Permission Guardrails"><meta name="twitter:description"- content="The AI agent that asks before it acts. Permission guardrails, token efficiency, and full control.">+ content="The AI agent that asks before it acts. Permission guardrails, token efficiency, and full control with multi-provider onboarding."><meta name="twitter:image" content="https://mercury.cosmicstack.org/card.png"><meta name="twitter:image:alt"content="Mercury — Soul-Driven AI Agent. Permission Guardrails. Token Efficiency. Full Control.">@@ -104,7 +104,7 @@/_/ /_/_____/_/ |_|\____/\____/_/ |_| /_/</pre><p class="hero-tagline">Soul-driven. Token-efficient. Always on.</p>- <p class="hero-sub">Your personal AI agent with 26 built-in tools, skill system, multi-channel access, GitHub companion, and+ <p class="hero-sub">Your personal AI agent with built-in tools, skill system, multi-channel access, GitHub companion, andhardened permissions. Runs 24/7 from your terminal or Telegram.</p><div class="hero-actions"><a href="#how-it-works" class="btn btn-primary">Get Started</a>@@ -147,7 +147,7 @@<div class="feature-card" data-reveal><div class="feature-icon">📡</div><h3>Multi-Channel</h3>- <p>CLI with readline and text streaming. Telegram with typing indicators, HTML formatting, and file uploads.+ <p>CLI with readline and arrow-key command menus. Telegram with typing indicators, HTML formatting, file uploads, and private 1:1 access approval.More channels coming: Signal, Discord, Slack, WhatsApp.</p></div><div class="feature-card" data-reveal>@@ -184,8 +184,7 @@<div class="terminal-inline"><code>mercury</code></div>- <p>First run triggers the onboarding wizard. Enter your name, an API key, and optionally a Telegram bot token.- Takes 30 seconds.</p>+ <p>First run triggers the onboarding wizard. Choose one or more providers, validate each key by fetching models, pick your default model, and optionally pair Telegram with a bot token plus pairing code.</p></div><div class="step" data-reveal><div class="step-number">3</div>@@ -217,7 +216,7 @@<section id="capabilities" class="section section-dark"><div class="container">- <h2 class="section-title">26 Built-In Tools</h2>+ <h2 class="section-title">Built-In Tools</h2><p class="section-sub">Plus extensible skills, scheduling, and memory.</p><div class="caps-grid"><div class="cap-group" data-reveal>@@ -233,6 +232,12 @@<li><code>approve_scope</code> — Request directory access</li></ul></div>+ <div class="cap-group" data-reveal>+ <h3>💬 Messaging</h3>+ <ul>+ <li><code>send_message</code> — Send a message to approved Telegram recipients</li>+ </ul>+ </div><div class="cap-group" data-reveal><h3>🐚 Shell</h3><ul>@@ -442,7 +447,7 @@<li><code>mercury restart</code> — Restart background process</li><li><code>mercury stop</code> — Stop background process</li><li><code>mercury doctor</code> — Reconfigure (Enter keeps values)</li>- <li><code>/help</code> <code>/status</code> <code>/budget</code> — In-chat commands</li>+ <li><code>/</code> <code>/menu</code> <code>/telegram</code> — Arrow-key command menus in CLI chat</li></ul></div><div class="cap-group" data-reveal>@@ -520,8 +525,8 @@</div><div class="arch-card" data-reveal><div class="arch-label">Providers</div>- <div class="arch-value">DeepSeek · OpenAI · Anthropic</div>- <div class="arch-desc">Fallback chain with last-successful tracking</div>+ <div class="arch-value">DeepSeek · OpenAI · Anthropic · Grok · Ollama Cloud · Ollama Local</div>+ <div class="arch-desc">Validated onboarding, model discovery, and fallback with last-successful tracking</div></div><div class="arch-card" data-reveal><div class="arch-label">Memory</div>@@ -531,7 +536,7 @@<div class="arch-card" data-reveal><div class="arch-label">Telegram</div><div class="arch-value">grammY</div>- <div class="arch-desc">Long polling, typing loop, HTML formatting, file uploads</div>+ <div class="arch-desc">Long polling, pairing codes, CLI-managed access requests, broadcasts, file uploads</div></div><div class="arch-card" data-reveal><div class="arch-label">Runtime Data</div>@@ -575,4 +580,4 @@<script src="app.js"></script></body>-</html>\ No newline at end of file+</html>