@elizaos/core 1.5.10 → 1.5.11-alpha.2

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.
@@ -0,0 +1,152 @@
1
+ import type { Character, IAgentRuntime, UUID, Memory, State, Plugin } from './types';
2
+ /**
3
+ * Batch operation for sending messages
4
+ */
5
+ export interface BatchOperation {
6
+ agentId: UUID;
7
+ operation: 'message' | 'action' | 'evaluate';
8
+ payload: any;
9
+ }
10
+ /**
11
+ * Result of a batch operation
12
+ */
13
+ export interface BatchResult {
14
+ agentId: UUID;
15
+ success: boolean;
16
+ result?: any;
17
+ error?: Error;
18
+ }
19
+ /**
20
+ * Read-only runtime accessor
21
+ */
22
+ export interface ReadonlyRuntime {
23
+ getAgent(id: UUID): IAgentRuntime | undefined;
24
+ getAgents(): IAgentRuntime[];
25
+ getState(agentId: UUID): State | undefined;
26
+ }
27
+ /**
28
+ * Health status for an agent
29
+ */
30
+ export interface HealthStatus {
31
+ alive: boolean;
32
+ responsive: boolean;
33
+ memoryUsage?: number;
34
+ uptime?: number;
35
+ }
36
+ /**
37
+ * Update operation for an agent
38
+ */
39
+ export interface AgentUpdate {
40
+ id: UUID;
41
+ character: Partial<Character>;
42
+ }
43
+ /**
44
+ * ElizaOS - Multi-agent orchestration framework
45
+ * Pure JavaScript implementation for browser and Node.js compatibility
46
+ */
47
+ export declare class ElizaOS extends EventTarget {
48
+ private runtimes;
49
+ private editableMode;
50
+ /**
51
+ * Add multiple agents (batch operation)
52
+ */
53
+ addAgents(agents: Array<{
54
+ character: Character;
55
+ plugins?: Plugin[];
56
+ }>): Promise<UUID[]>;
57
+ /**
58
+ * Register an existing runtime
59
+ */
60
+ registerAgent(runtime: IAgentRuntime): void;
61
+ /**
62
+ * Update an agent's character
63
+ */
64
+ updateAgent(agentId: UUID, updates: Partial<Character>): Promise<void>;
65
+ /**
66
+ * Delete agents
67
+ */
68
+ deleteAgents(agentIds: UUID[]): Promise<void>;
69
+ /**
70
+ * Start multiple agents
71
+ */
72
+ startAgents(agentIds?: UUID[]): Promise<void>;
73
+ /**
74
+ * Stop agents
75
+ */
76
+ stopAgents(agentIds?: UUID[]): Promise<void>;
77
+ /**
78
+ * Get a single agent
79
+ */
80
+ getAgent(id: UUID): IAgentRuntime | undefined;
81
+ /**
82
+ * Get all agents
83
+ */
84
+ getAgents(): IAgentRuntime[];
85
+ /**
86
+ * Get agents by IDs
87
+ */
88
+ getAgentsByIds(ids: UUID[]): IAgentRuntime[];
89
+ /**
90
+ * Get agents by names
91
+ */
92
+ getAgentsByNames(names: string[]): IAgentRuntime[];
93
+ /**
94
+ * Get agent by ID (alias for getAgent for consistency)
95
+ */
96
+ getAgentById(id: UUID): IAgentRuntime | undefined;
97
+ /**
98
+ * Get agent by name
99
+ */
100
+ getAgentByName(name: string): IAgentRuntime | undefined;
101
+ /**
102
+ * Get agent by character name (alias for getAgentByName)
103
+ */
104
+ getAgentByCharacterName(name: string): IAgentRuntime | undefined;
105
+ /**
106
+ * Get agent by character ID
107
+ */
108
+ getAgentByCharacterId(characterId: UUID): IAgentRuntime | undefined;
109
+ /**
110
+ * Send a message to a specific agent - THE ONLY WAY to send messages
111
+ * All message sending (WebSocket, API, CLI, Tests, MessageBus) must use this method
112
+ */
113
+ sendMessage(agentId: UUID, message: Memory | string, options?: {
114
+ userId?: UUID;
115
+ roomId?: UUID;
116
+ metadata?: Record<string, any>;
117
+ }): Promise<Memory[]>;
118
+ /**
119
+ * Send messages to multiple agents (batch operation)
120
+ * All batch message sending must use this method
121
+ */
122
+ sendMessages(messages: Array<{
123
+ agentId: UUID;
124
+ message: Memory | string;
125
+ options?: {
126
+ userId?: UUID;
127
+ roomId?: UUID;
128
+ metadata?: Record<string, any>;
129
+ };
130
+ }>): Promise<Array<{
131
+ agentId: UUID;
132
+ responses: Memory[];
133
+ error?: Error;
134
+ }>>;
135
+ /**
136
+ * Validate API keys for agents
137
+ */
138
+ validateApiKeys(agents?: UUID[]): Promise<Map<UUID, boolean>>;
139
+ /**
140
+ * Health check for agents
141
+ */
142
+ healthCheck(agents?: UUID[]): Promise<Map<UUID, HealthStatus>>;
143
+ /**
144
+ * Get a read-only runtime accessor
145
+ */
146
+ getRuntimeAccessor(): ReadonlyRuntime;
147
+ /**
148
+ * Enable editable mode for post-initialization updates
149
+ */
150
+ enableEditableMode(): void;
151
+ }
152
+ //# sourceMappingURL=elizaos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elizaos.d.ts","sourceRoot":"","sources":["../src/elizaos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,IAAI,EACJ,MAAM,EACN,KAAK,EACL,MAAM,EACP,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC7C,OAAO,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,IAAI,GAAG,aAAa,GAAG,SAAS,CAAC;IAC9C,SAAS,IAAI,aAAa,EAAE,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,I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6 +19,7 @@ export * from './runtime';
19
19
  export * from './settings';
20
20
  export * from './services';
21
21
  export * from './search';
22
+ export * from './elizaos';
22
23
  export declare const isBrowser = true;
23
24
  export declare const isNode = false;
24
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,UAAU,CAAC;AAGzB,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B,eAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;CAGxB,CAAC"}
1
+ {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B,eAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;CAGxB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export * from './runtime';
21
21
  export * from './settings';
22
22
  export * from './services';
23
23
  export * from './search';
24
+ export * from './elizaos';
24
25
  export declare const isBrowser: boolean;
25
26
  export declare const isNode: boolean;
26
27
  export * from './utils/server-health';
@@ -1 +1 @@
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,qBAAqB,CAAC;AAGpC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,UAAU,CAAC;AAGzB,eAAO,MAAM,SAAS,SAG+B,CAAC;AACtD,eAAO,MAAM,MAAM,SAG2B,CAAC;AAG/C,cAAc,uBAAuB,CAAC"}
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,qBAAqB,CAAC;AAGpC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,SAAS,SAG+B,CAAC;AACtD,eAAO,MAAM,MAAM,SAG2B,CAAC;AAG/C,cAAc,uBAAuB,CAAC"}
@@ -9,8 +9,7 @@ export * from './utils';
9
9
  export * from './schemas/character';
10
10
  export * from './utils/environment';
11
11
  export * from './utils/buffer';
12
- export * from './utils/server-health';
13
- export * from './utils/paths';
12
+ export * from './utils/node';
14
13
  export * from './actions';
15
14
  export * from './database';
16
15
  export * from './entities';
@@ -21,6 +20,7 @@ export * from './runtime';
21
20
  export * from './settings';
22
21
  export * from './services';
23
22
  export * from './search';
23
+ export * from './elizaos';
24
24
  export declare const isBrowser = false;
25
25
  export declare const isNode = true;
26
26
  //# sourceMappingURL=index.node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,UAAU,CAAC;AAGzB,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAG7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,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,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,SAAS,QAAQ,CAAC;AAC/B,eAAO,MAAM,MAAM,OAAO,CAAC"}