Commit Graph

3 Commits

Author SHA1 Message Date
Hongming Wang
1313694df2 feat(v2.0.0): replace provider shim with the real Nous hermes-agent
The old template was a thin OpenAI-compat multi-provider dispatcher
that shared the name "hermes" with Nous Research's hermes-agent but
had none of its actual capabilities (skills, memory, tools, learning
loop, multi-platform gateway). Customers picking "Hermes" in canvas
got a stateless chat shim instead of the agent framework they
expected.

This PR rewrites the template to run the real hermes-agent
(github.com/NousResearch/hermes-agent) inside the workspace
container:

- Dockerfile installs hermes-agent via its upstream install.sh
  (same pattern template-claude-code uses for the claude CLI).
- start.sh boots `hermes gateway` with the api_server platform
  on 127.0.0.1:8642, waits for /health, then exec's
  molecule-runtime on :8000.
- adapter.py / executor.py collapse to a thin A2A proxy that
  forwards every incoming message to /v1/chat/completions on
  the local gateway and returns the response on the A2A queue.
- providers.py + escalation.py deleted — hermes-agent owns
  provider selection (`hermes model`), its own skill/memory loop
  supersedes escalation.
- Env vars unchanged: HERMES_API_KEY, OPENROUTER_API_KEY,
  ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, MINIMAX_API_KEY
  are all forwarded into ~/.hermes/.env at boot.

All planning + rationale lives in this repo under docs/:
- docs/PLANNING.md — why, scope, phases, risks, success criteria
- docs/ARCHITECTURE.md — port map, boot sequence, request flow,
  what the bridge deliberately does NOT do
- docs/MIGRATION.md — v1.x → v2.0.0 behaviour changes (no
  customer migration needed, v1.x was CI-canary-only)
- docs/CONFIGURATION.md — model picking, persistence, gateway
  restart, inspection, timeouts

Net -195 lines of code for a massive capability upgrade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 10:59:20 -07:00
Hongming Wang
77c24e647f fix: absolute imports + patch SUPPORTED_RUNTIMES for standalone deploy
- Change relative imports (from .executor, from .providers) to absolute
  since files are copied flat to /app/ in the Docker image
- Patch molecule_runtime.preflight.SUPPORTED_RUNTIMES at build time to
  include 'hermes' and 'gemini-cli' (PyPI package v0.1.0 doesn't know
  about these runtimes yet)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 20:41:51 -07:00
Hongming Wang
d4de8ab13d feat: add adapter code + Dockerfile for standalone deployment
Adapters extracted from molecule-monorepo/workspace-template.
Uses molecule-ai-workspace-runtime PyPI package for shared infrastructure.

- adapter.py — runtime-specific adapter class
- requirements.txt — runtime-specific deps + molecule-ai-workspace-runtime
- Dockerfile — FROM python:3.11-slim, pip install, COPY adapter, molecule-runtime entrypoint
- ADAPTER_MODULE=adapter tells the runtime to load this repo's Adapter class

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 04:27:22 -07:00