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

merge from main #32

Merged
merged 49 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
215ba63
don't continue to load if a specified file is not found
odilitime Nov 20, 2024
8962b65
don't require .env to exist
odilitime Nov 20, 2024
d5cf113
learna an npm
ponderingdemocritus Nov 20, 2024
c3ab946
add note about .env being optional
odilitime Nov 20, 2024
846b1ec
fix build
ponderingdemocritus Nov 20, 2024
42f1529
up
ponderingdemocritus Nov 20, 2024
f41ff92
Update contributing.md to incorporate PR Title / Description / Issue …
monilpat Nov 20, 2024
fa450e7
Update pr.yaml to use actual check
monilpat Nov 20, 2024
4154da2
Merge pull request #426 from odilitime/stable-11-17
ponderingdemocritus Nov 20, 2024
817a410
Merge branch 'main' of https://github.com/ai16z/eliza into release
ponderingdemocritus Nov 20, 2024
03ecab8
Merge pull request #428 from ai16z/release
ponderingdemocritus Nov 20, 2024
0367838
v0.1.1
ponderingdemocritus Nov 20, 2024
ede2cc3
chore: update changelog
actions-user Nov 20, 2024
acde8bf
since agent is moved out of packages, adjust default path
odilitime Nov 20, 2024
347581d
configs
ponderingdemocritus Nov 20, 2024
a7bf8fb
config
ponderingdemocritus Nov 20, 2024
a1d0efc
Merge pull request #431 from ai16z/fix-config
ponderingdemocritus Nov 20, 2024
9908001
v0.1.2
ponderingdemocritus Nov 20, 2024
ea26d00
chore: update changelog
actions-user Nov 20, 2024
714a380
Merge pull request #430 from monilpat/patch-1
sirkitree Nov 20, 2024
18c9fad
linting
ponderingdemocritus Nov 20, 2024
6855a25
Merge pull request #433 from ai16z/imports
ponderingdemocritus Nov 20, 2024
8658bcf
v0.1.3-alpha.0
ponderingdemocritus Nov 20, 2024
7c9bbcc
chore: update changelog
actions-user Nov 20, 2024
7c35361
chore: update changelog
actions-user Nov 20, 2024
aa978a7
chore: update changelog
actions-user Nov 20, 2024
9a0e474
Merge pull request #427 from odilitime/env-change
jkbrooks Nov 20, 2024
02effe0
Merge pull request #429 from monilpat/main
jkbrooks Nov 20, 2024
b9d3b6d
v0.1.3-alpha.1
ponderingdemocritus Nov 20, 2024
cb3141c
chore: update changelog
actions-user Nov 20, 2024
06a3893
imports
ponderingdemocritus Nov 20, 2024
2263f75
Merge pull request #435 from ai16z/fix-imports
ponderingdemocritus Nov 20, 2024
167c586
v0.1.3-alpha.2
ponderingdemocritus Nov 20, 2024
a3e7ba6
chore: update changelog
actions-user Nov 20, 2024
667bdf7
path
ponderingdemocritus Nov 20, 2024
b013276
Merge pull request #436 from ai16z/fix-paths
ponderingdemocritus Nov 20, 2024
7843a37
Merge pull request #432 from odilitime/fix-character-path
ponderingdemocritus Nov 20, 2024
d49611b
Fix linter issues
martincik Nov 18, 2024
8073472
Fix linter issues and add console.log instead
martincik Nov 20, 2024
e867920
Add console.log instead of ignore the error
martincik Nov 20, 2024
9db1f63
Merge pull request #397 from martincik/fix/fix-linter-issues
jkbrooks Nov 20, 2024
bc8f3f8
The bot is by default defeaned and we don't want that
martincik Nov 20, 2024
1ae22ee
Feature Modification: Add all the stlye guidelines to the context
o-on-x Nov 20, 2024
21a4f6a
fixes some console logs
ponderingdemocritus Nov 20, 2024
b0a0b84
Merge pull request #441 from o-on-x/main
lalalune Nov 20, 2024
71371e1
Merge pull request #440 from ai16z/cleanups
lalalune Nov 20, 2024
b31f600
Merge pull request #437 from martincik/fix/undefean-the-bot-and-use-v…
lalalune Nov 20, 2024
b8c74a6
unrug
ponderingdemocritus Nov 20, 2024
5d86a5b
Merge pull request #444 from ai16z/unrug-fix
ponderingdemocritus Nov 20, 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
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -25,4 +25,4 @@ jobs:
- name: Set status
if: failure()
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use the format: 'type: description' (e.g., 'feat: add new feature')."
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use the format: 'type: description' (e.g., 'feat|fix|docs|style|refactor|test|chore: title')."
71 changes: 71 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release

on:
workflow_dispatch:
inputs:
release_type:
description: "Type of release (prerelease, prepatch, patch, minor, preminor, major)"
required: true
default: "patch"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

- name: "Setup npm for npmjs"
run: |
npm config set registry https://registry.npmjs.org/
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install Protobuf Compiler
run: sudo apt-get install -y protobuf-compiler

- name: Install dependencies
run: pnpm install

- name: Build packages
run: pnpm run build

- name: Tag and Publish Packages
id: tag_publish
run: |
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}

- name: Get Version Tag
id: get_tag
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- name: Generate Release Body
id: release_body
run: |
if [ -f CHANGELOG.md ]; then
echo "body=$(cat CHANGELOG.md)" >> $GITHUB_OUTPUT
else
echo "body=No changelog provided for this release." >> $GITHUB_OUTPUT
fi

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Release
body_path: CHANGELOG.md
draft: false
prerelease: false
213 changes: 212 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -45,12 +45,14 @@

### Edit the .env file

Copy .env.example to .env and fill in the appropriate values
Copy .env.example to .env and fill in the appropriate values.

```
cp .env.example .env
```

Note: .env is optional. If your planning to run multiple distinct agents, you can pass secrets through the character JSON

### Automatically Start Eliza

This will run everything to setup the project and start the bot with the default character.
@@ -61,7 +63,7 @@ sh scripts/start.sh

### Edit the character file

1. Open `packages/agent/src/character.ts` to modify the default character. Uncomment and edit.
1. Open `agent/src/character.ts` to modify the default character. Uncomment and edit.

2. To load custom characters:
- Use `pnpm start --characters="path/to/your/character.json"`
2 changes: 1 addition & 1 deletion README_IT.md
Original file line number Diff line number Diff line change
@@ -89,4 +89,4 @@ pnpm install --include=optional sharp

## Cronologia Stelle

[![Grafico Cronologia Stelle](https://api.star-history.com/svg?repos=ai16z/eliza&type=Date)](https://star-history.com/#ai16z/eliza&Date)
[![Grafico Cronologia Stelle](https://api.star-history.com/svg?repos=ai16z/eliza&type=Date)](https://star-history.com/#ai16z/eliza&Date)
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 5 additions & 11 deletions packages/agent/src/index.ts → agent/src/index.ts
Original file line number Diff line number Diff line change
@@ -58,18 +58,10 @@ export async function loadCharacters(
?.split(",")
.map((path) => path.trim())
.map((path) => {
if (path.startsWith("../characters")) {
return `../${path}`;
}
if (path.startsWith("characters")) {
return `../../${path}`;
}
if (path.startsWith("./characters")) {
return `../.${path}`;
}
return path;
if (path[0] === "/") return path; // handle absolute paths
// assume relative to the project root where pnpm is ran
return `../${path}`;
});

const loadedCharacters = [];

if (characterPaths?.length > 0) {
@@ -96,6 +88,8 @@ export async function loadCharacters(
loadedCharacters.push(character);
} catch (e) {
console.error(`Error loading character from ${path}: ${e}`);
// don't continue to load if a specified file is not found
process.exit(1);
}
}
}
2 changes: 1 addition & 1 deletion packages/agent/tsconfig.json → agent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
102 changes: 102 additions & 0 deletions docs/docs/community/contributing.md
Original file line number Diff line number Diff line change
@@ -78,6 +78,108 @@ By internalizing the OODA Loop, you can quickly identify areas where you can mak
- Leverage AI assistants to help with tasks like code generation, document summarization, and content creation.
- Collaborate with other community members to divide and conquer larger initiatives.

---

## Contributing Guidelines

We value structured and clear contributions to ensure the project evolves efficiently. Below are the guidelines for submitting your contributions:

### Pull Request (PR) Title Format

Use the following format for PR titles to maintain consistency and clarity:

```
feat|fix|docs|style|refactor|test|chore: title
```

### Pull Request Description Template

When submitting a PR, use this template to ensure all relevant details are included:

```markdown
<!-- Use this template by filling in information and copy and pasting relevant items out of the html comments. -->

# Relates to:

<!-- LINK TO ISSUE OR TICKET -->

<!-- This risks section is to be filled out before final review and merge. -->

# Risks

<!--
Low, medium, large. List what kind of risks, and what could be affected.
-->

# Background

## What does this PR do?

## What kind of change is this?

<!--
Bug fixes (non-breaking change which fixes an issue)
Improvements (misc. changes to existing features)
Features (non-breaking change which adds functionality)
Updates (new versions of included code)
-->

<!-- This "Why" section is most relevant if there is no linked issue explaining why. If there is a related issue it might make sense to skip this why section. -->
<!--
## Why are we doing this? Any context or related work?
-->

# Documentation changes needed?

<!--
My changes do not require a change to the project documentation.
My changes require a change to the project documentation.
If a docs change is needed: I have updated the documentation accordingly.
-->

<!-- Please show how you tested the PR. This will really help if the PR needs to be retested, and probably help the PR get merged quicker. -->

# Testing

## Where should a reviewer start?

## Detailed testing steps

<!--
None, automated tests are fine.
-->

<!--
- As [anon/admin], go to [link]
- [do action]
- verify [result]
-->

<!-- If there is a UI change, please include before and after screenshots or videos. This will speed up PRs being merged. It is extra nice to annotate screenshots with arrows or boxes pointing out the differences. -->
<!--
## Screenshots
### Before
### After
-->

<!-- If there is anything about the deploy, please make a note. -->
<!--
# Deploy Notes
-->

<!-- Copy and paste command-line output. -->
<!--
## Database changes
-->

<!-- If there is something more than the automated steps, please specify deploy instructions. -->
<!--
## Deployment instructions
-->
```

---

## Recognition and Rewards

We believe in recognizing and rewarding contributors who go above and beyond to drive the project forward. Stand-out contributions may be eligible for:
1 change: 1 addition & 0 deletions docs/docs/core/agents.md
Original file line number Diff line number Diff line change
@@ -252,6 +252,7 @@ await memoryManager.createMemory({
roomId,
});
```

---

## Further Reading
2 changes: 1 addition & 1 deletion docs/docs/core/evaluators.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ sidebar_position: 5

## Overview

Evaluators enable agents to:
Evaluators enable agents to:

- Build long-term memory
- Track goal progress
2 changes: 1 addition & 1 deletion docs/docs/packages/plugins.md
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ const character = {
Create a new plugin by implementing the Plugin interface:

```typescript
import { Plugin, Action, Evaluator, Provider } from "@ai16z/eliza/src/types";
import { Plugin, Action, Evaluator, Provider } from "@ai16z/eliza";

const myCustomPlugin: Plugin = {
name: "my-custom-plugin",
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "0.1.3-alpha.2",
"packages": ["packages/*"],
"npmClient": "pnpm"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
"lint": "pnpm --dir packages/core lint && pnpm --dir packages/agent lint",
"prettier-check": "npx prettier --check .",
"prettier": "npx prettier --write .",
"release": "pnpm build && pnpm prettier && npx lerna publish --no-private --force-publish",
"clean": "bash ./scripts/clean.sh",
"docker:build": "bash ./scripts/docker.sh build",
"docker:run": "bash ./scripts/docker.sh run",
6 changes: 6 additions & 0 deletions packages/adapter-postgres/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*

!dist/**
!package.json
!readme.md
!tsup.config.ts
4 changes: 2 additions & 2 deletions packages/adapter-postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ai16z/adapter-postgres",
"version": "0.0.1",
"main": "src/index.ts",
"version": "0.1.3-alpha.2",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"dependencies": {
4 changes: 2 additions & 2 deletions packages/adapter-postgres/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "src"
},
"include": ["src"]
"include": ["src/**/*.ts"]
}
6 changes: 6 additions & 0 deletions packages/adapter-sqlite/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*

!dist/**
!package.json
!readme.md
!tsup.config.ts
8 changes: 4 additions & 4 deletions packages/adapter-sqlite/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@ai16z/adapter-sqlite",
"version": "0.0.1",
"main": "src/index.ts",
"version": "0.1.3-alpha.2",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"dependencies": {
"@ai16z/eliza": "workspace:*",
"@types/better-sqlite3": "7.6.11",
"sqlite-vec": "0.1.4-alpha.2",
"better-sqlite3": "11.5.0"
"better-sqlite3": "11.5.0",
"sqlite-vec": "0.1.4-alpha.2"
},
"devDependencies": {
"tsup": "^8.3.5"
4 changes: 2 additions & 2 deletions packages/adapter-sqlite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "src"
},
"include": ["src"]
"include": ["src/**/*.ts"]
}
6 changes: 6 additions & 0 deletions packages/adapter-sqljs/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*

!dist/**
!package.json
!readme.md
!tsup.config.ts
6 changes: 3 additions & 3 deletions packages/adapter-sqljs/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@ai16z/adapter-sqljs",
"version": "0.0.1",
"version": "0.1.3-alpha.2",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"dependencies": {
"@ai16z/eliza": "workspace:*",
"@types/sql.js": "1.4.9",
"uuid": "11.0.2",
"sql.js": "1.12.0"
"sql.js": "1.12.0",
"uuid": "11.0.2"
},
"devDependencies": {
"tsup": "^8.3.5"
4 changes: 2 additions & 2 deletions packages/adapter-sqljs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
"rootDir": "src"
},
"include": ["src"]
"include": ["src/**/*.ts"]
}
Loading