From ea101a5abd8877aa934184e29c72b52b40b439fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jegors=20=C4=8Cemisovs?= Date: Fri, 21 Aug 2026 22:48:40 +0300 Subject: [PATCH] refactor: migrate package to com.fortemate.dicechess.bot and update org links --- README.md | 6 +++--- SECURITY.md | 4 ++-- mise.toml | 4 ++-- pom.xml | 4 ++-- .../java/{ => com/fortemate}/dicechess/bot/Main.java | 2 +- .../fortemate}/dicechess/bot/OnnxEvaluator.java | 2 +- .../fortemate}/dicechess/bot/OnnxStrategy.java | 2 +- .../{ => com/fortemate}/dicechess/bot/Strategy.java | 2 +- .../fortemate}/dicechess/bot/package-info.java | 12 ++++++------ .../fortemate}/dicechess/bot/OnnxStrategyTest.java | 2 +- .../dicechess/bot/WebhookIntegrationTest.java | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) rename src/main/java/{ => com/fortemate}/dicechess/bot/Main.java (98%) rename src/main/java/{ => com/fortemate}/dicechess/bot/OnnxEvaluator.java (99%) rename src/main/java/{ => com/fortemate}/dicechess/bot/OnnxStrategy.java (98%) rename src/main/java/{ => com/fortemate}/dicechess/bot/Strategy.java (96%) rename src/main/java/{ => com/fortemate}/dicechess/bot/package-info.java (74%) rename src/test/java/{ => com/fortemate}/dicechess/bot/OnnxStrategyTest.java (98%) rename src/test/java/{ => com/fortemate}/dicechess/bot/WebhookIntegrationTest.java (97%) diff --git a/README.md b/README.md index fb5ee16..c5a0f58 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Official **Java 25 (LTS)** baseline house bot and reference starter template for the [Dice Chess](https://dicechess.net) platform. -Built with [`dicechess-bot-runtime`](https://github.com/rabestro/dicechess-bot-runtime), [`dicechess-engine`](https://github.com/fortemate/dicechess-engine) (JVM API), and Microsoft ONNX Runtime for Java. +Built with [`dicechess-bot-runtime`](https://github.com/fortemate/dicechess-bot-runtime), [`dicechess-engine`](https://github.com/fortemate/dicechess-engine) (JVM API), and Microsoft ONNX Runtime for Java. ## Overview @@ -72,7 +72,7 @@ java -jar target/dicechess-bot-java-1.0.5-SNAPSHOT.jar docker build -t dicechess-bot-java . docker run -p 8080:8080 \ -e DICECHESS_WEBHOOK_SECRET="your-secret-token" \ - ghcr.io/rabestro/dicechess-bot-java:latest + ghcr.io/fortemate/dicechess-bot-java:latest ``` ## Registering & Connecting Your Bot ([`bots.jc.id.lv`](https://bots.jc.id.lv)) @@ -131,7 +131,7 @@ curl -X POST "https://play-api.jc.id.lv/bot/open-to-humans" \ ## Creating Custom Strategies To create a custom bot strategy: -1. Implement the `Strategy` interface in `src/main/java/dicechess/bot/`: +1. Implement the `Strategy` interface in `src/main/java/com/fortemate/dicechess/bot/`: ```java public class MyCustomStrategy implements Strategy { @Override diff --git a/SECURITY.md b/SECURITY.md index 380ff63..2666e40 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -11,8 +11,8 @@ This security policy applies to the `dicechess-bot-java` reference house bot service and starter template. The Dice Chess rules engine and the core platform API/services are governed by the security policies of their respective repositories: -- [dicechess-engine-scala](https://github.com/rabestro/dicechess-engine-scala/security/policy) -- [dicechess-play-api](https://github.com/rabestro/dicechess-play-api/security/policy) +- [dicechess-engine](https://github.com/fortemate/dicechess-engine/security/policy) +- [dicechess-play-api](https://github.com/fortemate/dicechess-play-api/security/policy) ## Reporting a Vulnerability diff --git a/mise.toml b/mise.toml index ad85ee2..7254cfa 100644 --- a/mise.toml +++ b/mise.toml @@ -28,5 +28,5 @@ description = "Generate Javadoc HTML documentation" run = "mvn javadoc:javadoc" [tasks.run] -description = "Run bot application locally" -run = "mvn exec:java -Dexec.mainClass='dicechess.bot.Main'" +description = "Run the Java bot locally (port 8080)" +run = "mvn exec:java -Dexec.mainClass='com.fortemate.dicechess.bot.Main'" diff --git a/pom.xml b/pom.xml index bc3ae77..e8568e8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - lv.id.jc + com.fortemate dicechess-bot-java 1.0.10-SNAPSHOT jar @@ -133,7 +133,7 @@ - dicechess.bot.Main + com.fortemate.dicechess.bot.Main diff --git a/src/main/java/dicechess/bot/Main.java b/src/main/java/com/fortemate/dicechess/bot/Main.java similarity index 98% rename from src/main/java/dicechess/bot/Main.java rename to src/main/java/com/fortemate/dicechess/bot/Main.java index fc6f998..fcf9b0e 100644 --- a/src/main/java/dicechess/bot/Main.java +++ b/src/main/java/com/fortemate/dicechess/bot/Main.java @@ -1,4 +1,4 @@ -package dicechess.bot; +package com.fortemate.dicechess.bot; import com.sun.net.httpserver.HttpServer; import lv.id.jc.dicechess.runtime.CustomHandlerServer; diff --git a/src/main/java/dicechess/bot/OnnxEvaluator.java b/src/main/java/com/fortemate/dicechess/bot/OnnxEvaluator.java similarity index 99% rename from src/main/java/dicechess/bot/OnnxEvaluator.java rename to src/main/java/com/fortemate/dicechess/bot/OnnxEvaluator.java index 1dc1922..b1dd2be 100644 --- a/src/main/java/dicechess/bot/OnnxEvaluator.java +++ b/src/main/java/com/fortemate/dicechess/bot/OnnxEvaluator.java @@ -1,4 +1,4 @@ -package dicechess.bot; +package com.fortemate.dicechess.bot; import ai.onnxruntime.OnnxTensor; import ai.onnxruntime.OrtEnvironment; diff --git a/src/main/java/dicechess/bot/OnnxStrategy.java b/src/main/java/com/fortemate/dicechess/bot/OnnxStrategy.java similarity index 98% rename from src/main/java/dicechess/bot/OnnxStrategy.java rename to src/main/java/com/fortemate/dicechess/bot/OnnxStrategy.java index 9bedb95..975b71a 100644 --- a/src/main/java/dicechess/bot/OnnxStrategy.java +++ b/src/main/java/com/fortemate/dicechess/bot/OnnxStrategy.java @@ -1,4 +1,4 @@ -package dicechess.bot; +package com.fortemate.dicechess.bot; import dicechess.engine.domain.GameState; import dicechess.engine.jvmapi.JvmApi; diff --git a/src/main/java/dicechess/bot/Strategy.java b/src/main/java/com/fortemate/dicechess/bot/Strategy.java similarity index 96% rename from src/main/java/dicechess/bot/Strategy.java rename to src/main/java/com/fortemate/dicechess/bot/Strategy.java index ddf091e..5036da9 100644 --- a/src/main/java/dicechess/bot/Strategy.java +++ b/src/main/java/com/fortemate/dicechess/bot/Strategy.java @@ -1,4 +1,4 @@ -package dicechess.bot; +package com.fortemate.dicechess.bot; import lv.id.jc.dicechess.runtime.TurnContext; diff --git a/src/main/java/dicechess/bot/package-info.java b/src/main/java/com/fortemate/dicechess/bot/package-info.java similarity index 74% rename from src/main/java/dicechess/bot/package-info.java rename to src/main/java/com/fortemate/dicechess/bot/package-info.java index 02ffde2..40166f2 100644 --- a/src/main/java/dicechess/bot/package-info.java +++ b/src/main/java/com/fortemate/dicechess/bot/package-info.java @@ -8,14 +8,14 @@ * *

Architecture Overview

*
    - *
  • {@link dicechess.bot.Main}: Application entry point. Configures port, loads secrets from env, + *
  • {@link com.fortemate.dicechess.bot.Main}: Application entry point. Configures port, loads secrets from env, * instantiates evaluator and strategy, and launches the HTTP webhook server.
  • - *
  • {@link dicechess.bot.Strategy}: Core functional interface for decision-making logic. + *
  • {@link com.fortemate.dicechess.bot.Strategy}: Core functional interface for decision-making logic. * Maps a {@link lv.id.jc.dicechess.runtime.TurnContext} to a list of long algebraic move notations.
  • - *
  • {@link dicechess.bot.OnnxStrategy}: Primary strategy implementation. Parses DFEN via + *
  • {@link com.fortemate.dicechess.bot.OnnxStrategy}: Primary strategy implementation. Parses DFEN via * {@link dicechess.engine.jvmapi.JvmApi}, expands full multi-move turns via {@link dicechess.engine.jvmapi.JvmApi#legalTurns}, - * and scores candidate positions using {@link dicechess.bot.OnnxEvaluator}.
  • - *
  • {@link dicechess.bot.OnnxEvaluator}: Manages ONNX Runtime sessions ({@code OrtSession}) to evaluate + * and scores candidate positions using {@link com.fortemate.dicechess.bot.OnnxEvaluator}.
  • + *
  • {@link com.fortemate.dicechess.bot.OnnxEvaluator}: Manages ONNX Runtime sessions ({@code OrtSession}) to evaluate * board positions via neural network models (e.g. {@code baseline.onnx}). Falls back gracefully * to {@link dicechess.engine.jvmapi.JvmApi#evaluate} engine heuristic evaluation if no model file is provided.
  • *
@@ -32,4 +32,4 @@ * @see lv.id.jc.dicechess.runtime.CustomHandlerServer * @see lv.id.jc.dicechess.runtime.WebhookHandler */ -package dicechess.bot; +package com.fortemate.dicechess.bot; diff --git a/src/test/java/dicechess/bot/OnnxStrategyTest.java b/src/test/java/com/fortemate/dicechess/bot/OnnxStrategyTest.java similarity index 98% rename from src/test/java/dicechess/bot/OnnxStrategyTest.java rename to src/test/java/com/fortemate/dicechess/bot/OnnxStrategyTest.java index cbbb97a..24408d6 100644 --- a/src/test/java/dicechess/bot/OnnxStrategyTest.java +++ b/src/test/java/com/fortemate/dicechess/bot/OnnxStrategyTest.java @@ -1,4 +1,4 @@ -package dicechess.bot; +package com.fortemate.dicechess.bot; import lv.id.jc.dicechess.runtime.TurnContext; import org.junit.jupiter.api.AfterEach; diff --git a/src/test/java/dicechess/bot/WebhookIntegrationTest.java b/src/test/java/com/fortemate/dicechess/bot/WebhookIntegrationTest.java similarity index 97% rename from src/test/java/dicechess/bot/WebhookIntegrationTest.java rename to src/test/java/com/fortemate/dicechess/bot/WebhookIntegrationTest.java index 03399cb..857c4ab 100644 --- a/src/test/java/dicechess/bot/WebhookIntegrationTest.java +++ b/src/test/java/com/fortemate/dicechess/bot/WebhookIntegrationTest.java @@ -1,4 +1,4 @@ -package dicechess.bot; +package com.fortemate.dicechess.bot; import com.sun.net.httpserver.HttpServer; import lv.id.jc.dicechess.runtime.CustomHandlerServer;