@elizaos/core 1.0.0-beta.6 → 1.0.0-beta.61

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 (54) hide show
  1. package/LICENSE +1 -1
  2. package/dist/actions.d.ts +2 -8
  3. package/dist/database.d.ts +27 -9
  4. package/dist/index.d.ts +5 -3
  5. package/dist/index.js +32959 -7083
  6. package/dist/instrumentation/index.d.ts +2 -0
  7. package/dist/instrumentation/service.d.ts +20 -0
  8. package/dist/instrumentation/types.d.ts +16 -0
  9. package/dist/prompts.d.ts +3 -200
  10. package/dist/roles.d.ts +5 -1
  11. package/dist/runtime.d.ts +95 -44
  12. package/dist/search.d.ts +316 -0
  13. package/dist/sentry/instrument.d.ts +2 -0
  14. package/dist/settings.d.ts +79 -1
  15. package/dist/types.d.ts +502 -78
  16. package/dist/utils.d.ts +231 -0
  17. package/package.json +18 -4
  18. package/dist/actions/choice.d.ts +0 -13
  19. package/dist/actions/followRoom.d.ts +0 -20
  20. package/dist/actions/ignore.d.ts +0 -13
  21. package/dist/actions/muteRoom.d.ts +0 -22
  22. package/dist/actions/none.d.ts +0 -9
  23. package/dist/actions/reply.d.ts +0 -15
  24. package/dist/actions/roles.d.ts +0 -13
  25. package/dist/actions/sendMessage.d.ts +0 -14
  26. package/dist/actions/settings.d.ts +0 -21
  27. package/dist/actions/unfollowRoom.d.ts +0 -12
  28. package/dist/actions/unmuteRoom.d.ts +0 -18
  29. package/dist/actions/updateEntity.d.ts +0 -42
  30. package/dist/bootstrap.d.ts +0 -14
  31. package/dist/evaluators/reflection.d.ts +0 -2
  32. package/dist/import.d.ts +0 -9
  33. package/dist/providers/actions.d.ts +0 -14
  34. package/dist/providers/anxiety.d.ts +0 -9
  35. package/dist/providers/attachments.d.ts +0 -8
  36. package/dist/providers/capabilities.d.ts +0 -13
  37. package/dist/providers/character.d.ts +0 -9
  38. package/dist/providers/choice.d.ts +0 -10
  39. package/dist/providers/entities.d.ts +0 -2
  40. package/dist/providers/evaluators.d.ts +0 -26
  41. package/dist/providers/facts.d.ts +0 -10
  42. package/dist/providers/knowledge.d.ts +0 -13
  43. package/dist/providers/providers.d.ts +0 -6
  44. package/dist/providers/recentMessages.d.ts +0 -13
  45. package/dist/providers/relationships.d.ts +0 -14
  46. package/dist/providers/roles.d.ts +0 -14
  47. package/dist/providers/settings.d.ts +0 -6
  48. package/dist/providers/shouldRespond.d.ts +0 -6
  49. package/dist/providers/time.d.ts +0 -11
  50. package/dist/services/index.d.ts +0 -1
  51. package/dist/services/scenario.d.ts +0 -106
  52. package/dist/services/task.d.ts +0 -72
  53. package/dist/services/websocket.d.ts +0 -73
  54. 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
package/dist/actions.d.ts CHANGED
@@ -2,17 +2,11 @@ import type { Action } from './types';
2
2
  /**
3
3
  * Composes a set of example conversations based on provided actions and a specified count.
4
4
  * It randomly selects examples from the provided actions and formats them with generated names.
5
+ *
5
6
  * @param actionsData - An array of `Action` objects from which to draw examples.
6
7
  * @param count - The number of examples to generate.
7
8
  * @returns A string containing formatted examples of conversations.
8
9
  */
9
- /**
10
- * Compose a specified number of random action examples from the given actionsData.
11
- *
12
- * @param {Action[]} actionsData - The list of actions to generate examples from.
13
- * @param {number} count - The number of examples to compose.
14
- * @returns {string} The formatted action examples.
15
- */
16
10
  export declare const composeActionExamples: (actionsData: Action[], count: number) => string;
17
11
  /**
18
12
  * Formats the names of the provided actions into a comma-separated string.
@@ -21,7 +15,7 @@ export declare const composeActionExamples: (actionsData: Action[], count: numbe
21
15
  */
22
16
  export declare function formatActionNames(actions: Action[]): string;
23
17
  /**
24
- * Formats the provided actions into a detailed string listing each action's name and description, separated by commas and newlines.
18
+ * Formats the provided actions into a detailed string listing each action's name and description.
25
19
  * @param actions - An array of `Action` objects to format.
26
20
  * @returns A detailed string of actions, including names and descriptions.
27
21
  */
@@ -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,13 @@ 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';
14
+ export * from './sentry/instrument';