Skip to content

Commit b9a9c33

Browse files
authored
Merge pull request #162 from ponderingdemocritus/main
Import work and cleanup
2 parents 83106a2 + e25ce25 commit b9a9c33

33 files changed

+988
-1014
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Eliza
22

3-
<img src="./docs/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
3+
<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
44

55
_As seen powering [@DegenSpartanAI](https://x.com/degenspartanai) and [@MarcAIndreessen](https://x.com/pmairca)_
66

core/package.json

-9
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,5 @@
169169
"onnxruntime-node": "1.19.0",
170170
"@discordjs/opus": "github:discordjs/opus",
171171
"sharp": "^0.33.5"
172-
},
173-
"optionalDependencies": {
174-
"sharp": "0.33.5",
175-
"sqlite-vss-darwin-arm64": "0.1.2",
176-
"sqlite-vss-darwin-x64": "0.1.2",
177-
"sqlite-vss-linux-arm64": "^0.1.2",
178-
"sqlite-vss-linux-x64": "0.1.2",
179-
"sqlite-vss-win32-arm64": "^0.1.2",
180-
"sqlite-vss-win32-x64": "^0.1.2"
181172
}
182173
}

core/src/actions/ask_claude.ts core/src/actions/askClaude.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const claudeHandlerTemplate = `{{attachments}}
1919
2020
# Instructions: Claude, I need your help in assisting the user with their last request. Please provide a helpful, thorough response. I have no arms, so you'll have to write out any implements and take care not to omit or leave TODOs for later. Also, please don't acknowledge the request, just do it.`;
2121

22-
export default {
22+
export const askClaude: Action = {
2323
name: "ASK_CLAUDE",
2424
similes: ["CLAUDE", "CALL_CLAUDE", "ANTHROPIC", "SONNET", "OPUS"],
2525
description:

core/src/actions/continue.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Based on the following conversation, should {{agentName}} continue? YES or NO
3030
3131
Should {{agentName}} continue? ` + booleanFooter;
3232

33-
export default {
33+
export const continueAction: Action = {
3434
name: "CONTINUE",
3535
similes: ["ELABORATE", "KEEP_TALKING"],
3636
description:

core/src/actions/follow_room.ts core/src/actions/followRoom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Respond with YES if:
2424
Otherwise, respond with NO.
2525
` + booleanFooter;
2626

27-
export default {
27+
export const followRoom: Action = {
2828
name: "FOLLOW_ROOM",
2929
similes: [
3030
"FOLLOW_CHAT",

core/src/actions/ignore.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type Action,
66
} from "../core/types.ts";
77

8-
export default {
8+
export const ignore: Action = {
99
name: "IGNORE",
1010
similes: ["STOP_TALKING", "STOP_CHATTING", "STOP_CONVERSATION"],
1111
validate: async (_runtime: IAgentRuntime, _message: Memory) => {

core/src/actions/imageGeneration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "../core/types.ts";
88
import { generateCaption, generateImage } from "./imageGenerationUtils.ts";
99

10-
export default {
10+
export const imageGeneration: Action = {
1111
name: "IMAGE_GEN",
1212
similes: ["GENERATE_IMAGE", "CREATE_IMAGE", "MAKE_PICTURE"],
1313
description: "Generate an image based on a prompt",

core/src/actions/index.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
export * from "./ask_claude.ts";
2-
export * from "./follow_room.ts";
1+
export * from "./askClaude.ts";
2+
export * from "./followRoom.ts";
33
export * from "./imageGeneration.ts";
4-
export * from "./mute_room.ts";
4+
export * from "./muteRoom.ts";
55
export * from "./swap.ts";
6-
export * from "./unfollow_room.ts";
7-
export * from "./unmute_room.ts";
8-
export * from "./mute_room.ts";
6+
export * from "./unfollowRoom.ts";
7+
export * from "./unmuteRoom.ts";
8+
export * from "./muteRoom.ts";
99
export * from "./continue.ts";
10-
export * from "./follow_room.ts";
10+
export * from "./followRoom.ts";
1111
export * from "./ignore.ts";
1212
export * from "./imageGenerationUtils.ts";
1313
export * from "./pumpfun.ts";
1414
export * from "./swap.ts";
15-
export * from "./swapUtils.ts";
16-
export * from "./take_order.ts";
15+
export * from "./takeOrder.ts";
16+
export * from "./none.ts";

core/src/actions/mute_room.ts core/src/actions/muteRoom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Respond with YES if:
2525
Otherwise, respond with NO.
2626
` + booleanFooter;
2727

28-
export default {
28+
export const muteRoom: Action = {
2929
name: "MUTE_ROOM",
3030
similes: [
3131
"MUTE_CHAT",

core/src/actions/none.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type Action,
66
} from "../core/types.ts";
77

8-
export default {
8+
export const none: Action = {
99
name: "NONE",
1010
similes: [
1111
"NO_ACTION",

core/src/actions/pumpfun.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AnchorProvider } from "@coral-xyz/anchor";
2-
import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet.js";
2+
import { Wallet } from "@coral-xyz/anchor";
33
import { Connection, Keypair, PublicKey } from "@solana/web3.js";
44
import {
55
CreateTokenMetadata,
@@ -247,7 +247,7 @@ export default {
247247
} = content;
248248

249249
const privateKey = runtime.getSetting("WALLET_PRIVATE_KEY")!;
250-
const wallet = new NodeWallet(
250+
const wallet = new Wallet(
251251
Keypair.fromSecretKey(new Uint8Array(JSON.parse(privateKey)))
252252
);
253253
const connection = new Connection(settings.RPC_URL!);

core/src/actions/swap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function promptConfirmation(): Promise<boolean> {
4141
return confirmSwap;
4242
}
4343

44-
export default {
44+
export const executeSwap: Action = {
4545
name: "EXECUTE_SWAP",
4646
similes: ["SWAP_TOKENS", "TOKEN_SWAP", "TRADE_TOKENS", "EXCHANGE_TOKENS"],
4747
validate: async (runtime: IAgentRuntime, message: Memory) => {

core/src/actions/swapUtils.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ import {
77
RpcResponseAndContext,
88
SimulatedTransactionResponse,
99
TokenAmount,
10-
VersionedTransaction
10+
VersionedTransaction,
1111
} from "@solana/web3.js";
1212
import settings from "../core/settings.ts";
1313

1414
const solAddress = settings.SOL_ADDRESS;
1515
const SLIPPAGE = settings.SLIPPAGE;
16-
const connection = new Connection(settings.RPC_URL || "https://api.mainnet-beta.solana.com");
16+
const connection = new Connection(
17+
settings.RPC_URL || "https://api.mainnet-beta.solana.com"
18+
);
1719
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
1820

1921
export async function delayedCall<T>(
File renamed without changes.

core/src/actions/unfollow_room.ts core/src/actions/unfollowRoom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Respond with YES if:
2424
Otherwise, respond with NO.
2525
` + booleanFooter;
2626

27-
export default {
27+
export const unfollowRoom: Action = {
2828
name: "UNFOLLOW_ROOM",
2929
similes: [
3030
"UNFOLLOW_CHAT",

core/src/actions/unmute_room.ts core/src/actions/unmuteRoom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Respond with YES if:
2424
Otherwise, respond with NO.
2525
` + booleanFooter;
2626

27-
export default {
27+
export const unmuteRoom: Action = {
2828
name: "UNMUTE_ROOM",
2929
similes: [
3030
"UNMUTE_CHAT",

0 commit comments

Comments
 (0)