@elizaos/plugin-bootstrap 1.6.5-alpha.21 → 1.6.5-alpha.23

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 (3) hide show
  1. package/dist/index.js +588 -113
  2. package/dist/index.js.map +24 -24
  3. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -412,7 +412,11 @@ var choiceAction = {
412
412
  }
413
413
  return pendingTasks && pendingTasks.length > 0 && pendingTasks.some((task) => task.metadata?.options);
414
414
  } catch (error) {
415
- logger2.error({ src: "plugin:bootstrap:action:choice", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error validating choice action");
415
+ logger2.error({
416
+ src: "plugin:bootstrap:action:choice",
417
+ agentId: runtime.agentId,
418
+ error: error instanceof Error ? error.message : String(error)
419
+ }, "Error validating choice action");
416
420
  return false;
417
421
  }
418
422
  },
@@ -595,7 +599,11 @@ ${task.options?.map((opt) => `- ${opt.name}: ${opt.description}`).join(`
595
599
  success: true
596
600
  };
597
601
  } catch (error) {
598
- logger2.error({ src: "plugin:bootstrap:action:choice", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error executing task with option");
602
+ logger2.error({
603
+ src: "plugin:bootstrap:action:choice",
604
+ agentId: runtime.agentId,
605
+ error: error instanceof Error ? error.message : String(error)
606
+ }, "Error executing task with option");
599
607
  await callback?.({
600
608
  text: "There was an error processing your selection.",
601
609
  actions: ["SELECT_OPTION_ERROR"],
@@ -813,7 +821,11 @@ var followRoomAction = {
813
821
  success: true
814
822
  };
815
823
  } catch (error) {
816
- logger3.error({ src: "plugin:bootstrap:action:follow_room", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error following room");
824
+ logger3.error({
825
+ src: "plugin:bootstrap:action:follow_room",
826
+ agentId: runtime.agentId,
827
+ error: error instanceof Error ? error.message : String(error)
828
+ }, "Error following room");
817
829
  return {
818
830
  text: "Failed to follow room",
819
831
  values: {
@@ -1466,7 +1478,11 @@ var muteRoomAction = {
1466
1478
  success: true
1467
1479
  };
1468
1480
  } catch (error) {
1469
- logger4.error({ src: "plugin:bootstrap:action:mute_room", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error muting room");
1481
+ logger4.error({
1482
+ src: "plugin:bootstrap:action:mute_room",
1483
+ agentId: runtime.agentId,
1484
+ error: error instanceof Error ? error.message : String(error)
1485
+ }, "Error muting room");
1470
1486
  return {
1471
1487
  text: "Failed to mute room",
1472
1488
  values: {
@@ -1796,7 +1812,11 @@ var replyAction = {
1796
1812
  const actionContext = _options?.actionContext;
1797
1813
  const previousResults = actionContext?.previousResults || [];
1798
1814
  if (previousResults.length > 0) {
1799
- logger5.debug({ src: "plugin:bootstrap:action:reply", agentId: runtime.agentId, count: previousResults.length }, "Found previous action results");
1815
+ logger5.debug({
1816
+ src: "plugin:bootstrap:action:reply",
1817
+ agentId: runtime.agentId,
1818
+ count: previousResults.length
1819
+ }, "Found previous action results");
1800
1820
  }
1801
1821
  const allProviders = responses?.flatMap((res) => res.content?.providers ?? []) ?? [];
1802
1822
  state = await runtime.composeState(message, [
@@ -1837,7 +1857,11 @@ var replyAction = {
1837
1857
  success: true
1838
1858
  };
1839
1859
  } catch (error) {
1840
- logger5.error({ src: "plugin:bootstrap:action:reply", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error generating response");
1860
+ logger5.error({
1861
+ src: "plugin:bootstrap:action:reply",
1862
+ agentId: runtime.agentId,
1863
+ error: error instanceof Error ? error.message : String(error)
1864
+ }, "Error generating response");
1841
1865
  return {
1842
1866
  text: "Error generating reply",
1843
1867
  values: {
@@ -2069,7 +2093,11 @@ IMPORTANT: Your response must ONLY contain the <response></response> XML block a
2069
2093
  for (const assignment of assignments) {
2070
2094
  let targetEntity = entities.find((e) => e.id === assignment.entityId);
2071
2095
  if (!targetEntity) {
2072
- logger6.error({ src: "plugin:bootstrap:action:update_role", agentId: runtime.agentId, entityId: assignment.entityId }, "Could not find an ID to assign to");
2096
+ logger6.error({
2097
+ src: "plugin:bootstrap:action:update_role",
2098
+ agentId: runtime.agentId,
2099
+ entityId: assignment.entityId
2100
+ }, "Could not find an ID to assign to");
2073
2101
  failedUpdates.push({
2074
2102
  entityId: assignment.entityId,
2075
2103
  reason: "Entity not found"
@@ -2107,7 +2135,11 @@ IMPORTANT: Your response must ONLY contain the <response></response> XML block a
2107
2135
  await runtime.updateWorld(world);
2108
2136
  logger6.info({ src: "plugin:bootstrap:action:update_role", agentId: runtime.agentId, serverId }, "Updated roles in world metadata");
2109
2137
  } catch (error) {
2110
- logger6.error({ src: "plugin:bootstrap:action:update_role", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to save world updates");
2138
+ logger6.error({
2139
+ src: "plugin:bootstrap:action:update_role",
2140
+ agentId: runtime.agentId,
2141
+ error: error instanceof Error ? error.message : String(error)
2142
+ }, "Failed to save world updates");
2111
2143
  return {
2112
2144
  text: "Failed to save role updates",
2113
2145
  values: {
@@ -2444,7 +2476,11 @@ var sendMessageAction = {
2444
2476
  success: true
2445
2477
  };
2446
2478
  } catch (error) {
2447
- logger7.error({ src: "plugin:bootstrap:action:send_message", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to send direct message");
2479
+ logger7.error({
2480
+ src: "plugin:bootstrap:action:send_message",
2481
+ agentId: runtime.agentId,
2482
+ error: error instanceof Error ? error.message : String(error)
2483
+ }, "Failed to send direct message");
2448
2484
  await callback({
2449
2485
  text: "I encountered an error trying to send the message. Please try again.",
2450
2486
  actions: ["SEND_MESSAGE_ERROR"],
@@ -2550,7 +2586,11 @@ var sendMessageAction = {
2550
2586
  success: true
2551
2587
  };
2552
2588
  } catch (error) {
2553
- logger7.error({ src: "plugin:bootstrap:action:send_message", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to send room message");
2589
+ logger7.error({
2590
+ src: "plugin:bootstrap:action:send_message",
2591
+ agentId: runtime.agentId,
2592
+ error: error instanceof Error ? error.message : String(error)
2593
+ }, "Failed to send room message");
2554
2594
  await callback({
2555
2595
  text: "I encountered an error trying to send the message to the room. Please try again.",
2556
2596
  actions: ["SEND_MESSAGE_ERROR"],
@@ -2590,7 +2630,11 @@ var sendMessageAction = {
2590
2630
  success: false
2591
2631
  };
2592
2632
  } catch (error) {
2593
- logger7.error({ src: "plugin:bootstrap:action:send_message", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in sendMessage handler");
2633
+ logger7.error({
2634
+ src: "plugin:bootstrap:action:send_message",
2635
+ agentId: runtime.agentId,
2636
+ error: error instanceof Error ? error.message : String(error)
2637
+ }, "Error in sendMessage handler");
2594
2638
  await callback?.({
2595
2639
  text: "There was an error processing your message request.",
2596
2640
  actions: ["SEND_MESSAGE_ERROR"],
@@ -2879,7 +2923,11 @@ async function getWorldSettings(runtime, serverId) {
2879
2923
  }
2880
2924
  return world.metadata.settings;
2881
2925
  } catch (error) {
2882
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error getting settings state");
2926
+ logger8.error({
2927
+ src: "plugin:bootstrap:action:settings",
2928
+ agentId: runtime.agentId,
2929
+ error: error instanceof Error ? error.message : String(error)
2930
+ }, "Error getting settings state");
2883
2931
  return null;
2884
2932
  }
2885
2933
  }
@@ -2898,7 +2946,11 @@ async function updateWorldSettings(runtime, serverId, worldSettings) {
2898
2946
  await runtime.updateWorld(world);
2899
2947
  return true;
2900
2948
  } catch (error) {
2901
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error updating settings state");
2949
+ logger8.error({
2950
+ src: "plugin:bootstrap:action:settings",
2951
+ agentId: runtime.agentId,
2952
+ error: error instanceof Error ? error.message : String(error)
2953
+ }, "Error updating settings state");
2902
2954
  return false;
2903
2955
  }
2904
2956
  }
@@ -3039,7 +3091,11 @@ async function processSettingUpdates(runtime, serverId, worldSettings, updates)
3039
3091
  }
3040
3092
  return { updatedAny, messages };
3041
3093
  } catch (error) {
3042
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error processing setting updates");
3094
+ logger8.error({
3095
+ src: "plugin:bootstrap:action:settings",
3096
+ agentId: runtime.agentId,
3097
+ error: error instanceof Error ? error.message : String(error)
3098
+ }, "Error processing setting updates");
3043
3099
  return {
3044
3100
  updatedAny: false,
3045
3101
  messages: ["Error occurred while updating settings"]
@@ -3078,7 +3134,11 @@ async function handleOnboardingComplete(runtime, worldSettings, _state, callback
3078
3134
  success: true
3079
3135
  };
3080
3136
  } catch (error) {
3081
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error handling settings completion");
3137
+ logger8.error({
3138
+ src: "plugin:bootstrap:action:settings",
3139
+ agentId: runtime.agentId,
3140
+ error: error instanceof Error ? error.message : String(error)
3141
+ }, "Error handling settings completion");
3082
3142
  await callback({
3083
3143
  text: "Great! All required settings have been configured. Your server is now fully set up and ready to use.",
3084
3144
  actions: ["ONBOARDING_COMPLETE"],
@@ -3142,7 +3202,11 @@ async function generateSuccessResponse(runtime, worldSettings, state, messages,
3142
3202
  success: true
3143
3203
  };
3144
3204
  } catch (error) {
3145
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error generating success response");
3205
+ logger8.error({
3206
+ src: "plugin:bootstrap:action:settings",
3207
+ agentId: runtime.agentId,
3208
+ error: error instanceof Error ? error.message : String(error)
3209
+ }, "Error generating success response");
3146
3210
  await callback({
3147
3211
  text: "Settings updated successfully. Please continue with the remaining configuration.",
3148
3212
  actions: ["SETTING_UPDATED"],
@@ -3203,7 +3267,11 @@ async function generateFailureResponse(runtime, worldSettings, state, callback)
3203
3267
  success: false
3204
3268
  };
3205
3269
  } catch (error) {
3206
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error generating failure response");
3270
+ logger8.error({
3271
+ src: "plugin:bootstrap:action:settings",
3272
+ agentId: runtime.agentId,
3273
+ error: error instanceof Error ? error.message : String(error)
3274
+ }, "Error generating failure response");
3207
3275
  await callback({
3208
3276
  text: "I couldn't understand your settings update. Please try again with a clearer format.",
3209
3277
  actions: ["SETTING_UPDATE_FAILED"],
@@ -3253,7 +3321,11 @@ async function generateErrorResponse(runtime, state, callback) {
3253
3321
  success: false
3254
3322
  };
3255
3323
  } catch (error) {
3256
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error generating error response");
3324
+ logger8.error({
3325
+ src: "plugin:bootstrap:action:settings",
3326
+ agentId: runtime.agentId,
3327
+ error: error instanceof Error ? error.message : String(error)
3328
+ }, "Error generating error response");
3257
3329
  await callback({
3258
3330
  text: "I'm sorry, but I encountered an error while processing your request. Please try again or contact support if the issue persists.",
3259
3331
  actions: ["SETTING_UPDATE_ERROR"],
@@ -3283,10 +3355,18 @@ var updateSettingsAction = {
3283
3355
  validate: async (runtime, message, _state) => {
3284
3356
  try {
3285
3357
  if (message.content.channelType !== ChannelType2.DM) {
3286
- logger8.debug({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, channelType: message.content.channelType }, "Skipping settings in non-DM channel");
3358
+ logger8.debug({
3359
+ src: "plugin:bootstrap:action:settings",
3360
+ agentId: runtime.agentId,
3361
+ channelType: message.content.channelType
3362
+ }, "Skipping settings in non-DM channel");
3287
3363
  return false;
3288
3364
  }
3289
- logger8.debug({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, entityId: message.entityId }, "Looking for server where user is owner");
3365
+ logger8.debug({
3366
+ src: "plugin:bootstrap:action:settings",
3367
+ agentId: runtime.agentId,
3368
+ entityId: message.entityId
3369
+ }, "Looking for server where user is owner");
3290
3370
  const worlds = await findWorldsForOwner(runtime, message.entityId);
3291
3371
  if (!worlds) {
3292
3372
  return false;
@@ -3294,13 +3374,25 @@ var updateSettingsAction = {
3294
3374
  const world = worlds.find((world2) => world2.metadata?.settings);
3295
3375
  const worldSettings = world?.metadata?.settings;
3296
3376
  if (!worldSettings) {
3297
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, serverId: world?.messageServerId }, "No settings state found for server");
3377
+ logger8.error({
3378
+ src: "plugin:bootstrap:action:settings",
3379
+ agentId: runtime.agentId,
3380
+ serverId: world?.messageServerId
3381
+ }, "No settings state found for server");
3298
3382
  return false;
3299
3383
  }
3300
- logger8.debug({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, serverId: world.messageServerId }, "Found valid settings state for server");
3384
+ logger8.debug({
3385
+ src: "plugin:bootstrap:action:settings",
3386
+ agentId: runtime.agentId,
3387
+ serverId: world.messageServerId
3388
+ }, "Found valid settings state for server");
3301
3389
  return true;
3302
3390
  } catch (error) {
3303
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error validating settings action");
3391
+ logger8.error({
3392
+ src: "plugin:bootstrap:action:settings",
3393
+ agentId: runtime.agentId,
3394
+ error: error instanceof Error ? error.message : String(error)
3395
+ }, "Error validating settings action");
3304
3396
  return false;
3305
3397
  }
3306
3398
  },
@@ -3358,11 +3450,19 @@ var updateSettingsAction = {
3358
3450
  error: new Error("Callback is required for settings handler")
3359
3451
  };
3360
3452
  }
3361
- logger8.info({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, entityId: message.entityId }, "Handler looking for server for user");
3453
+ logger8.info({
3454
+ src: "plugin:bootstrap:action:settings",
3455
+ agentId: runtime.agentId,
3456
+ entityId: message.entityId
3457
+ }, "Handler looking for server for user");
3362
3458
  const worlds = await findWorldsForOwner(runtime, message.entityId);
3363
3459
  const serverOwnership = worlds?.find((world) => world.metadata?.settings);
3364
3460
  if (!serverOwnership) {
3365
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, entityId: message.entityId }, "No server found for user in handler");
3461
+ logger8.error({
3462
+ src: "plugin:bootstrap:action:settings",
3463
+ agentId: runtime.agentId,
3464
+ entityId: message.entityId
3465
+ }, "No server found for user in handler");
3366
3466
  await generateErrorResponse(runtime, state, callback);
3367
3467
  return {
3368
3468
  text: "No server found for user",
@@ -3381,7 +3481,11 @@ var updateSettingsAction = {
3381
3481
  const serverId = serverOwnership?.messageServerId;
3382
3482
  logger8.info({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, serverId }, "Using server ID");
3383
3483
  if (!serverId) {
3384
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, entityId: message.entityId }, "No server ID found for user in handler");
3484
+ logger8.error({
3485
+ src: "plugin:bootstrap:action:settings",
3486
+ agentId: runtime.agentId,
3487
+ entityId: message.entityId
3488
+ }, "No server ID found for user in handler");
3385
3489
  await generateErrorResponse(runtime, state, callback);
3386
3490
  return {
3387
3491
  text: "No server ID found",
@@ -3415,12 +3519,24 @@ var updateSettingsAction = {
3415
3519
  success: false
3416
3520
  };
3417
3521
  }
3418
- logger8.info({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, text: message.content.text }, "Extracting settings from message");
3522
+ logger8.info({
3523
+ src: "plugin:bootstrap:action:settings",
3524
+ agentId: runtime.agentId,
3525
+ text: message.content.text
3526
+ }, "Extracting settings from message");
3419
3527
  const extractedSettings = await extractSettingValues(runtime, message, state, worldSettings);
3420
- logger8.info({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, count: extractedSettings.length }, "Extracted settings");
3528
+ logger8.info({
3529
+ src: "plugin:bootstrap:action:settings",
3530
+ agentId: runtime.agentId,
3531
+ count: extractedSettings.length
3532
+ }, "Extracted settings");
3421
3533
  const updateResults = await processSettingUpdates(runtime, serverId, worldSettings, extractedSettings);
3422
3534
  if (updateResults.updatedAny) {
3423
- logger8.info({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, messages: updateResults.messages }, "Successfully updated settings");
3535
+ logger8.info({
3536
+ src: "plugin:bootstrap:action:settings",
3537
+ agentId: runtime.agentId,
3538
+ messages: updateResults.messages
3539
+ }, "Successfully updated settings");
3424
3540
  const updatedWorldSettings = await getWorldSettings(runtime, serverId);
3425
3541
  if (!updatedWorldSettings) {
3426
3542
  logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId }, "Failed to retrieve updated settings state");
@@ -3484,7 +3600,11 @@ var updateSettingsAction = {
3484
3600
  };
3485
3601
  }
3486
3602
  } catch (error) {
3487
- logger8.error({ src: "plugin:bootstrap:action:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in settings handler");
3603
+ logger8.error({
3604
+ src: "plugin:bootstrap:action:settings",
3605
+ agentId: runtime.agentId,
3606
+ error: error instanceof Error ? error.message : String(error)
3607
+ }, "Error in settings handler");
3488
3608
  if (state && callback) {
3489
3609
  await generateErrorResponse(runtime, state, callback);
3490
3610
  }
@@ -4151,7 +4271,11 @@ var unmuteRoomAction = {
4151
4271
  await runtime.setParticipantUserState(message.roomId, runtime.agentId, null);
4152
4272
  const room = await runtime.getRoom(message.roomId);
4153
4273
  if (!room) {
4154
- logger9.warn({ src: "plugin:bootstrap:action:unmute_room", agentId: runtime.agentId, roomId: message.roomId }, "Room not found");
4274
+ logger9.warn({
4275
+ src: "plugin:bootstrap:action:unmute_room",
4276
+ agentId: runtime.agentId,
4277
+ roomId: message.roomId
4278
+ }, "Room not found");
4155
4279
  return {
4156
4280
  text: `Room not found: ${message.roomId}`,
4157
4281
  values: {
@@ -4194,7 +4318,11 @@ var unmuteRoomAction = {
4194
4318
  success: true
4195
4319
  };
4196
4320
  } catch (error) {
4197
- logger9.error({ src: "plugin:bootstrap:action:unmute_room", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error unmuting room");
4321
+ logger9.error({
4322
+ src: "plugin:bootstrap:action:unmute_room",
4323
+ agentId: runtime.agentId,
4324
+ error: error instanceof Error ? error.message : String(error)
4325
+ }, "Error unmuting room");
4198
4326
  return {
4199
4327
  text: "Failed to unmute room",
4200
4328
  values: {
@@ -4494,7 +4622,11 @@ var updateEntityAction = {
4494
4622
  throw new Error("Invalid response format - missing source or data");
4495
4623
  }
4496
4624
  } catch (error) {
4497
- logger10.error({ src: "plugin:bootstrap:action:update_entity", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to parse component data");
4625
+ logger10.error({
4626
+ src: "plugin:bootstrap:action:update_entity",
4627
+ agentId: runtime.agentId,
4628
+ error: error instanceof Error ? error.message : String(error)
4629
+ }, "Failed to parse component data");
4498
4630
  await callback({
4499
4631
  text: "I couldn't properly understand the component information. Please try again with more specific information.",
4500
4632
  actions: ["UPDATE_ENTITY_ERROR"],
@@ -4594,7 +4726,11 @@ var updateEntityAction = {
4594
4726
  };
4595
4727
  }
4596
4728
  } catch (error) {
4597
- logger10.error({ src: "plugin:bootstrap:action:update_entity", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in updateEntity handler");
4729
+ logger10.error({
4730
+ src: "plugin:bootstrap:action:update_entity",
4731
+ agentId: runtime.agentId,
4732
+ error: error instanceof Error ? error.message : String(error)
4733
+ }, "Error in updateEntity handler");
4598
4734
  await callback?.({
4599
4735
  text: "There was an error processing the entity information.",
4600
4736
  actions: ["UPDATE_ENTITY_ERROR"],
@@ -4877,7 +5013,11 @@ async function handler(runtime, message, state) {
4877
5013
  }
4878
5014
  await runtime.setCache(`${message.roomId}-reflection-last-processed`, message?.id || "");
4879
5015
  } catch (error) {
4880
- runtime.logger.error({ src: "plugin:bootstrap:evaluator:reflection", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in reflection handler");
5016
+ runtime.logger.error({
5017
+ src: "plugin:bootstrap:evaluator:reflection",
5018
+ agentId: runtime.agentId,
5019
+ error: error instanceof Error ? error.message : String(error)
5020
+ }, "Error in reflection handler");
4881
5021
  return;
4882
5022
  }
4883
5023
  }
@@ -5204,7 +5344,11 @@ ${values}`;
5204
5344
  });
5205
5345
  recentActionMemories = recentMessages.filter((msg) => msg.content?.type === "action_result" && msg.metadata?.type === "action_result");
5206
5346
  } catch (error) {
5207
- logger11?.error({ src: "plugin:bootstrap:provider:action_state", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to retrieve action memories");
5347
+ logger11?.error({
5348
+ src: "plugin:bootstrap:provider:action_state",
5349
+ agentId: runtime.agentId,
5350
+ error: error instanceof Error ? error.message : String(error)
5351
+ }, "Failed to retrieve action memories");
5208
5352
  }
5209
5353
  let actionMemoriesText = "";
5210
5354
  if (recentActionMemories.length > 0) {
@@ -5446,7 +5590,11 @@ var capabilitiesProvider = {
5446
5590
  ${formattedCapabilities}`
5447
5591
  };
5448
5592
  } catch (error) {
5449
- runtime.logger.error({ src: "plugin:bootstrap:provider:capabilities", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in capabilities provider");
5593
+ runtime.logger.error({
5594
+ src: "plugin:bootstrap:provider:capabilities",
5595
+ agentId: runtime.agentId,
5596
+ error: error instanceof Error ? error.message : String(error)
5597
+ }, "Error in capabilities provider");
5450
5598
  return {
5451
5599
  text: "Error retrieving capabilities from services."
5452
5600
  };
@@ -5627,7 +5775,11 @@ var choiceProvider = {
5627
5775
  text: output
5628
5776
  };
5629
5777
  } catch (error) {
5630
- runtime.logger.error({ src: "plugin:bootstrap:provider:choice", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in options provider");
5778
+ runtime.logger.error({
5779
+ src: "plugin:bootstrap:provider:choice",
5780
+ agentId: runtime.agentId,
5781
+ error: error instanceof Error ? error.message : String(error)
5782
+ }, "Error in options provider");
5631
5783
  return {
5632
5784
  data: {
5633
5785
  tasks: []
@@ -5810,7 +5962,11 @@ var factsProvider = {
5810
5962
  text
5811
5963
  };
5812
5964
  } catch (error) {
5813
- runtime.logger.error({ src: "plugin:bootstrap:provider:facts", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in factsProvider");
5965
+ runtime.logger.error({
5966
+ src: "plugin:bootstrap:provider:facts",
5967
+ agentId: runtime.agentId,
5968
+ error: error instanceof Error ? error.message : String(error)
5969
+ }, "Error in factsProvider");
5814
5970
  return {
5815
5971
  values: {
5816
5972
  facts: ""
@@ -6076,7 +6232,11 @@ ${runText}`;
6076
6232
  text
6077
6233
  };
6078
6234
  } catch (error) {
6079
- logger12.error({ src: "plugin:bootstrap:provider:recent_messages", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in recentMessagesProvider");
6235
+ logger12.error({
6236
+ src: "plugin:bootstrap:provider:recent_messages",
6237
+ agentId: runtime.agentId,
6238
+ error: error instanceof Error ? error.message : String(error)
6239
+ }, "Error in recentMessagesProvider");
6080
6240
  return {
6081
6241
  data: {
6082
6242
  recentMessages: [],
@@ -6229,7 +6389,11 @@ var roleProvider = {
6229
6389
  text: "No role information available for this server."
6230
6390
  };
6231
6391
  }
6232
- logger13.info({ src: "plugin:bootstrap:provider:roles", agentId: runtime.agentId, roleCount: Object.keys(roles).length }, "Found roles");
6392
+ logger13.info({
6393
+ src: "plugin:bootstrap:provider:roles",
6394
+ agentId: runtime.agentId,
6395
+ roleCount: Object.keys(roles).length
6396
+ }, "Found roles");
6233
6397
  const owners = [];
6234
6398
  const admins = [];
6235
6399
  const members = [];
@@ -6394,7 +6558,11 @@ ${requiredUnconfigured > 0 ? `IMPORTANT!: ${requiredUnconfigured} required setti
6394
6558
 
6395
6559
  `)}`;
6396
6560
  } catch (error) {
6397
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error generating status message");
6561
+ logger14.error({
6562
+ src: "plugin:bootstrap:provider:settings",
6563
+ agentId: runtime.agentId,
6564
+ error: error instanceof Error ? error.message : String(error)
6565
+ }, "Error generating status message");
6398
6566
  return "Error generating configuration status.";
6399
6567
  }
6400
6568
  }
@@ -6407,7 +6575,11 @@ var settingsProvider = {
6407
6575
  runtime.getRoom(message.roomId),
6408
6576
  findWorldsForOwner2(runtime, message.entityId)
6409
6577
  ]).catch((error) => {
6410
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error fetching initial data");
6578
+ logger14.error({
6579
+ src: "plugin:bootstrap:provider:settings",
6580
+ agentId: runtime.agentId,
6581
+ error: error instanceof Error ? error.message : String(error)
6582
+ }, "Error fetching initial data");
6411
6583
  throw new Error("Failed to retrieve room or user world information");
6412
6584
  });
6413
6585
  if (!room) {
@@ -6448,7 +6620,11 @@ var settingsProvider = {
6448
6620
  }
6449
6621
  world.metadata.settings = {};
6450
6622
  await runtime.updateWorld(world);
6451
- logger14.info({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, worldId: world.id }, "Initialized settings for user world");
6623
+ logger14.info({
6624
+ src: "plugin:bootstrap:provider:settings",
6625
+ agentId: runtime.agentId,
6626
+ worldId: world.id
6627
+ }, "Initialized settings for user world");
6452
6628
  }
6453
6629
  if (!world) {
6454
6630
  logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId }, "No world found for user during onboarding");
@@ -6459,7 +6635,12 @@ var settingsProvider = {
6459
6635
  try {
6460
6636
  worldSettings = await getWorldSettings2(runtime, serverId);
6461
6637
  } catch (error) {
6462
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, serverId, error: error instanceof Error ? error.message : String(error) }, "Error fetching world settings");
6638
+ logger14.error({
6639
+ src: "plugin:bootstrap:provider:settings",
6640
+ agentId: runtime.agentId,
6641
+ serverId,
6642
+ error: error instanceof Error ? error.message : String(error)
6643
+ }, "Error fetching world settings");
6463
6644
  throw new Error(`Failed to retrieve settings for server ${serverId}`);
6464
6645
  }
6465
6646
  }
@@ -6467,22 +6648,38 @@ var settingsProvider = {
6467
6648
  try {
6468
6649
  world = await runtime.getWorld(room.worldId);
6469
6650
  if (!world) {
6470
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, worldId: room.worldId }, "No world found for room");
6651
+ logger14.error({
6652
+ src: "plugin:bootstrap:provider:settings",
6653
+ agentId: runtime.agentId,
6654
+ worldId: room.worldId
6655
+ }, "No world found for room");
6471
6656
  throw new Error(`No world found for room ${room.worldId}`);
6472
6657
  }
6473
6658
  serverId = world.messageServerId;
6474
6659
  if (serverId) {
6475
6660
  worldSettings = await getWorldSettings2(runtime, serverId);
6476
6661
  } else {
6477
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, worldId: room.worldId }, "No server ID found for world");
6662
+ logger14.error({
6663
+ src: "plugin:bootstrap:provider:settings",
6664
+ agentId: runtime.agentId,
6665
+ worldId: room.worldId
6666
+ }, "No server ID found for world");
6478
6667
  }
6479
6668
  } catch (error) {
6480
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error processing world data");
6669
+ logger14.error({
6670
+ src: "plugin:bootstrap:provider:settings",
6671
+ agentId: runtime.agentId,
6672
+ error: error instanceof Error ? error.message : String(error)
6673
+ }, "Error processing world data");
6481
6674
  throw new Error("Failed to process world information");
6482
6675
  }
6483
6676
  }
6484
6677
  if (!serverId) {
6485
- logger14.info({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, entityId: message.entityId }, "No server ownership found for user after recovery attempt");
6678
+ logger14.info({
6679
+ src: "plugin:bootstrap:provider:settings",
6680
+ agentId: runtime.agentId,
6681
+ entityId: message.entityId
6682
+ }, "No server ownership found for user after recovery attempt");
6486
6683
  return isOnboarding ? {
6487
6684
  data: {
6488
6685
  settings: []
@@ -6532,7 +6729,11 @@ var settingsProvider = {
6532
6729
  text: output
6533
6730
  };
6534
6731
  } catch (error) {
6535
- logger14.error({ src: "plugin:bootstrap:provider:settings", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Critical error in settings provider");
6732
+ logger14.error({
6733
+ src: "plugin:bootstrap:provider:settings",
6734
+ agentId: runtime.agentId,
6735
+ error: error instanceof Error ? error.message : String(error)
6736
+ }, "Critical error in settings provider");
6536
6737
  return {
6537
6738
  data: {
6538
6739
  settings: []
@@ -6579,10 +6780,18 @@ var worldProvider = {
6579
6780
  dynamic: true,
6580
6781
  get: async (runtime, message) => {
6581
6782
  try {
6582
- logger15.debug({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, roomId: message.roomId }, "World provider activated");
6783
+ logger15.debug({
6784
+ src: "plugin:bootstrap:provider:world",
6785
+ agentId: runtime.agentId,
6786
+ roomId: message.roomId
6787
+ }, "World provider activated");
6583
6788
  const currentRoom = await runtime.getRoom(message.roomId);
6584
6789
  if (!currentRoom) {
6585
- logger15.warn({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, roomId: message.roomId }, "Room not found");
6790
+ logger15.warn({
6791
+ src: "plugin:bootstrap:provider:world",
6792
+ agentId: runtime.agentId,
6793
+ roomId: message.roomId
6794
+ }, "Room not found");
6586
6795
  return {
6587
6796
  data: {
6588
6797
  world: {
@@ -6592,10 +6801,19 @@ var worldProvider = {
6592
6801
  text: "Unable to retrieve world information - room not found"
6593
6802
  };
6594
6803
  }
6595
- logger15.debug({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, roomName: currentRoom.name, roomType: currentRoom.type }, "Found room");
6804
+ logger15.debug({
6805
+ src: "plugin:bootstrap:provider:world",
6806
+ agentId: runtime.agentId,
6807
+ roomName: currentRoom.name,
6808
+ roomType: currentRoom.type
6809
+ }, "Found room");
6596
6810
  const worldId = currentRoom.worldId;
6597
6811
  if (!worldId) {
6598
- logger15.warn({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, roomId: message.roomId }, "World ID not found");
6812
+ logger15.warn({
6813
+ src: "plugin:bootstrap:provider:world",
6814
+ agentId: runtime.agentId,
6815
+ roomId: message.roomId
6816
+ }, "World ID not found");
6599
6817
  return {
6600
6818
  data: {
6601
6819
  world: {
@@ -6617,11 +6835,26 @@ var worldProvider = {
6617
6835
  text: "Unable to retrieve world information - world not found"
6618
6836
  };
6619
6837
  }
6620
- logger15.debug({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, worldName: world.name, worldId: world.id }, "Found world");
6838
+ logger15.debug({
6839
+ src: "plugin:bootstrap:provider:world",
6840
+ agentId: runtime.agentId,
6841
+ worldName: world.name,
6842
+ worldId: world.id
6843
+ }, "Found world");
6621
6844
  const worldRooms = await runtime.getRooms(worldId);
6622
- logger15.debug({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, roomCount: worldRooms.length, worldName: world.name }, "Found rooms in world");
6845
+ logger15.debug({
6846
+ src: "plugin:bootstrap:provider:world",
6847
+ agentId: runtime.agentId,
6848
+ roomCount: worldRooms.length,
6849
+ worldName: world.name
6850
+ }, "Found rooms in world");
6623
6851
  const participants = await runtime.getParticipantsForRoom(message.roomId);
6624
- logger15.debug({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, participantCount: participants.length, roomName: currentRoom.name }, "Found participants in room");
6852
+ logger15.debug({
6853
+ src: "plugin:bootstrap:provider:world",
6854
+ agentId: runtime.agentId,
6855
+ participantCount: participants.length,
6856
+ roomName: currentRoom.name
6857
+ }, "Found participants in room");
6625
6858
  const channelsByType = {
6626
6859
  text: [],
6627
6860
  voice: [],
@@ -6709,7 +6942,11 @@ var worldProvider = {
6709
6942
  text: formattedText
6710
6943
  };
6711
6944
  } catch (error) {
6712
- logger15.error({ src: "plugin:bootstrap:provider:world", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in world provider");
6945
+ logger15.error({
6946
+ src: "plugin:bootstrap:provider:world",
6947
+ agentId: runtime.agentId,
6948
+ error: error instanceof Error ? error.message : String(error)
6949
+ }, "Error in world provider");
6713
6950
  return {
6714
6951
  data: {
6715
6952
  world: {
@@ -6788,7 +7025,11 @@ class TaskService extends Service {
6788
7025
  try {
6789
7026
  await this.checkTasks();
6790
7027
  } catch (error) {
6791
- this.runtime.logger.error({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in task timer");
7028
+ this.runtime.logger.error({
7029
+ src: "plugin:bootstrap:service:task",
7030
+ agentId: this.runtime.agentId,
7031
+ error: error instanceof Error ? error.message : String(error)
7032
+ }, "Error in task timer");
6792
7033
  }
6793
7034
  }, this.TICK_INTERVAL);
6794
7035
  }
@@ -6809,7 +7050,12 @@ class TaskService extends Service {
6809
7050
  continue;
6810
7051
  }
6811
7052
  } catch (error) {
6812
- this.runtime.logger.error({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name, error: error instanceof Error ? error.message : String(error) }, "Error validating task");
7053
+ this.runtime.logger.error({
7054
+ src: "plugin:bootstrap:service:task",
7055
+ agentId: this.runtime.agentId,
7056
+ taskName: task.name,
7057
+ error: error instanceof Error ? error.message : String(error)
7058
+ }, "Error validating task");
6813
7059
  continue;
6814
7060
  }
6815
7061
  }
@@ -6849,18 +7095,31 @@ class TaskService extends Service {
6849
7095
  }
6850
7096
  if (task.metadata?.updatedAt === task.metadata?.createdAt) {
6851
7097
  if (task.tags?.includes("immediate")) {
6852
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name }, "Immediately running task");
7098
+ this.runtime.logger.debug({
7099
+ src: "plugin:bootstrap:service:task",
7100
+ agentId: this.runtime.agentId,
7101
+ taskName: task.name
7102
+ }, "Immediately running task");
6853
7103
  await this.executeTask(task);
6854
7104
  continue;
6855
7105
  }
6856
7106
  }
6857
7107
  if (now - taskStartTime >= updateIntervalMs) {
6858
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name, intervalMs: updateIntervalMs }, "Executing task - interval elapsed");
7108
+ this.runtime.logger.debug({
7109
+ src: "plugin:bootstrap:service:task",
7110
+ agentId: this.runtime.agentId,
7111
+ taskName: task.name,
7112
+ intervalMs: updateIntervalMs
7113
+ }, "Executing task - interval elapsed");
6859
7114
  await this.executeTask(task);
6860
7115
  }
6861
7116
  }
6862
7117
  } catch (error) {
6863
- this.runtime.logger.error({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error checking tasks");
7118
+ this.runtime.logger.error({
7119
+ src: "plugin:bootstrap:service:task",
7120
+ agentId: this.runtime.agentId,
7121
+ error: error instanceof Error ? error.message : String(error)
7122
+ }, "Error checking tasks");
6864
7123
  }
6865
7124
  }
6866
7125
  async executeTask(task) {
@@ -6871,7 +7130,11 @@ class TaskService extends Service {
6871
7130
  }
6872
7131
  const worker = this.runtime.getTaskWorker(task.name);
6873
7132
  if (!worker) {
6874
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name }, "No worker found for task type");
7133
+ this.runtime.logger.debug({
7134
+ src: "plugin:bootstrap:service:task",
7135
+ agentId: this.runtime.agentId,
7136
+ taskName: task.name
7137
+ }, "No worker found for task type");
6875
7138
  return;
6876
7139
  }
6877
7140
  if (task.tags?.includes("repeat")) {
@@ -6881,16 +7144,36 @@ class TaskService extends Service {
6881
7144
  updatedAt: Date.now()
6882
7145
  }
6883
7146
  });
6884
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name, taskId: task.id }, "Updated repeating task with new timestamp");
6885
- }
6886
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name, taskId: task.id }, "Executing task");
7147
+ this.runtime.logger.debug({
7148
+ src: "plugin:bootstrap:service:task",
7149
+ agentId: this.runtime.agentId,
7150
+ taskName: task.name,
7151
+ taskId: task.id
7152
+ }, "Updated repeating task with new timestamp");
7153
+ }
7154
+ this.runtime.logger.debug({
7155
+ src: "plugin:bootstrap:service:task",
7156
+ agentId: this.runtime.agentId,
7157
+ taskName: task.name,
7158
+ taskId: task.id
7159
+ }, "Executing task");
6887
7160
  await worker.execute(this.runtime, task.metadata || {}, task);
6888
7161
  if (!task.tags?.includes("repeat")) {
6889
7162
  await this.runtime.deleteTask(task.id);
6890
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskName: task.name, taskId: task.id }, "Deleted non-repeating task after execution");
7163
+ this.runtime.logger.debug({
7164
+ src: "plugin:bootstrap:service:task",
7165
+ agentId: this.runtime.agentId,
7166
+ taskName: task.name,
7167
+ taskId: task.id
7168
+ }, "Deleted non-repeating task after execution");
6891
7169
  }
6892
7170
  } catch (error) {
6893
- this.runtime.logger.error({ src: "plugin:bootstrap:service:task", agentId: this.runtime.agentId, taskId: task.id, error: error instanceof Error ? error.message : String(error) }, "Error executing task");
7171
+ this.runtime.logger.error({
7172
+ src: "plugin:bootstrap:service:task",
7173
+ agentId: this.runtime.agentId,
7174
+ taskId: task.id,
7175
+ error: error instanceof Error ? error.message : String(error)
7176
+ }, "Error executing task");
6894
7177
  }
6895
7178
  }
6896
7179
  static async stop(runtime) {
@@ -6953,11 +7236,20 @@ class EmbeddingGenerationService extends Service2 {
6953
7236
  }
6954
7237
  const { memory, priority = "normal", retryCount = 0, maxRetries = 3, runId } = payload;
6955
7238
  if (memory.embedding) {
6956
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, memoryId: memory.id }, "Memory already has embeddings, skipping");
7239
+ this.runtime.logger.debug({
7240
+ src: "plugin:bootstrap:service:embedding",
7241
+ agentId: this.runtime.agentId,
7242
+ memoryId: memory.id
7243
+ }, "Memory already has embeddings, skipping");
6957
7244
  return;
6958
7245
  }
6959
7246
  if (this.queue.length >= this.maxQueueSize) {
6960
- this.runtime.logger.warn({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, queueSize: this.queue.length, maxSize: this.maxQueueSize }, "Queue is full, making room");
7247
+ this.runtime.logger.warn({
7248
+ src: "plugin:bootstrap:service:embedding",
7249
+ agentId: this.runtime.agentId,
7250
+ queueSize: this.queue.length,
7251
+ maxSize: this.maxQueueSize
7252
+ }, "Queue is full, making room");
6961
7253
  this.makeRoomInQueue();
6962
7254
  }
6963
7255
  const queueItem = {
@@ -6969,7 +7261,11 @@ class EmbeddingGenerationService extends Service2 {
6969
7261
  runId
6970
7262
  };
6971
7263
  this.insertItemByPriority(queueItem);
6972
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, queueSize: this.queue.length }, "Added memory to queue");
7264
+ this.runtime.logger.debug({
7265
+ src: "plugin:bootstrap:service:embedding",
7266
+ agentId: this.runtime.agentId,
7267
+ queueSize: this.queue.length
7268
+ }, "Added memory to queue");
6973
7269
  }
6974
7270
  makeRoomInQueue() {
6975
7271
  const tenPercent = Math.floor(this.maxQueueSize * 0.1);
@@ -6986,7 +7282,12 @@ class EmbeddingGenerationService extends Service2 {
6986
7282
  const newQueue = this.queue.filter((_, index) => !indicesToRemove.has(index));
6987
7283
  const removedCount = this.queue.length - newQueue.length;
6988
7284
  this.queue = newQueue;
6989
- this.runtime.logger.info({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, removedCount, newSize: this.queue.length }, "Removed items from queue");
7285
+ this.runtime.logger.info({
7286
+ src: "plugin:bootstrap:service:embedding",
7287
+ agentId: this.runtime.agentId,
7288
+ removedCount,
7289
+ newSize: this.queue.length
7290
+ }, "Removed items from queue");
6990
7291
  }
6991
7292
  insertItemByPriority(queueItem) {
6992
7293
  if (queueItem.priority === "high") {
@@ -7040,16 +7341,31 @@ class EmbeddingGenerationService extends Service2 {
7040
7341
  this.isProcessing = true;
7041
7342
  try {
7042
7343
  const batch = this.queue.splice(0, Math.min(this.batchSize, this.queue.length));
7043
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, batchSize: batch.length, remaining: this.queue.length }, "Processing batch");
7344
+ this.runtime.logger.debug({
7345
+ src: "plugin:bootstrap:service:embedding",
7346
+ agentId: this.runtime.agentId,
7347
+ batchSize: batch.length,
7348
+ remaining: this.queue.length
7349
+ }, "Processing batch");
7044
7350
  const promises = batch.map(async (item) => {
7045
7351
  try {
7046
7352
  await this.generateEmbedding(item);
7047
7353
  } catch (error) {
7048
- this.runtime.logger.error({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, memoryId: item.memory.id, error: error instanceof Error ? error.message : String(error) }, "Error processing item");
7354
+ this.runtime.logger.error({
7355
+ src: "plugin:bootstrap:service:embedding",
7356
+ agentId: this.runtime.agentId,
7357
+ memoryId: item.memory.id,
7358
+ error: error instanceof Error ? error.message : String(error)
7359
+ }, "Error processing item");
7049
7360
  if (item.retryCount < item.maxRetries) {
7050
7361
  item.retryCount++;
7051
7362
  this.insertItemByPriority(item);
7052
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, retryCount: item.retryCount, maxRetries: item.maxRetries }, "Re-queued item for retry");
7363
+ this.runtime.logger.debug({
7364
+ src: "plugin:bootstrap:service:embedding",
7365
+ agentId: this.runtime.agentId,
7366
+ retryCount: item.retryCount,
7367
+ maxRetries: item.maxRetries
7368
+ }, "Re-queued item for retry");
7053
7369
  } else {
7054
7370
  await this.runtime.log({
7055
7371
  entityId: this.runtime.agentId,
@@ -7080,7 +7396,11 @@ class EmbeddingGenerationService extends Service2 {
7080
7396
  async generateEmbedding(item) {
7081
7397
  const { memory } = item;
7082
7398
  if (!memory.content?.text) {
7083
- this.runtime.logger.warn({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, memoryId: memory.id }, "Memory has no text content");
7399
+ this.runtime.logger.warn({
7400
+ src: "plugin:bootstrap:service:embedding",
7401
+ agentId: this.runtime.agentId,
7402
+ memoryId: memory.id
7403
+ }, "Memory has no text content");
7084
7404
  return;
7085
7405
  }
7086
7406
  try {
@@ -7089,7 +7409,12 @@ class EmbeddingGenerationService extends Service2 {
7089
7409
  text: memory.content.text
7090
7410
  });
7091
7411
  const duration = Date.now() - startTime;
7092
- this.runtime.logger.debug({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, memoryId: memory.id, durationMs: duration }, "Generated embedding");
7412
+ this.runtime.logger.debug({
7413
+ src: "plugin:bootstrap:service:embedding",
7414
+ agentId: this.runtime.agentId,
7415
+ memoryId: memory.id,
7416
+ durationMs: duration
7417
+ }, "Generated embedding");
7093
7418
  if (memory.id) {
7094
7419
  await this.runtime.updateMemory({
7095
7420
  id: memory.id,
@@ -7114,7 +7439,12 @@ class EmbeddingGenerationService extends Service2 {
7114
7439
  });
7115
7440
  }
7116
7441
  } catch (error) {
7117
- this.runtime.logger.error({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, memoryId: memory.id, error: error instanceof Error ? error.message : String(error) }, "Failed to generate embedding");
7442
+ this.runtime.logger.error({
7443
+ src: "plugin:bootstrap:service:embedding",
7444
+ agentId: this.runtime.agentId,
7445
+ memoryId: memory.id,
7446
+ error: error instanceof Error ? error.message : String(error)
7447
+ }, "Failed to generate embedding");
7118
7448
  throw error;
7119
7449
  }
7120
7450
  }
@@ -7130,16 +7460,28 @@ class EmbeddingGenerationService extends Service2 {
7130
7460
  }
7131
7461
  const highPriorityItems = this.queue.filter((item) => item.priority === "high");
7132
7462
  if (highPriorityItems.length > 0) {
7133
- this.runtime.logger.info({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, count: highPriorityItems.length }, "Processing high priority items before shutdown");
7463
+ this.runtime.logger.info({
7464
+ src: "plugin:bootstrap:service:embedding",
7465
+ agentId: this.runtime.agentId,
7466
+ count: highPriorityItems.length
7467
+ }, "Processing high priority items before shutdown");
7134
7468
  for (const item of highPriorityItems) {
7135
7469
  try {
7136
7470
  await this.generateEmbedding(item);
7137
7471
  } catch (error) {
7138
- this.runtime.logger.error({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error during shutdown processing");
7472
+ this.runtime.logger.error({
7473
+ src: "plugin:bootstrap:service:embedding",
7474
+ agentId: this.runtime.agentId,
7475
+ error: error instanceof Error ? error.message : String(error)
7476
+ }, "Error during shutdown processing");
7139
7477
  }
7140
7478
  }
7141
7479
  }
7142
- this.runtime.logger.info({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, remainingItems: this.queue.length }, "Stopped");
7480
+ this.runtime.logger.info({
7481
+ src: "plugin:bootstrap:service:embedding",
7482
+ agentId: this.runtime.agentId,
7483
+ remainingItems: this.queue.length
7484
+ }, "Stopped");
7143
7485
  }
7144
7486
  getQueueSize() {
7145
7487
  return this.queue.length;
@@ -7159,7 +7501,11 @@ class EmbeddingGenerationService extends Service2 {
7159
7501
  clearQueue() {
7160
7502
  const size = this.queue.length;
7161
7503
  this.queue = [];
7162
- this.runtime.logger.info({ src: "plugin:bootstrap:service:embedding", agentId: this.runtime.agentId, clearedCount: size }, "Cleared queue");
7504
+ this.runtime.logger.info({
7505
+ src: "plugin:bootstrap:service:embedding",
7506
+ agentId: this.runtime.agentId,
7507
+ clearedCount: size
7508
+ }, "Cleared queue");
7163
7509
  }
7164
7510
  }
7165
7511
 
@@ -7212,7 +7558,11 @@ async function processAttachments(attachments, runtime) {
7212
7558
  processedAttachment.description = parsedXml.description || "";
7213
7559
  processedAttachment.title = parsedXml.title || "Image";
7214
7560
  processedAttachment.text = parsedXml.text || parsedXml.description || "";
7215
- runtime.logger.debug({ src: "plugin:bootstrap", agentId: runtime.agentId, descriptionPreview: processedAttachment.description?.substring(0, 100) }, "Generated description");
7561
+ runtime.logger.debug({
7562
+ src: "plugin:bootstrap",
7563
+ agentId: runtime.agentId,
7564
+ descriptionPreview: processedAttachment.description?.substring(0, 100)
7565
+ }, "Generated description");
7216
7566
  } else {
7217
7567
  const responseStr = response;
7218
7568
  const titleMatch = responseStr.match(/<title>([^<]+)<\/title>/);
@@ -7222,7 +7572,11 @@ async function processAttachments(attachments, runtime) {
7222
7572
  processedAttachment.title = titleMatch?.[1] || "Image";
7223
7573
  processedAttachment.description = descMatch?.[1] || "";
7224
7574
  processedAttachment.text = textMatch?.[1] || descMatch?.[1] || "";
7225
- runtime.logger.debug({ src: "plugin:bootstrap", agentId: runtime.agentId, descriptionPreview: processedAttachment.description?.substring(0, 100) }, "Used fallback XML parsing");
7575
+ runtime.logger.debug({
7576
+ src: "plugin:bootstrap",
7577
+ agentId: runtime.agentId,
7578
+ descriptionPreview: processedAttachment.description?.substring(0, 100)
7579
+ }, "Used fallback XML parsing");
7226
7580
  } else {
7227
7581
  runtime.logger.warn({ src: "plugin:bootstrap", agentId: runtime.agentId }, "Failed to parse XML response for image description");
7228
7582
  }
@@ -7231,12 +7585,20 @@ async function processAttachments(attachments, runtime) {
7231
7585
  processedAttachment.description = response.description;
7232
7586
  processedAttachment.title = response.title || "Image";
7233
7587
  processedAttachment.text = response.description;
7234
- runtime.logger.debug({ src: "plugin:bootstrap", agentId: runtime.agentId, descriptionPreview: processedAttachment.description?.substring(0, 100) }, "Generated description");
7588
+ runtime.logger.debug({
7589
+ src: "plugin:bootstrap",
7590
+ agentId: runtime.agentId,
7591
+ descriptionPreview: processedAttachment.description?.substring(0, 100)
7592
+ }, "Generated description");
7235
7593
  } else {
7236
7594
  runtime.logger.warn({ src: "plugin:bootstrap", agentId: runtime.agentId }, "Unexpected response format for image description");
7237
7595
  }
7238
7596
  } catch (error) {
7239
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error generating image description");
7597
+ runtime.logger.error({
7598
+ src: "plugin:bootstrap",
7599
+ agentId: runtime.agentId,
7600
+ error: error instanceof Error ? error.message : String(error)
7601
+ }, "Error generating image description");
7240
7602
  }
7241
7603
  } else if (attachment.contentType === ContentType2.DOCUMENT && !attachment.text) {
7242
7604
  const res = await fetch(url);
@@ -7249,14 +7611,23 @@ async function processAttachments(attachments, runtime) {
7249
7611
  const textContent = await res.text();
7250
7612
  processedAttachment.text = textContent;
7251
7613
  processedAttachment.title = processedAttachment.title || "Text File";
7252
- runtime.logger.debug({ src: "plugin:bootstrap", agentId: runtime.agentId, textPreview: processedAttachment.text?.substring(0, 100) }, "Extracted text content");
7614
+ runtime.logger.debug({
7615
+ src: "plugin:bootstrap",
7616
+ agentId: runtime.agentId,
7617
+ textPreview: processedAttachment.text?.substring(0, 100)
7618
+ }, "Extracted text content");
7253
7619
  } else {
7254
7620
  runtime.logger.warn({ src: "plugin:bootstrap", agentId: runtime.agentId, contentType }, "Skipping non-plain-text document");
7255
7621
  }
7256
7622
  }
7257
7623
  processedAttachments.push(processedAttachment);
7258
7624
  } catch (error) {
7259
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, attachmentUrl: attachment.url, error: error instanceof Error ? error.message : String(error) }, "Failed to process attachment");
7625
+ runtime.logger.error({
7626
+ src: "plugin:bootstrap",
7627
+ agentId: runtime.agentId,
7628
+ attachmentUrl: attachment.url,
7629
+ error: error instanceof Error ? error.message : String(error)
7630
+ }, "Failed to process attachment");
7260
7631
  processedAttachments.push(attachment);
7261
7632
  }
7262
7633
  }
@@ -7313,7 +7684,11 @@ var reactionReceivedHandler = async ({
7313
7684
  runtime.logger.warn({ src: "plugin:bootstrap", agentId: runtime.agentId }, "Duplicate reaction memory, skipping");
7314
7685
  return;
7315
7686
  }
7316
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error in reaction handler");
7687
+ runtime.logger.error({
7688
+ src: "plugin:bootstrap",
7689
+ agentId: runtime.agentId,
7690
+ error: error instanceof Error ? error.message : String(error)
7691
+ }, "Error in reaction handler");
7317
7692
  }
7318
7693
  };
7319
7694
  var postGeneratedHandler = async ({
@@ -7469,7 +7844,12 @@ $2`);
7469
7844
  var syncSingleUser = async (entityId, runtime, messageServerId, channelId, type, source) => {
7470
7845
  try {
7471
7846
  const entity = await runtime.getEntityById(entityId);
7472
- runtime.logger.info({ src: "plugin:bootstrap", agentId: runtime.agentId, entityId, username: entity?.metadata?.username }, "Syncing user");
7847
+ runtime.logger.info({
7848
+ src: "plugin:bootstrap",
7849
+ agentId: runtime.agentId,
7850
+ entityId,
7851
+ username: entity?.metadata?.username
7852
+ }, "Syncing user");
7473
7853
  if (!channelId) {
7474
7854
  runtime.logger.warn({ src: "plugin:bootstrap", agentId: runtime.agentId, entityId: entity?.id }, "Cannot sync user without a valid channelId");
7475
7855
  return;
@@ -7485,7 +7865,13 @@ var syncSingleUser = async (entityId, runtime, messageServerId, channelId, type,
7485
7865
  },
7486
7866
  settings: {}
7487
7867
  } : undefined;
7488
- runtime.logger.info({ src: "plugin:bootstrap", agentId: runtime.agentId, type, isDM: type === ChannelType9.DM, worldMetadata }, "syncSingleUser");
7868
+ runtime.logger.info({
7869
+ src: "plugin:bootstrap",
7870
+ agentId: runtime.agentId,
7871
+ type,
7872
+ isDM: type === ChannelType9.DM,
7873
+ worldMetadata
7874
+ }, "syncSingleUser");
7489
7875
  await runtime.ensureConnection({
7490
7876
  entityId,
7491
7877
  roomId,
@@ -7499,13 +7885,31 @@ var syncSingleUser = async (entityId, runtime, messageServerId, channelId, type,
7499
7885
  });
7500
7886
  try {
7501
7887
  const createdWorld = await runtime.getWorld(worldId);
7502
- runtime.logger.info({ src: "plugin:bootstrap", agentId: runtime.agentId, worldId, metadata: createdWorld?.metadata }, "Created world check");
7888
+ runtime.logger.info({
7889
+ src: "plugin:bootstrap",
7890
+ agentId: runtime.agentId,
7891
+ worldId,
7892
+ metadata: createdWorld?.metadata
7893
+ }, "Created world check");
7503
7894
  } catch (error) {
7504
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to verify created world");
7895
+ runtime.logger.error({
7896
+ src: "plugin:bootstrap",
7897
+ agentId: runtime.agentId,
7898
+ error: error instanceof Error ? error.message : String(error)
7899
+ }, "Failed to verify created world");
7505
7900
  }
7506
- runtime.logger.success({ src: "plugin:bootstrap", agentId: runtime.agentId, agentName: runtime.character.name, entityId: entity?.id }, "Successfully synced user");
7901
+ runtime.logger.success({
7902
+ src: "plugin:bootstrap",
7903
+ agentId: runtime.agentId,
7904
+ agentName: runtime.character.name,
7905
+ entityId: entity?.id
7906
+ }, "Successfully synced user");
7507
7907
  } catch (error) {
7508
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error syncing user");
7908
+ runtime.logger.error({
7909
+ src: "plugin:bootstrap",
7910
+ agentId: runtime.agentId,
7911
+ error: error instanceof Error ? error.message : String(error)
7912
+ }, "Error syncing user");
7509
7913
  }
7510
7914
  };
7511
7915
  var handleServerSync = async ({
@@ -7522,7 +7926,11 @@ var handleServerSync = async ({
7522
7926
  runtime.logger.debug({ src: "plugin:bootstrap", agentId: runtime.agentId, worldName: world.name }, "Successfully synced standardized world structure");
7523
7927
  onComplete?.();
7524
7928
  } catch (error) {
7525
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error processing standardized server data");
7929
+ runtime.logger.error({
7930
+ src: "plugin:bootstrap",
7931
+ agentId: runtime.agentId,
7932
+ error: error instanceof Error ? error.message : String(error)
7933
+ }, "Error processing standardized server data");
7526
7934
  }
7527
7935
  };
7528
7936
  var controlMessageHandler = async ({
@@ -7530,7 +7938,12 @@ var controlMessageHandler = async ({
7530
7938
  message
7531
7939
  }) => {
7532
7940
  try {
7533
- runtime.logger.debug({ src: "plugin:bootstrap", agentId: runtime.agentId, action: message.payload.action, roomId: message.roomId }, "Processing control message");
7941
+ runtime.logger.debug({
7942
+ src: "plugin:bootstrap",
7943
+ agentId: runtime.agentId,
7944
+ action: message.payload.action,
7945
+ roomId: message.roomId
7946
+ }, "Processing control message");
7534
7947
  const serviceNames = Array.from(runtime.getAllServices().keys());
7535
7948
  const websocketServiceName = serviceNames.find((name) => name.toLowerCase().includes("websocket") || name.toLowerCase().includes("socket"));
7536
7949
  if (websocketServiceName) {
@@ -7552,7 +7965,11 @@ var controlMessageHandler = async ({
7552
7965
  runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId }, "No WebSocket service found to send control message");
7553
7966
  }
7554
7967
  } catch (error) {
7555
- runtime.logger.error({ src: "plugin:bootstrap", agentId: runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error processing control message");
7968
+ runtime.logger.error({
7969
+ src: "plugin:bootstrap",
7970
+ agentId: runtime.agentId,
7971
+ error: error instanceof Error ? error.message : String(error)
7972
+ }, "Error processing control message");
7556
7973
  }
7557
7974
  };
7558
7975
  var events = {
@@ -7568,7 +7985,11 @@ var events = {
7568
7985
  ],
7569
7986
  [EventType2.MESSAGE_SENT]: [
7570
7987
  async (payload) => {
7571
- payload.runtime.logger.debug({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, text: payload.message.content.text }, "Message sent");
7988
+ payload.runtime.logger.debug({
7989
+ src: "plugin:bootstrap",
7990
+ agentId: payload.runtime.agentId,
7991
+ text: payload.message.content.text
7992
+ }, "Message sent");
7572
7993
  }
7573
7994
  ],
7574
7995
  [EventType2.WORLD_JOINED]: [
@@ -7611,9 +8032,18 @@ var events = {
7611
8032
  };
7612
8033
  await payload.runtime.updateEntity(entity);
7613
8034
  }
7614
- payload.runtime.logger.info({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, entityId: payload.entityId, worldId: payload.worldId }, "User left world");
8035
+ payload.runtime.logger.info({
8036
+ src: "plugin:bootstrap",
8037
+ agentId: payload.runtime.agentId,
8038
+ entityId: payload.entityId,
8039
+ worldId: payload.worldId
8040
+ }, "User left world");
7615
8041
  } catch (error) {
7616
- payload.runtime.logger.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error handling user left");
8042
+ payload.runtime.logger.error({
8043
+ src: "plugin:bootstrap",
8044
+ agentId: payload.runtime.agentId,
8045
+ error: error instanceof Error ? error.message : String(error)
8046
+ }, "Error handling user left");
7617
8047
  }
7618
8048
  }
7619
8049
  ],
@@ -7627,7 +8057,11 @@ var events = {
7627
8057
  }
7628
8058
  }
7629
8059
  } catch (error) {
7630
- logger16.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error sending refetch request");
8060
+ logger16.error({
8061
+ src: "plugin:bootstrap",
8062
+ agentId: payload.runtime.agentId,
8063
+ error: error instanceof Error ? error.message : String(error)
8064
+ }, "Error sending refetch request");
7631
8065
  }
7632
8066
  },
7633
8067
  async (payload) => {
@@ -7647,9 +8081,17 @@ var events = {
7647
8081
  source: "actionHandler"
7648
8082
  }
7649
8083
  });
7650
- logger16.debug({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, actionName: payload.content?.actions?.[0] }, "Logged ACTION_STARTED event");
8084
+ logger16.debug({
8085
+ src: "plugin:bootstrap",
8086
+ agentId: payload.runtime.agentId,
8087
+ actionName: payload.content?.actions?.[0]
8088
+ }, "Logged ACTION_STARTED event");
7651
8089
  } catch (error) {
7652
- logger16.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to log ACTION_STARTED event");
8090
+ logger16.error({
8091
+ src: "plugin:bootstrap",
8092
+ agentId: payload.runtime.agentId,
8093
+ error: error instanceof Error ? error.message : String(error)
8094
+ }, "Failed to log ACTION_STARTED event");
7653
8095
  }
7654
8096
  }
7655
8097
  ],
@@ -7663,19 +8105,35 @@ var events = {
7663
8105
  }
7664
8106
  }
7665
8107
  } catch (error) {
7666
- logger16.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Error sending refetch request");
8108
+ logger16.error({
8109
+ src: "plugin:bootstrap",
8110
+ agentId: payload.runtime.agentId,
8111
+ error: error instanceof Error ? error.message : String(error)
8112
+ }, "Error sending refetch request");
7667
8113
  }
7668
8114
  }
7669
8115
  ],
7670
8116
  [EventType2.EVALUATOR_STARTED]: [
7671
8117
  async (payload) => {
7672
- logger16.debug({ src: "plugin:bootstrap:evaluator", agentId: payload.runtime.agentId, evaluatorName: payload.evaluatorName, evaluatorId: payload.evaluatorId }, "Evaluator started");
8118
+ logger16.debug({
8119
+ src: "plugin:bootstrap:evaluator",
8120
+ agentId: payload.runtime.agentId,
8121
+ evaluatorName: payload.evaluatorName,
8122
+ evaluatorId: payload.evaluatorId
8123
+ }, "Evaluator started");
7673
8124
  }
7674
8125
  ],
7675
8126
  [EventType2.EVALUATOR_COMPLETED]: [
7676
8127
  async (payload) => {
7677
8128
  const status = payload.error ? "failed" : "completed";
7678
- logger16.debug({ src: "plugin:bootstrap:evaluator", agentId: payload.runtime.agentId, status, evaluatorName: payload.evaluatorName, evaluatorId: payload.evaluatorId, error: payload.error?.message }, "Evaluator completed");
8129
+ logger16.debug({
8130
+ src: "plugin:bootstrap:evaluator",
8131
+ agentId: payload.runtime.agentId,
8132
+ status,
8133
+ evaluatorName: payload.evaluatorName,
8134
+ evaluatorId: payload.evaluatorId,
8135
+ error: payload.error?.message
8136
+ }, "Evaluator completed");
7679
8137
  }
7680
8138
  ],
7681
8139
  [EventType2.RUN_STARTED]: [
@@ -7697,7 +8155,11 @@ var events = {
7697
8155
  });
7698
8156
  logger16.debug({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, runId: payload.runId }, "Logged RUN_STARTED event");
7699
8157
  } catch (error) {
7700
- logger16.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to log RUN_STARTED event");
8158
+ logger16.error({
8159
+ src: "plugin:bootstrap",
8160
+ agentId: payload.runtime.agentId,
8161
+ error: error instanceof Error ? error.message : String(error)
8162
+ }, "Failed to log RUN_STARTED event");
7701
8163
  }
7702
8164
  }
7703
8165
  ],
@@ -7721,9 +8183,18 @@ var events = {
7721
8183
  source: payload.source || "unknown"
7722
8184
  }
7723
8185
  });
7724
- logger16.debug({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, runId: payload.runId, status: payload.status }, "Logged RUN_ENDED event");
8186
+ logger16.debug({
8187
+ src: "plugin:bootstrap",
8188
+ agentId: payload.runtime.agentId,
8189
+ runId: payload.runId,
8190
+ status: payload.status
8191
+ }, "Logged RUN_ENDED event");
7725
8192
  } catch (error) {
7726
- logger16.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to log RUN_ENDED event");
8193
+ logger16.error({
8194
+ src: "plugin:bootstrap",
8195
+ agentId: payload.runtime.agentId,
8196
+ error: error instanceof Error ? error.message : String(error)
8197
+ }, "Failed to log RUN_ENDED event");
7727
8198
  }
7728
8199
  }
7729
8200
  ],
@@ -7749,7 +8220,11 @@ var events = {
7749
8220
  });
7750
8221
  logger16.debug({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, runId: payload.runId }, "Logged RUN_TIMEOUT event");
7751
8222
  } catch (error) {
7752
- logger16.error({ src: "plugin:bootstrap", agentId: payload.runtime.agentId, error: error instanceof Error ? error.message : String(error) }, "Failed to log RUN_TIMEOUT event");
8223
+ logger16.error({
8224
+ src: "plugin:bootstrap",
8225
+ agentId: payload.runtime.agentId,
8226
+ error: error instanceof Error ? error.message : String(error)
8227
+ }, "Failed to log RUN_TIMEOUT event");
7753
8228
  }
7754
8229
  }
7755
8230
  ],
@@ -7835,5 +8310,5 @@ export {
7835
8310
  actionStateProvider
7836
8311
  };
7837
8312
 
7838
- //# debugId=B5755FAB85A9201A64756E2164756E21
8313
+ //# debugId=F550F36B3F910A4364756E2164756E21
7839
8314
  //# sourceMappingURL=index.js.map