ClientReport
Internal
Not re-exported through require(Operator). This is not part of the public API and may move in a minor release. It is documented because understanding it matters when you are debugging, not because you should construct one. The internal path is ServerStorage.Operator.Server.ClientReport.
Validates the record notifications a client sends after running a client command, and writes the accepted ones into the Audit log marked source = "client".
The Transport wires this up; you would only touch it directly when assembling the pieces yourself.
This bounds the lie, it does not verify the report
A client command never reaches the server, so the server cannot observe what it did. The checks below reject a report unless it names a command the player was actually permitted to run, but they cannot confirm the player really ran it, and omission cannot be prevented at all.
Functions
ClientReport.build
ClientReport.build(options: Options, player: Player, payload: any): (Entry?, string?)Validates one payload. Returns an audit Entry ready to record, or nil and a reason.
Rejects unless every one of these holds:
| Check | Rejected when |
|---|---|
| shape | the payload is not a table, or path is not a list of non-empty strings |
| registered | path does not resolve to a command |
| client-run | the command is not :runClient() |
| permitted | canRun(player, command) is false, or raises |
| status | status is not a known Dispatcher.Status |
| length | text exceeds Tokenizer.MaxInputLength |
| audited | the command is :noAudit() |
message and every args value are clamped rather than rejected, and args is capped in count. Identity, meaning jobId and executor, is taken from the caller, never the payload, and targets is never populated.
ClientReport.new
ClientReport.new(options: ChannelOptions): ChannelReturns a channel whose handle(player, payload) rate-limits, validates and records. A dropped report is logged and discarded; it never affects the client, which has already run the command.
Types
Options
type Options = {
registry: Registry,
canRun: (player: Player, command: Command) -> boolean,
jobId: string,
}ChannelOptions
type ChannelOptions = {
registry: Registry,
canRun: (player: Player, command: Command) -> boolean,
audit: Audit?,
logger: Log.Logger?,
isConnected: (player: Player) -> boolean,
takeToken: (player: Player) -> boolean,
}takeToken is the rate limiter; returning false drops the report. Reports use their own token bucket, separate from command dispatches, so client-command usage cannot starve real dispatches. Limits are in Transport.