@elizaos/core 1.0.0-beta.5 → 1.0.0-beta.50

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 (52) hide show
  1. package/LICENSE +1 -1
  2. package/dist/database.d.ts +27 -9
  3. package/dist/index.d.ts +4 -3
  4. package/dist/index.js +9315 -7008
  5. package/dist/instrumentation/index.d.ts +2 -0
  6. package/dist/instrumentation/service.d.ts +21 -0
  7. package/dist/instrumentation/types.d.ts +16 -0
  8. package/dist/prompts.d.ts +3 -200
  9. package/dist/roles.d.ts +5 -1
  10. package/dist/runtime.d.ts +94 -43
  11. package/dist/search.d.ts +316 -0
  12. package/dist/settings.d.ts +79 -1
  13. package/dist/types.d.ts +502 -78
  14. package/dist/utils.d.ts +240 -0
  15. package/package.json +11 -3
  16. package/dist/actions/choice.d.ts +0 -13
  17. package/dist/actions/followRoom.d.ts +0 -20
  18. package/dist/actions/ignore.d.ts +0 -13
  19. package/dist/actions/muteRoom.d.ts +0 -22
  20. package/dist/actions/none.d.ts +0 -9
  21. package/dist/actions/reply.d.ts +0 -15
  22. package/dist/actions/roles.d.ts +0 -13
  23. package/dist/actions/sendMessage.d.ts +0 -14
  24. package/dist/actions/settings.d.ts +0 -21
  25. package/dist/actions/unfollowRoom.d.ts +0 -12
  26. package/dist/actions/unmuteRoom.d.ts +0 -18
  27. package/dist/actions/updateEntity.d.ts +0 -42
  28. package/dist/bootstrap.d.ts +0 -14
  29. package/dist/evaluators/reflection.d.ts +0 -2
  30. package/dist/import.d.ts +0 -9
  31. package/dist/providers/actions.d.ts +0 -14
  32. package/dist/providers/anxiety.d.ts +0 -9
  33. package/dist/providers/attachments.d.ts +0 -8
  34. package/dist/providers/capabilities.d.ts +0 -13
  35. package/dist/providers/character.d.ts +0 -9
  36. package/dist/providers/choice.d.ts +0 -10
  37. package/dist/providers/entities.d.ts +0 -2
  38. package/dist/providers/evaluators.d.ts +0 -26
  39. package/dist/providers/facts.d.ts +0 -10
  40. package/dist/providers/knowledge.d.ts +0 -13
  41. package/dist/providers/providers.d.ts +0 -6
  42. package/dist/providers/recentMessages.d.ts +0 -13
  43. package/dist/providers/relationships.d.ts +0 -14
  44. package/dist/providers/roles.d.ts +0 -14
  45. package/dist/providers/settings.d.ts +0 -6
  46. package/dist/providers/shouldRespond.d.ts +0 -6
  47. package/dist/providers/time.d.ts +0 -11
  48. package/dist/services/index.d.ts +0 -1
  49. package/dist/services/scenario.d.ts +0 -106
  50. package/dist/services/task.d.ts +0 -72
  51. package/dist/services/websocket.d.ts +0 -73
  52. package/dist/uuid.d.ts +0 -18
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Shaw Walters, aka Moon aka @lalalune
3
+ Copyright (c) 2025 Shaw Walters and elizaOS Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,6 @@
1
- import type { Agent, Component, Entity, IDatabaseAdapter, Log, Memory, Participant, Relationship, Room, Task, UUID, World, MemoryMetadata } from './types';
1
+ import type { Agent, Component, Entity, IDatabaseAdapter, Log, Memory, MemoryMetadata, Participant, Relationship, Room, Task, UUID, World } from './types';
2
+ import { type Pool as PgPool } from 'pg';
3
+ import { PGlite } from '@electric-sql/pglite';
2
4
  /**
3
5
  * An abstract class representing a database adapter for managing various entities
4
6
  * like entities, memories, entities, goals, and rooms.
@@ -8,7 +10,7 @@ import type { Agent, Component, Entity, IDatabaseAdapter, Log, Memory, Participa
8
10
  *
9
11
  * @template DB - The type of the database instance.
10
12
  * @abstract
11
- * @implements {IDatabaseAdapter}
13
+ * implements IDatabaseAdapter
12
14
  */
13
15
  export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabaseAdapter {
14
16
  /**
@@ -25,6 +27,11 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
25
27
  * @returns A Promise that resolves when closing is complete.
26
28
  */
27
29
  abstract close(): Promise<void>;
30
+ /**
31
+ * Retrieves a connection to the database.
32
+ * @returns A Promise that resolves to the database connection.
33
+ */
34
+ abstract getConnection(): Promise<PGlite | PgPool>;
28
35
  /**
29
36
  * Retrieves an account by its ID.
30
37
  * @param entityId The UUID of the user account to retrieve.
@@ -87,12 +94,13 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
87
94
  abstract getMemories(params: {
88
95
  entityId?: UUID;
89
96
  agentId?: UUID;
90
- roomId?: UUID;
91
97
  count?: number;
92
98
  unique?: boolean;
93
99
  tableName: string;
94
100
  start?: number;
95
101
  end?: number;
102
+ roomId?: UUID;
103
+ worldId?: UUID;
96
104
  }): Promise<Memory[]>;
97
105
  abstract getMemoriesByRoomIds(params: {
98
106
  roomIds: UUID[];
@@ -161,11 +169,14 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
161
169
  */
162
170
  abstract searchMemories(params: {
163
171
  tableName: string;
164
- roomId: UUID;
165
172
  embedding: number[];
166
- match_threshold: number;
167
- count: number;
168
- unique: boolean;
173
+ match_threshold?: number;
174
+ count?: number;
175
+ unique?: boolean;
176
+ query?: string;
177
+ roomId?: UUID;
178
+ worldId?: UUID;
179
+ entityId?: UUID;
169
180
  }): Promise<Memory[]>;
170
181
  /**
171
182
  * Creates a new memory in the database.
@@ -264,6 +275,12 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
264
275
  * @returns A Promise that resolves when the room has been removed.
265
276
  */
266
277
  abstract deleteRoom(roomId: UUID): Promise<void>;
278
+ /**
279
+ * Deletes all rooms associated with a specific server ID.
280
+ * @param serverId The ID of the server whose rooms should be deleted.
281
+ * @returns A Promise that resolves when all rooms have been deleted.
282
+ */
283
+ abstract deleteRoomsByServerId(serverId: UUID): Promise<void>;
267
284
  /**
268
285
  * Retrieves room IDs for which a specific user is a participant.
269
286
  * @param entityId The UUID of the user.
@@ -354,7 +371,7 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
354
371
  * Retrieves all agents from the database.
355
372
  * @returns A Promise that resolves to an array of Agent objects.
356
373
  */
357
- abstract getAgents(): Promise<Agent[]>;
374
+ abstract getAgents(): Promise<Partial<Agent>[]>;
358
375
  /**
359
376
  * Creates a new agent in the database.
360
377
  * @param agent The agent object to create.
@@ -379,7 +396,7 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
379
396
  * @param agent The agent object to ensure exists.
380
397
  * @returns A Promise that resolves when the agent has been ensured to exist.
381
398
  */
382
- abstract ensureAgentExists(agent: Partial<Agent>): Promise<void>;
399
+ abstract ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
383
400
  /**
384
401
  * Ensures an embedding dimension exists in the database.
385
402
  * @param dimension The dimension to ensure exists.
@@ -420,6 +437,7 @@ export declare abstract class DatabaseAdapter<DB = unknown> implements IDatabase
420
437
  abstract getTasks(params: {
421
438
  roomId?: UUID;
422
439
  tags?: string[];
440
+ entityId?: UUID;
423
441
  }): Promise<Task[]>;
424
442
  /**
425
443
  * Retrieves a specific task by its ID.
package/dist/index.d.ts CHANGED
@@ -2,11 +2,12 @@ export * from './types';
2
2
  export * from './actions';
3
3
  export * from './database';
4
4
  export * from './entities';
5
- export * from './import';
6
5
  export * from './logger';
7
6
  export * from './prompts';
8
7
  export * from './roles';
9
8
  export * from './runtime';
9
+ export * from './search';
10
10
  export * from './settings';
11
- export * from './uuid';
12
- export * from './services';
11
+ export * from './utils';
12
+ export * from './instrumentation/types';
13
+ export * from './instrumentation/service';