@elizaos/schemas 2.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,91 @@
1
+ // environment.proto - Environment types (Entity, Room, World) for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "google/protobuf/struct.proto";
7
+
8
+ // Entity component - extensible data attached to entities
9
+ message Component {
10
+ string id = 1;
11
+ string entity_id = 2;
12
+ string agent_id = 3;
13
+ string room_id = 4;
14
+ string world_id = 5;
15
+ string source_entity_id = 6;
16
+ string type = 7;
17
+ int64 created_at = 8;
18
+ google.protobuf.Struct data = 9;
19
+ }
20
+
21
+ // Represents an entity (user, agent, or other actor)
22
+ message Entity {
23
+ // Unique identifier, optional on creation
24
+ optional string id = 1;
25
+ // Names of the entity
26
+ repeated string names = 2;
27
+ // Additional metadata
28
+ google.protobuf.Struct metadata = 3;
29
+ // Agent ID this entity is related to
30
+ string agent_id = 4;
31
+ // Optional array of components
32
+ repeated Component components = 5;
33
+ }
34
+
35
+ // World ownership metadata
36
+ message WorldOwnership {
37
+ string owner_id = 1;
38
+ }
39
+
40
+ // World metadata
41
+ message WorldMetadata {
42
+ optional WorldOwnership ownership = 1;
43
+ // Role assignments keyed by entity ID
44
+ map<string, string> roles = 2;
45
+ // Additional dynamic metadata
46
+ google.protobuf.Struct extra = 3;
47
+ }
48
+
49
+ // Represents a world (server, guild, or top-level container)
50
+ message World {
51
+ string id = 1;
52
+ optional string name = 2;
53
+ string agent_id = 3;
54
+ optional string message_server_id = 4;
55
+ optional WorldMetadata metadata = 5;
56
+ }
57
+
58
+ // Room metadata (dynamic key-value pairs)
59
+ message RoomMetadata {
60
+ google.protobuf.Struct values = 1;
61
+ }
62
+
63
+ // Represents a room (channel, chat, or conversation container)
64
+ message Room {
65
+ string id = 1;
66
+ optional string name = 2;
67
+ optional string agent_id = 3;
68
+ string source = 4;
69
+ string type = 5;
70
+ optional string channel_id = 6;
71
+ optional string message_server_id = 7;
72
+ optional string world_id = 8;
73
+ optional RoomMetadata metadata = 9;
74
+ }
75
+
76
+ // Room participant with entity details
77
+ message Participant {
78
+ string id = 1;
79
+ Entity entity = 2;
80
+ }
81
+
82
+ // Represents a relationship between entities
83
+ message Relationship {
84
+ string id = 1;
85
+ string source_entity_id = 2;
86
+ string target_entity_id = 3;
87
+ string agent_id = 4;
88
+ repeated string tags = 5;
89
+ google.protobuf.Struct metadata = 6;
90
+ optional string created_at = 7;
91
+ }
@@ -0,0 +1,235 @@
1
+ // events.proto - Event types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "eliza/v1/environment.proto";
7
+ import "eliza/v1/memory.proto";
8
+ import "eliza/v1/model.proto";
9
+ import "eliza/v1/primitives.proto";
10
+ import "google/protobuf/struct.proto";
11
+
12
+ // Standard event types across all platforms
13
+ enum EventType {
14
+ EVENT_TYPE_UNSPECIFIED = 0;
15
+
16
+ // World events
17
+ EVENT_TYPE_WORLD_JOINED = 1;
18
+ EVENT_TYPE_WORLD_CONNECTED = 2;
19
+ EVENT_TYPE_WORLD_LEFT = 3;
20
+
21
+ // Entity events
22
+ EVENT_TYPE_ENTITY_JOINED = 4;
23
+ EVENT_TYPE_ENTITY_LEFT = 5;
24
+ EVENT_TYPE_ENTITY_UPDATED = 6;
25
+
26
+ // Room events
27
+ EVENT_TYPE_ROOM_JOINED = 7;
28
+ EVENT_TYPE_ROOM_LEFT = 8;
29
+
30
+ // Message events
31
+ EVENT_TYPE_MESSAGE_RECEIVED = 9;
32
+ EVENT_TYPE_MESSAGE_SENT = 10;
33
+ EVENT_TYPE_MESSAGE_DELETED = 11;
34
+
35
+ // Channel events
36
+ EVENT_TYPE_CHANNEL_CLEARED = 12;
37
+
38
+ // Voice events
39
+ EVENT_TYPE_VOICE_MESSAGE_RECEIVED = 13;
40
+ EVENT_TYPE_VOICE_MESSAGE_SENT = 14;
41
+
42
+ // Interaction events
43
+ EVENT_TYPE_REACTION_RECEIVED = 15;
44
+ EVENT_TYPE_POST_GENERATED = 16;
45
+ EVENT_TYPE_INTERACTION_RECEIVED = 17;
46
+
47
+ // Run events
48
+ EVENT_TYPE_RUN_STARTED = 18;
49
+ EVENT_TYPE_RUN_ENDED = 19;
50
+ EVENT_TYPE_RUN_TIMEOUT = 20;
51
+
52
+ // Action events
53
+ EVENT_TYPE_ACTION_STARTED = 21;
54
+ EVENT_TYPE_ACTION_COMPLETED = 22;
55
+
56
+ // Evaluator events
57
+ EVENT_TYPE_EVALUATOR_STARTED = 23;
58
+ EVENT_TYPE_EVALUATOR_COMPLETED = 24;
59
+
60
+ // Model events
61
+ EVENT_TYPE_MODEL_USED = 25;
62
+
63
+ // Embedding events
64
+ EVENT_TYPE_EMBEDDING_GENERATION_REQUESTED = 26;
65
+ EVENT_TYPE_EMBEDDING_GENERATION_COMPLETED = 27;
66
+ EVENT_TYPE_EMBEDDING_GENERATION_FAILED = 28;
67
+
68
+ // Control events
69
+ EVENT_TYPE_CONTROL_MESSAGE = 29;
70
+ }
71
+
72
+ // Platform-specific event type prefix
73
+ enum PlatformPrefix {
74
+ PLATFORM_PREFIX_UNSPECIFIED = 0;
75
+ PLATFORM_PREFIX_DISCORD = 1;
76
+ PLATFORM_PREFIX_TELEGRAM = 2;
77
+ PLATFORM_PREFIX_X = 3;
78
+ }
79
+
80
+ // Base payload interface for all events
81
+ message EventPayload {
82
+ string source = 1;
83
+ }
84
+
85
+ // Payload for world-related events
86
+ message WorldPayload {
87
+ string source = 1;
88
+ World world = 2;
89
+ repeated Room rooms = 3;
90
+ repeated Entity entities = 4;
91
+ }
92
+
93
+ // Payload for entity-related events
94
+ message EntityPayload {
95
+ string source = 1;
96
+ string entity_id = 2;
97
+ optional string world_id = 3;
98
+ optional string room_id = 4;
99
+ optional EntityMetadata metadata = 5;
100
+ }
101
+
102
+ // Entity metadata for events
103
+ message EntityMetadata {
104
+ string original_id = 1;
105
+ string username = 2;
106
+ optional string display_name = 3;
107
+ google.protobuf.Struct extra = 4;
108
+ }
109
+
110
+ // Payload for message-related events
111
+ message MessagePayload {
112
+ string source = 1;
113
+ Memory message = 2;
114
+ }
115
+
116
+ // Payload for channel cleared events
117
+ message ChannelClearedPayload {
118
+ string source = 1;
119
+ string room_id = 2;
120
+ string channel_id = 3;
121
+ int32 memory_count = 4;
122
+ }
123
+
124
+ // Payload for events invoked without a message
125
+ message InvokePayload {
126
+ string source = 1;
127
+ string world_id = 2;
128
+ string user_id = 3;
129
+ string room_id = 4;
130
+ }
131
+
132
+ // Run status enumeration
133
+ enum RunStatus {
134
+ RUN_STATUS_UNSPECIFIED = 0;
135
+ RUN_STATUS_STARTED = 1;
136
+ RUN_STATUS_COMPLETED = 2;
137
+ RUN_STATUS_TIMEOUT = 3;
138
+ }
139
+
140
+ // Payload for run events
141
+ message RunEventPayload {
142
+ string source = 1;
143
+ string run_id = 2;
144
+ string message_id = 3;
145
+ string room_id = 4;
146
+ string entity_id = 5;
147
+ int64 start_time = 6;
148
+ RunStatus status = 7;
149
+ optional int64 end_time = 8;
150
+ optional int64 duration = 9;
151
+ optional string error = 10;
152
+ }
153
+
154
+ // Payload for action events
155
+ message ActionEventPayload {
156
+ string source = 1;
157
+ string room_id = 2;
158
+ string world_id = 3;
159
+ Content content = 4;
160
+ optional string message_id = 5;
161
+ }
162
+
163
+ // Payload for evaluator events
164
+ message EvaluatorEventPayload {
165
+ string source = 1;
166
+ string evaluator_id = 2;
167
+ string evaluator_name = 3;
168
+ optional int64 start_time = 4;
169
+ optional bool completed = 5;
170
+ optional string error = 6;
171
+ }
172
+
173
+ // Token usage for model events
174
+ message ModelTokenUsage {
175
+ int32 prompt = 1;
176
+ int32 completion = 2;
177
+ int32 total = 3;
178
+ }
179
+
180
+ // Payload for model events
181
+ message ModelEventPayload {
182
+ string source = 1;
183
+ string provider = 2;
184
+ ModelType type = 3;
185
+ string prompt = 4;
186
+ optional ModelTokenUsage tokens = 5;
187
+ }
188
+
189
+ // Embedding priority enumeration
190
+ enum EmbeddingPriority {
191
+ EMBEDDING_PRIORITY_UNSPECIFIED = 0;
192
+ EMBEDDING_PRIORITY_HIGH = 1;
193
+ EMBEDDING_PRIORITY_NORMAL = 2;
194
+ EMBEDDING_PRIORITY_LOW = 3;
195
+ }
196
+
197
+ // Payload for embedding generation events
198
+ message EmbeddingGenerationPayload {
199
+ string source = 1;
200
+ Memory memory = 2;
201
+ EmbeddingPriority priority = 3;
202
+ optional int32 retry_count = 4;
203
+ optional int32 max_retries = 5;
204
+ repeated float embedding = 6;
205
+ optional string error = 7;
206
+ optional string run_id = 8;
207
+ }
208
+
209
+ // Control message action enumeration
210
+ enum ControlMessageAction {
211
+ CONTROL_MESSAGE_ACTION_UNSPECIFIED = 0;
212
+ CONTROL_MESSAGE_ACTION_DISABLE_INPUT = 1;
213
+ CONTROL_MESSAGE_ACTION_ENABLE_INPUT = 2;
214
+ }
215
+
216
+ // UI control payload
217
+ message UIControlPayload {
218
+ ControlMessageAction action = 1;
219
+ optional string target = 2;
220
+ optional string reason = 3;
221
+ optional int32 duration = 4;
222
+ }
223
+
224
+ // Control message
225
+ message ControlMessage {
226
+ string type = 1; // Always "control"
227
+ UIControlPayload payload = 2;
228
+ string room_id = 3;
229
+ }
230
+
231
+ // Payload for control message events
232
+ message ControlMessagePayload {
233
+ string source = 1;
234
+ ControlMessage message = 2;
235
+ }
@@ -0,0 +1,212 @@
1
+ // ipc.proto - Inter-Process Communication types for cross-language plugin interop
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "eliza/v1/components.proto";
7
+ import "eliza/v1/memory.proto";
8
+ import "eliza/v1/plugin.proto";
9
+ import "eliza/v1/service.proto";
10
+ import "eliza/v1/state.proto";
11
+ import "google/protobuf/struct.proto";
12
+
13
+ // Interop protocol enumeration
14
+ enum InteropProtocol {
15
+ INTEROP_PROTOCOL_UNSPECIFIED = 0;
16
+ INTEROP_PROTOCOL_WASM = 1;
17
+ INTEROP_PROTOCOL_FFI = 2;
18
+ INTEROP_PROTOCOL_IPC = 3;
19
+ INTEROP_PROTOCOL_NATIVE = 4;
20
+ }
21
+
22
+ // Plugin language enumeration
23
+ enum PluginLanguage {
24
+ PLUGIN_LANGUAGE_UNSPECIFIED = 0;
25
+ PLUGIN_LANGUAGE_TYPESCRIPT = 1;
26
+ PLUGIN_LANGUAGE_RUST = 2;
27
+ PLUGIN_LANGUAGE_PYTHON = 3;
28
+ }
29
+
30
+ // Plugin interop configuration
31
+ message PluginInteropConfig {
32
+ InteropProtocol protocol = 1;
33
+ optional string wasm_path = 2;
34
+ optional string shared_lib_path = 3;
35
+ optional string ipc_command = 4;
36
+ optional int32 ipc_port = 5;
37
+ optional string cwd = 6;
38
+ }
39
+
40
+ // Cross-language plugin manifest
41
+ message CrossLanguagePluginManifest {
42
+ string name = 1;
43
+ string description = 2;
44
+ string version = 3;
45
+ PluginLanguage language = 4;
46
+ optional PluginInteropConfig interop = 5;
47
+ map<string, string> config = 6;
48
+ repeated string dependencies = 7;
49
+ repeated ActionManifest actions = 8;
50
+ repeated ProviderManifest providers = 9;
51
+ repeated EvaluatorManifest evaluators = 10;
52
+ repeated ServiceManifest services = 11;
53
+ repeated RouteManifest routes = 12;
54
+ map<string, EventHandlerList> events = 13;
55
+ }
56
+
57
+ // Base IPC message
58
+ message IPCMessage {
59
+ string type = 1;
60
+ string id = 2;
61
+ }
62
+
63
+ // Action invocation request
64
+ message ActionInvokeRequest {
65
+ string type = 1; // "action.invoke"
66
+ string id = 2;
67
+ string action = 3;
68
+ Memory memory = 4;
69
+ optional State state = 5;
70
+ google.protobuf.Struct options = 6;
71
+ }
72
+
73
+ // Action result response
74
+ message ActionResultResponse {
75
+ string type = 1; // "action.result"
76
+ string id = 2;
77
+ ActionResult result = 3;
78
+ }
79
+
80
+ // Action validation request
81
+ message ActionValidateRequest {
82
+ string type = 1; // "action.validate"
83
+ string id = 2;
84
+ string action = 3;
85
+ Memory memory = 4;
86
+ optional State state = 5;
87
+ }
88
+
89
+ // Validation result response
90
+ message ValidationResponse {
91
+ string type = 1; // "validate.result"
92
+ string id = 2;
93
+ bool valid = 3;
94
+ }
95
+
96
+ // Provider get request
97
+ message ProviderGetRequest {
98
+ string type = 1; // "provider.get"
99
+ string id = 2;
100
+ string provider = 3;
101
+ Memory memory = 4;
102
+ State state = 5;
103
+ }
104
+
105
+ // Provider result response
106
+ message ProviderResultResponse {
107
+ string type = 1; // "provider.result"
108
+ string id = 2;
109
+ ProviderResult result = 3;
110
+ }
111
+
112
+ // Evaluator invocation request
113
+ message EvaluatorInvokeRequest {
114
+ string type = 1; // "evaluator.invoke"
115
+ string id = 2;
116
+ string evaluator = 3;
117
+ Memory memory = 4;
118
+ optional State state = 5;
119
+ }
120
+
121
+ // Service start request
122
+ message ServiceStartRequest {
123
+ string type = 1; // "service.start"
124
+ string id = 2;
125
+ string service = 3;
126
+ }
127
+
128
+ // Service stop request
129
+ message ServiceStopRequest {
130
+ string type = 1; // "service.stop"
131
+ string id = 2;
132
+ string service = 3;
133
+ }
134
+
135
+ // Service response
136
+ message ServiceResponse {
137
+ string type = 1; // "service.response"
138
+ string id = 2;
139
+ bool success = 3;
140
+ optional string error = 4;
141
+ }
142
+
143
+ // Route handler request
144
+ message RouteHandlerRequest {
145
+ string type = 1; // "route.handle"
146
+ string id = 2;
147
+ string path = 3;
148
+ string method = 4;
149
+ google.protobuf.Struct body = 5;
150
+ map<string, string> params = 6;
151
+ map<string, string> query = 7;
152
+ map<string, string> headers = 8;
153
+ }
154
+
155
+ // Route handler response
156
+ message RouteHandlerResponse {
157
+ string type = 1; // "route.response"
158
+ string id = 2;
159
+ int32 status = 3;
160
+ map<string, string> headers = 4;
161
+ google.protobuf.Value body = 5;
162
+ }
163
+
164
+ // Plugin initialization request
165
+ message PluginInitRequest {
166
+ string type = 1; // "plugin.init"
167
+ string id = 2;
168
+ map<string, string> config = 3;
169
+ }
170
+
171
+ // Plugin initialization response
172
+ message PluginInitResponse {
173
+ string type = 1; // "plugin.init.result"
174
+ string id = 2;
175
+ bool success = 3;
176
+ optional string error = 4;
177
+ }
178
+
179
+ // Error response
180
+ message ErrorResponse {
181
+ string type = 1; // "error"
182
+ string id = 2;
183
+ string error = 3;
184
+ google.protobuf.Struct details = 4;
185
+ }
186
+
187
+ // Union of all IPC request types
188
+ message IPCRequest {
189
+ oneof request {
190
+ ActionInvokeRequest action_invoke = 1;
191
+ ActionValidateRequest action_validate = 2;
192
+ ProviderGetRequest provider_get = 3;
193
+ EvaluatorInvokeRequest evaluator_invoke = 4;
194
+ ServiceStartRequest service_start = 5;
195
+ ServiceStopRequest service_stop = 6;
196
+ RouteHandlerRequest route_handle = 7;
197
+ PluginInitRequest plugin_init = 8;
198
+ }
199
+ }
200
+
201
+ // Union of all IPC response types
202
+ message IPCResponse {
203
+ oneof response {
204
+ ActionResultResponse action_result = 1;
205
+ ValidationResponse validation = 2;
206
+ ProviderResultResponse provider_result = 3;
207
+ ServiceResponse service = 4;
208
+ RouteHandlerResponse route = 5;
209
+ PluginInitResponse plugin_init = 6;
210
+ ErrorResponse error = 7;
211
+ }
212
+ }
@@ -0,0 +1,25 @@
1
+ // knowledge.proto - Knowledge types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "eliza/v1/memory.proto";
7
+ import "eliza/v1/primitives.proto";
8
+
9
+ // Represents a single item of knowledge stored by the agent.
10
+ message KnowledgeRecord {
11
+ // Unique identifier for the knowledge item (UUID string).
12
+ string id = 1;
13
+ // Content of the knowledge item.
14
+ Content content = 2;
15
+ // Optional metadata associated with this knowledge item.
16
+ optional MemoryMetadata metadata = 3;
17
+ }
18
+
19
+ // Directory-based knowledge source configuration.
20
+ message DirectoryItem {
21
+ // Path to a directory containing knowledge files.
22
+ string directory = 1;
23
+ // Whether this knowledge is shared across characters.
24
+ optional bool shared = 2;
25
+ }
@@ -0,0 +1,91 @@
1
+ // memory.proto - Memory types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "eliza/v1/primitives.proto";
7
+ import "google/protobuf/struct.proto";
8
+
9
+ // Base memory metadata
10
+ message BaseMetadata {
11
+ string type = 1;
12
+ optional string source = 2;
13
+ optional string source_id = 3;
14
+ optional string scope = 4;
15
+ optional int64 timestamp = 5;
16
+ repeated string tags = 6;
17
+ }
18
+
19
+ // Document-specific metadata
20
+ message DocumentMetadata {
21
+ BaseMetadata base = 1;
22
+ }
23
+
24
+ // Fragment-specific metadata
25
+ message FragmentMetadata {
26
+ BaseMetadata base = 1;
27
+ string document_id = 2;
28
+ int32 position = 3;
29
+ }
30
+
31
+ // Message-specific metadata
32
+ message MessageMetadata {
33
+ BaseMetadata base = 1;
34
+ optional string trajectory_step_id = 2;
35
+ optional string benchmark_context = 3;
36
+ }
37
+
38
+ // Description-specific metadata
39
+ message DescriptionMetadata {
40
+ BaseMetadata base = 1;
41
+ }
42
+
43
+ // Custom metadata with dynamic properties
44
+ message CustomMetadata {
45
+ BaseMetadata base = 1;
46
+ google.protobuf.Struct custom_data = 2;
47
+ }
48
+
49
+ // Union of all memory metadata types
50
+ message MemoryMetadata {
51
+ oneof metadata {
52
+ DocumentMetadata document = 1;
53
+ FragmentMetadata fragment = 2;
54
+ MessageMetadata message = 3;
55
+ DescriptionMetadata description = 4;
56
+ CustomMetadata custom = 5;
57
+ }
58
+ }
59
+
60
+ // Represents a stored memory/message
61
+ message Memory {
62
+ // Optional unique identifier
63
+ optional string id = 1;
64
+ // Associated entity ID
65
+ string entity_id = 2;
66
+ // Associated agent ID
67
+ optional string agent_id = 3;
68
+ // Optional creation timestamp in milliseconds since epoch
69
+ optional int64 created_at = 4;
70
+ // Memory content
71
+ Content content = 5;
72
+ // Optional embedding vector for semantic search
73
+ repeated float embedding = 6;
74
+ // Associated room ID
75
+ string room_id = 7;
76
+ // Associated world ID (optional)
77
+ optional string world_id = 8;
78
+ // Whether memory is unique (used to prevent duplicates)
79
+ optional bool unique = 9;
80
+ // Embedding similarity score (set when retrieved via search)
81
+ optional float similarity = 10;
82
+ // Metadata for the memory
83
+ optional MemoryMetadata metadata = 11;
84
+ }
85
+
86
+ // Specialized memory type for messages with enhanced type checking
87
+ message MessageMemory {
88
+ Memory memory = 1;
89
+ // Note: In proto, we can't enforce that content.text is required
90
+ // This should be validated at the application layer
91
+ }
@@ -0,0 +1,48 @@
1
+ // message_service.proto - Message processing types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "eliza/v1/memory.proto";
7
+ import "eliza/v1/primitives.proto";
8
+ import "eliza/v1/state.proto";
9
+
10
+ // Model type configuration for shouldRespond evaluation.
11
+ enum ShouldRespondModelType {
12
+ SHOULD_RESPOND_MODEL_TYPE_UNSPECIFIED = 0;
13
+ SHOULD_RESPOND_MODEL_TYPE_SMALL = 1;
14
+ SHOULD_RESPOND_MODEL_TYPE_LARGE = 2;
15
+ }
16
+
17
+ // Configuration options for message processing.
18
+ message MessageProcessingOptions {
19
+ optional int32 max_retries = 1;
20
+ optional int64 timeout_duration = 2;
21
+ optional bool use_multi_step = 3;
22
+ optional int32 max_multi_step_iterations = 4;
23
+ optional ShouldRespondModelType should_respond_model = 5;
24
+ }
25
+
26
+ // Processing mode used by message handler.
27
+ enum MessageProcessingMode {
28
+ MESSAGE_PROCESSING_MODE_UNSPECIFIED = 0;
29
+ MESSAGE_PROCESSING_MODE_SIMPLE = 1;
30
+ MESSAGE_PROCESSING_MODE_ACTIONS = 2;
31
+ MESSAGE_PROCESSING_MODE_NONE = 3;
32
+ }
33
+
34
+ // Result of message processing.
35
+ message MessageProcessingResult {
36
+ bool did_respond = 1;
37
+ optional Content response_content = 2;
38
+ repeated Memory response_messages = 3;
39
+ State state = 4;
40
+ optional MessageProcessingMode mode = 5;
41
+ }
42
+
43
+ // Response decision from the shouldRespond logic.
44
+ message ResponseDecision {
45
+ bool should_respond = 1;
46
+ bool skip_evaluation = 2;
47
+ string reason = 3;
48
+ }