Skip to content

740400019/formgodbot

Repository files navigation

Hermes Agent Hosting Platform

面向亚太开发者的 Hermes Agent 托管平台。详见 PRODUCT_SCOPE.md / RUNTIME_DESIGN.md / CONTROL_PLANE.md(在仓库父目录或单独提供)。

当前状态

Phase 1 — 数据面骨架(本地可跑)

目标:本地能跑通一个 tenant 容器,验证从浏览器访问到 Hermes WebUI / 终端 / 文件管理 / Dashboard。

目录说明

.
├── tenant-image/            # tenant-base Docker 镜像(Hermes + WebUI + ttyd + filebrowser)
│   ├── Dockerfile
│   ├── scripts/             # start.sh / init-hermes.sh / healthcheck.sh / token-watcher
│   └── config/              # supervisord.conf / hermes-default.yaml
│
├── llm-gateway-mock/        # 最简 Go 服务,模拟 LLM Gateway(端口 8888)
│   └── main.go              # /v1/chat/completions, /admin/instance-bootstrap, ...
│
├── token-verify-mock/       # 最简 Go 服务,模拟 token verify(端口 9090,Caddy forward_auth)
│   └── main.go              # /verify, /verify-port, /lookup-by-ip
│
├── caddy/
│   ├── Caddyfile            # *.h1.dev.local 通配 + forward_auth + 反代
│   └── certs/               # mkcert 签的本地证书(gitignore)
│
├── scripts/
│   ├── dev-setup.sh         # 一键起本地开发环境
│   ├── dev-teardown.sh      # 关停 + 清理
│   └── create-test-instance.sh  # 启动一个 slug=abc123 的 tenant
│
├── docs/
│   └── LOCAL_TESTING.md     # 本地启动指南 + 排错
│
├── docker-compose.dev.yml
├── .env.example
├── PROGRESS.md              # 开发日志
├── QUESTIONS.md             # 待确认 / 卡点问题
└── README.md

快速开始(本地)

前提:

  • Docker Desktop(macOS / Linux)
  • mkcert(brew install mkcert nss)
  • /etc/hosts 已添加本地通配条目(scripts/dev-setup.sh 会提示)
./scripts/dev-setup.sh                # 装证书 / 起 compose
./scripts/create-test-instance.sh     # 启动 abc123 tenant 并打印 4 个 URL

预期 URL:

  • https://abc123.h1.dev.local/ → ttyd 终端
  • https://chat-abc123.h1.dev.local/ → Hermes WebUI
  • https://files-abc123.h1.dev.local/ → filebrowser
  • https://dashboard-abc123.h1.dev.local/ → Hermes Dashboard

详见 docs/LOCAL_TESTING.md

关键设计

  • 真实 LLM API key 永远不进入 tenant 容器——容器只看到 Gateway 假地址 + tenant token。
  • 隔离:本地 Docker(开发),生产 Kata + Firecracker。镜像同一份,通过"最严格约束"取并集。
  • 路由:{slug}.h{N}.example.com,Caddy 解析 Host header → forward_auth → 反代到容器端口。

文档

  • 父目录(/Users/axie/Downloads/newsbot/)的 PRODUCT_SCOPE.mdRUNTIME_DESIGN.mdCONTROL_PLANE.md 是设计权威。
  • 本仓库 docs/ 只放"怎么用"和"排错"。

About

meme 运势

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors