Files
hermes-web-ui/scripts/build-server.mjs
T
ekko 9a9416c99c Fix bridge history, profile models, and Windows gateway handling (#845)
* feat: support profile-aware group chat bridge flows

* feat: route cron jobs through hermes cli

* Fix group chat routing and isolate bridge tests

* Add Grok image-to-video media skill

* Default Grok videos to media directory

* Fix bridge profile fallback and cron repeat clearing

* Refine bridge chat and gateway platform handling

* Filter bridge tool-call text deltas

* Preserve structured bridge chat history

* Prepare beta release build artifacts

* Fix Windows run profile resolution

* Fix Windows path compatibility checks

* Fix profile-scoped model page display

* Hide Windows subprocess windows for jobs and updates

* Hide Windows file backend subprocess windows

* Avoid Windows gateway restart lock conflicts

* Treat Windows gateway lock as running on startup

* Force release Windows gateway lock on restart

* Tighten Windows gateway lock cleanup

* Update chat e2e source expectation

* Bump package version to 0.5.30

---------

Co-authored-by: Codex <codex@openai.com>
2026-05-19 16:09:59 +08:00

45 lines
1.3 KiB
JavaScript

import * as esbuild from 'esbuild'
import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'
import { cpSync, mkdirSync, readFileSync, rmSync } from 'fs'
const rootDir = resolve(dirname(fileURLToPath(import.meta.url)), '..')
const pkg = JSON.parse(readFileSync(resolve(rootDir, 'package.json'), 'utf-8'))
const version = pkg.version
const serverOutDir = resolve(rootDir, 'dist/server')
rmSync(serverOutDir, { recursive: true, force: true })
mkdirSync(serverOutDir, { recursive: true })
await esbuild.build({
entryPoints: [resolve(rootDir, 'packages/server/src/index.ts')],
bundle: true,
platform: 'node',
target: 'node23',
format: 'cjs',
outfile: resolve(serverOutDir, 'index.js'),
external: ['node-pty', 'node:sqlite', 'socket.io'],
define: {
__APP_VERSION__: JSON.stringify(version),
},
sourcemap: true,
minify: true,
treeShaking: true,
logLevel: 'info',
})
const bridgeOutDir = resolve(serverOutDir, 'agent-bridge')
mkdirSync(bridgeOutDir, { recursive: true })
cpSync(
resolve(rootDir, 'packages/server/src/services/hermes/agent-bridge/hermes_bridge.py'),
resolve(bridgeOutDir, 'hermes_bridge.py'),
)
const skillsOutDir = resolve(rootDir, 'dist/skills')
rmSync(skillsOutDir, { recursive: true, force: true })
cpSync(
resolve(rootDir, 'packages/skills'),
skillsOutDir,
{ recursive: true },
)