@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,67 @@
1
+ // messaging.proto - Messaging 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
+ // Socket message type enumeration
10
+ enum SocketMessageType {
11
+ SOCKET_MESSAGE_TYPE_UNSPECIFIED = 0;
12
+ SOCKET_MESSAGE_TYPE_ROOM_JOINING = 1;
13
+ SOCKET_MESSAGE_TYPE_SEND_MESSAGE = 2;
14
+ SOCKET_MESSAGE_TYPE_MESSAGE = 3;
15
+ SOCKET_MESSAGE_TYPE_ACK = 4;
16
+ SOCKET_MESSAGE_TYPE_THINKING = 5;
17
+ SOCKET_MESSAGE_TYPE_CONTROL = 6;
18
+ }
19
+
20
+ // Target information for message routing
21
+ message TargetInfo {
22
+ string source = 1;
23
+ optional string room_id = 2;
24
+ optional string channel_id = 3;
25
+ optional string server_id = 4;
26
+ optional string entity_id = 5;
27
+ optional string thread_id = 6;
28
+ }
29
+
30
+ // Message stream chunk payload
31
+ message MessageStreamChunkPayload {
32
+ string message_id = 1;
33
+ string chunk = 2;
34
+ int32 index = 3;
35
+ string channel_id = 4;
36
+ string agent_id = 5;
37
+ }
38
+
39
+ // Message stream error payload
40
+ message MessageStreamErrorPayload {
41
+ string message_id = 1;
42
+ string channel_id = 2;
43
+ string agent_id = 3;
44
+ string error = 4;
45
+ optional string partial_text = 5;
46
+ }
47
+
48
+ // Handler options for async message processing
49
+ message MessageHandlerOptions {
50
+ // Note: Callbacks cannot be represented in proto
51
+ // These should be handled at the application layer
52
+ }
53
+
54
+ // Result of sending a message to an agent
55
+ message MessageResult {
56
+ string message_id = 1;
57
+ optional Memory user_message = 2;
58
+ repeated Content agent_responses = 3;
59
+ optional MessageUsage usage = 4;
60
+ }
61
+
62
+ // Usage information for billing
63
+ message MessageUsage {
64
+ int32 input_tokens = 1;
65
+ int32 output_tokens = 2;
66
+ string model = 3;
67
+ }
@@ -0,0 +1,183 @@
1
+ // model.proto - Model types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "google/protobuf/struct.proto";
7
+
8
+ // LLM Mode for overriding model selection
9
+ enum LLMMode {
10
+ LLM_MODE_UNSPECIFIED = 0;
11
+ LLM_MODE_DEFAULT = 1; // Use the model type as specified
12
+ LLM_MODE_SMALL = 2; // Override to use TEXT_SMALL
13
+ LLM_MODE_LARGE = 3; // Override to use TEXT_LARGE
14
+ }
15
+
16
+ // Model type enumeration
17
+ enum ModelType {
18
+ MODEL_TYPE_UNSPECIFIED = 0;
19
+ MODEL_TYPE_TEXT_SMALL = 1;
20
+ MODEL_TYPE_TEXT_LARGE = 2;
21
+ MODEL_TYPE_TEXT_EMBEDDING = 3;
22
+ MODEL_TYPE_TEXT_TOKENIZER_ENCODE = 4;
23
+ MODEL_TYPE_TEXT_TOKENIZER_DECODE = 5;
24
+ MODEL_TYPE_TEXT_REASONING_SMALL = 6;
25
+ MODEL_TYPE_TEXT_REASONING_LARGE = 7;
26
+ MODEL_TYPE_TEXT_COMPLETION = 8;
27
+ MODEL_TYPE_IMAGE = 9;
28
+ MODEL_TYPE_IMAGE_DESCRIPTION = 10;
29
+ MODEL_TYPE_TRANSCRIPTION = 11;
30
+ MODEL_TYPE_TEXT_TO_SPEECH = 12;
31
+ MODEL_TYPE_AUDIO = 13;
32
+ MODEL_TYPE_VIDEO = 14;
33
+ MODEL_TYPE_OBJECT_SMALL = 15;
34
+ MODEL_TYPE_OBJECT_LARGE = 16;
35
+ }
36
+
37
+ // Response format specification
38
+ message ResponseFormat {
39
+ string type = 1; // "json_object" | "text"
40
+ }
41
+
42
+ // Parameters for generating text using a language model
43
+ message GenerateTextParams {
44
+ string prompt = 1;
45
+ optional int32 max_tokens = 2;
46
+ optional int32 min_tokens = 3;
47
+ optional double temperature = 4;
48
+ optional double top_p = 5;
49
+ optional int32 top_k = 6;
50
+ optional double min_p = 7;
51
+ optional int32 seed = 8;
52
+ optional double repetition_penalty = 9;
53
+ optional double frequency_penalty = 10;
54
+ optional double presence_penalty = 11;
55
+ repeated string stop_sequences = 12;
56
+ optional string user = 13;
57
+ optional ResponseFormat response_format = 14;
58
+ optional bool stream = 15;
59
+ }
60
+
61
+ // Token usage information
62
+ message TokenUsage {
63
+ int32 prompt_tokens = 1;
64
+ int32 completion_tokens = 2;
65
+ int32 total_tokens = 3;
66
+ }
67
+
68
+ // Text stream chunk
69
+ message TextStreamChunk {
70
+ string text = 1;
71
+ bool done = 2;
72
+ }
73
+
74
+ // Options for the simplified generateText API
75
+ message GenerateTextOptions {
76
+ optional bool include_character = 1;
77
+ ModelType model_type = 2;
78
+ optional int32 max_tokens = 3;
79
+ optional double temperature = 4;
80
+ optional double frequency_penalty = 5;
81
+ optional double presence_penalty = 6;
82
+ repeated string stop_sequences = 7;
83
+ }
84
+
85
+ // Structured response from text generation
86
+ message GenerateTextResult {
87
+ string text = 1;
88
+ optional TokenUsage usage = 2;
89
+ }
90
+
91
+ // Parameters for text tokenization
92
+ message TokenizeTextParams {
93
+ string prompt = 1;
94
+ ModelType model_type = 2;
95
+ }
96
+
97
+ // Parameters for detokenization
98
+ message DetokenizeTextParams {
99
+ repeated int32 tokens = 1;
100
+ ModelType model_type = 2;
101
+ }
102
+
103
+ // Parameters for text embedding
104
+ message TextEmbeddingParams {
105
+ string text = 1;
106
+ }
107
+
108
+ // Parameters for image generation
109
+ message ImageGenerationParams {
110
+ string prompt = 1;
111
+ optional string size = 2;
112
+ optional int32 count = 3;
113
+ }
114
+
115
+ // Parameters for image description
116
+ message ImageDescriptionParams {
117
+ string image_url = 1;
118
+ optional string prompt = 2;
119
+ }
120
+
121
+ // Image description result
122
+ message ImageDescriptionResult {
123
+ string title = 1;
124
+ string description = 2;
125
+ }
126
+
127
+ // Parameters for transcription
128
+ message TranscriptionParams {
129
+ string audio_url = 1;
130
+ optional string prompt = 2;
131
+ }
132
+
133
+ // Parameters for text-to-speech
134
+ message TextToSpeechParams {
135
+ string text = 1;
136
+ optional string voice = 2;
137
+ optional double speed = 3;
138
+ }
139
+
140
+ // Parameters for audio processing
141
+ message AudioProcessingParams {
142
+ string audio_url = 1;
143
+ string processing_type = 2;
144
+ }
145
+
146
+ // Parameters for video processing
147
+ message VideoProcessingParams {
148
+ string video_url = 1;
149
+ string processing_type = 2;
150
+ }
151
+
152
+ // JSON Schema for object generation
153
+ message JSONSchema {
154
+ string type = 1;
155
+ map<string, JSONSchema> properties = 2;
156
+ repeated string required = 3;
157
+ optional JSONSchema items = 4;
158
+ google.protobuf.Struct extra = 5;
159
+ }
160
+
161
+ // Parameters for object generation
162
+ message ObjectGenerationParams {
163
+ string prompt = 1;
164
+ optional JSONSchema schema = 2;
165
+ optional string output = 3; // "object" | "array" | "enum"
166
+ repeated string enum_values = 4;
167
+ ModelType model_type = 5;
168
+ optional double temperature = 6;
169
+ optional int32 max_tokens = 7;
170
+ repeated string stop_sequences = 8;
171
+ }
172
+
173
+ // Image generation result
174
+ message ImageGenerationResult {
175
+ string url = 1;
176
+ }
177
+
178
+ // Model handler registration info
179
+ message ModelHandlerInfo {
180
+ string provider = 1;
181
+ optional int32 priority = 2;
182
+ optional int32 registration_order = 3;
183
+ }
@@ -0,0 +1,45 @@
1
+ // payment.proto - x402 payment schema types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "google/protobuf/struct.proto";
7
+
8
+ // Payment configuration definition for x402-enabled routes
9
+ message PaymentConfigDefinition {
10
+ string network = 1;
11
+ string asset_namespace = 2;
12
+ string asset_reference = 3;
13
+ string payment_address = 4;
14
+ string symbol = 5;
15
+ optional string chain_id = 6;
16
+ }
17
+
18
+ // x402 configuration for a paid route
19
+ message X402Config {
20
+ uint32 price_in_cents = 1;
21
+ repeated string payment_configs = 2;
22
+ }
23
+
24
+ // x402 "accepts" entry describing payment terms
25
+ message X402Accepts {
26
+ string scheme = 1;
27
+ string network = 2;
28
+ string max_amount_required = 3;
29
+ string resource = 4;
30
+ string description = 5;
31
+ string mime_type = 6;
32
+ string pay_to = 7;
33
+ uint32 max_timeout_seconds = 8;
34
+ string asset = 9;
35
+ optional google.protobuf.Struct output_schema = 10;
36
+ optional google.protobuf.Struct extra = 11;
37
+ }
38
+
39
+ // x402 payment-required response payload
40
+ message X402Response {
41
+ uint32 x402_version = 1;
42
+ optional string error = 2;
43
+ repeated X402Accepts accepts = 3;
44
+ optional string payer = 4;
45
+ }
@@ -0,0 +1,94 @@
1
+ // plugin.proto - Plugin types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "eliza/v1/agent.proto";
7
+ import "eliza/v1/components.proto";
8
+ import "eliza/v1/service.proto";
9
+ import "google/protobuf/struct.proto";
10
+ import "eliza/v1/payment.proto";
11
+
12
+ // HTTP method enumeration for routes
13
+ enum HttpMethod {
14
+ HTTP_METHOD_UNSPECIFIED = 0;
15
+ HTTP_METHOD_GET = 1;
16
+ HTTP_METHOD_POST = 2;
17
+ HTTP_METHOD_PUT = 3;
18
+ HTTP_METHOD_PATCH = 4;
19
+ HTTP_METHOD_DELETE = 5;
20
+ HTTP_METHOD_STATIC = 6;
21
+ }
22
+
23
+ // Route manifest for plugin routes
24
+ message RouteManifest {
25
+ HttpMethod method = 1;
26
+ string path = 2;
27
+ optional string name = 3;
28
+ optional bool public = 4;
29
+ optional bool is_multipart = 5;
30
+ optional string file_path = 6;
31
+ optional X402Config x402 = 7;
32
+ }
33
+
34
+ // JSON Schema type definition for component validation
35
+ message JSONSchemaDefinition {
36
+ string type = 1; // "string" | "number" | "boolean" | "object" | "array" | "null"
37
+ map<string, JSONSchemaDefinition> properties = 2;
38
+ optional JSONSchemaDefinition items = 3;
39
+ repeated string required = 4;
40
+ repeated string enum_values = 5;
41
+ optional string description = 6;
42
+ }
43
+
44
+ // Component type definition for entity components
45
+ message ComponentTypeDefinition {
46
+ string name = 1;
47
+ JSONSchemaDefinition schema = 2;
48
+ }
49
+
50
+ // Plugin manifest (metadata for cross-language interop)
51
+ message PluginManifest {
52
+ string name = 1;
53
+ string description = 2;
54
+
55
+ // Plugin configuration
56
+ map<string, string> config = 3;
57
+
58
+ // Component definitions
59
+ repeated ActionManifest actions = 4;
60
+ repeated ProviderManifest providers = 5;
61
+ repeated EvaluatorManifest evaluators = 6;
62
+ repeated ServiceManifest services = 7;
63
+ repeated RouteManifest routes = 8;
64
+ repeated ComponentTypeDefinition component_types = 9;
65
+
66
+ // Event handlers keyed by event type
67
+ map<string, EventHandlerList> events = 10;
68
+
69
+ // Dependencies
70
+ repeated string dependencies = 11;
71
+ repeated string test_dependencies = 12;
72
+
73
+ // Priority for plugin ordering
74
+ optional int32 priority = 13;
75
+
76
+ // Custom schema for plugin-specific configuration
77
+ google.protobuf.Struct schema = 14;
78
+ }
79
+
80
+ // List of event handler names
81
+ message EventHandlerList {
82
+ repeated string handlers = 1;
83
+ }
84
+
85
+ // Project agent configuration
86
+ message ProjectAgentManifest {
87
+ Character character = 1;
88
+ repeated string plugins = 2;
89
+ }
90
+
91
+ // Project manifest
92
+ message ProjectManifest {
93
+ repeated ProjectAgentManifest agents = 1;
94
+ }
@@ -0,0 +1,94 @@
1
+ // primitives.proto - Core primitive types for elizaOS
2
+ // Single source of truth for TypeScript, Python, and Rust
3
+ syntax = "proto3";
4
+
5
+ package eliza.v1;
6
+
7
+ import "google/protobuf/struct.proto";
8
+
9
+ // UUID string type (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
10
+ // Note: Proto doesn't have a native UUID type, so we use string
11
+ // Validation should be done at the application layer
12
+ message UUID {
13
+ string value = 1;
14
+ }
15
+
16
+ // The default/nil UUID used when no room or world is specified
17
+ // Value: 00000000-0000-0000-0000-000000000000
18
+ // Using a constant message pattern for language interop
19
+ message DefaultUUID {
20
+ string value = 1; // Always "00000000-0000-0000-0000-000000000000"
21
+ }
22
+
23
+ // Represents a media attachment
24
+ message Media {
25
+ // Unique identifier
26
+ string id = 1;
27
+ // Media URL
28
+ string url = 2;
29
+ // Media title
30
+ optional string title = 3;
31
+ // Media source
32
+ optional string source = 4;
33
+ // Media description
34
+ optional string description = 5;
35
+ // Text content
36
+ optional string text = 6;
37
+ // Content type (e.g. "image", "video", "audio", "document", "link")
38
+ optional string content_type = 7;
39
+ }
40
+
41
+ // Platform-provided metadata about mentions
42
+ // Contains ONLY technical facts from the platform API
43
+ message MentionContext {
44
+ // Platform native mention (@Discord, @Telegram, etc.)
45
+ bool is_mention = 1;
46
+ // Reply to agent's message
47
+ bool is_reply = 2;
48
+ // In a thread with agent
49
+ bool is_thread = 3;
50
+ // Platform-specific mention type for debugging/logging
51
+ optional string mention_type = 4; // "platform_mention" | "reply" | "thread" | "none"
52
+ }
53
+
54
+ // Represents the content of a memory, message, or other information.
55
+ // Primary data structure for messages exchanged between users, agents, and the system.
56
+ message Content {
57
+ // The agent's internal thought process
58
+ optional string thought = 1;
59
+ // The main text content visible to users
60
+ optional string text = 2;
61
+ // Actions to be performed
62
+ repeated string actions = 3;
63
+ // Providers to use for context generation
64
+ repeated string providers = 4;
65
+ // Source/origin of the content (e.g., 'discord', 'telegram')
66
+ optional string source = 5;
67
+ // Target/destination for responses
68
+ optional string target = 6;
69
+ // URL of the original message/post
70
+ optional string url = 7;
71
+ // UUID of parent message if this is a reply/thread
72
+ optional string in_reply_to = 8;
73
+ // Array of media attachments
74
+ repeated Media attachments = 9;
75
+ // Channel type where this content was sent
76
+ optional string channel_type = 10;
77
+ // Platform-provided metadata about mentions
78
+ optional MentionContext mention_context = 11;
79
+ // Internal message ID used for streaming coordination
80
+ optional string response_message_id = 12;
81
+ // Response ID for message tracking
82
+ optional string response_id = 13;
83
+ // Whether this is a simple response (no actions required)
84
+ optional bool simple = 14;
85
+ // Type marker for internal use
86
+ optional string type = 15;
87
+ // Additional dynamic properties for plugin extensions
88
+ google.protobuf.Struct data = 16;
89
+ }
90
+
91
+ // Generic metadata type (JSON-serializable key-value pairs)
92
+ message Metadata {
93
+ google.protobuf.Struct values = 1;
94
+ }
@@ -0,0 +1,43 @@
1
+ // prompts.proto - Prompt-related data structures for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "google/protobuf/struct.proto";
7
+
8
+ // Information about a field for prompt building.
9
+ message PromptFieldInfo {
10
+ string id = 1;
11
+ string type = 2;
12
+ string label = 3;
13
+ optional string description = 4;
14
+ optional string criteria = 5;
15
+ }
16
+
17
+ // Options for building a prompt from a template.
18
+ message BuildPromptOptions {
19
+ // Template string (function templates are runtime-only).
20
+ string template = 1;
21
+ // State values to substitute into the template.
22
+ google.protobuf.Struct state = 2;
23
+ // Optional default values for template variables.
24
+ map<string, string> defaults = 3;
25
+ }
26
+
27
+ // Result of building a prompt from a template.
28
+ message BuiltPrompt {
29
+ string prompt = 1;
30
+ optional string system = 2;
31
+ repeated string substituted_variables = 3;
32
+ repeated string missing_variables = 4;
33
+ }
34
+
35
+ // Configuration for a prompt template.
36
+ message PromptTemplateConfig {
37
+ string template = 1;
38
+ string name = 2;
39
+ optional string description = 3;
40
+ map<string, string> defaults = 4;
41
+ repeated string required_variables = 5;
42
+ repeated string optional_variables = 6;
43
+ }
@@ -0,0 +1,43 @@
1
+ // service.proto - Service types for elizaOS
2
+ syntax = "proto3";
3
+
4
+ package eliza.v1;
5
+
6
+ import "google/protobuf/struct.proto";
7
+
8
+ // Service type enumeration
9
+ enum ServiceType {
10
+ SERVICE_TYPE_UNSPECIFIED = 0;
11
+ SERVICE_TYPE_TRANSCRIPTION = 1;
12
+ SERVICE_TYPE_VIDEO = 2;
13
+ SERVICE_TYPE_BROWSER = 3;
14
+ SERVICE_TYPE_PDF = 4;
15
+ SERVICE_TYPE_REMOTE_FILES = 5; // aws_s3
16
+ SERVICE_TYPE_WEB_SEARCH = 6;
17
+ SERVICE_TYPE_EMAIL = 7;
18
+ SERVICE_TYPE_TEE = 8;
19
+ SERVICE_TYPE_TASK = 9;
20
+ SERVICE_TYPE_WALLET = 10;
21
+ SERVICE_TYPE_LP_POOL = 11;
22
+ SERVICE_TYPE_TOKEN_DATA = 12;
23
+ SERVICE_TYPE_MESSAGE_SERVICE = 13;
24
+ SERVICE_TYPE_MESSAGE = 14;
25
+ SERVICE_TYPE_POST = 15;
26
+ SERVICE_TYPE_UNKNOWN = 16;
27
+ }
28
+
29
+ // Service manifest (metadata only, for cross-language interop)
30
+ message ServiceManifest {
31
+ ServiceType type = 1;
32
+ optional string description = 2;
33
+ optional string capability_description = 3;
34
+ google.protobuf.Struct config = 4;
35
+ }
36
+
37
+ // Standardized service error type
38
+ message ServiceError {
39
+ string code = 1;
40
+ string message = 2;
41
+ google.protobuf.Struct details = 3;
42
+ optional string cause = 4;
43
+ }