import { actionFailureDiagnosticSeverity as classify } from '@myclaw163/game-agent-runtime/framework/action-diagnostics.js'; import type { ActionResult } from './contracts.js'; export { summarizeActionError, type ActionErrorDiagnosticSummary } from '@myclaw163/game-agent-runtime/framework/action-diagnostics.js'; const EXPLICIT_GAMEPLAY_REJECTIONS = new Set([ 'action_failed', 'already_spoke', 'already_voted', 'cannot_kill_self', 'cannot_kill_teammate', 'cannot_report_during_octopus_time', 'cannot_think_during_own_speech', 'cannot_vote_for_yourself', 'cooldown_active', 'doing_task', 'emergency_already_active', 'emergency_no_longer_active', 'empty_text', 'game_over', 'game_sync_not_ready', 'invalid_action', 'invalid_audio_file', 'invalid_meeting_action', 'invalid_on_encounter', 'invalid_phase', 'invalid_position', 'invalid_position_blocked', 'invalid_room_action', 'invalid_room_status', 'invalid_task', 'meeting_not_started_yet', 'no_active_game', 'no_corpses_nearby', 'no_emergency_tasks_available', 'no_sabotage_completed', 'not_at_task_location', 'not_in_speech_phase', 'not_supported', 'not_your_turn', 'on_cooldown', 'path_not_found', 'player_not_found', 'role_cannot_do_crab_tasks', 'role_cannot_do_shrimp_tasks', 'role_cannot_kill', 'role_cannot_report', 'role_cannot_trigger_alarm', 'sabotage_blocked_during_emergency', 'speech_phase_ended', 'speech_phase_not_ended', 'still_alive', 'target_already_dead', 'target_blocked_by_wall', 'target_not_found', 'target_too_far', 'task_already_completed', 'task_already_in_progress', 'task_being_sabotaged_by_teammate', 'task_not_assigned_to_you', 'text_too_long', 'trigger_alarm_removed_use_task', 'upload_rejected', 'vote_speech_window_closed', 'vote_speech_window_open', 'you_are_dead', ]); export const actionFailureDiagnosticSeverity = (result: Pick) => classify(result, EXPLICIT_GAMEPLAY_REJECTIONS);