No description
  • Go 52.9%
  • HTML 32.4%
  • Shell 12.4%
  • Makefile 2.3%
Find a file
2026-05-16 15:44:38 -07:00
.claude chore(lockdown): adopt agent-guard pre-tool-use delegate 2026-05-16 14:00:13 -07:00
.coily rename: update cross-repo refs after coilyco-ai to agentic-os-kai 2026-05-15 02:31:05 -07:00
assets assets: add LCARS-style repo banner 2026-05-03 20:08:59 -07:00
cmd/sirens-discord-ops refactor: move sources into cmd/ + internal/bot/ 2026-05-03 18:52:37 -07:00
docs chore: complete trifecta + re-enable catalog-doc-size + catalog-trifecta 2026-05-15 23:44:59 -07:00
internal/bot panel: drop status from the confirm set 2026-05-04 19:33:05 -07:00
scripts chore: adopt coilysiren/agentic-os v0.2.1 upstream-ref pre-commit suite 2026-05-15 23:34:39 -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: complete trifecta + re-enable catalog-doc-size + catalog-trifecta 2026-05-15 23:44:59 -07:00
AGENTS.md chore: complete trifecta + re-enable catalog-doc-size + catalog-trifecta 2026-05-15 23:44:59 -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.