Skip to main content

Actions

The Actions API enables inter-feature communication and resource pack communication through GUID-based events. This system allows features to send and receive standardized actions across the Luniris OS ecosystem.


Protocol Buffer Definition

syntax = "proto3";
import "google/protobuf/empty.proto";

service ActionsService {
// Retrieves all registered actions in the system
rpc GetRegisteredActions (google.protobuf.Empty) returns (Actions);

// Streams all actions sent by any feature in real-time
rpc StreamActions (google.protobuf.Empty) returns (stream ActionMessage);

// Sends an action to be processed by other features/resource packs
rpc SendAction (ActionMessage) returns (google.protobuf.Empty);
}

// Message structure for sending actions
message ActionMessage {
string key = 1; // Action GUID identifier
string argument = 2;
}

// Complete action definition
message Action {
string key = 1; // Action GUID identifier
string name = 2; // Human-readable name
string description = 3; // Detailed description
bool is_available = 4; // Availability status
ActionSource source = 5; // Origin of the action
}

// Collection of all available actions
message Actions {
repeated Action actions = 1;
}

// Source enumeration
enum ActionSource {
ACTION_SOURCE_RESOURCE_PACK = 0; // From resource packs
ACTION_SOURCE_FEATURE = 1; // From installed features
}