Skip to content

Protocol Documentation

Table of Contents

Top

holomush/core/v1/core.proto

AuthenticatePlayerRequest

Field Type Label Description
username string
password string
captcha_token string
remember_me bool

AuthenticatePlayerResponse

Field Type Label Description
success bool
player_session_token string
error_message string
characters CharacterSummary repeated
default_character_id string

CharacterSummary

Field Type Label Description
character_id string
character_name string
has_active_session bool
session_status string
last_location string
last_played_at int64

CheckPlayerSessionRequest

Field Type Label Description
player_session_token string

CheckPlayerSessionResponse

Field Type Label Description
player_name string

ConfirmPasswordResetRequest

Field Type Label Description
token string
new_password string

ConfirmPasswordResetResponse

Field Type Label Description
success bool
error_message string

ControlFrame

Field Type Label Description
signal ControlSignal
message string

CreateCharacterRequest

Field Type Label Description
player_session_token string
character_name string

CreateCharacterResponse

Field Type Label Description
success bool
character_id string
character_name string
error_message string

CreateGuestRequest

CreateGuestResponse

Field Type Label Description
success bool
error_message string
player_session_token string
characters CharacterSummary repeated
default_character_id string

CreatePlayerRequest

Field Type Label Description
username string
password string
email string
captcha_token string

CreatePlayerResponse

Field Type Label Description
success bool
player_session_token string
characters CharacterSummary repeated
error_message string

DisconnectRequest

Field Type Label Description
meta RequestMeta
session_id string
connection_id string optional: remove specific connection

DisconnectResponse

Field Type Label Description
meta ResponseMeta
success bool

EventFrame

Field Type Label Description
id string
stream string
type string
timestamp google.protobuf.Timestamp
actor_type string
actor_id string
payload bytes

GetCommandHistoryRequest

Field Type Label Description
meta RequestMeta
session_id string

GetCommandHistoryResponse

Field Type Label Description
meta ResponseMeta
success bool
commands string repeated
error string

HandleCommandRequest

Field Type Label Description
meta RequestMeta
session_id string
command string

HandleCommandResponse

Field Type Label Description
meta ResponseMeta
success bool
error string

ListCharactersRequest

Field Type Label Description
player_session_token string

ListCharactersResponse

Field Type Label Description
characters CharacterSummary repeated

LogoutRequest

Field Type Label Description
player_session_token string

LogoutResponse

RequestMeta

RequestMeta contains metadata for request correlation and debugging.

Field Type Label Description
request_id string ULID for log correlation
timestamp google.protobuf.Timestamp

RequestPasswordResetRequest

Field Type Label Description
email string

RequestPasswordResetResponse

Field Type Label Description
success bool

ResponseMeta

ResponseMeta contains metadata echoed back from requests.

Field Type Label Description
request_id string Echoed from request
timestamp google.protobuf.Timestamp

SelectCharacterRequest

Field Type Label Description
player_session_token string
character_id string

SelectCharacterResponse

Field Type Label Description
success bool
session_id string
character_name string
reattached bool
error_message string

SubscribeRequest

Field Type Label Description
meta RequestMeta
session_id string
streams string repeated
replay_from_cursor bool

SubscribeResponse

Field Type Label Description
event EventFrame
control ControlFrame

ControlSignal

Name Number Description
CONTROL_SIGNAL_UNSPECIFIED 0
CONTROL_SIGNAL_REPLAY_COMPLETE 1
CONTROL_SIGNAL_STREAM_CLOSED 2

CoreService

CoreService is the main game service.

Method Name Request Type Response Type Description
HandleCommand HandleCommandRequest HandleCommandResponse HandleCommand processes a game command.
Subscribe SubscribeRequest SubscribeResponse stream Subscribe opens a stream of events for the session.
Disconnect DisconnectRequest DisconnectResponse Disconnect ends a session.
GetCommandHistory GetCommandHistoryRequest GetCommandHistoryResponse GetCommandHistory retrieves command history for a session.
AuthenticatePlayer AuthenticatePlayerRequest AuthenticatePlayerResponse Two-phase login: authenticate player credentials.
SelectCharacter SelectCharacterRequest SelectCharacterResponse Two-phase login: select a character, creating or reattaching a game session.
CreatePlayer CreatePlayerRequest CreatePlayerResponse Create a new player account.
CreateGuest CreateGuestRequest CreateGuestResponse Create an ephemeral guest player and character.
CreateCharacter CreateCharacterRequest CreateCharacterResponse Create a new character for an authenticated player.
ListCharacters ListCharactersRequest ListCharactersResponse List characters for an authenticated player.
RequestPasswordReset RequestPasswordResetRequest RequestPasswordResetResponse Request a password reset (email stubbed).
ConfirmPasswordReset ConfirmPasswordResetRequest ConfirmPasswordResetResponse Confirm a password reset with token.
Logout LogoutRequest LogoutResponse End a player session.
CheckPlayerSession CheckPlayerSessionRequest CheckPlayerSessionResponse Validate a player session token. Used by web gateway for cookie-based auth checks.

Top

holomush/web/v1/web.proto

CharacterSummary

Field Type Label Description
character_id string
character_name string
has_active_session bool
session_status string
last_location string
last_played_at int64

ControlFrame

Field Type Label Description
signal ControlSignal
message string

DisconnectRequest

Field Type Label Description
session_id string

DisconnectResponse

GameEvent

Field Type Label Description
type string
category string
format string
display_target EventChannel
timestamp int64
actor string
text string
metadata google.protobuf.Struct

GetCommandHistoryRequest

Field Type Label Description
session_id string

GetCommandHistoryResponse

Field Type Label Description
commands string repeated

SendCommandRequest

Field Type Label Description
session_id string
text string

SendCommandResponse

Field Type Label Description
success bool
output string
error_message string

StreamEventsRequest

Field Type Label Description
session_id string
replay_from_cursor bool

StreamEventsResponse

Field Type Label Description
event GameEvent
control ControlFrame

WebAuthenticatePlayerRequest

Field Type Label Description
username string
password string
remember_me bool

WebAuthenticatePlayerResponse

Field Type Label Description
success bool
error_message string
characters CharacterSummary repeated
default_character_id string

WebCheckSessionRequest

WebCheckSessionResponse

Field Type Label Description
player_name string

WebConfirmPasswordResetRequest

Field Type Label Description
token string
new_password string

WebConfirmPasswordResetResponse

Field Type Label Description
success bool
error_message string

WebContentItem

Field Type Label Description
key string
content_type string
body bytes
metadata WebContentItem.MetadataEntry repeated

WebContentItem.MetadataEntry

Field Type Label Description
key string
value string

WebCreateCharacterRequest

Field Type Label Description
character_name string

WebCreateCharacterResponse

Field Type Label Description
success bool
character_id string
character_name string
error_message string

WebCreateGuestRequest

WebCreateGuestResponse

Field Type Label Description
success bool
error_message string
characters CharacterSummary repeated
default_character_id string

WebCreatePlayerRequest

Field Type Label Description
username string
password string
email string

WebCreatePlayerResponse

Field Type Label Description
success bool
characters CharacterSummary repeated
error_message string

WebGetContentRequest

Field Type Label Description
key string

WebGetContentResponse

Field Type Label Description
item WebContentItem

WebListCharactersRequest

WebListCharactersResponse

Field Type Label Description
characters CharacterSummary repeated

WebListContentRequest

Field Type Label Description
prefix string
limit int32
cursor string

WebListContentResponse

Field Type Label Description
items WebContentItem repeated
next_cursor string

WebLogoutRequest

WebLogoutResponse

WebRequestPasswordResetRequest

Field Type Label Description
email string

WebRequestPasswordResetResponse

Field Type Label Description
success bool

WebSelectCharacterRequest

Field Type Label Description
character_id string

WebSelectCharacterResponse

Field Type Label Description
success bool
session_id string
character_name string
reattached bool
error_message string

ControlSignal

Name Number Description
CONTROL_SIGNAL_UNSPECIFIED 0
CONTROL_SIGNAL_REPLAY_COMPLETE 1
CONTROL_SIGNAL_STREAM_CLOSED 2

EventChannel

Name Number Description
EVENT_CHANNEL_UNSPECIFIED 0
EVENT_CHANNEL_TERMINAL 1
EVENT_CHANNEL_STATE 2
EVENT_CHANNEL_BOTH 3

WebService

Method Name Request Type Response Type Description
SendCommand SendCommandRequest SendCommandResponse Send a game command (say, pose, quit, etc.)
StreamEvents StreamEventsRequest StreamEventsResponse stream Server-streaming event feed. Client receives game events (say, pose, arrive, leave) as they occur.
Disconnect DisconnectRequest DisconnectResponse Disconnect ends the session and triggers cleanup.
GetCommandHistory GetCommandHistoryRequest GetCommandHistoryResponse Retrieve command history for a session.
WebAuthenticatePlayer WebAuthenticatePlayerRequest WebAuthenticatePlayerResponse Web auth RPCs.
WebSelectCharacter WebSelectCharacterRequest WebSelectCharacterResponse
WebCreatePlayer WebCreatePlayerRequest WebCreatePlayerResponse
WebCreateGuest WebCreateGuestRequest WebCreateGuestResponse Create an ephemeral guest player and character.
WebCreateCharacter WebCreateCharacterRequest WebCreateCharacterResponse
WebListCharacters WebListCharactersRequest WebListCharactersResponse
WebLogout WebLogoutRequest WebLogoutResponse
WebRequestPasswordReset WebRequestPasswordResetRequest WebRequestPasswordResetResponse
WebConfirmPasswordReset WebConfirmPasswordResetRequest WebConfirmPasswordResetResponse
WebCheckSession WebCheckSessionRequest WebCheckSessionResponse Validate player session from cookie. Returns player info or Unauthenticated error.
WebGetContent WebGetContentRequest WebGetContentResponse Content store access (public, no auth required).
WebListContent WebListContentRequest WebListContentResponse

Top

holomush/control/v1/control.proto

ShutdownRequest

ShutdownRequest contains shutdown parameters.

Field Type Label Description
graceful bool If true, perform graceful shutdown allowing in-flight requests to complete.

ShutdownResponse

ShutdownResponse confirms shutdown initiation.

Field Type Label Description
message string Human-readable status message.

StatusRequest

StatusRequest requests current process status.

StatusResponse

StatusResponse contains current process status.

Field Type Label Description
running bool Whether the process is running.
pid int32 Process ID.
uptime_seconds int64 Seconds since process started.
component string Component name (e.g., "core" or "gateway").

ControlService

ControlService provides administrative operations for HoloMUSH processes.

Method Name Request Type Response Type Description
Shutdown ShutdownRequest ShutdownResponse Shutdown initiates process shutdown.
Status StatusRequest StatusResponse Status returns current process status.

Top

holomush/plugin/v1/plugin.proto

api/proto/holomush/plugin/v1/plugin.proto

CommandRequest

CommandRequest carries context for a plugin command invocation.

Field Type Label Description
command string Parsed command name (e.g., "say", "dig").
args string Everything after the command name.
raw_input string What the player actually typed (alias support).
character_id string Invoking character ULID.
character_name string Character display name.
location_id string Character's current location ULID.
session_id string Active session ULID.
player_id string Player account ULID.

CommandResponse

CommandResponse carries the result of a plugin command execution.

Field Type Label Description
status CommandStatus Outcome category.
output string Synchronous text output to the invoking player.
events EmitEvent repeated Events to append to the event store.

EmitEvent

EmitEvent represents an event that a plugin wants to emit. Compatible with pkg/plugin.EmitEvent.

Field Type Label Description
stream string Target stream for the event.
type string Event type.
payload string JSON-encoded payload.

Event

Event represents a game event delivered to plugins. Compatible with pkg/plugin.Event but uses protobuf types.

Field Type Label Description
id string Unique event identifier (ULID string).
stream string Stream the event belongs to (e.g., "location:loc_abc123").
type string Event type (e.g., "say", "pose", "arrive", "leave", "system").
timestamp int64 Timestamp in Unix milliseconds.
actor_kind string Actor kind as string (e.g., "character", "system", "plugin"). Using string instead of enum for flexibility and compatibility.
actor_id string Actor identifier.
payload string JSON-encoded payload.

HandleCommandRequest

HandleCommandRequest wraps a command for delivery to the plugin.

Field Type Label Description
command CommandRequest The command to handle.

HandleCommandResponse

HandleCommandResponse wraps the command result from the plugin.

Field Type Label Description
response CommandResponse The command result.

HandleEventRequest

HandleEventRequest wraps an event for delivery to the plugin.

Field Type Label Description
event Event The event to handle.

HandleEventResponse

HandleEventResponse contains any events the plugin wants to emit.

Field Type Label Description
emit_events EmitEvent repeated Events to emit in response.

InitRequest

InitRequest is sent by the host after connecting to the plugin process.

Field Type Label Description
config ServiceConfig Service configuration for the plugin.

InitResponse

InitResponse is returned by the plugin after initialization.

Field Type Label Description
provided_services string repeated gRPC service names this plugin provides on the go-plugin transport.

PluginHostServiceEmitEventRequest

Field Type Label Description
stream string
event_type string
payload bytes

PluginHostServiceEmitEventResponse

PluginHostServiceKVDeleteRequest

Field Type Label Description
plugin_name string
key string

PluginHostServiceKVDeleteResponse

PluginHostServiceKVGetRequest

Field Type Label Description
plugin_name string
key string

PluginHostServiceKVGetResponse

Field Type Label Description
value string
found bool

PluginHostServiceKVSetRequest

Field Type Label Description
plugin_name string
key string
value string

PluginHostServiceKVSetResponse

PluginHostServiceLogRequest

Field Type Label Description
level string
message string

PluginHostServiceLogResponse

ServiceConfig

ServiceConfig carries initialization data from the host to the plugin.

Field Type Label Description
connection_string string PostgreSQL connection string (provided when the plugin declares storage: postgres).
required_services ServiceConfig.RequiredServicesEntry repeated Addresses of required services, keyed by service name (future use).

ServiceConfig.RequiredServicesEntry

Field Type Label Description
key string
value string

CommandStatus

CommandStatus maps to pkg/plugin.CommandStatus values.

Name Number Description
COMMAND_STATUS_UNSPECIFIED 0
COMMAND_STATUS_OK 1
COMMAND_STATUS_ERROR 2
COMMAND_STATUS_FAILURE 3
COMMAND_STATUS_FATAL 4

PluginHostService

PluginHostService runs in the host process, allowing binary plugins to call back for event emission, logging, and KV storage.

Method Name Request Type Response Type Description
EmitEvent PluginHostServiceEmitEventRequest PluginHostServiceEmitEventResponse EmitEvent publishes an event to a stream.
Log PluginHostServiceLogRequest PluginHostServiceLogResponse Log writes a log message through the host's logging system.
KVGet PluginHostServiceKVGetRequest PluginHostServiceKVGetResponse KVGet retrieves a value from the plugin's key-value store.
KVSet PluginHostServiceKVSetRequest PluginHostServiceKVSetResponse KVSet stores a value in the plugin's key-value store.
KVDelete PluginHostServiceKVDeleteRequest PluginHostServiceKVDeleteResponse KVDelete removes a value from the plugin's key-value store.

PluginService

PluginService is called by the go-plugin host to send events and commands to binary plugins. This service is implemented by the plugin (the gRPC server runs in the plugin process).

Method Name Request Type Response Type Description
Init InitRequest InitResponse Init is called by the host after connection, providing service configuration (DB connection string, required service addresses, etc.) and receiving the list of gRPC services the plugin provides.
HandleEvent HandleEventRequest HandleEventResponse HandleEvent delivers an event to the plugin and receives any response events.
HandleCommand HandleCommandRequest HandleCommandResponse HandleCommand delivers a command to the plugin.

Top

holomush/plugin/v1/hostfunc.proto

api/proto/holomush/plugin/v1/hostfunc.proto

CharacterInfo

CharacterInfo contains basic character information.

Field Type Label Description
id string Character identifier.
name string Character name.

CommandHelpInfo

CommandHelpInfo contains detailed help for a command.

Field Type Label Description
name string Command name.
help string Short help description.
usage string Usage pattern.
help_text string Detailed markdown help text.
capabilities string repeated Required capabilities for this command.
source string Source plugin name or "core".

CommandInfo

CommandInfo contains basic command information for listing.

Field Type Label Description
name string Command name.
help string Short help description.
usage string Usage pattern (e.g., "say <message>").
source string Source plugin name or "core".

EmitEventRequest

EmitEventRequest wraps an event for emission by the host.

Field Type Label Description
event EmitEvent The event to emit.

EmitEventResponse

EmitEventResponse indicates success or failure.

Field Type Label Description
success bool Whether the event was successfully emitted.
error string Error message if success is false.

GetCommandHelpRequest

GetCommandHelpRequest requests detailed help for a command.

Field Type Label Description
command_name string Command name to get help for.

GetCommandHelpResponse

GetCommandHelpResponse contains detailed command help.

Field Type Label Description
command CommandHelpInfo Detailed command information (nil if not found).
error string Error message if query failed.

KVDeleteRequest

KVDeleteRequest removes a key.

Field Type Label Description
key string Key to delete.

KVDeleteResponse

KVDeleteResponse indicates success or failure.

Field Type Label Description
deleted bool Whether the key was deleted (true even if key didn't exist).
error string Error message if deletion failed.

KVGetRequest

KVGetRequest retrieves a value by key.

Field Type Label Description
key string Key to look up.

KVGetResponse

KVGetResponse contains the retrieved value.

Field Type Label Description
value bytes Value if found.
found bool Whether the key was found.
error string Error message if query failed.

KVSetRequest

KVSetRequest stores a key-value pair.

Field Type Label Description
key string Key to store.
value bytes Value to store.

KVSetResponse

KVSetResponse indicates success or failure.

Field Type Label Description
success bool Whether the value was successfully stored.
error string Error message if success is false.

ListCommandsRequest

ListCommandsRequest requests the list of available commands. Commands are filtered by the character's capabilities.

Field Type Label Description
character_id string Character identifier for capability filtering.

ListCommandsResponse

ListCommandsResponse contains the list of available commands.

Field Type Label Description
commands CommandInfo repeated Available commands.
error string Error message if query failed.

LocationInfo

LocationInfo contains basic location information.

Field Type Label Description
id string Location identifier.
name string Location name/title.
description string Location description.

LogRequest

LogRequest writes a log message.

Field Type Label Description
level LogLevel Log level.
message string Log message.
fields LogRequest.FieldsEntry repeated Additional structured fields.

LogRequest.FieldsEntry

Field Type Label Description
key string
value string

LogResponse

LogResponse is empty (logging is fire-and-forget).

QueryCharacterRequest

QueryCharacterRequest requests information about a character.

Field Type Label Description
character_id string Character identifier.

QueryCharacterResponse

QueryCharacterResponse contains character information.

Field Type Label Description
character CharacterInfo Character information (nil if not found).
error string Error message if query failed.

QueryLocationCharactersRequest

QueryLocationCharactersRequest requests all characters in a location.

Field Type Label Description
location_id string Location identifier.

QueryLocationCharactersResponse

QueryLocationCharactersResponse contains the list of characters.

Field Type Label Description
characters CharacterInfo repeated Characters in the location.
error string Error message if query failed.

QueryLocationRequest

QueryLocationRequest requests information about a location.

Field Type Label Description
location_id string Location identifier.

QueryLocationResponse

QueryLocationResponse contains location information.

Field Type Label Description
location LocationInfo Location information (nil if not found).
error string Error message if query failed.

LogLevel

LogLevel specifies the severity of a log message.

Name Number Description
LOG_LEVEL_UNSPECIFIED 0
LOG_LEVEL_DEBUG 1
LOG_LEVEL_INFO 2
LOG_LEVEL_WARN 3
LOG_LEVEL_ERROR 4

HostFunctionsService

HostFunctionsService provides host capabilities to plugins. This service is implemented by the host (the gRPC server runs in the host process). Plugins call these methods to interact with the game world.

Method Name Request Type Response Type Description
EmitEvent EmitEventRequest EmitEventResponse EmitEvent publishes an event to a stream.
QueryLocation QueryLocationRequest QueryLocationResponse QueryLocation retrieves information about a location.
QueryCharacter QueryCharacterRequest QueryCharacterResponse QueryCharacter retrieves information about a character.
QueryLocationCharacters QueryLocationCharactersRequest QueryLocationCharactersResponse QueryLocationCharacters retrieves all characters in a location.
KVGet KVGetRequest KVGetResponse KVGet retrieves a value from the plugin's key-value store.
KVSet KVSetRequest KVSetResponse KVSet stores a value in the plugin's key-value store.
KVDelete KVDeleteRequest KVDeleteResponse KVDelete removes a value from the plugin's key-value store.
Log LogRequest LogResponse Log writes a log message through the host's logging system.
ListCommands ListCommandsRequest ListCommandsResponse ListCommands returns all available commands. Requires capability: command.list
GetCommandHelp GetCommandHelpRequest GetCommandHelpResponse GetCommandHelp returns detailed help for a specific command. Requires capability: command.help

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)