@elizaos/plugin-linear 2.0.0-alpha.5 → 2.0.0-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 +665 -31
- package/dist/index.js.map +16 -16
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -38,9 +38,72 @@ var clearActivityAction = {
|
|
|
38
38
|
}
|
|
39
39
|
]
|
|
40
40
|
],
|
|
41
|
-
async
|
|
42
|
-
const
|
|
43
|
-
|
|
41
|
+
validate: async (runtime, message, state, options) => {
|
|
42
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
43
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
44
|
+
const __avKeywords = ["clear", "linear", "activity"];
|
|
45
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
46
|
+
const __avRegex = /\b(?:clear|linear|activity)\b/i;
|
|
47
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
48
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
49
|
+
const __avExpectedSource = "";
|
|
50
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
51
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
52
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
53
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
57
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
58
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
59
|
+
const __avKeywords2 = ["clear", "linear", "activity"];
|
|
60
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
61
|
+
const __avRegex2 = /\b(?:clear|linear|activity)\b/i;
|
|
62
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
63
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
64
|
+
const __avExpectedSource2 = "";
|
|
65
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
66
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
67
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
68
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
72
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
73
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
74
|
+
const __avKeywords3 = ["clear", "linear", "activity"];
|
|
75
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
76
|
+
const __avRegex3 = /\b(?:clear|linear|activity)\b/i;
|
|
77
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
78
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
79
|
+
const __avExpectedSource3 = "";
|
|
80
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
81
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
82
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
83
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
87
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
88
|
+
return !!apiKey;
|
|
89
|
+
};
|
|
90
|
+
try {
|
|
91
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
92
|
+
} catch {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
try {
|
|
97
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
98
|
+
} catch {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
try {
|
|
103
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
104
|
+
} catch {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
44
107
|
},
|
|
45
108
|
async handler(runtime, message, _state, _options, callback) {
|
|
46
109
|
try {
|
|
@@ -345,9 +408,72 @@ var createCommentAction = {
|
|
|
345
408
|
}
|
|
346
409
|
]
|
|
347
410
|
],
|
|
348
|
-
async
|
|
349
|
-
const
|
|
350
|
-
|
|
411
|
+
validate: async (runtime, message, state, options) => {
|
|
412
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
413
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
414
|
+
const __avKeywords = ["create", "linear", "comment"];
|
|
415
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
416
|
+
const __avRegex = /\b(?:create|linear|comment)\b/i;
|
|
417
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
418
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
419
|
+
const __avExpectedSource = "";
|
|
420
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
421
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
422
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
423
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
427
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
428
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
429
|
+
const __avKeywords2 = ["create", "linear", "comment"];
|
|
430
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
431
|
+
const __avRegex2 = /\b(?:create|linear|comment)\b/i;
|
|
432
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
433
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
434
|
+
const __avExpectedSource2 = "";
|
|
435
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
436
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
437
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
438
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
442
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
443
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
444
|
+
const __avKeywords3 = ["create", "linear", "comment"];
|
|
445
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
446
|
+
const __avRegex3 = /\b(?:create|linear|comment)\b/i;
|
|
447
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
448
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
449
|
+
const __avExpectedSource3 = "";
|
|
450
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
451
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
452
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
453
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
457
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
458
|
+
return !!apiKey;
|
|
459
|
+
};
|
|
460
|
+
try {
|
|
461
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
462
|
+
} catch {
|
|
463
|
+
return false;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
try {
|
|
467
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
468
|
+
} catch {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
try {
|
|
473
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
474
|
+
} catch {
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
351
477
|
},
|
|
352
478
|
async handler(runtime, message, _state, _options, callback) {
|
|
353
479
|
try {
|
|
@@ -557,9 +683,72 @@ var createIssueAction = {
|
|
|
557
683
|
}
|
|
558
684
|
]
|
|
559
685
|
],
|
|
560
|
-
async
|
|
561
|
-
const
|
|
562
|
-
|
|
686
|
+
validate: async (runtime, message, state, options) => {
|
|
687
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
688
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
689
|
+
const __avKeywords = ["create", "linear", "issue"];
|
|
690
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
691
|
+
const __avRegex = /\b(?:create|linear|issue)\b/i;
|
|
692
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
693
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
694
|
+
const __avExpectedSource = "";
|
|
695
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
696
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
697
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
698
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
702
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
703
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
704
|
+
const __avKeywords2 = ["create", "linear", "issue"];
|
|
705
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
706
|
+
const __avRegex2 = /\b(?:create|linear|issue)\b/i;
|
|
707
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
708
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
709
|
+
const __avExpectedSource2 = "";
|
|
710
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
711
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
712
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
713
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
714
|
+
return false;
|
|
715
|
+
}
|
|
716
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
717
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
718
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
719
|
+
const __avKeywords3 = ["create", "linear", "issue"];
|
|
720
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
721
|
+
const __avRegex3 = /\b(?:create|linear|issue)\b/i;
|
|
722
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
723
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
724
|
+
const __avExpectedSource3 = "";
|
|
725
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
726
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
727
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
728
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
729
|
+
return false;
|
|
730
|
+
}
|
|
731
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
732
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
733
|
+
return !!apiKey;
|
|
734
|
+
};
|
|
735
|
+
try {
|
|
736
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
737
|
+
} catch {
|
|
738
|
+
return false;
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
try {
|
|
742
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
743
|
+
} catch {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
try {
|
|
748
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
749
|
+
} catch {
|
|
750
|
+
return false;
|
|
751
|
+
}
|
|
563
752
|
},
|
|
564
753
|
async handler(runtime, message, _state, _options, callback) {
|
|
565
754
|
try {
|
|
@@ -786,9 +975,72 @@ var deleteIssueAction = {
|
|
|
786
975
|
}
|
|
787
976
|
]
|
|
788
977
|
],
|
|
789
|
-
async
|
|
790
|
-
const
|
|
791
|
-
|
|
978
|
+
validate: async (runtime, message, state, options) => {
|
|
979
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
980
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
981
|
+
const __avKeywords = ["delete", "linear", "issue"];
|
|
982
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
983
|
+
const __avRegex = /\b(?:delete|linear|issue)\b/i;
|
|
984
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
985
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
986
|
+
const __avExpectedSource = "";
|
|
987
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
988
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
989
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
990
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
991
|
+
return false;
|
|
992
|
+
}
|
|
993
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
994
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
995
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
996
|
+
const __avKeywords2 = ["delete", "linear", "issue"];
|
|
997
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
998
|
+
const __avRegex2 = /\b(?:delete|linear|issue)\b/i;
|
|
999
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
1000
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
1001
|
+
const __avExpectedSource2 = "";
|
|
1002
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
1003
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
1004
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
1005
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
1006
|
+
return false;
|
|
1007
|
+
}
|
|
1008
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
1009
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
1010
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
1011
|
+
const __avKeywords3 = ["delete", "linear", "issue"];
|
|
1012
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
1013
|
+
const __avRegex3 = /\b(?:delete|linear|issue)\b/i;
|
|
1014
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
1015
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
1016
|
+
const __avExpectedSource3 = "";
|
|
1017
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
1018
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
1019
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
1020
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
1021
|
+
return false;
|
|
1022
|
+
}
|
|
1023
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
1024
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
1025
|
+
return !!apiKey;
|
|
1026
|
+
};
|
|
1027
|
+
try {
|
|
1028
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
1029
|
+
} catch {
|
|
1030
|
+
return false;
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
try {
|
|
1034
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
1035
|
+
} catch {
|
|
1036
|
+
return false;
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
try {
|
|
1040
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
1041
|
+
} catch {
|
|
1042
|
+
return false;
|
|
1043
|
+
}
|
|
792
1044
|
},
|
|
793
1045
|
async handler(runtime, message, _state, _options, callback) {
|
|
794
1046
|
try {
|
|
@@ -942,9 +1194,72 @@ var getActivityAction = {
|
|
|
942
1194
|
}
|
|
943
1195
|
]
|
|
944
1196
|
],
|
|
945
|
-
async
|
|
946
|
-
const
|
|
947
|
-
|
|
1197
|
+
validate: async (runtime, message, state, options) => {
|
|
1198
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1199
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
1200
|
+
const __avKeywords = ["get", "linear", "activity"];
|
|
1201
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1202
|
+
const __avRegex = /\b(?:get|linear|activity)\b/i;
|
|
1203
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
1204
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1205
|
+
const __avExpectedSource = "";
|
|
1206
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1207
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1208
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1209
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1210
|
+
return false;
|
|
1211
|
+
}
|
|
1212
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
1213
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
1214
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
1215
|
+
const __avKeywords2 = ["get", "linear", "activity"];
|
|
1216
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
1217
|
+
const __avRegex2 = /\b(?:get|linear|activity)\b/i;
|
|
1218
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
1219
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
1220
|
+
const __avExpectedSource2 = "";
|
|
1221
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
1222
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
1223
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
1224
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
1225
|
+
return false;
|
|
1226
|
+
}
|
|
1227
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
1228
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
1229
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
1230
|
+
const __avKeywords3 = ["get", "linear", "activity"];
|
|
1231
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
1232
|
+
const __avRegex3 = /\b(?:get|linear|activity)\b/i;
|
|
1233
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
1234
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
1235
|
+
const __avExpectedSource3 = "";
|
|
1236
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
1237
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
1238
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
1239
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
1240
|
+
return false;
|
|
1241
|
+
}
|
|
1242
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
1243
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
1244
|
+
return !!apiKey;
|
|
1245
|
+
};
|
|
1246
|
+
try {
|
|
1247
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
1248
|
+
} catch {
|
|
1249
|
+
return false;
|
|
1250
|
+
}
|
|
1251
|
+
};
|
|
1252
|
+
try {
|
|
1253
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
1254
|
+
} catch {
|
|
1255
|
+
return false;
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
try {
|
|
1259
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
1260
|
+
} catch {
|
|
1261
|
+
return false;
|
|
1262
|
+
}
|
|
948
1263
|
},
|
|
949
1264
|
async handler(runtime, message, _state, _options, callback) {
|
|
950
1265
|
try {
|
|
@@ -1153,9 +1468,72 @@ var getIssueAction = {
|
|
|
1153
1468
|
}
|
|
1154
1469
|
]
|
|
1155
1470
|
],
|
|
1156
|
-
async
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1471
|
+
validate: async (runtime, message, state, options) => {
|
|
1472
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1473
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
1474
|
+
const __avKeywords = ["get", "linear", "issue"];
|
|
1475
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1476
|
+
const __avRegex = /\b(?:get|linear|issue)\b/i;
|
|
1477
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
1478
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1479
|
+
const __avExpectedSource = "";
|
|
1480
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1481
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1482
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1483
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1484
|
+
return false;
|
|
1485
|
+
}
|
|
1486
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
1487
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
1488
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
1489
|
+
const __avKeywords2 = ["get", "linear", "issue"];
|
|
1490
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
1491
|
+
const __avRegex2 = /\b(?:get|linear|issue)\b/i;
|
|
1492
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
1493
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
1494
|
+
const __avExpectedSource2 = "";
|
|
1495
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
1496
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
1497
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
1498
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
1499
|
+
return false;
|
|
1500
|
+
}
|
|
1501
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
1502
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
1503
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
1504
|
+
const __avKeywords3 = ["get", "linear", "issue"];
|
|
1505
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
1506
|
+
const __avRegex3 = /\b(?:get|linear|issue)\b/i;
|
|
1507
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
1508
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
1509
|
+
const __avExpectedSource3 = "";
|
|
1510
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
1511
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
1512
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
1513
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
1514
|
+
return false;
|
|
1515
|
+
}
|
|
1516
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
1517
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
1518
|
+
return !!apiKey;
|
|
1519
|
+
};
|
|
1520
|
+
try {
|
|
1521
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
1522
|
+
} catch {
|
|
1523
|
+
return false;
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
try {
|
|
1527
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
1528
|
+
} catch {
|
|
1529
|
+
return false;
|
|
1530
|
+
}
|
|
1531
|
+
};
|
|
1532
|
+
try {
|
|
1533
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
1534
|
+
} catch {
|
|
1535
|
+
return false;
|
|
1536
|
+
}
|
|
1159
1537
|
},
|
|
1160
1538
|
async handler(runtime, message, _state, _options, callback) {
|
|
1161
1539
|
try {
|
|
@@ -1447,9 +1825,72 @@ var listProjectsAction = {
|
|
|
1447
1825
|
}
|
|
1448
1826
|
]
|
|
1449
1827
|
],
|
|
1450
|
-
async
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1828
|
+
validate: async (runtime, message, state, options) => {
|
|
1829
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1830
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
1831
|
+
const __avKeywords = ["list", "linear", "projects"];
|
|
1832
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1833
|
+
const __avRegex = /\b(?:list|linear|projects)\b/i;
|
|
1834
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
1835
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1836
|
+
const __avExpectedSource = "";
|
|
1837
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1838
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1839
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1840
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1841
|
+
return false;
|
|
1842
|
+
}
|
|
1843
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
1844
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
1845
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
1846
|
+
const __avKeywords2 = ["list", "linear", "projects"];
|
|
1847
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
1848
|
+
const __avRegex2 = /\b(?:list|linear|projects)\b/i;
|
|
1849
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
1850
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
1851
|
+
const __avExpectedSource2 = "";
|
|
1852
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
1853
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
1854
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
1855
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
1856
|
+
return false;
|
|
1857
|
+
}
|
|
1858
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
1859
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
1860
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
1861
|
+
const __avKeywords3 = ["list", "linear", "projects"];
|
|
1862
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
1863
|
+
const __avRegex3 = /\b(?:list|linear|projects)\b/i;
|
|
1864
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
1865
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
1866
|
+
const __avExpectedSource3 = "";
|
|
1867
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
1868
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
1869
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
1870
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
1871
|
+
return false;
|
|
1872
|
+
}
|
|
1873
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
1874
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
1875
|
+
return !!apiKey;
|
|
1876
|
+
};
|
|
1877
|
+
try {
|
|
1878
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
1879
|
+
} catch {
|
|
1880
|
+
return false;
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
try {
|
|
1884
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
1885
|
+
} catch {
|
|
1886
|
+
return false;
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1889
|
+
try {
|
|
1890
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
1891
|
+
} catch {
|
|
1892
|
+
return false;
|
|
1893
|
+
}
|
|
1453
1894
|
},
|
|
1454
1895
|
async handler(runtime, message, _state, _options, callback) {
|
|
1455
1896
|
try {
|
|
@@ -1670,9 +2111,72 @@ var listTeamsAction = {
|
|
|
1670
2111
|
}
|
|
1671
2112
|
]
|
|
1672
2113
|
],
|
|
1673
|
-
async
|
|
1674
|
-
const
|
|
1675
|
-
|
|
2114
|
+
validate: async (runtime, message, state, options) => {
|
|
2115
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
2116
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
2117
|
+
const __avKeywords = ["list", "linear", "teams"];
|
|
2118
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
2119
|
+
const __avRegex = /\b(?:list|linear|teams)\b/i;
|
|
2120
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
2121
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
2122
|
+
const __avExpectedSource = "";
|
|
2123
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
2124
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
2125
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
2126
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
2127
|
+
return false;
|
|
2128
|
+
}
|
|
2129
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
2130
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
2131
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
2132
|
+
const __avKeywords2 = ["list", "linear", "teams"];
|
|
2133
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
2134
|
+
const __avRegex2 = /\b(?:list|linear|teams)\b/i;
|
|
2135
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
2136
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
2137
|
+
const __avExpectedSource2 = "";
|
|
2138
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
2139
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
2140
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
2141
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
2142
|
+
return false;
|
|
2143
|
+
}
|
|
2144
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
2145
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
2146
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
2147
|
+
const __avKeywords3 = ["list", "linear", "teams"];
|
|
2148
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
2149
|
+
const __avRegex3 = /\b(?:list|linear|teams)\b/i;
|
|
2150
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
2151
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
2152
|
+
const __avExpectedSource3 = "";
|
|
2153
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
2154
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
2155
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
2156
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
2157
|
+
return false;
|
|
2158
|
+
}
|
|
2159
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
2160
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
2161
|
+
return !!apiKey;
|
|
2162
|
+
};
|
|
2163
|
+
try {
|
|
2164
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
2165
|
+
} catch {
|
|
2166
|
+
return false;
|
|
2167
|
+
}
|
|
2168
|
+
};
|
|
2169
|
+
try {
|
|
2170
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
2171
|
+
} catch {
|
|
2172
|
+
return false;
|
|
2173
|
+
}
|
|
2174
|
+
};
|
|
2175
|
+
try {
|
|
2176
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
2177
|
+
} catch {
|
|
2178
|
+
return false;
|
|
2179
|
+
}
|
|
1676
2180
|
},
|
|
1677
2181
|
async handler(runtime, message, _state, _options, callback) {
|
|
1678
2182
|
try {
|
|
@@ -1874,9 +2378,72 @@ var searchIssuesAction = {
|
|
|
1874
2378
|
}
|
|
1875
2379
|
]
|
|
1876
2380
|
],
|
|
1877
|
-
async
|
|
1878
|
-
const
|
|
1879
|
-
|
|
2381
|
+
validate: async (runtime, message, state, options) => {
|
|
2382
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
2383
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
2384
|
+
const __avKeywords = ["search", "linear", "issues"];
|
|
2385
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
2386
|
+
const __avRegex = /\b(?:search|linear|issues)\b/i;
|
|
2387
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
2388
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
2389
|
+
const __avExpectedSource = "";
|
|
2390
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
2391
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
2392
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
2393
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
2394
|
+
return false;
|
|
2395
|
+
}
|
|
2396
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
2397
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
2398
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
2399
|
+
const __avKeywords2 = ["search", "linear", "issues"];
|
|
2400
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
2401
|
+
const __avRegex2 = /\b(?:search|linear|issues)\b/i;
|
|
2402
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
2403
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
2404
|
+
const __avExpectedSource2 = "";
|
|
2405
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
2406
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
2407
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
2408
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
2409
|
+
return false;
|
|
2410
|
+
}
|
|
2411
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
2412
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
2413
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
2414
|
+
const __avKeywords3 = ["search", "linear", "issues"];
|
|
2415
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
2416
|
+
const __avRegex3 = /\b(?:search|linear|issues)\b/i;
|
|
2417
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
2418
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
2419
|
+
const __avExpectedSource3 = "";
|
|
2420
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
2421
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
2422
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
2423
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
2424
|
+
return false;
|
|
2425
|
+
}
|
|
2426
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
2427
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
2428
|
+
return !!apiKey;
|
|
2429
|
+
};
|
|
2430
|
+
try {
|
|
2431
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
2432
|
+
} catch {
|
|
2433
|
+
return false;
|
|
2434
|
+
}
|
|
2435
|
+
};
|
|
2436
|
+
try {
|
|
2437
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
2438
|
+
} catch {
|
|
2439
|
+
return false;
|
|
2440
|
+
}
|
|
2441
|
+
};
|
|
2442
|
+
try {
|
|
2443
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
2444
|
+
} catch {
|
|
2445
|
+
return false;
|
|
2446
|
+
}
|
|
1880
2447
|
},
|
|
1881
2448
|
async handler(runtime, message, _state, _options, callback) {
|
|
1882
2449
|
try {
|
|
@@ -2120,9 +2687,72 @@ var updateIssueAction = {
|
|
|
2120
2687
|
}
|
|
2121
2688
|
]
|
|
2122
2689
|
],
|
|
2123
|
-
async
|
|
2124
|
-
const
|
|
2125
|
-
|
|
2690
|
+
validate: async (runtime, message, state, options) => {
|
|
2691
|
+
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
2692
|
+
const __avText = __avTextRaw.toLowerCase();
|
|
2693
|
+
const __avKeywords = ["update", "linear", "issue"];
|
|
2694
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
2695
|
+
const __avRegex = /\b(?:update|linear|issue)\b/i;
|
|
2696
|
+
const __avRegexOk = __avRegex.test(__avText);
|
|
2697
|
+
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
2698
|
+
const __avExpectedSource = "";
|
|
2699
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
2700
|
+
const __avOptions = options && typeof options === "object" ? options : {};
|
|
2701
|
+
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
2702
|
+
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
2703
|
+
return false;
|
|
2704
|
+
}
|
|
2705
|
+
const __avLegacyValidate = async (runtime2, message2, state2, options2) => {
|
|
2706
|
+
const __avTextRaw2 = typeof message2?.content?.text === "string" ? message2.content.text : "";
|
|
2707
|
+
const __avText2 = __avTextRaw2.toLowerCase();
|
|
2708
|
+
const __avKeywords2 = ["update", "linear", "issue"];
|
|
2709
|
+
const __avKeywordOk2 = __avKeywords2.length > 0 && __avKeywords2.some((word) => word.length > 0 && __avText2.includes(word));
|
|
2710
|
+
const __avRegex2 = /\b(?:update|linear|issue)\b/i;
|
|
2711
|
+
const __avRegexOk2 = __avRegex2.test(__avText2);
|
|
2712
|
+
const __avSource2 = String(message2?.content?.source ?? message2?.source ?? "");
|
|
2713
|
+
const __avExpectedSource2 = "";
|
|
2714
|
+
const __avSourceOk2 = __avExpectedSource2 ? __avSource2 === __avExpectedSource2 : Boolean(__avSource2 || state2 || runtime2?.agentId || runtime2?.getService || runtime2?.getSetting);
|
|
2715
|
+
const __avOptions2 = options2 && typeof options2 === "object" ? options2 : {};
|
|
2716
|
+
const __avInputOk2 = __avText2.trim().length > 0 || Object.keys(__avOptions2).length > 0 || Boolean(message2?.content && typeof message2.content === "object");
|
|
2717
|
+
if (!(__avKeywordOk2 && __avRegexOk2 && __avSourceOk2 && __avInputOk2)) {
|
|
2718
|
+
return false;
|
|
2719
|
+
}
|
|
2720
|
+
const __avLegacyValidate2 = async (runtime3, message3, state3, options3) => {
|
|
2721
|
+
const __avTextRaw3 = typeof message3?.content?.text === "string" ? message3.content.text : "";
|
|
2722
|
+
const __avText3 = __avTextRaw3.toLowerCase();
|
|
2723
|
+
const __avKeywords3 = ["update", "linear", "issue"];
|
|
2724
|
+
const __avKeywordOk3 = __avKeywords3.length > 0 && __avKeywords3.some((kw) => kw.length > 0 && __avText3.includes(kw));
|
|
2725
|
+
const __avRegex3 = /\b(?:update|linear|issue)\b/i;
|
|
2726
|
+
const __avRegexOk3 = __avRegex3.test(__avText3);
|
|
2727
|
+
const __avSource3 = String(message3?.content?.source ?? message3?.source ?? "");
|
|
2728
|
+
const __avExpectedSource3 = "";
|
|
2729
|
+
const __avSourceOk3 = __avExpectedSource3 ? __avSource3 === __avExpectedSource3 : Boolean(__avSource3 || state3 || runtime3?.agentId || runtime3?.getService);
|
|
2730
|
+
const __avOptions3 = options3 && typeof options3 === "object" ? options3 : {};
|
|
2731
|
+
const __avInputOk3 = __avText3.trim().length > 0 || Object.keys(__avOptions3).length > 0 || Boolean(message3?.content && typeof message3.content === "object");
|
|
2732
|
+
if (!(__avKeywordOk3 && __avRegexOk3 && __avSourceOk3 && __avInputOk3)) {
|
|
2733
|
+
return false;
|
|
2734
|
+
}
|
|
2735
|
+
const __avLegacyValidate3 = async (runtime4, _message, _state) => {
|
|
2736
|
+
const apiKey = runtime4.getSetting("LINEAR_API_KEY");
|
|
2737
|
+
return !!apiKey;
|
|
2738
|
+
};
|
|
2739
|
+
try {
|
|
2740
|
+
return Boolean(await __avLegacyValidate3(runtime3, message3, state3, options3));
|
|
2741
|
+
} catch {
|
|
2742
|
+
return false;
|
|
2743
|
+
}
|
|
2744
|
+
};
|
|
2745
|
+
try {
|
|
2746
|
+
return Boolean(await __avLegacyValidate2(runtime2, message2, state2, options2));
|
|
2747
|
+
} catch {
|
|
2748
|
+
return false;
|
|
2749
|
+
}
|
|
2750
|
+
};
|
|
2751
|
+
try {
|
|
2752
|
+
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
2753
|
+
} catch {
|
|
2754
|
+
return false;
|
|
2755
|
+
}
|
|
2126
2756
|
},
|
|
2127
2757
|
async handler(runtime, message, _state, _options, callback) {
|
|
2128
2758
|
try {
|
|
@@ -2316,6 +2946,7 @@ View it at: ${updatedIssue.url}`;
|
|
|
2316
2946
|
var linearActivityProvider = {
|
|
2317
2947
|
name: "LINEAR_ACTIVITY",
|
|
2318
2948
|
description: "Provides context about recent Linear activity",
|
|
2949
|
+
dynamic: true,
|
|
2319
2950
|
get: async (runtime, _message, _state) => {
|
|
2320
2951
|
try {
|
|
2321
2952
|
const linearService = runtime.getService("linear");
|
|
@@ -2365,6 +2996,7 @@ ${activityList.join(`
|
|
|
2365
2996
|
var linearIssuesProvider = {
|
|
2366
2997
|
name: "LINEAR_ISSUES",
|
|
2367
2998
|
description: "Provides context about recent Linear issues",
|
|
2999
|
+
dynamic: true,
|
|
2368
3000
|
get: async (runtime, _message, _state) => {
|
|
2369
3001
|
try {
|
|
2370
3002
|
const linearService = runtime.getService("linear");
|
|
@@ -2408,6 +3040,7 @@ ${issuesList.join(`
|
|
|
2408
3040
|
var linearProjectsProvider = {
|
|
2409
3041
|
name: "LINEAR_PROJECTS",
|
|
2410
3042
|
description: "Provides context about active Linear projects",
|
|
3043
|
+
dynamic: true,
|
|
2411
3044
|
get: async (runtime, _message, _state) => {
|
|
2412
3045
|
try {
|
|
2413
3046
|
const linearService = runtime.getService("linear");
|
|
@@ -2449,6 +3082,7 @@ ${projectsList.join(`
|
|
|
2449
3082
|
var linearTeamsProvider = {
|
|
2450
3083
|
name: "LINEAR_TEAMS",
|
|
2451
3084
|
description: "Provides context about Linear teams",
|
|
3085
|
+
dynamic: true,
|
|
2452
3086
|
get: async (runtime, _message, _state) => {
|
|
2453
3087
|
try {
|
|
2454
3088
|
const linearService = runtime.getService("linear");
|
|
@@ -2830,4 +3464,4 @@ export {
|
|
|
2830
3464
|
LinearService
|
|
2831
3465
|
};
|
|
2832
3466
|
|
|
2833
|
-
//# debugId=
|
|
3467
|
+
//# debugId=1F6135D155E56E4E64756E2164756E21
|