Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Dec 14, 2024
1 parent 44da564 commit 1cfe4ce
Show file tree
Hide file tree
Showing 8 changed files with 42,455 additions and 43 deletions.
27 changes: 5 additions & 22 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,24 @@ import {
} from "@ai16z/plugin-coinbase";
import { confluxPlugin } from "@ai16z/plugin-conflux";
import { evmPlugin } from "@ai16z/plugin-evm";
import { storyPlugin } from "@ai16z/plugin-story";
import { flowPlugin } from "@ai16z/plugin-flow";
import { imageGenerationPlugin } from "@ai16z/plugin-image-generation";
import { multiversxPlugin } from "@ai16z/plugin-multiversx";
import { nearPlugin } from "@ai16z/plugin-near";
import { nftGenerationPlugin } from "@ai16z/plugin-nft-generation";
import { createNodePlugin } from "@ai16z/plugin-node";
import { solanaPlugin } from "@ai16z/plugin-solana";
<<<<<<< HEAD
import { suiPlugin } from "@ai16z/plugin-sui";
import { TEEMode, teePlugin } from "@ai16z/plugin-tee";
import { tonPlugin } from "@ai16z/plugin-ton";
import { zksyncEraPlugin } from "@ai16z/plugin-zksync-era";
import {
nftGenerationPlugin,
createNFTApiRouter,
} from "@ai16z/plugin-nft-generation";
import { suiPlugin } from "@ai16z/plugin-sui";
=======
import { aptosPlugin, TransferAptosToken } from "@ai16z/plugin-aptos";
import { flowPlugin } from "@ai16z/plugin-flow";
import { storyPlugin } from "@ai16z/plugin-story";
import { teePlugin } from "@ai16z/plugin-tee";
>>>>>>> 7ebab21dd8304d3af3edf980905c4ef70e52fa2d
import Database from "better-sqlite3";
import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
import yargs from "yargs";

import { mainCharacter } from "../maincharacter";

const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
const __dirname = path.dirname(__filename); // get the name of the directory

Expand Down Expand Up @@ -211,7 +200,7 @@ export async function loadCharacters(

if (loadedCharacters.length === 0) {
elizaLogger.info("No characters found, using default character");
loadedCharacters.push(mainCharacter);
loadedCharacters.push(defaultCharacter);
}

return loadedCharacters;
Expand Down Expand Up @@ -535,12 +524,9 @@ export async function createAgent(
tokenContractPlugin,
advancedTradePlugin,
]
<<<<<<< HEAD
: []),
...(teeMode !== TEEMode.OFF && walletSecretSalt
? [teePlugin, solanaPlugin]
=======
>>>>>>> 7ebab21dd8304d3af3edf980905c4ef70e52fa2d
: []),
getSecret(character, "COINBASE_API_KEY") &&
getSecret(character, "COINBASE_PRIVATE_KEY") &&
Expand All @@ -553,14 +539,11 @@ export async function createAgent(
? flowPlugin
: null,
getSecret(character, "APTOS_PRIVATE_KEY") ? aptosPlugin : null,
<<<<<<< HEAD
getSecret(character, "MVX_PRIVATE_KEY") ? multiversxPlugin : null,
getSecret(character, "ZKSYNC_PRIVATE_KEY") ? zksyncEraPlugin : null,
getSecret(character, "TON_PRIVATE_KEY") ? tonPlugin : null,
getSecret(character, "SUI_PRIVATE_KEY") ? suiPlugin : null,
=======
getSecret(character, "STORY_PRIVATE_KEY") ? storyPlugin : null,
>>>>>>> 7ebab21dd8304d3af3edf980905c4ef70e52fa2d
].filter(Boolean),
providers: [],
actions: [],
Expand Down Expand Up @@ -645,7 +628,7 @@ const startAgents = async () => {

let charactersArg = args.characters || args.character;

let characters = [mainCharacter];
let characters = [defaultCharacter];

if (charactersArg) {
characters = await loadCharacters(charactersArg);
Expand Down
7 changes: 0 additions & 7 deletions packages/plugin-evm/src/actions/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export const transferAction = {
options: any,
callback?: HandlerCallback
) => {
<<<<<<< HEAD
try {
const walletProvider = initWalletProvider(runtime);
const action = new TransferAction(walletProvider);
Expand Down Expand Up @@ -141,12 +140,6 @@ export const transferAction = {
}
return false;
}
=======
console.log("Transfer action options:", options);
const walletProvider = new WalletProvider(runtime);
const action = new TransferAction(walletProvider);
return action.transfer(runtime, options);
>>>>>>> 7ebab21dd8304d3af3edf980905c4ef70e52fa2d
},
template: transferTemplate,
validate: async (runtime: IAgentRuntime) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-story/src/actions/attachTerms.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
composeContext,
elizaLogger,
generateObjectDEPRECATED,
generateObjectDeprecated,
HandlerCallback,
ModelClass,
type IAgentRuntime,
Expand Down Expand Up @@ -98,7 +98,7 @@ export const attachTermsAction = {
template: attachTermsTemplate,
});

const content = await generateObjectDEPRECATED({
const content = await generateObjectDeprecated({
runtime,
context: attachTermsContext,
modelClass: ModelClass.SMALL,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-story/src/actions/getAvailableLicenses.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
composeContext,
elizaLogger,
generateObjectDEPRECATED,
generateObjectDeprecated,
HandlerCallback,
ModelClass,
type IAgentRuntime,
Expand Down Expand Up @@ -114,7 +114,7 @@ export const getAvailableLicensesAction = {
: await runtime.updateRecentMessageState(state);

// Generate parameters from context
const content = await generateObjectDEPRECATED({
const content = await generateObjectDeprecated({
runtime,
context: composeContext({
state,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-story/src/actions/getIPDetails.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
composeContext,
elizaLogger,
generateObjectDEPRECATED,
generateObjectDeprecated,
HandlerCallback,
ModelClass,
type IAgentRuntime,
Expand Down Expand Up @@ -81,7 +81,7 @@ export const getIPDetailsAction = {
: await runtime.updateRecentMessageState(state);

// Generate content using template
const content = await generateObjectDEPRECATED({
const content = await generateObjectDeprecated({
runtime,
context: composeContext({ state, template: getIPDetailsTemplate }),
modelClass: ModelClass.SMALL,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-story/src/actions/licenseIP.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
composeContext,
elizaLogger,
generateObjectDEPRECATED,
generateObjectDeprecated,
HandlerCallback,
ModelClass,
type IAgentRuntime,
Expand Down Expand Up @@ -69,7 +69,7 @@ export const licenseIPAction = {
template: licenseIPTemplate,
});

const content = await generateObjectDEPRECATED({
const content = await generateObjectDeprecated({
runtime,
context: licenseIPContext,
modelClass: ModelClass.SMALL,
Expand Down
12 changes: 6 additions & 6 deletions packages/plugin-story/src/actions/registerIP.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import {
composeContext,
elizaLogger,
generateObjectDEPRECATED,
generateObjectDeprecated,
HandlerCallback,
ModelClass,
type IAgentRuntime,
type Memory,
type State,
} from "@ai16z/eliza";
import { WalletProvider } from "../providers/wallet";
import { registerIPTemplate } from "../templates";
import { RegisterIPParams } from "../types";
import pinataSDK from "@pinata/sdk";
import { RegisterIpResponse } from "@story-protocol/core-sdk";
import { createHash } from "crypto";
import pinataSDK from "@pinata/sdk";
import { uploadJSONToIPFS } from "../functions/uploadJSONToIPFS";
import { WalletProvider } from "../providers/wallet";
import { registerIPTemplate } from "../templates";
import { RegisterIPParams } from "../types";

export { registerIPTemplate };

Expand Down Expand Up @@ -96,7 +96,7 @@ export const registerIPAction = {
template: registerIPTemplate,
});

const content = await generateObjectDEPRECATED({
const content = await generateObjectDeprecated({
runtime,
context: registerIPContext,
modelClass: ModelClass.SMALL,
Expand Down
Loading

0 comments on commit 1cfe4ce

Please sign in to comment.