@@ -15,6 +15,7 @@ import { DirectClient } from "@elizaos/client-direct";
15
15
import { agentKitPlugin } from "@elizaos/plugin-agentkit" ;
16
16
// import { ReclaimAdapter } from "@elizaos/plugin-reclaim";
17
17
import { PrimusAdapter } from "@elizaos/plugin-primus" ;
18
+ import { lightningPlugin } from "@elizaos/plugin-lightning" ;
18
19
import { elizaCodeinPlugin , onchainJson } from "@elizaos/plugin-iq6900" ;
19
20
20
21
import {
@@ -107,7 +108,10 @@ import { hyperliquidPlugin } from "@elizaos/plugin-hyperliquid";
107
108
import { echoChambersPlugin } from "@elizaos/plugin-echochambers" ;
108
109
import { dexScreenerPlugin } from "@elizaos/plugin-dexscreener" ;
109
110
import { pythDataPlugin } from "@elizaos/plugin-pyth-data" ;
111
+
110
112
import { openaiPlugin } from '@elizaos/plugin-openai' ;
113
+ import { devinPlugin } from '@elizaos/plugin-devin' ;
114
+
111
115
112
116
import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era" ;
113
117
import Database from "better-sqlite3" ;
@@ -209,7 +213,9 @@ export async function loadCharacterFromOnchain(): Promise<Character[]> {
209
213
210
214
// .id isn't really valid
211
215
const characterId = character . id || character . name ;
212
- const characterPrefix = `CHARACTER.${ characterId . toUpperCase ( ) . replace ( / / g, "_" ) } .` ;
216
+ const characterPrefix = `CHARACTER.${ characterId
217
+ . toUpperCase ( )
218
+ . replace ( / / g, "_" ) } .`;
213
219
214
220
const characterSettings = Object . entries ( process . env )
215
221
. filter ( ( [ key ] ) => key . startsWith ( characterPrefix ) )
@@ -281,7 +287,9 @@ async function jsonToCharacter(
281
287
282
288
// .id isn't really valid
283
289
const characterId = character . id || character . name ;
284
- const characterPrefix = `CHARACTER.${ characterId . toUpperCase ( ) . replace ( / / g, "_" ) } .` ;
290
+ const characterPrefix = `CHARACTER.${ characterId
291
+ . toUpperCase ( )
292
+ . replace ( / / g, "_" ) } .`;
285
293
const characterSettings = Object . entries ( process . env )
286
294
. filter ( ( [ key ] ) => key . startsWith ( characterPrefix ) )
287
295
. reduce ( ( settings , [ key , value ] ) => {
@@ -391,8 +399,9 @@ export async function loadCharacters(
391
399
if ( characterPaths ?. length > 0 ) {
392
400
for ( const characterPath of characterPaths ) {
393
401
try {
394
- const character : Character =
395
- await loadCharacterTryPath ( characterPath ) ;
402
+ const character : Character = await loadCharacterTryPath (
403
+ characterPath
404
+ ) ;
396
405
loadedCharacters . push ( character ) ;
397
406
} catch ( e ) {
398
407
process . exit ( 1 ) ;
@@ -555,9 +564,10 @@ export function getTokenForProvider(
555
564
settings . VENICE_API_KEY
556
565
) ;
557
566
case ModelProviderName . ATOMA :
558
- return (
559
- character . settings ?. secrets ?. ATOMASDK_BEARER_AUTH ||
560
- settings . ATOMASDK_BEARER_AUTH
567
+ return (
568
+ character . settings ?. secrets ?. ATOMASDK_BEARER_AUTH ||
569
+ settings . ATOMASDK_BEARER_AUTH
570
+ ) ;
561
571
case ModelProviderName . NVIDIA :
562
572
return (
563
573
character . settings ?. secrets ?. NVIDIA_API_KEY ||
@@ -1051,9 +1061,18 @@ export async function createAgent(
1051
1061
getSecret ( character , "PYTH_MAINNET_PROGRAM_KEY" )
1052
1062
? pythDataPlugin
1053
1063
: null ,
1054
- getSecret ( character , "OPENAI_API_KEY" ) && getSecret ( character , "ENABLE_OPEN_AI_COMMUNITY_PLUGIN" )
1064
+ getSecret ( character , "LND_TLS_CERT" ) &&
1065
+ getSecret ( character , "LND_MACAROON" ) &&
1066
+ getSecret ( character , "LND_SOCKET" )
1067
+ ? lightningPlugin
1068
+ : null ,
1069
+ getSecret ( character , "OPENAI_API_KEY" ) &&
1070
+ getSecret ( character , "ENABLE_OPEN_AI_COMMUNITY_PLUGIN" )
1055
1071
? openaiPlugin
1056
1072
: null ,
1073
+ getSecret ( character , "DEVIN_API_TOKEN" )
1074
+ ? devinPlugin
1075
+ : null ,
1057
1076
] . filter ( Boolean ) ,
1058
1077
providers : [ ] ,
1059
1078
actions : [ ] ,
@@ -1297,4 +1316,3 @@ if (
1297
1316
console . error ( "unhandledRejection" , err ) ;
1298
1317
} ) ;
1299
1318
}
1300
-
0 commit comments