feat: refactor realtime event types and payload structure for consistency

This commit is contained in:
2026-01-17 02:18:01 +00:00
parent 56b1c40642
commit 0fed50b5a9
3 changed files with 19 additions and 23 deletions
+1 -7
View File
@@ -31,13 +31,7 @@ describe('parseRealtimeEvent', () => {
const payload: RealtimeEvent = {
type: 'turnCompleted',
at: '2026-01-01T00:00:00.000Z',
result: {
lastTurnTime: '2026-01-01T00:00:00.000Z',
processedGenerals: 2,
processedTurns: 1,
durationMs: 1200,
partial: false,
},
lastTurnTime: '2026-01-01T00:00:00.000Z',
};
const parsed = parseRealtimeEvent(JSON.stringify(payload));
+1 -1
View File
@@ -237,7 +237,7 @@ export const createTurnDaemonRuntime = async (options: TurnDaemonRuntimeOptions)
await publishRealtimeEvent({
type: 'turnCompleted',
at: new Date().toISOString(),
result,
lastTurnTime: result.lastTurnTime,
});
} catch {
// 실시간 이벤트 전송 실패는 턴 처리 결과에 영향을 주지 않는다.