Commit Graph

13 Commits

Author SHA1 Message Date
ekko c90eba226d [codex] add customizable profile avatars (#870)
* add customizable profile avatars

* keep profile avatar visible when sidebar collapses

* simplify collapsed profile avatar styling

* force managed gateway startup in docker

* limit gateway autostart to active profile

* restore all profile gateway autostart

* fix managed gateway runtime detection
2026-05-20 14:15:01 +08:00
ekko eae7195ba8 Update CLI chat session bridge (#697)
* feat: add CLI chat sessions with Python agent bridge

Introduce a new CLI chat mode that connects Web UI directly to Hermes
Agent's AIAgent via a Python bridge subprocess and Socket.IO, bypassing
the API Server /v1/responses path. Supports streaming, slash commands
(/new, /undo, /retry, /branch, /compress, /save, /title), interrupt,
and steer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat: update CLI chat session bridge

* fix: extend agent bridge startup timeouts

* docs: update bridge chat session design

* feat: align bridge compression and provider registry

* chore: bump version to 0.5.20

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 09:03:57 +08:00
ekko 0011d76ddb perf: optimize Vite build configuration for faster Docker builds (#403)
Major optimizations to resolve Docker build hanging at "rendering chunks..." phase:

**Vite Configuration (vite.config.ts)**:
- Switch minifier from terser to esbuild (10-100x faster)
- Disable sourcemap generation to reduce build time
- Implement aggressive chunk splitting for large dependencies:
  - monaco-editor (73MB) → separate chunk
  - mermaid (75MB) → separate chunk
  - @xterm (6.1MB) → separate chunk
  - vue-vendor, ui-vendor, vendor → logical groupings
- Enable CSS code splitting for better caching
- Increase chunk size warning limit to 1000KB
- Pre-bundle large dependencies (monaco-editor, mermaid, vue, pinia, naive-ui)

**Dockerfile Changes**:
- Add NODE_OPTIONS=--max-old-space-size=4096 to prevent OOM during build
- Move NODE_ENV=production before build step for consistency

**Root Cause Analysis**:
The build bottleneck was caused by three massive dependencies totaling ~150MB:
- monaco-editor (73MB) - VS Code editor for file editing
- mermaid (75MB) - Diagram rendering in chat messages
- @xterm (6.1MB) - Web terminal

These packages caused vite:asset (43%) and vite:terser (8%) phases to take
excessive time, especially in resource-constrained Docker environments.

**Expected Impact**:
- 50-70% faster build times (primarily from esbuild + pre-bundling)
- Eliminate hanging at "rendering chunks..." phase
- Better memory management during Docker builds

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 20:42:24 +08:00
内小子 eaed429e12 fix: 解决web终端docker部署后展示报错问题 (#282)
Co-authored-by: nabaonan <>
2026-04-29 00:29:11 +08:00
ekko c1e72942ad fix(docker): skip prepare script during npm install (#196)
#142 added a `prepare` script that triggers `npm run build` when
dist/ is missing. During Docker build, `npm install` runs before
source files and tsconfig.json are copied, causing build failure.
Use --ignore-scripts to defer build to the explicit step.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-24 23:52:54 +08:00
ekko 81dad4c939 fix(docker): use if/else to map amd64 to x64 for Node.js download (#110)
dpkg returns 'amd64' but nodejs.org uses 'x64' in tarball filenames.
Shell substitution may not work in all shells, use explicit if/else.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 16:11:40 +08:00
ekko fd02c01148 fix(docker): map amd64 to x64 for Node.js download URL (#109)
dpkg returns 'amd64' but nodejs.org uses 'x64' in tarball filenames.
Without this mapping, AMD64 builds fail with curl 404.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:59:51 +08:00
ekko ed1f7d8301 fix(docker): split RUN steps to fix Node.js install on multi-platform build (#108)
Separate apt-get install from Node.js download into two RUN layers.
The piped curl|tar command fails with 404 when ca-certificates from
apt layer is not yet available during parallel multi-platform build.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:36:47 +08:00
ekko 832029a5b3 fix(docker): use tar.gz instead of tar.xz for Node.js binary (#107)
xz-utils is not available in the base image, causing ARM64 build to
fail with "File format not recognized".

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:21:28 +08:00
ekko fdafb4e842 fix(docker): use official Node.js binary and remove unnecessary deps (#103)
* feat(chat): polish syntax highlighting and tool payload rendering (#94)

* [verified] feat(chat): polish syntax highlighting and tool payload rendering

* [verified] fix(chat): tighten large tool payload rendering

* docs: update data volume path in Docker docs

Align documentation with docker-compose.yml change:
hermes-web-ui-data -> hermes-web-ui, /app/dist/data -> /root/.hermes-web-ui

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: bundle server build and restructure service modules

- Add build-server.mjs script for standalone server compilation
- Add logger service with structured output
- Restructure auth, gateway-manager, hermes-cli, hermes services
- Update docker-compose volume mount path
- Update tsconfig and entry point for bundled server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: separate controllers from routes and centralize route registration

- Extract business logic from route handlers into controllers/
- Add centralized route registry in routes/index.ts with public/auth/protected layers
- Replace global auth whitelist with sequential middleware registration
- Extract shared helpers to services/config-helpers.ts
- Allow custom provider name to be user-editable in ProviderFormModal
- Deduplicate custom providers by poolKey instead of base_url in getAvailable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: auth bypass via path case, SPA serving, and provider improvements

- Fix auth bypass: path case-insensitive check for /api, /v1, /upload
- Fix SPA returning 401: skip auth for non-API paths (static files)
- Fix profile switch: use local loading state instead of shared store ref
- Auto-append /v1 to base_url when fetching models (frontend + backend)
- Guard .env writing to built-in providers only
- Add builtin field to provider presets, enable base_url input in form
- Print auth token to console on startup (pino only writes to file)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docker): correct volume mount path and update Node.js to 23

- Fix webui volume mount from /root/.hermes-web-ui to /home/agent/.hermes-web-ui
  (container runs as agent user, homedir() returns /home/agent)
- Update Node.js from 22 to 23 in Dockerfile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: add ARM64 support for Docker image build

Add QEMU and multi-platform build (linux/amd64,linux/arm64) so
the image works on Apple Silicon and ARM-based NAS devices.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docker): use official Node.js binary and remove unnecessary deps

- Replace NodeSource with official Node.js binary (fixes ARM64 GPG error)
- Remove python3/python3-yaml (not needed, base image already has Python)
- Keep make/g++ for node-pty native compilation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Zhicheng Han <43314240+hanzckernel@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 14:44:51 +08:00
ekko 5a114d97f6 fix(docker): correct volume mount path and update Node.js to 23 (#99)
* feat(chat): polish syntax highlighting and tool payload rendering (#94)

* [verified] feat(chat): polish syntax highlighting and tool payload rendering

* [verified] fix(chat): tighten large tool payload rendering

* docs: update data volume path in Docker docs

Align documentation with docker-compose.yml change:
hermes-web-ui-data -> hermes-web-ui, /app/dist/data -> /root/.hermes-web-ui

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: bundle server build and restructure service modules

- Add build-server.mjs script for standalone server compilation
- Add logger service with structured output
- Restructure auth, gateway-manager, hermes-cli, hermes services
- Update docker-compose volume mount path
- Update tsconfig and entry point for bundled server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: separate controllers from routes and centralize route registration

- Extract business logic from route handlers into controllers/
- Add centralized route registry in routes/index.ts with public/auth/protected layers
- Replace global auth whitelist with sequential middleware registration
- Extract shared helpers to services/config-helpers.ts
- Allow custom provider name to be user-editable in ProviderFormModal
- Deduplicate custom providers by poolKey instead of base_url in getAvailable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: auth bypass via path case, SPA serving, and provider improvements

- Fix auth bypass: path case-insensitive check for /api, /v1, /upload
- Fix SPA returning 401: skip auth for non-API paths (static files)
- Fix profile switch: use local loading state instead of shared store ref
- Auto-append /v1 to base_url when fetching models (frontend + backend)
- Guard .env writing to built-in providers only
- Add builtin field to provider presets, enable base_url input in form
- Print auth token to console on startup (pino only writes to file)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(docker): correct volume mount path and update Node.js to 23

- Fix webui volume mount from /root/.hermes-web-ui to /home/agent/.hermes-web-ui
  (container runs as agent user, homedir() returns /home/agent)
- Update Node.js from 22 to 23 in Dockerfile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Zhicheng Han <43314240+hanzckernel@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 13:19:25 +08:00
灵感屋 7477f18abe Update Dockerfile 2026-04-20 15:59:09 +08:00
P2K0 f0d1d2e16c feat: add docker-compose deployment and harden gateway startup
- add docker-compose setup with hermes-agent + hermes-webui

- make runtime config env-driven (compose vars + HERMES_BIN)

- improve gateway startup/restart resilience in docker

- make base image configurable via BASE_IMAGE/HERMES_AGENT_IMAGE

Closes https://github.com/EKKOLearnAI/hermes-web-ui/issues/14
2026-04-17 06:43:42 +08:00