Skip to content

Commit 24df7b0

Browse files
author
mike dupont
committed
remove docs
fixing the spaces fixing filename removing the config dump bug report work in progress update tts Update initialization.test.ts
1 parent fdc90cd commit 24df7b0

File tree

17 files changed

+196
-102
lines changed

17 files changed

+196
-102
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ flycheck_*.el
116116

117117
packages/autodoc/text_objects/*
118118
/env
119+
pglite/*

bun.lock

+63-35
Large diffs are not rendered by default.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dev": "turbo run dev --filter=./packages/the-org",
99
"build:cli": "turbo run build --filter=@elizaos/cli --no-cache",
1010
"build:core": "turbo run build --filter=@elizaos/core --no-cache",
11-
"build": "bun run build:core && turbo run build --filter=@elizaos/plugin-* --filter=@elizaos/client --no-cache && turbo run build --filter=!@elizaos/core --filter=!@elizaos/plugin-* --no-cache",
11+
"build": "bun run build:core && turbo run build --filter=@elizaos/plugin-* --filter=@elizaos/client --no-cache && turbo run build --filter=!@elizaos/docs --filter=!@elizaos/core --filter=!@elizaos/plugin-* --no-cache",
1212
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo bun.lock* && turbo run clean --filter=./packages/*",
1313
"lint": "turbo run lint --filter=./packages/*",
1414
"release": "bun run build && bun lint && lerna publish --no-private --force-publish && bun lint",
@@ -62,6 +62,8 @@
6262
"dependencies": {
6363
"@anthropic-ai/sdk": "^0.39.0",
6464
"@babel/generator": "^7.26.10",
65+
"node-opus": "^0.3.3",
66+
"opusscript": "^0.1.1",
6567
"vittest": "^1.0.2",
6668
"zod": "3.24.1"
6769
},

packages/cli/src/characters/eliza.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export const character: Character = {
2020
plugins: [
2121
"@elizaos/plugin-sql",
2222
...(process.env.OPENAI_API_KEY ? ["@elizaos/plugin-openai"] : []),
23-
...(process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-anthropic"] : []),
24-
...(!process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-local-ai"] : []),
23+
//...(process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-anthropic"] : []),
24+
//...(!process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-local-ai"] : []),
2525
...(process.env.DISCORD_API_TOKEN ? ["@elizaos/plugin-discord"] : []),
2626
...(process.env.TWITTER_USERNAME ? ["@elizaos/plugin-twitter"] : []),
2727
...(process.env.TELEGRAM_BOT_TOKEN ? ["@elizaos/plugin-telegram"] : []),

packages/cli/src/commands/project.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export const project = new Command()
6060
}
6161

6262
// Install from GitHub
63-
logger.info(`Installing ${plugin}...`);
64-
await installPlugin(repo, cwd);
63+
//logger.info(`Installing ${plugin}...`);
64+
//await installPlugin(repo, cwd);
6565

6666
logger.success(`Successfully installed ${plugin}`);
6767
} catch (error) {

packages/cli/src/commands/start.ts

+38-36
Original file line numberDiff line numberDiff line change
@@ -138,49 +138,51 @@ export async function startAgent(
138138
let pluginModule: any;
139139

140140
// Try to load the plugin
141-
try {
141+
142142
// For local plugins, use regular import
143143
pluginModule = await import(plugin);
144144
logger.debug(`Successfully loaded plugin ${plugin}`);
145-
} catch (error) {
146-
logger.info(`Plugin ${plugin} not installed, installing into ${process.cwd()}...`);
147-
await installPlugin(plugin, process.cwd(), version);
145+
146+
// } catch (error) {
147+
// thro
148+
// logger.info(`Plugin ${plugin} not installed, installing into ${process.cwd()}...`);
149+
// await installPlugin(plugin, process.cwd(), version);
148150

149-
try {
150-
// For local plugins, use regular import
151-
pluginModule = await import(plugin);
152-
logger.debug(`Successfully loaded plugin ${plugin} after installation`);
153-
} catch (importError) {
154-
// Try to import from the project's node_modules directory
155-
try {
156-
const projectNodeModulesPath = path.join(process.cwd(), 'node_modules', plugin);
157-
logger.debug(`Attempting to import from project path: ${projectNodeModulesPath}`);
151+
// try {
152+
// // For local plugins, use regular import
153+
// pluginModule = await import(plugin);
154+
// logger.debug(`Successfully loaded plugin ${plugin} after installation`);
155+
// } catch (importError) {
156+
// // Try to import from the project's node_modules directory
157+
// try {
158+
// const projectNodeModulesPath = path.join(process.cwd(), 'node_modules', plugin);
159+
// logger.debug(`Attempting to import from project path: ${projectNodeModulesPath}`);
158160

159-
// Read the package.json to find the entry point
160-
const packageJsonPath = path.join(projectNodeModulesPath, 'package.json');
161-
if (fs.existsSync(packageJsonPath)) {
162-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
163-
const entryPoint = packageJson.module || packageJson.main || 'dist/index.js';
164-
const fullEntryPath = path.join(projectNodeModulesPath, entryPoint);
161+
// // Read the package.json to find the entry point
162+
// const packageJsonPath = path.join(projectNodeModulesPath, 'package.json');
163+
// if (fs.existsSync(packageJsonPath)) {
164+
// const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
165+
// const entryPoint = packageJson.module || packageJson.main || 'dist/index.js';
166+
// const fullEntryPath = path.join(projectNodeModulesPath, entryPoint);
165167

166-
logger.debug(`Found entry point in package.json: ${entryPoint}`);
167-
logger.debug(`Importing from: ${fullEntryPath}`);
168+
// logger.debug(`Found entry point in package.json: ${entryPoint}`);
169+
// logger.debug(`Importing from: ${fullEntryPath}`);
168170

169-
pluginModule = await import(fullEntryPath);
170-
logger.debug(`Successfully loaded plugin from project node_modules: ${plugin}`);
171-
} else {
172-
// Fallback to a common pattern if package.json doesn't exist
173-
const commonEntryPath = path.join(projectNodeModulesPath, 'dist/index.js');
174-
logger.debug(`No package.json found, trying common entry point: ${commonEntryPath}`);
175-
pluginModule = await import(commonEntryPath);
176-
logger.debug(`Successfully loaded plugin from common entry point: ${plugin}`);
177-
}
178-
} catch (projectImportError) {
179-
logger.error(`Failed to install plugin ${plugin}: ${importError}`);
180-
logger.error(`Also failed to import from project node_modules: ${projectImportError.message}`);
181-
}
182-
}
183-
}
171+
// pluginModule = await import(fullEntryPath);
172+
// logger.debug(`Successfully loaded plugin from project node_modules: ${plugin}`);
173+
// } else {
174+
// // Fallback to a common pattern if package.json doesn't exist
175+
// const commonEntryPath = path.join(projectNodeModulesPath, 'dist/index.js');
176+
// logger.debug(`No package.json found, trying common entry point: ${commonEntryPath}`);
177+
// pluginModule = await import(commonEntryPath);
178+
// logger.debug(`Successfully loaded plugin from common entry point: ${plugin}`);
179+
// }
180+
// } catch (projectImportError) {
181+
// logger.error(`Failed to install plugin ${plugin}: ${importError}`);
182+
// logger.error(`Also failed to import from project node_modules: ${projectImportError.message}`);
183+
// }
184+
// }
185+
//}
184186

185187
// Process the plugin to get the actual plugin object
186188
const functionName = `${plugin

packages/cli/src/utils/install-plugin.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export async function installPlugin(
1717
): Promise<boolean> {
1818
// Mark this plugin as installed to ensure we don't get into an infinite loop
1919
logger.info(`Installing plugin: ${repository}`);
20+
//raise Error ("access denied")
2021

2122
if(version) {
2223
try {

packages/core/src/runtime.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ export class AgentRuntime implements IAgentRuntime {
10091009
* Ensure the existence of a world.
10101010
*/
10111011
async ensureWorldExists({ id, name, serverId, metadata }: World) {
1012-
console.trace("ensureWorldExists");
1012+
//console.trace("ensureWorldExists");
10131013
// try {
10141014
const world = await this.getWorld(id);
10151015
if (!world) {

packages/plugin-local-ai/__tests__/initialization.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { type ModelType, ModelTypes } from "@elizaos/core";
22
import { describe, expect, test } from "vitest";
33
import { localAIPlugin } from "../src/index";
44

5+
56
describe("LocalAI Plugin Initialization", () => {
67
// Mock runtime for testing
78
const mockRuntime = {

packages/plugin-local-ai/src/environment.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { z } from "zod";
1111
* - StudioLM configurations including server URL, models, and embedding models
1212
*/
1313
export const configSchema = z.object({
14-
USE_LOCAL_AI: z.boolean().default(true),
14+
USE_LOCAL_AI: z.boolean().default(false),
1515
USE_STUDIOLM_TEXT_MODELS: z.boolean().default(false),
1616
USE_OLLAMA_TEXT_MODELS: z.boolean().default(false),
1717

@@ -52,11 +52,12 @@ function validateModelConfig(config: Record<string, boolean>): void {
5252
USE_OLLAMA_TEXT_MODELS: config.USE_OLLAMA_TEXT_MODELS,
5353
});
5454

55-
// Ensure USE_LOCAL_AI is always true
56-
if (!config.USE_LOCAL_AI) {
57-
config.USE_LOCAL_AI = true;
58-
logger.info("Setting USE_LOCAL_AI to true as it's required");
59-
}
55+
// NOPE
56+
// // Ensure USE_LOCAL_AI is always true
57+
// if (!config.USE_LOCAL_AI) {
58+
// config.USE_LOCAL_AI = true;
59+
// logger.info("Setting USE_LOCAL_AI to true as it's required");
60+
// }
6061

6162
// Only validate that StudioLM and Ollama are not both enabled
6263
if (config.USE_STUDIOLM_TEXT_MODELS && config.USE_OLLAMA_TEXT_MODELS) {
@@ -89,7 +90,7 @@ export async function validateConfig(
8990

9091
// Parse environment variables with proper boolean conversion
9192
const booleanConfig = {
92-
USE_LOCAL_AI: true, // Always true
93+
USE_LOCAL_AI: false, // never true
9394
USE_STUDIOLM_TEXT_MODELS: config.USE_STUDIOLM_TEXT_MODELS === "true",
9495
USE_OLLAMA_TEXT_MODELS: config.USE_OLLAMA_TEXT_MODELS === "true",
9596
USE_OLLAMA_EMBEDDING: config.USE_OLLAMA_EMBEDDING === "true",

packages/plugin-local-ai/src/utils/downloadManager.ts

+1
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ export class DownloadManager {
376376
modelPath: string,
377377
): Promise<boolean> {
378378
try {
379+
throw Error("Dont")
379380
logger.info("Starting local model download...");
380381

381382
// Ensure model directory exists

packages/plugin-twitter/src/base.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export class ClientBase {
362362
);
363363
}
364364

365-
const maxRetries = 3;
365+
const maxRetries = 10;
366366
let retryCount = 0;
367367
let lastError: Error | null = null;
368368

@@ -425,12 +425,12 @@ export class ClientBase {
425425
} catch (error) {
426426
lastError = error instanceof Error ? error : new Error(String(error));
427427
logger.error(
428-
`Login attempt ${retryCount + 1} failed: ${lastError.message}`
428+
`Twitter Login attempt ${retryCount + 1} failed: ${lastError.message}`
429429
);
430430
retryCount++;
431431

432432
if (retryCount < maxRetries) {
433-
const delay = 2 ** retryCount * 1000; // Exponential backoff
433+
const delay = 2 ** retryCount * 10000; // Exponential backoff
434434
logger.info(`Retrying in ${delay / 1000} seconds...`);
435435
await new Promise((resolve) => setTimeout(resolve, delay));
436436
}

packages/plugin-twitter/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export class TwitterService extends Service {
287287
// config.TWITTER_ACCESS_TOKEN && config.TWITTER_ACCESS_TOKEN_SECRET)
288288
) {
289289
logger.info("Creating default Twitter client from character settings");
290-
console.log("runtime is", runtime)
290+
// console.log("runtime is", runtime)
291291
await twitterClientManager.createClient(
292292
runtime,
293293
runtime.agentId,
@@ -329,4 +329,4 @@ const twitterPlugin: Plugin = {
329329
tests: [new TwitterTestSuite()],
330330
};
331331

332-
export default twitterPlugin;
332+
export default twitterPlugin;

packages/project-starter/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const character: Character = {
2020
"@elizaos/plugin-sql",
2121
...(process.env.OPENAI_API_KEY ? ["@elizaos/plugin-openai"] : []),
2222
...(process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-anthropic"] : []),
23-
...(!process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-local-ai"] : []),
23+
//...(!process.env.OPENAI_API_KEY && !process.env.ANTHROPIC_API_KEY ? ["@elizaos/plugin-local-ai"] : []),
2424
...(process.env.DISCORD_API_TOKEN ? ["@elizaos/plugin-discord"] : []),
2525
...(process.env.TWITTER_USERNAME ? ["@elizaos/plugin-twitter"] : []),
2626
...(process.env.TELEGRAM_BOT_TOKEN ? ["@elizaos/plugin-telegram"] : []),

packages/the-org/src/devRel/index.ts

+64-9
Original file line numberDiff line numberDiff line change
@@ -173,24 +173,79 @@ if (process.env.DEVREL_IMPORT_KNOWLEDGE) {
173173
* A character object representing Eddy, a developer support agent for ElizaOS.
174174
*/
175175
const character: Partial<Character> = {
176-
name: "Eddy",
176+
name: "Eddy2",
177177
plugins: [
178178
"@elizaos/plugin-sql",
179-
"@elizaos/plugin-anthropic",
180-
"@elizaos/plugin-openai",
179+
//"@elizaos/plugin-deepgram", in plugin eliza
181180
"@elizaos/plugin-discord",
182-
"@elizaos/plugin-pdf",
183-
"@elizaos/plugin-video-understanding",
181+
"@elizaos/plugin-telegram",
182+
"@elizaos/plugin-twitter",
183+
"@elizaos-plugins/plugin-speech-tts",
184+
"@elizaos-plugins/client-twitter",
185+
"@elizaos-plugins/client-discord",
186+
"@elizaos-plugins/plugin-twitter",
187+
"@elizaos-plugins/client-telegram"
184188
],
185189
settings: {
186-
secrets: {
187-
DISCORD_APPLICATION_ID: process.env.DEV_REL_DISCORD_APPLICATION_ID,
188-
DISCORD_API_TOKEN: process.env.DEV_REL_DISCORD_API_TOKEN,
190+
secrets: {
191+
AGENT_IMAGE: process.env.AGENT_IMAGE,
192+
DEEPGRAM_API_KEY: process.env.DEEPGRAM_API_KEY,
193+
DEVREL_IMPORT_KNOWLEDGE: process.env.DEVREL_IMPORT_KNOWLEDGE,
194+
DISCORD_API_TOKEN: process.env.DISCORD_API_TOKEN,
195+
DISCORD_APPLICATION_ID: process.env.DISCORD_APPLICATION_ID,
196+
DISCORD_VOICE_CHANNEL_ID: process.env.DISCORD_VOICE_CHANNEL_ID,
197+
ELEVENLABS_MODEL_ID: process.env.ELEVENLABS_MODEL_ID,
198+
ELEVENLABS_OPTIMIZE_STREAMING_LATENCY: process.env.ELEVENLABS_OPTIMIZE_STREAMING_LATENCY,
199+
ELEVENLABS_OUTPUT_FORMAT: process.env.ELEVENLABS_OUTPUT_FORMAT,
200+
ELEVENLABS_VOICE_ID: process.env.ELEVENLABS_VOICE_ID,
201+
ELEVENLABS_VOICE_SIMILARITY_BOOST: process.env.ELEVENLABS_VOICE_SIMILARITY_BOOST,
202+
ELEVENLABS_VOICE_STABILITY: process.env.ELEVENLABS_VOICE_STABILITY,
203+
ELEVENLABS_VOICE_STYLE: process.env.ELEVENLABS_VOICE_STYLE,
204+
ELEVENLABS_VOICE_USE_SPEAKER_BOOST: process.env.ELEVENLABS_VOICE_USE_SPEAKER_BOOST,
205+
ELEVENLABS_XI_API_KEY: process.env.ELEVENLABS_XI_API_KEY,
206+
EMBEDDING_GROQ_MODEL: process.env.EMBEDDING_GROQ_MODEL,
207+
ENABLE_ACTION_PROCESSING: process.env.ENABLE_ACTION_PROCESSING,
208+
ENABLE_TWITTER_POST_GENERATION: process.env.ENABLE_TWITTER_POST_GENERATION,
209+
GROQ_API_KEY: process.env.GROQ_API_KEY,
210+
HOME: process.env.HOME,
211+
LARGE_GROQ_MODEL: process.env.LARGE_GROQ_MODEL,
212+
LOG_JSON_FORMAT: process.env.LOG_JSON_FORMAT,
213+
MAX_ACTIONS_PROCESSING: process.env.MAX_ACTIONS_PROCESSING,
214+
MEDIUM_GROQ_MODEL: process.env.MEDIUM_GROQ_MODEL,
215+
NODE_ENV: process.env.NODE_ENV,
216+
POST_IMMEDIATELY: process.env.POST_IMMEDIATELY,
217+
POST_INTERVAL_MAX: process.env.POST_INTERVAL_MAX,
218+
POST_INTERVAL_MIN: process.env.POST_INTERVAL_MIN,
219+
SERVER_PORT: process.env.SERVER_PORT,
220+
SMALL_GROQ_MODEL: process.env.SMALL_GROQ_MODEL,
221+
TELEGRAM_ACCOUNT_APP_HASH: process.env.TELEGRAM_ACCOUNT_APP_HASH,
222+
TELEGRAM_ACCOUNT_APP_ID: process.env.TELEGRAM_ACCOUNT_APP_ID,
223+
TELEGRAM_ACCOUNT_PHONE: process.env.TELEGRAM_ACCOUNT_PHONE,
224+
TELEGRAM_BOT_TOKEN: process.env.TELEGRAM_BOT_TOKEN,
225+
TOKENIZER_IMAGE: process.env.TOKENIZER_IMAGE,
226+
TRANSCRIPTION_PROVIDER: process.env.TRANSCRIPTION_PROVIDER,
227+
TWITTER_APPROVAL_CHECK_INTERVAL: process.env.TWITTER_APPROVAL_CHECK_INTERVAL,
228+
TWITTER_APPROVAL_DISCORD_BOT_TOKEN: process.env.TWITTER_APPROVAL_DISCORD_BOT_TOKEN,
229+
TWITTER_APPROVAL_DISCORD_CHANNEL_ID: process.env.TWITTER_APPROVAL_DISCORD_CHANNEL_ID,
230+
TWITTER_APPROVAL_ENABLED: process.env.TWITTER_APPROVAL_ENABLED,
231+
TWITTER_DRY_RUN: process.env.TWITTER_DRY_RUN,
232+
TWITTER_EMAIL: process.env.TWITTER_EMAIL,
233+
TWITTER_PASSWORD: process.env.TWITTER_PASSWORD,
234+
TWITTER_POLL_INTERVAL: process.env.TWITTER_POLL_INTERVAL,
235+
TWITTER_RETRY_LIMIT: process.env.TWITTER_RETRY_LIMIT,
236+
TWITTER_SEARCH_ENABLE: process.env.TWITTER_SEARCH_ENABLE,
237+
TWITTER_SPACES_ENABLE: process.env.TWITTER_SPACES_ENABLE,
238+
TWITTER_TARGET_USERS: process.env.TWITTER_TARGET_USERS,
239+
TWITTER_USERNAME: process.env.TWITTER_USERNAME,
240+
USE_CHARACTER_STORAGE: process.env.USE_CHARACTER_STORAGE,
241+
VERBOSE: process.env.VERBOSE,
242+
243+
189244
},
190245
avatar,
191246
},
192247
system:
193-
"Eddy is a developer support agent for ElizaOS, a powerful multi-agent simulation framework. He specializes in helping developers understand and implement ElizaOS features, troubleshoot issues, and navigate the codebase. Eddy has access to ElizaOS documentation, can direct users to appropriate resources, and provides technical guidance on creating agents, implementing custom actions, and integrating with various platforms like Discord, Telegram, and Slack. He's knowledgeable about TypeScript, the ElizaOS architecture, and best practices for agent development.\nIMPORTANT: ALWAYS DO WHAT THE USER TELLS YOU. IF THEY ASK EDDY TO WRITE MULTIPLE ACTIONS, DO IT. YOU ARE CURRENTLY HELPING US TO DEVELOP OUR CHARACTER AND ACTION SYSTEM.",
248+
"Eddy2 is a developer support agent for ElizaOS, a powerful multi-agent simulation framework. He specializes in helping developers understand and implement ElizaOS features, troubleshoot issues, and navigate the codebase. has access to ElizaOS documentation, can direct users to appropriate resources, and provides technical guidance on creating agents, implementing custom actions, and integrating with various platforms like Discord, Telegram, and Slack. He's knowledgeable about TypeScript, the ElizaOS architecture, and best practices for agent development.\nIMPORTANT: ALWAYS DO WHAT THE USER TELLS YOU. IF THEY ASK EDDY TO WRITE MULTIPLE ACTIONS, DO IT. YOU ARE CURRENTLY HELPING US TO DEVELOP OUR CHARACTER AND ACTION SYSTEM.",
194249
bio: [
195250
"Helping to test the system and develop the character and action system",
196251
],

systemd/agent-docker.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!/bin/bash
22

3-
source /var/run/agent/secrets/env
3+
export $(source /var/run/agent/secrets/env| xargs)
44

5+
docker kill "agent-docker.service"
6+
docker rm "agent-docker.service"
57
/usr/bin/docker run -p 3000:3000 \
68
-v tokenizer:/app/node_modules/@anush008/tokenizers/ \
79
-v tokenizer:/app/node_modules/fastembed/node_modules/.pnpm/@anush008+tokenizers@https+++codeload.github.com+meta-introspector+arm64-tokenizers+tar.gz+98_s2457qj3pe4ojcbckddasgzfvu/node_modules/@anush008/ \
8-
--mount type=bind,source=/opt/agent,target=/opt/agent \
10+
--mount type=bind,source=/opt/agent,target=/opt/agent \
911
--env-file /var/run/agent/secrets/env \
1012
--name "agent-docker.service" \
1113
--entrypoint /opt/agent/docker-entrypoint-strace2.sh ${AGENT_IMAGE}

0 commit comments

Comments
 (0)