# ElizaOS Developer Update: Dec 1 - Dec 6, 2025

## 1. Core Framework

This week, we've completed a substantial reorganization of the ElizaOS server architecture, significantly improving performance and maintainability. The refactoring effort ([PR #6199](https://github.com/elizaos/eliza/pull/6199)) optimizes Socket.IO configuration to prevent request timeouts when multiple users are connected simultaneously.

Key improvements:
```typescript
// New Socket.IO configuration to prevent connection timeouts
const io = new Server(server, {
  cors: { origin: '*', methods: ['GET', 'POST'] },
  pingInterval: 25000,  // Reduced from default
  pingTimeout: 20000,   // Prevent hanging connections
  connectTimeout: 10000,
  transports: ['websocket', 'polling']  // Enforce transport order
});

// HTTP server timeout configuration
server.timeout = 120000;
server.keepAliveTimeout = 65000;
server.headersTimeout = 66000;
server.requestTimeout = 61000;
```

We've also restructured the codebase following clean architecture principles, moving root-level files into proper directories and adding better type definitions. All existing functionality remains backward-compatible through re-exports.

## 2. New Features

### Unified API for Serverless Environments
We've introduced a unified serverless API for Node.js environments ([PR #6201](https://github.com/elizaos/eliza/pull/6201)) that provides a streamlined way to interact with ElizaOS services:

```typescript
// Before: Multiple setup steps required
const runtime = new AgentRuntime({
  character,
  plugins,
  database: { connectionString: "..." }
});
await runtime.initialize();
const connection = await runtime.database.ensureConnection();
const memory = await runtime.createMessageMemory(...);
await runtime.messageService.handleMessage(...);

// After: Unified API with ElizaOS wrapper
const eliza = new ElizaOS({
  character,
  plugins,
  database: { connectionString: "..." }
});
await eliza.initialize();
const response = await eliza.sendMessage({
  text: "Hello world!",
  userId: "user-123"
});
```

### JWT Authentication System
A comprehensive JWT authentication system ([PR #6200](https://github.com/elizaos/eliza/pull/6200), pending merge) adds robust multi-tenant support with:

- Priority-based JWT verification (Ed25519, JWKS, HS256)
- Entity isolation with unique entity IDs derived from JWT `sub` claim
- Compatible with external providers (Auth0, Clerk, Privy, Supabase, etc.)
- Built-in credential-based authentication endpoints

## 3. Bug Fixes

### Auto-Creation of Database Directories
We've fixed an issue where SQL plugin would crash if the `.eliza` directory didn't exist ([PR #6202](https://github.com/elizaos/eliza/pull/6202)):

```typescript
// Added to packages/plugin-sql/src/index.ts
if (
  !url.startsWith('memory://') && 
  !url.startsWith('idb://') && 
  !postgresUrl
) {
  const dataDir = path.dirname(url);
  fs.mkdirSync(dataDir, { recursive: true });
}
```

This enhancement eliminates the need for developers to manually create directories and provides more graceful error handling.

### Improved Markdown Rendering
Fixed excessive vertical spacing in AI-generated responses ([PR #6197](https://github.com/elizaos/eliza/pull/6197)), particularly around headings and blockquotes:

```css
.markdown-content h1 { margin-top: 1.5em; margin-bottom: 0.5em; }
.markdown-content h1:first-child { margin-top: 0; }
.markdown-content blockquote { 
  margin: 0.8em 0; 
  padding: 0.5em 1em;
  border-left: 3px solid #e5e7eb; 
}
```

## 4. API Changes

### Migration from Event System to Message Service API
We've deprecated the `MESSAGE_RECEIVED` event system in favor of the new `messageService.handleMessage()` API:

```typescript
// Deprecated (will be removed in V3)
runtime.on(EventType.MESSAGE_RECEIVED, async (message) => {
  // Process message
});

// New approach - use this in all new code
const result = await runtime.messageService.handleMessage({
  text: "Hello world!",
  userId: stringToUuid("user-123"),
  serverId: stringToUuid("server-123")
});
```

This change improves type safety and provides better handling of asynchronous operations. All examples have been updated to use the new approach.

## 5. Social Media Integrations

Negotiations with X (Twitter) for social media restoration continue, though progress has been slowed by what team members described as "Musk's legal legacy." We're working toward finalizing this integration for an upcoming release.

## 6. Model Provider Updates

### Streaming Support
Work is underway to implement unified streaming support across all model providers ([Issue #6206](https://github.com/elizaos/eliza/issues/6206)). Stan is leading an effort to standardize the `useModel` behavior for both normal and streaming modes:

1. Implementation is starting with `plugin-openrouter` (PR #20)
2. Will extend to `plugin-openai` and `plugin-anthropic` after validation
3. Includes both server-side (API/SSE/WebSocket) and client-side (UI) streaming

### Deepseek Integration
Team members have requested Deepseek API keys, indicating work on integrating this provider is in progress.

## 7. Breaking Changes

### V1 to V2 Migration Issues

If you're migrating from ElizaOS V1, be aware of these critical changes:

1. **Database Initialization**: In V2, database adapters must be explicitly registered:
   ```typescript
   // Required in V2
   runtime.database.registerAdapter('postgres', postgresAdapter);
   ```

2. **Directory Structure**: V2 expects the `.eliza` directory to exist for PGLite database storage. While we've added auto-creation in PR #6202, applications not yet using this update should manually create this directory:
   ```typescript
   import fs from 'fs';
   if (!fs.existsSync('.eliza')) {
     fs.mkdirSync('.eliza');
   }
   ```

3. **JWT Authentication**: When V2 `ENABLE_DATA_ISOLATION=true` is set, all requests must include a valid JWT token in the `Authorization` header:
   ```
   Authorization: Bearer <jwt-token>
   ```
   Applications that previously used the `X-Entity-Id` header must migrate to JWT authentication.

4. **Message API**: Applications should migrate from the deprecated event system to `messageService.handleMessage()`. The event-based approach will be removed entirely in V3.

Remember to update all imports according to the new directory structure if you're implementing custom server extensions.