Skip to content

EngineService Service

pai.engine.v1

Syntax: proto3

EngineService provides control and monitoring capabilities for the paiOS Engine. This service handles engine lifecycle, configuration, and status queries.

StartEngine initializes and starts the paiOS Engine. Returns the engine status after startup.

rpc StartEngine(StartEngineRequest) returns (StartEngineResponse)

StopEngine gracefully shuts down the engine. Returns confirmation when shutdown is complete.

rpc StopEngine(StopEngineRequest) returns (StopEngineResponse)

GetStatus returns the current status of the engine.

rpc GetStatus(GetStatusRequest) returns (GetStatusResponse)

UpdateConfig updates the engine configuration at runtime.

rpc UpdateConfig(UpdateConfigRequest) returns (UpdateConfigResponse)

StartEngineRequest contains parameters for starting the engine.

FieldTypeNumberDescription
config_pathstring1Optional path to configuration file. If not provided, default configuration is used.
debugbool2Enable debug logging.

StartEngineResponse contains the result of the start operation.

FieldTypeNumberDescription
successbool1Indicates whether the engine started successfully.
messagestring2Human-readable message about the start result.
statusEngineStatus3Engine status after startup.

StopEngineRequest contains parameters for stopping the engine.

FieldTypeNumberDescription
forcebool1Force immediate shutdown (default: false, graceful shutdown).

StopEngineResponse confirms the engine has stopped.

FieldTypeNumberDescription
successbool1Indicates whether the engine stopped successfully.
messagestring2Human-readable message about the stop result.

GetStatusRequest is an empty message for status queries.


GetStatusResponse contains the current engine status.

FieldTypeNumberDescription
statusEngineStatus1Current engine status.

UpdateConfigRequest contains new configuration values.


UpdateConfigResponse confirms the configuration update.

FieldTypeNumberDescription
successbool1Indicates whether the configuration was updated successfully.
messagestring2Human-readable message about the update result.

EngineStatus represents the current state of the engine.

FieldTypeNumberDescription
stateEngineState1Current engine state.
uptime_secondsuint642Uptime in seconds since engine started.
versionstring3Version string of the running engine.
active_subsystemsrepeated string4Active subsystems.

EngineState represents the possible states of the engine.

ValueNumberDescription
ENGINE_STATE_UNSPECIFIED0Engine is not running.
ENGINE_STATE_INITIALIZING1Engine is initializing.
ENGINE_STATE_RUNNING2Engine is running normally.
ENGINE_STATE_SHUTTING_DOWN3Engine is shutting down.
ENGINE_STATE_ERROR4Engine encountered an error.