fix: include messaging dependency group in default Hermes build #3

Merged
sscoble merged 8 commits from fix/add-discord-py into main 2026-05-15 01:51:48 +00:00
Contributor

What this fixes

Adds discord.py, python-telegram-bot, slack-bolt, and other messaging platform libraries to the default Hermes derivation. Also adds a docker-image OCI image target for k3s deployment.

Fixes https://os.scoble.me/forgejo/sscoble/hermes-speckl/issues/2

Problem

The [all] extras group in upstream hermes-agent (NousResearch) stopped including the messaging dependency group on 2026-05-12 — it switched to lazy-install at runtime. But our Nix-built container images running on k3s have no pip available, so lazy installation fails.

Agent logs show:

WARNING gateway.run: Discord: discord.py not installed
WARNING gateway.run: No adapter available for discord

Changes

  • Added extraDependencyGroups = ["messaging"] override on the hermes-agent derivation
  • Added docker-image OCI image target built with dockerTools.buildLayeredImage
  • Fixed scoping: forAllSystems moved into let...in binding for flake-parts compatibility
  • Added flake.lock (previously missing)

After Merge

  1. Build the OCI image:
    nix build .#docker-image
    
  2. Import into containerd:
    sudo ctr -n k8s.io images import result
    sudo ctr -n k8s.io images tag --force hermes-speckl/sme:latest docker.io/hermes-speckl/sme:latest
    
  3. Restart the demo concierge:
    kubectl delete pod -n cust-demo -l agent=concierge
    
  4. Verify:
    kubectl logs -n cust-demo -l agent=concierge --tail=5
    # Should show Discord connected, not "discord.py not installed"
    

Verified: The image builds successfully and includes discord.py==2.7.1, python-telegram-bot==22.6, and slack-bolt==1.27.0. Image imported to containerd and ready for deployment.

## What this fixes Adds `discord.py`, `python-telegram-bot`, `slack-bolt`, and other messaging platform libraries to the default Hermes derivation. Also adds a `docker-image` OCI image target for k3s deployment. Fixes https://os.scoble.me/forgejo/sscoble/hermes-speckl/issues/2 ## Problem The `[all]` extras group in upstream hermes-agent (NousResearch) stopped including the `messaging` dependency group on 2026-05-12 — it switched to lazy-install at runtime. But our Nix-built container images running on k3s have no `pip` available, so lazy installation fails. Agent logs show: ``` WARNING gateway.run: Discord: discord.py not installed WARNING gateway.run: No adapter available for discord ``` ## Changes - Added `extraDependencyGroups = ["messaging"]` override on the hermes-agent derivation - Added `docker-image` OCI image target built with `dockerTools.buildLayeredImage` - Fixed scoping: `forAllSystems` moved into `let...in` binding for flake-parts compatibility - Added `flake.lock` (previously missing) ## After Merge 1. Build the OCI image: ``` nix build .#docker-image ``` 2. Import into containerd: ``` sudo ctr -n k8s.io images import result sudo ctr -n k8s.io images tag --force hermes-speckl/sme:latest docker.io/hermes-speckl/sme:latest ``` 3. Restart the demo concierge: ``` kubectl delete pod -n cust-demo -l agent=concierge ``` 4. Verify: ``` kubectl logs -n cust-demo -l agent=concierge --tail=5 # Should show Discord connected, not "discord.py not installed" ``` **Verified:** The image builds successfully and includes `discord.py==2.7.1`, `python-telegram-bot==22.6`, and `slack-bolt==1.27.0`. Image imported to containerd and ready for deployment.
agent-engineering added 1 commit 2026-05-14 23:06:12 +00:00
Adds discord.py, python-telegram-bot, slack-bolt, and other messaging
platform libraries to the default Hermes derivation. This is required
for Discord/Slack/Telegram channel integration in k3s-deployed agents.

The [all] extras group stopped including messaging on 2026-05-12
(switched to lazy-install), but our Nix-built container images have
no pip available for runtime lazy installation.

Closes #2
sscoble added 1 commit 2026-05-15 01:34:43 +00:00
sscoble added 1 commit 2026-05-15 01:35:03 +00:00
sscoble added 1 commit 2026-05-15 01:35:48 +00:00
sscoble added 2 commits 2026-05-15 01:39:25 +00:00
sscoble added 1 commit 2026-05-15 01:40:54 +00:00
sscoble requested changes 2026-05-15 01:48:26 +00:00
Dismissed
result Outdated
@ -0,0 +1 @@
/nix/store/wmr5qjizys6dsbsrgvydc0c7ijx4inra-hermes-agent-0.13.0
Owner

this should be .gitignored

this should be .gitignored
sscoble added 1 commit 2026-05-15 01:49:53 +00:00
First-time contributor

Changes requested → addressed:

  1. Removed committed build artifact (result symlink)
  2. Updated PR description with correct build command (nix build .#docker-image not .#default)
  3. Added flake.lock to the repo (was previously missing, causing eval issues)
  4. Fixed forAllSystems scoping — moved into let...in binding for flake-parts compatibility

The image has been verified: builds successfully, discord.py/slack-bolt/telegram-bot all import cleanly. Image imported to containerd and ready for deployment once merged.

Changes requested → addressed: 1. Removed committed build artifact (`result` symlink) 2. Updated PR description with correct build command (`nix build .#docker-image` not `.#default`) 3. Added `flake.lock` to the repo (was previously missing, causing eval issues) 4. Fixed `forAllSystems` scoping — moved into `let...in` binding for flake-parts compatibility The image has been verified: builds successfully, discord.py/slack-bolt/telegram-bot all import cleanly. Image imported to containerd and ready for deployment once merged.
sscoble approved these changes 2026-05-15 01:51:42 +00:00
sscoble merged commit f9071e6f49 into main 2026-05-15 01:51:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sscoble/hermes-speckl#3
No description provided.