diff --git a/.codesight/CODESIGHT.md b/.codesight/CODESIGHT.md index 1b80df2..d1df94e 100644 --- a/.codesight/CODESIGHT.md +++ b/.codesight/CODESIGHT.md @@ -2,7 +2,7 @@ > **Stack:** raw-http | none | unknown | scala -> 0 routes + 40 rpc | 0 models | 0 components | 146 lib files | 1 env vars | 1 middleware +> 0 routes + 40 rpc | 0 models | 0 components | 163 lib files | 1 env vars | 1 middleware > **Token savings:** this file is ~0 tokens. Without it, AI exploration would cost ~0 tokens. **Saves ~0 tokens per conversation.** --- @@ -75,6 +75,7 @@ - `modules/account/src/main/scala/de/nowchess/account/client/CoreGameClient.scala` — class CoreGameClient, function createGame - `modules/account/src/main/scala/de/nowchess/account/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/account/src/main/scala/de/nowchess/account/config/NativeReflectionConfig.scala` — class NativeReflectionConfig +- `modules/account/src/main/scala/de/nowchess/account/config/RedisConfig.scala` — class RedisConfig - `modules/account/src/main/scala/de/nowchess/account/domain/Challenge.scala` - class Challenge - function gameIdOpt @@ -100,7 +101,7 @@ - function persist - function findByEmail - function findAll - - _...12 more_ + - _...11 more_ - `modules/account/src/main/scala/de/nowchess/account/repository/ChallengeRepository.scala` - class ChallengeRepository - function findActiveByChallengerId @@ -116,14 +117,16 @@ - function me - function publicProfile - function banUser - - _...10 more_ + - _...9 more_ - `modules/account/src/main/scala/de/nowchess/account/resource/ChallengeResource.scala` - class ChallengeResource - function create - function list + - function get - function accept - function decline - - function cancel + - _...1 more_ +- `modules/account/src/main/scala/de/nowchess/account/resource/OfficialChallengeResource.scala` — class OfficialChallengeResource, function challengeWithDifficulty - `modules/account/src/main/scala/de/nowchess/account/service/AccountService.scala` - class AccountService - function register @@ -131,15 +134,20 @@ - function findByUsername - function findById - function createBotAccount - - _...11 more_ + - _...10 more_ - `modules/account/src/main/scala/de/nowchess/account/service/ChallengeService.scala` - class ChallengeService - function create - function accept - function decline - function cancel - - function listForUser - - _...1 more_ + - function findById + - _...2 more_ +- `modules/account/src/main/scala/de/nowchess/account/service/EventPublisher.scala` + - class EventPublisher + - function publishGameStart + - function publishChallengeCreated + - function publishChallengeAccepted - `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` - class Board - function apply @@ -162,10 +170,6 @@ - class Square - function fromAlgebraic - function offset -- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` - - class Bot - - function name - - function nextMove - `modules/api/src/main/scala/de/nowchess/api/dto/ErrorEventDto.scala` — class ErrorEventDto, function apply - `modules/api/src/main/scala/de/nowchess/api/dto/GameFullEventDto.scala` — class GameFullEventDto, function apply - `modules/api/src/main/scala/de/nowchess/api/dto/GameStateEventDto.scala` — class GameStateEventDto, function apply @@ -186,6 +190,14 @@ - function withEnPassantSquare - function withHalfMoveClock - _...4 more_ +- `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala` + - class ProtoMapperBase + - function toProtoColor + - function fromProtoColor + - function toProtoPieceType + - function fromProtoPieceType + - function toProtoMoveKind + - _...17 more_ - `modules/api/src/main/scala/de/nowchess/api/io/GameContextExport.scala` — class GameContextExport, function exportGameContext - `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala` — class GameContextImport, function importGameContext - `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — class PlayerId, function apply @@ -201,115 +213,21 @@ - function isCheck - function isCheckmate - _...6 more_ -- `modules/bot/python/nnue.py` - - function get_weights_dir: () - - function get_data_dir: () - - function list_checkpoints: () - - function migrate_legacy_data: () - - function show_header: () - - function show_checkpoints_table: () - - _...10 more_ -- `modules/bot/python/src/dataset.py` - - function get_datasets_dir: () -> Path - - function next_dataset_version: () -> int - - function list_datasets: () -> List[Tuple[int, Dict]] - - function load_dataset_metadata: (version) -> Optional[Dict] - - function save_dataset_metadata: (version, metadata) -> None - - function create_dataset: (version, labeled_jsonl_path, sources, stockfish_depth) -> Path - - _...4 more_ -- `modules/bot/python/src/export.py` — function export_to_nbai: (weights_file, output_file, trained_by, train_loss) -- `modules/bot/python/src/generate.py` — function play_random_game_and_collect_positions: (output_file, total_positions, samples_per_game, min_move, max_move, num_workers) -- `modules/bot/python/src/label.py` — function normalize_evaluation: (cp_value, method, scale), function label_positions_with_stockfish: (positions_file, output_file, stockfish_path, batch_size, depth, verbose, normalize, num_workers) -- `modules/bot/python/src/lichess_importer.py` — function import_lichess_evals: (input_path, output_file, max_positions, min_depth, verbose) -> int -- `modules/bot/python/src/tactical_positions_extractor.py` - - function download_and_extract_puzzle_db: (url, output_dir) - - function extract_puzzle_positions: (puzzle_csv, max_puzzles) -> Set[str] - - function load_positions_from_file: (file_path) -> Set[str] - - function merge_positions: (tactical, other, output_file) - - function extract_tactical_only: (puzzle_csv, output_file, max_puzzles) -> int - - function interactive_merge_positions: (puzzle_csv, output_file, max_puzzles) -- `modules/bot/python/src/train.py` - - function fen_to_features: (fen) - - function find_next_version: (base_name) - - function save_metadata: (weights_file, metadata) - - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio, hidden_sizes) - - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio, hidden_sizes) - - class NNUEDataset - - _...1 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/BotController.scala` - - class BotController - - function getBot - - function listBots -- `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` - - class BotMoveRepetition - - function blockedMoves - - function repeatedMove - - function filterAllowed -- `modules/bot/src/main/scala/de/nowchess/bot/Config.scala` — class Config -- `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala` - - class Evaluation - - class CHECKMATE_SCORE - - class DRAW_SCORE - - function evaluate - - function initAccumulator - - function copyAccumulator - - _...2 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` - - class EvaluationClassic - - function evaluate - - function countRay -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/EvaluationNNUE.scala` — class EvaluationNNUE, function evaluate -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala` - - class NNUE - - function initAccumulator - - function pushAccumulator - - function copyAccumulator - - function recomputeAccumulator - - function validateAccumulator - - _...4 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiLoader.scala` - - class NbaiLoader - - function load - - function loadDefault -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiMigrator.scala` — class NbaiMigrator, function migrateFromBin -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiModel.scala` - - function toJson - - class NbaiMetadata - - function fromJson - - function str - - function num -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiWriter.scala` — class NbaiWriter, function write -- `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala` - - function bestMove - - function bestMove - - function bestMoveWithTime - - function bestMoveWithTime - - function loop - - function loop -- `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` - - class MoveOrdering - - class OrderingContext - - function addKillerMove - - function getKillerMoves - - function addHistory - - function getHistory - - _...3 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/logic/TranspositionTable.scala` - - function advance - - function probe - - function store - - function clear -- `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotBook.scala` — function probe, function select -- `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala` — class PolyglotHash, function hash -- `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala` - - class ZobristHash - - function hash - - function nextHash +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/config/JacksonConfig.scala` — class JacksonConfig, function customize +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/config/RedisConfig.scala` — class RedisConfig +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/registry/BotRegistry.scala` + - class BotRegistry + - function register + - function unregister + - function dispatch + - function registeredBots +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/resource/BotEventResource.scala` + - class BotEventResource + - function streamEvents + - function streamGame + - function makeMove - `modules/coordinator/src/main/scala/de/nowchess/coordinator/CoordinatorApp.scala` — class CoordinatorApp -- `modules/coordinator/src/main/scala/de/nowchess/coordinator/config/BeansProducer.scala` - - class BeansProducer - - function redissonClient - - function kubernetesClient +- `modules/coordinator/src/main/scala/de/nowchess/coordinator/config/BeansProducer.scala` — class BeansProducer, function kubernetesClient - `modules/coordinator/src/main/scala/de/nowchess/coordinator/config/CoordinatorConfig.scala` - class CoordinatorConfig - function maxGamesPerCore @@ -393,10 +311,6 @@ - `modules/core/src/main/scala/de/nowchess/chess/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala` — class NativeReflectionConfig - `modules/core/src/main/scala/de/nowchess/chess/config/RedisConfig.scala` — class RedisConfig -- `modules/core/src/main/scala/de/nowchess/chess/config/RedissonProducer.scala` - - class RedissonProducer - - function produceRedissonClient - - function shutdown - `modules/core/src/main/scala/de/nowchess/chess/controller/Parser.scala` — class Parser, function parseMove - `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala` - class GameEngine @@ -405,21 +319,14 @@ - function context - function pendingDrawOfferBy - function currentClockState - - _...22 more_ + - _...21 more_ - `modules/core/src/main/scala/de/nowchess/chess/exception/ApiException.scala` - class ApiException - class GameNotFoundException - class BadRequestException - `modules/core/src/main/scala/de/nowchess/chess/exception/ApiExceptionMapper.scala` — class ApiExceptionMapper, function toResponse - `modules/core/src/main/scala/de/nowchess/chess/grpc/CoordinatorServiceHandler.scala` — class CoordinatorServiceHandler -- `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` - - class CoreProtoMapper - - function toProtoColor - - function fromProtoColor - - function toProtoPieceType - - function fromProtoPieceType - - function toProtoMoveKind - - _...9 more_ +- `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` — class CoreProtoMapper - `modules/core/src/main/scala/de/nowchess/chess/grpc/IoGrpcClientWrapper.scala` - class IoGrpcClientWrapper - function exportCombined @@ -448,11 +355,11 @@ - `modules/core/src/main/scala/de/nowchess/chess/redis/GameRedisSubscriberManager.scala` - class GameRedisSubscriberManager - function subscribeGame - - function onMessage - function unsubscribeGame - function batchResubscribeGames - function unsubscribeGames - - _...3 more_ + - function evictGames + - _...2 more_ - `modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistry.scala` - class GameRegistry - function store @@ -518,14 +425,7 @@ - function importGameContext - `modules/io/src/main/scala/de/nowchess/io/fen/FenParserSupport.scala` — function buildSquares - `modules/io/src/main/scala/de/nowchess/io/grpc/IoGrpcService.scala` — class IoGrpcService -- `modules/io/src/main/scala/de/nowchess/io/grpc/IoProtoMapper.scala` - - class IoProtoMapper - - function toProtoColor - - function fromProtoColor - - function toProtoPieceType - - function fromProtoPieceType - - function toProtoMoveKind - - _...9 more_ +- `modules/io/src/main/scala/de/nowchess/io/grpc/IoProtoMapper.scala` — class IoProtoMapper - `modules/io/src/main/scala/de/nowchess/io/json/JsonExporter.scala` — class JsonExporter, function exportGameContext - `modules/io/src/main/scala/de/nowchess/io/json/JsonParser.scala` — class JsonParser, function importGameContext - `modules/io/src/main/scala/de/nowchess/io/pgn/PgnExporter.scala` @@ -556,16 +456,124 @@ - `modules/json/src/main/scala/de/nowchess/json/SquareKeyDeserializer.scala` — class SquareKeyDeserializer - `modules/json/src/main/scala/de/nowchess/json/SquareKeySerializer.scala` — class SquareKeySerializer - `modules/json/src/main/scala/de/nowchess/json/SquareSerializer.scala` — class SquareSerializer +- `modules/official-bots/python/nnue.py` + - function get_weights_dir: () + - function get_data_dir: () + - function list_checkpoints: () + - function migrate_legacy_data: () + - function show_header: () + - function show_checkpoints_table: () + - _...10 more_ +- `modules/official-bots/python/src/dataset.py` + - function get_datasets_dir: () -> Path + - function next_dataset_version: () -> int + - function list_datasets: () -> List[Tuple[int, Dict]] + - function load_dataset_metadata: (version) -> Optional[Dict] + - function save_dataset_metadata: (version, metadata) -> None + - function create_dataset: (version, labeled_jsonl_path, sources, stockfish_depth) -> Path + - _...4 more_ +- `modules/official-bots/python/src/export.py` — function export_to_nbai: (weights_file, output_file, trained_by, train_loss) +- `modules/official-bots/python/src/generate.py` — function play_random_game_and_collect_positions: (output_file, total_positions, samples_per_game, min_move, max_move, num_workers) +- `modules/official-bots/python/src/label.py` — function normalize_evaluation: (cp_value, method, scale), function label_positions_with_stockfish: (positions_file, output_file, stockfish_path, batch_size, depth, verbose, normalize, num_workers) +- `modules/official-bots/python/src/lichess_importer.py` — function import_lichess_evals: (input_path, output_file, max_positions, min_depth, verbose) -> int +- `modules/official-bots/python/src/tactical_positions_extractor.py` + - function download_and_extract_puzzle_db: (url, output_dir) + - function extract_puzzle_positions: (puzzle_csv, max_puzzles) -> Set[str] + - function load_positions_from_file: (file_path) -> Set[str] + - function merge_positions: (tactical, other, output_file) + - function extract_tactical_only: (puzzle_csv, output_file, max_puzzles) -> int + - function interactive_merge_positions: (puzzle_csv, output_file, max_puzzles) +- `modules/official-bots/python/src/train.py` + - function fen_to_features: (fen) + - function find_next_version: (base_name) + - function save_metadata: (weights_file, metadata) + - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio, hidden_sizes) + - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio, hidden_sizes) + - class NNUEDataset + - _...1 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/BotController.scala` + - class BotController + - function getBot + - function listBots + - class BotController + - function getBot + - function listBots +- `modules/official-bots/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` + - class BotMoveRepetition + - function blockedMoves + - function repeatedMove + - function filterAllowed +- `modules/official-bots/src/main/scala/de/nowchess/bot/Config.scala` — class Config +- `modules/official-bots/src/main/scala/de/nowchess/bot/ai/Evaluation.scala` + - class Evaluation + - class CHECKMATE_SCORE + - class DRAW_SCORE + - function evaluate + - function initAccumulator + - function copyAccumulator + - _...2 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala` — class ClassicalBot, function apply +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/HybridBot.scala` — class HybridBot, function apply +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala` — class NNUEBot, function apply +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` + - class EvaluationClassic + - function evaluate + - function countRay +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/EvaluationNNUE.scala` — class EvaluationNNUE, function evaluate +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala` + - class NNUE + - function initAccumulator + - function pushAccumulator + - function copyAccumulator + - function recomputeAccumulator + - function validateAccumulator + - _...4 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiLoader.scala` + - class NbaiLoader + - function load + - function loadDefault +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiMigrator.scala` — class NbaiMigrator, function migrateFromBin +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiModel.scala` + - function toJson + - class NbaiMetadata + - function fromJson + - function str + - function num +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiWriter.scala` — class NbaiWriter, function write +- `modules/official-bots/src/main/scala/de/nowchess/bot/config/JacksonConfig.scala` — class JacksonConfig, function customize +- `modules/official-bots/src/main/scala/de/nowchess/bot/config/RedisConfig.scala` — class RedisConfig +- `modules/official-bots/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala` + - function bestMove + - function bestMove + - function bestMoveWithTime + - function bestMoveWithTime + - function loop + - function loop +- `modules/official-bots/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` + - class MoveOrdering + - class OrderingContext + - function addKillerMove + - function getKillerMoves + - function addHistory + - function getHistory + - _...3 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/logic/TranspositionTable.scala` + - function advance + - function probe + - function store + - function clear +- `modules/official-bots/src/main/scala/de/nowchess/bot/resource/OfficialBotChallengeResource.scala` — class OfficialBotChallengeResource, function challengeWithDifficulty +- `modules/official-bots/src/main/scala/de/nowchess/bot/service/DifficultyMapper.scala` — class DifficultyMapper, function fromElo +- `modules/official-bots/src/main/scala/de/nowchess/bot/service/OfficialBotService.scala` — class OfficialBotService, function onStart +- `modules/official-bots/src/main/scala/de/nowchess/bot/util/PolyglotBook.scala` — function probe, function select +- `modules/official-bots/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala` — class PolyglotHash, function hash +- `modules/official-bots/src/main/scala/de/nowchess/bot/util/ZobristHash.scala` + - class ZobristHash + - function hash + - function nextHash - `modules/rule/src/main/scala/de/nowchess/rules/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/rule/src/main/scala/de/nowchess/rules/config/NativeReflectionConfig.scala` — class NativeReflectionConfig -- `modules/rule/src/main/scala/de/nowchess/rules/grpc/ProtoMapper.scala` - - class ProtoMapper - - function toProtoColor - - function fromProtoColor - - function toProtoPieceType - - function fromProtoPieceType - - function toProtoMoveKind - - _...9 more_ +- `modules/rule/src/main/scala/de/nowchess/rules/grpc/ProtoMapper.scala` — class ProtoMapper - `modules/rule/src/main/scala/de/nowchess/rules/grpc/RuleGrpcService.scala` — class RuleGrpcService - `modules/rule/src/main/scala/de/nowchess/rules/resource/RuleSetResource.scala` - class RuleSetResource @@ -576,38 +584,40 @@ - function isCheckmate - _...6 more_ - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — class DefaultRules, function positionOf +- `modules/security/src/main/scala/de/nowchess/security/InternalAuthFilter.scala` — class InternalAuthFilter +- `modules/security/src/main/scala/de/nowchess/security/InternalGrpcAuthInterceptor.scala` — class InternalGrpcAuthInterceptor +- `modules/security/src/main/scala/de/nowchess/security/InternalGrpcSecretClientInterceptor.scala` — class InternalGrpcSecretClientInterceptor +- `modules/security/src/main/scala/de/nowchess/security/InternalSecretClientFilter.scala` — class InternalSecretClientFilter - `modules/store/src/main/scala/de/nowchess/store/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/store/src/main/scala/de/nowchess/store/config/NativeReflectionConfig.scala` — class NativeReflectionConfig - `modules/store/src/main/scala/de/nowchess/store/config/RedisConfig.scala` — class RedisConfig -- `modules/store/src/main/scala/de/nowchess/store/config/RedissonProducer.scala` - - class RedissonProducer - - function redissonClient - - function close - `modules/store/src/main/scala/de/nowchess/store/domain/GameRecord.scala` — class GameRecord -- `modules/store/src/main/scala/de/nowchess/store/redis/GameWritebackStreamListener.scala` - - class GameWritebackStreamListener - - function startListening - - function onMessage +- `modules/store/src/main/scala/de/nowchess/store/redis/GameWritebackStreamListener.scala` — class GameWritebackStreamListener, function startListening - `modules/store/src/main/scala/de/nowchess/store/repository/GameRecordRepository.scala` - class GameRecordRepository - function findByGameId - function persist - function merge -- `modules/store/src/main/scala/de/nowchess/store/resource/StoreGameResource.scala` — class StoreGameResource, function getGame + - function findByPlayerId + - function findByPlayerIdRunning +- `modules/store/src/main/scala/de/nowchess/store/resource/StoreGameResource.scala` + - class StoreGameResource + - function getGame + - function getRunning + - function getHistory - `modules/store/src/main/scala/de/nowchess/store/service/GameWritebackService.scala` — class GameWritebackService, function writeBack - `modules/ws/src/main/scala/de/nowchess/ws/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/ws/src/main/scala/de/nowchess/ws/config/NativeReflectionConfig.scala` — class NativeReflectionConfig - `modules/ws/src/main/scala/de/nowchess/ws/config/RedisConfig.scala` — class RedisConfig -- `modules/ws/src/main/scala/de/nowchess/ws/config/RedissonProducer.scala` - - class RedissonProducer - - function produceRedissonClient - - function shutdown - `modules/ws/src/main/scala/de/nowchess/ws/resource/GameWebSocketResource.scala` - class GameWebSocketResource - function onOpen - - function onMessage - function onTextMessage - function onClose +- `modules/ws/src/main/scala/de/nowchess/ws/resource/UserWebSocketResource.scala` + - class UserWebSocketResource + - function onOpen + - function onClose --- @@ -615,14 +625,14 @@ ## Environment Variables -- `STOCKFISH_PATH` **required** — modules/bot/python/nnue.py +- `STOCKFISH_PATH` **required** — modules/official-bots/python/nnue.py --- # Middleware ## custom -- generate — `modules/bot/python/src/generate.py` +- generate — `modules/official-bots/python/src/generate.py` --- @@ -631,38 +641,38 @@ ## Most Imported Files (change these carefully) - `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` — imported by **76** files -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **57** files -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **55** files +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **56** files +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **54** files - `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` — imported by **47** files -- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — imported by **28** files -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **20** files +- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — imported by **27** files - `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` — imported by **20** files -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **20** files -- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` — imported by **18** files -- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` — imported by **18** files +- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` — imported by **20** files +- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` — imported by **20** files +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **19** files +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **19** files - `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala` — imported by **14** files -- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **13** files -- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` — imported by **11** files -- `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — imported by **9** files +- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **12** files +- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` — imported by **12** files - `modules/api/src/main/scala/de/nowchess/api/error/GameError.scala` — imported by **9** files - `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` — imported by **9** files +- `modules/account/src/main/scala/de/nowchess/account/config/RedisConfig.scala` — imported by **8** files - `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala` — imported by **8** files - `modules/core/src/main/scala/de/nowchess/chess/grpc/IoGrpcClientWrapper.scala` — imported by **7** files +- `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — imported by **6** files - `modules/api/src/main/scala/de/nowchess/api/game/GameMode.scala` — imported by **6** files -- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` — imported by **6** files ## Import Map (who imports what) -- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextExport.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` +71 more -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala` +52 more -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala` +50 more +- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextExport.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/core/src/main/scala/de/nowchess/chess/adapter/RuleSetRestAdapter.scala` +71 more +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala` +51 more +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/adapter/RuleSetRestAdapter.scala` +49 more - `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/ClockState.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala`, `modules/api/src/test/scala/de/nowchess/api/game/ClockStateTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala` +42 more -- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +23 more -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +15 more -- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` +15 more -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +15 more -- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` ← `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala`, `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` +13 more -- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` ← `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala`, `modules/core/src/main/scala/de/nowchess/chess/resource/GameDtoMapper.scala` +13 more +- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` ← `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineClockTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineDrawOfferTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineGameEndingTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineIntegrationTest.scala` +22 more +- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineIntegrationTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala` +15 more +- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` ← `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` +15 more +- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` ← `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` +15 more +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineIntegrationTest.scala` +14 more +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineScenarioTest.scala`, `modules/io/src/main/scala/de/nowchess/io/service/config/NativeReflectionConfig.scala` +14 more --- diff --git a/.codesight/config.md b/.codesight/config.md index a361713..dde51c3 100644 --- a/.codesight/config.md +++ b/.codesight/config.md @@ -2,4 +2,4 @@ ## Environment Variables -- `STOCKFISH_PATH` **required** — modules/bot/python/nnue.py +- `STOCKFISH_PATH` **required** — modules/official-bots/python/nnue.py diff --git a/.codesight/graph.md b/.codesight/graph.md index e6975ab..3f926eb 100644 --- a/.codesight/graph.md +++ b/.codesight/graph.md @@ -3,35 +3,35 @@ ## Most Imported Files (change these carefully) - `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` — imported by **76** files -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **57** files -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **55** files +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **56** files +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **54** files - `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` — imported by **47** files -- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — imported by **28** files -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **20** files +- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — imported by **27** files - `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` — imported by **20** files -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **20** files -- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` — imported by **18** files -- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` — imported by **18** files +- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` — imported by **20** files +- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` — imported by **20** files +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **19** files +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **19** files - `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala` — imported by **14** files -- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **13** files -- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` — imported by **11** files -- `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — imported by **9** files +- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **12** files +- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` — imported by **12** files - `modules/api/src/main/scala/de/nowchess/api/error/GameError.scala` — imported by **9** files - `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` — imported by **9** files +- `modules/account/src/main/scala/de/nowchess/account/config/RedisConfig.scala` — imported by **8** files - `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala` — imported by **8** files - `modules/core/src/main/scala/de/nowchess/chess/grpc/IoGrpcClientWrapper.scala` — imported by **7** files +- `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — imported by **6** files - `modules/api/src/main/scala/de/nowchess/api/game/GameMode.scala` — imported by **6** files -- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` — imported by **6** files ## Import Map (who imports what) -- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextExport.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` +71 more -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala` +52 more -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala` +50 more +- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextExport.scala`, `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/core/src/main/scala/de/nowchess/chess/adapter/RuleSetRestAdapter.scala` +71 more +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala` +51 more +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/rules/RuleSet.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/adapter/RuleSetRestAdapter.scala` +49 more - `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/ClockState.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala`, `modules/api/src/test/scala/de/nowchess/api/game/ClockStateTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala` +42 more -- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +23 more -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +15 more -- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` +15 more -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +15 more -- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` ← `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala`, `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` +13 more -- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` ← `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala`, `modules/core/src/main/scala/de/nowchess/chess/resource/GameDtoMapper.scala` +13 more +- `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` ← `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineClockTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineDrawOfferTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineGameEndingTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineIntegrationTest.scala` +22 more +- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineIntegrationTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala` +15 more +- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` ← `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` +15 more +- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` ← `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` +15 more +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineIntegrationTest.scala` +14 more +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala`, `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineScenarioTest.scala`, `modules/io/src/main/scala/de/nowchess/io/service/config/NativeReflectionConfig.scala` +14 more diff --git a/.codesight/libs.md b/.codesight/libs.md index f8a9e41..b42c8cc 100644 --- a/.codesight/libs.md +++ b/.codesight/libs.md @@ -19,6 +19,7 @@ - `modules/account/src/main/scala/de/nowchess/account/client/CoreGameClient.scala` — class CoreGameClient, function createGame - `modules/account/src/main/scala/de/nowchess/account/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/account/src/main/scala/de/nowchess/account/config/NativeReflectionConfig.scala` — class NativeReflectionConfig +- `modules/account/src/main/scala/de/nowchess/account/config/RedisConfig.scala` — class RedisConfig - `modules/account/src/main/scala/de/nowchess/account/domain/Challenge.scala` - class Challenge - function gameIdOpt @@ -44,7 +45,7 @@ - function persist - function findByEmail - function findAll - - _...12 more_ + - _...11 more_ - `modules/account/src/main/scala/de/nowchess/account/repository/ChallengeRepository.scala` - class ChallengeRepository - function findActiveByChallengerId @@ -60,14 +61,16 @@ - function me - function publicProfile - function banUser - - _...10 more_ + - _...9 more_ - `modules/account/src/main/scala/de/nowchess/account/resource/ChallengeResource.scala` - class ChallengeResource - function create - function list + - function get - function accept - function decline - - function cancel + - _...1 more_ +- `modules/account/src/main/scala/de/nowchess/account/resource/OfficialChallengeResource.scala` — class OfficialChallengeResource, function challengeWithDifficulty - `modules/account/src/main/scala/de/nowchess/account/service/AccountService.scala` - class AccountService - function register @@ -75,15 +78,20 @@ - function findByUsername - function findById - function createBotAccount - - _...11 more_ + - _...10 more_ - `modules/account/src/main/scala/de/nowchess/account/service/ChallengeService.scala` - class ChallengeService - function create - function accept - function decline - function cancel - - function listForUser - - _...1 more_ + - function findById + - _...2 more_ +- `modules/account/src/main/scala/de/nowchess/account/service/EventPublisher.scala` + - class EventPublisher + - function publishGameStart + - function publishChallengeCreated + - function publishChallengeAccepted - `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` - class Board - function apply @@ -106,10 +114,6 @@ - class Square - function fromAlgebraic - function offset -- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` - - class Bot - - function name - - function nextMove - `modules/api/src/main/scala/de/nowchess/api/dto/ErrorEventDto.scala` — class ErrorEventDto, function apply - `modules/api/src/main/scala/de/nowchess/api/dto/GameFullEventDto.scala` — class GameFullEventDto, function apply - `modules/api/src/main/scala/de/nowchess/api/dto/GameStateEventDto.scala` — class GameStateEventDto, function apply @@ -130,6 +134,14 @@ - function withEnPassantSquare - function withHalfMoveClock - _...4 more_ +- `modules/api/src/main/scala/de/nowchess/api/grpc/ProtoMapperBase.scala` + - class ProtoMapperBase + - function toProtoColor + - function fromProtoColor + - function toProtoPieceType + - function fromProtoPieceType + - function toProtoMoveKind + - _...17 more_ - `modules/api/src/main/scala/de/nowchess/api/io/GameContextExport.scala` — class GameContextExport, function exportGameContext - `modules/api/src/main/scala/de/nowchess/api/io/GameContextImport.scala` — class GameContextImport, function importGameContext - `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — class PlayerId, function apply @@ -145,115 +157,21 @@ - function isCheck - function isCheckmate - _...6 more_ -- `modules/bot/python/nnue.py` - - function get_weights_dir: () - - function get_data_dir: () - - function list_checkpoints: () - - function migrate_legacy_data: () - - function show_header: () - - function show_checkpoints_table: () - - _...10 more_ -- `modules/bot/python/src/dataset.py` - - function get_datasets_dir: () -> Path - - function next_dataset_version: () -> int - - function list_datasets: () -> List[Tuple[int, Dict]] - - function load_dataset_metadata: (version) -> Optional[Dict] - - function save_dataset_metadata: (version, metadata) -> None - - function create_dataset: (version, labeled_jsonl_path, sources, stockfish_depth) -> Path - - _...4 more_ -- `modules/bot/python/src/export.py` — function export_to_nbai: (weights_file, output_file, trained_by, train_loss) -- `modules/bot/python/src/generate.py` — function play_random_game_and_collect_positions: (output_file, total_positions, samples_per_game, min_move, max_move, num_workers) -- `modules/bot/python/src/label.py` — function normalize_evaluation: (cp_value, method, scale), function label_positions_with_stockfish: (positions_file, output_file, stockfish_path, batch_size, depth, verbose, normalize, num_workers) -- `modules/bot/python/src/lichess_importer.py` — function import_lichess_evals: (input_path, output_file, max_positions, min_depth, verbose) -> int -- `modules/bot/python/src/tactical_positions_extractor.py` - - function download_and_extract_puzzle_db: (url, output_dir) - - function extract_puzzle_positions: (puzzle_csv, max_puzzles) -> Set[str] - - function load_positions_from_file: (file_path) -> Set[str] - - function merge_positions: (tactical, other, output_file) - - function extract_tactical_only: (puzzle_csv, output_file, max_puzzles) -> int - - function interactive_merge_positions: (puzzle_csv, output_file, max_puzzles) -- `modules/bot/python/src/train.py` - - function fen_to_features: (fen) - - function find_next_version: (base_name) - - function save_metadata: (weights_file, metadata) - - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio, hidden_sizes) - - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio, hidden_sizes) - - class NNUEDataset - - _...1 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/BotController.scala` - - class BotController - - function getBot - - function listBots -- `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` - - class BotMoveRepetition - - function blockedMoves - - function repeatedMove - - function filterAllowed -- `modules/bot/src/main/scala/de/nowchess/bot/Config.scala` — class Config -- `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala` - - class Evaluation - - class CHECKMATE_SCORE - - class DRAW_SCORE - - function evaluate - - function initAccumulator - - function copyAccumulator - - _...2 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` - - class EvaluationClassic - - function evaluate - - function countRay -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/EvaluationNNUE.scala` — class EvaluationNNUE, function evaluate -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala` - - class NNUE - - function initAccumulator - - function pushAccumulator - - function copyAccumulator - - function recomputeAccumulator - - function validateAccumulator - - _...4 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiLoader.scala` - - class NbaiLoader - - function load - - function loadDefault -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiMigrator.scala` — class NbaiMigrator, function migrateFromBin -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiModel.scala` - - function toJson - - class NbaiMetadata - - function fromJson - - function str - - function num -- `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NbaiWriter.scala` — class NbaiWriter, function write -- `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala` - - function bestMove - - function bestMove - - function bestMoveWithTime - - function bestMoveWithTime - - function loop - - function loop -- `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` - - class MoveOrdering - - class OrderingContext - - function addKillerMove - - function getKillerMoves - - function addHistory - - function getHistory - - _...3 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/logic/TranspositionTable.scala` - - function advance - - function probe - - function store - - function clear -- `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotBook.scala` — function probe, function select -- `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala` — class PolyglotHash, function hash -- `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala` - - class ZobristHash - - function hash - - function nextHash +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/config/JacksonConfig.scala` — class JacksonConfig, function customize +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/config/RedisConfig.scala` — class RedisConfig +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/registry/BotRegistry.scala` + - class BotRegistry + - function register + - function unregister + - function dispatch + - function registeredBots +- `modules/bot-platform/src/main/scala/de/nowchess/botplatform/resource/BotEventResource.scala` + - class BotEventResource + - function streamEvents + - function streamGame + - function makeMove - `modules/coordinator/src/main/scala/de/nowchess/coordinator/CoordinatorApp.scala` — class CoordinatorApp -- `modules/coordinator/src/main/scala/de/nowchess/coordinator/config/BeansProducer.scala` - - class BeansProducer - - function redissonClient - - function kubernetesClient +- `modules/coordinator/src/main/scala/de/nowchess/coordinator/config/BeansProducer.scala` — class BeansProducer, function kubernetesClient - `modules/coordinator/src/main/scala/de/nowchess/coordinator/config/CoordinatorConfig.scala` - class CoordinatorConfig - function maxGamesPerCore @@ -337,10 +255,6 @@ - `modules/core/src/main/scala/de/nowchess/chess/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/core/src/main/scala/de/nowchess/chess/config/NativeReflectionConfig.scala` — class NativeReflectionConfig - `modules/core/src/main/scala/de/nowchess/chess/config/RedisConfig.scala` — class RedisConfig -- `modules/core/src/main/scala/de/nowchess/chess/config/RedissonProducer.scala` - - class RedissonProducer - - function produceRedissonClient - - function shutdown - `modules/core/src/main/scala/de/nowchess/chess/controller/Parser.scala` — class Parser, function parseMove - `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala` - class GameEngine @@ -349,21 +263,14 @@ - function context - function pendingDrawOfferBy - function currentClockState - - _...22 more_ + - _...21 more_ - `modules/core/src/main/scala/de/nowchess/chess/exception/ApiException.scala` - class ApiException - class GameNotFoundException - class BadRequestException - `modules/core/src/main/scala/de/nowchess/chess/exception/ApiExceptionMapper.scala` — class ApiExceptionMapper, function toResponse - `modules/core/src/main/scala/de/nowchess/chess/grpc/CoordinatorServiceHandler.scala` — class CoordinatorServiceHandler -- `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` - - class CoreProtoMapper - - function toProtoColor - - function fromProtoColor - - function toProtoPieceType - - function fromProtoPieceType - - function toProtoMoveKind - - _...9 more_ +- `modules/core/src/main/scala/de/nowchess/chess/grpc/CoreProtoMapper.scala` — class CoreProtoMapper - `modules/core/src/main/scala/de/nowchess/chess/grpc/IoGrpcClientWrapper.scala` - class IoGrpcClientWrapper - function exportCombined @@ -392,11 +299,11 @@ - `modules/core/src/main/scala/de/nowchess/chess/redis/GameRedisSubscriberManager.scala` - class GameRedisSubscriberManager - function subscribeGame - - function onMessage - function unsubscribeGame - function batchResubscribeGames - function unsubscribeGames - - _...3 more_ + - function evictGames + - _...2 more_ - `modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistry.scala` - class GameRegistry - function store @@ -462,14 +369,7 @@ - function importGameContext - `modules/io/src/main/scala/de/nowchess/io/fen/FenParserSupport.scala` — function buildSquares - `modules/io/src/main/scala/de/nowchess/io/grpc/IoGrpcService.scala` — class IoGrpcService -- `modules/io/src/main/scala/de/nowchess/io/grpc/IoProtoMapper.scala` - - class IoProtoMapper - - function toProtoColor - - function fromProtoColor - - function toProtoPieceType - - function fromProtoPieceType - - function toProtoMoveKind - - _...9 more_ +- `modules/io/src/main/scala/de/nowchess/io/grpc/IoProtoMapper.scala` — class IoProtoMapper - `modules/io/src/main/scala/de/nowchess/io/json/JsonExporter.scala` — class JsonExporter, function exportGameContext - `modules/io/src/main/scala/de/nowchess/io/json/JsonParser.scala` — class JsonParser, function importGameContext - `modules/io/src/main/scala/de/nowchess/io/pgn/PgnExporter.scala` @@ -500,16 +400,124 @@ - `modules/json/src/main/scala/de/nowchess/json/SquareKeyDeserializer.scala` — class SquareKeyDeserializer - `modules/json/src/main/scala/de/nowchess/json/SquareKeySerializer.scala` — class SquareKeySerializer - `modules/json/src/main/scala/de/nowchess/json/SquareSerializer.scala` — class SquareSerializer +- `modules/official-bots/python/nnue.py` + - function get_weights_dir: () + - function get_data_dir: () + - function list_checkpoints: () + - function migrate_legacy_data: () + - function show_header: () + - function show_checkpoints_table: () + - _...10 more_ +- `modules/official-bots/python/src/dataset.py` + - function get_datasets_dir: () -> Path + - function next_dataset_version: () -> int + - function list_datasets: () -> List[Tuple[int, Dict]] + - function load_dataset_metadata: (version) -> Optional[Dict] + - function save_dataset_metadata: (version, metadata) -> None + - function create_dataset: (version, labeled_jsonl_path, sources, stockfish_depth) -> Path + - _...4 more_ +- `modules/official-bots/python/src/export.py` — function export_to_nbai: (weights_file, output_file, trained_by, train_loss) +- `modules/official-bots/python/src/generate.py` — function play_random_game_and_collect_positions: (output_file, total_positions, samples_per_game, min_move, max_move, num_workers) +- `modules/official-bots/python/src/label.py` — function normalize_evaluation: (cp_value, method, scale), function label_positions_with_stockfish: (positions_file, output_file, stockfish_path, batch_size, depth, verbose, normalize, num_workers) +- `modules/official-bots/python/src/lichess_importer.py` — function import_lichess_evals: (input_path, output_file, max_positions, min_depth, verbose) -> int +- `modules/official-bots/python/src/tactical_positions_extractor.py` + - function download_and_extract_puzzle_db: (url, output_dir) + - function extract_puzzle_positions: (puzzle_csv, max_puzzles) -> Set[str] + - function load_positions_from_file: (file_path) -> Set[str] + - function merge_positions: (tactical, other, output_file) + - function extract_tactical_only: (puzzle_csv, output_file, max_puzzles) -> int + - function interactive_merge_positions: (puzzle_csv, output_file, max_puzzles) +- `modules/official-bots/python/src/train.py` + - function fen_to_features: (fen) + - function find_next_version: (base_name) + - function save_metadata: (weights_file, metadata) + - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio, hidden_sizes) + - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio, hidden_sizes) + - class NNUEDataset + - _...1 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/BotController.scala` + - class BotController + - function getBot + - function listBots + - class BotController + - function getBot + - function listBots +- `modules/official-bots/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` + - class BotMoveRepetition + - function blockedMoves + - function repeatedMove + - function filterAllowed +- `modules/official-bots/src/main/scala/de/nowchess/bot/Config.scala` — class Config +- `modules/official-bots/src/main/scala/de/nowchess/bot/ai/Evaluation.scala` + - class Evaluation + - class CHECKMATE_SCORE + - class DRAW_SCORE + - function evaluate + - function initAccumulator + - function copyAccumulator + - _...2 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala` — class ClassicalBot, function apply +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/HybridBot.scala` — class HybridBot, function apply +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala` — class NNUEBot, function apply +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` + - class EvaluationClassic + - function evaluate + - function countRay +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/EvaluationNNUE.scala` — class EvaluationNNUE, function evaluate +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala` + - class NNUE + - function initAccumulator + - function pushAccumulator + - function copyAccumulator + - function recomputeAccumulator + - function validateAccumulator + - _...4 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiLoader.scala` + - class NbaiLoader + - function load + - function loadDefault +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiMigrator.scala` — class NbaiMigrator, function migrateFromBin +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiModel.scala` + - function toJson + - class NbaiMetadata + - function fromJson + - function str + - function num +- `modules/official-bots/src/main/scala/de/nowchess/bot/bots/nnue/NbaiWriter.scala` — class NbaiWriter, function write +- `modules/official-bots/src/main/scala/de/nowchess/bot/config/JacksonConfig.scala` — class JacksonConfig, function customize +- `modules/official-bots/src/main/scala/de/nowchess/bot/config/RedisConfig.scala` — class RedisConfig +- `modules/official-bots/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala` + - function bestMove + - function bestMove + - function bestMoveWithTime + - function bestMoveWithTime + - function loop + - function loop +- `modules/official-bots/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` + - class MoveOrdering + - class OrderingContext + - function addKillerMove + - function getKillerMoves + - function addHistory + - function getHistory + - _...3 more_ +- `modules/official-bots/src/main/scala/de/nowchess/bot/logic/TranspositionTable.scala` + - function advance + - function probe + - function store + - function clear +- `modules/official-bots/src/main/scala/de/nowchess/bot/resource/OfficialBotChallengeResource.scala` — class OfficialBotChallengeResource, function challengeWithDifficulty +- `modules/official-bots/src/main/scala/de/nowchess/bot/service/DifficultyMapper.scala` — class DifficultyMapper, function fromElo +- `modules/official-bots/src/main/scala/de/nowchess/bot/service/OfficialBotService.scala` — class OfficialBotService, function onStart +- `modules/official-bots/src/main/scala/de/nowchess/bot/util/PolyglotBook.scala` — function probe, function select +- `modules/official-bots/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala` — class PolyglotHash, function hash +- `modules/official-bots/src/main/scala/de/nowchess/bot/util/ZobristHash.scala` + - class ZobristHash + - function hash + - function nextHash - `modules/rule/src/main/scala/de/nowchess/rules/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/rule/src/main/scala/de/nowchess/rules/config/NativeReflectionConfig.scala` — class NativeReflectionConfig -- `modules/rule/src/main/scala/de/nowchess/rules/grpc/ProtoMapper.scala` - - class ProtoMapper - - function toProtoColor - - function fromProtoColor - - function toProtoPieceType - - function fromProtoPieceType - - function toProtoMoveKind - - _...9 more_ +- `modules/rule/src/main/scala/de/nowchess/rules/grpc/ProtoMapper.scala` — class ProtoMapper - `modules/rule/src/main/scala/de/nowchess/rules/grpc/RuleGrpcService.scala` — class RuleGrpcService - `modules/rule/src/main/scala/de/nowchess/rules/resource/RuleSetResource.scala` - class RuleSetResource @@ -520,35 +528,37 @@ - function isCheckmate - _...6 more_ - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — class DefaultRules, function positionOf +- `modules/security/src/main/scala/de/nowchess/security/InternalAuthFilter.scala` — class InternalAuthFilter +- `modules/security/src/main/scala/de/nowchess/security/InternalGrpcAuthInterceptor.scala` — class InternalGrpcAuthInterceptor +- `modules/security/src/main/scala/de/nowchess/security/InternalGrpcSecretClientInterceptor.scala` — class InternalGrpcSecretClientInterceptor +- `modules/security/src/main/scala/de/nowchess/security/InternalSecretClientFilter.scala` — class InternalSecretClientFilter - `modules/store/src/main/scala/de/nowchess/store/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/store/src/main/scala/de/nowchess/store/config/NativeReflectionConfig.scala` — class NativeReflectionConfig - `modules/store/src/main/scala/de/nowchess/store/config/RedisConfig.scala` — class RedisConfig -- `modules/store/src/main/scala/de/nowchess/store/config/RedissonProducer.scala` - - class RedissonProducer - - function redissonClient - - function close - `modules/store/src/main/scala/de/nowchess/store/domain/GameRecord.scala` — class GameRecord -- `modules/store/src/main/scala/de/nowchess/store/redis/GameWritebackStreamListener.scala` - - class GameWritebackStreamListener - - function startListening - - function onMessage +- `modules/store/src/main/scala/de/nowchess/store/redis/GameWritebackStreamListener.scala` — class GameWritebackStreamListener, function startListening - `modules/store/src/main/scala/de/nowchess/store/repository/GameRecordRepository.scala` - class GameRecordRepository - function findByGameId - function persist - function merge -- `modules/store/src/main/scala/de/nowchess/store/resource/StoreGameResource.scala` — class StoreGameResource, function getGame + - function findByPlayerId + - function findByPlayerIdRunning +- `modules/store/src/main/scala/de/nowchess/store/resource/StoreGameResource.scala` + - class StoreGameResource + - function getGame + - function getRunning + - function getHistory - `modules/store/src/main/scala/de/nowchess/store/service/GameWritebackService.scala` — class GameWritebackService, function writeBack - `modules/ws/src/main/scala/de/nowchess/ws/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/ws/src/main/scala/de/nowchess/ws/config/NativeReflectionConfig.scala` — class NativeReflectionConfig - `modules/ws/src/main/scala/de/nowchess/ws/config/RedisConfig.scala` — class RedisConfig -- `modules/ws/src/main/scala/de/nowchess/ws/config/RedissonProducer.scala` - - class RedissonProducer - - function produceRedissonClient - - function shutdown - `modules/ws/src/main/scala/de/nowchess/ws/resource/GameWebSocketResource.scala` - class GameWebSocketResource - function onOpen - - function onMessage - function onTextMessage - function onClose +- `modules/ws/src/main/scala/de/nowchess/ws/resource/UserWebSocketResource.scala` + - class UserWebSocketResource + - function onOpen + - function onClose diff --git a/.codesight/middleware.md b/.codesight/middleware.md index d838d70..306692e 100644 --- a/.codesight/middleware.md +++ b/.codesight/middleware.md @@ -1,4 +1,4 @@ # Middleware ## custom -- generate — `modules/bot/python/src/generate.py` +- generate — `modules/official-bots/python/src/generate.py` diff --git a/bruno/account/account/01 Register.bru b/bruno/account/account/01 Register.bru index 26d53ef..a06fbba 100644 --- a/bruno/account/account/01 Register.bru +++ b/bruno/account/account/01 Register.bru @@ -4,11 +4,15 @@ meta { seq: 1 } -http { - method: POST +post { url: {{accountBaseUrl}}/account body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/02 Login.bru b/bruno/account/account/02 Login.bru index 23b06bf..e614b49 100644 --- a/bruno/account/account/02 Login.bru +++ b/bruno/account/account/02 Login.bru @@ -4,11 +4,15 @@ meta { seq: 2 } -http { - method: POST +post { url: {{accountBaseUrl}}/account/login body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/03 Get Current User.bru b/bruno/account/account/03 Get Current User.bru index 968abf7..fab5104 100644 --- a/bruno/account/account/03 Get Current User.bru +++ b/bruno/account/account/03 Get Current User.bru @@ -7,7 +7,12 @@ meta { get { url: {{accountBaseUrl}}/account/me body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/04 Get Public Profile.bru b/bruno/account/account/04 Get Public Profile.bru index b387563..85aced4 100644 --- a/bruno/account/account/04 Get Public Profile.bru +++ b/bruno/account/account/04 Get Public Profile.bru @@ -4,10 +4,15 @@ meta { seq: 4 } -http { - method: GET +get { url: {{accountBaseUrl}}/account/{{username}} - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/05 Create Bot.bru b/bruno/account/account/05 Create Bot.bru index 8dffb23..18eebf7 100644 --- a/bruno/account/account/05 Create Bot.bru +++ b/bruno/account/account/05 Create Bot.bru @@ -4,11 +4,15 @@ meta { seq: 5 } -http { - method: POST +post { url: {{accountBaseUrl}}/account/bots body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/06 List Bots.bru b/bruno/account/account/06 List Bots.bru index 44fada9..953a7e6 100644 --- a/bruno/account/account/06 List Bots.bru +++ b/bruno/account/account/06 List Bots.bru @@ -7,7 +7,12 @@ meta { get { url: {{accountBaseUrl}}/account/bots body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/07 Update Bot Name.bru b/bruno/account/account/07 Update Bot Name.bru index ecc7304..6da9911 100644 --- a/bruno/account/account/07 Update Bot Name.bru +++ b/bruno/account/account/07 Update Bot Name.bru @@ -4,11 +4,15 @@ meta { seq: 7 } -http { - method: PUT +put { url: {{accountBaseUrl}}/account/bots/{{botId}} body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/08 Rotate Bot Token.bru b/bruno/account/account/08 Rotate Bot Token.bru index efff097..331adc7 100644 --- a/bruno/account/account/08 Rotate Bot Token.bru +++ b/bruno/account/account/08 Rotate Bot Token.bru @@ -4,10 +4,15 @@ meta { seq: 8 } -http { - method: POST +post { url: {{accountBaseUrl}}/account/bots/{{botId}}/rotate-token - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/09 Delete Bot.bru b/bruno/account/account/09 Delete Bot.bru index 6f3b068..de69eef 100644 --- a/bruno/account/account/09 Delete Bot.bru +++ b/bruno/account/account/09 Delete Bot.bru @@ -4,10 +4,15 @@ meta { seq: 9 } -http { - method: DELETE +delete { url: {{accountBaseUrl}}/account/bots/{{botId}} - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/10 Get Official Bots.bru b/bruno/account/account/10 Get Official Bots.bru index 33dd4b5..b7a2cfa 100644 --- a/bruno/account/account/10 Get Official Bots.bru +++ b/bruno/account/account/10 Get Official Bots.bru @@ -4,10 +4,15 @@ meta { seq: 10 } -http { - method: GET +get { url: {{accountBaseUrl}}/account/official-bots - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/11 Ban User.bru b/bruno/account/account/11 Ban User.bru index 1c5aaae..7ac74d8 100644 --- a/bruno/account/account/11 Ban User.bru +++ b/bruno/account/account/11 Ban User.bru @@ -4,10 +4,15 @@ meta { seq: 11 } -http { - method: POST +post { url: {{accountBaseUrl}}/account/{{userId}}/ban - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/account/12 Unban User.bru b/bruno/account/account/12 Unban User.bru index d82e5b9..19470b2 100644 --- a/bruno/account/account/12 Unban User.bru +++ b/bruno/account/account/12 Unban User.bru @@ -4,10 +4,15 @@ meta { seq: 12 } -http { - method: POST +post { url: {{accountBaseUrl}}/account/{{userId}}/unban - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/challenge/01 Send Challenge.bru b/bruno/account/challenge/01 Send Challenge.bru index 2713c70..056e606 100644 --- a/bruno/account/challenge/01 Send Challenge.bru +++ b/bruno/account/challenge/01 Send Challenge.bru @@ -4,11 +4,15 @@ meta { seq: 1 } -http { - method: POST +post { url: {{accountBaseUrl}}/challenge/{{username}} body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/challenge/02 List Challenges.bru b/bruno/account/challenge/02 List Challenges.bru index fdc8d77..1ad5e39 100644 --- a/bruno/account/challenge/02 List Challenges.bru +++ b/bruno/account/challenge/02 List Challenges.bru @@ -7,7 +7,12 @@ meta { get { url: {{accountBaseUrl}}/challenge body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/challenge/03 Get Challenge.bru b/bruno/account/challenge/03 Get Challenge.bru index 0cc27d0..90e0a1e 100644 --- a/bruno/account/challenge/03 Get Challenge.bru +++ b/bruno/account/challenge/03 Get Challenge.bru @@ -4,10 +4,15 @@ meta { seq: 3 } -http { - method: GET +get { url: {{accountBaseUrl}}/challenge/{{challengeId}} - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/challenge/04 Accept Challenge.bru b/bruno/account/challenge/04 Accept Challenge.bru index efc8606..89db004 100644 --- a/bruno/account/challenge/04 Accept Challenge.bru +++ b/bruno/account/challenge/04 Accept Challenge.bru @@ -4,10 +4,15 @@ meta { seq: 4 } -http { - method: POST +post { url: {{accountBaseUrl}}/challenge/{{challengeId}}/accept - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/challenge/05 Decline Challenge.bru b/bruno/account/challenge/05 Decline Challenge.bru index 90bb92d..eaad1cc 100644 --- a/bruno/account/challenge/05 Decline Challenge.bru +++ b/bruno/account/challenge/05 Decline Challenge.bru @@ -4,11 +4,15 @@ meta { seq: 5 } -http { - method: POST +post { url: {{accountBaseUrl}}/challenge/{{challengeId}}/decline body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/challenge/06 Cancel Challenge.bru b/bruno/account/challenge/06 Cancel Challenge.bru index 9f6f7d0..bdca67f 100644 --- a/bruno/account/challenge/06 Cancel Challenge.bru +++ b/bruno/account/challenge/06 Cancel Challenge.bru @@ -4,10 +4,15 @@ meta { seq: 6 } -http { - method: POST +post { url: {{accountBaseUrl}}/challenge/{{challengeId}}/cancel - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/official/01 Challenge Official Bot.bru b/bruno/account/official/01 Challenge Official Bot.bru index 2147866..6084e16 100644 --- a/bruno/account/official/01 Challenge Official Bot.bru +++ b/bruno/account/official/01 Challenge Official Bot.bru @@ -4,10 +4,15 @@ meta { seq: 1 } -http { - method: POST +post { url: {{accountBaseUrl}}/challenge/official/{{botName}}?difficulty={{difficulty}}&color={{color}} - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { @@ -15,7 +20,7 @@ headers { Accept: application/json } -notes { +docs { Query Parameters: - difficulty: 1000-2800 (ELO) - color: white | black | random diff --git a/bruno/account/official/02 Create Official Bot.bru b/bruno/account/official/02 Create Official Bot.bru index 7410011..98649ae 100644 --- a/bruno/account/official/02 Create Official Bot.bru +++ b/bruno/account/official/02 Create Official Bot.bru @@ -4,11 +4,15 @@ meta { seq: 2 } -http { - method: POST +post { url: {{accountBaseUrl}}/account/official-bots body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/account/official/03 Delete Official Bot.bru b/bruno/account/official/03 Delete Official Bot.bru index 3f62a49..4a316bd 100644 --- a/bruno/account/official/03 Delete Official Bot.bru +++ b/bruno/account/official/03 Delete Official Bot.bru @@ -4,10 +4,15 @@ meta { seq: 3 } -http { - method: DELETE +delete { url: {{accountBaseUrl}}/account/official-bots/{{botId}} - auth: none + body: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/board/draw/01 Offer Draw.bru b/bruno/board/draw/01 Offer Draw.bru index 2dc488b..feca671 100644 --- a/bruno/board/draw/01 Offer Draw.bru +++ b/bruno/board/draw/01 Offer Draw.bru @@ -4,9 +4,13 @@ meta { seq: 1 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game/{{gameId}}/draw/offer body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/draw/02 Accept Draw.bru b/bruno/board/draw/02 Accept Draw.bru index 83495fb..c92ad86 100644 --- a/bruno/board/draw/02 Accept Draw.bru +++ b/bruno/board/draw/02 Accept Draw.bru @@ -4,9 +4,13 @@ meta { seq: 2 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game/{{gameId}}/draw/accept body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/draw/03 Decline Draw.bru b/bruno/board/draw/03 Decline Draw.bru index 2dad7ec..f6eef7c 100644 --- a/bruno/board/draw/03 Decline Draw.bru +++ b/bruno/board/draw/03 Decline Draw.bru @@ -4,9 +4,13 @@ meta { seq: 3 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game/{{gameId}}/draw/decline body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/draw/04 Claim Draw.bru b/bruno/board/draw/04 Claim Draw.bru index 967992f..1df5b9d 100644 --- a/bruno/board/draw/04 Claim Draw.bru +++ b/bruno/board/draw/04 Claim Draw.bru @@ -4,9 +4,13 @@ meta { seq: 4 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game/{{gameId}}/draw/claim body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/export/01 Export FEN.bru b/bruno/board/export/01 Export FEN.bru index c6b3592..c0bd5ee 100644 --- a/bruno/board/export/01 Export FEN.bru +++ b/bruno/board/export/01 Export FEN.bru @@ -4,9 +4,13 @@ meta { seq: 1 } -http { - method: GET +get { url: {{baseUrl}}/api/board/game/{{gameId}}/export/fen body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/export/02 Export PGN.bru b/bruno/board/export/02 Export PGN.bru index ded0a2e..a866a69 100644 --- a/bruno/board/export/02 Export PGN.bru +++ b/bruno/board/export/02 Export PGN.bru @@ -4,9 +4,13 @@ meta { seq: 2 } -http { - method: GET +get { url: {{baseUrl}}/api/board/game/{{gameId}}/export/pgn body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/game/01 Create Game.bru b/bruno/board/game/01 Create Game.bru index 66540b1..8be51a5 100644 --- a/bruno/board/game/01 Create Game.bru +++ b/bruno/board/game/01 Create Game.bru @@ -4,11 +4,15 @@ meta { seq: 1 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/board/game/02 Get Game.bru b/bruno/board/game/02 Get Game.bru index a8e7dfc..d099a40 100644 --- a/bruno/board/game/02 Get Game.bru +++ b/bruno/board/game/02 Get Game.bru @@ -7,7 +7,12 @@ meta { get { url: {{baseUrl}}/api/board/game/{{gameId}} body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } vars:pre-request { diff --git a/bruno/board/game/04 Resign.bru b/bruno/board/game/04 Resign.bru index e9ccd11..8454f80 100644 --- a/bruno/board/game/04 Resign.bru +++ b/bruno/board/game/04 Resign.bru @@ -4,9 +4,13 @@ meta { seq: 4 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game/{{gameId}}/resign body: none - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } diff --git a/bruno/board/import/01 Import FEN.bru b/bruno/board/import/01 Import FEN.bru index bd0ddc1..55ee138 100644 --- a/bruno/board/import/01 Import FEN.bru +++ b/bruno/board/import/01 Import FEN.bru @@ -4,11 +4,15 @@ meta { seq: 1 } -http { - method: POST +post { url: {{baseUrl}}/api/board/game/import/fen body: json - auth: none + auth: inherit +} + +settings { + encodeUrl: true + timeout: 0 } headers { diff --git a/bruno/core/coordinator/01 List Instances.bru b/bruno/core/coordinator/01 List Instances.bru deleted file mode 100644 index c47f7b9..0000000 --- a/bruno/core/coordinator/01 List Instances.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: List Instances - type: http - seq: 1 -} - -http { - method: GET - url: {{baseUrl}}/coordinator/instances - auth: none -} - -headers { - Accept: application/json -} diff --git a/bruno/core/coordinator/02 Get Metrics.bru b/bruno/core/coordinator/02 Get Metrics.bru deleted file mode 100644 index 5a8c1ef..0000000 --- a/bruno/core/coordinator/02 Get Metrics.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: Get Metrics - type: http - seq: 2 -} - -http { - method: GET - url: {{baseUrl}}/coordinator/metrics - auth: none -} - -headers { - Accept: application/json -} diff --git a/bruno/core/coordinator/03 Rebalance.bru b/bruno/core/coordinator/03 Rebalance.bru deleted file mode 100644 index b6c9532..0000000 --- a/bruno/core/coordinator/03 Rebalance.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: Rebalance - type: http - seq: 3 -} - -http { - method: POST - url: {{baseUrl}}/coordinator/rebalance - auth: none -} - -headers { - Accept: application/json -} diff --git a/bruno/core/coordinator/04 Failover.bru b/bruno/core/coordinator/04 Failover.bru deleted file mode 100644 index 3ba5252..0000000 --- a/bruno/core/coordinator/04 Failover.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: Failover - type: http - seq: 4 -} - -http { - method: POST - url: {{baseUrl}}/coordinator/failover/{{instanceId}} - auth: none -} - -headers { - Accept: application/json -} diff --git a/bruno/core/coordinator/05 Scale Up.bru b/bruno/core/coordinator/05 Scale Up.bru deleted file mode 100644 index b93f15e..0000000 --- a/bruno/core/coordinator/05 Scale Up.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: Scale Up - type: http - seq: 5 -} - -http { - method: POST - url: {{baseUrl}}/coordinator/scale-up - auth: none -} - -headers { - Accept: application/json -} diff --git a/bruno/core/coordinator/06 Scale Down.bru b/bruno/core/coordinator/06 Scale Down.bru deleted file mode 100644 index f9a332e..0000000 --- a/bruno/core/coordinator/06 Scale Down.bru +++ /dev/null @@ -1,15 +0,0 @@ -meta { - name: Scale Down - type: http - seq: 6 -} - -http { - method: POST - url: {{baseUrl}}/coordinator/scale-down - auth: none -} - -headers { - Accept: application/json -} diff --git a/bruno/core/coordinator/folder.bru b/bruno/core/coordinator/folder.bru deleted file mode 100644 index 3ec5a8b..0000000 --- a/bruno/core/coordinator/folder.bru +++ /dev/null @@ -1,4 +0,0 @@ -meta { - name: coordinator - seq: 4 -} diff --git a/bruno/environments/local.bru b/bruno/environments/local.bru index a52e265..a0bf8b2 100644 --- a/bruno/environments/local.bru +++ b/bruno/environments/local.bru @@ -1,9 +1,10 @@ vars { - baseUrl: http://localhost:8080 + baseUrl: http://localhost:8080/api wsBaseUrl: ws://localhost:8084 - ioBaseUrl: http://localhost:8080 + ioBaseUrl: http://localhost:8080/api accountBaseUrl: http://localhost:8083/api storeBaseUrl: http://localhost:8085 + coordinatorBaseUrl: http://localhost:8086 token: your_jwt_token_here adminToken: your_admin_jwt_token_here botToken: your_bot_jwt_token_here diff --git a/bruno/environments/prod.bru b/bruno/environments/prod.bru index 8da4862..79526a2 100644 --- a/bruno/environments/prod.bru +++ b/bruno/environments/prod.bru @@ -4,4 +4,5 @@ vars { ioBaseUrl: https://nowchess.janis-eccarius.de/api accountBaseUrl: https://nowchess.janis-eccarius.de/api storeBaseUrl: https://nowchess.janis-eccarius.de/api + coordinatorBaseUrl: http://localhost:8086 } diff --git a/bruno/environments/staging.bru b/bruno/environments/staging.bru index 3cf331f..3429bfb 100644 --- a/bruno/environments/staging.bru +++ b/bruno/environments/staging.bru @@ -4,4 +4,5 @@ vars { ioBaseUrl: https://st.nowchess.janis-eccarius.de/api accountBaseUrl: https://st.nowchess.janis-eccarius.de/api storeBaseUrl: https://st.nowchess.janis-eccarius.de/api + coordinatorBaseUrl: http://localhost:8086 } diff --git a/bruno/ws/01 Game WebSocket.bru b/bruno/ws/01 Game WebSocket.bru deleted file mode 100644 index 3d00f2e..0000000 --- a/bruno/ws/01 Game WebSocket.bru +++ /dev/null @@ -1,31 +0,0 @@ -meta { - name: Game WebSocket - type: http - seq: 1 -} - -http { - method: GET - url: {{wsBaseUrl}}/api/board/game/{{gameId}}/ws - auth: none -} - -headers { - Authorization: Bearer {{token}} - Connection: Upgrade - Upgrade: websocket -} - -notes { - WebSocket connection for real-time game updates. - - Local: ws://localhost:8084/api/board/game/{{gameId}}/ws - Staging: wss://st.nowchess.janis-eccarius.de/ws/api/board/game/{{gameId}}/ws - Prod: wss://nowchess.janis-eccarius.de/ws/api/board/game/{{gameId}}/ws - - Message Types: - - CONNECTED: Connection established - - MOVE: Player move - - GAME_STATE: Full state update - - ERROR: Error message -} diff --git a/bruno/ws/02 User WebSocket.bru b/bruno/ws/02 User WebSocket.bru deleted file mode 100644 index cdd78c0..0000000 --- a/bruno/ws/02 User WebSocket.bru +++ /dev/null @@ -1,32 +0,0 @@ -meta { - name: User WebSocket - type: http - seq: 2 -} - -http { - method: GET - url: {{wsBaseUrl}}/api/user/ws - auth: none -} - -headers { - Authorization: Bearer {{token}} - Connection: Upgrade - Upgrade: websocket -} - -notes { - WebSocket connection for user notifications. - - Local: ws://localhost:8084/api/user/ws - Staging: wss://st.nowchess.janis-eccarius.de/ws/api/user/ws - Prod: wss://nowchess.janis-eccarius.de/ws/api/user/ws - - Message Types: - - CONNECTED: Connection established - - CHALLENGE: Challenge received - - GAME_INVITE: Game invitation - - NOTIFICATION: General notification - - ERROR: Error message -} diff --git a/modules/coordinator/src/main/scala/de/nowchess/coordinator/grpc/CoordinatorGrpcServer.scala b/modules/coordinator/src/main/scala/de/nowchess/coordinator/grpc/CoordinatorGrpcServer.scala index 754241c..45b8ae7 100644 --- a/modules/coordinator/src/main/scala/de/nowchess/coordinator/grpc/CoordinatorGrpcServer.scala +++ b/modules/coordinator/src/main/scala/de/nowchess/coordinator/grpc/CoordinatorGrpcServer.scala @@ -34,16 +34,18 @@ class CoordinatorGrpcServer extends CoordinatorServiceGrpc.CoordinatorServiceImp override def onNext(frame: HeartbeatFrame): Unit = lastInstanceId = frame.getInstanceId - try - instanceRegistry.updateInstanceFromRedis(frame.getInstanceId) - log.debugf( - "Received heartbeat from %s with %d subscriptions", - frame.getInstanceId, - frame.getSubscriptionCount, + instanceRegistry + .updateInstanceFromRedis(frame.getInstanceId) + .subscribe() + .`with`( + _ => + log.debugf( + "Received heartbeat from %s with %d subscriptions", + frame.getInstanceId, + frame.getSubscriptionCount, + ), + ex => log.warnf(ex, "Failed to process heartbeat from %s", frame.getInstanceId), ) - catch - case ex: Exception => - log.warnf(ex, "Failed to process heartbeat from %s", frame.getInstanceId) override def onError(t: Throwable): Unit = log.warnf(t, "Heartbeat stream error for instance %s", lastInstanceId) diff --git a/modules/coordinator/src/main/scala/de/nowchess/coordinator/service/InstanceRegistry.scala b/modules/coordinator/src/main/scala/de/nowchess/coordinator/service/InstanceRegistry.scala index 69e9db2..6137ac7 100644 --- a/modules/coordinator/src/main/scala/de/nowchess/coordinator/service/InstanceRegistry.scala +++ b/modules/coordinator/src/main/scala/de/nowchess/coordinator/service/InstanceRegistry.scala @@ -2,19 +2,20 @@ package de.nowchess.coordinator.service import jakarta.enterprise.context.ApplicationScoped import jakarta.inject.Inject -import io.quarkus.redis.datasource.RedisDataSource +import io.quarkus.redis.datasource.ReactiveRedisDataSource import scala.jdk.CollectionConverters.* import scala.compiletime.uninitialized import com.fasterxml.jackson.databind.ObjectMapper import de.nowchess.coordinator.dto.InstanceMetadata import java.util.concurrent.ConcurrentHashMap +import io.smallrye.mutiny.Uni @ApplicationScoped class InstanceRegistry: // scalafix:off DisableSyntax.var @Inject - private var redis: RedisDataSource = uninitialized - private var redisPrefix = "nowchess" + private var redis: ReactiveRedisDataSource = uninitialized + private var redisPrefix = "nowchess" // scalafix:on DisableSyntax.var private val mapper = ObjectMapper() @@ -29,14 +30,18 @@ class InstanceRegistry: def getAllInstances: List[InstanceMetadata] = instances.values.asScala.toList - def updateInstanceFromRedis(instanceId: String): Unit = + def updateInstanceFromRedis(instanceId: String): Uni[Unit] = val key = s"$redisPrefix:instances:$instanceId" - Option(redis.value(classOf[String]).get(key)).foreach { value => - try - val metadata = mapper.readValue(value, classOf[InstanceMetadata]) - instances.put(instanceId, metadata) - catch case _: Exception => () - } + redis.value(classOf[String]) + .get(key) + .onItem().transformToUni { value => + try + val metadata = mapper.readValue(value, classOf[InstanceMetadata]) + instances.put(instanceId, metadata) + Uni.createFrom().item(()) + catch case _: Exception => Uni.createFrom().item(()) + } + .onFailure().recoverWithItem(()) def markInstanceDead(instanceId: String): Unit = instances.computeIfPresent(instanceId, (_, inst) => inst.copy(state = "DEAD"))