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>
This commit is contained in:
ekko
2026-05-19 16:09:59 +08:00
committed by GitHub
parent 3d74d78698
commit 9a9416c99c
129 changed files with 7017 additions and 1838 deletions
@@ -4,16 +4,23 @@ import { join } from 'path'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import YAML from 'js-yaml'
const { mockGatewayManager } = vi.hoisted(() => ({
mockGatewayManager: {
getActiveProfile: vi.fn(() => 'default'),
stop: vi.fn().mockResolvedValue(undefined),
start: vi.fn().mockResolvedValue(undefined),
},
const { mockRestartGateway, mockDestroyProfile } = vi.hoisted(() => ({
mockRestartGateway: vi.fn().mockResolvedValue('restarted'),
mockDestroyProfile: vi.fn().mockResolvedValue({ destroyed: true }),
}))
vi.mock('../../packages/server/src/services/gateway-bootstrap', () => ({
getGatewayManagerInstance: () => mockGatewayManager,
vi.mock('../../packages/server/src/services/hermes/hermes-cli', async (importOriginal) => {
const original = await importOriginal<any>()
return {
...original,
restartGateway: mockRestartGateway,
}
})
vi.mock('../../packages/server/src/services/hermes/agent-bridge', () => ({
AgentBridgeClient: class {
destroyProfile = mockDestroyProfile
},
}))
const originalHermesHome = process.env.HERMES_HOME
@@ -46,7 +53,7 @@ afterEach(async () => {
})
describe('config controller locked file updates', () => {
it('deep merges a config section and restarts platform gateways', async () => {
it('deep merges a config section and restarts the gateway through hermes-cli', async () => {
await writeFile(join(hermesHome, 'config.yaml'), [
'telegram:',
' enabled: false',
@@ -62,8 +69,8 @@ describe('config controller locked file updates', () => {
await updateConfig(ctx)
expect(ctx.body).toEqual({ success: true })
expect(mockGatewayManager.stop).toHaveBeenCalledWith('default')
expect(mockGatewayManager.start).toHaveBeenCalledWith('default')
expect(mockRestartGateway).toHaveBeenCalledTimes(1)
expect(mockDestroyProfile).toHaveBeenCalledWith('default')
const config = YAML.load(await readFile(join(hermesHome, 'config.yaml'), 'utf-8')) as any
expect(config.telegram.enabled).toBe(true)
expect(config.telegram.extra).toEqual({ mode: 'old', token_mode: 'env' })