@dp-pcs/ogp 0.3.2 → 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.
Files changed (95) hide show
  1. package/README.md +275 -49
  2. package/dist/cli/completion.d.ts +5 -0
  3. package/dist/cli/completion.d.ts.map +1 -0
  4. package/dist/cli/completion.js +148 -0
  5. package/dist/cli/completion.js.map +1 -0
  6. package/dist/cli/config.d.ts +3 -0
  7. package/dist/cli/config.d.ts.map +1 -0
  8. package/dist/cli/config.js +207 -0
  9. package/dist/cli/config.js.map +1 -0
  10. package/dist/cli/expose.d.ts.map +1 -1
  11. package/dist/cli/expose.js +20 -13
  12. package/dist/cli/expose.js.map +1 -1
  13. package/dist/cli/federation.d.ts.map +1 -1
  14. package/dist/cli/federation.js +252 -9
  15. package/dist/cli/federation.js.map +1 -1
  16. package/dist/cli/setup.d.ts +19 -0
  17. package/dist/cli/setup.d.ts.map +1 -1
  18. package/dist/cli/setup.js +507 -32
  19. package/dist/cli/setup.js.map +1 -1
  20. package/dist/cli.js +348 -32
  21. package/dist/cli.js.map +1 -1
  22. package/dist/daemon/agent-comms.d.ts.map +1 -1
  23. package/dist/daemon/agent-comms.js +14 -9
  24. package/dist/daemon/agent-comms.js.map +1 -1
  25. package/dist/daemon/intent-registry.d.ts.map +1 -1
  26. package/dist/daemon/intent-registry.js +7 -4
  27. package/dist/daemon/intent-registry.js.map +1 -1
  28. package/dist/daemon/keypair.d.ts.map +1 -1
  29. package/dist/daemon/keypair.js +34 -13
  30. package/dist/daemon/keypair.js.map +1 -1
  31. package/dist/daemon/message-handler.d.ts.map +1 -1
  32. package/dist/daemon/message-handler.js +7 -0
  33. package/dist/daemon/message-handler.js.map +1 -1
  34. package/dist/daemon/notify.d.ts +19 -0
  35. package/dist/daemon/notify.d.ts.map +1 -1
  36. package/dist/daemon/notify.js +329 -73
  37. package/dist/daemon/notify.js.map +1 -1
  38. package/dist/daemon/openclaw-bridge.d.ts +34 -0
  39. package/dist/daemon/openclaw-bridge.d.ts.map +1 -0
  40. package/dist/daemon/openclaw-bridge.js +261 -0
  41. package/dist/daemon/openclaw-bridge.js.map +1 -0
  42. package/dist/daemon/peers.d.ts +8 -0
  43. package/dist/daemon/peers.d.ts.map +1 -1
  44. package/dist/daemon/peers.js +48 -14
  45. package/dist/daemon/peers.js.map +1 -1
  46. package/dist/daemon/projects.d.ts.map +1 -1
  47. package/dist/daemon/projects.js +7 -4
  48. package/dist/daemon/projects.js.map +1 -1
  49. package/dist/daemon/server.d.ts +16 -0
  50. package/dist/daemon/server.d.ts.map +1 -1
  51. package/dist/daemon/server.js +147 -46
  52. package/dist/daemon/server.js.map +1 -1
  53. package/dist/shared/config.d.ts +52 -1
  54. package/dist/shared/config.d.ts.map +1 -1
  55. package/dist/shared/config.js +18 -11
  56. package/dist/shared/config.js.map +1 -1
  57. package/dist/shared/framework-detection.d.ts +31 -0
  58. package/dist/shared/framework-detection.d.ts.map +1 -0
  59. package/dist/shared/framework-detection.js +91 -0
  60. package/dist/shared/framework-detection.js.map +1 -0
  61. package/dist/shared/help.d.ts +5 -0
  62. package/dist/shared/help.d.ts.map +1 -0
  63. package/dist/shared/help.js +280 -0
  64. package/dist/shared/help.js.map +1 -0
  65. package/dist/shared/meta-config.d.ts +44 -0
  66. package/dist/shared/meta-config.d.ts.map +1 -0
  67. package/dist/shared/meta-config.js +89 -0
  68. package/dist/shared/meta-config.js.map +1 -0
  69. package/dist/shared/migration.d.ts +57 -0
  70. package/dist/shared/migration.d.ts.map +1 -0
  71. package/dist/shared/migration.js +255 -0
  72. package/dist/shared/migration.js.map +1 -0
  73. package/docs/CLI-REFERENCE.md +1360 -0
  74. package/docs/GETTING-STARTED.md +942 -0
  75. package/docs/MIGRATION.md +202 -0
  76. package/docs/MULTI-FRAMEWORK-DEMO.md +352 -0
  77. package/docs/MULTI-FRAMEWORK-DESIGN.md +378 -0
  78. package/docs/MULTI-FRAMEWORK-IMPL.md +197 -0
  79. package/docs/case-studies/CRASH_RESOLUTION_20260407.md +190 -0
  80. package/docs/case-studies/OpenClaw_Hermes_Status_Report_20260407.md +142 -0
  81. package/docs/case-studies/OpenClaw_Stability_Fix_Summary.md +209 -0
  82. package/docs/case-studies/README.md +40 -0
  83. package/docs/case-studies/crash_observations.md +250 -0
  84. package/docs/federation-flow.md +21 -31
  85. package/docs/hermes-implementation-checklist.md +4 -0
  86. package/docs/rendezvous.md +13 -14
  87. package/package.json +9 -3
  88. package/scripts/completion.bash +123 -0
  89. package/scripts/completion.zsh +372 -0
  90. package/scripts/test-migration-execute.js +74 -0
  91. package/scripts/test-migration.js +42 -0
  92. package/skills/ogp/SKILL.md +197 -64
  93. package/skills/ogp-agent-comms/SKILL.md +107 -41
  94. package/skills/ogp-expose/SKILL.md +84 -21
  95. package/skills/ogp-project/SKILL.md +66 -58
@@ -0,0 +1,942 @@
1
+ # OGP Getting Started Guide
2
+
3
+ This comprehensive guide covers everything you need to get started with OGP, from basic single-framework setup to advanced multi-framework configurations.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Prerequisites](#prerequisites)
8
+ - [Quick Start: Single Framework](#quick-start-single-framework)
9
+ - [Quick Start: Multiple Frameworks](#quick-start-multiple-frameworks)
10
+ - [Framework Detection and Selection](#framework-detection-and-selection)
11
+ - [Using the --for Flag](#using-the---for-flag)
12
+ - [Setting a Default Framework](#setting-a-default-framework)
13
+ - [Tab Completion Setup](#tab-completion-setup)
14
+ - [Using ? Style Help](#using--style-help)
15
+ - [Common Workflows](#common-workflows)
16
+ - [Troubleshooting](#troubleshooting)
17
+
18
+ ## Prerequisites
19
+
20
+ Before installing OGP, ensure you have:
21
+
22
+ - **Node.js 18 or higher** - Check with `node --version`
23
+ - **An AI framework installed** (one or more):
24
+ - **OpenClaw** - Get it at [https://openclaw.ai](https://openclaw.ai)
25
+ - **Hermes** - Contact your Hermes provider
26
+ - Or run **standalone** (no framework required)
27
+ - **API credentials** for your framework (generated during framework setup)
28
+
29
+ ## Quick Start: Single Framework
30
+
31
+ If you're using only one AI framework (e.g., OpenClaw), setup is straightforward.
32
+
33
+ ### 1. Install OGP
34
+
35
+ ```bash
36
+ npm install -g @dp-pcs/ogp
37
+ ```
38
+
39
+ ### 2. Install Skills (Optional)
40
+
41
+ Install OGP skills for Claude Code integration:
42
+
43
+ ```bash
44
+ ogp-install-skills
45
+ ```
46
+
47
+ ### 3. Run Setup
48
+
49
+ ```bash
50
+ ogp setup
51
+ ```
52
+
53
+ The wizard will:
54
+ 1. Detect installed frameworks
55
+ 2. Prompt for framework configuration
56
+ 3. Create config directory (e.g., `~/.ogp-openclaw/`)
57
+ 4. Generate cryptographic keypair
58
+ 5. Create meta-config at `~/.ogp-meta/config.json`
59
+
60
+ **Example Setup Session:**
61
+
62
+ ```
63
+ === OGP Setup ===
64
+
65
+ 🔍 Detecting installed AI frameworks...
66
+ ✓ Found OpenClaw at ~/.openclaw/
67
+
68
+ Which frameworks do you want to enable OGP for?
69
+ [x] OpenClaw (Junior @ OpenClaw)
70
+ [ ] Standalone (no framework)
71
+
72
+ === Configuring OpenClaw ===
73
+
74
+ Available agents:
75
+ 1. 🦝 Junior (main)
76
+ 2. ✍️ Scribe (scribe)
77
+
78
+ Which agent owns this gateway? (number or ID) [1]: 1
79
+
80
+ Daemon port [18790]: <enter>
81
+ OpenClaw URL [http://localhost:18789]: <enter>
82
+ OpenClaw API token: your-token-here
83
+ Gateway URL (your public URL): https://ogp.example.com
84
+ Display name: Alice
85
+ Email: alice@example.com
86
+
87
+ Enable optional rendezvous for invite codes / pubkey discovery? [y/N]: n
88
+ Rendezvous server URL [https://rendezvous.elelem.expert]: <enter>
89
+
90
+ ✓ OpenClaw configured
91
+ Config: ~/.ogp-openclaw/
92
+ Port: 18790
93
+ Agent: Junior (main)
94
+
95
+ ✓ OGP setup complete!
96
+ Default framework: openclaw
97
+ ```
98
+
99
+ ### 4. Start the Daemon
100
+
101
+ ```bash
102
+ ogp start --background
103
+ ```
104
+
105
+ Check status:
106
+
107
+ ```bash
108
+ ogp status
109
+ ```
110
+
111
+ Output:
112
+
113
+ ```
114
+ OGP Daemon Status:
115
+ Framework: openclaw
116
+ Status: ● Running
117
+ Port: 18790
118
+ PID: 12345
119
+ Uptime: 5 minutes
120
+ Public Key: 302a300506032b6570032100...
121
+ Gateway URL: https://ogp.example.com
122
+ ```
123
+
124
+ ### 5. Test Your Gateway
125
+
126
+ ```bash
127
+ curl https://ogp.example.com/.well-known/ogp
128
+ ```
129
+
130
+ You should see your gateway metadata (public key, capabilities, endpoints).
131
+
132
+ That's it! Your single-framework OGP gateway is running. Skip to [Common Workflows](#common-workflows) to start federating.
133
+
134
+ ## Quick Start: Multiple Frameworks
135
+
136
+ If you're using multiple AI frameworks (e.g., OpenClaw and Hermes), OGP can manage separate gateways for each.
137
+
138
+ ### 1. Install OGP
139
+
140
+ ```bash
141
+ npm install -g @dp-pcs/ogp
142
+ ```
143
+
144
+ ### 2. Run Setup
145
+
146
+ ```bash
147
+ ogp setup
148
+ ```
149
+
150
+ The wizard will detect all installed frameworks:
151
+
152
+ ```
153
+ === OGP Setup ===
154
+
155
+ 🔍 Detecting installed AI frameworks...
156
+ ✓ Found OpenClaw at ~/.openclaw/
157
+ ✓ Found Hermes at ~/.hermes/
158
+
159
+ Which frameworks do you want to enable OGP for?
160
+ [x] OpenClaw (Junior @ OpenClaw)
161
+ [x] Hermes (Apollo @ Hermes)
162
+ [ ] Standalone (no framework)
163
+ ```
164
+
165
+ Select all frameworks you want to enable (use space to toggle, enter to confirm).
166
+
167
+ ### 3. Configure Each Framework
168
+
169
+ The wizard will prompt for configuration for each selected framework:
170
+
171
+ ```
172
+ === Configuring OpenClaw ===
173
+
174
+ Available agents:
175
+ 1. 🦝 Junior (main)
176
+
177
+ Which agent owns this gateway? (number or ID) [1]: 1
178
+
179
+ Daemon port [18790]: <enter>
180
+ OpenClaw URL [http://localhost:18789]: <enter>
181
+ OpenClaw API token: your-openclaw-token
182
+ Gateway URL: https://ogp.example.com
183
+ Display name: Junior @ OpenClaw
184
+ Email: alice@example.com
185
+
186
+ === Configuring Hermes ===
187
+
188
+ Available agents:
189
+ 1. 🌟 Apollo (main)
190
+
191
+ Which agent owns this gateway? (number or ID) [1]: 1
192
+
193
+ Daemon port [18793]: <enter>
194
+ Hermes webhook URL [http://localhost:18792/webhooks/ogp]: <enter>
195
+ Hermes webhook secret: your-hermes-secret
196
+ Gateway URL: https://hermes.example.com
197
+ Display name: Apollo @ Hermes
198
+ Email: alice@example.com
199
+
200
+ ✓ OGP configured for 2 frameworks
201
+ OpenClaw: ~/.ogp-openclaw/
202
+ Hermes: ~/.ogp-hermes/
203
+
204
+ Default framework: openclaw
205
+
206
+ Tip: Use `ogp --for openclaw <command>` or `ogp --for hermes <command>`
207
+ Or set a default: `ogp config set-default openclaw`
208
+ ```
209
+
210
+ ### 4. Start Daemons
211
+
212
+ Start daemons for each framework:
213
+
214
+ ```bash
215
+ # Start OpenClaw daemon
216
+ ogp --for openclaw start --background
217
+
218
+ # Start Hermes daemon
219
+ ogp --for hermes start --background
220
+ ```
221
+
222
+ Or start all at once:
223
+
224
+ ```bash
225
+ ogp --for all start --background
226
+ ```
227
+
228
+ ### 5. Check Status
229
+
230
+ ```bash
231
+ ogp --for all status
232
+ ```
233
+
234
+ Output:
235
+
236
+ ```
237
+ === OpenClaw (Junior @ OpenClaw) ===
238
+ OGP Daemon Status:
239
+ Framework: openclaw
240
+ Status: ● Running
241
+ Port: 18790
242
+ PID: 12345
243
+ Uptime: 2 minutes
244
+
245
+ === Hermes (Apollo @ Hermes) ===
246
+ OGP Daemon Status:
247
+ Framework: hermes
248
+ Status: ● Running
249
+ Port: 18793
250
+ PID: 12346
251
+ Uptime: 2 minutes
252
+ ```
253
+
254
+ Now you have two independent OGP gateways running, one for each framework.
255
+
256
+ ## Framework Detection and Selection
257
+
258
+ ### Automatic Detection
259
+
260
+ During setup, OGP automatically detects installed frameworks by checking:
261
+
262
+ 1. **Framework directories**:
263
+ - OpenClaw: `~/.openclaw/`
264
+ - Hermes: `~/.hermes/`
265
+
266
+ 2. **Framework commands**:
267
+ - `openclaw` command available
268
+ - `hermes` command available
269
+
270
+ ### Manual Selection
271
+
272
+ If auto-detection doesn't find your framework:
273
+
274
+ 1. Select "Standalone (no framework)" during setup
275
+ 2. Manually configure OGP_HOME before running commands:
276
+
277
+ ```bash
278
+ export OGP_HOME=~/.ogp-custom
279
+ ogp setup
280
+ ```
281
+
282
+ ### Framework Configuration Directories
283
+
284
+ Each framework gets its own config directory:
285
+
286
+ | Framework | Directory | Default Port |
287
+ |-----------|-----------|--------------|
288
+ | OpenClaw | `~/.ogp-openclaw/` | 18790 |
289
+ | Hermes | `~/.ogp-hermes/` | 18793 |
290
+ | Standalone | `~/.ogp/` | 18790 |
291
+
292
+ All configs are managed from `~/.ogp-meta/config.json`.
293
+
294
+ ## Using the --for Flag
295
+
296
+ The `--for` flag specifies which framework configuration to use for a command.
297
+
298
+ ### Basic Usage
299
+
300
+ ```bash
301
+ # Use OpenClaw config
302
+ ogp --for openclaw federation list
303
+
304
+ # Use Hermes config
305
+ ogp --for hermes federation list
306
+
307
+ # Run on all frameworks
308
+ ogp --for all federation list
309
+ ```
310
+
311
+ ### When --for is Required
312
+
313
+ The `--for` flag is required when:
314
+
315
+ 1. **Multiple frameworks are configured** and no default is set
316
+ 2. You want to **override the default** framework
317
+ 3. You want to **run on all frameworks** (`--for all`)
318
+
319
+ ### When --for is Optional
320
+
321
+ The `--for` flag is optional when:
322
+
323
+ 1. **Only one framework is configured** (auto-selected)
324
+ 2. A **default framework is set** (uses default)
325
+
326
+ ### Examples
327
+
328
+ ```bash
329
+ # Start specific framework daemon
330
+ ogp --for openclaw start --background
331
+
332
+ # Request federation from specific framework
333
+ ogp --for openclaw federation request https://peer.example.com
334
+
335
+ # Send message from Hermes gateway
336
+ ogp --for hermes federation send apollo message '{"text":"Hello from Hermes!"}'
337
+
338
+ # Check status of all frameworks
339
+ ogp --for all status
340
+
341
+ # List all peers across all frameworks
342
+ ogp --for all federation list
343
+ ```
344
+
345
+ ### --for all Behavior
346
+
347
+ When using `--for all`, OGP runs the command on all enabled frameworks and aggregates results:
348
+
349
+ ```bash
350
+ $ ogp --for all federation list
351
+
352
+ === OpenClaw (Junior @ OpenClaw) ===
353
+ PEERS:
354
+ apollo (Apollo @ Hermes) - approved
355
+ bob (Bob @ OpenClaw) - approved
356
+
357
+ === Hermes (Apollo @ Hermes) ===
358
+ PEERS:
359
+ junior (Junior @ OpenClaw) - approved
360
+ charlie (Charlie @ Hermes) - pending
361
+ ```
362
+
363
+ ## Setting a Default Framework
364
+
365
+ Set a default framework to avoid using `--for` on every command.
366
+
367
+ ### Set Default
368
+
369
+ ```bash
370
+ ogp config set-default openclaw
371
+ ```
372
+
373
+ Output:
374
+
375
+ ```
376
+ ✓ Default framework: openclaw
377
+ ```
378
+
379
+ ### Check Default
380
+
381
+ ```bash
382
+ ogp config list
383
+ ```
384
+
385
+ Output:
386
+
387
+ ```
388
+ Configured frameworks:
389
+ openclaw [default] ● Enabled ~/.ogp-openclaw/ 18790
390
+ hermes ● Enabled ~/.ogp-hermes/ 18793
391
+ ```
392
+
393
+ ### Using the Default
394
+
395
+ Once set, commands automatically use the default framework:
396
+
397
+ ```bash
398
+ # No --for needed, uses openclaw (default)
399
+ ogp federation list
400
+ ogp start --background
401
+ ogp status
402
+ ```
403
+
404
+ ### Override the Default
405
+
406
+ Use `--for` to override the default for a single command:
407
+
408
+ ```bash
409
+ # Uses hermes instead of default (openclaw)
410
+ ogp --for hermes federation list
411
+ ```
412
+
413
+ ## Tab Completion Setup
414
+
415
+ Tab completion makes command entry faster and helps discover available commands, peers, and frameworks.
416
+
417
+ ### Install Completion
418
+
419
+ #### Bash
420
+
421
+ ```bash
422
+ ogp completion install bash
423
+ ```
424
+
425
+ Reload your shell:
426
+
427
+ ```bash
428
+ source ~/.bashrc
429
+ ```
430
+
431
+ #### Zsh
432
+
433
+ ```bash
434
+ ogp completion install zsh
435
+ ```
436
+
437
+ Reload your shell:
438
+
439
+ ```bash
440
+ source ~/.zshrc
441
+ ```
442
+
443
+ ### Using Completion
444
+
445
+ Once installed, press `TAB` to complete commands:
446
+
447
+ ```bash
448
+ # Complete commands
449
+ ogp fed<TAB>
450
+ # → ogp federation
451
+
452
+ # Complete subcommands
453
+ ogp federation <TAB>
454
+ # → list request approve reject remove send agent scopes alias
455
+
456
+ # Complete --for flag
457
+ ogp --for <TAB>
458
+ # → openclaw hermes all
459
+
460
+ # Complete peer names
461
+ ogp federation send <TAB>
462
+ # → apollo bob charlie
463
+
464
+ # Complete intents
465
+ ogp federation send apollo <TAB>
466
+ # → message task-request status-update agent-comms project.*
467
+ ```
468
+
469
+ ### Completion Features
470
+
471
+ - **Command completion**: Top-level commands and subcommands
472
+ - **Framework completion**: Framework names for `--for` flag
473
+ - **Peer completion**: Peer aliases from current framework config
474
+ - **Intent completion**: Available intents for `send` command
475
+ - **Flag completion**: Available flags for each command
476
+
477
+ ## Using ? Style Help
478
+
479
+ OGP provides Cisco IOS-style context-sensitive help with the `?` operator.
480
+
481
+ ### Top-Level Help
482
+
483
+ ```bash
484
+ ogp ?
485
+ ```
486
+
487
+ Output:
488
+
489
+ ```
490
+ Available commands:
491
+ setup Initialize OGP configuration
492
+ start Start OGP daemon
493
+ stop Stop OGP daemon
494
+ status Show daemon status
495
+ federation Manage federation
496
+ agent-comms Configure agent-to-agent messaging
497
+ project Manage projects
498
+ intent Manage custom intents
499
+ config Manage configuration
500
+ expose Manage public tunnel
501
+ install Install LaunchAgent (macOS)
502
+ uninstall Remove LaunchAgent (macOS)
503
+ completion Manage shell completion
504
+
505
+ Use `ogp <command> ?` for more details.
506
+ ```
507
+
508
+ ### Command-Level Help
509
+
510
+ ```bash
511
+ ogp federation ?
512
+ ```
513
+
514
+ Output:
515
+
516
+ ```
517
+ Available federation commands:
518
+ list List all peers
519
+ request Send federation request
520
+ approve Approve pending peer
521
+ reject Reject pending peer
522
+ remove Remove peer
523
+ send Send message to peer
524
+ agent Send agent-comms message
525
+ scopes View/update scopes
526
+ alias Manage peer aliases
527
+ ping Test connectivity
528
+ invite Generate invite code
529
+ accept Accept invite
530
+ connect Connect by public key
531
+
532
+ Use `ogp federation <command> ?` for usage.
533
+ ```
534
+
535
+ ### Command Usage Help
536
+
537
+ ```bash
538
+ ogp federation send ?
539
+ ```
540
+
541
+ Output:
542
+
543
+ ```
544
+ Usage: ogp federation send <peer> <intent> <payload>
545
+
546
+ Arguments:
547
+ peer Peer ID, alias, or display name
548
+ intent Intent type (message, task-request, status-update, agent-comms, project.*)
549
+ payload JSON payload
550
+
551
+ Available peers (openclaw):
552
+ - apollo (Apollo @ Hermes) - approved
553
+ - bob (Bob @ OpenClaw) - approved
554
+
555
+ Example:
556
+ ogp federation send apollo message '{"text":"Hello from OGP!"}'
557
+ ogp federation send bob agent-comms '{"topic":"memory","message":"How do you persist context?"}'
558
+ ```
559
+
560
+ ### Parameter Help
561
+
562
+ ```bash
563
+ ogp federation approve ?
564
+ ```
565
+
566
+ Output:
567
+
568
+ ```
569
+ Usage: ogp federation approve <peer-id> [options]
570
+
571
+ Options:
572
+ --intents <list> Comma-separated intents (message,agent-comms)
573
+ --rate <limit> Rate limit as requests/seconds (100/3600)
574
+ --topics <list> Topics for agent-comms (memory-management,task-delegation)
575
+
576
+ Examples:
577
+ # Approve without restrictions
578
+ ogp federation approve apollo
579
+
580
+ # Approve with scope grants
581
+ ogp federation approve apollo \
582
+ --intents message,agent-comms \
583
+ --rate 100/3600 \
584
+ --topics memory-management,task-delegation
585
+ ```
586
+
587
+ ## Common Workflows
588
+
589
+ ### Single Framework Workflow
590
+
591
+ If you're using only one framework:
592
+
593
+ ```bash
594
+ # Setup (once)
595
+ ogp setup
596
+ ogp start --background
597
+
598
+ # Daily usage (no --for needed)
599
+ ogp federation request https://peer.example.com
600
+ ogp federation list
601
+ ogp federation send apollo message '{"text":"Hello!"}'
602
+ ogp status
603
+ ```
604
+
605
+ ### Multi-Framework Workflow
606
+
607
+ If you're using multiple frameworks:
608
+
609
+ ```bash
610
+ # Setup (once)
611
+ ogp setup
612
+ ogp --for all start --background
613
+ ogp config set-default openclaw
614
+
615
+ # Daily usage with default
616
+ ogp federation list # Uses openclaw (default)
617
+ ogp federation send apollo message '{"text":"Hello!"}'
618
+
619
+ # Explicit framework selection
620
+ ogp --for hermes federation list # Uses hermes
621
+ ogp --for hermes federation send bob message '{"text":"Hi from Hermes!"}'
622
+
623
+ # Cross-framework operations
624
+ ogp --for all status # Check all daemons
625
+ ogp --for all federation list # List all peers
626
+ ```
627
+
628
+ ### Federation Setup Workflow
629
+
630
+ Setting up federation between two peers:
631
+
632
+ **Alice (OpenClaw):**
633
+
634
+ ```bash
635
+ # 1. Start daemon and expose
636
+ ogp start --background
637
+ ogp expose --background
638
+
639
+ # 2. Share gateway URL with Bob
640
+ # Gateway: https://alice.example.com
641
+
642
+ # 3. Request federation with Bob
643
+ ogp federation request https://bob.example.com --alias bob
644
+
645
+ # 4. Wait for Bob's approval
646
+ ogp federation list --status pending
647
+
648
+ # 5. Once approved, send message
649
+ ogp federation send bob message '{"text":"Hello Bob!"}'
650
+ ```
651
+
652
+ **Bob (Hermes):**
653
+
654
+ ```bash
655
+ # 1. Start daemon and expose
656
+ ogp --for hermes start --background
657
+ ogp --for hermes expose --background
658
+
659
+ # 2. Share gateway URL with Alice
660
+ # Gateway: https://bob.example.com
661
+
662
+ # 3. Approve Alice's request
663
+ ogp --for hermes federation list --status pending
664
+ ogp --for hermes federation approve alice \
665
+ --intents message,agent-comms \
666
+ --rate 100/3600 \
667
+ --topics general,memory-management
668
+
669
+ # 4. Send message back
670
+ ogp --for hermes federation send alice message '{"text":"Hello Alice!"}'
671
+ ```
672
+
673
+ ### Agent-to-Agent Communication Workflow
674
+
675
+ Using agent-comms for rich collaboration:
676
+
677
+ ```bash
678
+ # Revisit delegated-authority / human-delivery preferences
679
+ ogp agent-comms interview
680
+
681
+ # Configure response policies first
682
+ ogp agent-comms configure apollo \
683
+ --topics memory-management,task-delegation \
684
+ --level full
685
+
686
+ # Send agent-comms messages
687
+ ogp federation agent apollo memory-management "How do you persist long-term context?"
688
+ ogp federation agent apollo task-delegation "Can you help analyze these logs?" --priority high
689
+
690
+ # Wait for replies
691
+ ogp federation agent apollo queries "What's the status?" --wait --timeout 60000
692
+
693
+ # Check activity log
694
+ ogp agent-comms activity apollo
695
+ ```
696
+
697
+ ### Project Collaboration Workflow
698
+
699
+ Managing collaborative projects:
700
+
701
+ ```bash
702
+ # Create a project
703
+ ogp project create expense-app "Expense Tracker App" \
704
+ --description "Mobile expense tracking application"
705
+
706
+ # Log work by entry type
707
+ ogp project contribute expense-app progress "Completed authentication system"
708
+ ogp project contribute expense-app decision "Using PostgreSQL for persistence"
709
+ ogp project contribute expense-app blocker "Waiting for API key approval"
710
+
711
+ # Share with peer
712
+ ogp project send-contribution apollo expense-app progress "Deployed staging environment"
713
+
714
+ # Query peer's contributions
715
+ ogp project query-peer apollo expense-app --limit 10
716
+
717
+ # Check project status
718
+ ogp project status expense-app
719
+ ```
720
+
721
+ ## Troubleshooting
722
+
723
+ ### No Frameworks Detected
724
+
725
+ **Problem:** Setup wizard doesn't detect your framework.
726
+
727
+ **Solution:**
728
+
729
+ 1. Check framework is installed:
730
+ ```bash
731
+ ls ~/.openclaw/ # OpenClaw
732
+ ls ~/.hermes/ # Hermes
733
+ ```
734
+
735
+ 2. Use standalone mode:
736
+ ```bash
737
+ # Select "Standalone" during setup
738
+ ogp setup
739
+ ```
740
+
741
+ 3. Set OGP_HOME manually:
742
+ ```bash
743
+ export OGP_HOME=~/.ogp-custom
744
+ ogp setup
745
+ ```
746
+
747
+ ### Which Framework? Prompt
748
+
749
+ **Problem:** OGP prompts for framework on every command.
750
+
751
+ **Solution:** Set a default framework:
752
+
753
+ ```bash
754
+ ogp config set-default openclaw
755
+ ```
756
+
757
+ ### Wrong Framework Selected
758
+
759
+ **Problem:** Command runs on wrong framework.
760
+
761
+ **Solution:**
762
+
763
+ 1. Check current config:
764
+ ```bash
765
+ ogp config list
766
+ ```
767
+
768
+ 2. Use explicit `--for` flag:
769
+ ```bash
770
+ ogp --for openclaw federation list
771
+ ```
772
+
773
+ 3. Change default:
774
+ ```bash
775
+ ogp config set-default hermes
776
+ ```
777
+
778
+ ### Daemon Won't Start
779
+
780
+ **Problem:** `ogp start` fails.
781
+
782
+ **Solution:**
783
+
784
+ 1. Check if already running:
785
+ ```bash
786
+ ogp status
787
+ ```
788
+
789
+ 2. Check port availability:
790
+ ```bash
791
+ lsof -i :18790 # OpenClaw default
792
+ lsof -i :18793 # Hermes default
793
+ ```
794
+
795
+ 3. Check logs:
796
+ ```bash
797
+ # Foreground mode shows logs
798
+ ogp start
799
+ ```
800
+
801
+ 4. Verify config:
802
+ ```bash
803
+ cat ~/.ogp-openclaw/config.json # OpenClaw
804
+ cat ~/.ogp-hermes/config.json # Hermes
805
+ ```
806
+
807
+ ### Gateway Not Reachable
808
+
809
+ **Problem:** Peers can't reach your gateway.
810
+
811
+ **Solution:**
812
+
813
+ 1. Test locally first:
814
+ ```bash
815
+ curl http://localhost:18790/.well-known/ogp
816
+ ```
817
+
818
+ 2. Check tunnel is running:
819
+ ```bash
820
+ ogp expose status
821
+ ```
822
+
823
+ 3. Test public URL:
824
+ ```bash
825
+ curl https://your-gateway.example.com/.well-known/ogp
826
+ ```
827
+
828
+ 4. Verify gateway URL in config:
829
+ ```bash
830
+ ogp config show
831
+ ```
832
+
833
+ ### Peer Not Approved
834
+
835
+ **Problem:** "Peer not approved" error when sending message.
836
+
837
+ **Solution:**
838
+
839
+ 1. Check peer status:
840
+ ```bash
841
+ ogp federation list
842
+ ```
843
+
844
+ 2. Request federation if not initiated:
845
+ ```bash
846
+ ogp federation request https://peer.example.com
847
+ ```
848
+
849
+ 3. Wait for peer to approve your request
850
+
851
+ ### Scope Not Granted (403)
852
+
853
+ **Problem:** "Scope not granted" or 403 error.
854
+
855
+ **Solution:**
856
+
857
+ 1. Check granted scopes:
858
+ ```bash
859
+ ogp federation scopes apollo
860
+ ```
861
+
862
+ 2. Request peer to update grants:
863
+ ```bash
864
+ # Ask peer to run:
865
+ ogp federation grant <your-id> \
866
+ --intents agent-comms \
867
+ --topics memory-management
868
+ ```
869
+
870
+ ### Rate Limit Exceeded (429)
871
+
872
+ **Problem:** "Rate limit exceeded" or 429 error.
873
+
874
+ **Solution:**
875
+
876
+ 1. Wait for rate limit window to reset
877
+
878
+ 2. Check current rate limit:
879
+ ```bash
880
+ ogp federation scopes apollo
881
+ ```
882
+
883
+ 3. Request higher limit from peer
884
+
885
+ ### Tab Completion Not Working
886
+
887
+ **Problem:** Tab completion doesn't work.
888
+
889
+ **Solution:**
890
+
891
+ 1. Verify installation:
892
+ ```bash
893
+ cat ~/.bashrc | grep ogp-completion # Bash
894
+ cat ~/.zshrc | grep ogp-completion # Zsh
895
+ ```
896
+
897
+ 2. Reinstall completion:
898
+ ```bash
899
+ ogp completion install bash # or zsh
900
+ ```
901
+
902
+ 3. Reload shell:
903
+ ```bash
904
+ source ~/.bashrc # or ~/.zshrc
905
+ ```
906
+
907
+ ### Migration Issues
908
+
909
+ **Problem:** Existing config not migrated properly.
910
+
911
+ **Solution:**
912
+
913
+ 1. Check migration status:
914
+ ```bash
915
+ ogp config list
916
+ ```
917
+
918
+ 2. Manual migration:
919
+ ```bash
920
+ # Backup current config
921
+ cp -r ~/.ogp ~/.ogp.backup
922
+
923
+ # Rename to framework-specific
924
+ mv ~/.ogp ~/.ogp-openclaw
925
+
926
+ # Run setup to create meta-config
927
+ ogp setup
928
+ ```
929
+
930
+ 3. Verify migration:
931
+ ```bash
932
+ ls ~/.ogp-meta/
933
+ ls ~/.ogp-openclaw/
934
+ ```
935
+
936
+ ## Next Steps
937
+
938
+ - Read [Federation Flow](./federation-flow.md) for message flow details
939
+ - Learn about [Scope Negotiation](./scopes.md) for access control
940
+ - Explore [Agent Communications](./agent-comms.md) for agent-to-agent messaging
941
+ - Check [CLI Reference](./CLI-REFERENCE.md) for complete command documentation
942
+ - Install [Claude Code skills](../skills/) for agent integration