Go ops tooling for the Sirens Eco community Discord: message dumps, normalization, and analysis pipelines.
  • Go 52.4%
  • HTML 34.8%
  • Shell 10.3%
  • Makefile 2.5%
Find a file
Kai Siren 63af3f850a
chore(pre-commit): adopt context-load-points hooks (v0.11.1)
Part of the agentic-os-kai#505 load-point framework rollout.

closes coilysiren/sirens-discord-ops#16

Audit-log: none
2026-05-30 10:12:59 -07:00
.agents/skills/sirens-discord-ops docs: add per-repo .agents pointer skill 2026-05-30 10:12:53 -07:00
.claude lockdown: sync to coily v2.45.0 [skip ci] 2026-05-28 09:28:25 +00:00
.coily chore(catalog): migrate dependsOn to scheme-less URLs, drop providesApis 2026-05-27 21:38:56 -07:00
assets chore: clear code-comments and documentation-layout pre-commit violations 2026-05-27 20:29:20 -07:00
cmd/sirens-discord-ops refactor: move sources into cmd/ + internal/bot/ 2026-05-03 18:52:37 -07:00
docs chore: clear code-comments and documentation-layout pre-commit violations 2026-05-27 20:29:20 -07:00
internal/bot chore: clear code-comments and documentation-layout pre-commit violations 2026-05-27 20:29:20 -07:00
scripts fix(start): coily SSM verb moved under 'ops' (coily v2.49) 2026-05-30 10:12:56 -07:00
sudoers remove auto-update timer + detached checkout, closes #22 2026-05-15 12:49:22 -07:00
systemd remove auto-update timer + detached checkout, closes #22 2026-05-15 12:49:22 -07:00
.gitattributes gitattributes: force LF on scripts/units (kai-server CRLF blowup) 2026-05-03 20:47:36 -07:00
.gitignore Gitignore .DS_Store 2026-05-08 01:54:19 -07:00
.pre-commit-config.yaml chore(pre-commit): adopt context-load-points hooks (v0.11.1) 2026-05-30 10:12:59 -07:00
AGENTS.md chore: clear code-comments and documentation-layout pre-commit violations 2026-05-27 20:29:20 -07:00
CLAUDE.md chore(pre-commit): adopt context-load-points hook (v0.10.0) 2026-05-30 10:12:57 -07:00
go.mod build(deps): bump the go_modules group across 1 directory with 2 updates 2026-05-04 01:52:25 +00:00
go.sum build(deps): bump the go_modules group across 1 directory with 2 updates 2026-05-04 01:52:25 +00:00
LICENSE v1: eco admin control panel 2026-05-03 18:50:30 -07:00
Makefile lint: annotate Makefile targets for coily lint 2026-05-11 19:41:57 -07:00
README.md chore: complete trifecta + re-enable catalog-doc-size + catalog-trifecta 2026-05-15 23:44:59 -07:00

sirens-discord-ops

Discord-native admin control panel for the Sirens game servers. v1 wires up eco; the per-game registration shape leaves room for factorio and friends.

What it does

The bot pins one message per game in #admin-control with one button per verb. Pressing a button shells out to coily gaming <game> <verb> on kai-server and posts the start + completion lines to #admin-audit, verbatim coily output included. Coily is the API. The bot has no awareness of how coily implements those verbs.

v1 ships with eco only:

  • Restart
  • Status
  • Stop
  • Start

Auth

Every button press checks the actor's role membership against ADMIN_ROLE_ID. No per-verb gating in v1. Non-admins get an ephemeral "not authorized" and no audit-channel write.

Concurrency

If two admins press Restart at once, both invocations run. Coily's underlying behavior is the safety net. Documented as known-acceptable.

Configuration

Required env vars live in SSM under /sirens-discord-ops/: DISCORD_TOKEN, ADMIN_CHANNEL_ID, AUDIT_CHANNEL_ID, ADMIN_ROLE_ID. Optional COILY_BIN overrides the coily binary path (defaults to PATH lookup). scripts/start.sh fetches them at exec time.

Local development

Point at Sirens Echo (the test server), export the four env vars, and run:

make run

The bot will post a pinned control panel in the configured admin channel on first connect. Subsequent runs reuse and edit the existing pinned message in place, so the verb list stays current without duplicate panels.

Production deploy

Native systemd unit on kai-server (not k3s), runs as kai. ExecStart points at scripts/start.sh: fetch origin/main, fast-forward, rebuild in place, pull SSM env at exec time, exec the binary. Deploys are manual: after git push, ssh kai@kai-server sudo systemctl restart sirens-discord-ops.

One-time bootstrap on kai-server: clone, then bash scripts/install.sh. The script drops unit + sudoers, daemon-reloads, enables the service. Re-run only when unit/sudoers change. Code flows through manual restart, not install.

Adding a new game

Edit internal/bot/games.go, append a Game{} entry, redeploy. The bot will post a new pinned panel for the new game on next start. Channels and admin role stay the same. Per-game verb lists keep new games from being locked into eco's exact four-verb mold.

Out of scope (v1)

Anything outside coily gaming eco {restart,status,stop,start}: mod install/uninstall, save backup/restore, log tailing, in-game player count, version pinning, whitelist edits. Anything beyond eco. Concurrency protection. Tighter coily integration (in-process call instead of exec.Command). Web UI, mobile, REST API, observability dashboards.

See also

Cross-reference convention from coilysiren/agentic-os#59.