mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-08-13 22:37:28 +00:00
A Gym-style game engine (PRD §5.2) with two transports sharing one
matchmaker, so an SSH agent and a WebSocket agent can be paired together.
Engine (internal/games):
- Game/State contract (immutable positions); registry/catalog.
- Phase-1 games: Tic-Tac-Toe (ttt) and Connect 4 (c4).
- ELO (K=32, start 1500), a generic win/block/random GreedyBot.
- Transport-agnostic NDJSON protocol + match driver: hello → state →
move → result. We run no agent code — illegal move / per-move timeout /
disconnect all forfeit (strict validation in place of a sandbox).
- Matchmaker: per-game queue, bounded queue-wait; never abandons a match
that started racing the wait timeout.
Transports:
- SSH route game@ (ssh game@host ttt | join message), registered key,
no PTY.
- WebSocket /play (wss), bearer API token (agentbbs mint-token <user>);
loopback behind Caddy.
Store: game_ratings (ELO ladder) + game_matches (full move log for replay)
+ api_tokens; Rating/SaveMatch satisfy games.Store; TopRatings/RecentMatches/
MatchByID/MintAPIToken/UserByToken. Banned accounts blocked.
Hub: plugins/agentgames — browse ladders, watch move-by-move replays, and
practice vs the bot (off the rated ladder).
Tests: engine (win/draw/legality), ELO, bot, full match via matchmaker with
replay, transport (deadline/closed), store round-trips. Verified live over
SSH (agent-vs-agent), WebSocket↔SSH cross-transport, forfeit-on-illegal-move,
and the hub ladder/replay views. Docs in docs/agentgames.md (the canonical
protocol spec, to mirror to logicsrc.com); README M3 → done.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
120 lines
5.5 KiB
Modula-2
120 lines
5.5 KiB
Modula-2
module github.com/profullstack/agentbbs
|
|
|
|
go 1.26
|
|
|
|
require (
|
|
github.com/charmbracelet/bubbletea v1.3.10
|
|
github.com/charmbracelet/lipgloss v1.1.0
|
|
github.com/charmbracelet/log v1.0.0
|
|
github.com/charmbracelet/ssh v0.0.0-20250826160808-ebfa259c7309
|
|
github.com/charmbracelet/wish v1.4.7
|
|
github.com/creack/pty v1.1.24
|
|
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
|
|
github.com/livekit/protocol v1.46.0
|
|
github.com/livekit/server-sdk-go/v2 v2.16.6
|
|
github.com/pion/webrtc/v4 v4.2.15
|
|
golang.org/x/crypto v0.50.0
|
|
golang.org/x/term v0.42.0
|
|
modernc.org/sqlite v1.52.0
|
|
)
|
|
|
|
require (
|
|
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 // indirect
|
|
buf.build/go/protovalidate v1.1.2 // indirect
|
|
buf.build/go/protoyaml v0.6.0 // indirect
|
|
cel.dev/expr v0.25.1 // indirect
|
|
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
|
|
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
|
github.com/benbjohnson/clock v1.3.5 // indirect
|
|
github.com/bep/debounce v1.2.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/charmbracelet/colorprofile v0.4.1 // indirect
|
|
github.com/charmbracelet/keygen v0.5.3 // indirect
|
|
github.com/charmbracelet/x/ansi v0.11.6 // indirect
|
|
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
|
|
github.com/charmbracelet/x/conpty v0.1.0 // indirect
|
|
github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 // indirect
|
|
github.com/charmbracelet/x/input v0.3.4 // indirect
|
|
github.com/charmbracelet/x/term v0.2.2 // indirect
|
|
github.com/charmbracelet/x/termios v0.1.0 // indirect
|
|
github.com/charmbracelet/x/windows v0.2.0 // indirect
|
|
github.com/clipperhouse/displaywidth v0.9.0 // indirect
|
|
github.com/clipperhouse/stringish v0.1.1 // indirect
|
|
github.com/clipperhouse/uax29/v2 v2.5.0 // indirect
|
|
github.com/dennwc/iters v1.2.2 // indirect
|
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
|
|
github.com/frostbyte73/core v0.1.1 // indirect
|
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
|
github.com/gammazero/deque v1.2.1 // indirect
|
|
github.com/go-jose/go-jose/v3 v3.0.5 // indirect
|
|
github.com/go-logfmt/logfmt v0.6.1 // indirect
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/google/cel-go v0.27.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/jxskiss/base62 v1.1.0 // indirect
|
|
github.com/klauspost/compress v1.18.4 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/lithammer/shortuuid/v4 v4.2.0 // indirect
|
|
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 // indirect
|
|
github.com/livekit/mediatransportutil v0.0.0-20260521165806-8004f10ad0c5 // indirect
|
|
github.com/livekit/psrpc v0.7.1 // indirect
|
|
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
|
|
github.com/magefile/mage v1.17.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-localereader v0.0.1 // indirect
|
|
github.com/mattn/go-runewidth v0.0.19 // indirect
|
|
github.com/moby/sys/user v0.4.0 // indirect
|
|
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
|
|
github.com/muesli/cancelreader v0.2.2 // indirect
|
|
github.com/muesli/termenv v0.16.0 // indirect
|
|
github.com/nats-io/nats.go v1.48.0 // indirect
|
|
github.com/nats-io/nkeys v0.4.15 // indirect
|
|
github.com/nats-io/nuid v1.0.1 // indirect
|
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
|
github.com/pion/datachannel v1.6.0 // indirect
|
|
github.com/pion/dtls/v3 v3.1.4 // indirect
|
|
github.com/pion/ice/v4 v4.2.7 // indirect
|
|
github.com/pion/interceptor v0.1.45 // indirect
|
|
github.com/pion/logging v0.2.4 // indirect
|
|
github.com/pion/mdns/v2 v2.1.0 // indirect
|
|
github.com/pion/randutil v0.1.0 // indirect
|
|
github.com/pion/rtcp v1.2.16 // indirect
|
|
github.com/pion/rtp v1.10.2 // indirect
|
|
github.com/pion/sctp v1.10.0 // indirect
|
|
github.com/pion/sdp/v3 v3.0.18 // indirect
|
|
github.com/pion/srtp/v3 v3.0.11 // indirect
|
|
github.com/pion/stun/v3 v3.1.5 // indirect
|
|
github.com/pion/transport/v4 v4.0.2 // indirect
|
|
github.com/pion/turn/v5 v5.0.9 // indirect
|
|
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
|
|
github.com/redis/go-redis/v9 v9.17.2 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
|
github.com/twitchtv/twirp v8.1.3+incompatible // indirect
|
|
github.com/wlynxg/anet v0.0.5 // indirect
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
|
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
go.opentelemetry.io/otel v1.43.0 // indirect
|
|
go.uber.org/atomic v1.11.0 // indirect
|
|
go.uber.org/multierr v1.11.0 // indirect
|
|
go.uber.org/zap v1.27.1 // indirect
|
|
go.uber.org/zap/exp v0.3.0 // indirect
|
|
golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect
|
|
golang.org/x/net v0.53.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.43.0 // indirect
|
|
golang.org/x/text v0.36.0 // indirect
|
|
golang.org/x/time v0.14.0 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20260427160629-7cedc36a6bc4 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260427160629-7cedc36a6bc4 // indirect
|
|
google.golang.org/grpc v1.80.0 // indirect
|
|
google.golang.org/protobuf v1.36.11 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
modernc.org/libc v1.72.3 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.11.0 // indirect
|
|
)
|