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.
21 lines
796 B
TypeScript
21 lines
796 B
TypeScript
import { describe, expect, it, vi } from 'vitest'
|
|
|
|
describe('AgentBridgeClient clarify responses', () => {
|
|
it('sends clarify_respond requests to the bridge', async () => {
|
|
const { AgentBridgeClient } = await import('../../packages/server/src/services/hermes/agent-bridge/client')
|
|
const client = new AgentBridgeClient({ endpoint: 'tcp://127.0.0.1:1', connectRetryMs: 0, timeoutMs: 1 })
|
|
const request = vi.spyOn(client, 'request').mockResolvedValue({ ok: true, resolved: true })
|
|
|
|
await expect(client.clarifyRespond('clarify-1', 'Use the first option')).resolves.toEqual({
|
|
ok: true,
|
|
resolved: true,
|
|
})
|
|
|
|
expect(request).toHaveBeenCalledWith({
|
|
action: 'clarify_respond',
|
|
clarify_id: 'clarify-1',
|
|
response: 'Use the first option',
|
|
})
|
|
})
|
|
})
|