@elizaos/server 1.6.2-alpha.24 → 1.6.2-alpha.26

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/x-icon" href="/favicon.ico" />
7
7
  <title>ElizaOS - Client</title>
8
- <script type="module" crossorigin src="/assets/main-CbLc5Hyx.js"></script>
8
+ <script type="module" crossorigin src="/assets/main-BtcZiEuQ.js"></script>
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
package/dist/index.js CHANGED
@@ -23828,7 +23828,9 @@ function createAgentCrudRouter(elizaOS, serverInstance) {
23828
23828
  try {
23829
23829
  await serverInstance?.unregisterAgent(agentId);
23830
23830
  const { enabled, status: status2, createdAt, updatedAt, ...characterData } = updatedAgent;
23831
- const runtimes = await serverInstance?.startAgents([{ character: characterData }]);
23831
+ const runtimes = await serverInstance?.startAgents([
23832
+ { character: characterData }
23833
+ ]);
23832
23834
  if (!runtimes || runtimes.length === 0) {
23833
23835
  throw new Error("Failed to restart agent after configuration change");
23834
23836
  }
@@ -23837,7 +23839,9 @@ function createAgentCrudRouter(elizaOS, serverInstance) {
23837
23839
  logger.error({ error: restartError, agentId }, `[AGENT UPDATE] Failed to restart agent ${agentId}, attempting to restore previous state`);
23838
23840
  try {
23839
23841
  const { enabled, status: status2, createdAt, updatedAt, ...previousCharacterData } = currentAgent;
23840
- await serverInstance?.startAgents([{ character: previousCharacterData }]);
23842
+ await serverInstance?.startAgents([
23843
+ { character: previousCharacterData }
23844
+ ]);
23841
23845
  logger.warn(`[AGENT UPDATE] Restored agent ${agentId} to previous state`);
23842
23846
  } catch (restoreError) {
23843
23847
  logger.error({ error: restoreError, agentId }, `[AGENT UPDATE] Failed to restore agent ${agentId} - agent may be in broken state`);
@@ -28860,7 +28864,7 @@ import express30 from "express";
28860
28864
  // package.json
28861
28865
  var package_default = {
28862
28866
  name: "@elizaos/server",
28863
- version: "1.6.2-alpha.24",
28867
+ version: "1.6.2-alpha.26",
28864
28868
  description: "ElizaOS Server - Core server infrastructure for ElizaOS agents",
28865
28869
  publishConfig: {
28866
28870
  access: "public",
@@ -29561,7 +29565,6 @@ function apiKeyAuthMiddleware(req, res, next) {
29561
29565
  // src/services/message.ts
29562
29566
  import {
29563
29567
  ChannelType as ChannelType7,
29564
- EventType as EventType2,
29565
29568
  Service,
29566
29569
  createUniqueUuid as createUniqueUuid6,
29567
29570
  logger as logger28,
@@ -29874,18 +29877,16 @@ class MessageBusService extends Service {
29874
29877
  await this.sendAgentResponseToBus(agentRoomId, agentWorldId, responseContent, agentMemory.id, message);
29875
29878
  return [];
29876
29879
  };
29877
- await this.runtime.emitEvent(EventType2.MESSAGE_RECEIVED, {
29878
- runtime: this.runtime,
29879
- message: agentMemory,
29880
- callback: callbackForCentralBus,
29881
- onComplete: async () => {
29882
- const room = await this.runtime.getRoom(agentRoomId);
29883
- const world = await this.runtime.getWorld(agentWorldId);
29884
- const channelId = room?.channelId;
29885
- const serverId = world?.serverId;
29886
- await this.notifyMessageComplete(channelId, serverId);
29887
- }
29888
- });
29880
+ if (!this.runtime.messageService) {
29881
+ logger28.error(`[${this.runtime.character.name}] MessageBusService: messageService is not initialized, cannot handle message`);
29882
+ return;
29883
+ }
29884
+ await this.runtime.messageService.handleMessage(this.runtime, agentMemory, callbackForCentralBus);
29885
+ const room = await this.runtime.getRoom(agentRoomId);
29886
+ const world = await this.runtime.getWorld(agentWorldId);
29887
+ const channelId = room?.channelId;
29888
+ const serverId = world?.serverId;
29889
+ await this.notifyMessageComplete(channelId, serverId);
29889
29890
  } catch (error) {
29890
29891
  logger28.error(`[${this.runtime.character.name}] MessageBusService: Error processing incoming message:`, error instanceof Error ? error.message : String(error));
29891
29892
  }
@@ -29896,11 +29897,11 @@ class MessageBusService extends Service {
29896
29897
  const agentMemoryId = createUniqueUuid6(this.runtime, data.messageId);
29897
29898
  const existingMemory = await this.runtime.getMemoryById(agentMemoryId);
29898
29899
  if (existingMemory) {
29899
- await this.runtime.emitEvent(EventType2.MESSAGE_DELETED, {
29900
- runtime: this.runtime,
29901
- message: existingMemory,
29902
- source: "message-bus-service"
29903
- });
29900
+ if (!this.runtime.messageService) {
29901
+ logger28.error(`[${this.runtime.character.name}] MessageBusService: messageService is not initialized, cannot delete message`);
29902
+ return;
29903
+ }
29904
+ await this.runtime.messageService.deleteMessage(this.runtime, existingMemory);
29904
29905
  logger28.debug(`[${this.runtime.character.name}] MessageBusService: Successfully processed message deletion for ${data.messageId}`);
29905
29906
  } else {
29906
29907
  logger28.warn(`[${this.runtime.character.name}] MessageBusService: No memory found for deleted message ${data.messageId}`);
@@ -29913,18 +29914,11 @@ class MessageBusService extends Service {
29913
29914
  try {
29914
29915
  logger28.info(`[${this.runtime.character.name}] MessageBusService: Received channel_cleared event for channel ${data.channelId}`);
29915
29916
  const agentRoomId = createUniqueUuid6(this.runtime, data.channelId);
29916
- const memories = await this.runtime.getMemoriesByRoomIds({
29917
- tableName: "messages",
29918
- roomIds: [agentRoomId]
29919
- });
29920
- logger28.info(`[${this.runtime.character.name}] MessageBusService: Found ${memories.length} memories to delete for channel ${data.channelId}`);
29921
- await this.runtime.emitEvent(EventType2.CHANNEL_CLEARED, {
29922
- runtime: this.runtime,
29923
- source: "message-bus-service",
29924
- roomId: agentRoomId,
29925
- channelId: data.channelId,
29926
- memoryCount: memories.length
29927
- });
29917
+ if (!this.runtime.messageService) {
29918
+ logger28.error(`[${this.runtime.character.name}] MessageBusService: messageService is not initialized, cannot clear channel`);
29919
+ return;
29920
+ }
29921
+ await this.runtime.messageService.clearChannel(this.runtime, agentRoomId, data.channelId);
29928
29922
  logger28.info(`[${this.runtime.character.name}] MessageBusService: Successfully processed channel clear for ${data.channelId} -> room ${agentRoomId}`);
29929
29923
  } catch (error) {
29930
29924
  logger28.error(`[${this.runtime.character.name}] MessageBusService: Error handling channel clear:`, error instanceof Error ? error.message : String(error));
@@ -45961,11 +45955,7 @@ class AgentServer {
45961
45955
  }
45962
45956
  const agentConfigs = agents.map((agent) => {
45963
45957
  agent.character.id ??= stringToUuid2(agent.character.name);
45964
- const allPlugins = [
45965
- ...agent.character.plugins || [],
45966
- ...agent.plugins || [],
45967
- sqlPlugin
45968
- ];
45958
+ const allPlugins = [...agent.character.plugins || [], ...agent.plugins || [], sqlPlugin];
45969
45959
  return {
45970
45960
  character: encryptedCharacter(agent.character),
45971
45961
  plugins: allPlugins,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/server",
3
- "version": "1.6.2-alpha.24",
3
+ "version": "1.6.2-alpha.26",
4
4
  "description": "ElizaOS Server - Core server infrastructure for ElizaOS agents",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -44,7 +44,7 @@
44
44
  "dev": "bun run build.ts --watch"
45
45
  },
46
46
  "devDependencies": {
47
- "@elizaos/client": "1.6.2-alpha.24",
47
+ "@elizaos/client": "1.6.2-alpha.26",
48
48
  "@types/node": "^24.0.1",
49
49
  "prettier": "3.6.2",
50
50
  "tsx": "4.20.6",
@@ -52,10 +52,10 @@
52
52
  "which": "^5.0.0",
53
53
  "ws": "^8.18.0"
54
54
  },
55
- "gitHead": "2564836ef8696a0e1a8aa33777eded254458931a",
55
+ "gitHead": "d4b61ae880ea53987df89027dff5ac58287168a1",
56
56
  "dependencies": {
57
- "@elizaos/core": "1.6.2-alpha.24",
58
- "@elizaos/plugin-sql": "1.6.2-alpha.24",
57
+ "@elizaos/core": "1.6.2-alpha.26",
58
+ "@elizaos/plugin-sql": "1.6.2-alpha.26",
59
59
  "@sentry/node": "^10.16.0",
60
60
  "@types/express": "^5.0.2",
61
61
  "@types/helmet": "^4.0.0",