Repository navigation
Add optional setup tour and Sector Alpha agent with guided binding - #40
Merged
Merged
Conversation
Keep each date together after rebasing onto the Workshop release notes.
cosmosquark
force-pushed
the
codex/sector-alpha-agent
branch
from
October 17, 2026 22:13
02e78ef to
175dbaa
Compare
An empty db_host starts a private MariaDB 11.5 container and points LD_LIBRARY_PATH at TeamSpeak's bundled client library. Official agent stats and remote execution use alphagsm-api.sector-alpha.net.
alphagsm agent query reads the same anonymous status protocols as the website and does not upload the result. alphagsm agent prove places a website challenge in the live TeamSpeak name and restores it. Agent publication stays Minecraft Java, Minecraft Paper, and Team Fortress 2. TeamSpeak directory listing remains a website choice.
Heartbeats run about every 30 seconds. If the socket cannot open, the agent uses the existing HTTPS job poll. Authorize and result posts stay on HTTPS.
The default count query still omits clientlist. A refused channel or client list keeps the server total and marks the roster unavailable.
alphagsm agent enroll binds managed servers that already have a public address, turns reporting on, and starts ownership challenges. Every agent operation uses https://alphagsm-api.sector-alpha.net unless the saved origin is set. Management stays off. Sector Alpha still verifies a challenge by querying the server.
…agent # Conflicts: # DEVELOPERS.md # README.md # changelog.txt # src/core/main.py
alphagsm agent install-service writes a systemd user unit that runs the same program with agent run, then starts it. The unit does not change reporting or management, and uninstall leaves the local enrollment in place. Outbound agent HTTPS and the WebSocket now require TLS 1.2.
The service runs alphagsm agent run. There is no separate alphagsm-agent program. install-service --system writes a system unit for one operator account and does not run it as root.
…dules. alphagsm agent run stays in the foreground. install-service enables and starts the user or system unit. Ordinary imports load grp and pwd only for a system account, and the TeamSpeak directory message lives in config so the import cycle is gone.
The site now names the x86_64 tar.gz in the link title and puts the release number in a version label. Setup was stopping before the smoke test could start the server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional Sector Alpha agent inside AlphaGSM, plus a skippable first-run tour. The agent ships with the normal
alphagsmprogram. Official agent traffic useshttps://alphagsm-api.sector-alpha.netfor enrollment, binding, ownership challenges, posted stats, the session socket, job polling, authorization, and results. Sign-in, accounts, and the public directory stay onhttps://sector-alpha.net. Another provider is selected only with--origin, and that saved origin is then used for every agent operation.alphagsm agent enrollredeems a ten-minute enrollment code, registers managed servers that already have a public address, turns reporting on, and leaves management off.alphagsm agent runruns the agent in the foreground until you stop it or close the terminal. It opens one outbound WebSocket for presence and job wakes. If that socket cannot open, it uses the existing HTTPS job poll. Authorize and result posts stay on HTTPS. The client requires TLS 1.2 or newer and verified hostnames. No inbound management listener is opened.Reporting, management, publication, and each status, start, stop, and restart action stay separate consents. Game setup,
agent setup,agent bind, and the first-run tour leave reporting and management off and do not install a service.Keeping the agent running
alphagsm agent runis enough for a foreground session. On Linux, persistence is a separate command:alphagsm agent install-servicewritesalphagsm.servicefor the current user (~/.config/systemd/user/or$XDG_CONFIG_HOME/systemd/user/), enables it, and starts it. It returns at login. It stops at logout unless linger is already enabled. The installer prints that hint and does not runloginctl enable-linger.alphagsm agent install-service --systemwrites/etc/systemd/system/alphagsm.service, enables it for boot, and starts it as one operator account. The account is--service-user, otherwiseSUDO_USER, otherwiseUSER. Root is rejected. The unit setsUser,Group,HOME, andUSER. Writing that directory needs root. The command does not call sudo.alphagsm agent run.ALPHAGSM_CONFIG_LOCATIONis copied into the unit when it is set. The unit file contains no secrets.alphagsm agent runstops while the service holds the local lock. Runninginstall-serviceagain restarts the unit so a new enrollment is loaded.alphagsm agent uninstall-servicedisables and removes the selected unit and leaves the local enrollment in place. Add--systemto remove the system unit.alphagsm agent runin the foreground. Ordinary commands do not import the Linuxgrporpwdmodules. Windows enrollment still fails closed until user-only credential ACLs exist. Local game commands are unaffected.Binding, ports, and the first-run tour
Operators can use
agent bind TAG,agent bind '*', oragent setup. Guided previews infer the game, advertised IP or hostname, player port, query port, name, and capacity, then register private bindings. Each game can use a distinct subdomain on the same machine. Fresh A/AAAA answers must match the machine's expected public addresses before hostname publication.--public-ipsupports NAT and multiple addresses.check-endpoint TAGis the local query diagnostic.Trackmania XML-RPC, Enshrouded query-only settings, and Arma headless roles do not infer a player listener. An explicit
--connect-portasks the operator to confirm the actual game listener and NAT mapping.Player ports are approved separately from query ports. The local primary
portsupplies the optional reportconnect_port.queryportremains the query endpoint.--connect-portoverrides the public player port. Minecraft's shared player and query port follows a confirmed query override unless a distinct player mapping was explicitly approved.A skippable first-run tour appears only on a bare launch with a terminal. Enter remembers a skip.
--welcomereplays it and--skip-welcomesupports installation scripts. It offers local server creation, a command walkthrough, and optional Sector Alpha enrollment. Creation, setup, and opening the remote wizard each need a separate confirmation. It does not start a game, enable reporting or management, or install a service. Existing records, wildcard or count selectors, and reserved names, includingagentandsteam-auth, are rejected before dispatch.Security
connect_portaccepts only an integer from 1 to 65535, or null. Unknown fields are rejected.Docs
Checks on this update
The previous GitHub Actions run failed lint (pylint exit 28: an import cycle and unidiomatic type checks) and the Windows binary (
No module named 'grp'). This commit loadsgrpandpwdonly when looking up a system-service account, and moves the TeamSpeak directory message intoagent.configso that cycle is gone. Locally,bash ./lint.shscored 10.00/10 with exit 0, and the agent unit tests passed (257), including a check that importing the service module does not loadgrporpwd. The Actions run on this commit is the remaining confirmation.