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.

Field Type Number Description
config_path string 1 Optional path to configuration file. If not provided, default configuration is used.
debug bool 2 Enable debug logging.

StartEngineResponse contains the result of the start operation.

Field Type Number Description
success bool 1 Indicates whether the engine started successfully.
message string 2 Human-readable message about the start result.
status EngineStatus 3 Engine status after startup.

StopEngineRequest contains parameters for stopping the engine.

Field Type Number Description
force bool 1 Force immediate shutdown (default: false, graceful shutdown).

StopEngineResponse confirms the engine has stopped.

Field Type Number Description
success bool 1 Indicates whether the engine stopped successfully.
message string 2 Human-readable message about the stop result.

GetStatusRequest is an empty message for status queries.


GetStatusResponse contains the current engine status.

Field Type Number Description
status EngineStatus 1 Current engine status.

UpdateConfigRequest contains new configuration values.


UpdateConfigResponse confirms the configuration update.

Field Type Number Description
success bool 1 Indicates whether the configuration was updated successfully.
message string 2 Human-readable message about the update result.

EngineStatus represents the current state of the engine.

Field Type Number Description
state EngineState 1 Current engine state.
uptime_seconds uint64 2 Uptime in seconds since engine started.
version string 3 Version string of the running engine.
active_subsystems repeated string 4 Active subsystems.

EngineState represents the possible states of the engine.

Value Number Description
ENGINE_STATE_UNSPECIFIED 0 Engine is not running.
ENGINE_STATE_INITIALIZING 1 Engine is initializing.
ENGINE_STATE_RUNNING 2 Engine is running normally.
ENGINE_STATE_SHUTTING_DOWN 3 Engine is shutting down.
ENGINE_STATE_ERROR 4 Engine encountered an error.