@elizaos/plugin-bootstrap 1.6.2-alpha.20 → 1.6.2-alpha.21
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/dist/index.js +21 -6
- package/dist/index.js.map +3 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -7273,7 +7273,11 @@ function shouldRespond(runtime, message, room, mentionContext) {
|
|
|
7273
7273
|
return { shouldRespond: true, skipEvaluation: true, reason: `private channel: ${roomType}` };
|
|
7274
7274
|
}
|
|
7275
7275
|
if (respondSources.some((pattern) => sourceStr.includes(pattern))) {
|
|
7276
|
-
return {
|
|
7276
|
+
return {
|
|
7277
|
+
shouldRespond: true,
|
|
7278
|
+
skipEvaluation: true,
|
|
7279
|
+
reason: `whitelisted source: ${sourceStr}`
|
|
7280
|
+
};
|
|
7277
7281
|
}
|
|
7278
7282
|
const hasPlatformMention = !!(mentionContext?.isMention || mentionContext?.isReply);
|
|
7279
7283
|
if (hasPlatformMention) {
|
|
@@ -7524,7 +7528,7 @@ ${response}`);
|
|
|
7524
7528
|
if (agentResponses.size === 0) {
|
|
7525
7529
|
latestResponseIds.delete(runtime.agentId);
|
|
7526
7530
|
}
|
|
7527
|
-
|
|
7531
|
+
runtime.evaluate(message, state, shouldRespondToMessage, async (content) => {
|
|
7528
7532
|
runtime.logger.debug({ content }, "evaluate callback");
|
|
7529
7533
|
if (responseContent) {
|
|
7530
7534
|
responseContent.evalCallbacks = content;
|
|
@@ -7533,7 +7537,9 @@ ${response}`);
|
|
|
7533
7537
|
return callback(content);
|
|
7534
7538
|
}
|
|
7535
7539
|
return [];
|
|
7536
|
-
}, responseMessages)
|
|
7540
|
+
}, responseMessages).catch((error) => {
|
|
7541
|
+
runtime.logger.error({ error, messageId: message.id, roomId: message.roomId }, "[Bootstrap] Error in background evaluator execution");
|
|
7542
|
+
});
|
|
7537
7543
|
let entityName = "noname";
|
|
7538
7544
|
if (message.metadata && "entityName" in message.metadata) {
|
|
7539
7545
|
entityName = message.metadata.entityName;
|
|
@@ -7613,7 +7619,11 @@ ${response}`);
|
|
|
7613
7619
|
onComplete?.();
|
|
7614
7620
|
}
|
|
7615
7621
|
};
|
|
7616
|
-
async function runSingleShotCore({
|
|
7622
|
+
async function runSingleShotCore({
|
|
7623
|
+
runtime,
|
|
7624
|
+
message,
|
|
7625
|
+
state
|
|
7626
|
+
}) {
|
|
7617
7627
|
state = await runtime.composeState(message, ["ACTIONS"]);
|
|
7618
7628
|
if (!state.values?.actionNames) {
|
|
7619
7629
|
runtime.logger.warn("actionNames data missing from state, even though it was requested");
|
|
@@ -7681,7 +7691,12 @@ async function runSingleShotCore({ runtime, message, state }) {
|
|
|
7681
7691
|
mode: isSimple && responseContent.text ? "simple" : "actions"
|
|
7682
7692
|
};
|
|
7683
7693
|
}
|
|
7684
|
-
async function runMultiStepCore({
|
|
7694
|
+
async function runMultiStepCore({
|
|
7695
|
+
runtime,
|
|
7696
|
+
message,
|
|
7697
|
+
state,
|
|
7698
|
+
callback
|
|
7699
|
+
}) {
|
|
7685
7700
|
const traceActionResult = [];
|
|
7686
7701
|
let accumulatedState = state;
|
|
7687
7702
|
const maxIterations = parseInt(runtime.getSetting("MAX_MULTISTEP_ITERATIONS") || "6");
|
|
@@ -8443,5 +8458,5 @@ export {
|
|
|
8443
8458
|
actionStateProvider
|
|
8444
8459
|
};
|
|
8445
8460
|
|
|
8446
|
-
//# debugId=
|
|
8461
|
+
//# debugId=0D5C974CD619FF2264756E2164756E21
|
|
8447
8462
|
//# sourceMappingURL=index.js.map
|