Skip to content

Commit

Permalink
integrate goat plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Dec 1, 2024
1 parent 8d3ed88 commit 9abeb1c
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 200 deletions.
1 change: 1 addition & 0 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@ai16z/plugin-node": "workspace:*",
"@ai16z/plugin-solana": "workspace:*",
"@ai16z/plugin-0g": "workspace:*",
"@ai16z/plugin-goat": "workspace:*",
"@ai16z/plugin-starknet": "workspace:*",
"@ai16z/plugin-icp": "workspace:*",
"@ai16z/plugin-tee": "workspace:*",
Expand Down
20 changes: 2 additions & 18 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
validateCharacterConfig,
} from "@ai16z/eliza";
import { zgPlugin } from "@ai16z/plugin-0g";
import { goatPlugin } from "@ai16z/plugin-goat";
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
// import { buttplugPlugin } from "@ai16z/plugin-buttplug";
import {
Expand Down Expand Up @@ -90,24 +91,6 @@ export async function loadCharacters(
.map((filePath) => filePath.trim());
const loadedCharacters = [];

// Add logging here
elizaLogger.info("Character loading details:", {
characterPaths,
cwd: process.cwd(),
dirname: __dirname,
fullPath: path.resolve(
process.cwd(),
"characters/8bitoracle.laozi.character.json"
),
exists: fs.existsSync(
path.resolve(
process.cwd(),
"characters/8bitoracle.laozi.character.json"
)
),
dirContents: fs.readdirSync(process.cwd()),
});

if (characterPaths?.length > 0) {
for (const characterPath of characterPaths) {
let content = null;
Expand Down Expand Up @@ -393,6 +376,7 @@ export function createAgent(
? [coinbaseMassPaymentsPlugin, tradePlugin]
: []),
getSecret(character, "WALLET_SECRET_SALT") ? teePlugin : null,
getSecret(character, "ALCHEMY_API_KEY") ? goatPlugin : null,
].filter(Boolean),
providers: [],
actions: [],
Expand Down
8 changes: 5 additions & 3 deletions packages/plugin-goat/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../../tsconfig.json",
"extends": "../core/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src",
"declaration": true
},
"include": ["src"]
}
"include": [
"src"
]
}
125 changes: 68 additions & 57 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9abeb1c

Please sign in to comment.