Skip to content

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 ​

RepositoryOwnsArtifacts
elthoria-harnessDomain & 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-gameSpring Boot host application, JPA persistence, REST/MCP host wiring (ElthoriaMcpProviders), and optional Angular UI panelsorg.example:campaign-builder (retained artifact coordinate)
Upstream kompileNative 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) ​

bash
# 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 package

2. 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:

bash
# 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 -DskipTests

If 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:

bash
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:

bash
npm --prefix frontend install
npm --prefix frontend test

@elthoria/integration-runtime continues to build and test independently under frontend/packages/integration-runtime:

bash
npm --prefix frontend/packages/integration-runtime ci
npm --prefix frontend/packages/integration-runtime test

5. 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):

bash
# 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
powershell
# Windows (PowerShell)
irm https://raw.githubusercontent.com/elthoria-ai/elthoria-harness/main/install.ps1 | iex

To build the same self-contained elthoria-harness-<version>-any.zip archive locally from source in one command:

bash
./build-dist.sh any

Pushing 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 ​

bash
./elthoria-mcp-server/install.sh
# Or explicitly from a composed distribution directory:
elthoria-mcp-server/target/elthoria/install.sh elthoria-mcp-server/target/elthoria

The installer:

  • Stores versioned releases under ${ELTHORIA_INSTALL_DIR:-~/.elthoria}/components/elthoria/
  • Atomically publishes ${ELTHORIA_INSTALL_DIR:-~/.elthoria}/bin/elthoria
  • Keeps ~/.kompile completely untouched (set KOMPILE_INSTALL_DIR only to select which existing Kompile runtime to reuse)

Verify the installation:

bash
~/.elthoria/bin/elthoria doctor

Full 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 ↗):

bash
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.kspin

Install the resulting .kspin into a fresh product home (do not overwrite a legacy sidecar ~/.elthoria install):

bash
kompile spin install /releases/elthoria-1.0.kspin --home ~/.elthoria-spin
~/.elthoria-spin/bin/elthoria web

WARNING

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) ​

json
{
  "mcpServers": {
    "elthoria": {
      "command": "elthoria",
      "args": ["server", "--transport", "stdio", "--port", "0"]
    }
  }
}

Codex CLI & Gemini / Antigravity (shared localhost SSE) ​

Start one localhost server:

bash
~/.elthoria/bin/elthoria server --transport sse --port 8083 --server.address=127.0.0.1

Then register the exact /mcp/sse endpoint (note: not /sse):

bash
# 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/sse

Polling 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:

bash
~/.elthoria/bin/elthoria server --transport stdio --port 0 \
  --ready-file /tmp/elthoria-mcp.ready

McpReadyFileListener 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_DIR and ELTHORIA_RUNTIME_DIR outside any Git checkout (defaults live under ~/.elthoria/).
  • Stop the server before taking filesystem-level H2 backups so .mv.db files 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:
bash
python3 tools/release/test_check_release.py -v
python3 tools/release/check_release.py --root . --manifest release/manifest.json --json

Built on the upstream Kompile harness. Released under the MIT License.