@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.
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 +182 -6
  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,1360 @@
1
+ # OGP CLI Reference
2
+
3
+ Complete command-line reference for OGP (Open Gateway Protocol).
4
+
5
+ ## Table of Contents
6
+
7
+ - [Global Options](#global-options)
8
+ - [Setup and Configuration](#setup-and-configuration)
9
+ - [Daemon Management](#daemon-management)
10
+ - [Federation Commands](#federation-commands)
11
+ - [Agent Communications](#agent-communications)
12
+ - [Project Management](#project-management)
13
+ - [Intent Management](#intent-management)
14
+ - [Tunnel Management](#tunnel-management)
15
+ - [System Integration](#system-integration)
16
+ - [Completion](#completion)
17
+ - [Multi-Framework Operations](#multi-framework-operations)
18
+
19
+ ## Global Options
20
+
21
+ All commands support the following global options:
22
+
23
+ ### --for <framework>
24
+
25
+ Specifies which framework configuration to use.
26
+
27
+ **Syntax:**
28
+ ```bash
29
+ ogp --for <framework> <command>
30
+ ```
31
+
32
+ **Arguments:**
33
+ - `<framework>` - Framework identifier: `openclaw`, `hermes`, `standalone`, or `all`
34
+
35
+ **Examples:**
36
+ ```bash
37
+ # Use OpenClaw config
38
+ ogp --for openclaw federation list
39
+
40
+ # Use Hermes config
41
+ ogp --for hermes start --background
42
+
43
+ # Run on all frameworks
44
+ ogp --for all status
45
+ ```
46
+
47
+ **Behavior:**
48
+ - If only one framework is configured, it's auto-selected (no `--for` needed)
49
+ - If multiple frameworks are configured and no default is set, prompts interactively
50
+ - If a default framework is set, uses default (can override with `--for`)
51
+ - `--for all` runs command on all enabled frameworks and aggregates output
52
+
53
+ ### --help, -h
54
+
55
+ Shows help for any command.
56
+
57
+ **Examples:**
58
+ ```bash
59
+ ogp --help
60
+ ogp federation --help
61
+ ogp federation send --help
62
+ ```
63
+
64
+ ### --version, -v
65
+
66
+ Shows OGP version.
67
+
68
+ **Example:**
69
+ ```bash
70
+ ogp --version
71
+ ```
72
+
73
+ ## Setup and Configuration
74
+
75
+ ### ogp setup
76
+
77
+ Interactive setup wizard. Detects installed frameworks and guides through configuration.
78
+
79
+ **Syntax:**
80
+ ```bash
81
+ ogp setup [--force]
82
+ ```
83
+
84
+ **Options:**
85
+ - `--force` - Force re-setup even if already configured
86
+
87
+ **Example:**
88
+ ```bash
89
+ ogp setup
90
+ ```
91
+
92
+ **Prompts:**
93
+ 1. Framework selection (auto-detected)
94
+ 2. Agent selection (auto-discovered from framework config)
95
+ 3. Daemon port (default: 18790 for OpenClaw, 18793 for Hermes)
96
+ 4. Framework URL and API credentials
97
+ 5. Gateway URL (your public URL)
98
+ 6. Rendezvous configuration (optional)
99
+ 7. Display name and email
100
+ 8. Delegated-authority / human-delivery interview
101
+
102
+ ### ogp agent-comms interview
103
+
104
+ Re-run the delegated-authority / human-delivery interview for the active framework without repeating full setup.
105
+
106
+ **Syntax:**
107
+ ```bash
108
+ ogp agent-comms interview [--for <framework>]
109
+ ```
110
+
111
+ **Examples:**
112
+ ```bash
113
+ ogp --for openclaw agent-comms interview
114
+ ogp --for hermes agent-comms interview
115
+ ```
116
+
117
+ **What it updates:**
118
+ - `humanDeliveryTarget` (OpenClaw-style human destination)
119
+ - `inboundFederationPolicy.mode`
120
+ - delegated-authority defaults for human surfacing, relay handling, approval-required topics, and trusted-peer autonomy posture
121
+
122
+ ### ogp config list
123
+
124
+ List all configured frameworks.
125
+
126
+ **Syntax:**
127
+ ```bash
128
+ ogp config list [--quiet]
129
+ ```
130
+
131
+ **Options:**
132
+ - `--quiet` - Output framework IDs only (for scripting/completion)
133
+
134
+ **Example:**
135
+ ```bash
136
+ ogp config list
137
+ ```
138
+
139
+ **Output:**
140
+ ```
141
+ Configured frameworks:
142
+ openclaw [default] ● Enabled ~/.ogp-openclaw/ 18790
143
+ hermes ● Enabled ~/.ogp-hermes/ 18793
144
+ ```
145
+
146
+ ### ogp config set-default
147
+
148
+ Set the default framework (used when no `--for` flag is specified).
149
+
150
+ **Syntax:**
151
+ ```bash
152
+ ogp config set-default <framework>
153
+ ```
154
+
155
+ **Arguments:**
156
+ - `<framework>` - Framework identifier: `openclaw`, `hermes`, `standalone`
157
+
158
+ **Example:**
159
+ ```bash
160
+ ogp config set-default openclaw
161
+ ```
162
+
163
+ ### ogp config enable
164
+
165
+ Enable a framework.
166
+
167
+ **Syntax:**
168
+ ```bash
169
+ ogp config enable <framework>
170
+ ```
171
+
172
+ **Arguments:**
173
+ - `<framework>` - Framework identifier
174
+
175
+ **Example:**
176
+ ```bash
177
+ ogp config enable hermes
178
+ ```
179
+
180
+ ### ogp config disable
181
+
182
+ Disable a framework.
183
+
184
+ **Syntax:**
185
+ ```bash
186
+ ogp config disable <framework>
187
+ ```
188
+
189
+ **Arguments:**
190
+ - `<framework>` - Framework identifier
191
+
192
+ **Example:**
193
+ ```bash
194
+ ogp config disable hermes
195
+ ```
196
+
197
+ ### ogp config show
198
+
199
+ Show current configuration.
200
+
201
+ **Syntax:**
202
+ ```bash
203
+ ogp config show [--for <framework>]
204
+ ```
205
+
206
+ **Options:**
207
+ - `--for <framework>` - Show specific framework config (default: current/default)
208
+
209
+ **Example:**
210
+ ```bash
211
+ ogp config show
212
+ ogp --for hermes config show
213
+ ```
214
+
215
+ ## Daemon Management
216
+
217
+ ### ogp start
218
+
219
+ Start the OGP daemon.
220
+
221
+ **Syntax:**
222
+ ```bash
223
+ ogp start [--background] [--for <framework>]
224
+ ```
225
+
226
+ **Options:**
227
+ - `--background` - Run as background process
228
+ - `--for <framework>` - Framework to start (default: current/default)
229
+
230
+ **Examples:**
231
+ ```bash
232
+ # Start in foreground (shows logs)
233
+ ogp start
234
+
235
+ # Start in background
236
+ ogp start --background
237
+
238
+ # Start specific framework
239
+ ogp --for openclaw start --background
240
+
241
+ # Start all frameworks
242
+ ogp --for all start --background
243
+ ```
244
+
245
+ ### ogp stop
246
+
247
+ Stop the OGP daemon.
248
+
249
+ **Syntax:**
250
+ ```bash
251
+ ogp stop [--for <framework>]
252
+ ```
253
+
254
+ **Options:**
255
+ - `--for <framework>` - Framework to stop (default: current/default)
256
+
257
+ **Examples:**
258
+ ```bash
259
+ # Stop default framework
260
+ ogp stop
261
+
262
+ # Stop specific framework
263
+ ogp --for hermes stop
264
+
265
+ # Stop all frameworks
266
+ ogp --for all stop
267
+ ```
268
+
269
+ ### ogp status
270
+
271
+ Show daemon status and configuration.
272
+
273
+ **Syntax:**
274
+ ```bash
275
+ ogp status [--for <framework>]
276
+ ```
277
+
278
+ **Options:**
279
+ - `--for <framework>` - Framework to check (default: current/default)
280
+
281
+ **Examples:**
282
+ ```bash
283
+ # Check default framework
284
+ ogp status
285
+
286
+ # Check specific framework
287
+ ogp --for openclaw status
288
+
289
+ # Check all frameworks
290
+ ogp --for all status
291
+ ```
292
+
293
+ **Output:**
294
+ ```
295
+ OGP Daemon Status:
296
+ Framework: openclaw
297
+ Status: ● Running
298
+ Port: 18790
299
+ PID: 12345
300
+ Uptime: 5 minutes
301
+ Public Key: 302a300506032b6570032100...
302
+ Gateway URL: https://ogp.example.com
303
+ ```
304
+
305
+ ## Federation Commands
306
+
307
+ ### ogp federation list
308
+
309
+ List all peers.
310
+
311
+ **Syntax:**
312
+ ```bash
313
+ ogp federation list [--status <status>] [--for <framework>]
314
+ ```
315
+
316
+ **Options:**
317
+ - `--status <status>` - Filter by status: `pending`, `approved`, `rejected`, `removed`
318
+ - `--for <framework>` - Framework to query (default: current/default)
319
+
320
+ **Examples:**
321
+ ```bash
322
+ # List all peers
323
+ ogp federation list
324
+
325
+ # List pending requests
326
+ ogp federation list --status pending
327
+
328
+ # List approved peers
329
+ ogp federation list --status approved
330
+
331
+ # List peers across all frameworks
332
+ ogp --for all federation list
333
+ ```
334
+
335
+ ### ogp federation request
336
+
337
+ Send a federation request to a peer.
338
+
339
+ **Syntax:**
340
+ ```bash
341
+ ogp federation request <url> [--alias <alias>] [--for <framework>]
342
+ ```
343
+
344
+ **Arguments:**
345
+ - `<url>` - Peer's gateway URL (e.g., `https://peer.example.com`)
346
+
347
+ **Options:**
348
+ - `--alias <alias>` - Friendly name for the peer (auto-resolves from `/.well-known/ogp` if omitted)
349
+ - `--for <framework>` - Framework to use (default: current/default)
350
+
351
+ **Examples:**
352
+ ```bash
353
+ # Request with auto-resolved alias
354
+ ogp federation request https://peer.example.com
355
+
356
+ # Request with custom alias
357
+ ogp federation request https://peer.example.com --alias apollo
358
+
359
+ # Request from specific framework
360
+ ogp --for openclaw federation request https://hermes.example.com --alias hermes-gateway
361
+ ```
362
+
363
+ ### ogp federation approve
364
+
365
+ Approve a pending federation request.
366
+
367
+ **Syntax:**
368
+ ```bash
369
+ ogp federation approve <peer-id> [options] [--for <framework>]
370
+ ```
371
+
372
+ **Arguments:**
373
+ - `<peer-id>` - Peer identifier, alias, or display name
374
+
375
+ **Options:**
376
+ - `--intents <list>` - Comma-separated intents (e.g., `message,agent-comms`)
377
+ - `--rate <limit>` - Rate limit as requests/seconds (e.g., `100/3600`)
378
+ - `--topics <list>` - Topics for agent-comms (e.g., `memory-management,task-delegation`)
379
+ - `--for <framework>` - Framework to use (default: current/default)
380
+
381
+ **Examples:**
382
+ ```bash
383
+ # Approve without restrictions (v0.1 compatibility)
384
+ ogp federation approve apollo
385
+
386
+ # Approve with scope grants (v0.2.0+)
387
+ ogp federation approve apollo \
388
+ --intents message,agent-comms \
389
+ --rate 100/3600 \
390
+ --topics memory-management,task-delegation
391
+
392
+ # Approve from specific framework
393
+ ogp --for hermes federation approve bob --intents message
394
+ ```
395
+
396
+ ### ogp federation reject
397
+
398
+ Reject a pending federation request.
399
+
400
+ **Syntax:**
401
+ ```bash
402
+ ogp federation reject <peer-id> [--for <framework>]
403
+ ```
404
+
405
+ **Arguments:**
406
+ - `<peer-id>` - Peer identifier, alias, or display name
407
+
408
+ **Examples:**
409
+ ```bash
410
+ ogp federation reject charlie
411
+ ogp --for hermes federation reject charlie
412
+ ```
413
+
414
+ ### ogp federation remove
415
+
416
+ Remove a peer from federation (asymmetric tear-down).
417
+
418
+ **Syntax:**
419
+ ```bash
420
+ ogp federation remove <peer-id> [--for <framework>]
421
+ ```
422
+
423
+ **Arguments:**
424
+ - `<peer-id>` - Peer identifier, alias, or display name
425
+
426
+ **Examples:**
427
+ ```bash
428
+ ogp federation remove apollo
429
+ ogp --for openclaw federation remove apollo
430
+ ```
431
+
432
+ ### ogp federation send
433
+
434
+ Send a message to an approved peer.
435
+
436
+ **Syntax:**
437
+ ```bash
438
+ ogp federation send <peer-id> <intent> <payload> [--for <framework>]
439
+ ```
440
+
441
+ **Arguments:**
442
+ - `<peer-id>` - Peer identifier, alias, or display name
443
+ - `<intent>` - Intent type: `message`, `task-request`, `status-update`, `agent-comms`, `project.*`
444
+ - `<payload>` - JSON payload
445
+
446
+ **Options:**
447
+ - `--for <framework>` - Framework to use (default: current/default)
448
+
449
+ **Examples:**
450
+ ```bash
451
+ # Simple message
452
+ ogp federation send apollo message '{"text":"Hello from OGP!"}'
453
+
454
+ # Task request
455
+ ogp federation send apollo task-request '{
456
+ "taskType": "analysis",
457
+ "description": "Analyze recent logs"
458
+ }'
459
+
460
+ # Status update
461
+ ogp federation send apollo status-update '{
462
+ "status": "completed",
463
+ "message": "Task finished"
464
+ }'
465
+
466
+ # From specific framework
467
+ ogp --for hermes federation send bob message '{"text":"Hello from Hermes!"}'
468
+ ```
469
+
470
+ ### ogp federation agent
471
+
472
+ Send an agent-comms message to a peer.
473
+
474
+ **Syntax:**
475
+ ```bash
476
+ ogp federation agent <peer-id> <topic> <message> [options] [--for <framework>]
477
+ ```
478
+
479
+ **Arguments:**
480
+ - `<peer-id>` - Peer identifier, alias, or display name
481
+ - `<topic>` - Topic for routing (e.g., `memory-management`, `task-delegation`)
482
+ - `<message>` - Message text
483
+
484
+ **Options:**
485
+ - `--priority <level>` - Priority: `low`, `normal`, `high` (default: `normal`)
486
+ - `--wait` - Wait for reply
487
+ - `--timeout <ms>` - Reply timeout in milliseconds (default: 30000)
488
+ - `--conversation <id>` - Conversation ID for threading
489
+ - `--for <framework>` - Framework to use (default: current/default)
490
+
491
+ **Examples:**
492
+ ```bash
493
+ # Simple agent-comms
494
+ ogp federation agent apollo memory-management "How do you persist context?"
495
+
496
+ # High-priority message
497
+ ogp federation agent apollo task-delegation "Schedule standup ASAP" --priority high
498
+
499
+ # Wait for reply
500
+ ogp federation agent apollo queries "What's the status?" --wait --timeout 60000
501
+
502
+ # Threaded conversation
503
+ ogp federation agent apollo project-planning "Let's discuss sprint goals" --conversation sprint-42
504
+ ```
505
+
506
+ ### ogp federation scopes
507
+
508
+ Show scope grants for a peer.
509
+
510
+ **Syntax:**
511
+ ```bash
512
+ ogp federation scopes <peer-id> [--for <framework>]
513
+ ```
514
+
515
+ **Arguments:**
516
+ - `<peer-id>` - Peer identifier, alias, or display name
517
+
518
+ **Examples:**
519
+ ```bash
520
+ ogp federation scopes apollo
521
+ ogp --for hermes federation scopes bob
522
+ ```
523
+
524
+ ### ogp federation grant
525
+
526
+ Update scope grants for an existing peer.
527
+
528
+ **Syntax:**
529
+ ```bash
530
+ ogp federation grant <peer-id> [options] [--for <framework>]
531
+ ```
532
+
533
+ **Arguments:**
534
+ - `<peer-id>` - Peer identifier, alias, or display name
535
+
536
+ **Options:**
537
+ - `--intents <list>` - Comma-separated intents
538
+ - `--rate <limit>` - Rate limit as requests/seconds
539
+ - `--topics <list>` - Topics for agent-comms
540
+ - `--for <framework>` - Framework to use (default: current/default)
541
+
542
+ **Examples:**
543
+ ```bash
544
+ # Update intents
545
+ ogp federation grant apollo --intents agent-comms
546
+
547
+ # Update topics
548
+ ogp federation grant apollo --topics memory-management,planning
549
+
550
+ # Update rate limit
551
+ ogp federation grant apollo --rate 200/3600
552
+ ```
553
+
554
+ ### ogp federation alias
555
+
556
+ Manage peer aliases.
557
+
558
+ **Syntax:**
559
+ ```bash
560
+ ogp federation alias <peer-id> <new-alias> [--for <framework>]
561
+ ```
562
+
563
+ **Arguments:**
564
+ - `<peer-id>` - Current peer identifier or alias
565
+ - `<new-alias>` - New alias
566
+
567
+ **Examples:**
568
+ ```bash
569
+ ogp federation alias 302a300506... apollo
570
+ ogp federation alias apollo big-papa
571
+ ```
572
+
573
+ ### ogp federation ping
574
+
575
+ Test connectivity to a peer gateway.
576
+
577
+ **Syntax:**
578
+ ```bash
579
+ ogp federation ping <url> [--for <framework>]
580
+ ```
581
+
582
+ **Arguments:**
583
+ - `<url>` - Peer's gateway URL
584
+
585
+ **Examples:**
586
+ ```bash
587
+ ogp federation ping https://peer.example.com
588
+ ```
589
+
590
+ ### ogp federation invite
591
+
592
+ Generate a short-lived invite code using the optional rendezvous service (v0.2.15+).
593
+
594
+ **Syntax:**
595
+ ```bash
596
+ ogp federation invite [--ttl <seconds>] [--for <framework>]
597
+ ```
598
+
599
+ **Options:**
600
+ - `--ttl <seconds>` - Time-to-live in seconds (default: 600)
601
+ - `--for <framework>` - Framework to use (default: current/default)
602
+
603
+ **Examples:**
604
+ ```bash
605
+ # Generate invite with 10-minute expiry
606
+ ogp federation invite
607
+
608
+ # Custom TTL (30 minutes)
609
+ ogp federation invite --ttl 1800
610
+ ```
611
+
612
+ **Output:**
613
+ ```
614
+ Your invite code: a3f7k2 (expires in 10 minutes)
615
+ Share this with your peer — they run: ogp federation accept a3f7k2
616
+ ```
617
+
618
+ ### ogp federation accept
619
+
620
+ Accept an invite code from the optional rendezvous service and auto-connect to a peer (v0.2.15+).
621
+
622
+ **Syntax:**
623
+ ```bash
624
+ ogp federation accept <token> [--alias <alias>] [--for <framework>]
625
+ ```
626
+
627
+ **Arguments:**
628
+ - `<token>` - Invite code (e.g., `a3f7k2`)
629
+
630
+ **Options:**
631
+ - `--alias <alias>` - Custom alias for the peer
632
+ - `--for <framework>` - Framework to use (default: current/default)
633
+
634
+ **Examples:**
635
+ ```bash
636
+ # Accept invite
637
+ ogp federation accept a3f7k2
638
+
639
+ # Accept with custom alias
640
+ ogp federation accept a3f7k2 --alias apollo
641
+ ```
642
+
643
+ ### ogp federation connect
644
+
645
+ Connect to a peer by public key via the optional rendezvous discovery service (v0.2.14+).
646
+
647
+ **Syntax:**
648
+ ```bash
649
+ ogp federation connect <pubkey> [--alias <alias>] [--for <framework>]
650
+ ```
651
+
652
+ **Arguments:**
653
+ - `<pubkey>` - Peer's public key
654
+
655
+ **Options:**
656
+ - `--alias <alias>` - Custom alias for the peer
657
+ - `--for <framework>` - Framework to use (default: current/default)
658
+
659
+ **Examples:**
660
+ ```bash
661
+ ogp federation connect 302a300506032b6570032100...
662
+ ogp federation connect 302a300506... --alias apollo
663
+ ```
664
+
665
+ ## Agent Communications
666
+
667
+ ### ogp agent-comms interview
668
+
669
+ Run the delegated-authority / human-delivery interview.
670
+
671
+ **Syntax:**
672
+ ```bash
673
+ ogp agent-comms interview [--for <framework>]
674
+ ```
675
+
676
+ **Examples:**
677
+ ```bash
678
+ ogp agent-comms interview
679
+ ogp --for hermes agent-comms interview
680
+ ```
681
+
682
+ ### ogp agent-comms policies
683
+
684
+ Show response policies.
685
+
686
+ **Syntax:**
687
+ ```bash
688
+ ogp agent-comms policies [peer-id] [--for <framework>]
689
+ ```
690
+
691
+ **Arguments:**
692
+ - `[peer-id]` - Optional peer filter (shows all if omitted)
693
+
694
+ **Examples:**
695
+ ```bash
696
+ # Show all policies
697
+ ogp agent-comms policies
698
+
699
+ # Show policies for specific peer
700
+ ogp agent-comms policies apollo
701
+ ```
702
+
703
+ ### ogp agent-comms configure
704
+
705
+ Configure response policies for one or more peers.
706
+
707
+ **Syntax:**
708
+ ```bash
709
+ ogp agent-comms configure [peer-ids] [options] [--for <framework>]
710
+ ```
711
+
712
+ **Arguments:**
713
+ - `[peer-ids]` - Comma-separated peer IDs, or `--global` for defaults
714
+
715
+ **Options:**
716
+ - `--global` - Configure global defaults (applies to all peers)
717
+ - `--topics <list>` - Comma-separated topics
718
+ - `--level <level>` - Response level: `full`, `summary`, `escalate`, `deny`, `off`
719
+ - `--notes <text>` - Notes about this configuration
720
+ - `--for <framework>` - Framework to use (default: current/default)
721
+
722
+ **Examples:**
723
+ ```bash
724
+ # Configure global defaults
725
+ ogp agent-comms configure --global \
726
+ --topics "general,testing" \
727
+ --level summary
728
+
729
+ # Configure specific peer
730
+ ogp agent-comms configure apollo \
731
+ --topics "memory-management" \
732
+ --level full \
733
+ --notes "Trusted collaborator"
734
+
735
+ # Configure multiple peers
736
+ ogp agent-comms configure apollo,bob,charlie \
737
+ --topics "testing,debugging" \
738
+ --level full
739
+ ```
740
+
741
+ ### ogp agent-comms add-topic
742
+
743
+ Add a topic policy for a peer.
744
+
745
+ **Syntax:**
746
+ ```bash
747
+ ogp agent-comms add-topic <peer-id> <topic> [options] [--for <framework>]
748
+ ```
749
+
750
+ **Arguments:**
751
+ - `<peer-id>` - Peer identifier or alias
752
+ - `<topic>` - Topic name
753
+
754
+ **Options:**
755
+ - `--level <level>` - Response level (default: `summary`)
756
+ - `--for <framework>` - Framework to use (default: current/default)
757
+
758
+ **Examples:**
759
+ ```bash
760
+ ogp agent-comms add-topic apollo calendar --level escalate
761
+ ogp agent-comms add-topic bob deployment --level full
762
+ ```
763
+
764
+ ### ogp agent-comms remove-topic
765
+
766
+ Remove a topic policy for a peer.
767
+
768
+ **Syntax:**
769
+ ```bash
770
+ ogp agent-comms remove-topic <peer-id> <topic> [--for <framework>]
771
+ ```
772
+
773
+ **Arguments:**
774
+ - `<peer-id>` - Peer identifier or alias
775
+ - `<topic>` - Topic name
776
+
777
+ **Examples:**
778
+ ```bash
779
+ ogp agent-comms remove-topic apollo personal
780
+ ```
781
+
782
+ ### ogp agent-comms reset
783
+
784
+ Reset a peer to global defaults.
785
+
786
+ **Syntax:**
787
+ ```bash
788
+ ogp agent-comms reset <peer-id> [--for <framework>]
789
+ ```
790
+
791
+ **Arguments:**
792
+ - `<peer-id>` - Peer identifier or alias
793
+
794
+ **Examples:**
795
+ ```bash
796
+ ogp agent-comms reset apollo
797
+ ```
798
+
799
+ ### ogp agent-comms activity
800
+
801
+ Show activity log.
802
+
803
+ **Syntax:**
804
+ ```bash
805
+ ogp agent-comms activity [peer-id] [options] [--for <framework>]
806
+ ```
807
+
808
+ **Arguments:**
809
+ - `[peer-id]` - Optional peer filter
810
+
811
+ **Options:**
812
+ - `--last <n>` - Show last N entries (default: 10)
813
+ - `--for <framework>` - Framework to use (default: current/default)
814
+
815
+ **Examples:**
816
+ ```bash
817
+ # Show recent activity
818
+ ogp agent-comms activity
819
+
820
+ # Show last 20 entries
821
+ ogp agent-comms activity --last 20
822
+
823
+ # Filter by peer
824
+ ogp agent-comms activity apollo
825
+ ```
826
+
827
+ ### ogp agent-comms default
828
+
829
+ Set default response level for unknown topics.
830
+
831
+ **Syntax:**
832
+ ```bash
833
+ ogp agent-comms default <level> [--for <framework>]
834
+ ```
835
+
836
+ **Arguments:**
837
+ - `<level>` - Response level: `full`, `summary`, `escalate`, `deny`, `off`
838
+
839
+ **Examples:**
840
+ ```bash
841
+ # Allow unknown topics (summary response)
842
+ ogp agent-comms default summary
843
+
844
+ # Default-deny (send signed rejection)
845
+ ogp agent-comms default off
846
+ ```
847
+
848
+ ### ogp agent-comms logging
849
+
850
+ Enable or disable activity logging.
851
+
852
+ **Syntax:**
853
+ ```bash
854
+ ogp agent-comms logging <on|off> [--for <framework>]
855
+ ```
856
+
857
+ **Arguments:**
858
+ - `<on|off>` - Enable or disable logging
859
+
860
+ **Examples:**
861
+ ```bash
862
+ ogp agent-comms logging on
863
+ ogp agent-comms logging off
864
+ ```
865
+
866
+ ## Project Management
867
+
868
+ ### ogp project create
869
+
870
+ Create a new project.
871
+
872
+ **Syntax:**
873
+ ```bash
874
+ ogp project create <id> <name> [options] [--for <framework>]
875
+ ```
876
+
877
+ **Arguments:**
878
+ - `<id>` - Project identifier (alphanumeric, hyphens, underscores)
879
+ - `<name>` - Project display name
880
+
881
+ **Options:**
882
+ - `--description <text>` - Project description
883
+ - `--for <framework>` - Framework to use (default: current/default)
884
+
885
+ **Examples:**
886
+ ```bash
887
+ ogp project create expense-app "Expense Tracker App" \
888
+ --description "Mobile expense tracking application"
889
+ ```
890
+
891
+ ### ogp project join
892
+
893
+ Join an existing project.
894
+
895
+ **Syntax:**
896
+ ```bash
897
+ ogp project join <id> [name] [options] [--for <framework>]
898
+ ```
899
+
900
+ **Arguments:**
901
+ - `<id>` - Project identifier
902
+ - `[name]` - Optional project name
903
+
904
+ **Options:**
905
+ - `--description <text>` - Project description
906
+ - `--for <framework>` - Framework to use (default: current/default)
907
+
908
+ **Examples:**
909
+ ```bash
910
+ ogp project join shared-app "Shared Application"
911
+ ```
912
+
913
+ ### ogp project list
914
+
915
+ List all projects.
916
+
917
+ **Syntax:**
918
+ ```bash
919
+ ogp project list [--for <framework>]
920
+ ```
921
+
922
+ **Examples:**
923
+ ```bash
924
+ ogp project list
925
+ ogp --for all project list
926
+ ```
927
+
928
+ ### ogp project contribute
929
+
930
+ Add a contribution to a project.
931
+
932
+ **Syntax:**
933
+ ```bash
934
+ ogp project contribute <id> <type> <summary> [--for <framework>]
935
+ ```
936
+
937
+ **Arguments:**
938
+ - `<id>` - Project identifier
939
+ - `<type>` - Entry type: `progress`, `decision`, `blocker`, `context`
940
+ - `<summary>` - Contribution summary
941
+
942
+ **Examples:**
943
+ ```bash
944
+ ogp project contribute expense-app progress "Completed authentication system"
945
+ ogp project contribute expense-app decision "Using PostgreSQL for persistence"
946
+ ogp project contribute expense-app blocker "Waiting for API key approval"
947
+ ogp project contribute expense-app context "Target users: small business owners"
948
+ ```
949
+
950
+ ### ogp project query
951
+
952
+ Query project contributions.
953
+
954
+ **Syntax:**
955
+ ```bash
956
+ ogp project query <id> [options] [--for <framework>]
957
+ ```
958
+
959
+ **Arguments:**
960
+ - `<id>` - Project identifier
961
+
962
+ **Options:**
963
+ - `--limit <n>` - Max number of entries (default: 20)
964
+ - `--type <type>` - Filter by entry type
965
+ - `--for <framework>` - Framework to use (default: current/default)
966
+
967
+ **Examples:**
968
+ ```bash
969
+ # Query recent contributions
970
+ ogp project query expense-app --limit 10
971
+
972
+ # Filter by type
973
+ ogp project query expense-app --type progress
974
+ ```
975
+
976
+ ### ogp project status
977
+
978
+ Show project status.
979
+
980
+ **Syntax:**
981
+ ```bash
982
+ ogp project status <id> [--for <framework>]
983
+ ```
984
+
985
+ **Arguments:**
986
+ - `<id>` - Project identifier
987
+
988
+ **Examples:**
989
+ ```bash
990
+ ogp project status expense-app
991
+ ```
992
+
993
+ ### ogp project request-join
994
+
995
+ Request to join a peer's project.
996
+
997
+ **Syntax:**
998
+ ```bash
999
+ ogp project request-join <peer-id> <project-id> <name> [--for <framework>]
1000
+ ```
1001
+
1002
+ **Arguments:**
1003
+ - `<peer-id>` - Peer identifier or alias
1004
+ - `<project-id>` - Project identifier
1005
+ - `<name>` - Project name
1006
+
1007
+ **Examples:**
1008
+ ```bash
1009
+ ogp project request-join apollo mobile-app "Mobile App Project"
1010
+ ```
1011
+
1012
+ ### ogp project send-contribution
1013
+
1014
+ Send a contribution to a peer's project.
1015
+
1016
+ **Syntax:**
1017
+ ```bash
1018
+ ogp project send-contribution <peer-id> <project-id> <type> <summary> [--for <framework>]
1019
+ ```
1020
+
1021
+ **Arguments:**
1022
+ - `<peer-id>` - Peer identifier or alias
1023
+ - `<project-id>` - Project identifier
1024
+ - `<type>` - Entry type: `progress`, `decision`, `blocker`, `context`
1025
+ - `<summary>` - Contribution summary
1026
+
1027
+ **Examples:**
1028
+ ```bash
1029
+ ogp project send-contribution apollo shared-app progress "Deployed staging environment"
1030
+ ```
1031
+
1032
+ ### ogp project query-peer
1033
+
1034
+ Query a peer's project contributions.
1035
+
1036
+ **Syntax:**
1037
+ ```bash
1038
+ ogp project query-peer <peer-id> <project-id> [options] [--for <framework>]
1039
+ ```
1040
+
1041
+ **Arguments:**
1042
+ - `<peer-id>` - Peer identifier or alias
1043
+ - `<project-id>` - Project identifier
1044
+
1045
+ **Options:**
1046
+ - `--limit <n>` - Max number of entries (default: 20)
1047
+ - `--for <framework>` - Framework to use (default: current/default)
1048
+
1049
+ **Examples:**
1050
+ ```bash
1051
+ ogp project query-peer apollo shared-app --limit 10
1052
+ ```
1053
+
1054
+ ### ogp project status-peer
1055
+
1056
+ Get a peer's project status.
1057
+
1058
+ **Syntax:**
1059
+ ```bash
1060
+ ogp project status-peer <peer-id> <project-id> [--for <framework>]
1061
+ ```
1062
+
1063
+ **Arguments:**
1064
+ - `<peer-id>` - Peer identifier or alias
1065
+ - `<project-id>` - Project identifier
1066
+
1067
+ **Examples:**
1068
+ ```bash
1069
+ ogp project status-peer apollo shared-app
1070
+ ```
1071
+
1072
+ ### ogp project delete
1073
+
1074
+ Delete a project.
1075
+
1076
+ **Syntax:**
1077
+ ```bash
1078
+ ogp project delete <id> [--confirm] [--for <framework>]
1079
+ ```
1080
+
1081
+ **Arguments:**
1082
+ - `<id>` - Project identifier
1083
+
1084
+ **Options:**
1085
+ - `--confirm` - Skip confirmation prompt
1086
+ - `--for <framework>` - Framework to use (default: current/default)
1087
+
1088
+ **Examples:**
1089
+ ```bash
1090
+ ogp project delete old-project --confirm
1091
+ ```
1092
+
1093
+ ## Intent Management
1094
+
1095
+ ### ogp intent register
1096
+
1097
+ Register a custom intent handler.
1098
+
1099
+ **Syntax:**
1100
+ ```bash
1101
+ ogp intent register <name> [options] [--for <framework>]
1102
+ ```
1103
+
1104
+ **Arguments:**
1105
+ - `<name>` - Intent name
1106
+
1107
+ **Options:**
1108
+ - `--session-key <key>` - Session key for routing (e.g., `agent:main:main`)
1109
+ - `--description <text>` - Intent description
1110
+ - `--for <framework>` - Framework to use (default: current/default)
1111
+
1112
+ **Examples:**
1113
+ ```bash
1114
+ ogp intent register deployment \
1115
+ --session-key "agent:main:main" \
1116
+ --description "Deployment notifications"
1117
+ ```
1118
+
1119
+ ### ogp intent list
1120
+
1121
+ List all registered intents.
1122
+
1123
+ **Syntax:**
1124
+ ```bash
1125
+ ogp intent list [--for <framework>]
1126
+ ```
1127
+
1128
+ **Examples:**
1129
+ ```bash
1130
+ ogp intent list
1131
+ ogp --for all intent list
1132
+ ```
1133
+
1134
+ ### ogp intent remove
1135
+
1136
+ Remove a registered intent.
1137
+
1138
+ **Syntax:**
1139
+ ```bash
1140
+ ogp intent remove <name> [--for <framework>]
1141
+ ```
1142
+
1143
+ **Arguments:**
1144
+ - `<name>` - Intent name
1145
+
1146
+ **Examples:**
1147
+ ```bash
1148
+ ogp intent remove deployment
1149
+ ```
1150
+
1151
+ ## Tunnel Management
1152
+
1153
+ ### ogp expose
1154
+
1155
+ Start a public tunnel to expose the daemon to the internet.
1156
+
1157
+ **Syntax:**
1158
+ ```bash
1159
+ ogp expose [--background] [--method <method>] [--for <framework>]
1160
+ ```
1161
+
1162
+ **Options:**
1163
+ - `--background` - Run as background process
1164
+ - `--method <method>` - Tunnel method: `cloudflared`, `ngrok` (default: `cloudflared`)
1165
+ - `--for <framework>` - Framework to use (default: current/default)
1166
+
1167
+ **Examples:**
1168
+ ```bash
1169
+ # Start cloudflared tunnel (foreground)
1170
+ ogp expose
1171
+
1172
+ # Start in background
1173
+ ogp expose --background
1174
+
1175
+ # Use ngrok
1176
+ ogp expose --method ngrok
1177
+
1178
+ # Expose specific framework
1179
+ ogp --for hermes expose --background
1180
+ ```
1181
+
1182
+ ### ogp expose stop
1183
+
1184
+ Stop the tunnel.
1185
+
1186
+ **Syntax:**
1187
+ ```bash
1188
+ ogp expose stop [--for <framework>]
1189
+ ```
1190
+
1191
+ **Examples:**
1192
+ ```bash
1193
+ ogp expose stop
1194
+ ogp --for all expose stop
1195
+ ```
1196
+
1197
+ ## System Integration
1198
+
1199
+ ### ogp install
1200
+
1201
+ Install macOS LaunchAgent for auto-start on login.
1202
+
1203
+ **Syntax:**
1204
+ ```bash
1205
+ ogp install [--for <framework>]
1206
+ ```
1207
+
1208
+ **Examples:**
1209
+ ```bash
1210
+ ogp install
1211
+ ogp --for openclaw install
1212
+ ```
1213
+
1214
+ ### ogp uninstall
1215
+
1216
+ Remove macOS LaunchAgent.
1217
+
1218
+ **Syntax:**
1219
+ ```bash
1220
+ ogp uninstall [--for <framework>]
1221
+ ```
1222
+
1223
+ **Examples:**
1224
+ ```bash
1225
+ ogp uninstall
1226
+ ogp --for openclaw uninstall
1227
+ ```
1228
+
1229
+ ## Completion
1230
+
1231
+ ### ogp completion install
1232
+
1233
+ Install shell completion.
1234
+
1235
+ **Syntax:**
1236
+ ```bash
1237
+ ogp completion install <shell>
1238
+ ```
1239
+
1240
+ **Arguments:**
1241
+ - `<shell>` - Shell type: `bash` or `zsh`
1242
+
1243
+ **Examples:**
1244
+ ```bash
1245
+ # Install bash completion
1246
+ ogp completion install bash
1247
+
1248
+ # Install zsh completion
1249
+ ogp completion install zsh
1250
+ ```
1251
+
1252
+ After installation, reload your shell:
1253
+
1254
+ ```bash
1255
+ source ~/.bashrc # Bash
1256
+ source ~/.zshrc # Zsh
1257
+ ```
1258
+
1259
+ ### ogp completion uninstall
1260
+
1261
+ Uninstall shell completion.
1262
+
1263
+ **Syntax:**
1264
+ ```bash
1265
+ ogp completion uninstall <shell>
1266
+ ```
1267
+
1268
+ **Arguments:**
1269
+ - `<shell>` - Shell type: `bash` or `zsh`
1270
+
1271
+ **Examples:**
1272
+ ```bash
1273
+ ogp completion uninstall bash
1274
+ ```
1275
+
1276
+ ## Multi-Framework Operations
1277
+
1278
+ ### Running Commands Across All Frameworks
1279
+
1280
+ Use `--for all` to run commands on all enabled frameworks:
1281
+
1282
+ **Examples:**
1283
+ ```bash
1284
+ # Start all daemons
1285
+ ogp --for all start --background
1286
+
1287
+ # Check status of all frameworks
1288
+ ogp --for all status
1289
+
1290
+ # List peers across all frameworks
1291
+ ogp --for all federation list
1292
+
1293
+ # Stop all daemons
1294
+ ogp --for all stop
1295
+ ```
1296
+
1297
+ **Output Format:**
1298
+
1299
+ When using `--for all`, output is grouped by framework:
1300
+
1301
+ ```
1302
+ === OpenClaw (Junior @ OpenClaw) ===
1303
+ [command output for OpenClaw]
1304
+
1305
+ === Hermes (Apollo @ Hermes) ===
1306
+ [command output for Hermes]
1307
+ ```
1308
+
1309
+ ### Framework-Specific Commands
1310
+
1311
+ Commands that don't support `--for all`:
1312
+
1313
+ - `ogp setup` - Must configure each framework individually
1314
+ - `ogp config set-default` - Sets a single default
1315
+ - Federation operations targeting specific peers (use explicit `--for`)
1316
+
1317
+ ### Environment Variable Override
1318
+
1319
+ The `OGP_HOME` environment variable overrides framework selection:
1320
+
1321
+ ```bash
1322
+ # Explicitly use custom config directory
1323
+ OGP_HOME=~/.ogp-custom ogp status
1324
+ ```
1325
+
1326
+ This takes precedence over `--for` flag and default framework setting.
1327
+
1328
+ ## Response Levels Reference
1329
+
1330
+ Agent-comms response levels control how your agent responds to incoming messages:
1331
+
1332
+ | Level | Behavior |
1333
+ |-------|----------|
1334
+ | `full` | Respond openly with full details |
1335
+ | `summary` | High-level responses only, no sensitive details |
1336
+ | `escalate` | Ask human before responding |
1337
+ | `deny` | Politely decline to discuss topic |
1338
+ | `off` | Default-deny: send signed rejection, do not process |
1339
+
1340
+ ## Exit Codes
1341
+
1342
+ | Code | Meaning |
1343
+ |------|---------|
1344
+ | 0 | Success |
1345
+ | 1 | General error |
1346
+ | 2 | Configuration error |
1347
+ | 3 | Network error |
1348
+ | 4 | Authentication error |
1349
+ | 5 | Permission error |
1350
+ | 126 | Command cannot execute |
1351
+ | 127 | Command not found |
1352
+ | 130 | Interrupted (Ctrl+C) |
1353
+
1354
+ ## See Also
1355
+
1356
+ - [Getting Started Guide](./GETTING-STARTED.md) - Setup and workflows
1357
+ - [Federation Flow](./federation-flow.md) - Message flow details
1358
+ - [Scope Negotiation](./scopes.md) - Access control
1359
+ - [Agent Communications](./agent-comms.md) - Agent-to-agent messaging
1360
+ - [Migration Guide](./MIGRATION.md) - Upgrading to multi-framework