@elizaos/core 2.0.0-alpha.7 → 2.0.0-alpha.70

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.
Files changed (132) hide show
  1. package/README.md +213 -16
  2. package/dist/testing/index.js +22 -0
  3. package/dist/testing/index.js.map +9 -0
  4. package/package.json +46 -27
  5. package/dist/actions.d.ts +0 -22
  6. package/dist/actions.d.ts.map +0 -1
  7. package/dist/browser/index.browser.js +0 -771
  8. package/dist/browser/index.browser.js.map +0 -427
  9. package/dist/browser/index.d.ts +0 -2
  10. package/dist/character.d.ts +0 -39
  11. package/dist/character.d.ts.map +0 -1
  12. package/dist/constants/index.d.ts +0 -7
  13. package/dist/constants/secrets.d.ts +0 -67
  14. package/dist/database.d.ts +0 -494
  15. package/dist/database.d.ts.map +0 -1
  16. package/dist/elizaos.d.ts +0 -194
  17. package/dist/elizaos.d.ts.map +0 -1
  18. package/dist/entities.d.ts +0 -40
  19. package/dist/entities.d.ts.map +0 -1
  20. package/dist/index.browser.d.ts +0 -39
  21. package/dist/index.browser.d.ts.map +0 -1
  22. package/dist/index.d.ts +0 -40
  23. package/dist/index.d.ts.map +0 -1
  24. package/dist/index.js +0 -2
  25. package/dist/index.node.d.ts +0 -37
  26. package/dist/index.node.d.ts.map +0 -1
  27. package/dist/logger.d.ts +0 -72
  28. package/dist/logger.d.ts.map +0 -1
  29. package/dist/memory.d.ts +0 -63
  30. package/dist/memory.d.ts.map +0 -1
  31. package/dist/node/index.d.ts +0 -2
  32. package/dist/node/index.node.js +0 -53403
  33. package/dist/node/index.node.js.map +0 -511
  34. package/dist/onboarding-state.d.ts +0 -209
  35. package/dist/plugin.d.ts +0 -55
  36. package/dist/plugin.d.ts.map +0 -1
  37. package/dist/prompts.d.ts +0 -7
  38. package/dist/prompts.d.ts.map +0 -1
  39. package/dist/request-context.d.ts +0 -142
  40. package/dist/request-context.d.ts.map +0 -1
  41. package/dist/request-context.node.d.ts +0 -36
  42. package/dist/request-context.node.d.ts.map +0 -1
  43. package/dist/roles.d.ts +0 -23
  44. package/dist/roles.d.ts.map +0 -1
  45. package/dist/runtime.d.ts +0 -366
  46. package/dist/runtime.d.ts.map +0 -1
  47. package/dist/schemas/character.d.ts +0 -151
  48. package/dist/schemas/character.d.ts.map +0 -1
  49. package/dist/search.d.ts +0 -316
  50. package/dist/search.d.ts.map +0 -1
  51. package/dist/secrets.d.ts +0 -11
  52. package/dist/secrets.d.ts.map +0 -1
  53. package/dist/services/default-message-service.d.ts +0 -69
  54. package/dist/services/default-message-service.d.ts.map +0 -1
  55. package/dist/services/message-service.d.ts +0 -171
  56. package/dist/services/message-service.d.ts.map +0 -1
  57. package/dist/services.d.ts +0 -56
  58. package/dist/services.d.ts.map +0 -1
  59. package/dist/sessions/index.d.ts +0 -10
  60. package/dist/sessions/paths.d.ts +0 -56
  61. package/dist/sessions/provider.d.ts +0 -73
  62. package/dist/sessions/session-key.d.ts +0 -133
  63. package/dist/sessions/store.d.ts +0 -75
  64. package/dist/sessions/types.d.ts +0 -195
  65. package/dist/settings.d.ts +0 -90
  66. package/dist/settings.d.ts.map +0 -1
  67. package/dist/streaming-context.browser.d.ts +0 -26
  68. package/dist/streaming-context.browser.d.ts.map +0 -1
  69. package/dist/streaming-context.d.ts +0 -95
  70. package/dist/streaming-context.d.ts.map +0 -1
  71. package/dist/streaming-context.node.d.ts +0 -15
  72. package/dist/streaming-context.node.d.ts.map +0 -1
  73. package/dist/types/agent.d.ts +0 -97
  74. package/dist/types/agent.d.ts.map +0 -1
  75. package/dist/types/components.d.ts +0 -155
  76. package/dist/types/components.d.ts.map +0 -1
  77. package/dist/types/database.d.ts +0 -414
  78. package/dist/types/database.d.ts.map +0 -1
  79. package/dist/types/elizaos.d.ts +0 -159
  80. package/dist/types/elizaos.d.ts.map +0 -1
  81. package/dist/types/environment.d.ts +0 -116
  82. package/dist/types/environment.d.ts.map +0 -1
  83. package/dist/types/events.d.ts +0 -203
  84. package/dist/types/events.d.ts.map +0 -1
  85. package/dist/types/index.d.ts +0 -20
  86. package/dist/types/index.d.ts.map +0 -1
  87. package/dist/types/knowledge.d.ts +0 -30
  88. package/dist/types/knowledge.d.ts.map +0 -1
  89. package/dist/types/memory.d.ts +0 -102
  90. package/dist/types/memory.d.ts.map +0 -1
  91. package/dist/types/messaging.d.ts +0 -137
  92. package/dist/types/messaging.d.ts.map +0 -1
  93. package/dist/types/model.d.ts +0 -513
  94. package/dist/types/model.d.ts.map +0 -1
  95. package/dist/types/plugin.d.ts +0 -91
  96. package/dist/types/plugin.d.ts.map +0 -1
  97. package/dist/types/primitives.d.ts +0 -96
  98. package/dist/types/primitives.d.ts.map +0 -1
  99. package/dist/types/runtime.d.ts +0 -140
  100. package/dist/types/runtime.d.ts.map +0 -1
  101. package/dist/types/service.d.ts +0 -150
  102. package/dist/types/service.d.ts.map +0 -1
  103. package/dist/types/settings.d.ts +0 -29
  104. package/dist/types/settings.d.ts.map +0 -1
  105. package/dist/types/state.d.ts +0 -56
  106. package/dist/types/state.d.ts.map +0 -1
  107. package/dist/types/streaming.d.ts +0 -71
  108. package/dist/types/streaming.d.ts.map +0 -1
  109. package/dist/types/task.d.ts +0 -67
  110. package/dist/types/task.d.ts.map +0 -1
  111. package/dist/types/tee.d.ts +0 -96
  112. package/dist/types/tee.d.ts.map +0 -1
  113. package/dist/types/testing.d.ts +0 -28
  114. package/dist/types/testing.d.ts.map +0 -1
  115. package/dist/utils/buffer.d.ts +0 -104
  116. package/dist/utils/buffer.d.ts.map +0 -1
  117. package/dist/utils/crypto-compat.d.ts +0 -183
  118. package/dist/utils/crypto-compat.d.ts.map +0 -1
  119. package/dist/utils/environment.d.ts +0 -50
  120. package/dist/utils/environment.d.ts.map +0 -1
  121. package/dist/utils/node.d.ts +0 -5
  122. package/dist/utils/node.d.ts.map +0 -1
  123. package/dist/utils/paths.d.ts +0 -92
  124. package/dist/utils/paths.d.ts.map +0 -1
  125. package/dist/utils/server-health.d.ts +0 -22
  126. package/dist/utils/server-health.d.ts.map +0 -1
  127. package/dist/utils/streaming.d.ts +0 -179
  128. package/dist/utils/streaming.d.ts.map +0 -1
  129. package/dist/utils/type-guards.d.ts +0 -23
  130. package/dist/utils/type-guards.d.ts.map +0 -1
  131. package/dist/utils.d.ts +0 -182
  132. package/dist/utils.d.ts.map +0 -1
package/dist/runtime.d.ts DELETED
@@ -1,366 +0,0 @@
1
- import type { IMessageService } from './services/message-service';
2
- import { ChannelType, type Content, type MemoryMetadata, type Character, type Action, type Evaluator, type Provider, type HandlerCallback, type IDatabaseAdapter, type Entity, type Room, type World, type SendHandlerFunction, type TargetInfo, type ModelParamsMap, type ModelResultMap, type ModelTypeName, type Plugin, type RuntimeEventStorage, type Route, type UUID, type Service, type ServiceTypeName, type State, type TaskWorker, type Agent, type Log, type Participant, type Relationship, type Task, type Memory, type ModelHandler, type RuntimeSettings, type Component, IAgentRuntime, type IElizaOS, type ActionResult, type GenerateTextOptions, type GenerateTextResult, type EventPayload, type EventPayloadMap, type EventHandler } from './types';
3
- export declare class Semaphore {
4
- private permits;
5
- private waiting;
6
- constructor(count: number);
7
- acquire(): Promise<void>;
8
- release(): void;
9
- }
10
- export declare class AgentRuntime implements IAgentRuntime {
11
- #private;
12
- readonly agentId: UUID;
13
- readonly character: Character;
14
- adapter: IDatabaseAdapter;
15
- readonly actions: Action[];
16
- readonly evaluators: Evaluator[];
17
- readonly providers: Provider[];
18
- readonly plugins: Plugin[];
19
- events: RuntimeEventStorage;
20
- stateCache: Map<string, State>;
21
- readonly fetch: typeof fetch;
22
- services: Map<ServiceTypeName, Service[]>;
23
- private serviceTypes;
24
- models: Map<string, ModelHandler<Record<string, unknown>, unknown>[]>;
25
- routes: Route[];
26
- private taskWorkers;
27
- private sendHandlers;
28
- private eventHandlers;
29
- /**
30
- * Reference to the ElizaOS instance that created this runtime
31
- * Set by ElizaOS when runtime is registered
32
- * @optional
33
- */
34
- elizaOS?: IElizaOS;
35
- private allAvailablePlugins;
36
- private characterPlugins;
37
- logger: import("./logger").Logger;
38
- private settings;
39
- private servicePromiseHandlers;
40
- private servicePromises;
41
- private serviceRegistrationStatus;
42
- initPromise: Promise<void>;
43
- private initResolver;
44
- private initRejecter;
45
- private currentRunId?;
46
- private currentRoomId?;
47
- private currentActionContext?;
48
- private maxWorkingMemoryEntries;
49
- messageService: IMessageService | null;
50
- constructor(opts: {
51
- conversationLength?: number;
52
- agentId?: UUID;
53
- character?: Character;
54
- plugins?: Plugin[];
55
- fetch?: typeof fetch;
56
- adapter?: IDatabaseAdapter;
57
- settings?: RuntimeSettings;
58
- allAvailablePlugins?: Plugin[];
59
- });
60
- /**
61
- * Create a new run ID for tracking a sequence of model calls
62
- */
63
- createRunId(): UUID;
64
- /**
65
- * Start a new run for tracking prompts
66
- * @param roomId Optional room ID to associate logs with this conversation
67
- */
68
- startRun(roomId?: UUID): UUID;
69
- /**
70
- * End the current run
71
- */
72
- endRun(): void;
73
- /**
74
- * Get the current run ID (creates one if it doesn't exist)
75
- */
76
- getCurrentRunId(): UUID;
77
- registerPlugin(plugin: Plugin): Promise<void>;
78
- getAllServices(): Map<ServiceTypeName, Service[]>;
79
- stop(): Promise<void>;
80
- initialize(options?: {
81
- skipMigrations?: boolean;
82
- }): Promise<void>;
83
- private mergeAgentSettings;
84
- runPluginMigrations(): Promise<void>;
85
- getConnection(): Promise<unknown>;
86
- setSetting(key: string, value: string | boolean | null, secret?: boolean): void;
87
- getSetting(key: string): string | boolean | number | null;
88
- getConversationLength(): number;
89
- registerDatabaseAdapter(adapter: IDatabaseAdapter): void;
90
- registerProvider(provider: Provider): void;
91
- registerAction(action: Action): void;
92
- registerEvaluator(evaluator: Evaluator): void;
93
- private updateActionPlan;
94
- private updateActionStep;
95
- processActions(message: Memory, responses: Memory[], state?: State, callback?: HandlerCallback, processOptions?: {
96
- onStreamChunk?: (chunk: string, messageId?: UUID) => Promise<void>;
97
- }): Promise<void>;
98
- getActionResults(messageId: UUID): ActionResult[];
99
- evaluate(message: Memory, state: State, didRespond?: boolean, callback?: HandlerCallback, responses?: Memory[]): Promise<Evaluator[]>;
100
- ensureConnections(entities: Entity[], rooms: Room[], source: string, world: World): Promise<void>;
101
- ensureConnection({ entityId, roomId, worldId, worldName, userName, name, source, type, channelId, messageServerId, userId, metadata, }: {
102
- entityId: UUID;
103
- roomId: UUID;
104
- worldId: UUID;
105
- worldName?: string;
106
- userName?: string;
107
- name?: string;
108
- source?: string;
109
- type?: ChannelType;
110
- channelId?: string;
111
- messageServerId?: UUID;
112
- userId?: UUID;
113
- metadata?: Record<string, unknown>;
114
- }): Promise<void>;
115
- ensureParticipantInRoom(entityId: UUID, roomId: UUID): Promise<void>;
116
- removeParticipant(entityId: UUID, roomId: UUID): Promise<boolean>;
117
- getParticipantsForEntity(entityId: UUID): Promise<Participant[]>;
118
- getParticipantsForRoom(roomId: UUID): Promise<UUID[]>;
119
- isRoomParticipant(roomId: UUID, entityId: UUID): Promise<boolean>;
120
- addParticipant(entityId: UUID, roomId: UUID): Promise<boolean>;
121
- addParticipantsRoom(entityIds: UUID[], roomId: UUID): Promise<boolean>;
122
- /**
123
- * Ensure the existence of a world.
124
- */
125
- ensureWorldExists({ id, name, messageServerId, metadata }: World): Promise<void>;
126
- ensureRoomExists({ id, name, source, type, channelId, messageServerId, worldId, metadata, }: Room): Promise<void>;
127
- composeState(message: Memory, includeList?: string[] | null, onlyInclude?: boolean, skipCache?: boolean): Promise<State>;
128
- getService<T extends Service = Service>(serviceName: ServiceTypeName | string): T | null;
129
- /**
130
- * Type-safe service getter that ensures the correct service type is returned
131
- * @template T - The expected service class type
132
- * @param serviceName - The service type name
133
- * @returns The service instance with proper typing, or null if not found
134
- */
135
- getTypedService<T extends Service = Service>(serviceName: ServiceTypeName | string): T | null;
136
- /**
137
- * Get all services of a specific type
138
- * @template T - The expected service class type
139
- * @param serviceName - The service type name
140
- * @returns Array of service instances with proper typing
141
- */
142
- getServicesByType<T extends Service = Service>(serviceName: ServiceTypeName | string): T[];
143
- /**
144
- * Get all registered service types
145
- * @returns Array of registered service type names
146
- */
147
- getRegisteredServiceTypes(): ServiceTypeName[];
148
- /**
149
- * Check if a service type is registered
150
- * @param serviceType - The service type to check
151
- * @returns true if the service is registered
152
- */
153
- hasService(serviceType: ServiceTypeName | string): boolean;
154
- /**
155
- * Get the registration status of a service
156
- * @param serviceType - The service type to check
157
- * @returns the current registration status
158
- */
159
- getServiceRegistrationStatus(serviceType: ServiceTypeName | string): 'pending' | 'registering' | 'registered' | 'failed' | 'unknown';
160
- /**
161
- * Get service health information
162
- * @returns Object containing service health status
163
- */
164
- getServiceHealth(): Record<string, {
165
- status: 'pending' | 'registering' | 'registered' | 'failed' | 'unknown';
166
- instances: number;
167
- hasPromise: boolean;
168
- }>;
169
- registerService(serviceDef: typeof Service): Promise<void>;
170
- private _createServiceResolver;
171
- getServiceLoadPromise(serviceType: ServiceTypeName): Promise<Service>;
172
- registerModel(modelType: ModelTypeName | string, handler: (runtime: IAgentRuntime, params: Record<string, unknown>) => Promise<unknown>, provider: string, priority?: number): void;
173
- getModel(modelType: ModelTypeName | string): ((runtime: IAgentRuntime, params: Record<string, unknown>) => Promise<unknown>) | undefined;
174
- /**
175
- * Retrieves model configuration settings from character settings with support for
176
- * model-specific overrides and default fallbacks.
177
- *
178
- * Precedence order (highest to lowest):
179
- * 1. Model-specific settings (e.g., TEXT_SMALL_TEMPERATURE)
180
- * 2. Default settings (e.g., DEFAULT_TEMPERATURE)
181
- * 3. Legacy settings for backwards compatibility (e.g., MODEL_TEMPERATURE)
182
- *
183
- * @param modelType The specific model type to get settings for
184
- * @returns Object containing model parameters if they exist, or null if no settings are configured
185
- */
186
- private getModelSettings;
187
- /**
188
- * Helper to log model calls to the database (used by both streaming and non-streaming paths)
189
- */
190
- private logModelCall;
191
- useModel<T extends keyof ModelParamsMap, R = ModelResultMap[T]>(modelType: T, params: ModelParamsMap[T], provider?: string): Promise<R>;
192
- /**
193
- * Simplified text generation with optional character context.
194
- */
195
- generateText(input: string, options?: GenerateTextOptions): Promise<GenerateTextResult>;
196
- registerEvent<T extends keyof EventPayloadMap>(event: T, handler: EventHandler<T>): void;
197
- registerEvent<P extends EventPayload = EventPayload>(event: string, handler: (params: P) => Promise<void>): void;
198
- getEvent(event: string): ((params: unknown) => Promise<void>)[] | undefined;
199
- emitEvent(event: string | string[], params: unknown): Promise<void>;
200
- ensureEmbeddingDimension(): Promise<void>;
201
- registerTaskWorker(taskHandler: TaskWorker): void;
202
- getTaskWorker(name: string): TaskWorker | undefined;
203
- get db(): unknown;
204
- init(): Promise<void>;
205
- close(): Promise<void>;
206
- getAgent(agentId: UUID): Promise<Agent | null>;
207
- getAgents(): Promise<Partial<Agent>[]>;
208
- createAgent(agent: Partial<Agent>): Promise<boolean>;
209
- updateAgent(agentId: UUID, agent: Partial<Agent>): Promise<boolean>;
210
- deleteAgent(agentId: UUID): Promise<boolean>;
211
- ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
212
- getEntityById(entityId: UUID): Promise<Entity | null>;
213
- getEntitiesByIds(entityIds: UUID[]): Promise<Entity[] | null>;
214
- getEntitiesForRoom(roomId: UUID, includeComponents?: boolean): Promise<Entity[]>;
215
- createEntity(entity: Entity): Promise<boolean>;
216
- /**
217
- * Ensures entity exists, creating if needed.
218
- * @param entity - The entity to ensure exists
219
- * @returns Input entity on success (not re-fetched to avoid extra query), null on failure
220
- */
221
- ensureEntity(entity: Entity): Promise<Entity | null>;
222
- createEntities(entities: Entity[]): Promise<boolean>;
223
- updateEntity(entity: Entity): Promise<void>;
224
- getComponent(entityId: UUID, type: string, worldId?: UUID, sourceEntityId?: UUID): Promise<Component | null>;
225
- getComponents(entityId: UUID, worldId?: UUID, sourceEntityId?: UUID): Promise<Component[]>;
226
- createComponent(component: Component): Promise<boolean>;
227
- updateComponent(component: Component): Promise<void>;
228
- deleteComponent(componentId: UUID): Promise<void>;
229
- addEmbeddingToMemory(memory: Memory): Promise<Memory>;
230
- queueEmbeddingGeneration(memory: Memory, priority?: 'high' | 'normal' | 'low'): Promise<void>;
231
- getMemories(params: {
232
- entityId?: UUID;
233
- agentId?: UUID;
234
- roomId?: UUID;
235
- count?: number;
236
- unique?: boolean;
237
- tableName: string;
238
- start?: number;
239
- end?: number;
240
- }): Promise<Memory[]>;
241
- getAllMemories(): Promise<Memory[]>;
242
- getMemoryById(id: UUID): Promise<Memory | null>;
243
- getMemoriesByIds(ids: UUID[], tableName?: string): Promise<Memory[]>;
244
- getMemoriesByRoomIds(params: {
245
- tableName: string;
246
- roomIds: UUID[];
247
- limit?: number;
248
- }): Promise<Memory[]>;
249
- getCachedEmbeddings(params: {
250
- query_table_name: string;
251
- query_threshold: number;
252
- query_input: string;
253
- query_field_name: string;
254
- query_field_sub_name: string;
255
- query_match_count: number;
256
- }): Promise<{
257
- embedding: number[];
258
- levenshtein_score: number;
259
- }[]>;
260
- log(params: {
261
- body: {
262
- [key: string]: unknown;
263
- };
264
- entityId: UUID;
265
- roomId: UUID;
266
- type: string;
267
- }): Promise<void>;
268
- searchMemories(params: {
269
- embedding: number[];
270
- query?: string;
271
- match_threshold?: number;
272
- count?: number;
273
- roomId?: UUID;
274
- unique?: boolean;
275
- worldId?: UUID;
276
- entityId?: UUID;
277
- tableName: string;
278
- }): Promise<Memory[]>;
279
- rerankMemories(query: string, memories: Memory[]): Promise<Memory[]>;
280
- createMemory(memory: Memory, tableName: string, unique?: boolean): Promise<UUID>;
281
- updateMemory(memory: Partial<Memory> & {
282
- id: UUID;
283
- metadata?: MemoryMetadata;
284
- }): Promise<boolean>;
285
- deleteMemory(memoryId: UUID): Promise<void>;
286
- deleteManyMemories(memoryIds: UUID[]): Promise<void>;
287
- clearAllAgentMemories(): Promise<void>;
288
- deleteAllMemories(roomId: UUID, tableName: string): Promise<void>;
289
- countMemories(roomId: UUID, unique?: boolean, tableName?: string): Promise<number>;
290
- getLogs(params: {
291
- entityId?: UUID;
292
- roomId?: UUID;
293
- type?: string;
294
- count?: number;
295
- offset?: number;
296
- }): Promise<Log[]>;
297
- deleteLog(logId: UUID): Promise<void>;
298
- createWorld(world: World): Promise<UUID>;
299
- getWorld(id: UUID): Promise<World | null>;
300
- removeWorld(worldId: UUID): Promise<void>;
301
- getAllWorlds(): Promise<World[]>;
302
- updateWorld(world: World): Promise<void>;
303
- getRoom(roomId: UUID): Promise<Room | null>;
304
- getRoomsByIds(roomIds: UUID[]): Promise<Room[] | null>;
305
- createRoom({ id, name, source, type, channelId, messageServerId, worldId, }: Room): Promise<UUID>;
306
- createRooms(rooms: Room[]): Promise<UUID[]>;
307
- deleteRoom(roomId: UUID): Promise<void>;
308
- deleteRoomsByWorldId(worldId: UUID): Promise<void>;
309
- updateRoom(room: Room): Promise<void>;
310
- getRoomsForParticipant(entityId: UUID): Promise<UUID[]>;
311
- getRoomsForParticipants(userIds: UUID[]): Promise<UUID[]>;
312
- getRooms(worldId: UUID): Promise<Room[]>;
313
- getRoomsByWorld(worldId: UUID): Promise<Room[]>;
314
- getParticipantUserState(roomId: UUID, entityId: UUID): Promise<'FOLLOWED' | 'MUTED' | null>;
315
- setParticipantUserState(roomId: UUID, entityId: UUID, state: 'FOLLOWED' | 'MUTED' | null): Promise<void>;
316
- createRelationship(params: {
317
- sourceEntityId: UUID;
318
- targetEntityId: UUID;
319
- tags?: string[];
320
- metadata?: {
321
- [key: string]: unknown;
322
- };
323
- }): Promise<boolean>;
324
- updateRelationship(relationship: Relationship): Promise<void>;
325
- getRelationship(params: {
326
- sourceEntityId: UUID;
327
- targetEntityId: UUID;
328
- }): Promise<Relationship | null>;
329
- getRelationships(params: {
330
- entityId: UUID;
331
- tags?: string[];
332
- }): Promise<Relationship[]>;
333
- getCache<T>(key: string): Promise<T | undefined>;
334
- setCache<T>(key: string, value: T): Promise<boolean>;
335
- deleteCache(key: string): Promise<boolean>;
336
- createTask(task: Task): Promise<UUID>;
337
- getTasks(params: {
338
- roomId?: UUID;
339
- tags?: string[];
340
- entityId?: UUID;
341
- }): Promise<Task[]>;
342
- getTask(id: UUID): Promise<Task | null>;
343
- getTasksByName(name: string): Promise<Task[]>;
344
- updateTask(id: UUID, task: Partial<Task>): Promise<void>;
345
- deleteTask(id: UUID): Promise<void>;
346
- on(event: string, callback: (data: unknown) => void): void;
347
- off(event: string, callback: (data: unknown) => void): void;
348
- emit(event: string, data: unknown): void;
349
- sendControlMessage(params: {
350
- roomId: UUID;
351
- action: 'enable_input' | 'disable_input';
352
- target?: string;
353
- }): Promise<void>;
354
- registerSendHandler(source: string, handler: SendHandlerFunction): void;
355
- sendMessageToTarget(target: TargetInfo, content: Content): Promise<void>;
356
- getMemoriesByWorldId(params: {
357
- worldId: UUID;
358
- count?: number;
359
- tableName?: string;
360
- }): Promise<Memory[]>;
361
- runMigrations(migrationsPaths?: string[]): Promise<void>;
362
- isReady(): Promise<boolean>;
363
- hasElizaOS(): this is IAgentRuntime & {
364
- elizaOS: IElizaOS;
365
- };
366
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACL,WAAW,EAIX,KAAK,OAAO,EAEZ,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,eAAe,EAGpB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,KAAK,EACV,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,MAAM,EACX,KAAK,mBAAmB,EACxB,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,K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AAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBxE,oBAAoB,CAAC,MAAM,EAAE;QACjC,OAAO,EAAE,IAAI,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAGf,aAAa,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAWxD,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAOjC,UAAU,IAAI,IAAI,IAAI,aAAa,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE;CAG5D"}
@@ -1,151 +0,0 @@
1
- import { z } from 'zod';
2
- import type { Character } from '../types/agent';
3
- import { ChannelType } from '../types/environment';
4
- import { ContentType } from '../types/primitives';
5
- export declare const uuidSchema: z.ZodString;
6
- export declare const mediaSchema: z.ZodObject<{
7
- id: z.ZodString;
8
- url: z.ZodString;
9
- title: z.ZodOptional<z.ZodString>;
10
- source: z.ZodOptional<z.ZodString>;
11
- description: z.ZodOptional<z.ZodString>;
12
- text: z.ZodOptional<z.ZodString>;
13
- contentType: z.ZodOptional<z.ZodEnum<typeof ContentType>>;
14
- }, z.core.$loose>;
15
- export declare const contentSchema: z.ZodObject<{
16
- text: z.ZodOptional<z.ZodString>;
17
- thought: z.ZodOptional<z.ZodString>;
18
- actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
- providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
- source: z.ZodOptional<z.ZodString>;
21
- target: z.ZodOptional<z.ZodString>;
22
- url: z.ZodOptional<z.ZodString>;
23
- inReplyTo: z.ZodOptional<z.ZodString>;
24
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
25
- id: z.ZodString;
26
- url: z.ZodString;
27
- title: z.ZodOptional<z.ZodString>;
28
- source: z.ZodOptional<z.ZodString>;
29
- description: z.ZodOptional<z.ZodString>;
30
- text: z.ZodOptional<z.ZodString>;
31
- contentType: z.ZodOptional<z.ZodEnum<typeof ContentType>>;
32
- }, z.core.$loose>>>;
33
- channelType: z.ZodOptional<z.ZodEnum<typeof ChannelType>>;
34
- }, z.core.$catchall<z.ZodUnknown>>;
35
- export declare const messageExampleSchema: z.ZodObject<{
36
- name: z.ZodString;
37
- content: z.ZodObject<{
38
- text: z.ZodOptional<z.ZodString>;
39
- thought: z.ZodOptional<z.ZodString>;
40
- actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
42
- source: z.ZodOptional<z.ZodString>;
43
- target: z.ZodOptional<z.ZodString>;
44
- url: z.ZodOptional<z.ZodString>;
45
- inReplyTo: z.ZodOptional<z.ZodString>;
46
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
- id: z.ZodString;
48
- url: z.ZodString;
49
- title: z.ZodOptional<z.ZodString>;
50
- source: z.ZodOptional<z.ZodString>;
51
- description: z.ZodOptional<z.ZodString>;
52
- text: z.ZodOptional<z.ZodString>;
53
- contentType: z.ZodOptional<z.ZodEnum<typeof ContentType>>;
54
- }, z.core.$loose>>>;
55
- channelType: z.ZodOptional<z.ZodEnum<typeof ChannelType>>;
56
- }, z.core.$catchall<z.ZodUnknown>>;
57
- }, z.core.$strip>;
58
- export declare const directoryItemSchema: z.ZodObject<{
59
- directory: z.ZodString;
60
- shared: z.ZodOptional<z.ZodBoolean>;
61
- }, z.core.$strip>;
62
- export declare const knowledgeItemSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
63
- path: z.ZodString;
64
- shared: z.ZodOptional<z.ZodBoolean>;
65
- }, z.core.$strip>, z.ZodObject<{
66
- directory: z.ZodString;
67
- shared: z.ZodOptional<z.ZodBoolean>;
68
- }, z.core.$strip>]>;
69
- export declare const templateTypeSchema: z.ZodUnion<readonly [z.ZodString, z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>]>;
70
- export declare const styleSchema: z.ZodOptional<z.ZodObject<{
71
- all: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
- chat: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
- post: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
- }, z.core.$strip>>;
75
- export declare const settingsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{}, z.core.$loose>, z.ZodArray<z.ZodUnknown>]>>>;
76
- export declare const secretsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
77
- export declare const characterSchema: z.ZodObject<{
78
- id: z.ZodOptional<z.ZodString>;
79
- name: z.ZodString;
80
- username: z.ZodOptional<z.ZodString>;
81
- system: z.ZodOptional<z.ZodString>;
82
- templates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>]>>>;
83
- bio: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
84
- messageExamples: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
85
- name: z.ZodString;
86
- content: z.ZodObject<{
87
- text: z.ZodOptional<z.ZodString>;
88
- thought: z.ZodOptional<z.ZodString>;
89
- actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
- providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
- source: z.ZodOptional<z.ZodString>;
92
- target: z.ZodOptional<z.ZodString>;
93
- url: z.ZodOptional<z.ZodString>;
94
- inReplyTo: z.ZodOptional<z.ZodString>;
95
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
- id: z.ZodString;
97
- url: z.ZodString;
98
- title: z.ZodOptional<z.ZodString>;
99
- source: z.ZodOptional<z.ZodString>;
100
- description: z.ZodOptional<z.ZodString>;
101
- text: z.ZodOptional<z.ZodString>;
102
- contentType: z.ZodOptional<z.ZodEnum<typeof ContentType>>;
103
- }, z.core.$loose>>>;
104
- channelType: z.ZodOptional<z.ZodEnum<typeof ChannelType>>;
105
- }, z.core.$catchall<z.ZodUnknown>>;
106
- }, z.core.$strip>>>>;
107
- postExamples: z.ZodOptional<z.ZodArray<z.ZodString>>;
108
- topics: z.ZodOptional<z.ZodArray<z.ZodString>>;
109
- adjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
110
- knowledge: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
111
- path: z.ZodString;
112
- shared: z.ZodOptional<z.ZodBoolean>;
113
- }, z.core.$strip>, z.ZodObject<{
114
- directory: z.ZodString;
115
- shared: z.ZodOptional<z.ZodBoolean>;
116
- }, z.core.$strip>]>>>;
117
- plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
- settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{}, z.core.$loose>, z.ZodArray<z.ZodUnknown>]>>>;
119
- secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
120
- style: z.ZodOptional<z.ZodObject<{
121
- all: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
- chat: z.ZodOptional<z.ZodArray<z.ZodString>>;
123
- post: z.ZodOptional<z.ZodArray<z.ZodString>>;
124
- }, z.core.$strip>>;
125
- }, z.core.$strict>;
126
- export interface CharacterValidationResult {
127
- success: boolean;
128
- data?: Character;
129
- error?: {
130
- message: string;
131
- issues?: z.ZodIssue[];
132
- };
133
- }
134
- /**
135
- * Safely validates character data using Zod schema
136
- * @param data - Raw character data to validate
137
- * @returns Validation result with success flag and either data or error
138
- */
139
- export declare function validateCharacter(data: unknown): CharacterValidationResult;
140
- /**
141
- * Safely parses JSON string and validates as character
142
- * @param jsonString - JSON string to parse and validate
143
- * @returns Validation result with success flag and either data or error
144
- */
145
- export declare function parseAndValidateCharacter(jsonString: string): CharacterValidationResult;
146
- /**
147
- * Type guard to check if data is a valid Character
148
- * @param data - Data to check
149
- * @returns True if data is a valid Character
150
- */
151
- export declare function isValidCharacter(data: unknown): data is Character;
@@ -1 +0,0 @@
1
- {"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/schemas/character.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,UAAU,aAG0C,CAAC;AAGlE,eAAO,MAAM,WAAW;;;;;;;;iBAW6B,CAAC;AAGtD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;kCAiB4C,CAAC;AAGvE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;iBAOwB,CAAC;AAG1D,eAAO,MAAM,mBAAmB;;;iBAKe,CAAC;AAGhD,eAAO,MAAM,mBAAmB;;;;;;mBAS+C,CAAC;AAGhF,eAAO,MAAM,kBAAkB,mHAKmD,CAAC;AAGnF,eAAO,MAAM,WAAW;;;;kBAkBrB,CAAC;AAGJ,eAAO,MAAM,cAAc,kKAM+D,CAAC;AAG3F,eAAO,MAAM,aAAa,wGAG4D,CAAC;AAGvF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkDkE,CAAC;AAG/F,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,CAA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