Cerial Master Client is the ActivityMaster FSDM open-source library that orchestrates scheduled COM port messaging, telemetry, and GuicedEE service hooks for the Cerial Master addon. It ships as a Java 25 client-facing module with Mutiny-based status streams, CRTP-heavy DTOs, and TypeScript generation support so downstream Angular/TypeScript consumers can remain in sync with the stage-gated architecture.
- Reliable COM-port messaging with retry/backoff and progress snapshots
- Pause/resume/cancel controls and group/batch processing
- Reactive telemetry streams (Mutiny Uni/Multi) for status and events
- GuicedEE DI integration and lifecycle hooks for clean boot/shutdown
- DTO mapping and optional TypeScript client generation alignment
- JPMS-friendly module with ServiceLoader discovery
Add the dependency to your Maven project. Versions are managed by the parent/BOM.
<dependency>
<groupId>com.activity-master</groupId>
<artifactId>cerial-master-client</artifactId>
</dependency>- Add the dependency above to your host application.
- Copy
.env.exampleto.envand provide required values. - Build and run tests locally:
mvn -B clean verify- Wire the client into your GuicedEE bootstrap, then publish commands and subscribe to telemetry streams.
Environment variables follow the Rules Repository guidance (rules/generative/platform/secrets-config/env-variables.md). Cerial-specific keys are documented under rules/generative/data/activity-master/cerial-client/. Typical examples you may encounter:
- CERIAL_ENABLED=true|false
- CERIAL_PORT, CERIAL_BAUD, CERIAL_DATA_BITS, CERIAL_STOP_BITS, CERIAL_PARITY
- CERIAL_GROUP_SIZE, CERIAL_RETRY_DELAY_MS, CERIAL_MAX_RETRIES
- LOG_LEVEL, TRACING_ENABLED
Treat the above as examples; consult the rules index for the authoritative list and semantics. Keep secrets and machine-specific values out of VCS. Use .env locally and GitHub Action secrets in CI.
- JPMS-ready; services and configurators use
ServiceLoaderfor discovery. - Ensure your host module declares the appropriate
uses/provideswhere applicable.
- Intent: Deliver reliable, retry-aware COM port messaging with progress snapshots, group processing, and cancellation/pause control.
- Tech stack: Java 25 LTS, GuicedEE client services, Vert.x reactive telemetry, Lombok + JSpecify, Log4j2 logging, MapStruct 6, Mutiny Multi/Uni flows, and the ActivityMaster client domain vocabulary.
- Guidance: All conventions flow from the Rules Repository submodule (
rules/)—specificallyrules/generative/data/activity-master/cerial-client—and the host artifacts that close the PACT ⇄ RULES ⇄ GUIDES ⇄ IMPLEMENTATION loop.
- Clone, then initialize the Rules Repository submodule that provides the shared policies:
git submodule update --init --recursive rules
- Review
PACT.mdto understand the stage-gated collaboration rules and blanket approval status before modifying any docs or code. - Follow the anchor docs (PACT, RULES, GUIDES, GLOSSARY, IMPLEMENTATION) and the architecture diagrams in
docs/architecture/before coding; the Document Modularity policy requires you to link to these artifacts whenever you add new guidance. - Use
.env.exampleto mirror the production variable names defined inrules/generative/platform/secrets-config/env-variables.mdand keep secrets (such asOAUTH2_CLIENT_SECRETorDB_PASS) out of version control.
- PACT.md: human/AI collaboration, stage approval summary, and roadmap that confirm blanket approval for this run.
- RULES.md: project scope, stack selections (Java 25, CRTP, GuicedEE client), and forward-only commitments linking back to topic indexes.
- GUIDES.md: how to apply the rules when sending messages, configuring telemetry, and keeping TypeScript bridges aligned.
- GLOSSARY.md: topic-first glossary with precedence links to the submodule’s canonical definitions.
- IMPLEMENTATION.md: current layout, architecture wiring, testing expectations, and the Stage 3 implementation roadmap for future work.
- docs/PROMPT_REFERENCE.md: quick reference for selected stacks, active diagrams, MCP servers, and prompt rules for future AI runs.
- Architecture diagrams live in
docs/architecture/(context/container/component C4 plus dependency map, sequence flows, and the messaging ERD) and are indexed bydocs/architecture/README.md.
- Use
rules/generative/data/activity-master/cerial-client/README.mdas the topic index before prompting or coding; follow its modular links for lifecycle, configuration, telemetry, integration, and testing guidance. When working with the core Activity Master client library (not the Cerial addon), userules/generative/data/activity-master/client/README.md. - Keep host docs (PACT, RULES, GUIDES, IMPLEMENTATION, GLOSSARY, docs/architecture) outside the
rules/submodule and update them together to honor the forward-only policy. - Load
.mcp.jsonso the Mermaid MCP server is available when editing diagrams; align terminology with the topic glossary before adding new docs or APIs.
- GitHub: https://github.com/Activity-Master/CerialMasterClient
- Organization: ActivityMaster / Cerial Client
- Stage 1 architecture artifacts (C4 diagrams, sequences, ERD) are committed under
docs/architecture/. Stage 2 docs (PACT, RULES, GUIDES, GLOSSARY, IMPLEMENTATION) close the documentation loop, while Stage 3 now outlines the implementation roadmap still to be executed. - Refer to
docs/architecture/README.mdfor the diagram index andIMPLEMENTATION.mdfor descriptions of the send engine, registry, telemetry streams, and test wiring.
.env.examplereflects the variables recommended byrules/generative/platform/secrets-config/env-variables.md(service identity, tracing toggles, database credentials, and testing overrides).- CI runs via the shared GuicedEE reusable GitHub Actions job (
.github/workflows/ci.yml), which expects secrets such asUSERNAME,USER_TOKEN,SONA_USERNAME, andSONA_PASSWORD. - Coverage and harness expectations derive from
rules/generative/platform/testing/jacoco.rules.mdandrules/generative/platform/testing/java-micro-harness.rules.md.
- Verify the serial device path and permissions on your host OS; confirm
.envvalues are loaded. - Start with conservative retry/backoff to avoid device saturation; tune with telemetry feedback.
- Initialize the
rules/submodule if you need to browse referenced documentation.
- Issues: https://github.com/Activity-Master/CerialMasterClient/issues
- Pull Requests: https://github.com/Activity-Master/CerialMasterClient/pulls
- Please read
PACT.mdandRULES.mdbefore contributing; follow the forward-only Documentation-as-Code policy.
- Treat the Rules Repository as authoritative: link to
rules/paths for stacks, do not duplicate definitions, and keep all new documentation modular (no new monoliths or archived anchors). - Keep project-specific docs outside
rules/. If you must update the submodule, rungit submodule update --remote rules, verify the new pointer, and commit the change separately. - Respect the forward-only policy: do not leave behind legacy docs/anchors; remove or replace them when you evolve the architecture.
- Before Stage 4 code changes, revisit
IMPLEMENTATION.mdanddocs/architecture/to verify that implementation work stays traceable to the documented plan.
- Apache 2.0 (inherited from the parent
activitymaster-groupproject and consistent with the rules repository adoption).