Skip to content

Commit 73c2931

Browse files
authored
Merge branch 'develop' into realitySpiral/greetingworkflow
2 parents 3d37e00 + c823cac commit 73c2931

File tree

5 files changed

+164
-39
lines changed

5 files changed

+164
-39
lines changed
+5-29
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
1-
name: integration-test
1+
name: Integration Tests
22
on:
33
push:
44
branches:
55
- "*"
6-
pull_request:
6+
pull_request_target:
77
branches:
88
- "*"
9-
jobs:
10-
smoke-tests:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
15-
- uses: pnpm/action-setup@v3
16-
with:
17-
version: 9.4.0
189

19-
- uses: actions/setup-node@v4
20-
with:
21-
node-version: "23"
22-
cache: "pnpm"
23-
24-
- name: Run smoke tests
25-
run: pnpm run smokeTests
10+
jobs:
2611
integration-tests:
2712
runs-on: ubuntu-latest
2813
env:
@@ -46,20 +31,11 @@ jobs:
4631
run: pnpm build
4732

4833
- name: Check for API key
49-
id: check_api_key
5034
run: |
5135
if [ -z "$OPENAI_API_KEY" ]; then
52-
echo "::set-output name=api_key_present::false"
53-
else
54-
echo "::set-output name=api_key_present::true"
36+
echo "Error: OPENAI_API_KEY is not set."
37+
exit 1
5538
fi
5639
5740
- name: Run integration tests
58-
if: steps.check_api_key.outputs.api_key_present == 'true'
5941
run: pnpm run integrationTests
60-
61-
- name: Skip integration tests
62-
if: steps.check_api_key.outputs.api_key_present == 'false'
63-
run: |
64-
echo "Skipping integration tests due to missing required API keys"
65-
exit 1

.github/workflows/smoke-tests.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: smoke-test
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
pull_request:
7+
branches:
8+
- "*"
9+
10+
jobs:
11+
smoke-tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: pnpm/action-setup@v3
17+
with:
18+
version: 9.4.0
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "23"
23+
cache: "pnpm"
24+
25+
- name: Run smoke tests
26+
run: pnpm run smokeTests

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ cd eliza-starter
5555
cp .env.example .env
5656
pnpm i && pnpm build && pnpm start
5757
```
58+
Once the agent is running, You should see the message to run "pnpm start:client" at the end.
59+
Open another terminal and move to same directory and then run below command and follow the URL to chat to your agent.
60+
```bash
61+
pnpm start:client
62+
```
5863

5964
Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza.
6065

docs/docs/quickstart.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,15 @@ pnpm start --characters="characters/trump.character.json,characters/tate.charact
213213

214214
1. **Node.js Version**
215215

216-
- Ensure Node.js 23.3.0 is installed
217-
- Use `node -v` to check version
218-
- Consider using [nvm](https://github.com/nvm-sh/nvm) to manage Node versions
216+
- Ensure Node.js 23.3.0 is installed
217+
- Use `node -v` to check version
218+
- Consider using [nvm](https://github.com/nvm-sh/nvm) to manage Node versions
219+
220+
NOTE: pnpm may be bundled with a different node version, ignoring nvm. If this is the case, you can use
221+
```bash
222+
pnpm env use --global 23.3.0
223+
```
224+
to force it to use the correct one.
219225

220226
2. **Sharp Installation**
221227
If you see Sharp-related errors:

packages/plugin-0g/readme.md

+119-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,125 @@
33
A plugin for storing data using the 0G protocol within the ElizaOS ecosystem.
44

55
## Description
6-
76
The 0G plugin enables seamless integration with the Zero Gravity (0G) protocol for decentralized file storage. It provides functionality to upload files to the 0G network.
87

9-
## Future work
8+
## Installation
9+
10+
```bash
11+
pnpm install @elizaos/plugin-0g
12+
```
13+
14+
## Configuration
15+
16+
The plugin requires the following environment variables to be set:
17+
```typescript
18+
ZEROG_INDEXER_RPC=<0G indexer RPC endpoint>
19+
ZEROG_EVM_RPC=<0G EVM RPC endpoint>
20+
ZEROG_PRIVATE_KEY=<Private key for transactions>
21+
ZEROG_FLOW_ADDRESS=<0G Flow contract address>
22+
```
23+
24+
## Usage
25+
26+
### Basic Integration
27+
28+
```typescript
29+
import { zgPlugin } from '@ai16z/plugin-0g';
30+
```
31+
32+
33+
### File Upload Example
34+
35+
```typescript
36+
// The plugin automatically handles file uploads when triggered
37+
// through natural language commands like:
38+
39+
"Upload my document.pdf"
40+
"Store this image.png on 0G"
41+
"Save my resume.docx to Zero Gravity"
42+
```
43+
44+
45+
## API Reference
46+
47+
### Actions
48+
49+
#### ZG_UPLOAD
50+
51+
Uploads files to the 0G network.
52+
53+
**Aliases:**
54+
- UPLOAD_FILE_TO_ZG
55+
- STORE_FILE_ON_ZG
56+
- SAVE_FILE_TO_ZG
57+
- UPLOAD_TO_ZERO_GRAVITY
58+
- STORE_ON_ZERO_GRAVITY
59+
- SHARE_FILE_ON_ZG
60+
- PUBLISH_FILE_TO_ZG
61+
62+
**Input Content:**
63+
```typescript
64+
interface UploadContent {
65+
filePath: string;
66+
}
67+
```
68+
69+
70+
## Common Issues & Troubleshooting
71+
72+
1. **File Access Errors**
73+
- Ensure the file exists at the specified path
74+
- Check file permissions
75+
- Verify the path is absolute or relative to the execution context
76+
77+
2. **Configuration Issues**
78+
- Verify all required environment variables are set
79+
- Ensure RPC endpoints are accessible
80+
- Confirm private key has sufficient permissions
81+
82+
## Security Best Practices
83+
84+
1. **Environment Variables**
85+
- Never commit private keys to version control
86+
- Use secure environment variable management
87+
- Rotate private keys periodically
88+
89+
90+
## Development Guide
91+
92+
### Setting Up Development Environment
93+
94+
1. Clone the repository
95+
2. Install dependencies:
96+
97+
```bash
98+
pnpm install
99+
```
100+
101+
3. Build the plugin:
102+
103+
```bash
104+
pnpm run build
105+
```
106+
107+
4. Run the plugin:
108+
109+
```bash
110+
pnpm run dev
111+
```
112+
113+
## Future Enhancements
114+
115+
- Model service deployment on 0G serving network
116+
- 0G KV store for plugin state persistence
117+
- Upload history and file metadata storage
118+
- 0G as a database option for Eliza state storage
119+
- Enhanced file path and context extraction
120+
121+
## Contributing
122+
123+
Contributions are welcome! Please see our contributing guidelines for more details.
124+
125+
## License
10126

11-
- Enable model service deployment on 0G serving network.
12-
- Implement 0G KV store for plugin state persistence .
13-
- Store upload history and file metadata.
14-
- Provide 0G as a db option for Eliza to store its memory/state.
15-
- Enhance file path and context extraction.
127+
[License information needed]

0 commit comments

Comments
 (0)