neoagent 2.2.1-beta.7 → 2.2.1-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/index.md +1 -0
- package/docs/migration.md +238 -0
- package/lib/manager.js +99 -2
- package/lib/migrations.js +409 -0
- package/package.json +1 -1
- package/server/catalog_sources/store-bundles/skills/productivity/migration/SKILL.md +173 -0
- package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
- package/server/public/flutter_bootstrap.js +1 -1
- package/server/public/main.dart.js +72170 -70842
- package/server/routes/auth.js +13 -5
- package/server/routes/integrations.js +22 -0
- package/server/routes/messaging.js +41 -5
- package/server/routes/settings.js +1 -0
- package/server/services/integrations/google/provider.js +20 -2
- package/server/services/integrations/manager.js +79 -8
- package/server/services/messaging/access_policy.js +703 -0
- package/server/services/messaging/access_policy.test.js +228 -0
- package/server/services/messaging/automation.js +32 -95
- package/server/services/messaging/base.js +39 -0
- package/server/services/messaging/discord.js +61 -46
- package/server/services/messaging/http_platforms.js +178 -15
- package/server/services/messaging/manager.js +136 -69
- package/server/services/messaging/telegram.js +54 -40
- package/server/services/messaging/telnyx.js +43 -14
- package/server/services/messaging/whatsapp.js +27 -0
package/docs/index.md
CHANGED
|
@@ -47,3 +47,4 @@ Open the server URL, sign in, configure providers and messaging, then create a t
|
|
|
47
47
|
| Secrets and runtime settings | [Configuration](configuration.md) |
|
|
48
48
|
| Logs, updates, and repair | [Operations](operations.md) |
|
|
49
49
|
| OpenClaw comparison | [Why NeoAgent](why-neoagent.md) |
|
|
50
|
+
| Migration from OpenClaw/Hermes | [Migration Guide](migration.md) |
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: /migration
|
|
3
|
+
title: Migration Guide
|
|
4
|
+
sidebar_label: Migration
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Migration Guide
|
|
8
|
+
|
|
9
|
+
Migrate your existing agent setup from **OpenClaw** or **Hermes** to NeoAgent with a single command.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Detect existing installations and migrate
|
|
15
|
+
neoagent migrate
|
|
16
|
+
|
|
17
|
+
# Preview what would be migrated (dry run)
|
|
18
|
+
neoagent migrate dry-run
|
|
19
|
+
|
|
20
|
+
# Check migration status
|
|
21
|
+
neoagent migrate status
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## What Gets Migrated
|
|
25
|
+
|
|
26
|
+
| Data Type | OpenClaw | Hermes | Destination |
|
|
27
|
+
|-----------|----------|--------|-------------|
|
|
28
|
+
| **Skills** | `~/.openclaw/skills/*.md` | `~/.hermes/skills/*.md` | `~/.neoagent/agent-data/skills/openclaw-imports/` or `hermes-imports/` |
|
|
29
|
+
| **Memory** | `SOUL.md`, `MEMORY.md`, `USER.md` | `MEMORY.md`, `USER.md` | `~/.neoagent/agent-data/memory/openclaw/` or `hermes/` |
|
|
30
|
+
| **API Keys** | From `.env` | From `.env` | `~/.neoagent/.env` (merged with prompts on conflict) |
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
- NeoAgent installed (`npm install -g neoagent`)
|
|
35
|
+
- Existing OpenClaw (at `~/.openclaw/`) and/or Hermes (at `~/.hermes/`) installation
|
|
36
|
+
|
|
37
|
+
## Step-by-Step Migration
|
|
38
|
+
|
|
39
|
+
### 1. Run Migration Detection
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
neoagent migrate status
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This will show:
|
|
46
|
+
```
|
|
47
|
+
Source agents:
|
|
48
|
+
OpenClaw: FOUND
|
|
49
|
+
Hermes: FOUND
|
|
50
|
+
|
|
51
|
+
Run `neoagent migrate` to start migration.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Preview Migration (Optional)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
neoagent migrate dry-run
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Sample output:
|
|
61
|
+
```
|
|
62
|
+
=== Migration Dry Run ===
|
|
63
|
+
|
|
64
|
+
OpenClaw detection: FOUND
|
|
65
|
+
Skills: 5
|
|
66
|
+
Memories: 3
|
|
67
|
+
API keys: ANTHROPIC_API_KEY, OPENAI_API_KEY, TELEGRAM_BOT_TOKEN
|
|
68
|
+
Config: ~/.openclaw/openclaw.json
|
|
69
|
+
|
|
70
|
+
Hermes detection: FOUND
|
|
71
|
+
Skills: 3
|
|
72
|
+
Memories: 2
|
|
73
|
+
API keys: OPENAI_API_KEY, XAI_API_KEY
|
|
74
|
+
Config: ~/.hermes/config.yaml
|
|
75
|
+
|
|
76
|
+
Would migrate to:
|
|
77
|
+
Skills → ~/.neoagent/agent-data/skills/
|
|
78
|
+
Memories → ~/.neoagent/agent-data/memory/
|
|
79
|
+
API keys → ~/.neoagent/.env
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 3. Run Full Migration
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
neoagent migrate
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Interactive prompts:
|
|
89
|
+
```
|
|
90
|
+
=== NeoAgent Migration ===
|
|
91
|
+
|
|
92
|
+
-> OpenClaw detected at ~/.openclaw/
|
|
93
|
+
-> Hermes detected at ~/.hermes/
|
|
94
|
+
|
|
95
|
+
What would you like to migrate?
|
|
96
|
+
[1] Migrate from all detected sources
|
|
97
|
+
[2] Migrate from OpenClaw only
|
|
98
|
+
[3] Migrate from Hermes only
|
|
99
|
+
[4] Cancel
|
|
100
|
+
|
|
101
|
+
Choice [1]: 1
|
|
102
|
+
|
|
103
|
+
Scanning sources...
|
|
104
|
+
OpenClaw: 5 skills, 3 memories, 3 API keys
|
|
105
|
+
Hermes: 3 skills, 2 memories, 2 API keys
|
|
106
|
+
|
|
107
|
+
Migrating skills and memories...
|
|
108
|
+
→ Copied 5 skills to openclaw-imports/
|
|
109
|
+
→ Copied 3 skills to hermes-imports/
|
|
110
|
+
→ Copied 5 memory files
|
|
111
|
+
|
|
112
|
+
⚠️ API Key conflicts detected:
|
|
113
|
+
OPENAI_API_KEY exists in both sources
|
|
114
|
+
Existing in: neoagent
|
|
115
|
+
Incoming from: openclaw
|
|
116
|
+
[1] Keep existing
|
|
117
|
+
[2] Overwrite with new
|
|
118
|
+
[3] Skip this key
|
|
119
|
+
Choice [1]: 1
|
|
120
|
+
|
|
121
|
+
Merging API keys...
|
|
122
|
+
→ Merged 4 API keys
|
|
123
|
+
|
|
124
|
+
=== Migration Complete ===
|
|
125
|
+
|
|
126
|
+
Skills migrated to:
|
|
127
|
+
openclaw-imports/
|
|
128
|
+
hermes-imports/
|
|
129
|
+
|
|
130
|
+
Memories migrated to:
|
|
131
|
+
memory/openclaw/
|
|
132
|
+
memory/hermes/
|
|
133
|
+
|
|
134
|
+
Run `neoagent status` to verify the installation.
|
|
135
|
+
Run `neoagent start` to start the server.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Source Paths
|
|
139
|
+
|
|
140
|
+
### OpenClaw
|
|
141
|
+
|
|
142
|
+
| Data | Path |
|
|
143
|
+
|------|------|
|
|
144
|
+
| Config | `~/.openclaw/openclaw.json` |
|
|
145
|
+
| Workspace | `~/.openclaw/workspace/` |
|
|
146
|
+
| Skills | `~/.openclaw/skills/` |
|
|
147
|
+
| Memories | `~/.openclaw/workspace/SOUL.md`, `MEMORY.md`, `USER.md` |
|
|
148
|
+
| Legacy | `~/.clawdbot/` |
|
|
149
|
+
|
|
150
|
+
### Hermes
|
|
151
|
+
|
|
152
|
+
| Data | Path |
|
|
153
|
+
|------|------|
|
|
154
|
+
| Config | `~/.hermes/config.yaml` |
|
|
155
|
+
| Skills | `~/.hermes/skills/` |
|
|
156
|
+
| Memories | `~/.hermes/memories/MEMORY.md`, `USER.md` |
|
|
157
|
+
| API Keys | `~/.hermes/.env` |
|
|
158
|
+
|
|
159
|
+
## Target Paths (NeoAgent)
|
|
160
|
+
|
|
161
|
+
| Data | Path |
|
|
162
|
+
|------|------|
|
|
163
|
+
| Config | `~/.neoagent/.env` |
|
|
164
|
+
| Skills | `~/.neoagent/agent-data/skills/` |
|
|
165
|
+
| Memory | `~/.neoagent/agent-data/memory/` |
|
|
166
|
+
| Database | `~/.neoagent/data/neoagent.db` |
|
|
167
|
+
|
|
168
|
+
## API Keys Merged
|
|
169
|
+
|
|
170
|
+
The following API keys are automatically detected and merged:
|
|
171
|
+
|
|
172
|
+
- `ANTHROPIC_API_KEY`
|
|
173
|
+
- `OPENAI_API_KEY`
|
|
174
|
+
- `XAI_API_KEY`
|
|
175
|
+
- `GOOGLE_AI_KEY`
|
|
176
|
+
- `MINIMAX_API_KEY`
|
|
177
|
+
- `BRAVE_SEARCH_API_KEY`
|
|
178
|
+
- `DEEPGRAM_API_KEY`
|
|
179
|
+
- `TELEGRAM_BOT_TOKEN`
|
|
180
|
+
- `OPENROUTER_API_KEY`
|
|
181
|
+
- `ELEVENLABS_API_KEY`
|
|
182
|
+
- `SLACK_BOT_TOKEN`
|
|
183
|
+
- `DISCORD_BOT_TOKEN`
|
|
184
|
+
|
|
185
|
+
## Conflict Resolution
|
|
186
|
+
|
|
187
|
+
When an API key exists in multiple sources (including your existing NeoAgent config), you'll be prompted:
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
⚠️ Conflict: OPENAI_API_KEY
|
|
191
|
+
Existing in: neoagent
|
|
192
|
+
Incoming from: openclaw
|
|
193
|
+
[1] Keep existing
|
|
194
|
+
[2] Overwrite with new
|
|
195
|
+
[3] Skip this key
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Choose `1` to keep the NeoAgent value, `2` to overwrite with the imported value, or `3` to skip entirely.
|
|
199
|
+
|
|
200
|
+
## Post-Migration Steps
|
|
201
|
+
|
|
202
|
+
1. **Verify installation**: `neoagent status`
|
|
203
|
+
2. **Start server**: `neoagent start`
|
|
204
|
+
3. **Review imported skills**: Check `~/.neoagent/agent-data/skills/openclaw-imports/` and `hermes-imports/`
|
|
205
|
+
4. **Review imported memories**: Check `~/.neoagent/agent-data/memory/`
|
|
206
|
+
5. **Configure messaging channels**: If you had Telegram/Discord configured, verify settings in the NeoAgent UI
|
|
207
|
+
|
|
208
|
+
## Troubleshooting
|
|
209
|
+
|
|
210
|
+
### "No OpenClaw or Hermes installation detected"
|
|
211
|
+
|
|
212
|
+
Ensure your existing installation is at the default path (`~/.openclaw/` or `~/.hermes/`). If it's at a custom path, you can manually copy the data:
|
|
213
|
+
- Skills: Copy `.md` files to `~/.neoagent/agent-data/skills/`
|
|
214
|
+
- Memories: Copy to `~/.neoagent/agent-data/memory/`
|
|
215
|
+
- API keys: Merge into `~/.neoagent/.env`
|
|
216
|
+
|
|
217
|
+
### "Permission denied" errors
|
|
218
|
+
|
|
219
|
+
Ensure you have read permissions on the source directories and write permissions on `~/.neoagent/`.
|
|
220
|
+
|
|
221
|
+
### Migration partially failed
|
|
222
|
+
|
|
223
|
+
The migration is designed to be idempotent - you can re-run it. Only new files are copied; existing files are not overwritten.
|
|
224
|
+
|
|
225
|
+
## Manual Migration
|
|
226
|
+
|
|
227
|
+
If the automated migration doesn't work for your setup:
|
|
228
|
+
|
|
229
|
+
1. **Skills**: Copy skill `.md` files from source `skills/` directory to `~/.neoagent/agent-data/skills/[source]-imports/`
|
|
230
|
+
2. **Memory**: Copy `SOUL.md`, `MEMORY.md`, `USER.md` to `~/.neoagent/agent-data/memory/[source]/`
|
|
231
|
+
3. **API Keys**: Edit `~/.neoagent/.env` and add keys from source `.env` file
|
|
232
|
+
|
|
233
|
+
## Getting Help
|
|
234
|
+
|
|
235
|
+
If you encounter issues:
|
|
236
|
+
- Run `neoagent status` to check NeoAgent health
|
|
237
|
+
- Run `neoagent logs` to view logs
|
|
238
|
+
- Run `neoagent doctor` to diagnose issues
|
package/lib/manager.js
CHANGED
|
@@ -33,7 +33,14 @@ const {
|
|
|
33
33
|
} = require('../runtime/release_channel');
|
|
34
34
|
const { parseEnv } = require('../runtime/env');
|
|
35
35
|
const { createGitHelpers } = require('../runtime/git_helpers');
|
|
36
|
-
const {
|
|
36
|
+
const {
|
|
37
|
+
parseDeploymentMode
|
|
38
|
+
} = require('../server/utils/deployment');
|
|
39
|
+
const {
|
|
40
|
+
detectSourceAgents,
|
|
41
|
+
cmdMigrateDryRun,
|
|
42
|
+
cmdMigrateRun
|
|
43
|
+
} = require('./migrations');
|
|
37
44
|
|
|
38
45
|
const APP_NAME = 'NeoAgent';
|
|
39
46
|
const SERVICE_LABEL = 'com.neoagent';
|
|
@@ -582,6 +589,91 @@ async function cmdSetup() {
|
|
|
582
589
|
logOk(`Wrote ${ENV_FILE}`);
|
|
583
590
|
}
|
|
584
591
|
|
|
592
|
+
async function cmdMigrate(args = []) {
|
|
593
|
+
const subcommand = args[0] || 'run';
|
|
594
|
+
const sources = detectSourceAgents();
|
|
595
|
+
|
|
596
|
+
if (subcommand === '--help' || subcommand === '-h' || subcommand === 'help') {
|
|
597
|
+
console.log('\nNeoAgent Migration');
|
|
598
|
+
console.log('Usage: neoagent migrate [subcommand]');
|
|
599
|
+
console.log('');
|
|
600
|
+
console.log('Subcommands:');
|
|
601
|
+
console.log(' neoagent migrate Interactive migration (select sources)');
|
|
602
|
+
console.log(' neoagent migrate dry-run Preview what would be migrated');
|
|
603
|
+
console.log(' neoagent migrate status Show detected source agents');
|
|
604
|
+
console.log(' neoagent migrate openclaw-only Migrate from OpenClaw only');
|
|
605
|
+
console.log(' neoagent migrate hermes-only Migrate from Hermes only');
|
|
606
|
+
console.log('');
|
|
607
|
+
console.log('Migration searches for:');
|
|
608
|
+
console.log(' - OpenClaw at ~/.openclaw/');
|
|
609
|
+
console.log(' - Hermes at ~/.hermes/');
|
|
610
|
+
console.log('');
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
if (!sources.openclaw && !sources.hermes) {
|
|
615
|
+
logWarn('No OpenClaw or Hermes installation detected.');
|
|
616
|
+
logInfo('Migration searches for:');
|
|
617
|
+
logInfo(' - OpenClaw: ~/.openclaw/');
|
|
618
|
+
logInfo(' - Hermes: ~/.hermes/');
|
|
619
|
+
logInfo('\nIf you have an existing installation at a custom path,');
|
|
620
|
+
logInfo('please ensure the data is accessible and run this command again.');
|
|
621
|
+
logInfo('\nRun `neoagent migrate --help` for usage information.');
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
console.log('\n=== NeoAgent Migration ===\n');
|
|
626
|
+
if (sources.openclaw) logInfo('OpenClaw detected at ~/.openclaw/');
|
|
627
|
+
if (sources.hermes) logInfo('Hermes detected at ~/.hermes/');
|
|
628
|
+
|
|
629
|
+
if (subcommand === 'dry-run' || subcommand === '--dry-run') {
|
|
630
|
+
await cmdMigrateDryRun(sources);
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
if (subcommand === 'status') {
|
|
635
|
+
console.log('\nSource agents:');
|
|
636
|
+
console.log(` OpenClaw: ${sources.openclaw ? 'FOUND' : 'not found'}`);
|
|
637
|
+
console.log(` Hermes: ${sources.hermes ? 'FOUND' : 'not found'}`);
|
|
638
|
+
console.log('\nRun `neoagent migrate` to start migration.');
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (subcommand === 'openclaw-only') {
|
|
643
|
+
await cmdMigrateRun({ openclaw: true, hermes: false });
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
if (subcommand === 'hermes-only') {
|
|
648
|
+
await cmdMigrateRun({ openclaw: false, hermes: true });
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
653
|
+
console.log('\nWhat would you like to migrate?');
|
|
654
|
+
console.log(' [1] Migrate from all detected sources');
|
|
655
|
+
console.log(' [2] Migrate from OpenClaw only');
|
|
656
|
+
console.log(' [3] Migrate from Hermes only');
|
|
657
|
+
console.log(' [4] Cancel');
|
|
658
|
+
|
|
659
|
+
await new Promise((resolve) => {
|
|
660
|
+
rl.question(' Choice [1]: ', async (answer) => {
|
|
661
|
+
rl.close();
|
|
662
|
+
const choice = answer.trim() || '1';
|
|
663
|
+
|
|
664
|
+
if (choice === '1') {
|
|
665
|
+
await cmdMigrateRun(sources);
|
|
666
|
+
} else if (choice === '2') {
|
|
667
|
+
await cmdMigrateRun({ openclaw: true, hermes: false });
|
|
668
|
+
} else if (choice === '3') {
|
|
669
|
+
await cmdMigrateRun({ openclaw: false, hermes: true });
|
|
670
|
+
} else {
|
|
671
|
+
console.log('Migration cancelled.');
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
|
|
585
677
|
function installDependencies() {
|
|
586
678
|
heading('Dependencies');
|
|
587
679
|
runOrThrow('npm', ['install', '--omit=dev', '--no-audit', '--no-fund'], {
|
|
@@ -970,10 +1062,12 @@ async function cmdEnv(args = []) {
|
|
|
970
1062
|
function printHelp() {
|
|
971
1063
|
console.log(`${APP_NAME} manager`);
|
|
972
1064
|
console.log('Usage: neoagent <command>');
|
|
973
|
-
console.log('Commands: install | setup | env | channel | update | restart | start | stop | status | logs | uninstall');
|
|
1065
|
+
console.log('Commands: install | setup | env | channel | update | restart | start | stop | status | logs | uninstall | migrate');
|
|
974
1066
|
console.log('Channel usage: neoagent channel | neoagent channel stable | neoagent channel beta');
|
|
975
1067
|
console.log('Update usage: neoagent update | neoagent update stable | neoagent update beta');
|
|
976
1068
|
console.log('Env usage: neoagent env list | neoagent env get PORT | neoagent env set PORT 3333 | neoagent env unset PORT');
|
|
1069
|
+
console.log('Migrate usage: neoagent migrate | neoagent migrate dry-run | neoagent migrate status');
|
|
1070
|
+
console.log(' neoagent migrate openclaw-only | neoagent migrate hermes-only');
|
|
977
1071
|
}
|
|
978
1072
|
|
|
979
1073
|
async function runCLI(argv) {
|
|
@@ -1015,6 +1109,9 @@ async function runCLI(argv) {
|
|
|
1015
1109
|
case 'uninstall':
|
|
1016
1110
|
cmdUninstall();
|
|
1017
1111
|
break;
|
|
1112
|
+
case 'migrate':
|
|
1113
|
+
await cmdMigrate(argv.slice(1));
|
|
1114
|
+
break;
|
|
1018
1115
|
case 'help':
|
|
1019
1116
|
case '--help':
|
|
1020
1117
|
case '-h':
|