Skip to content

Commit 533a5f8

Browse files
authored
Merge branch 'develop' into solana_transaction_more_lenient
2 parents 6f0d546 + 0e345ec commit 533a5f8

File tree

101 files changed

+6059
-752
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+6059
-752
lines changed

.env.example

+159-158
Large diffs are not rendered by default.

agent/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@elizaos/plugin-binance": "workspace:*",
3939
"@elizaos/plugin-avail": "workspace:*",
4040
"@elizaos/plugin-bootstrap": "workspace:*",
41+
"@elizaos/plugin-dominos": "workspace:*",
4142
"@elizaos/plugin-cosmos": "workspace:*",
4243
"@elizaos/plugin-intiface": "workspace:*",
4344
"@elizaos/plugin-coinbase": "workspace:*",

agent/src/index.ts

+16-10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { SlackClientInterface } from "@elizaos/client-slack";
1010
import { TelegramClientInterface } from "@elizaos/client-telegram";
1111
import { TwitterClientInterface } from "@elizaos/client-twitter";
1212
// import { ReclaimAdapter } from "@elizaos/plugin-reclaim";
13+
import { DirectClient } from "@elizaos/client-direct";
1314
import {
1415
AgentRuntime,
1516
CacheManager,
@@ -31,11 +32,6 @@ import {
3132
validateCharacterConfig,
3233
} from "@elizaos/core";
3334
import { zgPlugin } from "@elizaos/plugin-0g";
34-
35-
import { bootstrapPlugin } from "@elizaos/plugin-bootstrap";
36-
import createGoatPlugin from "@elizaos/plugin-goat";
37-
// import { intifacePlugin } from "@elizaos/plugin-intiface";
38-
import { DirectClient } from "@elizaos/client-direct";
3935
import { ThreeDGenerationPlugin } from "@elizaos/plugin-3d-generation";
4036
import { abstractPlugin } from "@elizaos/plugin-abstract";
4137
import { alloraPlugin } from "@elizaos/plugin-allora";
@@ -44,6 +40,7 @@ import { artheraPlugin } from "@elizaos/plugin-arthera";
4440
import { availPlugin } from "@elizaos/plugin-avail";
4541
import { avalanchePlugin } from "@elizaos/plugin-avalanche";
4642
import { binancePlugin } from "@elizaos/plugin-binance";
43+
import { bootstrapPlugin } from "@elizaos/plugin-bootstrap";
4744
import {
4845
advancedTradePlugin,
4946
coinbaseCommercePlugin,
@@ -62,37 +59,37 @@ import { evmPlugin } from "@elizaos/plugin-evm";
6259
import { flowPlugin } from "@elizaos/plugin-flow";
6360
import { fuelPlugin } from "@elizaos/plugin-fuel";
6461
import { genLayerPlugin } from "@elizaos/plugin-genlayer";
62+
import createGoatPlugin from "@elizaos/plugin-goat";
6563
import { imageGenerationPlugin } from "@elizaos/plugin-image-generation";
6664
import { multiversxPlugin } from "@elizaos/plugin-multiversx";
6765
import { nearPlugin } from "@elizaos/plugin-near";
6866
import { nftGenerationPlugin } from "@elizaos/plugin-nft-generation";
6967
import { createNodePlugin } from "@elizaos/plugin-node";
7068
import { obsidianPlugin } from "@elizaos/plugin-obsidian";
71-
import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
7269
import { solanaPlugin } from "@elizaos/plugin-solana";
7370
import { solanaAgentkitPlguin } from "@elizaos/plugin-solana-agentkit";
74-
import { stargazePlugin } from "@elizaos/plugin-stargaze";
7571
import { storyPlugin } from "@elizaos/plugin-story";
7672
import { suiPlugin } from "@elizaos/plugin-sui";
7773
import { TEEMode, teePlugin } from "@elizaos/plugin-tee";
7874
import { teeMarlinPlugin } from "@elizaos/plugin-tee-marlin";
79-
import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
8075
import { tonPlugin } from "@elizaos/plugin-ton";
8176
import { webSearchPlugin } from "@elizaos/plugin-web-search";
8277

8378
import { giphyPlugin } from "@elizaos/plugin-giphy";
84-
import { echoChamberPlugin } from "@elizaos/plugin-echochambers";
8579
import { letzAIPlugin } from "@elizaos/plugin-letzai";
8680
import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
8781

8882
import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
83+
84+
import { OpacityAdapter } from "@elizaos/plugin-opacity";
85+
import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
86+
import { stargazePlugin } from "@elizaos/plugin-stargaze";
8987
import Database from "better-sqlite3";
9088
import fs from "fs";
9189
import net from "net";
9290
import path from "path";
9391
import { fileURLToPath } from "url";
9492
import yargs from "yargs";
95-
import { OpacityAdapter } from "@elizaos/plugin-opacity";
9693

9794
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
9895
const __dirname = path.dirname(__filename); // get the name of the directory
@@ -283,6 +280,11 @@ export function getTokenForProvider(
283280
character.settings?.secrets?.ETERNALAI_API_KEY ||
284281
settings.ETERNALAI_API_KEY
285282
);
283+
case ModelProviderName.NINETEEN_AI:
284+
return (
285+
character.settings?.secrets?.NINETEEN_AI_API_KEY ||
286+
settings.NINETEEN_AI_API_KEY
287+
);
286288
case ModelProviderName.LLAMACLOUD:
287289
case ModelProviderName.TOGETHER:
288290
return (
@@ -598,6 +600,7 @@ export async function createAgent(
598600
// character.plugins are handled when clients are added
599601
plugins: [
600602
bootstrapPlugin,
603+
dominosPlugin,
601604
getSecret(character, "CONFLUX_CORE_PRIVATE_KEY")
602605
? confluxPlugin
603606
: null,
@@ -645,6 +648,7 @@ export async function createAgent(
645648
getSecret(character, "FAL_API_KEY") ||
646649
getSecret(character, "OPENAI_API_KEY") ||
647650
getSecret(character, "VENICE_API_KEY") ||
651+
getSecret(character, "NINETEEN_AI_API_KEY") ||
648652
getSecret(character, "HEURIST_API_KEY") ||
649653
getSecret(character, "LIVEPEER_GATEWAY_URL")
650654
? imageGenerationPlugin
@@ -666,6 +670,8 @@ export async function createAgent(
666670
? webhookPlugin
667671
: null,
668672
goatPlugin,
673+
getSecret(character, "COINGECKO_API_KEY") ? coingeckoPlugin : null,
674+
getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null,
669675
getSecret(character, "ABSTRACT_PRIVATE_KEY")
670676
? abstractPlugin
671677
: null,

packages/client-discord/src/messages.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ export class MessageManager {
972972
);
973973

974974
// strip all special characters
975-
messageContent = messageContent.replace(/[^a-zA-Z0-9\s]/g, "");
975+
messageContent = messageContent.replace(/[^\p{L}\p{N}\s\-_./:?=&]/gu, "");
976976

977977
// short responses where eliza should stop talking and disengage unless mentioned again
978978
if (

packages/client-slack/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ display_information:
3535
features:
3636
app_home:
3737
home_tab_enabled: true
38-
messages_tab_enabled: false
38+
messages_tab_enabled: true
3939
messages_tab_read_only_enabled: false
4040
bot_user:
4141
display_name: eve

packages/client-twitter/src/interactions.ts

+49
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ import {
1414
stringToUuid,
1515
elizaLogger,
1616
getEmbeddingZeroVector,
17+
parsePizzaDecisionFromText,
18+
pizzaDecisionFooter,
1719
} from "@elizaos/core";
1820
import { ClientBase } from "./base";
1921
import { buildConversationThread, sendTweet, wait } from "./utils.ts";
22+
import {
23+
generateText
24+
} from "@elizaos/core";
25+
import { PizzaAPI } from "./pizza.ts";
2026

2127
export const twitterMessageHandlerTemplate =
2228
`
@@ -380,6 +386,49 @@ export class TwitterInteractionClient {
380386
this.client.saveRequestMessage(message, state);
381387
}
382388

389+
const pizzaCheck =
390+
`
391+
You are checking to see if someone is asking you to order a pizza.
392+
They should explicitly ask for a pizza order.
393+
394+
Here is the tweet they posted:
395+
${currentPost}` + pizzaDecisionFooter;
396+
397+
const pizzaCheckResponse = await generateText({
398+
runtime: this.runtime,
399+
context: pizzaCheck,
400+
modelClass: ModelClass.LARGE,
401+
});
402+
403+
console.log(
404+
"[PIZZA-GEN][INTERACTIONS CLIENT] PIZZA check response: ",
405+
pizzaCheckResponse,
406+
" ",
407+
currentPost
408+
);
409+
410+
const pizzaCheckResult = parsePizzaDecisionFromText(pizzaCheckResponse);
411+
412+
console.log(
413+
"[PIZZA-GEN][INTERACTIONS CLIENT] PIZZA check result:",
414+
pizzaCheckResult
415+
);
416+
417+
if (pizzaCheckResult === "YES") {
418+
console.log(
419+
"[PIZZA-GEN][INTERACTIONS CLIENT] PIZZA check result is YES, generating pizza order"
420+
);
421+
422+
const pizzaAPI = new PizzaAPI(this.runtime);
423+
424+
const result = await pizzaAPI.orderPizza();
425+
426+
console.log(
427+
"[PIZZA-GEN][INTERACTIONS CLIENT] Order result: ",
428+
result
429+
);
430+
}
431+
383432
// get usernames into str
384433
const validTargetUsersStr =
385434
this.client.twitterConfig.TWITTER_TARGET_USERS.join(",");

0 commit comments

Comments
 (0)