@elizaos/plugin-bootstrap 1.6.1-alpha.5 → 1.6.1-alpha.7
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 +89 -13
- package/dist/index.js.map +8 -7
- package/package.json +4 -4
- package/dist/actions/choice.d.ts +0 -14
- package/dist/actions/choice.d.ts.map +0 -1
- package/dist/actions/followRoom.d.ts +0 -25
- package/dist/actions/followRoom.d.ts.map +0 -1
- package/dist/actions/ignore.d.ts +0 -26
- package/dist/actions/ignore.d.ts.map +0 -1
- package/dist/actions/imageGeneration.d.ts +0 -8
- package/dist/actions/imageGeneration.d.ts.map +0 -1
- package/dist/actions/index.d.ts +0 -14
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/muteRoom.d.ts +0 -28
- package/dist/actions/muteRoom.d.ts.map +0 -1
- package/dist/actions/none.d.ts +0 -15
- package/dist/actions/none.d.ts.map +0 -1
- package/dist/actions/reply.d.ts +0 -16
- package/dist/actions/reply.d.ts.map +0 -1
- package/dist/actions/roles.d.ts +0 -13
- package/dist/actions/roles.d.ts.map +0 -1
- package/dist/actions/sendMessage.d.ts +0 -15
- package/dist/actions/sendMessage.d.ts.map +0 -1
- package/dist/actions/settings.d.ts +0 -21
- package/dist/actions/settings.d.ts.map +0 -1
- package/dist/actions/unfollowRoom.d.ts +0 -13
- package/dist/actions/unfollowRoom.d.ts.map +0 -1
- package/dist/actions/unmuteRoom.d.ts +0 -24
- package/dist/actions/unmuteRoom.d.ts.map +0 -1
- package/dist/actions/updateEntity.d.ts +0 -43
- package/dist/actions/updateEntity.d.ts.map +0 -1
- package/dist/evaluators/index.d.ts +0 -2
- package/dist/evaluators/index.d.ts.map +0 -1
- package/dist/evaluators/reflection.d.ts +0 -3
- package/dist/evaluators/reflection.d.ts.map +0 -1
- package/dist/index.d.ts +0 -46
- package/dist/index.d.ts.map +0 -1
- package/dist/providers/actionState.d.ts +0 -7
- package/dist/providers/actionState.d.ts.map +0 -1
- package/dist/providers/actions.d.ts +0 -35
- package/dist/providers/actions.d.ts.map +0 -1
- package/dist/providers/anxiety.d.ts +0 -16
- package/dist/providers/anxiety.d.ts.map +0 -1
- package/dist/providers/attachments.d.ts +0 -20
- package/dist/providers/attachments.d.ts.map +0 -1
- package/dist/providers/capabilities.d.ts +0 -14
- package/dist/providers/capabilities.d.ts.map +0 -1
- package/dist/providers/character.d.ts +0 -17
- package/dist/providers/character.d.ts.map +0 -1
- package/dist/providers/choice.d.ts +0 -11
- package/dist/providers/choice.d.ts.map +0 -1
- package/dist/providers/entities.d.ts +0 -7
- package/dist/providers/entities.d.ts.map +0 -1
- package/dist/providers/evaluators.d.ts +0 -27
- package/dist/providers/evaluators.d.ts.map +0 -1
- package/dist/providers/facts.d.ts +0 -11
- package/dist/providers/facts.d.ts.map +0 -1
- package/dist/providers/index.d.ts +0 -18
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/providers.d.ts +0 -18
- package/dist/providers/providers.d.ts.map +0 -1
- package/dist/providers/recentMessages.d.ts +0 -14
- package/dist/providers/recentMessages.d.ts.map +0 -1
- package/dist/providers/relationships.d.ts +0 -15
- package/dist/providers/relationships.d.ts.map +0 -1
- package/dist/providers/roles.d.ts +0 -19
- package/dist/providers/roles.d.ts.map +0 -1
- package/dist/providers/settings.d.ts +0 -7
- package/dist/providers/settings.d.ts.map +0 -1
- package/dist/providers/shouldRespond.d.ts +0 -7
- package/dist/providers/shouldRespond.d.ts.map +0 -1
- package/dist/providers/time.d.ts +0 -16
- package/dist/providers/time.d.ts.map +0 -1
- package/dist/providers/world.d.ts +0 -8
- package/dist/providers/world.d.ts.map +0 -1
- package/dist/services/embedding.d.ts +0 -43
- package/dist/services/embedding.d.ts.map +0 -1
- package/dist/services/index.d.ts +0 -2
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/task.d.ts +0 -77
- package/dist/services/task.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
multiStepSummaryTemplate
|
|
102
102
|
} from "@elizaos/core";
|
|
103
103
|
|
|
104
|
-
// ../../node_modules/uuid/dist/
|
|
104
|
+
// ../../node_modules/uuid/dist-node/stringify.js
|
|
105
105
|
var byteToHex = [];
|
|
106
106
|
for (let i = 0;i < 256; ++i) {
|
|
107
107
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
@@ -110,8 +110,8 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
110
110
|
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
// ../../node_modules/uuid/dist/
|
|
114
|
-
import { randomFillSync } from "crypto";
|
|
113
|
+
// ../../node_modules/uuid/dist-node/rng.js
|
|
114
|
+
import { randomFillSync } from "node:crypto";
|
|
115
115
|
var rnds8Pool = new Uint8Array(256);
|
|
116
116
|
var poolPtr = rnds8Pool.length;
|
|
117
117
|
function rng() {
|
|
@@ -122,15 +122,12 @@ function rng() {
|
|
|
122
122
|
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
// ../../node_modules/uuid/dist/
|
|
126
|
-
import { randomUUID } from "crypto";
|
|
125
|
+
// ../../node_modules/uuid/dist-node/native.js
|
|
126
|
+
import { randomUUID } from "node:crypto";
|
|
127
127
|
var native_default = { randomUUID };
|
|
128
128
|
|
|
129
|
-
// ../../node_modules/uuid/dist/
|
|
130
|
-
function
|
|
131
|
-
if (native_default.randomUUID && !buf && !options) {
|
|
132
|
-
return native_default.randomUUID();
|
|
133
|
-
}
|
|
129
|
+
// ../../node_modules/uuid/dist-node/v4.js
|
|
130
|
+
function _v4(options, buf, offset) {
|
|
134
131
|
options = options || {};
|
|
135
132
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
136
133
|
if (rnds.length < 16) {
|
|
@@ -150,6 +147,12 @@ function v4(options, buf, offset) {
|
|
|
150
147
|
}
|
|
151
148
|
return unsafeStringify(rnds);
|
|
152
149
|
}
|
|
150
|
+
function v4(options, buf, offset) {
|
|
151
|
+
if (native_default.randomUUID && !buf && !options) {
|
|
152
|
+
return native_default.randomUUID();
|
|
153
|
+
}
|
|
154
|
+
return _v4(options, buf, offset);
|
|
155
|
+
}
|
|
153
156
|
var v4_default = v4;
|
|
154
157
|
// src/actions/imageGeneration.ts
|
|
155
158
|
import {
|
|
@@ -6547,6 +6550,77 @@ var settingsProvider = {
|
|
|
6547
6550
|
}
|
|
6548
6551
|
}
|
|
6549
6552
|
};
|
|
6553
|
+
// src/providers/shouldRespond.ts
|
|
6554
|
+
var import_unique_names_generator2 = __toESM(require_dist(), 1);
|
|
6555
|
+
import { addHeader as addHeader10 } from "@elizaos/core";
|
|
6556
|
+
var nameConfig = {
|
|
6557
|
+
dictionaries: [import_unique_names_generator2.adjectives, import_unique_names_generator2.names],
|
|
6558
|
+
separator: "",
|
|
6559
|
+
length: 2,
|
|
6560
|
+
style: "capital"
|
|
6561
|
+
};
|
|
6562
|
+
var messageExamples = [
|
|
6563
|
+
`// {{name1}}: Hey {{agentName}}, can you help me with something
|
|
6564
|
+
// Response: RESPOND`,
|
|
6565
|
+
`// {{name1}}: Hey {{agentName}}, can I ask you a question
|
|
6566
|
+
// {{agentName}}: Sure, what is it
|
|
6567
|
+
// {{name1}}: can you help me create a basic react module that demonstrates a counter
|
|
6568
|
+
// Response: RESPOND`,
|
|
6569
|
+
`// {{name1}}: {{agentName}} can you tell me a story
|
|
6570
|
+
// {{name1}}: about a girl named {{characterName}}
|
|
6571
|
+
// {{agentName}}: Sure.
|
|
6572
|
+
// {{agentName}}: Once upon a time, in a quaint little village, there was a curious girl named {{characterName}}.
|
|
6573
|
+
// {{agentName}}: {{characterName}} was known for her adventurous spirit and her knack for finding beauty in the mundane.
|
|
6574
|
+
// {{name1}}: I'm loving it, keep going
|
|
6575
|
+
// Response: RESPOND`,
|
|
6576
|
+
`// {{name1}}: okay, i want to test something. can you say marco?
|
|
6577
|
+
// {{agentName}}: marco
|
|
6578
|
+
// {{name1}}: great. okay, now do it again
|
|
6579
|
+
// Response: RESPOND`,
|
|
6580
|
+
`// {{name1}}: what do you think about artificial intelligence?
|
|
6581
|
+
// Response: RESPOND`,
|
|
6582
|
+
`// {{name1}}: I just saw a really great movie
|
|
6583
|
+
// {{name2}}: Oh? Which movie?
|
|
6584
|
+
// Response: IGNORE`,
|
|
6585
|
+
`// {{name1}}: i need help
|
|
6586
|
+
// {{agentName}}: how can I help you?
|
|
6587
|
+
// {{name1}}: no. i need help from {{name2}}
|
|
6588
|
+
// Response: IGNORE`,
|
|
6589
|
+
`// {{name1}}: {{name2}} can you answer a question for me?
|
|
6590
|
+
// Response: IGNORE`,
|
|
6591
|
+
`// {{agentName}}: Oh, this is my favorite scene
|
|
6592
|
+
// {{name1}}: sick
|
|
6593
|
+
// {{name2}}: wait, why is it your favorite scene
|
|
6594
|
+
// Response: RESPOND`,
|
|
6595
|
+
`// {{name1}}: {{agentName}} stop responding plz
|
|
6596
|
+
// Response: STOP`,
|
|
6597
|
+
`// {{name1}}: stfu bot
|
|
6598
|
+
// Response: STOP`,
|
|
6599
|
+
`// {{name1}}: {{agentName}} stfu plz
|
|
6600
|
+
// Response: STOP`
|
|
6601
|
+
];
|
|
6602
|
+
var shouldRespondProvider = {
|
|
6603
|
+
name: "SHOULD_RESPOND",
|
|
6604
|
+
description: "Examples of when the agent should respond, ignore, or stop responding",
|
|
6605
|
+
position: -1,
|
|
6606
|
+
get: async (runtime, _message) => {
|
|
6607
|
+
const agentName = runtime.character.name;
|
|
6608
|
+
const name1 = import_unique_names_generator2.uniqueNamesGenerator(nameConfig);
|
|
6609
|
+
const name2 = import_unique_names_generator2.uniqueNamesGenerator(nameConfig);
|
|
6610
|
+
const characterName = import_unique_names_generator2.uniqueNamesGenerator(nameConfig);
|
|
6611
|
+
const shuffledExamples = [...messageExamples].sort(() => 0.5 - Math.random()).slice(0, 7);
|
|
6612
|
+
const formattedExamples = shuffledExamples.map((example) => {
|
|
6613
|
+
return example.replace(/{{name1}}/g, name1).replace(/{{name2}}/g, name2).replace(/{{agentName}}/g, agentName).replace(/{{characterName}}/g, characterName);
|
|
6614
|
+
});
|
|
6615
|
+
const examplesText = formattedExamples.join(`
|
|
6616
|
+
|
|
6617
|
+
`);
|
|
6618
|
+
const text = addHeader10("# RESPONSE EXAMPLES", examplesText);
|
|
6619
|
+
return {
|
|
6620
|
+
text
|
|
6621
|
+
};
|
|
6622
|
+
}
|
|
6623
|
+
};
|
|
6550
6624
|
// src/providers/time.ts
|
|
6551
6625
|
var timeProvider = {
|
|
6552
6626
|
name: "TIME",
|
|
@@ -6572,7 +6646,7 @@ var timeProvider = {
|
|
|
6572
6646
|
// src/providers/world.ts
|
|
6573
6647
|
import {
|
|
6574
6648
|
logger as logger19,
|
|
6575
|
-
addHeader as
|
|
6649
|
+
addHeader as addHeader11,
|
|
6576
6650
|
ChannelType as ChannelType8
|
|
6577
6651
|
} from "@elizaos/core";
|
|
6578
6652
|
var worldProvider = {
|
|
@@ -6703,7 +6777,7 @@ var worldProvider = {
|
|
|
6703
6777
|
currentChannelName: currentRoom.name,
|
|
6704
6778
|
worldInfo: worldInfoText
|
|
6705
6779
|
};
|
|
6706
|
-
const formattedText =
|
|
6780
|
+
const formattedText = addHeader11("# World Information", worldInfoText);
|
|
6707
6781
|
logger19.debug("[\uD83C\uDF10] World provider completed successfully");
|
|
6708
6782
|
return {
|
|
6709
6783
|
data,
|
|
@@ -8371,6 +8445,7 @@ var bootstrapPlugin = {
|
|
|
8371
8445
|
providers: [
|
|
8372
8446
|
evaluatorsProvider,
|
|
8373
8447
|
anxietyProvider,
|
|
8448
|
+
shouldRespondProvider,
|
|
8374
8449
|
timeProvider,
|
|
8375
8450
|
entitiesProvider,
|
|
8376
8451
|
relationshipsProvider,
|
|
@@ -8397,6 +8472,7 @@ export {
|
|
|
8397
8472
|
unmuteRoomAction,
|
|
8398
8473
|
unfollowRoomAction,
|
|
8399
8474
|
timeProvider,
|
|
8475
|
+
shouldRespondProvider,
|
|
8400
8476
|
shouldBypassShouldRespond,
|
|
8401
8477
|
settingsProvider,
|
|
8402
8478
|
sendMessageAction,
|
|
@@ -8428,5 +8504,5 @@ export {
|
|
|
8428
8504
|
actionStateProvider
|
|
8429
8505
|
};
|
|
8430
8506
|
|
|
8431
|
-
//# debugId=
|
|
8507
|
+
//# debugId=0D9B23DFC55FE40864756E2164756E21
|
|
8432
8508
|
//# sourceMappingURL=index.js.map
|