Skip to content

Commit 638bcfe

Browse files
authored
Merge branch 'develop' into patch-1
2 parents ac59740 + 4117448 commit 638bcfe

File tree

414 files changed

+11963
-4231
lines changed

Some content is hidden

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

414 files changed

+11963
-4231
lines changed

.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,10 @@ STORY_PRIVATE_KEY= # Story private key
340340
STORY_API_BASE_URL= # Story API base URL
341341
STORY_API_KEY= # Story API key
342342
PINATA_JWT= # Pinata JWT for uploading files to IPFS
343+
344+
# Cronos zkEVM
345+
CRONOSZKEVM_ADDRESS=
346+
CRONOSZKEVM_PRIVATE_KEY=
347+
348+
# Fuel Ecosystem (FuelVM)
349+
FUEL_WALLET_PRIVATE_KEY=
+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: JSDoc Automation
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pull_number:
7+
description: 'Pull Request Number (if not provided, scans root_directory) - PR must be merged to develop branch'
8+
required: false
9+
type: string
10+
root_directory:
11+
description: 'Only scans files in this directory (relative to repository root, e.g., packages/core/src)'
12+
required: true
13+
default: 'packages/core/src/test_resources'
14+
type: string
15+
excluded_directories:
16+
description: 'Directories to exclude from scanning (comma-separated, relative to root_directory)'
17+
required: true
18+
default: 'node_modules,dist,test'
19+
type: string
20+
reviewers:
21+
description: 'Pull Request Reviewers (comma-separated GitHub usernames)'
22+
required: true
23+
default: ''
24+
type: string
25+
26+
jobs:
27+
generate-docs:
28+
runs-on: ubuntu-latest
29+
30+
env:
31+
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_PAT }}
32+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '23'
44+
45+
- name: Install pnpm
46+
uses: pnpm/action-setup@v2
47+
with:
48+
version: 8
49+
run_install: false
50+
51+
- name: Update lockfile
52+
working-directory: packages/jsdoc-automation
53+
run: |
54+
echo "Updating lockfile..."
55+
pnpm install --no-frozen-lockfile
56+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
57+
git config --global user.name "github-actions[bot]"
58+
git add pnpm-lock.yaml
59+
git commit -m "chore: update pnpm lockfile" || echo "No changes to commit"
60+
git push || echo "No changes to push"
61+
62+
- name: Install root dependencies
63+
run: pnpm install --no-frozen-lockfile
64+
65+
- name: Install package dependencies
66+
working-directory: packages/jsdoc-automation
67+
run: pnpm install --no-frozen-lockfile
68+
69+
- name: Run documentation generator
70+
working-directory: packages/jsdoc-automation
71+
run: |
72+
echo "Node version: $(node --version)"
73+
echo "NPM version: $(npm --version)"
74+
echo "Directory contents:"
75+
ls -la
76+
NODE_OPTIONS='--experimental-vm-modules --no-warnings' pnpm start
77+
env:
78+
INPUT_ROOT_DIRECTORY: ${{ inputs.root_directory }}
79+
INPUT_PULL_NUMBER: ${{ inputs.pull_number }}
80+
INPUT_EXCLUDED_DIRECTORIES: ${{ inputs.excluded_directories }}
81+
INPUT_REVIEWERS: ${{ inputs.reviewers }}

CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[discord server](https://discord.gg/ai16z).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

agent/jest.config.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
export default {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
extensionsToTreatAsEsm: ['.ts'],
6+
moduleNameMapper: {
7+
'^(\\.{1,2}/.*)\\.js$': '$1',
8+
},
9+
transform: {
10+
'^.+\\.tsx?$': [
11+
'ts-jest',
12+
{
13+
useESM: true,
14+
},
15+
],
16+
},
17+
};

agent/package.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"start": "node --loader ts-node/esm src/index.ts",
88
"dev": "node --loader ts-node/esm src/index.ts",
9-
"check-types": "tsc --noEmit"
9+
"check-types": "tsc --noEmit",
10+
"test": "jest"
1011
},
1112
"nodemonConfig": {
1213
"watch": [
@@ -52,12 +53,18 @@
5253
"@elizaos/plugin-multiversx": "workspace:*",
5354
"@elizaos/plugin-near": "workspace:*",
5455
"@elizaos/plugin-zksync-era": "workspace:*",
56+
"@elizaos/plugin-twitter": "workspace:*",
57+
"@elizaos/plugin-cronoszkevm": "workspace:*",
5558
"@elizaos/plugin-3d-generation": "workspace:*",
59+
"@elizaos/plugin-fuel": "workspace:*",
5660
"readline": "1.3.0",
5761
"ws": "8.18.0",
5862
"yargs": "17.7.2"
5963
},
6064
"devDependencies": {
65+
"@types/jest": "^29.5.14",
66+
"jest": "^29.7.0",
67+
"ts-jest": "^29.2.5",
6168
"ts-node": "10.9.2",
6269
"tsup": "8.3.5"
6370
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { Client, IAgentRuntime } from "@elizaos/core";
2+
import { describe, it, expect } from '@jest/globals';
3+
4+
// Helper function to identify client types
5+
function determineClientType(client: Client): string {
6+
// Check if client has a direct type identifier
7+
if ('type' in client) {
8+
return (client as any).type;
9+
}
10+
11+
// Check constructor name
12+
const constructorName = client.constructor?.name;
13+
if (constructorName && !constructorName.includes('Object')) {
14+
return constructorName.toLowerCase().replace('client', '');
15+
}
16+
17+
// Fallback: Generate a unique identifier
18+
return `client_${Date.now()}`;
19+
}
20+
21+
// Mock client implementations for testing
22+
class MockNamedClient implements Client {
23+
type = "named-client";
24+
async start(_runtime?: IAgentRuntime) { return this; }
25+
async stop(_runtime?: IAgentRuntime) { }
26+
}
27+
28+
class MockConstructorClient implements Client {
29+
async start(_runtime?: IAgentRuntime) { return this; }
30+
async stop(_runtime?: IAgentRuntime) { }
31+
}
32+
33+
const mockPlainClient: Client = {
34+
async start(_runtime?: IAgentRuntime) { return {}; },
35+
async stop(_runtime?: IAgentRuntime) { }
36+
};
37+
38+
describe("Client Type Identification", () => {
39+
it("should identify client type from type property", () => {
40+
const client = new MockNamedClient();
41+
expect(determineClientType(client)).toBe("named-client");
42+
});
43+
44+
it("should identify client type from constructor name", () => {
45+
const client = new MockConstructorClient();
46+
expect(determineClientType(client)).toBe("mockconstructor");
47+
});
48+
49+
it("should generate fallback identifier for plain objects", () => {
50+
const result = determineClientType(mockPlainClient);
51+
expect(result).toMatch(/^client_\d+$/);
52+
});
53+
});

0 commit comments

Comments
 (0)