Skip to content

Commit e7dd46e

Browse files
authored
Merge branch 'develop' into twitter-convo
2 parents fb7c09c + d928b8e commit e7dd46e

File tree

31 files changed

+703
-122
lines changed

31 files changed

+703
-122
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ TOGETHER_API_KEY=
191191
# Server Configuration
192192
SERVER_PORT=3000
193193

194+
# Abstract Configuration
195+
ABSTRACT_ADDRESS=
196+
ABSTRACT_PRIVATE_KEY=
197+
ABSTRACT_RPC_URL=https://api.testnet.abs.xyz
198+
194199
# Starknet Configuration
195200
STARKNET_ADDRESS=
196201
STARKNET_PRIVATE_KEY=

.github/workflows/codeql.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '29 8 * * 6'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
15+
permissions:
16+
# required for all workflows
17+
security-events: write
18+
19+
# required to fetch internal or private CodeQL packs
20+
packages: read
21+
22+
# only required for workflows in private repositories
23+
actions: read
24+
contents: read
25+
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
include:
30+
- language: javascript-typescript
31+
build-mode: none
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@v3
38+
with:
39+
languages: ${{ matrix.language }}
40+
build-mode: ${{ matrix.build-mode }}
41+
42+
- if: matrix.build-mode == 'manual'
43+
shell: bash
44+
run: |
45+
echo 'If you are using a "manual" build mode for one or more of the' \
46+
'languages you are analyzing, replace this with the commands to build' \
47+
'your code, for example:'
48+
echo ' make bootstrap'
49+
echo ' make release'
50+
exit 1
51+
52+
- name: Perform CodeQL Analysis
53+
uses: github/codeql-action/analyze@v3
54+
with:
55+
category: "/language:${{matrix.language}}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Generate Readme Translations
2+
on:
3+
push:
4+
branches:
5+
- "1222--README-ci-auto-translation"
6+
7+
jobs:
8+
translation:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
language: [
13+
{code: 'CN', name: 'Chinese'},
14+
{code: 'DE', name: 'German'},
15+
{code: 'ES', name: 'Spanish'},
16+
{code: 'FR', name: 'French'},
17+
{code: 'HE', name: 'Hebrew'},
18+
{code: 'IT', name: 'Italian'},
19+
{code: 'JA', name: 'Japanese'},
20+
{code: 'KOR', name: 'Korean'},
21+
{code: 'PTBR', name: 'Portuguese (Brazil)'},
22+
{code: 'RU', name: 'Russian'},
23+
{code: 'TH', name: 'Thai'},
24+
{code: 'TR', name: 'Turkish'},
25+
{code: 'VI', name: 'Vietnamese'}
26+
]
27+
permissions:
28+
contents: write
29+
steps:
30+
- uses: actions/checkout@v4
31+
with:
32+
ref: main
33+
token: ${{ secrets.GH_TOKEN }}
34+
35+
- name: Translate to ${{ matrix.language.name }}
36+
uses: 0xjord4n/aixion@v1.2.1
37+
id: aixion
38+
with:
39+
config: >
40+
{
41+
"provider": "openai",
42+
"provider_options": {
43+
"api_key": "${{ secrets.OPENAI_API_KEY }}"
44+
},
45+
"messages": [
46+
{
47+
"role": "system",
48+
"content": "You will be provided with a markdown file in English, and your task is to translate it into ${{ matrix.language.name }}."
49+
},
50+
{
51+
"role": "user",
52+
"content_path": "README.md"
53+
}
54+
],
55+
"save_path": "README_${{ matrix.language.code }}.md",
56+
"model": "gpt-4o"
57+
}
58+
59+
# Upload each translated file as an artifact
60+
- name: Upload translation
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: readme-${{ matrix.language.code }}
64+
path: README_${{ matrix.language.code }}.md
65+
66+
commit:
67+
needs: translation
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
with:
72+
ref: main
73+
token: ${{ secrets.GH_TOKEN }}
74+
75+
# Download all translation artifacts
76+
- name: Download all translations
77+
uses: actions/download-artifact@v4
78+
with:
79+
pattern: readme-*
80+
merge-multiple: true
81+
82+
- name: Commit all translations
83+
uses: stefanzweifel/git-auto-commit-action@v5
84+
with:
85+
commit_message: "chore: update all README translations"
86+
branch: main
87+
file_pattern: "README_*.md"
88+
commit_author: "GitHub Action <actions@github.com>"

.github/workflows/greetings.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Greetings
2+
3+
on: [pull_request_target, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
steps:
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
issue-message: "Hello @${{ github.actor }}! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!"
16+
pr-message: "Hi @${{ github.actor }}! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!"
17+

.github/workflows/stale.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: '25 18 * * *'
6+
7+
jobs:
8+
stale:
9+
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/stale@v5
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity.'
20+
stale-pr-message: 'This pull request has been automatically marked as stale due to inactivity.'
21+
stale-issue-label: 'no-issue-activity'
22+
stale-pr-label: 'no-pr-activity'
23+
days-before-stale: 30 # Marks issues and PRs as stale after X days of inactivity
24+
days-before-close: 7 # Closes issues and PRs X days after being marked as stale

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ concatenated-output.ts
99
embedding-cache.json
1010
packages/plugin-buttplug/intiface-engine
1111

12+
.idea
1213
.DS_Store
1314

1415
dist/

agent/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@elizaos/client-slack": "workspace:*",
3131
"@elizaos/core": "workspace:*",
3232
"@elizaos/plugin-0g": "workspace:*",
33+
"@elizaos/plugin-abstract": "workspace:*",
3334
"@elizaos/plugin-aptos": "workspace:*",
3435
"@elizaos/plugin-bootstrap": "workspace:*",
3536
"@elizaos/plugin-intiface": "workspace:*",

agent/src/index.ts

+4-29
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { suiPlugin } from "@elizaos/plugin-sui";
5555
import { TEEMode, teePlugin } from "@elizaos/plugin-tee";
5656
import { tonPlugin } from "@elizaos/plugin-ton";
5757
import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
58+
import { abstractPlugin } from "@elizaos/plugin-abstract";
5859
import Database from "better-sqlite3";
5960
import fs from "fs";
6061
import path from "path";
@@ -386,12 +387,8 @@ export async function initializeClients(
386387

387388
if (clientTypes.includes(Clients.TWITTER)) {
388389
const twitterClient = await TwitterClientInterface.start(runtime);
389-
390390
if (twitterClient) {
391391
clients.twitter = twitterClient;
392-
(twitterClient as any).enableSearch = !isFalsish(
393-
getSecret(character, "TWITTER_SEARCH_ENABLE")
394-
);
395392
}
396393
}
397394

@@ -433,31 +430,6 @@ export async function initializeClients(
433430
return clients;
434431
}
435432

436-
function isFalsish(input: any): boolean {
437-
// If the input is exactly NaN, return true
438-
if (Number.isNaN(input)) {
439-
return true;
440-
}
441-
442-
// Convert input to a string if it's not null or undefined
443-
const value = input == null ? "" : String(input);
444-
445-
// List of common falsish string representations
446-
const falsishValues = [
447-
"false",
448-
"0",
449-
"no",
450-
"n",
451-
"off",
452-
"null",
453-
"undefined",
454-
"",
455-
];
456-
457-
// Check if the value (trimmed and lowercased) is in the falsish list
458-
return falsishValues.includes(value.trim().toLowerCase());
459-
}
460-
461433
function getSecret(character: Character, secret: string) {
462434
return character.settings?.secrets?.[secret] || process.env[secret];
463435
}
@@ -562,6 +534,9 @@ export async function createAgent(
562534
? webhookPlugin
563535
: null,
564536
getSecret(character, "EVM_PROVIDER_URL") ? goatPlugin : null,
537+
getSecret(character, "ABSTRACT_PRIVATE_KEY")
538+
? abstractPlugin
539+
: null,
565540
getSecret(character, "FLOW_ADDRESS") &&
566541
getSecret(character, "FLOW_PRIVATE_KEY")
567542
? flowPlugin

docs/community/Notes/lore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Week 1 Recap: elizaos Launch and Early Developments
9393

9494
Hello, I am Shaw. I am a cross-disciplinary programmer and entrepreneur living in San Francisco. I have been working on autonomous agents for several years and I am overjoyed to finally get to show that to all of you.
9595

96-
I started elizaos here on Twitter with some very capable folks, in the open, using the http://daos.fun platform. Our technology is open source, and powering many of the agents you talk to today. We call this type of agent an eliza.
96+
I started elizaos here on Twitter with some very capable folks, in the open, using the http://daos.fun platform. Our technology is open source, and powering many of the agents you talk to today. We call this type of agent an "eliza".
9797

9898
Our token character agent is @degenspartanai who is a recreation of a legendary friend and poster who quit Twitter last cycle. $degenai is his token.
9999

docs/community/creator-fund.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Here's when the community learned about who the top holder is:
1818

1919
> "So a ton of people have been asking (justifiably) who the heck I am, why do I have 16% of elizaos supply, and what I’m going to do with it.
2020
>
21-
> It started by @shawmakesmagic tweeting about some agent he built called @degenspartanai, a recreation of a legend on twitter. I put a bunch of my SOL in there because I had been following Shaw and really thought he was building something great. Almost immediately all of that became close to worthless. Degen’s tweets seemed too human-like to be real anyway - so I figured I got scammed.
21+
> It started by @shawmakesmagic tweeting about some agent he built called @degenspartanai, a recreation of a legend on twitter. I put a bunch of my SOL in there because I had been following Shaw and really thought he was building something great. Almost immediately all of that became close to worthless. Degen’s tweets seemed too "human-like" to be real anyway - so I figured I got scammed.
2222
>
2323
> So I DM’ed shaw, not because I was angry, but I was genuinely curious why he might have scammed me. I ended up sending him a google meet, which turned into an hour long conversation about what he was actually building, and me realizing twitter is usually a misrepresentation of the people you think you know. Shaw is just inspiring. Someone who is completely dedicated to accelerating the world for the better, and not optimizing for optics or money - just building.
2424
>

docs/docs/advanced/eliza-in-tee.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The TEE Plugin in the Eliza Framework is built on top of the [Dstack SDK](https:
2323

2424
## Core Components
2525

26-
Eliza's TEE implementation consists of two primary providers that handle secure key managementoperations and remote attestations.
26+
Eliza's TEE implementation consists of two primary providers that handle secure key management operations and remote attestations.
2727

2828
These components work together to provide:
2929

@@ -101,7 +101,7 @@ const quote = await provider.generateAttestation(reportData);
101101
Before getting started with Eliza, ensure you have:
102102

103103
- [Docker Desktop](https://www.docker.com/products/docker-desktop/) or [Orbstack](https://orbstack.dev/) (Orbstack is recommended)
104-
- For Mac/Windows: Check the prerequisites from [Quickstart Guide](./quickstart.md)
104+
- For Mac/Windows: Check the prerequisites from [Quickstart Guide](../quickstart.md)
105105
- For Linux: You just need Docker
106106

107107
---
@@ -144,7 +144,7 @@ To set up your environment for TEE development:
144144
145145
1. **Configure Eliza Agent**
146146
147-
Go through the [configuration guide](./configuration.md) to set up your Eliza agent.
147+
Go through the [configuration guide](../guides/configuration.md) to set up your Eliza agent.
148148
149149
2. **Start the TEE Simulator**
150150
Follow the simulator setup instructions above based on your TEE mode.

packages/adapter-sqljs/src/types.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ declare class Statement {
100100
getSQL(): string;
101101

102102
/**
103-
* Reset a statement, so that it's parameters can be bound to new
103+
* Reset a statement, so that its parameters can be bound to new
104104
* values. It also clears all previous bindings, freeing the memory used
105105
* by bound parameters.
106106
* @see [https://sql.js.org/documentation/Statement.html#["reset"]](https://sql.js.org/documentation/Statement.html#%5B%22reset%22%5D)
@@ -115,7 +115,7 @@ declare class Statement {
115115
run(values?: BindParams): void;
116116

117117
/**
118-
* Execute the statement, fetching the the next line of result, that can
118+
* Execute the statement, fetching the next line of result, that can
119119
* be retrieved with `Statement.get`.
120120
* @see [https://sql.js.org/documentation/Statement.html#["step"]](https://sql.js.org/documentation/Statement.html#%5B%22step%22%5D)
121121
*/
@@ -169,7 +169,7 @@ export declare class Database {
169169
getRowsModified(): number;
170170

171171
/**
172-
* Analyze a result code, return null if no error occured, and throw an
172+
* Analyze a result code, return null if no error occurred, and throw an
173173
* error with a descriptive message otherwise
174174
* @see [https://sql.js.org/documentation/Database.html#["handleError"]](https://sql.js.org/documentation/Database.html#%5B%22handleError%22%5D)
175175
*/

packages/client-github/src/index.ts

+21-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ export class GitHubClient {
5757

5858
// Clone or pull repository
5959
if (!existsSync(this.repoPath)) {
60-
await this.git.clone(
61-
`https://github.com/${this.config.owner}/${this.config.repo}.git`,
62-
this.repoPath
63-
);
60+
await this.cloneRepository();
6461
} else {
6562
const git = simpleGit(this.repoPath);
6663
await git.pull();
@@ -73,6 +70,26 @@ export class GitHubClient {
7370
}
7471
}
7572

73+
private async cloneRepository() {
74+
const repositoryUrl = `https://github.com/${this.config.owner}/${this.config.repo}.git`;
75+
const maxRetries = 3;
76+
let retries = 0;
77+
78+
while (retries < maxRetries) {
79+
try {
80+
await this.git.clone(repositoryUrl, this.repoPath);
81+
elizaLogger.log(`Successfully cloned repository from ${repositoryUrl}`);
82+
return;
83+
} catch (error) {
84+
elizaLogger.error(`Failed to clone repository from ${repositoryUrl}. Retrying...`);
85+
retries++;
86+
if (retries === maxRetries) {
87+
throw new Error(`Unable to clone repository from ${repositoryUrl} after ${maxRetries} retries.`);
88+
}
89+
}
90+
}
91+
}
92+
7693
async createMemoriesFromFiles() {
7794
console.log("Create memories");
7895
const searchPath = this.config.path

0 commit comments

Comments
 (0)