@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.
- package/README.md +213 -16
- package/dist/testing/index.js +22 -0
- package/dist/testing/index.js.map +9 -0
- package/package.json +46 -27
- package/dist/actions.d.ts +0 -22
- package/dist/actions.d.ts.map +0 -1
- package/dist/browser/index.browser.js +0 -771
- package/dist/browser/index.browser.js.map +0 -427
- package/dist/browser/index.d.ts +0 -2
- package/dist/character.d.ts +0 -39
- package/dist/character.d.ts.map +0 -1
- package/dist/constants/index.d.ts +0 -7
- package/dist/constants/secrets.d.ts +0 -67
- package/dist/database.d.ts +0 -494
- package/dist/database.d.ts.map +0 -1
- package/dist/elizaos.d.ts +0 -194
- package/dist/elizaos.d.ts.map +0 -1
- package/dist/entities.d.ts +0 -40
- package/dist/entities.d.ts.map +0 -1
- package/dist/index.browser.d.ts +0 -39
- package/dist/index.browser.d.ts.map +0 -1
- package/dist/index.d.ts +0 -40
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.node.d.ts +0 -37
- package/dist/index.node.d.ts.map +0 -1
- package/dist/logger.d.ts +0 -72
- package/dist/logger.d.ts.map +0 -1
- package/dist/memory.d.ts +0 -63
- package/dist/memory.d.ts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.node.js +0 -53403
- package/dist/node/index.node.js.map +0 -511
- package/dist/onboarding-state.d.ts +0 -209
- package/dist/plugin.d.ts +0 -55
- package/dist/plugin.d.ts.map +0 -1
- package/dist/prompts.d.ts +0 -7
- package/dist/prompts.d.ts.map +0 -1
- package/dist/request-context.d.ts +0 -142
- package/dist/request-context.d.ts.map +0 -1
- package/dist/request-context.node.d.ts +0 -36
- package/dist/request-context.node.d.ts.map +0 -1
- package/dist/roles.d.ts +0 -23
- package/dist/roles.d.ts.map +0 -1
- package/dist/runtime.d.ts +0 -366
- package/dist/runtime.d.ts.map +0 -1
- package/dist/schemas/character.d.ts +0 -151
- package/dist/schemas/character.d.ts.map +0 -1
- package/dist/search.d.ts +0 -316
- package/dist/search.d.ts.map +0 -1
- package/dist/secrets.d.ts +0 -11
- package/dist/secrets.d.ts.map +0 -1
- package/dist/services/default-message-service.d.ts +0 -69
- package/dist/services/default-message-service.d.ts.map +0 -1
- package/dist/services/message-service.d.ts +0 -171
- package/dist/services/message-service.d.ts.map +0 -1
- package/dist/services.d.ts +0 -56
- package/dist/services.d.ts.map +0 -1
- package/dist/sessions/index.d.ts +0 -10
- package/dist/sessions/paths.d.ts +0 -56
- package/dist/sessions/provider.d.ts +0 -73
- package/dist/sessions/session-key.d.ts +0 -133
- package/dist/sessions/store.d.ts +0 -75
- package/dist/sessions/types.d.ts +0 -195
- package/dist/settings.d.ts +0 -90
- package/dist/settings.d.ts.map +0 -1
- package/dist/streaming-context.browser.d.ts +0 -26
- package/dist/streaming-context.browser.d.ts.map +0 -1
- package/dist/streaming-context.d.ts +0 -95
- package/dist/streaming-context.d.ts.map +0 -1
- package/dist/streaming-context.node.d.ts +0 -15
- package/dist/streaming-context.node.d.ts.map +0 -1
- package/dist/types/agent.d.ts +0 -97
- package/dist/types/agent.d.ts.map +0 -1
- package/dist/types/components.d.ts +0 -155
- package/dist/types/components.d.ts.map +0 -1
- package/dist/types/database.d.ts +0 -414
- package/dist/types/database.d.ts.map +0 -1
- package/dist/types/elizaos.d.ts +0 -159
- package/dist/types/elizaos.d.ts.map +0 -1
- package/dist/types/environment.d.ts +0 -116
- package/dist/types/environment.d.ts.map +0 -1
- package/dist/types/events.d.ts +0 -203
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -20
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/knowledge.d.ts +0 -30
- package/dist/types/knowledge.d.ts.map +0 -1
- package/dist/types/memory.d.ts +0 -102
- package/dist/types/memory.d.ts.map +0 -1
- package/dist/types/messaging.d.ts +0 -137
- package/dist/types/messaging.d.ts.map +0 -1
- package/dist/types/model.d.ts +0 -513
- package/dist/types/model.d.ts.map +0 -1
- package/dist/types/plugin.d.ts +0 -91
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/primitives.d.ts +0 -96
- package/dist/types/primitives.d.ts.map +0 -1
- package/dist/types/runtime.d.ts +0 -140
- package/dist/types/runtime.d.ts.map +0 -1
- package/dist/types/service.d.ts +0 -150
- package/dist/types/service.d.ts.map +0 -1
- package/dist/types/settings.d.ts +0 -29
- package/dist/types/settings.d.ts.map +0 -1
- package/dist/types/state.d.ts +0 -56
- package/dist/types/state.d.ts.map +0 -1
- package/dist/types/streaming.d.ts +0 -71
- package/dist/types/streaming.d.ts.map +0 -1
- package/dist/types/task.d.ts +0 -67
- package/dist/types/task.d.ts.map +0 -1
- package/dist/types/tee.d.ts +0 -96
- package/dist/types/tee.d.ts.map +0 -1
- package/dist/types/testing.d.ts +0 -28
- package/dist/types/testing.d.ts.map +0 -1
- package/dist/utils/buffer.d.ts +0 -104
- package/dist/utils/buffer.d.ts.map +0 -1
- package/dist/utils/crypto-compat.d.ts +0 -183
- package/dist/utils/crypto-compat.d.ts.map +0 -1
- package/dist/utils/environment.d.ts +0 -50
- package/dist/utils/environment.d.ts.map +0 -1
- package/dist/utils/node.d.ts +0 -5
- package/dist/utils/node.d.ts.map +0 -1
- package/dist/utils/paths.d.ts +0 -92
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/server-health.d.ts +0 -22
- package/dist/utils/server-health.d.ts.map +0 -1
- package/dist/utils/streaming.d.ts +0 -179
- package/dist/utils/streaming.d.ts.map +0 -1
- package/dist/utils/type-guards.d.ts +0 -23
- package/dist/utils/type-guards.d.ts.map +0 -1
- package/dist/utils.d.ts +0 -182
- package/dist/utils.d.ts.map +0 -1
package/dist/elizaos.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import type { Character, IAgentRuntime, IElizaOS, UUID, Memory, Plugin, RuntimeSettings, Content, HandleMessageOptions, HandleMessageResult, IDatabaseAdapter, HealthStatus, ReadonlyRuntime } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* ElizaOS - Multi-agent orchestration framework
|
|
4
|
-
*/
|
|
5
|
-
export declare class ElizaOS extends EventTarget implements IElizaOS {
|
|
6
|
-
private runtimes;
|
|
7
|
-
private initFunctions;
|
|
8
|
-
private editableMode;
|
|
9
|
-
addAgents(agents: Array<{
|
|
10
|
-
character: Character;
|
|
11
|
-
plugins?: (Plugin | string)[];
|
|
12
|
-
settings?: RuntimeSettings;
|
|
13
|
-
init?: (runtime: IAgentRuntime) => Promise<void>;
|
|
14
|
-
databaseAdapter?: IDatabaseAdapter;
|
|
15
|
-
}>, options?: {
|
|
16
|
-
isTestMode?: boolean;
|
|
17
|
-
ephemeral?: boolean;
|
|
18
|
-
skipMigrations?: boolean;
|
|
19
|
-
autoStart?: boolean;
|
|
20
|
-
returnRuntimes?: false;
|
|
21
|
-
}): Promise<UUID[]>;
|
|
22
|
-
addAgents(agents: Array<{
|
|
23
|
-
character: Character;
|
|
24
|
-
plugins?: (Plugin | string)[];
|
|
25
|
-
settings?: RuntimeSettings;
|
|
26
|
-
init?: (runtime: IAgentRuntime) => Promise<void>;
|
|
27
|
-
databaseAdapter?: IDatabaseAdapter;
|
|
28
|
-
}>, options: {
|
|
29
|
-
isTestMode?: boolean;
|
|
30
|
-
ephemeral?: boolean;
|
|
31
|
-
skipMigrations?: boolean;
|
|
32
|
-
autoStart?: boolean;
|
|
33
|
-
returnRuntimes: true;
|
|
34
|
-
}): Promise<IAgentRuntime[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Register an existing runtime
|
|
37
|
-
*/
|
|
38
|
-
registerAgent(runtime: IAgentRuntime): void;
|
|
39
|
-
/**
|
|
40
|
-
* Update an agent's character
|
|
41
|
-
*/
|
|
42
|
-
updateAgent(agentId: UUID, updates: Partial<Character>): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Delete agents
|
|
45
|
-
*/
|
|
46
|
-
deleteAgents(agentIds: UUID[]): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Start multiple agents
|
|
49
|
-
*/
|
|
50
|
-
startAgents(agentIds?: UUID[]): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Stop agents
|
|
53
|
-
*/
|
|
54
|
-
stopAgents(agentIds?: UUID[]): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Get a single agent
|
|
57
|
-
*/
|
|
58
|
-
getAgent(id: UUID): IAgentRuntime | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* Get all agents
|
|
61
|
-
*/
|
|
62
|
-
getAgents(): IAgentRuntime[];
|
|
63
|
-
/**
|
|
64
|
-
* Get agents by IDs
|
|
65
|
-
*/
|
|
66
|
-
getAgentsByIds(ids: UUID[]): IAgentRuntime[];
|
|
67
|
-
/**
|
|
68
|
-
* Get agents by names
|
|
69
|
-
*/
|
|
70
|
-
getAgentsByNames(names: string[]): IAgentRuntime[];
|
|
71
|
-
/**
|
|
72
|
-
* Get agent by ID (alias for getAgent for consistency)
|
|
73
|
-
*/
|
|
74
|
-
getAgentById(id: UUID): IAgentRuntime | undefined;
|
|
75
|
-
/**
|
|
76
|
-
* Get agent by name
|
|
77
|
-
*/
|
|
78
|
-
getAgentByName(name: string): IAgentRuntime | undefined;
|
|
79
|
-
/**
|
|
80
|
-
* Get agent by character name (alias for getAgentByName)
|
|
81
|
-
*/
|
|
82
|
-
getAgentByCharacterName(name: string): IAgentRuntime | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Get agent by character ID
|
|
85
|
-
*/
|
|
86
|
-
getAgentByCharacterId(characterId: UUID): IAgentRuntime | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Send a message to a specific agent
|
|
89
|
-
*
|
|
90
|
-
* @param target - The agent ID (UUID) or runtime instance to send the message to
|
|
91
|
-
* @param message - Partial Memory object (missing fields auto-filled)
|
|
92
|
-
* @param options - Optional callbacks and processing options
|
|
93
|
-
* @returns Promise with message ID and result
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* // SYNC mode with agent ID (HTTP API)
|
|
97
|
-
* const result = await elizaOS.handleMessage(agentId, {
|
|
98
|
-
* entityId: user.id,
|
|
99
|
-
* roomId: room.id,
|
|
100
|
-
* content: { text: "Hello", source: 'web' }
|
|
101
|
-
* });
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* // Serverless mode with runtime directly (no registry lookup)
|
|
105
|
-
* const [runtime] = await elizaOS.addAgents([config], { ephemeral: true, autoStart: true, returnRuntimes: true });
|
|
106
|
-
* const result = await elizaOS.handleMessage(runtime, {
|
|
107
|
-
* entityId: user.id,
|
|
108
|
-
* roomId: room.id,
|
|
109
|
-
* content: { text: "Hello", source: 'web' }
|
|
110
|
-
* });
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* // ASYNC mode (WebSocket, MessageBus)
|
|
114
|
-
* await elizaOS.handleMessage(agentId, {
|
|
115
|
-
* entityId: user.id,
|
|
116
|
-
* roomId: room.id,
|
|
117
|
-
* content: { text: "Hello", source: 'websocket' }
|
|
118
|
-
* }, {
|
|
119
|
-
* onResponse: async (response) => {
|
|
120
|
-
* await socket.emit('message', response.text);
|
|
121
|
-
* }
|
|
122
|
-
* });
|
|
123
|
-
*/
|
|
124
|
-
handleMessage(target: UUID | IAgentRuntime, message: Partial<Memory> & {
|
|
125
|
-
entityId: UUID;
|
|
126
|
-
roomId: UUID;
|
|
127
|
-
content: Content;
|
|
128
|
-
worldId?: UUID;
|
|
129
|
-
}, options?: HandleMessageOptions): Promise<HandleMessageResult>;
|
|
130
|
-
/**
|
|
131
|
-
* Handle messages to multiple agents in parallel
|
|
132
|
-
*
|
|
133
|
-
* Useful for batch operations where you need to send messages to multiple agents at once.
|
|
134
|
-
* All messages are handled in parallel for maximum performance.
|
|
135
|
-
*
|
|
136
|
-
* @param messages - Array of messages to handle, each with agentId and message data
|
|
137
|
-
* @returns Promise with array of results, one per message
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* const results = await elizaOS.handleMessages([
|
|
141
|
-
* {
|
|
142
|
-
* agentId: agent1Id,
|
|
143
|
-
* message: {
|
|
144
|
-
* entityId: user.id,
|
|
145
|
-
* roomId: room.id,
|
|
146
|
-
* content: { text: "Hello Agent 1", source: "web" }
|
|
147
|
-
* }
|
|
148
|
-
* },
|
|
149
|
-
* {
|
|
150
|
-
* agentId: agent2Id,
|
|
151
|
-
* message: {
|
|
152
|
-
* entityId: user.id,
|
|
153
|
-
* roomId: room.id,
|
|
154
|
-
* content: { text: "Hello Agent 2", source: "web" }
|
|
155
|
-
* },
|
|
156
|
-
* options: {
|
|
157
|
-
* onResponse: async (response) => {
|
|
158
|
-
* console.log("Agent 2 responded:", response.text);
|
|
159
|
-
* }
|
|
160
|
-
* }
|
|
161
|
-
* }
|
|
162
|
-
* ]);
|
|
163
|
-
*/
|
|
164
|
-
handleMessages(messages: Array<{
|
|
165
|
-
agentId: UUID;
|
|
166
|
-
message: Partial<Memory> & {
|
|
167
|
-
entityId: UUID;
|
|
168
|
-
roomId: UUID;
|
|
169
|
-
content: Content;
|
|
170
|
-
worldId?: UUID;
|
|
171
|
-
};
|
|
172
|
-
options?: HandleMessageOptions;
|
|
173
|
-
}>): Promise<Array<{
|
|
174
|
-
agentId: UUID;
|
|
175
|
-
result: HandleMessageResult;
|
|
176
|
-
error?: Error;
|
|
177
|
-
}>>;
|
|
178
|
-
/**
|
|
179
|
-
* Validate API keys for agents
|
|
180
|
-
*/
|
|
181
|
-
validateApiKeys(agents?: UUID[]): Promise<Map<UUID, boolean>>;
|
|
182
|
-
/**
|
|
183
|
-
* Health check for agents
|
|
184
|
-
*/
|
|
185
|
-
healthCheck(agents?: UUID[]): Promise<Map<UUID, HealthStatus>>;
|
|
186
|
-
/**
|
|
187
|
-
* Get a read-only runtime accessor
|
|
188
|
-
*/
|
|
189
|
-
getRuntimeAccessor(): ReadonlyRuntime;
|
|
190
|
-
/**
|
|
191
|
-
* Enable editable mode for post-initialization updates
|
|
192
|
-
*/
|
|
193
|
-
enableEditableMode(): void;
|
|
194
|
-
}
|
package/dist/elizaos.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elizaos.d.ts","sourceRoot":"","sources":["../src/elizaos.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,MAAM,EAEN,MAAM,EACN,eAAe,EACf,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAY,YAAW,QAAQ;IAC1D,OAAO,CAAC,QAAQ,CAAuC;IACvD,OAAO,CAAC,aAAa,CAAmE;IACxF,OAAO,CAAC,YAAY,CAAS;IAGvB,SAAS,CACb,MAAM,EAAE,KAAK,CAAC;QACZ,SAAS,EAAE,SAAS,CAAC;QACrB,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;QAC9B,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,eAAe,CAAC,EAAE,gBAAgB,CAAC;KACpC,CAAC,EACF,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,KAAK,CAAC;KACxB,GACA,OAAO,CAAC,IAAI,EAAE,CAAC;IAGZ,SAAS,CACb,MAAM,EAAE,KAAK,CAAC;QACZ,SAAS,EAAE,SAAS,CAAC;QACrB,OAAO,CAAC,EAAE,CAAC,MAAM,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AC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAuBpE;;OAEG;IACH,kBAAkB,IAAI,eAAe;IAoBrC;;OAEG;IACH,kBAAkB,IAAI,IAAI;CAQ3B"}
|
package/dist/entities.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type Entity, type IAgentRuntime, type Memory, type State, type UUID } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Finds an entity by name in the given runtime environment.
|
|
4
|
-
*
|
|
5
|
-
* @param {IAgentRuntime} runtime - The agent runtime environment.
|
|
6
|
-
* @param {Memory} message - The memory message containing relevant information.
|
|
7
|
-
* @param {State} state - The current state of the system.
|
|
8
|
-
* @returns {Promise<Entity | null>} A promise that resolves to the found entity or null if not found.
|
|
9
|
-
*/
|
|
10
|
-
export declare function findEntityByName(runtime: IAgentRuntime, message: Memory, state: State): Promise<Entity | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Function to create a unique UUID based on the runtime and base user ID.
|
|
13
|
-
*
|
|
14
|
-
* @param {RuntimeContext} runtime - The runtime context object.
|
|
15
|
-
* @param {UUID|string} baseUserId - The base user ID to use in generating the UUID.
|
|
16
|
-
* @returns {UUID} - The unique UUID generated based on the runtime and base user ID.
|
|
17
|
-
*/
|
|
18
|
-
export declare const createUniqueUuid: (runtime: IAgentRuntime, baseUserId: UUID | string) => UUID;
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves entity details for a specific room from the database.
|
|
21
|
-
*
|
|
22
|
-
* @param {Object} params - The input parameters
|
|
23
|
-
* @param {IAgentRuntime} params.runtime - The Agent Runtime instance
|
|
24
|
-
* @param {UUID} params.roomId - The ID of the room to retrieve entity details for
|
|
25
|
-
* @returns {Promise<Array>} - A promise that resolves to an array of unique entity details
|
|
26
|
-
*/
|
|
27
|
-
export declare function getEntityDetails({ runtime, roomId, }: {
|
|
28
|
-
runtime: IAgentRuntime;
|
|
29
|
-
roomId: UUID;
|
|
30
|
-
}): Promise<any[]>;
|
|
31
|
-
/**
|
|
32
|
-
* Format the given entities into a string representation.
|
|
33
|
-
*
|
|
34
|
-
* @param {Object} options - The options object.
|
|
35
|
-
* @param {Entity[]} options.entities - The list of entities to format.
|
|
36
|
-
* @returns {string} A formatted string representing the entities.
|
|
37
|
-
*/
|
|
38
|
-
export declare function formatEntities({ entities }: {
|
|
39
|
-
entities: Entity[];
|
|
40
|
-
}): string;
|
package/dist/entities.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../src/entities.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,MAAM,EAGX,KAAK,KAAK,EACV,KAAK,IAAI,EAEV,MAAM,SAAS,CAAC;AAiIjB;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgKxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,aAAa,EAAE,YAAY,IAAI,GAAG,MAAM,KAAG,IAYpF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,MAAM,GACP,EAAE;IACD,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,IAAI,CAAC;CACd,kBA4DA;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,UAMlE"}
|
package/dist/index.browser.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser-specific entry point for @elizaos/core
|
|
3
|
-
*
|
|
4
|
-
* This file exports only browser-compatible modules and provides
|
|
5
|
-
* stubs or alternatives for Node.js-specific functionality.
|
|
6
|
-
*/
|
|
7
|
-
export * from './types';
|
|
8
|
-
export * from './utils';
|
|
9
|
-
export * from './schemas/character';
|
|
10
|
-
export * from './utils/environment';
|
|
11
|
-
export * from './utils/buffer';
|
|
12
|
-
export * from './actions';
|
|
13
|
-
export * from './database';
|
|
14
|
-
export * from './entities';
|
|
15
|
-
export * from './logger';
|
|
16
|
-
export * from './memory';
|
|
17
|
-
export * from './prompts';
|
|
18
|
-
export * from './roles';
|
|
19
|
-
export * from './runtime';
|
|
20
|
-
export * from './settings';
|
|
21
|
-
export * from './services';
|
|
22
|
-
export * from './services/message-service';
|
|
23
|
-
export * from './services/default-message-service';
|
|
24
|
-
export * from './search';
|
|
25
|
-
export * from './elizaos';
|
|
26
|
-
export * from './streaming-context';
|
|
27
|
-
export declare const isBrowser = true;
|
|
28
|
-
export declare const isNode = false;
|
|
29
|
-
/**
|
|
30
|
-
* Browser stub for server health checks
|
|
31
|
-
* In browser environment, this is a no-op
|
|
32
|
-
*/
|
|
33
|
-
export declare const serverHealth: {
|
|
34
|
-
check: () => Promise<{
|
|
35
|
-
status: string;
|
|
36
|
-
environment: string;
|
|
37
|
-
}>;
|
|
38
|
-
isHealthy: () => boolean;
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B,eAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;CAGxB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Main entry point for @elizaos/core
|
|
3
|
-
*
|
|
4
|
-
* This is the default export that includes all modules.
|
|
5
|
-
* The build system creates separate bundles for Node.js and browser environments.
|
|
6
|
-
* Package.json conditional exports handle the routing to the correct build.
|
|
7
|
-
*/
|
|
8
|
-
export * from './types';
|
|
9
|
-
export * from './utils';
|
|
10
|
-
export * from './schemas/character';
|
|
11
|
-
export * from './character';
|
|
12
|
-
export * from './utils/environment';
|
|
13
|
-
export * from './utils/buffer';
|
|
14
|
-
export * from './utils/streaming';
|
|
15
|
-
export * from './utils/paths';
|
|
16
|
-
export * from './actions';
|
|
17
|
-
export * from './database';
|
|
18
|
-
export * from './entities';
|
|
19
|
-
export * from './logger';
|
|
20
|
-
export * from './memory';
|
|
21
|
-
export * from './prompts';
|
|
22
|
-
export * from './roles';
|
|
23
|
-
export * from './runtime';
|
|
24
|
-
export * from './secrets';
|
|
25
|
-
export * from './settings';
|
|
26
|
-
export * from './services';
|
|
27
|
-
export * from './services/message-service';
|
|
28
|
-
export * from './services/default-message-service';
|
|
29
|
-
export * from './search';
|
|
30
|
-
export * from './elizaos';
|
|
31
|
-
export * from './streaming-context';
|
|
32
|
-
export * from './request-context';
|
|
33
|
-
export declare const isBrowser: boolean;
|
|
34
|
-
export declare const isNode: boolean;
|
|
35
|
-
export * from './utils/server-health';
|
|
36
|
-
export type { SessionChatType, SessionDeliveryContext, SessionEntry, SessionOrigin, SessionResolution, SessionSkillsSnapshot, SessionStore, GroupKeyResolution, } from './sessions/types';
|
|
37
|
-
export { createSessionEntry, isValidSessionEntry, mergeSessionEntry, DEFAULT_IDLE_MINUTES, DEFAULT_RESET_TRIGGER, DEFAULT_RESET_TRIGGERS, } from './sessions/types';
|
|
38
|
-
export * from './sessions/session-key';
|
|
39
|
-
export * from './constants';
|
|
40
|
-
export * from './onboarding-state';
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,aAAa,CAAC;AAG5B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,mBAAmB,CAAC;AAIlC,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,mBAAmB,CAAC;AAQlC,eAAO,MAAM,SAAS,SAG4C,CAAC;AACnE,eAAO,MAAM,MAAM,SAG2B,CAAC;AAG/C,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
DELETED
package/dist/index.node.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node.js-specific entry point for @elizaos/core
|
|
3
|
-
*
|
|
4
|
-
* This file exports all modules including Node.js-specific functionality.
|
|
5
|
-
* This is the full API surface of the core package.
|
|
6
|
-
*/
|
|
7
|
-
export * from './types';
|
|
8
|
-
export * from './utils';
|
|
9
|
-
export * from './schemas/character';
|
|
10
|
-
export * from './utils/environment';
|
|
11
|
-
export * from './utils/buffer';
|
|
12
|
-
export * from './utils/streaming';
|
|
13
|
-
export * from './utils/node';
|
|
14
|
-
export * from './actions';
|
|
15
|
-
export * from './database';
|
|
16
|
-
export * from './entities';
|
|
17
|
-
export * from './logger';
|
|
18
|
-
export * from './memory';
|
|
19
|
-
export * from './prompts';
|
|
20
|
-
export * from './roles';
|
|
21
|
-
export * from './runtime';
|
|
22
|
-
export * from './settings';
|
|
23
|
-
export * from './services';
|
|
24
|
-
export * from './services/message-service';
|
|
25
|
-
export * from './services/default-message-service';
|
|
26
|
-
export * from './search';
|
|
27
|
-
export * from './elizaos';
|
|
28
|
-
export * from './streaming-context';
|
|
29
|
-
export * from './request-context';
|
|
30
|
-
export * from './character';
|
|
31
|
-
export * from './secrets';
|
|
32
|
-
export * from './plugin';
|
|
33
|
-
export * from './sessions';
|
|
34
|
-
export * from './constants';
|
|
35
|
-
export * from './onboarding-state';
|
|
36
|
-
export declare const isBrowser = false;
|
|
37
|
-
export declare const isNode = true;
|
package/dist/index.node.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAElC,cAAc,cAAc,CAAC;AAG7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AAGzB,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,MAAM,OAAO,CAAC"}
|
package/dist/logger.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export declare const __loggerTestHooks: {
|
|
2
|
-
__noop: () => void;
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Log function signature matching Pino's API for compatibility
|
|
6
|
-
*/
|
|
7
|
-
type LogFn = (obj: Record<string, unknown> | string | Error, msg?: string, ...args: unknown[]) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Logger interface - ElizaOS standard logger API
|
|
10
|
-
*/
|
|
11
|
-
export interface Logger {
|
|
12
|
-
level: string;
|
|
13
|
-
trace: LogFn;
|
|
14
|
-
debug: LogFn;
|
|
15
|
-
info: LogFn;
|
|
16
|
-
warn: LogFn;
|
|
17
|
-
error: LogFn;
|
|
18
|
-
fatal: LogFn;
|
|
19
|
-
success: LogFn;
|
|
20
|
-
progress: LogFn;
|
|
21
|
-
log: LogFn;
|
|
22
|
-
clear: () => void;
|
|
23
|
-
child: (bindings: Record<string, unknown>) => Logger;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Configuration for logger creation
|
|
27
|
-
*/
|
|
28
|
-
export interface LoggerBindings extends Record<string, unknown> {
|
|
29
|
-
level?: string;
|
|
30
|
-
namespace?: string;
|
|
31
|
-
namespaces?: string[];
|
|
32
|
-
maxMemoryLogs?: number;
|
|
33
|
-
__forceType?: 'browser' | 'node';
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Log entry structure for in-memory storage and streaming
|
|
37
|
-
*/
|
|
38
|
-
export interface LogEntry {
|
|
39
|
-
time: number;
|
|
40
|
-
level?: number;
|
|
41
|
-
msg: string;
|
|
42
|
-
agentName?: string;
|
|
43
|
-
agentId?: string;
|
|
44
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Log listener callback type for real-time log streaming
|
|
48
|
-
*/
|
|
49
|
-
export type LogListener = (entry: LogEntry) => void;
|
|
50
|
-
/**
|
|
51
|
-
* Add a listener for real-time log entries (used for WebSocket streaming)
|
|
52
|
-
* @param listener - Callback function to receive log entries
|
|
53
|
-
* @returns Function to remove the listener
|
|
54
|
-
*/
|
|
55
|
-
export declare function addLogListener(listener: LogListener): () => void;
|
|
56
|
-
/**
|
|
57
|
-
* Remove a log listener
|
|
58
|
-
* @param listener - The listener to remove
|
|
59
|
-
*/
|
|
60
|
-
export declare function removeLogListener(listener: LogListener): void;
|
|
61
|
-
export declare const customLevels: Record<string, number>;
|
|
62
|
-
/**
|
|
63
|
-
* Creates a logger instance using Adze
|
|
64
|
-
* @param bindings - Logger configuration or boolean flag
|
|
65
|
-
* @returns Logger instance with ElizaOS API
|
|
66
|
-
*/
|
|
67
|
-
declare function createLogger(bindings?: LoggerBindings | boolean): Logger;
|
|
68
|
-
declare const logger: Logger;
|
|
69
|
-
export declare const elizaLogger: Logger;
|
|
70
|
-
export declare const recentLogs: () => string;
|
|
71
|
-
export { logger, createLogger };
|
|
72
|
-
export default logger;
|
package/dist/logger.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|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,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CAC7D;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;AAKpD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,IAAI,CAGhE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,CAE7D;AAiJD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAU/C,CAAC;AAqYF;;;;GAIG;AACH,iBAAS,YAAY,CAAC,QAAQ,GAAE,cAAc,GAAG,OAAe,GAAG,MAAM,CAwSxE;AAOD,QAAA,MAAM,MAAM,QAAiB,CAAC;AAG9B,eAAO,MAAM,WAAW,QAAS,CAAC;AAGlC,eAAO,MAAM,UAAU,QAAO,MAAgD,CAAC;AAG/E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAChC,eAAe,MAAM,CAAC"}
|
package/dist/memory.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { type Memory, type MemoryMetadata, type MessageMemory, type DocumentMetadata, type FragmentMetadata, type MessageMetadata, type DescriptionMetadata, type CustomMetadata, type Content, type UUID } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Factory function to create a new message memory with proper defaults
|
|
4
|
-
*/
|
|
5
|
-
export declare function createMessageMemory(params: {
|
|
6
|
-
id?: UUID;
|
|
7
|
-
entityId: UUID;
|
|
8
|
-
agentId?: UUID;
|
|
9
|
-
roomId: UUID;
|
|
10
|
-
content: Content & {
|
|
11
|
-
text: string;
|
|
12
|
-
};
|
|
13
|
-
embedding?: number[];
|
|
14
|
-
}): MessageMemory;
|
|
15
|
-
/**
|
|
16
|
-
* Type guard to check if a memory metadata is a DocumentMetadata
|
|
17
|
-
* @param metadata The metadata to check
|
|
18
|
-
* @returns True if the metadata is a DocumentMetadata
|
|
19
|
-
*/
|
|
20
|
-
export declare function isDocumentMetadata(metadata: MemoryMetadata): metadata is DocumentMetadata;
|
|
21
|
-
/**
|
|
22
|
-
* Type guard to check if a memory metadata is a FragmentMetadata
|
|
23
|
-
* @param metadata The metadata to check
|
|
24
|
-
* @returns True if the metadata is a FragmentMetadata
|
|
25
|
-
*/
|
|
26
|
-
export declare function isFragmentMetadata(metadata: MemoryMetadata): metadata is FragmentMetadata;
|
|
27
|
-
/**
|
|
28
|
-
* Type guard to check if a memory metadata is a MessageMetadata
|
|
29
|
-
* @param metadata The metadata to check
|
|
30
|
-
* @returns True if the metadata is a MessageMetadata
|
|
31
|
-
*/
|
|
32
|
-
export declare function isMessageMetadata(metadata: MemoryMetadata): metadata is MessageMetadata;
|
|
33
|
-
/**
|
|
34
|
-
* Type guard to check if a memory metadata is a DescriptionMetadata
|
|
35
|
-
* @param metadata The metadata to check
|
|
36
|
-
* @returns True if the metadata is a DescriptionMetadata
|
|
37
|
-
*/
|
|
38
|
-
export declare function isDescriptionMetadata(metadata: MemoryMetadata): metadata is DescriptionMetadata;
|
|
39
|
-
/**
|
|
40
|
-
* Type guard to check if a memory metadata is a CustomMetadata
|
|
41
|
-
* @param metadata The metadata to check
|
|
42
|
-
* @returns True if the metadata is a CustomMetadata
|
|
43
|
-
*/
|
|
44
|
-
export declare function isCustomMetadata(metadata: MemoryMetadata): metadata is CustomMetadata;
|
|
45
|
-
/**
|
|
46
|
-
* Memory type guard for document memories
|
|
47
|
-
*/
|
|
48
|
-
export declare function isDocumentMemory(memory: Memory): memory is Memory & {
|
|
49
|
-
metadata: DocumentMetadata;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Memory type guard for fragment memories
|
|
53
|
-
*/
|
|
54
|
-
export declare function isFragmentMemory(memory: Memory): memory is Memory & {
|
|
55
|
-
metadata: FragmentMetadata;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Safely access the text content of a memory
|
|
59
|
-
* @param memory The memory to extract text from
|
|
60
|
-
* @param defaultValue Optional default value if no text is found
|
|
61
|
-
* @returns The text content or default value
|
|
62
|
-
*/
|
|
63
|
-
export declare function getMemoryText(memory: Memory, defaultValue?: string): string;
|
package/dist/memory.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EAEnB,KAAK,OAAO,EACZ,KAAK,IAAI,EACV,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,EAAE,CAAC,EAAE,IAAI,CAAC;IACV,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,OAAO,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,aAAa,CAUhB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,QAAQ,IAAI,gBAAgB,CAEzF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,QAAQ,IAAI,gBAAgB,CAEzF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,QAAQ,IAAI,eAAe,CAEvF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc,GA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