Fix worker
This commit is contained in:
@@ -26,6 +26,36 @@ describe('agent event normalization', () => {
|
||||
).toContainEqual({ kind: 'assistant_delta', content: 'hello' });
|
||||
});
|
||||
|
||||
test('normalizes Codex CLI thread lifecycle events', () => {
|
||||
expect(
|
||||
normalizeCodexJsonLine(
|
||||
JSON.stringify({
|
||||
type: 'thread.started',
|
||||
thread_id: '019ef701-f7d7-76a0-a96b-15c059631dd9',
|
||||
}),
|
||||
),
|
||||
).toContainEqual({
|
||||
kind: 'session',
|
||||
sessionId: '019ef701-f7d7-76a0-a96b-15c059631dd9',
|
||||
});
|
||||
|
||||
expect(
|
||||
normalizeCodexJsonLine(
|
||||
JSON.stringify({
|
||||
type: 'turn.started',
|
||||
}),
|
||||
),
|
||||
).toContainEqual({ kind: 'status', status: 'turn.started' });
|
||||
|
||||
expect(
|
||||
normalizeCodexJsonLine(
|
||||
JSON.stringify({
|
||||
type: 'turn.completed',
|
||||
}),
|
||||
),
|
||||
).toContainEqual({ kind: 'assistant_completed' });
|
||||
});
|
||||
|
||||
test('normalizes Codex command and file events', () => {
|
||||
expect(
|
||||
normalizeCodexJsonLine(
|
||||
|
||||
Reference in New Issue
Block a user