chore: bootstrap hermes-ui skeleton from 0.6.29 snapshot
Import the client, server, skills, tests, and build scripts as the starting point for the rebuild, then trim the surfaces this project does not ship: Electron desktop packaging, the marketing website, and the ESP32 firmware tree. CI keeps the web build, e2e, lockfile, release, and Docker workflows. Rename the package and CLI entry points to hermes-ui, drop the prepare hook so npm ci no longer triggers a build, and drop the removed tsconfig and nodemon references. Rewrite AGENTS.md, ARCHITECTURE.md, DEVELOPMENT.md, and the READMEs so the documented package map and hard rules match this repository. reference_code/ is ignored: it is a read-only snapshot, not an input to the build.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import { openapi } from '../../packages/server/src/controllers/api-docs'
|
||||
|
||||
describe('api docs controller', () => {
|
||||
it('returns the OpenAPI route catalog', async () => {
|
||||
const ctx = {
|
||||
set: vi.fn(),
|
||||
status: 200,
|
||||
body: undefined as any,
|
||||
}
|
||||
|
||||
await openapi(ctx as any)
|
||||
|
||||
expect(ctx.set).toHaveBeenCalledWith('Cache-Control', 'no-store')
|
||||
expect(ctx.body.openapi).toBe('3.0.3')
|
||||
expect(ctx.body.paths['/api/openapi.json']).toBeTruthy()
|
||||
expect(ctx.body.paths['/api/auth/login'].post.requestBody.content['application/json'].schema.required).toEqual([
|
||||
'password',
|
||||
'username',
|
||||
])
|
||||
expect(ctx.body.paths['/api/auth/users/{id}'].put.parameters).toEqual([
|
||||
expect.objectContaining({ name: 'id', in: 'path', required: true }),
|
||||
])
|
||||
expect(ctx.body.paths['/api/hermes/kanban/search-sessions'].get.parameters).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({ name: 'task_id', in: 'query', required: true }),
|
||||
expect.objectContaining({ name: 'profile', in: 'query', required: true }),
|
||||
expect.objectContaining({ name: 'q', in: 'query', required: false }),
|
||||
]),
|
||||
)
|
||||
expect(
|
||||
ctx.body.paths['/api/chat-run/runs'].post.requestBody.content['application/json'].schema.properties.source.enum,
|
||||
).toEqual(['cli', 'coding_agent', 'global_agent'])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user