Skip to content

Commit 61abf2d

Browse files
authored
Merge branch 'main' into ungate/dev
2 parents 394ccac + a9d8417 commit 61abf2d

File tree

127 files changed

+3611
-1796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+3611
-1796
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,15 @@ STARKNET_ADDRESS=
9191
STARKNET_PRIVATE_KEY=
9292
STARKNET_RPC_URL=
9393

94+
9495
# runtime management of character agents
9596
FETCH_FROM_DB=false #During startup, fetch the characters from the database
9697
ENCRYPTION_KEY= #mandatory field if FETCH_FROM_DB or AGENT_RUNTIME_MANAGEMENT is true,
9798
#used to encrypt the secrets of characters
9899
AGENT_RUNTIME_MANAGEMENT=false #Enable runtime management of character agents
99100
AGENT_PORT=3001 #port for the runtime management of character agents if empty default 3001
100101

102+
103+
# Coinbase Commerce
104+
COINBASE_COMMERCE_KEY=
105+

.github/workflows/ci.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
- name: Run Prettier
2626
run: pnpm run prettier --check .
2727

28+
- name: Run Linter
29+
run: pnpm run lint
30+
2831
- name: Create test env file
2932
run: |
3033
echo "TEST_DATABASE_CLIENT=sqlite" > packages/core/.env.test

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pnpm run prettier-check
2+
pnpm run lint

SECURITY.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Given the early stage of the project, we currently only support the latest version with security updates:
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| 0.0.x | :white_check_mark: |
10+
| < 0.0.1 | :x: |
11+
12+
## Reporting a Vulnerability
13+
14+
We take the security of Eliza seriously. If you believe you have found a security vulnerability, please report it to us following these steps:
15+
16+
### Private Reporting Process
17+
18+
1. **DO NOT** create a public GitHub issue for the vulnerability
19+
2. Send an email to security@eliza.builders with:
20+
- A detailed description of the vulnerability
21+
- Steps to reproduce the issue
22+
- Potential impact of the vulnerability
23+
- Any possible mitigations you've identified
24+
25+
### What to Expect
26+
27+
- **Initial Response**: Within 48 hours, you will receive an acknowledgment of your report
28+
- **Updates**: We will provide updates every 5 business days about the progress
29+
- **Resolution Timeline**: We aim to resolve critical issues within 15 days
30+
- **Disclosure**: We will coordinate with you on the public disclosure timing
31+
32+
## Security Best Practices
33+
34+
### For Contributors
35+
36+
1. **API Keys and Secrets**
37+
38+
- Never commit API keys, passwords, or other secrets to the repository
39+
- Use environment variables as described in our secrets management guide
40+
- Rotate any accidentally exposed credentials immediately
41+
42+
2. **Dependencies**
43+
44+
- Keep all dependencies up to date
45+
- Review security advisories for dependencies regularly
46+
- Use `pnpm audit` to check for known vulnerabilities
47+
48+
3. **Code Review**
49+
- All code changes must go through pull request review
50+
- Security-sensitive changes require additional review
51+
- Enable branch protection on main branches
52+
53+
### For Users
54+
55+
1. **Environment Setup**
56+
57+
- Follow our [secrets management guide](docs/guides/secrets-management.md) for secure configuration
58+
- Use separate API keys for development and production
59+
- Regularly rotate credentials
60+
61+
2. **Model Provider Security**
62+
63+
- Use appropriate rate limiting for API calls
64+
- Monitor usage patterns for unusual activity
65+
- Implement proper authentication for exposed endpoints
66+
67+
3. **Platform Integration**
68+
- Use separate bot tokens for different environments
69+
- Implement proper permission scoping for platform APIs
70+
- Regular audit of platform access and permissions
71+
72+
## Security Features
73+
74+
### Current Implementation
75+
76+
- Environment variable based secrets management
77+
- Type-safe API implementations
78+
- Automated dependency updates via Renovate
79+
- Continuous Integration security checks
80+
81+
### Planned Improvements
82+
83+
1. **Q4 2024**
84+
85+
- Automated security scanning in CI pipeline
86+
- Enhanced rate limiting implementation
87+
- Improved audit logging
88+
89+
2. **Q1 2025**
90+
- Security-focused documentation improvements
91+
- Enhanced platform permission management
92+
- Automated vulnerability scanning
93+
94+
## Vulnerability Disclosure Policy
95+
96+
We follow a coordinated disclosure process:
97+
98+
1. Reporter submits vulnerability details
99+
2. Our team validates and assesses the report
100+
3. We develop and test a fix
101+
4. Fix is deployed to supported versions
102+
5. Public disclosure after 30 days or by mutual agreement
103+
104+
## Recognition
105+
106+
We believe in recognizing security researchers who help improve our security. Contributors who report valid security issues will be:
107+
108+
- Credited in our security acknowledgments (unless they wish to remain anonymous)
109+
- Added to our security hall of fame
110+
- Considered for our bug bounty program (coming soon)
111+
112+
## License Considerations
113+
114+
As an MIT licensed project, users should understand:
115+
116+
- The software is provided "as is"
117+
- No warranty is provided
118+
- Users are responsible for their own security implementations
119+
- Contributors grant perpetual license to their contributions
120+
121+
## Contact
122+
123+
- Security Issues: security@eliza.builders
124+
- General Questions: Join our [Discord](https://discord.gg/ai16z)
125+
- Updates: Follow our [security advisory page](https://github.com/ai16z/eliza/security/advisories)

agent/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@ai16z/plugin-node": "workspace:*",
2626
"@ai16z/plugin-solana": "workspace:*",
2727
"@ai16z/plugin-starknet": "workspace:*",
28+
"@ai16z/plugin-coinbase": "workspace:*",
2829
"readline": "^1.3.0",
2930
"ws": "^8.18.0",
3031
"yargs": "17.7.2"

agent/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
2626
import { solanaPlugin } from "@ai16z/plugin-solana";
2727
import { nodePlugin } from "@ai16z/plugin-node";
28+
import { coinbaseCommercePlugin } from "@ai16z/plugin-coinbase";
2829
import Database from "better-sqlite3";
2930
import fs from "fs";
3031
import readline from "readline";
@@ -256,6 +257,10 @@ export function createAgent(
256257
bootstrapPlugin,
257258
nodePlugin,
258259
character.settings.secrets?.WALLET_PUBLIC_KEY ? solanaPlugin : null,
260+
character.settings.secrets?.COINBASE_COMMERCE_KEY ||
261+
process.env.COINBASE_COMMERCE_KEY
262+
? coinbaseCommercePlugin
263+
: null,
259264
].filter(Boolean),
260265
providers: [],
261266
actions: [],

client/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"devDependencies": {
2626
"@eslint/js": "^9.13.0",
2727
"@types/node": "22.8.4",
28-
"@types/react": "^18.3.12",
29-
"@types/react-dom": "^18.3.1",
28+
"@types/react": "18.3.12",
29+
"@types/react-dom": "18.3.1",
3030
"@vitejs/plugin-react": "^4.3.3",
3131
"autoprefixer": "^10.4.20",
3232
"eslint": "^9.13.0",

docs/docs/packages/plugins.md

+105
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,111 @@ const character = {
106106
};
107107
```
108108

109+
Here is the updated README with the Coinbase Commerce plugin information added:
110+
111+
---
112+
113+
# 🧩 Plugins
114+
115+
## Overview
116+
117+
Eliza's plugin system provides a modular way to extend the core functionality with additional features, actions, evaluators, and providers. Plugins are self-contained modules that can be easily added or removed to customize your agent's capabilities.
118+
119+
## Core Plugin Concepts
120+
121+
### Plugin Structure
122+
123+
Each plugin in Eliza must implement the `Plugin` interface with the following properties:
124+
125+
```typescript
126+
interface Plugin {
127+
name: string; // Unique identifier for the plugin
128+
description: string; // Brief description of plugin functionality
129+
actions?: Action[]; // Custom actions provided by the plugin
130+
evaluators?: Evaluator[]; // Custom evaluators for behavior assessment
131+
providers?: Provider[]; // Context providers for message generation
132+
services?: Service[]; // Additional services (optional)
133+
}
134+
```
135+
136+
### Available Plugins
137+
138+
#### 1. Bootstrap Plugin (`@eliza/plugin-bootstrap`)
139+
140+
The bootstrap plugin provides essential baseline functionality:
141+
142+
**Actions:**
143+
144+
- `continue` - Continue the current conversation flow
145+
- `followRoom` - Follow a room for updates
146+
- `unfollowRoom` - Unfollow a room
147+
- `ignore` - Ignore specific messages
148+
- `muteRoom` - Mute notifications from a room
149+
- `unmuteRoom` - Unmute notifications from a room
150+
151+
**Evaluators:**
152+
153+
- `fact` - Evaluate factual accuracy
154+
- `goal` - Assess goal completion
155+
156+
**Providers:**
157+
158+
- `boredom` - Manages engagement levels
159+
- `time` - Provides temporal context
160+
- `facts` - Supplies factual information
161+
162+
#### 2. Image Generation Plugin (`@eliza/plugin-image-generation`)
163+
164+
Enables AI image generation capabilities:
165+
166+
**Actions:**
167+
168+
- `GENERATE_IMAGE` - Create images based on text descriptions
169+
- Supports multiple image generation services (Anthropic, Together)
170+
- Auto-generates captions for created images
171+
172+
#### 3. Node Plugin (`@eliza/plugin-node`)
173+
174+
Provides core Node.js-based services:
175+
176+
**Services:**
177+
178+
- `BrowserService` - Web browsing capabilities
179+
- `ImageDescriptionService` - Image analysis
180+
- `LlamaService` - LLM integration
181+
- `PdfService` - PDF processing
182+
- `SpeechService` - Text-to-speech
183+
- `TranscriptionService` - Speech-to-text
184+
- `VideoService` - Video processing
185+
186+
#### 4. Solana Plugin (`@eliza/plugin-solana`)
187+
188+
Integrates Solana blockchain functionality:
189+
190+
**Evaluators:**
191+
192+
- `trustEvaluator` - Assess transaction trust scores
193+
194+
**Providers:**
195+
196+
- `walletProvider` - Wallet management
197+
- `trustScoreProvider` - Transaction trust metrics
198+
199+
#### 5. Coinbase Commerce Plugin (`@eliza/plugin-coinbase-commerce`)
200+
201+
Integrates Coinbase Commerce for payment and transaction management:
202+
203+
**Actions:**
204+
205+
- `CREATE_CHARGE` - Create a payment charge using Coinbase Commerce
206+
- `GET_ALL_CHARGES` - Fetch all payment charges
207+
- `GET_CHARGE_DETAILS` - Retrieve details for a specific charge
208+
209+
**Description:**
210+
This plugin enables Eliza to interact with the Coinbase Commerce API to create and manage payment charges, providing seamless integration with cryptocurrency-based payment systems.
211+
212+
---
213+
109214
### Writing Custom Plugins
110215

111216
Create a new plugin by implementing the Plugin interface:

docs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"clsx": "2.1.0",
2626
"docusaurus-lunr-search": "^3.5.0",
2727
"prism-react-renderer": "2.3.1",
28-
"react": "18.2.0",
29-
"react-dom": "18.2.0",
28+
"react": "18.3.1",
29+
"react-dom": "18.3.1",
3030
"react-router-dom": "6.22.1"
3131
},
3232
"devDependencies": {

eslint.global.mjs

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import eslint from "@eslint/js";
2+
import tseslint from "@typescript-eslint/eslint-plugin";
3+
import typescript from "@typescript-eslint/parser";
4+
import prettier from "eslint-config-prettier";
5+
import vitest from "eslint-plugin-vitest"; // Add Vitest plugin
6+
7+
export default [
8+
// JavaScript and TypeScript files
9+
{
10+
files: ["src/**/*.js", "src/**/*.cjs", "src/**/*.mjs", "src/**/*.ts"],
11+
languageOptions: {
12+
parser: typescript,
13+
parserOptions: {
14+
ecmaVersion: "latest",
15+
sourceType: "module",
16+
project: "./tsconfig.json", // Make sure your tsconfig includes @types/node
17+
},
18+
globals: {
19+
// Add Node.js globals
20+
NodeJS: "readonly",
21+
console: "readonly",
22+
process: "readonly",
23+
Buffer: "readonly",
24+
__dirname: "readonly",
25+
__filename: "readonly",
26+
module: "readonly",
27+
require: "readonly",
28+
},
29+
},
30+
plugins: {
31+
"@typescript-eslint": tseslint,
32+
},
33+
rules: {
34+
...eslint.configs.recommended.rules,
35+
...tseslint.configs.recommended.rules,
36+
"prefer-const": "warn",
37+
"no-constant-binary-expression": "error",
38+
39+
// Disable no-undef as TypeScript handles this better
40+
"no-undef": "off",
41+
"@typescript-eslint/no-unsafe-function-type": "off",
42+
// Customize TypeScript rules
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"@typescript-eslint/no-unused-vars": [
45+
"error",
46+
{
47+
argsIgnorePattern: "^_",
48+
varsIgnorePattern: "^_",
49+
ignoreRestSiblings: true,
50+
},
51+
],
52+
},
53+
},
54+
// Vitest configuration
55+
{
56+
files: [
57+
"src/**/*.test.js",
58+
"src/**/*.test.ts",
59+
"src/**/*.spec.js",
60+
"src/**/*.spec.ts",
61+
],
62+
plugins: {
63+
vitest, // Register Vitest plugin
64+
},
65+
rules: {
66+
...vitest.configs.recommended.rules,
67+
},
68+
},
69+
// Add prettier as the last config to override other formatting rules
70+
prettier,
71+
];

0 commit comments

Comments
 (0)