Canonical cross-service protocol for the XCore ecosystem.
xcore-protocol is the canonical source of truth for XCore cross-service communication.
It defines:
- message schemas
- envelope structure
- route and stream metadata
- versioning and compatibility rules
- canonical fixtures
- generation inputs and tooling
- generated Java and Python protocol DTO/model artifacts
- thin handwritten validation and repository-tooling support around generated artifacts
- cross-language compatibility tests
This repository contains only cross-process / cross-service wire protocol artifacts.
- event, command, and RPC contracts
- envelope definitions
- route metadata
- shared payload subtypes
- protocol fixtures and validation helpers
- generation configuration and generated Java/Python protocol artifacts
- application business logic
- Discord handlers or presentation code
- Mindustry runtime integration
- Mongo persistence
- app-specific reconnect/worker orchestration
docs/— ADRs, architecture notes, policies, migration notesspec/— protocol specs, shared types, envelopes, routes, generation inputsfixtures/— valid, invalid, and legacy examplesgenerators/— language generation config/templates/scriptsjava/— generated Java protocol artifacts for the canonical model surfacepython/— generated Python protocol package and thin helperscompat/— cross-language compatibility checksscripts/— validation and generation helper scripts
All planned message families are fully migrated and operational:
- Moderation — ban, mute, vote-kick, kick-banned, pardon, audit
- Discord — link-confirm, unlink, link-status, admin-access, link-code
- Maps — list request/response, remove request/response
- Chat/Heartbeat — chat messages, global chat, heartbeat, join/leave, server actions, player state commands
- Telemetry — Redis TTL snapshot payloads for Prometheus/Gateway telemetry aggregation
All canonical message families are defined with JSON Schema specs and canonical fixtures. Generated Java records (org.xcore.protocol.generated.*) and Python frozen dataclasses (xcore_protocol.generated.*) cover the supported generated protocol surface, including route-less telemetry snapshot payloads. XCore-plugin and XCore-discord-bot both consume generated artifacts as their sole transport model where applicable. Cross-language compatibility checks and full CI validation chain are in place.
Each vX.Y.Z tag publishes the same version of both supported artifacts:
- Java:
org.xcore:xcore-protocol-java:X.Y.Zfromhttps://maven.x-core.org/releases - Python:
xcore-protocol==X.Y.Zfrom PyPI
Production consumers must use an exact released version. Git revisions and -SNAPSHOT
versions are only acceptable while developing the protocol itself. The release workflow validates
schemas, generated output, Java tests, Python tests, and distributable packages before publishing.
Before the first PyPI release, configure the pypi GitHub environment as a PyPI Trusted Publisher
for this repository's Publish Release workflow. No Python package registry is self-hosted.
docs/adr/ADR-001-protocol-first.mddocs/architecture/protocol-overview.mddocs/policies/versioning.mddocs/policies/compatibility.md