Geodineum-COMMS

Geodineum

Geodineum-COMMS

The notification daemon of a Geodineum Constellation: it consumes per-site message streams from ValKey and dispatches them to email, Telegram, and SMS, archiving every message to SQLite.

Built by Niels Erik Toren · Rust daemon, crate geodineum-comms (see Cargo.toml for the version)


What it is

Geodineum-COMMS is a stateless tokio daemon and the companion of gNode - both talk to the same ValKey instance (port 47445) under separate ACL users. Services never call it directly: they XADD a message onto their site's comms stream, and the daemon consumes it, routes it to the enabled channels, and writes a durable record to a per-site SQLite archive.

It holds no message state of its own. A ValKey stream entry is acknowledged only after its SQLite archive commits, so a restart resumes cleanly from the last acknowledgement and nothing in flight is lost. The operator view lives in the Constellation's wp-admin (Geodineum → Comms), not in this daemon.

Public build surface

You integrate with COMMS by producing a message, not by calling an API. The supported surface is the comms message wire format - the fields you XADD onto {site_id}:gnode:comms:{env}. Any language that can write a ValKey stream entry can drive it; the exact field table (scalars plus the JSON-string sender / content / metadata / dispatch fields) is in CONTRACT.md, its single home.

Most producers never assemble the fields by hand - the gNode-Client library (queueCommsMessage / queueContactForm) emits exactly this shape from PHP.

Capabilities

Contract

The precise integration surface - every wire field, the stream and settings-key layout, the DTAP send gate, the SQLite schema, and the public Rust types - is in CONTRACT.md. Agents should prime from CONTRACT.scn.md. Print it on a host any time with geodineum comms contract.

Quick start

The Geodineum installer builds the binary, provisions the ACL user, and installs the service; these commands assume a running daemon.

// Produce a message the way most callers do - via gNode-Client, which emits the
// exact comms wire shape and injects the site's credentials.
use gCore\gNode\gNodeClient;

$client = gNodeClient::forSite('mysite', 'production');
$client->queueContactForm('Jane Doe', 'jane@example.com', 'Hello', 'Interested in a demo.');
# The daemon consumes, dispatches, and archives it. Inspect the result:
systemctl status geodineum-comms
geodineum-comms messages --site-id mysite --limit 5   # the archived message + its status
geodineum comms status                                # daemon state + per-stream counts

To produce the message without PHP, XADD it directly. The braces are a literal ValKey cluster hash-tag - write {mysite}, not mysite:

# Authenticate as the producing site's ACL user (the same credential gNode-Client uses).
AUTH="$(sudo cat /etc/geodineum/credentials/mysite.password)"
REDISCLI_AUTH="$AUTH" redis-cli -p 47445 XADD '{mysite}:gnode:comms:production' '*' \
    id "$(uuidgen)" type contact timestamp "$(date -Iseconds)" \
    environment production priority 3 \
    content  '{"subject":"New contact","body":"Interested in a demo."}' \
    dispatch '{"channels":["email"],"status":"pending","attempts":0}'

The full field table and every optional field are in CONTRACT.md.

Limits worth knowing

Collaborate

Contributions are welcome. Open issues and pick up work on the ecosystem board at geodineum.com; issues tagged good-first-issue are a good place to start.

Author & support

Built by Niels Erik Toren.

If you want to support the work:

Currency Address
Bitcoin (BTC) bc1qwf78fjgapt2gcts4mwf3gnfkclvqgtlg4gpu4d
Ethereum (ETH) 0xf38b517Dd2005d93E0BDc1e9807665074c5eC731 / nierto.eth
Monero (XMR) 8BPaSoq1pEJH4LgbGNQ92kFJA3oi2frE4igHvdP9Lz2giwhFo2VnNvGT8XABYasjtoVY2Qb3LVHv6CP3qwcJ8UnyRtjWRZ5

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied. Use of this software is entirely at your own risk. In no event shall the author or contributors be held liable for any damages arising from the use or inability to use this software.

License

Licensed under either of

at your option.