Skip to content

Commit d38bfcd

Browse files
committed
working!
1 parent 2d4f961 commit d38bfcd

18 files changed

+1429
-93
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@
4343
},
4444
"[shellscript]": {
4545
"editor.defaultFormatter": "foxundermoon.shell-format"
46-
}
46+
},
47+
"terminal.integrated.scrollback": 100000
4748
}

agent/package.json

+61-60
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,63 @@
11
{
2-
"name": "@elizaos/agent",
3-
"version": "0.1.7-alpha.1",
4-
"main": "src/index.ts",
5-
"type": "module",
6-
"scripts": {
7-
"start": "node --loader ts-node/esm src/index.ts",
8-
"dev": "node --loader ts-node/esm src/index.ts",
9-
"check-types": "tsc --noEmit"
10-
},
11-
"nodemonConfig": {
12-
"watch": [
13-
"src",
14-
"../core/dist"
15-
],
16-
"ext": "ts,json",
17-
"exec": "node --enable-source-maps --loader ts-node/esm src/index.ts"
18-
},
19-
"dependencies": {
20-
"@elizaos/adapter-postgres": "workspace:*",
21-
"@elizaos/adapter-redis": "workspace:*",
22-
"@elizaos/adapter-sqlite": "workspace:*",
23-
"@elizaos/client-auto": "workspace:*",
24-
"@elizaos/client-direct": "workspace:*",
25-
"@elizaos/client-discord": "workspace:*",
26-
"@elizaos/client-farcaster": "workspace:*",
27-
"@elizaos/client-lens": "workspace:*",
28-
"@elizaos/client-telegram": "workspace:*",
29-
"@elizaos/client-twitter": "workspace:*",
30-
"@elizaos/client-slack": "workspace:*",
31-
"@elizaos/core": "workspace:*",
32-
"@elizaos/plugin-0g": "workspace:*",
33-
"@elizaos/plugin-aptos": "workspace:*",
34-
"@elizaos/plugin-bootstrap": "workspace:*",
35-
"@elizaos/plugin-intiface": "workspace:*",
36-
"@elizaos/plugin-coinbase": "workspace:*",
37-
"@elizaos/plugin-conflux": "workspace:*",
38-
"@elizaos/plugin-evm": "workspace:*",
39-
"@elizaos/plugin-flow": "workspace:*",
40-
"@elizaos/plugin-story": "workspace:*",
41-
"@elizaos/plugin-goat": "workspace:*",
42-
"@elizaos/plugin-icp": "workspace:*",
43-
"@elizaos/plugin-image-generation": "workspace:*",
44-
"@elizaos/plugin-nft-generation": "workspace:*",
45-
"@elizaos/plugin-node": "workspace:*",
46-
"@elizaos/plugin-solana": "workspace:*",
47-
"@elizaos/plugin-starknet": "workspace:*",
48-
"@elizaos/plugin-ton": "workspace:*",
49-
"@elizaos/plugin-sui": "workspace:*",
50-
"@elizaos/plugin-tee": "workspace:*",
51-
"@elizaos/plugin-multiversx": "workspace:*",
52-
"@elizaos/plugin-near": "workspace:*",
53-
"@elizaos/plugin-zksync-era": "workspace:*",
54-
"readline": "1.3.0",
55-
"ws": "8.18.0",
56-
"yargs": "17.7.2"
57-
},
58-
"devDependencies": {
59-
"ts-node": "10.9.2",
60-
"tsup": "8.3.5"
61-
}
2+
"name": "@elizaos/agent",
3+
"version": "0.1.7-alpha.1",
4+
"main": "src/index.ts",
5+
"type": "module",
6+
"scripts": {
7+
"start": "node --loader ts-node/esm src/index.ts",
8+
"dev": "node --loader ts-node/esm src/index.ts",
9+
"check-types": "tsc --noEmit"
10+
},
11+
"nodemonConfig": {
12+
"watch": [
13+
"src",
14+
"../core/dist"
15+
],
16+
"ext": "ts,json",
17+
"exec": "node --enable-source-maps --loader ts-node/esm src/index.ts"
18+
},
19+
"dependencies": {
20+
"@elizaos/adapter-postgres": "workspace:*",
21+
"@elizaos/adapter-redis": "workspace:*",
22+
"@elizaos/adapter-sqlite": "workspace:*",
23+
"@elizaos/client-auto": "workspace:*",
24+
"@elizaos/client-direct": "workspace:*",
25+
"@elizaos/client-discord": "workspace:*",
26+
"@elizaos/client-farcaster": "workspace:*",
27+
"@elizaos/client-lens": "workspace:*",
28+
"@elizaos/client-telegram": "workspace:*",
29+
"@elizaos/client-twitter": "workspace:*",
30+
"@elizaos/client-slack": "workspace:*",
31+
"@elizaos/core": "workspace:*",
32+
"@elizaos/plugin-0g": "workspace:*",
33+
"@elizaos/plugin-aptos": "workspace:*",
34+
"@elizaos/plugin-bootstrap": "workspace:*",
35+
"@elizaos/plugin-intiface": "workspace:*",
36+
"@elizaos/plugin-coinbase": "workspace:*",
37+
"@elizaos/plugin-conflux": "workspace:*",
38+
"@elizaos/plugin-evm": "workspace:*",
39+
"@elizaos/plugin-flow": "workspace:*",
40+
"@elizaos/plugin-story": "workspace:*",
41+
"@elizaos/plugin-goat": "workspace:*",
42+
"@elizaos/plugin-icp": "workspace:*",
43+
"@elizaos/plugin-image-generation": "workspace:*",
44+
"@elizaos/plugin-nft-generation": "workspace:*",
45+
"@elizaos/plugin-node": "workspace:*",
46+
"@elizaos/plugin-solana": "workspace:*",
47+
"@elizaos/plugin-starknet": "workspace:*",
48+
"@elizaos/plugin-ton": "workspace:*",
49+
"@elizaos/plugin-sui": "workspace:*",
50+
"@elizaos/plugin-tee": "workspace:*",
51+
"@elizaos/plugin-multiversx": "workspace:*",
52+
"@elizaos/plugin-near": "workspace:*",
53+
"@elizaos/plugin-code-assistant": "workspace:*",
54+
"@elizaos/plugin-zksync-era": "workspace:*",
55+
"readline": "1.3.0",
56+
"ws": "8.18.0",
57+
"yargs": "17.7.2"
58+
},
59+
"devDependencies": {
60+
"ts-node": "10.9.2",
61+
"tsup": "8.3.5"
62+
}
6263
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"build": "turbo run build --filter=!eliza-docs",
66
"build-docker": "turbo run build",
77
"cleanstart": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && pnpm --filter \"@elizaos/agent\" start --isRoot",
8+
"cleandev": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && pnpm --filter \"@elizaos/agent\" run dev --isRoot",
89
"cleanstart:debug": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && cross-env NODE_ENV=development VERBOSE=true DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot",
910
"start": "pnpm --filter \"@elizaos/agent\" start --isRoot",
1011
"start:client": "pnpm --dir client dev",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import eslintGlobalConfig from "../../eslint.config.mjs";
2+
3+
export default [...eslintGlobalConfig];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "@elizaos/plugin-code-assistant",
3+
"version": "0.1.7-alpha.1",
4+
"main": "dist/index.js",
5+
"type": "module",
6+
"types": "dist/index.d.ts",
7+
"dependencies": {
8+
"@elizaos/core": "workspace:*",
9+
"tsup": "8.3.5"
10+
},
11+
"scripts": {
12+
"build": "tsup --format esm --dts",
13+
"dev": "tsup --format esm --dts --watch",
14+
"lint": "eslint --fix --cache ."
15+
},
16+
"peerDependencies": {
17+
"whatwg-url": "7.1.0"
18+
}
19+
}

packages/plugin-code-assistant/src/actions/codeAssistant.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class KnowledgeManager {
6767
}
6868
const data = await response.json();
6969
elizaLogger.log(
70-
"GitHub API Response:",
71-
JSON.stringify(data, null, 2)
70+
"GitHub API Response:"
71+
//JSON.stringify(data, null, 2)
7272
);
7373
return data;
7474
} catch (error) {
@@ -210,7 +210,7 @@ export const codeAssistantAction: Action = {
210210
// Initialize knowledge base if not already done
211211
try {
212212
await Promise.all([
213-
knowledgeManager.fetchDiscordKnowledge(),
213+
//knowledgeManager.fetchDiscordKnowledge(),
214214
knowledgeManager.fetchGithubKnowledge(),
215215
]);
216216
} catch (error) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
import {
2+
ActionExample,
3+
IAgentRuntime,
4+
Memory,
5+
type Action,
6+
} from "@elizaos/core";
7+
8+
export const noneAction: Action = {
9+
name: "NONE",
10+
similes: [
11+
"NO_ACTION",
12+
"NO_RESPONSE",
13+
"NO_REACTION",
14+
"RESPONSE",
15+
"REPLY",
16+
"DEFAULT",
17+
],
18+
validate: async (_runtime: IAgentRuntime, _message: Memory) => {
19+
return true;
20+
},
21+
description:
22+
"Respond but perform no additional action. This is the default if the agent is speaking and not doing anything additional.",
23+
handler: async (
24+
_runtime: IAgentRuntime,
25+
_message: Memory
26+
): Promise<boolean> => {
27+
return true;
28+
},
29+
examples: [
30+
[
31+
{
32+
user: "{{user1}}",
33+
content: { text: "Hey whats up" },
34+
},
35+
{
36+
user: "{{user2}}",
37+
content: { text: "oh hey", action: "NONE" },
38+
},
39+
],
40+
41+
[
42+
{
43+
user: "{{user1}}",
44+
content: {
45+
text: "did u see some faster whisper just came out",
46+
},
47+
},
48+
{
49+
user: "{{user2}}",
50+
content: {
51+
text: "yeah but its a pain to get into node.js",
52+
action: "NONE",
53+
},
54+
},
55+
],
56+
[
57+
{
58+
user: "{{user1}}",
59+
content: {
60+
text: "the things that were funny 6 months ago are very cringe now",
61+
action: "NONE",
62+
},
63+
},
64+
{
65+
user: "{{user2}}",
66+
content: {
67+
text: "lol true",
68+
action: "NONE",
69+
},
70+
},
71+
{
72+
user: "{{user1}}",
73+
content: { text: "too real haha", action: "NONE" },
74+
},
75+
],
76+
[
77+
{
78+
user: "{{user1}}",
79+
content: { text: "gotta run", action: "NONE" },
80+
},
81+
{
82+
user: "{{user2}}",
83+
content: { text: "Okay, ttyl", action: "NONE" },
84+
},
85+
{
86+
user: "{{user1}}",
87+
content: { text: "", action: "IGNORE" },
88+
},
89+
],
90+
91+
[
92+
{
93+
user: "{{user1}}",
94+
content: { text: "heyyyyyy", action: "NONE" },
95+
},
96+
{
97+
user: "{{user2}}",
98+
content: { text: "whats up long time no see" },
99+
},
100+
{
101+
user: "{{user1}}",
102+
content: {
103+
text: "chillin man. playing lots of fortnite. what about you",
104+
action: "NONE",
105+
},
106+
},
107+
],
108+
109+
[
110+
{
111+
user: "{{user1}}",
112+
content: { text: "u think aliens are real", action: "NONE" },
113+
},
114+
{
115+
user: "{{user2}}",
116+
content: { text: "ya obviously", action: "NONE" },
117+
},
118+
],
119+
120+
[
121+
{
122+
user: "{{user1}}",
123+
content: { text: "drop a joke on me", action: "NONE" },
124+
},
125+
{
126+
user: "{{user2}}",
127+
content: {
128+
text: "why dont scientists trust atoms cuz they make up everything lmao",
129+
action: "NONE",
130+
},
131+
},
132+
{
133+
user: "{{user1}}",
134+
content: { text: "haha good one", action: "NONE" },
135+
},
136+
],
137+
138+
[
139+
{
140+
user: "{{user1}}",
141+
content: {
142+
text: "hows the weather where ur at",
143+
action: "NONE",
144+
},
145+
},
146+
{
147+
user: "{{user2}}",
148+
content: { text: "beautiful all week", action: "NONE" },
149+
},
150+
],
151+
] as ActionExample[][],
152+
} as Action;

0 commit comments

Comments
 (0)