Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add coinbase plugin starting with cb commerce functionality #513

Merged
merged 38 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f60c536
Implement Coinbase Commerce Provider
monilpat Nov 20, 2024
eed9bce
add plugin to readme
monilpat Nov 21, 2024
e98b8a5
Testing Coinbase Plugin
monilpat Nov 21, 2024
8f975ab
test: add linter to all packages and enable vitest
snobbee Nov 21, 2024
6d65551
Build plugin
monilpat Nov 22, 2024
90f5676
wrap in try to allow non node env to build
antpb Nov 22, 2024
73a4bfd
consistent error
antpb Nov 22, 2024
a0c2bb8
fix other eliza error
antpb Nov 22, 2024
b856146
docs: add template and client configuration guide
oguzserdar Nov 22, 2024
26fab78
Integrate coinbase plugin and test and get it working
monilpat Nov 22, 2024
d33edac
Remove unnecessary console.logs
monilpat Nov 22, 2024
f2dde70
Merge pull request #510 from oguzserdar/main
jkbrooks Nov 22, 2024
10aa5d6
Merge pull request #508 from antpb/fix/gracefully-pull-node-dep
jkbrooks Nov 22, 2024
b763a62
add precommit
ponderingdemocritus Nov 22, 2024
421fe0b
husky
ponderingdemocritus Nov 22, 2024
9e9836b
prettier
ponderingdemocritus Nov 22, 2024
37f1c33
feat: husky
ponderingdemocritus Nov 22, 2024
bb643af
feat: commit
ponderingdemocritus Nov 22, 2024
de3f5af
feat: style
ponderingdemocritus Nov 22, 2024
c5177f6
fix: ecogarden type
ponderingdemocritus Nov 22, 2024
02b5145
Merge pull request #514 from ai16z/feat/pre-commit
ponderingdemocritus Nov 22, 2024
8d32603
fix: lint
ponderingdemocritus Nov 22, 2024
e31e666
Merge pull request #515 from ai16z/fix/trim
ponderingdemocritus Nov 22, 2024
83ec1de
Merge branch 'main' into test/add-linter-to-all-packages
snobbee Nov 22, 2024
2335a92
Create SECURITY.md
awidearray Nov 22, 2024
62ef92a
fix: typo
snobbee Nov 22, 2024
79bdabb
test: fix linter errors and add linter to pre-commit hook
snobbee Nov 22, 2024
502d386
fix: lint
snobbee Nov 22, 2024
cf06999
ci: add linter to ci workflow
snobbee Nov 22, 2024
6e05c0f
Merge pull request #490 from snobbee/test/add-linter-to-all-packages
ponderingdemocritus Nov 22, 2024
8e5658a
Implement Coinbase Commerce Provider
monilpat Nov 20, 2024
0b4e85d
add plugin to readme
monilpat Nov 21, 2024
60bdca3
Testing Coinbase Plugin
monilpat Nov 21, 2024
e96e0cc
Build plugin
monilpat Nov 22, 2024
7ef4502
Integrate coinbase plugin and test and get it working
monilpat Nov 22, 2024
4d383c2
Remove unnecessary console.logs
monilpat Nov 22, 2024
932ba8b
chore: merge conflicts
monilpat Nov 22, 2024
d4835c5
Update package.json
monilpat Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ STARKNET_ADDRESS=
STARKNET_PRIVATE_KEY=
STARKNET_RPC_URL=


# Coinbase Commerce
COINBASE_COMMERCE_KEY=
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Run Prettier
run: pnpm run prettier --check .

- name: Run Linter
run: pnpm run lint

- name: Create test env file
run: |
echo "TEST_DATABASE_CLIENT=sqlite" > packages/core/.env.test
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Pre-Release

on:
push:
branches:
- main
workflow_dispatch:
inputs:
release_type:
Expand Down
12 changes: 12 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh

# Inform the user about commit message format requirements
echo "┌──────────────────────────────────────────────────────────────┐"
echo "│ ℹ️ Commit message must follow the format: 'type: description' │"
echo "│ Valid types: feat, fix, docs, style, refactor, test, chore │"
echo "│ Example: 'feat: add new login feature' │"
echo "└──────────────────────────────────────────────────────────────┘"
echo ""

# Run commitlint to validate the commit message
npx --no -- commitlint --edit ${1}
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm run prettier-check
pnpm run lint
65 changes: 33 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,34 @@ By contributing to Eliza, you agree that your contributions will be licensed und

We believe in the power of the OODA Loop - a decision-making framework that emphasizes speed and adaptability. OODA stands for:

- **Observe**: Gather information and insights about the project, the community, and the broader AI ecosystem.
- **Orient**: Analyze your observations to identify opportunities for contribution and improvement.
- **Decide**: Choose a course of action based on your analysis. This could be proposing a new feature, fixing a bug, or creating content.
- **Act**: Execute your decision and share your work with the community.
- **Observe**: Gather information and insights about the project, the community, and the broader AI ecosystem.
- **Orient**: Analyze your observations to identify opportunities for contribution and improvement.
- **Decide**: Choose a course of action based on your analysis. This could be proposing a new feature, fixing a bug, or creating content.
- **Act**: Execute your decision and share your work with the community.

## How to Contribute

### For Developers

1. **Extend Eliza's Capabilities**
- Develop new actions, evaluators, and providers
- Improve existing components and modules

- Develop new actions, evaluators, and providers
- Improve existing components and modules

2. **Enhance Infrastructure**
- Review open issues and submit PRs
- Test and update documentation
- Optimize performance
- Improve deployment solutions

1. Fork the repo and create your branch from `main`.
- Review open issues and submit PRs
- Test and update documentation
- Optimize performance
- Improve deployment solutions

3. Fork the repo and create your branch from `main`.
1. The name of the branch should start with the issue number and be descriptive of the changes you are making.
1. eg. 40--add-test-for-bug-123
2. If you've added code that should be tested, add tests.
3. Ensure the test suite passes.
4. Make sure your code lints.
5. Issue that pull request!
4. If you've added code that should be tested, add tests.
5. Ensure the test suite passes.
6. Make sure your code lints.
7. Issue that pull request!

## Styleguides

Expand Down Expand Up @@ -74,18 +76,17 @@ This section lists the labels we use to help us track and manage issues and pull
- `documentation` - Issues or pull requests related to documentation.
- `good first issue` - Good for newcomers.


## Getting Help

- Join [Discord](https://discord.gg/ai16z)
- Check [FAQ](docs/community/faq.md)
- Create GitHub issues
- Join [Discord](https://discord.gg/ai16z)
- Check [FAQ](docs/community/faq.md)
- Create GitHub issues

## Additional Resources

- [Local Development Guide](docs/guides/local-development.md)
- [Configuration Guide](docs/guides/configuration.md)
- [API Documentation](docs/api)
- [Local Development Guide](docs/guides/local-development.md)
- [Configuration Guide](docs/guides/configuration.md)
- [API Documentation](docs/api)

## Contributor Guide

Expand All @@ -101,19 +102,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

#### Our Responsibilities

Expand Down
125 changes: 125 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Security Policy

## Supported Versions

Given the early stage of the project, we currently only support the latest version with security updates:

| Version | Supported |
| ------- | ------------------ |
| 0.0.x | :white_check_mark: |
| < 0.0.1 | :x: |

## Reporting a Vulnerability

We take the security of Eliza seriously. If you believe you have found a security vulnerability, please report it to us following these steps:

### Private Reporting Process

1. **DO NOT** create a public GitHub issue for the vulnerability
2. Send an email to security@eliza.builders with:
- A detailed description of the vulnerability
- Steps to reproduce the issue
- Potential impact of the vulnerability
- Any possible mitigations you've identified

### What to Expect

- **Initial Response**: Within 48 hours, you will receive an acknowledgment of your report
- **Updates**: We will provide updates every 5 business days about the progress
- **Resolution Timeline**: We aim to resolve critical issues within 15 days
- **Disclosure**: We will coordinate with you on the public disclosure timing

## Security Best Practices

### For Contributors

1. **API Keys and Secrets**

- Never commit API keys, passwords, or other secrets to the repository
- Use environment variables as described in our secrets management guide
- Rotate any accidentally exposed credentials immediately

2. **Dependencies**

- Keep all dependencies up to date
- Review security advisories for dependencies regularly
- Use `pnpm audit` to check for known vulnerabilities

3. **Code Review**
- All code changes must go through pull request review
- Security-sensitive changes require additional review
- Enable branch protection on main branches

### For Users

1. **Environment Setup**

- Follow our [secrets management guide](docs/guides/secrets-management.md) for secure configuration
- Use separate API keys for development and production
- Regularly rotate credentials

2. **Model Provider Security**

- Use appropriate rate limiting for API calls
- Monitor usage patterns for unusual activity
- Implement proper authentication for exposed endpoints

3. **Platform Integration**
- Use separate bot tokens for different environments
- Implement proper permission scoping for platform APIs
- Regular audit of platform access and permissions

## Security Features

### Current Implementation

- Environment variable based secrets management
- Type-safe API implementations
- Automated dependency updates via Renovate
- Continuous Integration security checks

### Planned Improvements

1. **Q4 2024**

- Automated security scanning in CI pipeline
- Enhanced rate limiting implementation
- Improved audit logging

2. **Q1 2025**
- Security-focused documentation improvements
- Enhanced platform permission management
- Automated vulnerability scanning

## Vulnerability Disclosure Policy

We follow a coordinated disclosure process:

1. Reporter submits vulnerability details
2. Our team validates and assesses the report
3. We develop and test a fix
4. Fix is deployed to supported versions
5. Public disclosure after 30 days or by mutual agreement

## Recognition

We believe in recognizing security researchers who help improve our security. Contributors who report valid security issues will be:

- Credited in our security acknowledgments (unless they wish to remain anonymous)
- Added to our security hall of fame
- Considered for our bug bounty program (coming soon)

## License Considerations

As an MIT licensed project, users should understand:

- The software is provided "as is"
- No warranty is provided
- Users are responsible for their own security implementations
- Contributors grant perpetual license to their contributions

## Contact

- Security Issues: security@eliza.builders
- General Questions: Join our [Discord](https://discord.gg/ai16z)
- Updates: Follow our [security advisory page](https://github.com/ai16z/eliza/security/advisories)
1 change: 1 addition & 0 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@ai16z/plugin-node": "workspace:*",
"@ai16z/plugin-solana": "workspace:*",
"@ai16z/plugin-starknet": "workspace:*",
"@ai16z/plugin-coinbase": "workspace:*",
"readline": "^1.3.0",
"ws": "^8.18.0",
"yargs": "17.7.2"
Expand Down
5 changes: 5 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
import { solanaPlugin } from "@ai16z/plugin-solana";
import { nodePlugin } from "@ai16z/plugin-node";
import { coinbaseCommercePlugin } from "@ai16z/plugin-coinbase";
import Database from "better-sqlite3";
import fs from "fs";
import readline from "readline";
Expand Down Expand Up @@ -249,6 +250,10 @@ export function createAgent(
bootstrapPlugin,
nodePlugin,
character.settings.secrets?.WALLET_PUBLIC_KEY ? solanaPlugin : null,
character.settings.secrets?.COINBASE_COMMERCE_KEY ||
process.env.COINBASE_COMMERCE_KEY
? coinbaseCommercePlugin
: null,
].filter(Boolean),
providers: [],
actions: [],
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Eliza - Multi-agent simulation framework

# https://github.com/ai16z/eliza

# Visit https://eliza.builders for support

# dev branch

<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/community/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ It is imperative to run all existing tests (`pnpm test`) before creating a PR to

## Branching Strategy

All new features and bug fixes must target the `main` branch, except when they are specific to a previously released version. In such scenarios, the bug fix PR should target the respective release branch. If necessary, changes will be backported from the `main` branch to a release branch, excluding any modifications that involve consensus-breaking features or API changes.
All new features and bug fixes must target the `main` branch, except when they are specific to a previously released version. In such scenarios, the bug fix PR should target the respective release branch. If necessary, changes will be backported from the `main` branch to a release branch, excluding any modifications that involve consensus-breaking features or API changes.
Loading