Installation, Builds & Spin Packaging
Elthoria keeps its reusable libraries, MCP launcher, and distribution packaging in elthoria-harness, separate from the Spring Boot game application (elthoria-game) and the upstream Kompile runtime.
Repository architecture & boundary
| Repository | Owns | Artifacts |
|---|---|---|
elthoria-harness | Domain & rules engine, gameplay/scene/world-sim runtimes, authoring/content/PDF/map-DSL libraries, MCP server core & GM tools, elthoria launcher, and zero-Angular frontend SDKs & web play panels (frontend/) | org.example:elthoria-bom, elthoria-mcp-server, elthoria-*, @elthoria/* |
elthoria-game | Spring Boot host application, JPA persistence, REST/MCP host wiring (ElthoriaMcpProviders), and optional Angular UI panels | org.example:campaign-builder (retained artifact coordinate) |
Upstream kompile | Native CLI/Web harness, auth/model routing, Enforcer/Judge, subagents, local ML runtime, crawl/RAG/graph engine | ~/.kompile/bin/kompile (Kompile Installation ↗) |
Building from source
1. Build harness libraries and standalone launcher (no game checkout needed)
# Install all elthoria-* harness libraries to your local Maven repository
mvn -DskipTests install
# Focused unit tests (no model serving or application startup)
mvn -pl elthoria-domain,elthoria-integrations,elthoria-rules-engine -am test
# Build the standalone MCP launcher module
./mvnw -pl elthoria-mcp-server -am package2. Compose the full headless distribution (-Delthoria.dist)
To compose the runnable bin/ + lib/ distribution containing both lib/elthoria-mcp-server.jar and lib/elthoria-app.jar:
# Step A: Install the harness artifacts
mvn -DskipTests install
# Step B: Build and install the game application artifact from its own checkout
mvn -f /path/to/elthoria-game/pom.xml -Delthoria.dist -DskipTests install
# Step C: Compose the headless distribution under elthoria-mcp-server/target/elthoria/
./mvnw -pl elthoria-mcp-server -am package -Delthoria.dist -DskipTestsIf the game artifact version differs from 1.0-SNAPSHOT, pass -Delthoria.game.version=<version> during Maven composition and ELTHORIA_GAME_VERSION=<version> when invoking the source launcher.
3. Optional: include compiled web play panels (-Delthoria.web)
Headless builds never require Node or Angular. You can now build the self-contained, zero-Angular elthoria-play-panels bundle (Tactical Board, Hex Board tab, and World Inspection) directly inside elthoria-harness and stage it into the distribution:
npm --prefix frontend install
npm --prefix frontend run build
mvn -nsu -pl elthoria-mcp-server -am package -Delthoria.dist -Delthoria.web \
-Delthoria.game.web.dir="$(pwd)/frontend/apps/elthoria-play-panels/dist"4. Frontend SDKs, browser apps & integration runtime
The frontend/ workspace builds all seven framework-neutral board and world-simulation SDKs (@elthoria/hex-board, @elthoria/hex-board-view, @elthoria/tactical-grid, @elthoria/tactical-grid-view, @elthoria/world-travel, @elthoria/world-simulation-api, @elthoria/world-simulation-http) plus elthoria-play-panels and hex-board-host:
npm --prefix frontend install
npm --prefix frontend test@elthoria/integration-runtime continues to build and test independently under frontend/packages/integration-runtime:
npm --prefix frontend/packages/integration-runtime ci
npm --prefix frontend/packages/integration-runtime test5. One-command install & self-contained distribution (install.sh / ./build-dist.sh any)
Install the latest verified release directly into ~/.elthoria (bundles Kompile CLI + Web Chat, Elthoria MCP server, GM role & skills, and zero-Angular Tactical/Hex/World web panels):
# macOS & Linux
curl -fsSL https://raw.githubusercontent.com/elthoria-ai/elthoria-harness/main/install.sh | bash
# Pin a specific version or release channel:
curl -fsSL https://raw.githubusercontent.com/elthoria-ai/elthoria-harness/main/install.sh | bash -s -- --version 0.1.1
curl -fsSL https://raw.githubusercontent.com/elthoria-ai/elthoria-harness/main/install.sh | bash -s -- --channel prerelease# Windows (PowerShell)
irm https://raw.githubusercontent.com/elthoria-ai/elthoria-harness/main/install.ps1 | iexTo build the same self-contained elthoria-harness-<version>-any.zip archive locally from source in one command:
./build-dist.sh anyPushing a v* tag (or dispatching .github/workflows/release.yml) automatically runs .github/workflows/build-java-distributions.yml, verifies checksums and archive integrity, and publishes elthoria-harness-<version>-any.zip, elthoria-harness-any.zip, elthoria-play-panels.zip, elthoria-mcp-server.jar, jbang-catalog.json, and .sha256 files to GitHub Releases.
Installing into ~/.elthoria
./elthoria-mcp-server/install.sh
# Or explicitly from a composed distribution directory:
elthoria-mcp-server/target/elthoria/install.sh elthoria-mcp-server/target/elthoriaThe installer:
- Stores versioned releases under
${ELTHORIA_INSTALL_DIR:-~/.elthoria}/components/elthoria/ - Atomically publishes
${ELTHORIA_INSTALL_DIR:-~/.elthoria}/bin/elthoria - Keeps
~/.kompilecompletely untouched (setKOMPILE_INSTALL_DIRonly to select which existing Kompile runtime to reuse)
Verify the installation:
~/.elthoria/bin/elthoria doctorFull self-contained .kspin distribution (elthoria spin build)
For offline or turnkey deployments that bundle the full Kompile runtime, bundled Java, both Elthoria JARs, web policy, panels, skills, and the elthoria-gm role into a single checksum-verified archive, use Kompile's spin lifecycle (Upstream Kompile Spins ↗):
elthoria-mcp-server/elthoria spin build \
--runtime-dir /releases/kompile-full \
--output /releases/elthoria-1.0.kspin
# Optionally include curated models/pipelines/workflows from a clean authoring project:
elthoria-mcp-server/elthoria spin build \
--runtime-dir /releases/kompile-full \
--project-dir /authoring/elthoria-project \
--output /releases/elthoria-curated.kspinInstall the resulting .kspin into a fresh product home (do not overwrite a legacy sidecar ~/.elthoria install):
kompile spin install /releases/elthoria-1.0.kspin --home ~/.elthoria-spin
~/.elthoria-spin/bin/elthoria webWARNING
Never package live campaign data or credentials. Live campaign workspaces, H2 databases, user caches, and provider credentials are rejected as spin packaging inputs. Keep --signing-key outside the source tree.
Connecting external MCP clients
You can connect any MCP-capable harness directly to elthoria server.
Claude Desktop / .mcp.json (stdio)
{
"mcpServers": {
"elthoria": {
"command": "elthoria",
"args": ["server", "--transport", "stdio", "--port", "0"]
}
}
}Codex CLI & Gemini / Antigravity (shared localhost SSE)
Start one localhost server:
~/.elthoria/bin/elthoria server --transport sse --port 8083 --server.address=127.0.0.1Then register the exact /mcp/sse endpoint (note: not /sse):
# Codex CLI
codex mcp add elthoria --url http://127.0.0.1:8083/mcp/sse
# Gemini CLI
gemini mcp add elthoria http://127.0.0.1:8083/mcp/ssePolling startup readiness cleanly (--ready-file)
Because JPA initialization takes a few seconds, automated harnesses should pass --ready-file instead of sleeping for an arbitrary timeout:
~/.elthoria/bin/elthoria server --transport stdio --port 0 \
--ready-file /tmp/elthoria-mcp.readyMcpReadyFileListener writes the file on ApplicationReadyEvent after every tool, resource, and prompt provider has registered. For isolated ephemeral test runs, add --spring.datasource.url=jdbc:h2:mem:<unique-id>;DB_CLOSE_DELAY=-1.
Persistence, backups & data hygiene
- Keep
ELTHORIA_DATA_DIRandELTHORIA_RUNTIME_DIRoutside any Git checkout (defaults live under~/.elthoria/). - Stop the server before taking filesystem-level H2 backups so
.mv.dbfiles stay consistent. - Never commit
.mv.db,.trace.db, SQL dumps, WAL archives, crawl artifacts, graph snapshots, or private rulebook PDFs to source control. - Validate release hygiene from the repository root with:
python3 tools/release/test_check_release.py -v
python3 tools/release/check_release.py --root . --manifest release/manifest.json --json