Spaces:
Paused
Paused
Commit History
-
Fix gateway crash loop caused by restore wiping the hermes venv
ClaudeUnverified signatureThe gateway logs showed a code-127 crash loop: the hermes wrapper at ~/.local/bin/hermes pointed to ~/.hermes/hermes-agent/venv/bin/hermes, which didn't exist. Root cause: backup.py's tree walk only excludes files/dirs *named* venv/.cache/etc., so a non-excluded file directly under ~/.hermes/hermes-agent/ (the installer's own install dir, which happens to live inside HERMES_HOME) made "hermes-agent" show up as a top-level entry in the backup dataset -- missing its venv/ subdir, since that part *is* excluded. restore_hermes.sh then rmtree+copytree's every top-level entry present in the dataset, so on every boot it deleted the real (working) hermes-agent install and replaced it with the incomplete backed-up one. Both configure_hermes.sh and install_hermes.sh then skipped reinstalling because their checks were just `command -v hermes`, which still succeeds since the now-broken wrapper script is untouched (it lives outside ~/.hermes). Fix is three-layered: - backup.py: exclude the whole "…ee722fd -
Fix dead owner-credit env var and harden hermes config set on first boot
ClaudeUnverified signatureSPACE_OWNER was never a real Hugging Face auto-injected var (the actual one is SPACE_AUTHOR_NAME), so the footer's @owner link silently never rendered for any duplicator. Also fixed a latent bug in configure_hermes.sh where chaining the two `hermes config set` calls with `;` inside a `{ }` group meant the group's exit code reflected only the second call, masking a failed first call; added 3x retry with backoff for both, since hermes may still be settling right after the fallback install just above.f7ddc33 -
Sync state on shutdown/gateway restart, add .dockerignore and backup jitter
ClaudeUnverified signatureA docker stop/redeploy had no graceful shutdown path, so it could lose up to SYNC_INTERVAL of agent state. entrypoint.sh now traps SIGTERM/SIGINT and runs one last backup before supervisord's children are stopped, which requires running supervisord as a background child instead of exec'ing it (exec would replace the trapping shell). hermes_gateway.sh also syncs immediately whenever the gateway process exits, instead of waiting for the next timer tick. Also: added a .dockerignore (the build context was sending the whole repo, including .git history, on every push) and +/-10% jitter on the backup interval via APScheduler's native jitter param, so many duplicated Spaces don't all sync in lockstep.e8e419f -
Replace tarball backup with file-mirror sync, port other HuggingMes improvements
ClaudeUnverified signatureThe previous fingerprint-based backup still built a fresh tar.gz every cycle, which is what originally grew the dataset to 83.9GB. Rewrote app/backup.py to mirror ~/.hermes into the dataset file-by-file via huggingface_hub.upload_folder (no archive ever created), with two-tier change detection (cheap metadata marker, then a full SHA-256 content hash only when the marker drifts) before paying for an upload. delete_patterns=["*"] keeps the dataset an exact mirror, which also cleans up legacy backups/*.tar.gz and priority/*.md artifacts from the old scheme. scripts/restore_hermes.sh now restores via snapshot_download unconditionally (the dataset is the durable source of truth for an ephemeral container) instead of extracting a tarball. Also ported a few things HuggingMes does better: - Shell-capture wrapper functions (apt/pip/npm/hermes) in configure_startup.sh that auto-append successful interactive terminal installs to data/startup.sh, so they survive a rebuild without pre-declar…d5a8a8f
-
Track SOUL.md at all paths agent writes to, not just the canonical one
ClaudeUnverified signatureAgent writes SOUL.md to unpredictable locations (/home/user/SOUL.md, ~/.hermes/workspace/SOUL.md, etc). Rather than relying on the agent to use the correct path, track them all: - backup.py: scan candidate wrong-path locations and promote to ~/.hermes/SOUL.md before uploading, so nothing is lost - restore_hermes.sh: after restoring to ~/.hermes/SOUL.md, mirror the file to ~/SOUL.md and ~/.hermes/workspace/SOUL.md so the agent finds it wherever it looks on the next session - configure_hermes.sh: seed ~/SOUL.md alongside the other mirrors so first-boot has the default in all locations9d9f8e4 -
Fix SOUL.md path mismatch: capture workspace/ copy and mirror on restore
ClaudeUnverified signatureThe Hermes agent sometimes writes SOUL.md into ~/.hermes/workspace/SOUL.md instead of the correct ~/.hermes/SOUL.md. Three fixes: 1. backup.py: before uploading SOUL.md as a priority file, check workspace/SOUL.md as a fallback if the root copy is missing/empty — and promote it to the root path so it is captured correctly. 2. restore_hermes.sh: after restoring SOUL.md to ~/.hermes/SOUL.md, also mirror it into ~/.hermes/workspace/SOUL.md so the agent finds it at whichever path it checks. 3. configure_hermes.sh: fix broken condition (`&& [ ! -f ]` could never be true when file exists with only template comments) — seed the default SOUL.md whenever active content is missing, and also seed workspace/SOUL.md.7922930 -
Save SOUL.md and USER.md as priority plain files in HF Dataset
ClaudeUnverified signatureOn every backup cycle, upload SOUL.md and memories/USER.md as plain files (priority/SOUL.md, priority/USER.md) in addition to the full tarball. On cold start, restore these priority files first — before checking for DB state — so the agent persona and user memory survive container rebuilds even if the timed backup hasn't run yet since the last edit.a2c4e15 -
Read SOUL.md into web chat system prompt natively
ClaudeUnverified signatureWeb chat now reads ~/.hermes/SOUL.md (same file Telegram/Hermes uses) and injects it as the system message. Editing SOUL.md in the terminal or Hermes UI affects both platforms immediately. Template HTML comments are stripped so only the actual persona content is used. History restore from localStorage always uses the current SOUL.md as system message. Adds default_soul.md so the file structure is preserved on cold starts.647f45e -
Revert "Add AGENT_NAME and AGENT_SYSTEM_PROMPT to override model identity"
ClaudeUnverified signatureThis reverts commit fdad427858de786b4bd0c5ae5b52afa1a853f72d.f3b3b11 -
Add AGENT_NAME and AGENT_SYSTEM_PROMPT to override model identity
ClaudeUnverified signatureSome models have hardcoded personas (e.g. 'I am OWL, developed by ZOO company'). This adds two Space variables that override on all platforms: - Web chat: system message prepended to every conversation - Telegram: hermes config set agent.name/system_prompt/persona on boot - README: variables appear in the duplicate dialog - Clear button preserves the system messagefdad427 -
Restore ~/.hermes from HF Dataset backup on container cold start
ClaudeUnverified signatureOn each container restart, restore_hermes.sh downloads the latest backup tarball and extracts it to ~/.hermes/ before Hermes starts. This preserves the agent name, conversation history, skills, kanban, and cron across Space restarts/sleep cycles. Skips restore if local state already exists (mid- session supervisor restart). Sensitive files (.env etc) are excluded from both backup and restore. Adds restore log tab to the Logs viewer.89ae1cc -
Add provider expansion, key rotation, startup scripts, /v1 relay, and more
ClaudeUnverified signature- configure_hermes.sh: add DeepSeek, xAI/Grok, NVIDIA, HuggingFace providers with their own API key env vars; HERMES_PROVIDER written to .env so app/main.py can read it; API key pool rotation (*_KEYS vars) - configure_startup.sh: new script for STARTUP_APT/PIP/NPM_PACKAGES and STARTUP_RUN/STARTUP_RUN_BASE64; installs packages and runs user scripts on every boot so installs survive container restarts - hermes_gateway.sh: configurable restart loop (GATEWAY_RESTART_DELAY, GATEWAY_MAX_RESTARTS) and restart notification (WEBHOOK_URL) instead of relying solely on supervisord autorestart - configure_cloudflare.sh: CLOUDFLARE_KEEPALIVE_ENABLED=false skips the cron schedule while still deploying the worker for Telegram proxy - app/main.py: /v1/* relay route - forwards requests to the configured LLM provider's API with GATEWAY_TOKEN auth, turning the Space into a remote AI backend for any OpenAI-compatible client - app/backup.py: BACKUP_DATASET_NAME var; SYNC_INTERVAL in second…a453ffc
-
Add automatic Telegram Bot API proxy via Cloudflare Worker
ClaudeUnverified signatureHF Spaces blocks outbound connections to api.telegram.org, so both long-polling and webhook mode fail at the network level - the gateway log shows connect timed out for every Telegram API call. Cloudflare's network can reach Telegram fine, so extend the existing keep-awake Worker (configure_cloudflare.sh, replacing configure_keepawake.sh) to also reverse-proxy /bot* and /file/bot* to api.telegram.org, and point Hermes at it via platforms.telegram.extra.base_url. Uses the CLOUDFLARE_WORKERS_TOKEN secret that's already required - no new secrets for duplicators. Falls back cleanly (with a dashboard error and log message) if the Cloudflare account has no workers.dev subdomain yet.2ca2daa -
Add optional Telegram webhook mode (TELEGRAM_MODE=webhook)
ClaudeUnverified signatureWorks around HF Spaces blocking outbound connections to Telegram's API for long-polling. When set, configure_hermes.sh points hermes at this Space's /telegram-webhook endpoint with a generated secret; main.py validates and forwards Telegram's X-Telegram-Bot-Api-Secret-Token to the gateway. Dashboard now reflects the active mode.efb703a -
Fix model config: set model.default instead of flat model key
ClaudeUnverified signatureconfig.yaml expects a nested model: {provider, default} object. "hermes config set model <id>" was writing a flat string to the top-level model key, which collided with the model.provider write and left model.default empty, causing OpenRouter's "No models provided" error.760b271 -
Fix keep-awake Cloudflare deploy: override multipart filename to worker.js
ClaudeUnverified signaturecurl -F sends the temp file's actual basename (keepawake-worker.js) as the multipart filename, but Cloudflare's module worker API matches metadata.main_module against that filename, causing "10021: Uncaught Error: No such module: worker.js".802b13a -
Surface Cloudflare API error details on keep-awake failure
ClaudeUnverified signatureCapture HTTP status + response body from the Cloudflare deploy/schedule calls and show the actual error message on the Keep Awake dashboard card, so duplicators can diagnose deploy failures without needing terminal access.c42fee4 -
Auto-deploy Cloudflare Worker keep-awake on boot using CLOUDFLARE_WORKERS_TOKEN
ClaudeUnverified signatureReplaces the GitHub Actions cron (which only helps people who fork/sync the GitHub repo) with a container-side script that calls the Cloudflare REST API directly using the CLOUDFLARE_WORKERS_TOKEN secret already required by the Space. Works for anyone who duplicates the Space with zero manual wrangler steps.4f367bf -
Fix gateway: use real hermes CLI commands and long-polling
ClaudeUnverified signatureThe Gateway card showed OFFLINE because configure_hermes.sh and hermes_gateway.sh invoked nonexistent hermes flags (hermes setup --non-interactive --model/--telegram-*, hermes gateway --port --telegram). - configure_hermes.sh now writes ~/.hermes/.env with the correct provider key env vars (GOOGLE_API_KEY for Gemini, etc.) and uses `hermes config set model` / `model.provider` to select the model. - hermes_gateway.sh now runs `hermes gateway run`, which uses Telegram long-polling and needs no inbound port. - status.py checks gateway liveness via the running process instead of an HTTP /health probe on a port that's never opened. - Docs updated: the Cloudflare Worker's main job is keep-awake; the Telegram webhook proxy is now optional/advanced for users who manually configure Hermes webhook mode.15351db -
Add Dockerfile, install/config scripts, and supervisord setup
ClaudeUnverified signaturebd961b1