feat(server): moderator announces every move and attempt to both players

All move-event announcements in translator.ts and all attempted-move
announcements in commit.ts now use audience 'both' so the moderator
panel is a complete shared transcript for both players.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
claude (blind_chess)
2026-05-18 19:54:34 -04:00
parent be8ecd96b6
commit 41b3ab93bb
3 changed files with 28 additions and 13 deletions
@@ -74,6 +74,20 @@ describe('hierarchy decision table', () => {
expect(game.armed).toBeNull();
expect(game.chess.history()).toContain('e4');
});
it('attempted-move announcements are audience: both', () => {
const r = handleCommit(game, 'w', { from: 'e4' }); // empty square -> no_such_piece
expect(r.kind).toBe('announce');
if (r.kind === 'announce') expect(r.announcements[0]!.audience).toBe('both');
});
it('applied-move announcements are audience: both', () => {
const r = handleCommit(game, 'w', { from: 'e2', to: 'e4' });
expect(r.kind).toBe('applied');
if (r.kind === 'applied') {
for (const a of r.announcements) expect(a.audience).toBe('both');
}
});
});
describe('touch-move enforcement', () => {