Loading files
0c4b60a42This file is pinned to the selected release. Download the original to open it in your design tool.
import { describe, expect, it } from 'vitest'
import { correlateAgentEvent, turnHeartbeatFrame } from './agentEvent.js'
describe('agent event correlation', () => {
it.each(['turn_started', 'turn_ended'])('correlates %s to both agent and session identity', (type) => {
expect(correlateAgentEvent({ type, payload: { value: 1 } }, 'session-1', 'agent-1')).toEqual({
type,
agentId: 'agent-1',
dbSessionId: 'session-1',
payload: { value: 1, agentId: 'agent-1', sessionId: 'session-1' },
})
})
it('correlates turn heartbeats with the same wire shape', () => {
expect(turnHeartbeatFrame('session-1', 'agent-1')).toEqual({
type: 'turn_heartbeat',
agentId: 'agent-1',
dbSessionId: 'session-1',
payload: { agentId: 'agent-1', sessionId: 'session-1' },
})
})
})
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
0c4b60a42This file is pinned to the selected release. Download the original to open it in your design tool.