@elizaos/plugin-linear 2.0.0-alpha.6 → 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 +471 -51
- package/dist/index.js.map +12 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42,20 +42,62 @@ var clearActivityAction = {
|
|
|
42
42
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
43
43
|
const __avText = __avTextRaw.toLowerCase();
|
|
44
44
|
const __avKeywords = ["clear", "linear", "activity"];
|
|
45
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
45
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
46
46
|
const __avRegex = /\b(?:clear|linear|activity)\b/i;
|
|
47
47
|
const __avRegexOk = __avRegex.test(__avText);
|
|
48
48
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
49
49
|
const __avExpectedSource = "";
|
|
50
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
50
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
51
51
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
52
52
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
53
53
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
|
-
const __avLegacyValidate = async (runtime2,
|
|
57
|
-
const
|
|
58
|
-
|
|
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
|
+
}
|
|
59
101
|
};
|
|
60
102
|
try {
|
|
61
103
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -370,20 +412,62 @@ var createCommentAction = {
|
|
|
370
412
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
371
413
|
const __avText = __avTextRaw.toLowerCase();
|
|
372
414
|
const __avKeywords = ["create", "linear", "comment"];
|
|
373
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
415
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
374
416
|
const __avRegex = /\b(?:create|linear|comment)\b/i;
|
|
375
417
|
const __avRegexOk = __avRegex.test(__avText);
|
|
376
418
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
377
419
|
const __avExpectedSource = "";
|
|
378
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
420
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
379
421
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
380
422
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
381
423
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
382
424
|
return false;
|
|
383
425
|
}
|
|
384
|
-
const __avLegacyValidate = async (runtime2,
|
|
385
|
-
const
|
|
386
|
-
|
|
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
|
+
}
|
|
387
471
|
};
|
|
388
472
|
try {
|
|
389
473
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -603,20 +687,62 @@ var createIssueAction = {
|
|
|
603
687
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
604
688
|
const __avText = __avTextRaw.toLowerCase();
|
|
605
689
|
const __avKeywords = ["create", "linear", "issue"];
|
|
606
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
690
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
607
691
|
const __avRegex = /\b(?:create|linear|issue)\b/i;
|
|
608
692
|
const __avRegexOk = __avRegex.test(__avText);
|
|
609
693
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
610
694
|
const __avExpectedSource = "";
|
|
611
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
695
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
612
696
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
613
697
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
614
698
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
615
699
|
return false;
|
|
616
700
|
}
|
|
617
|
-
const __avLegacyValidate = async (runtime2,
|
|
618
|
-
const
|
|
619
|
-
|
|
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
|
+
}
|
|
620
746
|
};
|
|
621
747
|
try {
|
|
622
748
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -853,20 +979,62 @@ var deleteIssueAction = {
|
|
|
853
979
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
854
980
|
const __avText = __avTextRaw.toLowerCase();
|
|
855
981
|
const __avKeywords = ["delete", "linear", "issue"];
|
|
856
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
982
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
857
983
|
const __avRegex = /\b(?:delete|linear|issue)\b/i;
|
|
858
984
|
const __avRegexOk = __avRegex.test(__avText);
|
|
859
985
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
860
986
|
const __avExpectedSource = "";
|
|
861
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
987
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
862
988
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
863
989
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
864
990
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
865
991
|
return false;
|
|
866
992
|
}
|
|
867
|
-
const __avLegacyValidate = async (runtime2,
|
|
868
|
-
const
|
|
869
|
-
|
|
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
|
+
}
|
|
870
1038
|
};
|
|
871
1039
|
try {
|
|
872
1040
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -1030,20 +1198,62 @@ var getActivityAction = {
|
|
|
1030
1198
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1031
1199
|
const __avText = __avTextRaw.toLowerCase();
|
|
1032
1200
|
const __avKeywords = ["get", "linear", "activity"];
|
|
1033
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
1201
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1034
1202
|
const __avRegex = /\b(?:get|linear|activity)\b/i;
|
|
1035
1203
|
const __avRegexOk = __avRegex.test(__avText);
|
|
1036
1204
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1037
1205
|
const __avExpectedSource = "";
|
|
1038
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
1206
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1039
1207
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1040
1208
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1041
1209
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1042
1210
|
return false;
|
|
1043
1211
|
}
|
|
1044
|
-
const __avLegacyValidate = async (runtime2,
|
|
1045
|
-
const
|
|
1046
|
-
|
|
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
|
+
}
|
|
1047
1257
|
};
|
|
1048
1258
|
try {
|
|
1049
1259
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -1262,20 +1472,62 @@ var getIssueAction = {
|
|
|
1262
1472
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1263
1473
|
const __avText = __avTextRaw.toLowerCase();
|
|
1264
1474
|
const __avKeywords = ["get", "linear", "issue"];
|
|
1265
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
1475
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1266
1476
|
const __avRegex = /\b(?:get|linear|issue)\b/i;
|
|
1267
1477
|
const __avRegexOk = __avRegex.test(__avText);
|
|
1268
1478
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1269
1479
|
const __avExpectedSource = "";
|
|
1270
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
1480
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1271
1481
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1272
1482
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1273
1483
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1274
1484
|
return false;
|
|
1275
1485
|
}
|
|
1276
|
-
const __avLegacyValidate = async (runtime2,
|
|
1277
|
-
const
|
|
1278
|
-
|
|
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
|
+
}
|
|
1279
1531
|
};
|
|
1280
1532
|
try {
|
|
1281
1533
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -1577,20 +1829,62 @@ var listProjectsAction = {
|
|
|
1577
1829
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1578
1830
|
const __avText = __avTextRaw.toLowerCase();
|
|
1579
1831
|
const __avKeywords = ["list", "linear", "projects"];
|
|
1580
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
1832
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1581
1833
|
const __avRegex = /\b(?:list|linear|projects)\b/i;
|
|
1582
1834
|
const __avRegexOk = __avRegex.test(__avText);
|
|
1583
1835
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1584
1836
|
const __avExpectedSource = "";
|
|
1585
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
1837
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1586
1838
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1587
1839
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1588
1840
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1589
1841
|
return false;
|
|
1590
1842
|
}
|
|
1591
|
-
const __avLegacyValidate = async (runtime2,
|
|
1592
|
-
const
|
|
1593
|
-
|
|
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
|
+
}
|
|
1594
1888
|
};
|
|
1595
1889
|
try {
|
|
1596
1890
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -1821,20 +2115,62 @@ var listTeamsAction = {
|
|
|
1821
2115
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
1822
2116
|
const __avText = __avTextRaw.toLowerCase();
|
|
1823
2117
|
const __avKeywords = ["list", "linear", "teams"];
|
|
1824
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
2118
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
1825
2119
|
const __avRegex = /\b(?:list|linear|teams)\b/i;
|
|
1826
2120
|
const __avRegexOk = __avRegex.test(__avText);
|
|
1827
2121
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
1828
2122
|
const __avExpectedSource = "";
|
|
1829
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
2123
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
1830
2124
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
1831
2125
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
1832
2126
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
1833
2127
|
return false;
|
|
1834
2128
|
}
|
|
1835
|
-
const __avLegacyValidate = async (runtime2,
|
|
1836
|
-
const
|
|
1837
|
-
|
|
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
|
+
}
|
|
1838
2174
|
};
|
|
1839
2175
|
try {
|
|
1840
2176
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -2046,20 +2382,62 @@ var searchIssuesAction = {
|
|
|
2046
2382
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
2047
2383
|
const __avText = __avTextRaw.toLowerCase();
|
|
2048
2384
|
const __avKeywords = ["search", "linear", "issues"];
|
|
2049
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
2385
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
2050
2386
|
const __avRegex = /\b(?:search|linear|issues)\b/i;
|
|
2051
2387
|
const __avRegexOk = __avRegex.test(__avText);
|
|
2052
2388
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
2053
2389
|
const __avExpectedSource = "";
|
|
2054
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
2390
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
2055
2391
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
2056
2392
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
2057
2393
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
2058
2394
|
return false;
|
|
2059
2395
|
}
|
|
2060
|
-
const __avLegacyValidate = async (runtime2,
|
|
2061
|
-
const
|
|
2062
|
-
|
|
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
|
+
}
|
|
2063
2441
|
};
|
|
2064
2442
|
try {
|
|
2065
2443
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -2313,20 +2691,62 @@ var updateIssueAction = {
|
|
|
2313
2691
|
const __avTextRaw = typeof message?.content?.text === "string" ? message.content.text : "";
|
|
2314
2692
|
const __avText = __avTextRaw.toLowerCase();
|
|
2315
2693
|
const __avKeywords = ["update", "linear", "issue"];
|
|
2316
|
-
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((
|
|
2694
|
+
const __avKeywordOk = __avKeywords.length > 0 && __avKeywords.some((word) => word.length > 0 && __avText.includes(word));
|
|
2317
2695
|
const __avRegex = /\b(?:update|linear|issue)\b/i;
|
|
2318
2696
|
const __avRegexOk = __avRegex.test(__avText);
|
|
2319
2697
|
const __avSource = String(message?.content?.source ?? message?.source ?? "");
|
|
2320
2698
|
const __avExpectedSource = "";
|
|
2321
|
-
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService);
|
|
2699
|
+
const __avSourceOk = __avExpectedSource ? __avSource === __avExpectedSource : Boolean(__avSource || state || runtime?.agentId || runtime?.getService || runtime?.getSetting);
|
|
2322
2700
|
const __avOptions = options && typeof options === "object" ? options : {};
|
|
2323
2701
|
const __avInputOk = __avText.trim().length > 0 || Object.keys(__avOptions).length > 0 || Boolean(message?.content && typeof message.content === "object");
|
|
2324
2702
|
if (!(__avKeywordOk && __avRegexOk && __avSourceOk && __avInputOk)) {
|
|
2325
2703
|
return false;
|
|
2326
2704
|
}
|
|
2327
|
-
const __avLegacyValidate = async (runtime2,
|
|
2328
|
-
const
|
|
2329
|
-
|
|
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
|
+
}
|
|
2330
2750
|
};
|
|
2331
2751
|
try {
|
|
2332
2752
|
return Boolean(await __avLegacyValidate(runtime, message, state, options));
|
|
@@ -3044,4 +3464,4 @@ export {
|
|
|
3044
3464
|
LinearService
|
|
3045
3465
|
};
|
|
3046
3466
|
|
|
3047
|
-
//# debugId=
|
|
3467
|
+
//# debugId=1F6135D155E56E4E64756E2164756E21
|