@dp-pcs/ogp 0.3.3 → 0.4.2
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/README.md +275 -49
- package/dist/cli/completion.d.ts +5 -0
- package/dist/cli/completion.d.ts.map +1 -0
- package/dist/cli/completion.js +148 -0
- package/dist/cli/completion.js.map +1 -0
- package/dist/cli/config.d.ts +3 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +207 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/expose.d.ts.map +1 -1
- package/dist/cli/expose.js +20 -13
- package/dist/cli/expose.js.map +1 -1
- package/dist/cli/federation.d.ts.map +1 -1
- package/dist/cli/federation.js +182 -6
- package/dist/cli/federation.js.map +1 -1
- package/dist/cli/setup.d.ts +19 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +507 -32
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +348 -32
- package/dist/cli.js.map +1 -1
- package/dist/daemon/agent-comms.d.ts.map +1 -1
- package/dist/daemon/agent-comms.js +14 -9
- package/dist/daemon/agent-comms.js.map +1 -1
- package/dist/daemon/intent-registry.d.ts.map +1 -1
- package/dist/daemon/intent-registry.js +7 -4
- package/dist/daemon/intent-registry.js.map +1 -1
- package/dist/daemon/keypair.d.ts.map +1 -1
- package/dist/daemon/keypair.js +34 -13
- package/dist/daemon/keypair.js.map +1 -1
- package/dist/daemon/message-handler.d.ts.map +1 -1
- package/dist/daemon/message-handler.js +7 -0
- package/dist/daemon/message-handler.js.map +1 -1
- package/dist/daemon/notify.d.ts +19 -0
- package/dist/daemon/notify.d.ts.map +1 -1
- package/dist/daemon/notify.js +329 -73
- package/dist/daemon/notify.js.map +1 -1
- package/dist/daemon/openclaw-bridge.d.ts +34 -0
- package/dist/daemon/openclaw-bridge.d.ts.map +1 -0
- package/dist/daemon/openclaw-bridge.js +261 -0
- package/dist/daemon/openclaw-bridge.js.map +1 -0
- package/dist/daemon/peers.d.ts +8 -0
- package/dist/daemon/peers.d.ts.map +1 -1
- package/dist/daemon/peers.js +48 -14
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/projects.d.ts.map +1 -1
- package/dist/daemon/projects.js +7 -4
- package/dist/daemon/projects.js.map +1 -1
- package/dist/daemon/server.d.ts +16 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +147 -46
- package/dist/daemon/server.js.map +1 -1
- package/dist/shared/config.d.ts +52 -1
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js +18 -11
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/framework-detection.d.ts +31 -0
- package/dist/shared/framework-detection.d.ts.map +1 -0
- package/dist/shared/framework-detection.js +91 -0
- package/dist/shared/framework-detection.js.map +1 -0
- package/dist/shared/help.d.ts +5 -0
- package/dist/shared/help.d.ts.map +1 -0
- package/dist/shared/help.js +280 -0
- package/dist/shared/help.js.map +1 -0
- package/dist/shared/meta-config.d.ts +44 -0
- package/dist/shared/meta-config.d.ts.map +1 -0
- package/dist/shared/meta-config.js +89 -0
- package/dist/shared/meta-config.js.map +1 -0
- package/dist/shared/migration.d.ts +57 -0
- package/dist/shared/migration.d.ts.map +1 -0
- package/dist/shared/migration.js +255 -0
- package/dist/shared/migration.js.map +1 -0
- package/docs/CLI-REFERENCE.md +1360 -0
- package/docs/GETTING-STARTED.md +942 -0
- package/docs/MIGRATION.md +202 -0
- package/docs/MULTI-FRAMEWORK-DEMO.md +352 -0
- package/docs/MULTI-FRAMEWORK-DESIGN.md +378 -0
- package/docs/MULTI-FRAMEWORK-IMPL.md +197 -0
- package/docs/case-studies/CRASH_RESOLUTION_20260407.md +190 -0
- package/docs/case-studies/OpenClaw_Hermes_Status_Report_20260407.md +142 -0
- package/docs/case-studies/OpenClaw_Stability_Fix_Summary.md +209 -0
- package/docs/case-studies/README.md +40 -0
- package/docs/case-studies/crash_observations.md +250 -0
- package/docs/federation-flow.md +21 -31
- package/docs/hermes-implementation-checklist.md +4 -0
- package/docs/rendezvous.md +13 -14
- package/package.json +9 -3
- package/scripts/completion.bash +123 -0
- package/scripts/completion.zsh +372 -0
- package/scripts/test-migration-execute.js +74 -0
- package/scripts/test-migration.js +42 -0
- package/skills/ogp/SKILL.md +197 -64
- package/skills/ogp-agent-comms/SKILL.md +107 -41
- package/skills/ogp-expose/SKILL.md +84 -21
- package/skills/ogp-project/SKILL.md +66 -58
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# OGP Migration Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The OGP migration system helps users transition from legacy single-framework installations to the new multi-framework meta-configuration system introduced in OGP 0.4.0+.
|
|
6
|
+
|
|
7
|
+
## What Gets Migrated
|
|
8
|
+
|
|
9
|
+
The migration system automatically detects and migrates:
|
|
10
|
+
|
|
11
|
+
1. **OpenClaw installations** at `~/.ogp/`
|
|
12
|
+
2. **Hermes installations** at `~/.ogp-hermes/`
|
|
13
|
+
3. **Standalone OGP installations** at `~/.ogp/`
|
|
14
|
+
|
|
15
|
+
## Migration Logic
|
|
16
|
+
|
|
17
|
+
### Framework Detection
|
|
18
|
+
|
|
19
|
+
The migration system determines framework type by checking:
|
|
20
|
+
|
|
21
|
+
1. **Explicit `platform` field** in config.json (takes precedence)
|
|
22
|
+
- `"platform": "openclaw"` → OpenClaw
|
|
23
|
+
- `"platform": "hermes"` → Hermes
|
|
24
|
+
|
|
25
|
+
2. **Framework-specific fields** (heuristics)
|
|
26
|
+
- Has `hermesWebhookUrl` or `hermesWebhookSecret` → Hermes
|
|
27
|
+
- Has `openclawUrl` and `openclawToken` → OpenClaw
|
|
28
|
+
- Otherwise → Standalone
|
|
29
|
+
|
|
30
|
+
### Migration Actions
|
|
31
|
+
|
|
32
|
+
#### Single Installation Scenarios
|
|
33
|
+
|
|
34
|
+
**Scenario 1: Only `~/.ogp/` exists (OpenClaw)**
|
|
35
|
+
```
|
|
36
|
+
Actions:
|
|
37
|
+
1. Rename ~/.ogp → ~/.ogp-openclaw
|
|
38
|
+
2. Create meta config at ~/.ogp-meta/config.json
|
|
39
|
+
3. Register OpenClaw framework
|
|
40
|
+
4. Set default to 'openclaw'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Scenario 2: Only `~/.ogp/` exists (Standalone)**
|
|
44
|
+
```
|
|
45
|
+
Actions:
|
|
46
|
+
1. Keep ~/.ogp as-is (no rename)
|
|
47
|
+
2. Create meta config at ~/.ogp-meta/config.json
|
|
48
|
+
3. Register standalone framework
|
|
49
|
+
4. Set default to 'standalone'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Scenario 3: Only `~/.ogp-hermes/` exists**
|
|
53
|
+
```
|
|
54
|
+
Actions:
|
|
55
|
+
1. Keep ~/.ogp-hermes as-is
|
|
56
|
+
2. Create meta config at ~/.ogp-meta/config.json
|
|
57
|
+
3. Register Hermes framework
|
|
58
|
+
4. Set default to 'hermes'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Multi-Installation Scenario
|
|
62
|
+
|
|
63
|
+
**Scenario 4: Both `~/.ogp/` and `~/.ogp-hermes/` exist**
|
|
64
|
+
```
|
|
65
|
+
Actions:
|
|
66
|
+
1. Rename ~/.ogp → ~/.ogp-openclaw (if OpenClaw)
|
|
67
|
+
2. Keep ~/.ogp-hermes as-is
|
|
68
|
+
3. Create meta config at ~/.ogp-meta/config.json
|
|
69
|
+
4. Register both frameworks
|
|
70
|
+
5. Set default to 'openclaw'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
### Programmatic API
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import {
|
|
79
|
+
detectExistingInstallations,
|
|
80
|
+
executeMigration,
|
|
81
|
+
checkMigrationStatus,
|
|
82
|
+
type MigrationPlan
|
|
83
|
+
} from '@dp-pcs/ogp/dist/shared/migration.js';
|
|
84
|
+
|
|
85
|
+
// Check if migration is needed
|
|
86
|
+
const status = checkMigrationStatus();
|
|
87
|
+
if (status.migrationNeeded) {
|
|
88
|
+
console.log(status.summary);
|
|
89
|
+
|
|
90
|
+
// Get detailed plan
|
|
91
|
+
const plan = detectExistingInstallations();
|
|
92
|
+
|
|
93
|
+
// Execute migration
|
|
94
|
+
await executeMigration(plan);
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Testing Scripts
|
|
99
|
+
|
|
100
|
+
Two test scripts are provided:
|
|
101
|
+
|
|
102
|
+
#### 1. Detection Test (Read-only)
|
|
103
|
+
```bash
|
|
104
|
+
node scripts/test-migration.js
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Shows what would be migrated without making changes.
|
|
108
|
+
|
|
109
|
+
#### 2. Execution Test
|
|
110
|
+
```bash
|
|
111
|
+
# Dry run (shows plan, no changes)
|
|
112
|
+
node scripts/test-migration-execute.js --dry-run
|
|
113
|
+
|
|
114
|
+
# Execute migration
|
|
115
|
+
node scripts/test-migration-execute.js
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Migration Plan Structure
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
interface MigrationPlan {
|
|
122
|
+
needed: boolean; // Is migration required?
|
|
123
|
+
existingInstalls: Array<{
|
|
124
|
+
path: string; // e.g., "/Users/alice/.ogp"
|
|
125
|
+
framework: FrameworkType; // 'openclaw' | 'hermes' | 'standalone'
|
|
126
|
+
config: OGPConfig; // Full config object
|
|
127
|
+
}>;
|
|
128
|
+
actions: Array<{
|
|
129
|
+
type: 'rename' | 'create-meta' | 'register';
|
|
130
|
+
from?: string; // Source path (for rename)
|
|
131
|
+
to?: string; // Target path (for rename)
|
|
132
|
+
framework?: FrameworkType; // Framework being operated on
|
|
133
|
+
description: string; // Human-readable description
|
|
134
|
+
}>;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Safety Features
|
|
139
|
+
|
|
140
|
+
1. **Backup Creation**: Before renaming, creates timestamped backup
|
|
141
|
+
```
|
|
142
|
+
~/.ogp.backup-1712345678901
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
2. **Rollback on Error**: If rename fails, automatically restores from backup
|
|
146
|
+
|
|
147
|
+
3. **Validation**: Checks target doesn't exist before renaming
|
|
148
|
+
|
|
149
|
+
4. **Idempotency**: Safe to run multiple times - detects if already migrated
|
|
150
|
+
|
|
151
|
+
## Post-Migration
|
|
152
|
+
|
|
153
|
+
After migration, users have:
|
|
154
|
+
|
|
155
|
+
1. **Meta Config** at `~/.ogp-meta/config.json`
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"version": "1.0.0",
|
|
159
|
+
"frameworks": [
|
|
160
|
+
{
|
|
161
|
+
"id": "openclaw",
|
|
162
|
+
"name": "OpenClaw",
|
|
163
|
+
"enabled": true,
|
|
164
|
+
"configDir": "/Users/alice/.ogp-openclaw",
|
|
165
|
+
"daemonPort": 18790,
|
|
166
|
+
"gatewayUrl": "https://alice.example.com",
|
|
167
|
+
"displayName": "Alice @ OpenClaw",
|
|
168
|
+
"platform": "openclaw"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "hermes",
|
|
172
|
+
"name": "Hermes",
|
|
173
|
+
"enabled": true,
|
|
174
|
+
"configDir": "/Users/alice/.ogp-hermes",
|
|
175
|
+
"daemonPort": 18793,
|
|
176
|
+
"gatewayUrl": "https://hermes.alice.example.com",
|
|
177
|
+
"displayName": "Alice @ Hermes",
|
|
178
|
+
"platform": "hermes"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"default": "openclaw"
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
2. **Framework-specific configs** preserved in their directories
|
|
186
|
+
|
|
187
|
+
3. **All existing data** (peers.json, keypair.json, etc.) intact
|
|
188
|
+
|
|
189
|
+
## Integration with Setup Flow
|
|
190
|
+
|
|
191
|
+
The migration will be integrated into the setup flow:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
ogp setup
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Will:
|
|
198
|
+
1. Detect existing installations
|
|
199
|
+
2. Show migration plan
|
|
200
|
+
3. Prompt user to confirm
|
|
201
|
+
4. Execute migration if approved
|
|
202
|
+
5. Continue with multi-framework setup
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# Multi-Framework User Experience Demo
|
|
2
|
+
|
|
3
|
+
## Scenario 1: Fresh Install (Both Frameworks Detected)
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
$ ogp setup
|
|
7
|
+
|
|
8
|
+
___ ____ ____
|
|
9
|
+
/ _ \ / ___| _ \
|
|
10
|
+
| | | | | _| |_) |
|
|
11
|
+
| |_| | |_| | __/
|
|
12
|
+
\___/ \____|_|
|
|
13
|
+
|
|
14
|
+
Open Gateway Protocol v0.3.4
|
|
15
|
+
|
|
16
|
+
🔍 Detecting installed AI frameworks...
|
|
17
|
+
✓ Found OpenClaw at ~/.openclaw/
|
|
18
|
+
✓ Found Hermes at ~/.hermes/
|
|
19
|
+
|
|
20
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
21
|
+
Which frameworks do you want to enable OGP for?
|
|
22
|
+
Use ↑↓ to navigate, space to select, enter to continue
|
|
23
|
+
|
|
24
|
+
[x] OpenClaw - AI agent framework by OpenClaw
|
|
25
|
+
[x] Hermes - Multi-platform AI orchestration system
|
|
26
|
+
[ ] Standalone (no framework integration)
|
|
27
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
28
|
+
|
|
29
|
+
✓ Selected: OpenClaw, Hermes
|
|
30
|
+
|
|
31
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
32
|
+
Configure OpenClaw
|
|
33
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
34
|
+
|
|
35
|
+
Gateway URL: https://ogp.sarcastek.com
|
|
36
|
+
Display Name: Junior @ OpenClaw
|
|
37
|
+
Email: david@theproctors.cloud
|
|
38
|
+
|
|
39
|
+
✓ OpenClaw configured
|
|
40
|
+
Config: ~/.ogp-openclaw/
|
|
41
|
+
Daemon: http://localhost:18790
|
|
42
|
+
Keychain: ogp-federation-83751d84
|
|
43
|
+
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
Configure Hermes
|
|
46
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
47
|
+
|
|
48
|
+
Gateway URL: https://hermes.sarcastek.com
|
|
49
|
+
Display Name: Apollo @ Hermes
|
|
50
|
+
Email: david@example.com
|
|
51
|
+
Platform: hermes (detected)
|
|
52
|
+
|
|
53
|
+
Hermes webhook configuration:
|
|
54
|
+
URL: http://localhost:8644/webhooks/ogp_federation
|
|
55
|
+
Secret: ************ (auto-generated)
|
|
56
|
+
|
|
57
|
+
✓ Hermes configured
|
|
58
|
+
Config: ~/.ogp-hermes/
|
|
59
|
+
Daemon: http://localhost:18793
|
|
60
|
+
Keychain: ogp-federation-79055744
|
|
61
|
+
|
|
62
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
+
Summary
|
|
64
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
65
|
+
|
|
66
|
+
✓ OGP configured for 2 frameworks:
|
|
67
|
+
- OpenClaw (Junior @ OpenClaw)
|
|
68
|
+
- Hermes (Apollo @ Hermes)
|
|
69
|
+
|
|
70
|
+
Default framework: openclaw
|
|
71
|
+
|
|
72
|
+
Next steps:
|
|
73
|
+
1. Start daemons:
|
|
74
|
+
ogp start --all
|
|
75
|
+
|
|
76
|
+
2. Send a federation request:
|
|
77
|
+
ogp --for hermes federation request https://ogp.sarcastek.com
|
|
78
|
+
|
|
79
|
+
3. Manage peers:
|
|
80
|
+
ogp federation list # Lists peers for default framework
|
|
81
|
+
ogp --for hermes federation list # Lists peers for Hermes
|
|
82
|
+
ogp --for all federation list # Lists peers for all frameworks
|
|
83
|
+
|
|
84
|
+
Tips:
|
|
85
|
+
- Set a different default: ogp config set-default hermes
|
|
86
|
+
- Create aliases: ogp alias add oc openclaw
|
|
87
|
+
- Enable tab completion: ogp completion install
|
|
88
|
+
- Get help anytime: ogp federation ?
|
|
89
|
+
|
|
90
|
+
Happy federating! 🚀
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Scenario 2: Day-to-Day Usage
|
|
94
|
+
|
|
95
|
+
### Starting daemons
|
|
96
|
+
```bash
|
|
97
|
+
$ ogp start --all
|
|
98
|
+
✓ Started OpenClaw daemon (PID: 12345) on http://localhost:18790
|
|
99
|
+
✓ Started Hermes daemon (PID: 12346) on http://localhost:18793
|
|
100
|
+
|
|
101
|
+
$ ogp status
|
|
102
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
103
|
+
OGP Daemon Status
|
|
104
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
105
|
+
|
|
106
|
+
Framework Status PID Port Uptime Gateway
|
|
107
|
+
─────────────────────────────────────────────────────────────
|
|
108
|
+
OpenClaw Running 12345 18790 2m 34s https://ogp.sarcastek.com
|
|
109
|
+
Hermes Running 12346 18793 2m 34s https://hermes.sarcastek.com
|
|
110
|
+
|
|
111
|
+
Rendezvous: https://rendezvous.elelem.expert (⚠️ 503 unavailable)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Using default framework (no --for needed)
|
|
115
|
+
```bash
|
|
116
|
+
$ ogp federation list
|
|
117
|
+
|
|
118
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
119
|
+
Federation Peers (OpenClaw)
|
|
120
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
121
|
+
|
|
122
|
+
ALIAS DISPLAY NAME STATUS SCOPES
|
|
123
|
+
──────────────────────────────────────────────────────────────
|
|
124
|
+
apollo Apollo @ Hermes approved message, agent-comms, project.*
|
|
125
|
+
|
|
126
|
+
Gateway: https://hermes.sarcastek.com
|
|
127
|
+
ID: 302a300506032b6570032100e9dc2284
|
|
128
|
+
Agent-comms: general → summary
|
|
129
|
+
|
|
130
|
+
Tip: Use `--for all` to see peers across all frameworks
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Using specific framework
|
|
134
|
+
```bash
|
|
135
|
+
$ ogp --for hermes federation list
|
|
136
|
+
|
|
137
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
138
|
+
Federation Peers (Hermes)
|
|
139
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
+
|
|
141
|
+
ALIAS DISPLAY NAME STATUS SCOPES
|
|
142
|
+
──────────────────────────────────────────────────────────────
|
|
143
|
+
junior Junior @ OpenClaw approved message, agent-comms, project.*
|
|
144
|
+
|
|
145
|
+
Gateway: https://ogp.sarcastek.com
|
|
146
|
+
ID: 302a300506032b6570032100c3068604
|
|
147
|
+
Agent-comms: general → summary
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Using `--for all` for cross-framework view
|
|
151
|
+
```bash
|
|
152
|
+
$ ogp --for all federation list
|
|
153
|
+
|
|
154
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
155
|
+
Federation Peers (All Frameworks)
|
|
156
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
157
|
+
|
|
158
|
+
OpenClaw (Junior @ OpenClaw)
|
|
159
|
+
apollo Apollo @ Hermes approved message, agent-comms, project.*
|
|
160
|
+
|
|
161
|
+
Hermes (Apollo @ Hermes)
|
|
162
|
+
junior Junior @ OpenClaw approved message, agent-comms, project.*
|
|
163
|
+
|
|
164
|
+
Total: 2 peers across 2 frameworks
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Tab completion in action
|
|
168
|
+
```bash
|
|
169
|
+
$ ogp <TAB><TAB>
|
|
170
|
+
setup start stop status
|
|
171
|
+
federation agent-comms config completion
|
|
172
|
+
|
|
173
|
+
$ ogp fed<TAB>
|
|
174
|
+
$ ogp federation <TAB><TAB>
|
|
175
|
+
list request approve reject remove
|
|
176
|
+
send agent scopes alias
|
|
177
|
+
|
|
178
|
+
$ ogp --for <TAB><TAB>
|
|
179
|
+
openclaw hermes all
|
|
180
|
+
|
|
181
|
+
$ ogp --for hermes federation agent <TAB><TAB>
|
|
182
|
+
junior 302a300506032b6570032100c3068604
|
|
183
|
+
|
|
184
|
+
$ ogp federation agent junior<TAB> <TAB><TAB>
|
|
185
|
+
general debug alerts status
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### `?` style help
|
|
189
|
+
```bash
|
|
190
|
+
$ ogp ?
|
|
191
|
+
Available commands:
|
|
192
|
+
setup Initialize OGP configuration
|
|
193
|
+
start Start OGP daemon(s)
|
|
194
|
+
stop Stop OGP daemon(s)
|
|
195
|
+
status Show daemon status
|
|
196
|
+
federation Manage federation peers
|
|
197
|
+
agent-comms Configure agent-to-agent messaging
|
|
198
|
+
config Manage configuration
|
|
199
|
+
completion Install shell completion
|
|
200
|
+
|
|
201
|
+
Options:
|
|
202
|
+
--for <framework> Select framework (openclaw, hermes, all)
|
|
203
|
+
--help Show help
|
|
204
|
+
--version Show version
|
|
205
|
+
|
|
206
|
+
Examples:
|
|
207
|
+
ogp setup # Interactive setup wizard
|
|
208
|
+
ogp start --all # Start all framework daemons
|
|
209
|
+
ogp --for hermes federation list # List Hermes peers
|
|
210
|
+
ogp federation ? # Show federation commands
|
|
211
|
+
|
|
212
|
+
$ ogp federation ?
|
|
213
|
+
Available commands:
|
|
214
|
+
list List all peers
|
|
215
|
+
request Send federation request to another gateway
|
|
216
|
+
approve Approve a pending peer
|
|
217
|
+
reject Reject a pending peer
|
|
218
|
+
remove Remove a peer
|
|
219
|
+
send Send a message to a peer
|
|
220
|
+
agent Send agent-comms message
|
|
221
|
+
scopes View or update peer scopes
|
|
222
|
+
alias Set an alias for a peer
|
|
223
|
+
|
|
224
|
+
Examples:
|
|
225
|
+
ogp federation list --status pending
|
|
226
|
+
ogp federation request https://peer.example.com
|
|
227
|
+
ogp federation agent apollo general "Hello!"
|
|
228
|
+
|
|
229
|
+
$ ogp federation agent ?
|
|
230
|
+
Usage: ogp federation agent <peer> <topic> <message> [options]
|
|
231
|
+
|
|
232
|
+
Send an agent-comms message to a federated peer.
|
|
233
|
+
|
|
234
|
+
Arguments:
|
|
235
|
+
peer Peer identifier (alias, ID, or display name)
|
|
236
|
+
topic Message topic (e.g., general, debug, alerts)
|
|
237
|
+
message Message text
|
|
238
|
+
|
|
239
|
+
Options:
|
|
240
|
+
--priority <level> Message priority (low, normal, high)
|
|
241
|
+
--conversation-id <id> Thread conversation ID
|
|
242
|
+
--wait-for-reply Wait for peer response
|
|
243
|
+
|
|
244
|
+
Available peers (OpenClaw):
|
|
245
|
+
apollo Apollo @ Hermes (approved)
|
|
246
|
+
|
|
247
|
+
Examples:
|
|
248
|
+
ogp federation agent apollo general "Status update"
|
|
249
|
+
ogp federation agent apollo debug "Error in module X" --priority high
|
|
250
|
+
ogp --for hermes federation agent junior general "Hello from Hermes!"
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Scenario 3: Switching Default Framework
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
$ ogp config set-default hermes
|
|
257
|
+
✓ Default framework: hermes
|
|
258
|
+
|
|
259
|
+
$ ogp federation list
|
|
260
|
+
# Now automatically uses Hermes instead of OpenClaw
|
|
261
|
+
|
|
262
|
+
$ ogp config set-default openclaw
|
|
263
|
+
✓ Default framework: openclaw
|
|
264
|
+
|
|
265
|
+
$ ogp config show
|
|
266
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
267
|
+
OGP Configuration
|
|
268
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
269
|
+
|
|
270
|
+
Default framework: openclaw
|
|
271
|
+
|
|
272
|
+
Enabled frameworks:
|
|
273
|
+
openclaw OpenClaw ~/.ogp-openclaw :18790
|
|
274
|
+
hermes Hermes ~/.ogp-hermes :18793
|
|
275
|
+
|
|
276
|
+
Aliases:
|
|
277
|
+
(none)
|
|
278
|
+
|
|
279
|
+
Meta config: ~/.ogp-meta/config.json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Scenario 4: Migration from Existing Setup
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
$ ogp setup
|
|
286
|
+
|
|
287
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
288
|
+
Migration Detected
|
|
289
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
290
|
+
|
|
291
|
+
I found existing OGP installations:
|
|
292
|
+
~/.ogp/ (OpenClaw - detected)
|
|
293
|
+
~/.ogp-hermes/ (Hermes - detected)
|
|
294
|
+
|
|
295
|
+
Would you like to migrate to the new multi-framework setup?
|
|
296
|
+
This will:
|
|
297
|
+
- Create ~/.ogp-meta/ for central configuration
|
|
298
|
+
- Rename ~/.ogp/ → ~/.ogp-openclaw/
|
|
299
|
+
- Keep ~/.ogp-hermes/ as-is
|
|
300
|
+
- Enable both frameworks with OpenClaw as default
|
|
301
|
+
|
|
302
|
+
Your existing configuration and peers will be preserved.
|
|
303
|
+
|
|
304
|
+
Migrate now? (Y/n): y
|
|
305
|
+
|
|
306
|
+
✓ Created ~/.ogp-meta/
|
|
307
|
+
✓ Migrated ~/.ogp/ → ~/.ogp-openclaw/
|
|
308
|
+
✓ Registered Hermes framework
|
|
309
|
+
✓ Set default framework: openclaw
|
|
310
|
+
|
|
311
|
+
Migration complete! New commands:
|
|
312
|
+
Old: OGP_HOME=~/.ogp ogp federation list
|
|
313
|
+
New: ogp federation list
|
|
314
|
+
|
|
315
|
+
Old: OGP_HOME=~/.ogp-hermes ogp federation list
|
|
316
|
+
New: ogp --for hermes federation list
|
|
317
|
+
|
|
318
|
+
Note: Your old commands with OGP_HOME still work!
|
|
319
|
+
|
|
320
|
+
Run `ogp completion install` to enable tab completion.
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Scenario 5: Power User with Aliases
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
$ ogp alias add oc openclaw
|
|
327
|
+
✓ Alias 'oc' → openclaw
|
|
328
|
+
|
|
329
|
+
$ ogp alias add ap hermes
|
|
330
|
+
✓ Alias 'ap' → hermes
|
|
331
|
+
|
|
332
|
+
$ ogp --for oc federation list
|
|
333
|
+
# Uses OpenClaw
|
|
334
|
+
|
|
335
|
+
$ ogp --for ap federation list
|
|
336
|
+
# Uses Hermes
|
|
337
|
+
|
|
338
|
+
$ ogp alias list
|
|
339
|
+
Aliases:
|
|
340
|
+
oc → openclaw
|
|
341
|
+
ap → hermes
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
## Scenario 6: Single Framework User (No Change!)
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
# User only has OpenClaw, never installed Hermes
|
|
348
|
+
$ ogp federation list
|
|
349
|
+
# Automatically uses the only configured framework
|
|
350
|
+
# No --for flag needed, no framework selection prompt
|
|
351
|
+
# Works exactly like before!
|
|
352
|
+
```
|