Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
docs: update documentation for daemon-first execution and add pulse animation effects to styling
Zaid Bin Mushtaq879443737917
diff --git a/docs/docs.html b/docs/docs.htmlindex aafbc9e6..42447e74 100644--- a/docs/docs.html+++ b/docs/docs.html@@ -390,20 +390,21 @@<p>If Mercury is already running, <code>mercury up</code> just confirms it and shows the PID. If the service isn'tinstalled yet, it installs it first, then starts the daemon.</p>- <h3>Foreground (interactive)</h3>+ <h3>Start (background daemon)</h3><div class="terminal-inline"><code>mercury start</code></div>- <p>Runs in the foreground with a readline prompt. Press <code>Ctrl+C</code> to exit. All conversation happens in- your terminal with real-time text streaming and markdown rendering.</p>+ <p>Starts Mercury as a background daemon by default. Telegram becomes your primary interface. Logs go to+ <code>~/.mercury/daemon.log</code>. Stale PID files are auto-cleaned. Includes crash recovery with exponential+ backoff.</p>- <h3>Background (daemon)</h3>+ <h3>Foreground (interactive)</h3><div class="terminal-inline">- <code>mercury start -d</code>+ <code>mercury start --foreground</code></div>- <p>Runs in the background. Telegram becomes your primary interface since there's no terminal for input. Logs go to- <code>~/.mercury/daemon.log</code>. The process includes built-in crash recovery with exponential backoff.</p>- <p>When running in daemon mode, you can stop it with:</p>+ <p>Runs in the foreground with a readline prompt. Press <code>Ctrl+C</code> to exit. All conversation happens in+ your terminal with real-time text streaming and markdown rendering. Shorthand: <code>mercury start -f</code>.</p>+ <p>When running in background mode, you can stop it with:</p><div class="terminal-inline"><code>mercury stop</code></div>@@ -433,11 +434,11 @@</tr><tr><td>mercury start</td>- <td>Start in foreground mode</td>+ <td>Start as background daemon (default)</td></tr><tr>- <td>mercury start -d</td>- <td>Start in background (daemon mode)</td>+ <td>mercury start --foreground</td>+ <td>Start in foreground (interactive) mode. Shorthand: <code>-f</code></td></tr><tr><td>mercury restart</td>@@ -614,7 +615,23 @@</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>+ <p>Mercury runs as a background daemon by default. Telegram and scheduled tasks keep working after you close the+ terminal.</p>++ <h3>Start</h3>+ <div class="terminal-inline">+ <code>mercury start</code>+ </div>+ <p>Starts Mercury as a background daemon by default. Spawns a detached child process, writes a PID file to+ <code>~/.mercury/daemon.pid</code>, and redirects output to <code>~/.mercury/daemon.log</code>. Stale PID files+ are automatically cleaned up.</p>++ <h3>Start in foreground</h3>+ <div class="terminal-inline">+ <code>mercury start --foreground</code>+ </div>+ <p>Runs Mercury attached to your terminal. Useful for debugging or when you want to see output directly. Shorthand:+ <code>mercury start -f</code>.</p><h3>The easy way: mercury up</h3><div class="terminal-inline">@@ -623,13 +640,6 @@<p>This one command does everything: installs the system service if needed, starts the background daemon, andconfirms Mercury is running. If it's already running, it just shows you the PID.</p>- <h3>Start in background</h3>- <div class="terminal-inline">- <code>mercury start -d</code>- </div>- <p>This spawns a detached child process, writes a PID file to <code>~/.mercury/daemon.pid</code>, and redirects- output to <code>~/.mercury/daemon.log</code>.</p>-<h3>Stop</h3><div class="terminal-inline"><code>mercury stop</code>@@ -658,9 +668,9 @@<div class="callout"><div class="callout-title">Crash recovery</div>- <p>When started with <code>--daemon</code> (internal flag used by <code>start -d</code> and system services),- Mercury wraps the agent in a watchdog. If it crashes, it restarts automatically with exponential backoff (1s,- 1.25s, 1.56s...). After 10 crashes within 60 seconds, it exits to prevent crash loops.</p>+ <p>Background mode includes a watchdog. If Mercury crashes, it restarts automatically with exponential backoff+ (1s, 1.25s, 1.56s...). After 10 crashes within 60 seconds, it exits to prevent crash loops. Stale PID files+ are auto-cleaned on startup to prevent "already running" false positives.</p></div><h2 id="service">System Service (Auto-Start on Boot)</h2>diff --git a/docs/index.html b/docs/index.htmlindex d558a7fc..261f804e 100644--- a/docs/index.html+++ b/docs/index.html@@ -145,7 +145,7 @@<div class="feature-card" data-reveal><div class="feature-icon">♾</div><h3>Always On</h3>- <p>Cron scheduling, delayed tasks, and a heartbeat system that monitors budget and upcoming tasks. Run as a background daemon on macOS, Linux, or Windows. Auto-starts on boot, auto-restarts on crash.</p>+ <p>Background daemon by default. Cron scheduling, delayed tasks, and a heartbeat system that monitors budget and upcoming tasks. Auto-starts on boot, auto-restarts on crash. Use <code>--foreground</code> for attached mode.</p></div><div class="feature-card" data-reveal><div class="feature-icon">📡</div>@@ -267,7 +267,7 @@<div class="terminal-inline"><code>mercury start</code></div>- <p>Mercury wakes up, loads your soul files, restores scheduled tasks, and is live. Start talking. Or use <code>mercury start -d</code> for background mode.</p>+ <p>Mercury wakes up, loads your soul files, restores scheduled tasks, and runs as a background daemon. Start talking via Telegram or use <code>mercury start --foreground</code> for attached mode.</p></div></div></div>@@ -497,7 +497,7 @@<section id="daemon" class="section section-dark"><div class="container"><h2 class="section-title">Always On. Any Platform.</h2>- <p class="section-sub">Run Mercury as a background daemon. Auto-starts on boot. Auto-restarts on crash.</p>+ <p class="section-sub">Daemon by default. Auto-starts on boot. Auto-restarts on crash.</p><div class="terminal-window" style="max-width: 680px; margin: 0 auto 48px;"><div class="terminal-bar"><span class="terminal-dot red"></span>@@ -506,9 +506,7 @@<span class="terminal-title">terminal</span></div><div class="terminal-body" style="min-height: auto; padding: 16px 24px;">- <p style="margin:0;color:var(--gray);">$ <span style="color:var(--cyan);">mercury up</span></p>- <p style="margin:0;color:var(--cyan);">Installing Mercury as a system service...</p>- <p style="margin:0;color:var(--green);">Mercury service installed (LaunchAgent)</p>+ <p style="margin:0;color:var(--gray);">$ <span style="color:var(--cyan);">mercury start</span></p><p style="margin:0;color:var(--cyan);">Starting Mercury in background...</p><p style="margin:0;color:var(--white);">Mercury started in background (PID: 48291)</p><p style="margin:0;color:var(--gray-dim);">Auto-starts on login. Auto-restarts on crash.</p>@@ -518,8 +516,9 @@<div class="cap-group" data-reveal><h3>Commands</h3><ul>+ <li><code>mercury start</code> — Start daemon (default)</li>+ <li><code>mercury start --foreground</code> — Attached mode</li><li><code>mercury up</code> — Install service + start daemon</li>- <li><code>mercury start</code> — Foreground mode</li><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>diff --git a/docs/style.css b/docs/style.cssindex 75e46d3e..e5715aaa 100644--- a/docs/style.css+++ b/docs/style.css@@ -654,6 +654,12 @@ footer {bottom: 32px;width: 2px;background: linear-gradient(to bottom, var(--cyan), var(--cyan-dim), transparent);+ box-shadow: 0 0 8px var(--cyan-glow), 0 0 20px rgba(0, 212, 255, 0.15);+ animation: pulse-line 3s ease-in-out infinite;+}+@keyframes pulse-line {+ 0%, 100% { opacity: 0.6; }+ 50% { opacity: 1; }}.brain-step {display: flex;@@ -669,8 +675,8 @@ footer {display: flex;align-items: center;justify-content: center;- background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 212, 255, 0.05));- border: 1px solid var(--cyan-dim);+ background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.05));+ border: 2px solid var(--cyan);border-radius: 50%;font-family: var(--font);font-size: 1.2em;@@ -678,6 +684,23 @@ footer {color: var(--cyan);position: relative;z-index: 1;+ box-shadow: 0 0 12px var(--cyan-glow), 0 0 24px rgba(0, 212, 255, 0.2), inset 0 0 12px rgba(0, 212, 255, 0.1);+ animation: glow-pulse 2.5s ease-in-out infinite;+ transition: all 0.3s ease;+}+.brain-step:hover .brain-step-num {+ background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), rgba(0, 212, 255, 0.15));+ box-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(0, 212, 255, 0.3), inset 0 0 16px rgba(0, 212, 255, 0.2);+ transform: scale(1.08);+ color: var(--white);+}+.brain-step:nth-child(1) .brain-step-num { animation-delay: 0s; }+.brain-step:nth-child(2) .brain-step-num { animation-delay: 0.4s; }+.brain-step:nth-child(3) .brain-step-num { animation-delay: 0.8s; }+.brain-step:nth-child(4) .brain-step-num { animation-delay: 1.2s; }+@keyframes glow-pulse {+ 0%, 100% { box-shadow: 0 0 12px var(--cyan-glow), 0 0 24px rgba(0, 212, 255, 0.2), inset 0 0 12px rgba(0, 212, 255, 0.1); }+ 50% { box-shadow: 0 0 24px var(--cyan-glow), 0 0 48px rgba(0, 212, 255, 0.35), inset 0 0 20px rgba(0, 212, 255, 0.2); }}.brain-step-content {flex: 1;