refactor(scum): use runtime capability probes

This commit is contained in:
npc0-hue
2026-07-29 18:34:16 +08:00
parent 03339fb3e8
commit d7465bfd32
26 changed files with 530 additions and 533 deletions
@@ -1,47 +1,16 @@
# Pinned UE4SS capability evidence
# Runtime capability boundary
This Companion has inspected the read-only reference repository at commit
`bae91527355f14faa63c1df65f742cc48594ba1b` (`scum_simple_rcon_ue4ss` v0.1.0,
verified build target RE-UE4SS 3.0.1).
UE4SS is only a possible Companion-local implementation detail. It is not a
feature gate: no SCUM game, database, UE4SS build, or source revision controls
plugin availability.
## Verified capability
The Companion declares availability from its server-bound typed ports and
runtime schema probes. Notification and fixed vehicle spawning can use a local
typed transport, but callers never supply a command, socket, credential, path,
or raw transport reply. Vehicle spawning creates only the private
`#spawnvehicle <vehicleCode>` template from the plugin allowlist.
The source implements a game-thread `SendChat <type 0-7> "message"
[SteamID64]` path. A targeted send accepts only a 17-digit SteamID64 that
resolves to a real, currently online `ConZPlayerController` with a live
`UNetConnection`; it fails closed when the reflected
`MiscStatics:SendChatLineToPlayer` schema differs. This can support a
version-bound, typed `player.notify` adapter when the deployed Companion is
given a platform-authorized typed transport. `VersionedAdapter` implements
that contract only for this exact source revision and UE4SS 3.0.1, with fixed
chat type `4`; it cannot accept arbitrary RCON text. Its generated command
text is private transport/audit data and never appears in a command result.
The same pinned `ScumBridge::trim_command` implementation removes at most one
leading `#` before dispatch. The authorized `vehicle.spawn` adapter preserves
the required `#spawnvehicle <vehicleCode>` template internally, supplies it
only to a Companion-local typed transport port, and never treats the source's
raw response as a stable acknowledgement. Its isolated port fixture supplies
the bounded success/failure/unknown receipt used by the adapter tests.
## Explicitly unavailable
The reference contains no versioned server-side producer or documented API for:
- successful player login/logout records;
- raw network identity/fingerprint values suitable for correlation;
- player or vehicle position, or player/vehicle transitions;
- item/reward delivery; or
- skill/attribute read, safe-window checking, or mutation.
The fixed vehicle-spawn exception does not change these unavailable
capabilities and does not authorize arbitrary RCON commands, arguments,
targets, credentials, direct sockets, SQL, shell execution, or response
projection.
Therefore the Companion must not parse invented `LOGIN`/`LOGOUT` lines, upload
semantic events, correlate network identifiers, or claim trajectory, reward,
or game-state-patch support from this reference. The missing contract is a
version-pinned UE4SS extension/API that defines the event or operation schema,
identity binding, acknowledgement/result semantics, and non-production
integration fixture for each capability.
Semantic events come from bounded Run stdout/stderr records. Unknown records
create diagnostics and never produce fabricated events. Run database access is
limited to typed allowlisted projections and safe mutations; DSNs, rows, SQL,
and credentials do not leave Run.