diff --git a/CHANGELOG.md b/CHANGELOG.md index 530b35e..567b73b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # Changelog +## 0.1.2 (2026-09-23) + +- The stream is `mail`, not shouted; matches portal 0.3.44. The unit runs the packaged binary at /usr/bin/gdo. + ## 0.1.1 (2026-09-23) - Packaged: `pacman -S gdo` from the [uhhm] registry on project.uhhm.no (x86_64 and aarch64, built by the release workflow from the tagged checkout); the unit and `/etc/gdo/env` ship in the package, and the installer script is gone. ## 0.1.0 (2026-09-23) -- First release: a durable consumer `gdo` on the `WORMHOLE` stream (`portal.mail.>`), each message handed to the host's SMTP as text with an HTML alternative, acked on acceptance and retried after a minute otherwise; `gdo probe
` sends one message through and reports when it was delivered; an optional Typst theme (`GDO_TYPST_THEME`) renders a PDF of every mail and attaches it. +- First release: a durable consumer `gdo` on the `mail` stream (`portal.mail.>`), each message handed to the host's SMTP as text with an HTML alternative, acked on acceptance and retried after a minute otherwise; `gdo probe ` sends one message through and reports when it was delivered; an optional Typst theme (`GDO_TYPST_THEME`) renders a PDF of every mail and attaches it. diff --git a/Cargo.lock b/Cargo.lock index bb4827f..a94ed2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -411,7 +411,7 @@ dependencies = [ [[package]] name = "gdo" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "async-nats", diff --git a/Cargo.toml b/Cargo.toml index 8ae9b27..153d628 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gdo" -version = "0.1.1" +version = "0.1.2" edition = "2021" description = "Sends the code that opens the iris: delivers portal's outgoing mail from JetStream to the host's SMTP" license = "MIT" diff --git a/PKGBUILD b/PKGBUILD index da178d5..a6dc04a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,8 +4,8 @@ # project.uhhm.no (namespace bl). pkgver is the version; the tag has # to agree with it. pkgname=gdo -pkgver=0.1.1 -pkgrel=2 +pkgver=0.1.2 +pkgrel=1 pkgdesc="Sends the code that opens the iris: delivers portal's outgoing mail from JetStream to the host's SMTP" arch=('x86_64' 'aarch64') url="https://project.uhhm.no/uhhm/gdo" diff --git a/README.md b/README.md index 9e2771a..90a1dcb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ site's content says to send. Portal decides *when* a person hears something and renders the mail: `mail:` on a state in `aggregates.yaml` sends when a record enters that state, and an invite mails its one-time link built in. It -publishes each rendered mail on `portal.mail.send` in the `WORMHOLE` +publishes each rendered mail on `portal.mail.send` in the `mail` JetStream stream. gdo holds a durable consumer there and hands each message to the host's SMTP. Portal never talks SMTP; gdo never reads content; a message survives either of them being down, because the diff --git a/deploy/gdo.service b/deploy/gdo.service index 4342407..b994907 100644 --- a/deploy/gdo.service +++ b/deploy/gdo.service @@ -1,5 +1,5 @@ # One per host, not per site: every portal instance on the host -# publishes to the same WORMHOLE stream, and each message carries its +# publishes to the same mail stream, and each message carries its # own sender. Installed by the gdo package (pacman -S gdo). [Unit] Description=gdo - delivers portal's outgoing mail to the host's SMTP diff --git a/src/main.rs b/src/main.rs index a08008f..602f01c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ //! gdo - the transmitter that sends the code through the gate so the //! iris opens. Portal (uhhm/portal) decides when a person hears //! something and renders the mail; gdo holds a durable consumer on -//! the `WORMHOLE` stream and hands each message to the host's SMTP. +//! the `mail` stream and hands each message to the host's SMTP. //! No site knowledge, no state of its own: if it dies, the stream //! keeps the mail until it is back. //! @@ -22,7 +22,7 @@ use std::time::Duration; /// Portal's side of this contract is `portal::mail`. Same names, same /// stream config, so whichever boots first creates it. -const STREAM: &str = "WORMHOLE"; +const STREAM: &str = "mail"; const SUBJECTS: &str = "portal.mail.>"; const SUBJECT: &str = "portal.mail.send"; const CONTRACT: u8 = 1; @@ -255,7 +255,7 @@ async fn probe(cfg: Config, to: &str, from: &str) -> anyhow::Result<()> { let mut headers = async_nats::HeaderMap::new(); headers.insert("Nats-Msg-Id", id.as_str()); js.publish_with_headers(SUBJECT, headers, serde_json::to_vec(&mail)?.into()).await?.await?; - println!("sent {id} into {STREAM}"); + println!("sent {id} into stream {STREAM}"); let deadline = tokio::time::Instant::now() + Duration::from_secs(60); loop { let Ok(mut consumer) = stream.get_consumer::