@elizaos/plugin-mysticism 2.0.0-alpha.3 → 2.0.0-alpha.4
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 +65 -447
- package/dist/index.js.map +13 -13
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -113,42 +113,21 @@ var init_astrology_reading = __esm(() => {
|
|
|
113
113
|
name: "ASTROLOGY_READING",
|
|
114
114
|
similes: ["BIRTH_CHART", "NATAL_CHART", "HOROSCOPE_READING", "ZODIAC_READING"],
|
|
115
115
|
description: "Perform an astrological natal chart reading, progressively revealing planetary placements.",
|
|
116
|
-
validate: async (runtime, message,
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
124
|
-
const __avExpectedSource = "";
|
|
125
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
126
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
127
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
128
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
116
|
+
validate: async (runtime, message, _state) => {
|
|
117
|
+
const text = (message.content.text ?? "").toLowerCase();
|
|
118
|
+
if (!ASTROLOGY_KEYWORDS.some((kw) => text.includes(kw)))
|
|
119
|
+
return false;
|
|
120
|
+
const service = runtime.getService("MYSTICISM");
|
|
121
|
+
if (!service) {
|
|
122
|
+
logger2.warn("ASTROLOGY_READING validation failed: MysticismService not found");
|
|
129
123
|
return false;
|
|
130
124
|
}
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return false;
|
|
135
|
-
const service = runtime2.getService("MYSTICISM");
|
|
136
|
-
if (!service) {
|
|
137
|
-
logger2.warn("ASTROLOGY_READING validation failed: MysticismService not found");
|
|
138
|
-
return false;
|
|
139
|
-
}
|
|
140
|
-
const existingSession = service.getSession(message2.entityId, message2.roomId);
|
|
141
|
-
if (existingSession) {
|
|
142
|
-
logger2.debug({ entityId: message2.entityId, roomId: message2.roomId, type: existingSession.type }, "ASTROLOGY_READING skipped: active session exists");
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
return true;
|
|
146
|
-
};
|
|
147
|
-
try {
|
|
148
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
149
|
-
} catch {
|
|
125
|
+
const existingSession = service.getSession(message.entityId, message.roomId);
|
|
126
|
+
if (existingSession) {
|
|
127
|
+
logger2.debug({ entityId: message.entityId, roomId: message.roomId, type: existingSession.type }, "ASTROLOGY_READING skipped: active session exists");
|
|
150
128
|
return false;
|
|
151
129
|
}
|
|
130
|
+
return true;
|
|
152
131
|
},
|
|
153
132
|
handler: async (runtime, message, _state, _options, callback) => {
|
|
154
133
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -248,33 +227,12 @@ var init_check_payment = __esm(() => {
|
|
|
248
227
|
name: "CHECK_PAYMENT",
|
|
249
228
|
similes: ["VERIFY_PAYMENT", "PAYMENT_STATUS"],
|
|
250
229
|
description: "Check if payment has been received for the current reading session.",
|
|
251
|
-
validate: async (runtime, message,
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
const __avKeywords = ["check", "payment"];
|
|
255
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((kw) => kw.length > 0 && __avText.includes(kw));
|
|
256
|
-
const __avRegex = /\b(?:check|payment)\b/i;
|
|
257
|
-
const __avRegexOk = __avRegex.test(__avText);
|
|
258
|
-
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
259
|
-
const __avExpectedSource = "";
|
|
260
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
261
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
262
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
263
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
const __avLegacyValidate = async (runtime2, message2, _state) => {
|
|
267
|
-
const service = runtime2.getService("MYSTICISM");
|
|
268
|
-
if (!service)
|
|
269
|
-
return false;
|
|
270
|
-
const session = service.getSession(message2.entityId, message2.roomId);
|
|
271
|
-
return session !== null && session.paymentStatus !== "none";
|
|
272
|
-
};
|
|
273
|
-
try {
|
|
274
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
275
|
-
} catch {
|
|
230
|
+
validate: async (runtime, message, _state) => {
|
|
231
|
+
const service = runtime.getService("MYSTICISM");
|
|
232
|
+
if (!service)
|
|
276
233
|
return false;
|
|
277
|
-
|
|
234
|
+
const session = service.getSession(message.entityId, message.roomId);
|
|
235
|
+
return session !== null && session.paymentStatus !== "none";
|
|
278
236
|
},
|
|
279
237
|
handler: async (runtime, message, _state, _options, _callback) => {
|
|
280
238
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -352,44 +310,23 @@ var init_iching_reading = __esm(() => {
|
|
|
352
310
|
name: "ICHING_READING",
|
|
353
311
|
similes: ["CAST_HEXAGRAM", "CONSULT_ICHING", "THROW_COINS", "ORACLE_READING"],
|
|
354
312
|
description: "Perform an I Ching divination reading by casting a hexagram and interpreting changing lines.",
|
|
355
|
-
validate: async (runtime, message,
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const __avExpectedSource = "";
|
|
364
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
365
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
366
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
367
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
313
|
+
validate: async (runtime, message, _state) => {
|
|
314
|
+
const text = (message.content.text ?? "").toLowerCase();
|
|
315
|
+
const hasIChingIntent = ICHING_KEYWORDS.some((kw) => text.includes(kw));
|
|
316
|
+
if (!hasIChingIntent)
|
|
317
|
+
return false;
|
|
318
|
+
const service = runtime.getService("MYSTICISM");
|
|
319
|
+
if (!service) {
|
|
320
|
+
logger3.warn("ICHING_READING validation failed: MysticismService not found");
|
|
368
321
|
return false;
|
|
369
322
|
}
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
return false;
|
|
375
|
-
const service = runtime2.getService("MYSTICISM");
|
|
376
|
-
if (!service) {
|
|
377
|
-
logger3.warn("ICHING_READING validation failed: MysticismService not found");
|
|
378
|
-
return false;
|
|
379
|
-
}
|
|
380
|
-
const entityId = message2.entityId;
|
|
381
|
-
const existingSession = service.getSession(entityId, message2.roomId);
|
|
382
|
-
if (existingSession) {
|
|
383
|
-
logger3.debug({ entityId, roomId: message2.roomId, type: existingSession.type }, "ICHING_READING skipped: active session exists");
|
|
384
|
-
return false;
|
|
385
|
-
}
|
|
386
|
-
return true;
|
|
387
|
-
};
|
|
388
|
-
try {
|
|
389
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
390
|
-
} catch {
|
|
323
|
+
const entityId = message.entityId;
|
|
324
|
+
const existingSession = service.getSession(entityId, message.roomId);
|
|
325
|
+
if (existingSession) {
|
|
326
|
+
logger3.debug({ entityId, roomId: message.roomId, type: existingSession.type }, "ICHING_READING skipped: active session exists");
|
|
391
327
|
return false;
|
|
392
328
|
}
|
|
329
|
+
return true;
|
|
393
330
|
},
|
|
394
331
|
handler: async (runtime, message, _state, _options, callback) => {
|
|
395
332
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -550,36 +487,15 @@ var init_reading_followup = __esm(() => {
|
|
|
550
487
|
name: "READING_FOLLOWUP",
|
|
551
488
|
similes: ["CONTINUE_READING", "NEXT_CARD", "READING_RESPONSE", "PROCEED_READING"],
|
|
552
489
|
description: "Continue an active reading by processing user feedback and revealing the next element.",
|
|
553
|
-
validate: async (runtime, message,
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
const __avKeywords = ["reading", "followup"];
|
|
557
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((kw) => kw.length > 0 && __avText.includes(kw));
|
|
558
|
-
const __avRegex = /\b(?:reading|followup)\b/i;
|
|
559
|
-
const __avRegexOk = __avRegex.test(__avText);
|
|
560
|
-
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
561
|
-
const __avExpectedSource = "";
|
|
562
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
563
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
564
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
565
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
490
|
+
validate: async (runtime, message, _state) => {
|
|
491
|
+
const service = runtime.getService("MYSTICISM");
|
|
492
|
+
if (!service)
|
|
566
493
|
return false;
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
if (!service)
|
|
571
|
-
return false;
|
|
572
|
-
const entityId = message2.entityId;
|
|
573
|
-
const session = service.getSession(entityId, message2.roomId);
|
|
574
|
-
if (!session)
|
|
575
|
-
return false;
|
|
576
|
-
return session.phase === "casting" || session.phase === "interpretation";
|
|
577
|
-
};
|
|
578
|
-
try {
|
|
579
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
580
|
-
} catch {
|
|
494
|
+
const entityId = message.entityId;
|
|
495
|
+
const session = service.getSession(entityId, message.roomId);
|
|
496
|
+
if (!session)
|
|
581
497
|
return false;
|
|
582
|
-
|
|
498
|
+
return session.phase === "casting" || session.phase === "interpretation";
|
|
583
499
|
},
|
|
584
500
|
handler: async (runtime, message, _state, _options, callback) => {
|
|
585
501
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -677,36 +593,15 @@ ${nextReveal.prompt}`
|
|
|
677
593
|
name: "DEEPEN_READING",
|
|
678
594
|
similes: ["EXPLAIN_MORE", "GO_DEEPER", "ELABORATE_READING", "READING_DETAIL"],
|
|
679
595
|
description: "Provide a deeper interpretation of a specific element in an active reading.",
|
|
680
|
-
validate: async (runtime, message,
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
const __avKeywords = ["deepen", "reading"];
|
|
684
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((kw) => kw.length > 0 && __avText.includes(kw));
|
|
685
|
-
const __avRegex = /\b(?:deepen|reading)\b/i;
|
|
686
|
-
const __avRegexOk = __avRegex.test(__avText);
|
|
687
|
-
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
688
|
-
const __avExpectedSource = "";
|
|
689
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
690
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
691
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
692
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
596
|
+
validate: async (runtime, message, _state) => {
|
|
597
|
+
const service = runtime.getService("MYSTICISM");
|
|
598
|
+
if (!service)
|
|
693
599
|
return false;
|
|
694
|
-
|
|
695
|
-
const
|
|
696
|
-
|
|
697
|
-
if (!service)
|
|
698
|
-
return false;
|
|
699
|
-
const entityId = message2.entityId;
|
|
700
|
-
const session = service.getSession(entityId, message2.roomId);
|
|
701
|
-
if (!session)
|
|
702
|
-
return false;
|
|
703
|
-
return session.phase === "interpretation" || session.phase === "casting";
|
|
704
|
-
};
|
|
705
|
-
try {
|
|
706
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
707
|
-
} catch {
|
|
600
|
+
const entityId = message.entityId;
|
|
601
|
+
const session = service.getSession(entityId, message.roomId);
|
|
602
|
+
if (!session)
|
|
708
603
|
return false;
|
|
709
|
-
|
|
604
|
+
return session.phase === "interpretation" || session.phase === "casting";
|
|
710
605
|
},
|
|
711
606
|
handler: async (runtime, message, _state, _options, callback) => {
|
|
712
607
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -815,33 +710,12 @@ var init_request_payment = __esm(() => {
|
|
|
815
710
|
name: "REQUEST_PAYMENT",
|
|
816
711
|
similes: ["CHARGE_USER", "ASK_FOR_PAYMENT", "SET_PRICE"],
|
|
817
712
|
description: "Request payment from the user for a reading service. Specify the amount to charge.",
|
|
818
|
-
validate: async (runtime, message,
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
const __avKeywords = ["request", "payment"];
|
|
822
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((kw) => kw.length > 0 && __avText.includes(kw));
|
|
823
|
-
const __avRegex = /\b(?:request|payment)\b/i;
|
|
824
|
-
const __avRegexOk = __avRegex.test(__avText);
|
|
825
|
-
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
826
|
-
const __avExpectedSource = "";
|
|
827
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
828
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
829
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
830
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
831
|
-
return false;
|
|
832
|
-
}
|
|
833
|
-
const __avLegacyValidate = async (runtime2, message2, _state) => {
|
|
834
|
-
const service = runtime2.getService("MYSTICISM");
|
|
835
|
-
if (!service)
|
|
836
|
-
return false;
|
|
837
|
-
const session = service.getSession(message2.entityId, message2.roomId);
|
|
838
|
-
return session !== null && session.paymentStatus === "none";
|
|
839
|
-
};
|
|
840
|
-
try {
|
|
841
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
842
|
-
} catch {
|
|
713
|
+
validate: async (runtime, message, _state) => {
|
|
714
|
+
const service = runtime.getService("MYSTICISM");
|
|
715
|
+
if (!service)
|
|
843
716
|
return false;
|
|
844
|
-
|
|
717
|
+
const session = service.getSession(message.entityId, message.roomId);
|
|
718
|
+
return session !== null && session.paymentStatus === "none";
|
|
845
719
|
},
|
|
846
720
|
handler: async (runtime, message, _state, _options, _callback) => {
|
|
847
721
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -940,44 +814,23 @@ var init_tarot_reading = __esm(() => {
|
|
|
940
814
|
name: "TAROT_READING",
|
|
941
815
|
similes: ["READ_TAROT", "DRAW_CARDS", "TAROT_SPREAD", "CARD_READING"],
|
|
942
816
|
description: "Perform a tarot card reading, drawing cards into a spread and revealing each one iteratively.",
|
|
943
|
-
validate: async (runtime, message,
|
|
944
|
-
const
|
|
945
|
-
const
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
const __avExpectedSource = "";
|
|
952
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
953
|
-
const __avOptions = options && typeof options === "object" ? options : {};
|
|
954
|
-
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
955
|
-
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
817
|
+
validate: async (runtime, message, _state) => {
|
|
818
|
+
const text = (message.content.text ?? "").toLowerCase();
|
|
819
|
+
const hasTarotIntent = TAROT_KEYWORDS.some((kw) => text.includes(kw));
|
|
820
|
+
if (!hasTarotIntent)
|
|
821
|
+
return false;
|
|
822
|
+
const service = runtime.getService("MYSTICISM");
|
|
823
|
+
if (!service) {
|
|
824
|
+
logger6.warn("TAROT_READING validation failed: MysticismService not found");
|
|
956
825
|
return false;
|
|
957
826
|
}
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
return false;
|
|
963
|
-
const service = runtime2.getService("MYSTICISM");
|
|
964
|
-
if (!service) {
|
|
965
|
-
logger6.warn("TAROT_READING validation failed: MysticismService not found");
|
|
966
|
-
return false;
|
|
967
|
-
}
|
|
968
|
-
const entityId = message2.entityId;
|
|
969
|
-
const existingSession = service.getSession(entityId, message2.roomId);
|
|
970
|
-
if (existingSession) {
|
|
971
|
-
logger6.debug({ entityId, roomId: message2.roomId, type: existingSession.type }, "TAROT_READING skipped: active session exists");
|
|
972
|
-
return false;
|
|
973
|
-
}
|
|
974
|
-
return true;
|
|
975
|
-
};
|
|
976
|
-
try {
|
|
977
|
-
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
978
|
-
} catch {
|
|
827
|
+
const entityId = message.entityId;
|
|
828
|
+
const existingSession = service.getSession(entityId, message.roomId);
|
|
829
|
+
if (existingSession) {
|
|
830
|
+
logger6.debug({ entityId, roomId: message.roomId, type: existingSession.type }, "TAROT_READING skipped: active session exists");
|
|
979
831
|
return false;
|
|
980
832
|
}
|
|
833
|
+
return true;
|
|
981
834
|
},
|
|
982
835
|
handler: async (runtime, message, _state, _options, callback) => {
|
|
983
836
|
const service = runtime.getService("MYSTICISM");
|
|
@@ -7538,7 +7391,6 @@ __export(exports_economic_context, {
|
|
|
7538
7391
|
economicContextProvider: () => economicContextProvider,
|
|
7539
7392
|
default: () => economic_context_default
|
|
7540
7393
|
});
|
|
7541
|
-
import { validateActionKeywords, validateActionRegex } from "@elizaos/core";
|
|
7542
7394
|
function buildEconomicText(session, userPayments, pricing) {
|
|
7543
7395
|
const parts = [];
|
|
7544
7396
|
parts.push("## Your Economic Context");
|
|
@@ -7590,46 +7442,7 @@ var init_economic_context = __esm(() => {
|
|
|
7590
7442
|
economicContextProvider = {
|
|
7591
7443
|
name: "ECONOMIC_CONTEXT",
|
|
7592
7444
|
description: "Provides economic facts: payment history, revenue, and current session payment status",
|
|
7593
|
-
dynamic: true,
|
|
7594
|
-
relevanceKeywords: [
|
|
7595
|
-
"economic",
|
|
7596
|
-
"context",
|
|
7597
|
-
"economiccontextprovider",
|
|
7598
|
-
"plugin",
|
|
7599
|
-
"mysticism",
|
|
7600
|
-
"status",
|
|
7601
|
-
"state",
|
|
7602
|
-
"info",
|
|
7603
|
-
"details",
|
|
7604
|
-
"chat",
|
|
7605
|
-
"conversation",
|
|
7606
|
-
"agent",
|
|
7607
|
-
"room",
|
|
7608
|
-
"channel"
|
|
7609
|
-
],
|
|
7610
7445
|
get: async (runtime, message, _state) => {
|
|
7611
|
-
const __providerKeywords = [
|
|
7612
|
-
"economic",
|
|
7613
|
-
"context",
|
|
7614
|
-
"economiccontextprovider",
|
|
7615
|
-
"plugin",
|
|
7616
|
-
"mysticism",
|
|
7617
|
-
"status",
|
|
7618
|
-
"state",
|
|
7619
|
-
"info",
|
|
7620
|
-
"details",
|
|
7621
|
-
"chat",
|
|
7622
|
-
"conversation",
|
|
7623
|
-
"agent",
|
|
7624
|
-
"room",
|
|
7625
|
-
"channel"
|
|
7626
|
-
];
|
|
7627
|
-
const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
|
|
7628
|
-
const __recentMessages = _state?.recentMessagesData || [];
|
|
7629
|
-
const __isRelevant = validateActionKeywords(message, __recentMessages, __providerKeywords) || validateActionRegex(message, __recentMessages, __providerRegex);
|
|
7630
|
-
if (!__isRelevant) {
|
|
7631
|
-
return { text: "" };
|
|
7632
|
-
}
|
|
7633
7446
|
const service = runtime.getService("MYSTICISM");
|
|
7634
7447
|
if (!service) {
|
|
7635
7448
|
return { text: "", values: {}, data: {} };
|
|
@@ -7662,7 +7475,7 @@ __export(exports_mystical_knowledge, {
|
|
|
7662
7475
|
mysticalKnowledgeProvider: () => mysticalKnowledgeProvider,
|
|
7663
7476
|
default: () => mystical_knowledge_default
|
|
7664
7477
|
});
|
|
7665
|
-
import { logger as logger7
|
|
7478
|
+
import { logger as logger7 } from "@elizaos/core";
|
|
7666
7479
|
function buildKnowledgeText(activeSession) {
|
|
7667
7480
|
const parts = [];
|
|
7668
7481
|
parts.push(CORE_GUIDELINES);
|
|
@@ -7776,46 +7589,7 @@ var init_mystical_knowledge = __esm(() => {
|
|
|
7776
7589
|
mysticalKnowledgeProvider = {
|
|
7777
7590
|
name: "MYSTICAL_KNOWLEDGE",
|
|
7778
7591
|
description: "Provides mystical domain knowledge to ground the agent's interpretations",
|
|
7779
|
-
dynamic: true,
|
|
7780
|
-
relevanceKeywords: [
|
|
7781
|
-
"mystical",
|
|
7782
|
-
"knowledge",
|
|
7783
|
-
"mysticalknowledgeprovider",
|
|
7784
|
-
"plugin",
|
|
7785
|
-
"mysticism",
|
|
7786
|
-
"status",
|
|
7787
|
-
"state",
|
|
7788
|
-
"context",
|
|
7789
|
-
"info",
|
|
7790
|
-
"details",
|
|
7791
|
-
"chat",
|
|
7792
|
-
"conversation",
|
|
7793
|
-
"agent",
|
|
7794
|
-
"room"
|
|
7795
|
-
],
|
|
7796
7592
|
get: async (runtime, message, _state) => {
|
|
7797
|
-
const __providerKeywords = [
|
|
7798
|
-
"mystical",
|
|
7799
|
-
"knowledge",
|
|
7800
|
-
"mysticalknowledgeprovider",
|
|
7801
|
-
"plugin",
|
|
7802
|
-
"mysticism",
|
|
7803
|
-
"status",
|
|
7804
|
-
"state",
|
|
7805
|
-
"context",
|
|
7806
|
-
"info",
|
|
7807
|
-
"details",
|
|
7808
|
-
"chat",
|
|
7809
|
-
"conversation",
|
|
7810
|
-
"agent",
|
|
7811
|
-
"room"
|
|
7812
|
-
];
|
|
7813
|
-
const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
|
|
7814
|
-
const __recentMessages = _state?.recentMessagesData || [];
|
|
7815
|
-
const __isRelevant = validateActionKeywords2(message, __recentMessages, __providerKeywords) || validateActionRegex2(message, __recentMessages, __providerRegex);
|
|
7816
|
-
if (!__isRelevant) {
|
|
7817
|
-
return { text: "" };
|
|
7818
|
-
}
|
|
7819
7593
|
try {
|
|
7820
7594
|
const service = runtime.getService("MYSTICISM");
|
|
7821
7595
|
const entityId = message.entityId;
|
|
@@ -7854,7 +7628,7 @@ __export(exports_reading_context, {
|
|
|
7854
7628
|
readingContextProvider: () => readingContextProvider,
|
|
7855
7629
|
default: () => reading_context_default
|
|
7856
7630
|
});
|
|
7857
|
-
import { logger as logger8
|
|
7631
|
+
import { logger as logger8 } from "@elizaos/core";
|
|
7858
7632
|
function emptyResult() {
|
|
7859
7633
|
return {
|
|
7860
7634
|
text: "",
|
|
@@ -8088,46 +7862,7 @@ var init_reading_context = __esm(() => {
|
|
|
8088
7862
|
readingContextProvider = {
|
|
8089
7863
|
name: "READING_CONTEXT",
|
|
8090
7864
|
description: "Provides context about the active mystical reading session",
|
|
8091
|
-
dynamic: true,
|
|
8092
|
-
relevanceKeywords: [
|
|
8093
|
-
"reading",
|
|
8094
|
-
"context",
|
|
8095
|
-
"readingcontextprovider",
|
|
8096
|
-
"plugin",
|
|
8097
|
-
"mysticism",
|
|
8098
|
-
"status",
|
|
8099
|
-
"state",
|
|
8100
|
-
"info",
|
|
8101
|
-
"details",
|
|
8102
|
-
"chat",
|
|
8103
|
-
"conversation",
|
|
8104
|
-
"agent",
|
|
8105
|
-
"room",
|
|
8106
|
-
"channel"
|
|
8107
|
-
],
|
|
8108
7865
|
get: async (runtime, message, _state) => {
|
|
8109
|
-
const __providerKeywords = [
|
|
8110
|
-
"reading",
|
|
8111
|
-
"context",
|
|
8112
|
-
"readingcontextprovider",
|
|
8113
|
-
"plugin",
|
|
8114
|
-
"mysticism",
|
|
8115
|
-
"status",
|
|
8116
|
-
"state",
|
|
8117
|
-
"info",
|
|
8118
|
-
"details",
|
|
8119
|
-
"chat",
|
|
8120
|
-
"conversation",
|
|
8121
|
-
"agent",
|
|
8122
|
-
"room",
|
|
8123
|
-
"channel"
|
|
8124
|
-
];
|
|
8125
|
-
const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
|
|
8126
|
-
const __recentMessages = _state?.recentMessagesData || [];
|
|
8127
|
-
const __isRelevant = validateActionKeywords3(message, __recentMessages, __providerKeywords) || validateActionRegex3(message, __recentMessages, __providerRegex);
|
|
8128
|
-
if (!__isRelevant) {
|
|
8129
|
-
return { text: "" };
|
|
8130
|
-
}
|
|
8131
7866
|
try {
|
|
8132
7867
|
const service = runtime.getService("MYSTICISM");
|
|
8133
7868
|
if (!service) {
|
|
@@ -8650,7 +8385,7 @@ You are not alone, and there are people who care about you.`;
|
|
|
8650
8385
|
});
|
|
8651
8386
|
|
|
8652
8387
|
// src/index.ts
|
|
8653
|
-
import { logger as logger10
|
|
8388
|
+
import { logger as logger10 } from "@elizaos/core";
|
|
8654
8389
|
|
|
8655
8390
|
// src/routes/readings.ts
|
|
8656
8391
|
import { logger } from "@elizaos/core";
|
|
@@ -9218,46 +8953,7 @@ var mysticismPlugin = {
|
|
|
9218
8953
|
{
|
|
9219
8954
|
name: "READING_CONTEXT",
|
|
9220
8955
|
description: "Provides context about the active mystical reading session",
|
|
9221
|
-
dynamic: true,
|
|
9222
|
-
relevanceKeywords: [
|
|
9223
|
-
"reading",
|
|
9224
|
-
"context",
|
|
9225
|
-
"inlineprovider1",
|
|
9226
|
-
"plugin",
|
|
9227
|
-
"mysticism",
|
|
9228
|
-
"status",
|
|
9229
|
-
"state",
|
|
9230
|
-
"info",
|
|
9231
|
-
"details",
|
|
9232
|
-
"chat",
|
|
9233
|
-
"conversation",
|
|
9234
|
-
"agent",
|
|
9235
|
-
"room",
|
|
9236
|
-
"channel"
|
|
9237
|
-
],
|
|
9238
8956
|
get: async (runtime, message, state) => {
|
|
9239
|
-
const __providerKeywords = [
|
|
9240
|
-
"reading",
|
|
9241
|
-
"context",
|
|
9242
|
-
"inlineprovider1",
|
|
9243
|
-
"plugin",
|
|
9244
|
-
"mysticism",
|
|
9245
|
-
"status",
|
|
9246
|
-
"state",
|
|
9247
|
-
"info",
|
|
9248
|
-
"details",
|
|
9249
|
-
"chat",
|
|
9250
|
-
"conversation",
|
|
9251
|
-
"agent",
|
|
9252
|
-
"room",
|
|
9253
|
-
"channel"
|
|
9254
|
-
];
|
|
9255
|
-
const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
|
|
9256
|
-
const __recentMessages = state?.recentMessagesData || [];
|
|
9257
|
-
const __isRelevant = validateActionKeywords4(message, __recentMessages, __providerKeywords) || validateActionRegex4(message, __recentMessages, __providerRegex);
|
|
9258
|
-
if (!__isRelevant) {
|
|
9259
|
-
return { text: "" };
|
|
9260
|
-
}
|
|
9261
8957
|
const { readingContextProvider: readingContextProvider2 } = await Promise.resolve().then(() => (init_reading_context(), exports_reading_context));
|
|
9262
8958
|
return readingContextProvider2.get(runtime, message, state);
|
|
9263
8959
|
}
|
|
@@ -9265,46 +8961,7 @@ var mysticismPlugin = {
|
|
|
9265
8961
|
{
|
|
9266
8962
|
name: "ECONOMIC_CONTEXT",
|
|
9267
8963
|
description: "Provides economic facts about payment history and revenue",
|
|
9268
|
-
dynamic: true,
|
|
9269
|
-
relevanceKeywords: [
|
|
9270
|
-
"economic",
|
|
9271
|
-
"context",
|
|
9272
|
-
"inlineprovider2",
|
|
9273
|
-
"plugin",
|
|
9274
|
-
"mysticism",
|
|
9275
|
-
"status",
|
|
9276
|
-
"state",
|
|
9277
|
-
"info",
|
|
9278
|
-
"details",
|
|
9279
|
-
"chat",
|
|
9280
|
-
"conversation",
|
|
9281
|
-
"agent",
|
|
9282
|
-
"room",
|
|
9283
|
-
"channel"
|
|
9284
|
-
],
|
|
9285
8964
|
get: async (runtime, message, state) => {
|
|
9286
|
-
const __providerKeywords = [
|
|
9287
|
-
"economic",
|
|
9288
|
-
"context",
|
|
9289
|
-
"inlineprovider2",
|
|
9290
|
-
"plugin",
|
|
9291
|
-
"mysticism",
|
|
9292
|
-
"status",
|
|
9293
|
-
"state",
|
|
9294
|
-
"info",
|
|
9295
|
-
"details",
|
|
9296
|
-
"chat",
|
|
9297
|
-
"conversation",
|
|
9298
|
-
"agent",
|
|
9299
|
-
"room",
|
|
9300
|
-
"channel"
|
|
9301
|
-
];
|
|
9302
|
-
const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
|
|
9303
|
-
const __recentMessages = state?.recentMessagesData || [];
|
|
9304
|
-
const __isRelevant = validateActionKeywords4(message, __recentMessages, __providerKeywords) || validateActionRegex4(message, __recentMessages, __providerRegex);
|
|
9305
|
-
if (!__isRelevant) {
|
|
9306
|
-
return { text: "" };
|
|
9307
|
-
}
|
|
9308
8965
|
const { economicContextProvider: economicContextProvider2 } = await Promise.resolve().then(() => (init_economic_context(), exports_economic_context));
|
|
9309
8966
|
return economicContextProvider2.get(runtime, message, state);
|
|
9310
8967
|
}
|
|
@@ -9312,46 +8969,7 @@ var mysticismPlugin = {
|
|
|
9312
8969
|
{
|
|
9313
8970
|
name: "MYSTICAL_KNOWLEDGE",
|
|
9314
8971
|
description: "Provides mystical domain knowledge to ground the agent's interpretations",
|
|
9315
|
-
dynamic: true,
|
|
9316
|
-
relevanceKeywords: [
|
|
9317
|
-
"mystical",
|
|
9318
|
-
"knowledge",
|
|
9319
|
-
"inlineprovider3",
|
|
9320
|
-
"plugin",
|
|
9321
|
-
"mysticism",
|
|
9322
|
-
"status",
|
|
9323
|
-
"state",
|
|
9324
|
-
"context",
|
|
9325
|
-
"info",
|
|
9326
|
-
"details",
|
|
9327
|
-
"chat",
|
|
9328
|
-
"conversation",
|
|
9329
|
-
"agent",
|
|
9330
|
-
"room"
|
|
9331
|
-
],
|
|
9332
8972
|
get: async (runtime, message, state) => {
|
|
9333
|
-
const __providerKeywords = [
|
|
9334
|
-
"mystical",
|
|
9335
|
-
"knowledge",
|
|
9336
|
-
"inlineprovider3",
|
|
9337
|
-
"plugin",
|
|
9338
|
-
"mysticism",
|
|
9339
|
-
"status",
|
|
9340
|
-
"state",
|
|
9341
|
-
"context",
|
|
9342
|
-
"info",
|
|
9343
|
-
"details",
|
|
9344
|
-
"chat",
|
|
9345
|
-
"conversation",
|
|
9346
|
-
"agent",
|
|
9347
|
-
"room"
|
|
9348
|
-
];
|
|
9349
|
-
const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
|
|
9350
|
-
const __recentMessages = state?.recentMessagesData || [];
|
|
9351
|
-
const __isRelevant = validateActionKeywords4(message, __recentMessages, __providerKeywords) || validateActionRegex4(message, __recentMessages, __providerRegex);
|
|
9352
|
-
if (!__isRelevant) {
|
|
9353
|
-
return { text: "" };
|
|
9354
|
-
}
|
|
9355
8973
|
const { mysticalKnowledgeProvider: mysticalKnowledgeProvider2 } = await Promise.resolve().then(() => (init_mystical_knowledge(), exports_mystical_knowledge));
|
|
9356
8974
|
return mysticalKnowledgeProvider2.get(runtime, message, state);
|
|
9357
8975
|
}
|
|
@@ -9383,4 +9001,4 @@ export {
|
|
|
9383
9001
|
AstrologyEngine
|
|
9384
9002
|
};
|
|
9385
9003
|
|
|
9386
|
-
//# debugId=
|
|
9004
|
+
//# debugId=0B7F6A3ECC2FEE3864756E2164756E21
|