@elizaos/schemas 2.0.0-alpha.535 → 2.0.0-alpha.537
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.
- package/README.md +4 -22
- package/buf.gen.yaml +4 -16
- package/package.json +5 -4
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# elizaOS Protocol Buffer Schemas
|
|
2
2
|
|
|
3
|
-
This directory contains the **single source of truth** for all elizaOS types. These Protocol Buffer schemas are compiled to generate type definitions
|
|
3
|
+
This directory contains the **single source of truth** for all elizaOS types. These Protocol Buffer schemas are compiled to generate TypeScript type definitions.
|
|
4
4
|
|
|
5
5
|
## Architecture
|
|
6
6
|
|
|
@@ -26,9 +26,7 @@ schemas/
|
|
|
26
26
|
└── README.md
|
|
27
27
|
|
|
28
28
|
Generated output:
|
|
29
|
-
|
|
30
|
-
├── packages/python/elizaos/types/generated/ # Python
|
|
31
|
-
└── packages/rust/src/types/generated/ # Rust
|
|
29
|
+
└── packages/core/src/types/generated/ # TypeScript
|
|
32
30
|
```
|
|
33
31
|
|
|
34
32
|
## Quick Start
|
|
@@ -129,18 +127,6 @@ message Content {
|
|
|
129
127
|
- Import from `@elizaos/core/types/generated`
|
|
130
128
|
- Full TypeScript types with proper inference
|
|
131
129
|
|
|
132
|
-
### Python
|
|
133
|
-
|
|
134
|
-
- Generated with `betterproto` for clean, Pythonic code
|
|
135
|
-
- Dataclass-style types with type hints
|
|
136
|
-
- Import from `elizaos.types.generated`
|
|
137
|
-
|
|
138
|
-
### Rust
|
|
139
|
-
|
|
140
|
-
- Generated with `prost` (WASM-compatible)
|
|
141
|
-
- Includes `serde` support for JSON serialization
|
|
142
|
-
- Import from `elizaos::types::generated`
|
|
143
|
-
|
|
144
130
|
## Adding New Types
|
|
145
131
|
|
|
146
132
|
1. Create or edit a `.proto` file in `eliza/v1/`
|
|
@@ -157,16 +143,14 @@ message Content {
|
|
|
157
143
|
|
|
158
144
|
The generated types replace the manual type definitions in:
|
|
159
145
|
|
|
160
|
-
- `packages/
|
|
161
|
-
- `packages/python/elizaos/types/*.py`
|
|
162
|
-
- `packages/rust/src/types/*.rs`
|
|
146
|
+
- `packages/core/src/types/*.ts`
|
|
163
147
|
|
|
164
148
|
### Compatibility Layer
|
|
165
149
|
|
|
166
150
|
During migration, a compatibility layer re-exports generated types with the original names. This allows gradual migration:
|
|
167
151
|
|
|
168
152
|
```typescript
|
|
169
|
-
// packages/
|
|
153
|
+
// packages/core/src/types/index.ts
|
|
170
154
|
export * from "./generated";
|
|
171
155
|
export { Memory as MemoryType } from "./generated/eliza/v1/memory_pb";
|
|
172
156
|
```
|
|
@@ -195,5 +179,3 @@ buf format -w
|
|
|
195
179
|
- [Buf Documentation](https://buf.build/docs)
|
|
196
180
|
- [Protocol Buffers Language Guide](https://protobuf.dev/programming-guides/proto3/)
|
|
197
181
|
- [bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es) (TypeScript)
|
|
198
|
-
- [danielgtaylor/python-betterproto](https://github.com/danielgtaylor/python-betterproto) (Python)
|
|
199
|
-
- [tokio-rs/prost](https://github.com/tokio-rs/prost) (Rust)
|
package/buf.gen.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# buf.gen.yaml - Code generation configuration
|
|
1
|
+
# buf.gen.yaml - Code generation configuration (TypeScript)
|
|
2
2
|
version: v2
|
|
3
3
|
|
|
4
4
|
managed:
|
|
@@ -8,21 +8,9 @@ managed:
|
|
|
8
8
|
value: github.com/elizaos/eliza/gen/go
|
|
9
9
|
|
|
10
10
|
plugins:
|
|
11
|
-
# TypeScript generation using
|
|
12
|
-
-
|
|
13
|
-
out: ../
|
|
11
|
+
# TypeScript generation using local protoc-gen-es (avoids BSR remote plugin rate limits).
|
|
12
|
+
- local: protoc-gen-es
|
|
13
|
+
out: ../core/src/types/generated
|
|
14
14
|
opt:
|
|
15
15
|
- target=ts
|
|
16
16
|
- import_extension=.js
|
|
17
|
-
|
|
18
|
-
# Python generation using standard protobuf
|
|
19
|
-
- remote: buf.build/protocolbuffers/python:v29.3
|
|
20
|
-
out: ../python/elizaos/types/generated
|
|
21
|
-
|
|
22
|
-
# Python type stubs
|
|
23
|
-
- remote: buf.build/protocolbuffers/pyi:v29.3
|
|
24
|
-
out: ../python/elizaos/types/generated
|
|
25
|
-
|
|
26
|
-
# Rust generation using prost (WASM-compatible)
|
|
27
|
-
- remote: buf.build/community/neoeinstein-prost:v0.4.0
|
|
28
|
-
out: ../rust/src/types/generated
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/schemas",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.537",
|
|
4
4
|
"description": "Protocol Buffer schemas for elizaOS - single source of truth for all types",
|
|
5
5
|
"files": [
|
|
6
6
|
"eliza",
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"generate:ts": "buf generate --template buf.gen.ts.yaml",
|
|
20
20
|
"generate:py": "buf generate --template buf.gen.py.yaml",
|
|
21
21
|
"generate:rs": "buf generate --template buf.gen.rs.yaml",
|
|
22
|
-
"clean": "rm -rf ../
|
|
22
|
+
"clean": "rm -rf ../core/src/types/generated ../python/elizaos/types/generated ../rust/src/types/generated",
|
|
23
23
|
"build": "npm run lint && npm run generate",
|
|
24
24
|
"test": "buf lint --path eliza --disable-symlinks"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@bufbuild/buf": "^1.47.2"
|
|
27
|
+
"@bufbuild/buf": "^1.47.2",
|
|
28
|
+
"@bufbuild/protoc-gen-es": "^2.2.2"
|
|
28
29
|
},
|
|
29
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "cb192f7b21c441e9463d1af2f890c145814baad2"
|
|
30
31
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|