@dp-pcs/ogp 0.3.3 → 0.4.3

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 (112) hide show
  1. package/README.md +317 -61
  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 +14 -0
  14. package/dist/cli/federation.d.ts.map +1 -1
  15. package/dist/cli/federation.js +347 -23
  16. package/dist/cli/federation.js.map +1 -1
  17. package/dist/cli/project.d.ts +4 -3
  18. package/dist/cli/project.d.ts.map +1 -1
  19. package/dist/cli/project.js +34 -24
  20. package/dist/cli/project.js.map +1 -1
  21. package/dist/cli/setup.d.ts +23 -0
  22. package/dist/cli/setup.d.ts.map +1 -1
  23. package/dist/cli/setup.js +560 -32
  24. package/dist/cli/setup.js.map +1 -1
  25. package/dist/cli.js +358 -35
  26. package/dist/cli.js.map +1 -1
  27. package/dist/daemon/agent-comms.d.ts.map +1 -1
  28. package/dist/daemon/agent-comms.js +15 -10
  29. package/dist/daemon/agent-comms.js.map +1 -1
  30. package/dist/daemon/heartbeat.d.ts +22 -0
  31. package/dist/daemon/heartbeat.d.ts.map +1 -0
  32. package/dist/daemon/heartbeat.js +119 -0
  33. package/dist/daemon/heartbeat.js.map +1 -0
  34. package/dist/daemon/intent-registry.d.ts.map +1 -1
  35. package/dist/daemon/intent-registry.js +19 -10
  36. package/dist/daemon/intent-registry.js.map +1 -1
  37. package/dist/daemon/keypair.d.ts +1 -0
  38. package/dist/daemon/keypair.d.ts.map +1 -1
  39. package/dist/daemon/keypair.js +151 -18
  40. package/dist/daemon/keypair.js.map +1 -1
  41. package/dist/daemon/message-handler.d.ts.map +1 -1
  42. package/dist/daemon/message-handler.js +30 -16
  43. package/dist/daemon/message-handler.js.map +1 -1
  44. package/dist/daemon/notify.d.ts +19 -0
  45. package/dist/daemon/notify.d.ts.map +1 -1
  46. package/dist/daemon/notify.js +376 -73
  47. package/dist/daemon/notify.js.map +1 -1
  48. package/dist/daemon/openclaw-bridge.d.ts +34 -0
  49. package/dist/daemon/openclaw-bridge.d.ts.map +1 -0
  50. package/dist/daemon/openclaw-bridge.js +261 -0
  51. package/dist/daemon/openclaw-bridge.js.map +1 -0
  52. package/dist/daemon/peers.d.ts +21 -0
  53. package/dist/daemon/peers.d.ts.map +1 -1
  54. package/dist/daemon/peers.js +125 -20
  55. package/dist/daemon/peers.js.map +1 -1
  56. package/dist/daemon/projects.d.ts +9 -6
  57. package/dist/daemon/projects.d.ts.map +1 -1
  58. package/dist/daemon/projects.js +30 -20
  59. package/dist/daemon/projects.js.map +1 -1
  60. package/dist/daemon/server.d.ts +17 -0
  61. package/dist/daemon/server.d.ts.map +1 -1
  62. package/dist/daemon/server.js +188 -77
  63. package/dist/daemon/server.js.map +1 -1
  64. package/dist/shared/config.d.ts +52 -1
  65. package/dist/shared/config.d.ts.map +1 -1
  66. package/dist/shared/config.js +18 -11
  67. package/dist/shared/config.js.map +1 -1
  68. package/dist/shared/framework-detection.d.ts +31 -0
  69. package/dist/shared/framework-detection.d.ts.map +1 -0
  70. package/dist/shared/framework-detection.js +91 -0
  71. package/dist/shared/framework-detection.js.map +1 -0
  72. package/dist/shared/help.d.ts +5 -0
  73. package/dist/shared/help.d.ts.map +1 -0
  74. package/dist/shared/help.js +281 -0
  75. package/dist/shared/help.js.map +1 -0
  76. package/dist/shared/meta-config.d.ts +44 -0
  77. package/dist/shared/meta-config.d.ts.map +1 -0
  78. package/dist/shared/meta-config.js +89 -0
  79. package/dist/shared/meta-config.js.map +1 -0
  80. package/dist/shared/migration.d.ts +57 -0
  81. package/dist/shared/migration.d.ts.map +1 -0
  82. package/dist/shared/migration.js +255 -0
  83. package/dist/shared/migration.js.map +1 -0
  84. package/docs/CLI-REFERENCE.md +1361 -0
  85. package/docs/GETTING-STARTED.md +953 -0
  86. package/docs/MIGRATION.md +202 -0
  87. package/docs/MULTI-FRAMEWORK-DEMO.md +352 -0
  88. package/docs/MULTI-FRAMEWORK-DESIGN.md +378 -0
  89. package/docs/MULTI-FRAMEWORK-IMPL.md +197 -0
  90. package/docs/case-studies/CRASH_RESOLUTION_20260407.md +190 -0
  91. package/docs/case-studies/OpenClaw_Hermes_Status_Report_20260407.md +142 -0
  92. package/docs/case-studies/OpenClaw_Stability_Fix_Summary.md +209 -0
  93. package/docs/case-studies/README.md +40 -0
  94. package/docs/case-studies/crash_observations.md +250 -0
  95. package/docs/cloudflare-named-tunnel-setup.md +126 -0
  96. package/docs/federation-flow.md +27 -37
  97. package/docs/hermes-implementation-checklist.md +4 -0
  98. package/docs/project-intent-testing.md +97 -0
  99. package/docs/quickstart.md +12 -4
  100. package/docs/rendezvous.md +13 -14
  101. package/docs/scopes.md +13 -13
  102. package/package.json +12 -6
  103. package/scripts/completion.bash +123 -0
  104. package/scripts/completion.zsh +372 -0
  105. package/scripts/install-skills.js +19 -1
  106. package/scripts/test-migration-execute.js +74 -0
  107. package/scripts/test-migration.js +42 -0
  108. package/scripts/test-project-intents.mjs +614 -0
  109. package/skills/ogp/SKILL.md +197 -64
  110. package/skills/ogp-agent-comms/SKILL.md +107 -41
  111. package/skills/ogp-expose/SKILL.md +183 -25
  112. package/skills/ogp-project/SKILL.md +110 -88
@@ -0,0 +1,1361 @@
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
+ - `--topic <type>` - Legacy alias for `--type`
966
+ - `--for <framework>` - Framework to use (default: current/default)
967
+
968
+ **Examples:**
969
+ ```bash
970
+ # Query recent contributions
971
+ ogp project query expense-app --limit 10
972
+
973
+ # Filter by type
974
+ ogp project query expense-app --type progress
975
+ ```
976
+
977
+ ### ogp project status
978
+
979
+ Show project status.
980
+
981
+ **Syntax:**
982
+ ```bash
983
+ ogp project status <id> [--for <framework>]
984
+ ```
985
+
986
+ **Arguments:**
987
+ - `<id>` - Project identifier
988
+
989
+ **Examples:**
990
+ ```bash
991
+ ogp project status expense-app
992
+ ```
993
+
994
+ ### ogp project request-join
995
+
996
+ Request to join a peer's project.
997
+
998
+ **Syntax:**
999
+ ```bash
1000
+ ogp project request-join <peer-id> <project-id> <name> [--for <framework>]
1001
+ ```
1002
+
1003
+ **Arguments:**
1004
+ - `<peer-id>` - Peer identifier or alias
1005
+ - `<project-id>` - Project identifier
1006
+ - `<name>` - Project name
1007
+
1008
+ **Examples:**
1009
+ ```bash
1010
+ ogp project request-join apollo mobile-app "Mobile App Project"
1011
+ ```
1012
+
1013
+ ### ogp project send-contribution
1014
+
1015
+ Send a contribution to a peer's project.
1016
+
1017
+ **Syntax:**
1018
+ ```bash
1019
+ ogp project send-contribution <peer-id> <project-id> <type> <summary> [--for <framework>]
1020
+ ```
1021
+
1022
+ **Arguments:**
1023
+ - `<peer-id>` - Peer identifier or alias
1024
+ - `<project-id>` - Project identifier
1025
+ - `<type>` - Entry type: `progress`, `decision`, `blocker`, `context`
1026
+ - `<summary>` - Contribution summary
1027
+
1028
+ **Examples:**
1029
+ ```bash
1030
+ ogp project send-contribution apollo shared-app progress "Deployed staging environment"
1031
+ ```
1032
+
1033
+ ### ogp project query-peer
1034
+
1035
+ Query a peer's project contributions.
1036
+
1037
+ **Syntax:**
1038
+ ```bash
1039
+ ogp project query-peer <peer-id> <project-id> [options] [--for <framework>]
1040
+ ```
1041
+
1042
+ **Arguments:**
1043
+ - `<peer-id>` - Peer identifier or alias
1044
+ - `<project-id>` - Project identifier
1045
+
1046
+ **Options:**
1047
+ - `--limit <n>` - Max number of entries (default: 20)
1048
+ - `--for <framework>` - Framework to use (default: current/default)
1049
+
1050
+ **Examples:**
1051
+ ```bash
1052
+ ogp project query-peer apollo shared-app --limit 10
1053
+ ```
1054
+
1055
+ ### ogp project status-peer
1056
+
1057
+ Get a peer's project status.
1058
+
1059
+ **Syntax:**
1060
+ ```bash
1061
+ ogp project status-peer <peer-id> <project-id> [--for <framework>]
1062
+ ```
1063
+
1064
+ **Arguments:**
1065
+ - `<peer-id>` - Peer identifier or alias
1066
+ - `<project-id>` - Project identifier
1067
+
1068
+ **Examples:**
1069
+ ```bash
1070
+ ogp project status-peer apollo shared-app
1071
+ ```
1072
+
1073
+ ### ogp project delete
1074
+
1075
+ Delete a project.
1076
+
1077
+ **Syntax:**
1078
+ ```bash
1079
+ ogp project delete <id> [--confirm] [--for <framework>]
1080
+ ```
1081
+
1082
+ **Arguments:**
1083
+ - `<id>` - Project identifier
1084
+
1085
+ **Options:**
1086
+ - `--confirm` - Skip confirmation prompt
1087
+ - `--for <framework>` - Framework to use (default: current/default)
1088
+
1089
+ **Examples:**
1090
+ ```bash
1091
+ ogp project delete old-project --confirm
1092
+ ```
1093
+
1094
+ ## Intent Management
1095
+
1096
+ ### ogp intent register
1097
+
1098
+ Register a custom intent handler.
1099
+
1100
+ **Syntax:**
1101
+ ```bash
1102
+ ogp intent register <name> [options] [--for <framework>]
1103
+ ```
1104
+
1105
+ **Arguments:**
1106
+ - `<name>` - Intent name
1107
+
1108
+ **Options:**
1109
+ - `--session-key <key>` - Session key for routing (e.g., `agent:main:main`)
1110
+ - `--description <text>` - Intent description
1111
+ - `--for <framework>` - Framework to use (default: current/default)
1112
+
1113
+ **Examples:**
1114
+ ```bash
1115
+ ogp intent register deployment \
1116
+ --session-key "agent:main:main" \
1117
+ --description "Deployment notifications"
1118
+ ```
1119
+
1120
+ ### ogp intent list
1121
+
1122
+ List all registered intents.
1123
+
1124
+ **Syntax:**
1125
+ ```bash
1126
+ ogp intent list [--for <framework>]
1127
+ ```
1128
+
1129
+ **Examples:**
1130
+ ```bash
1131
+ ogp intent list
1132
+ ogp --for all intent list
1133
+ ```
1134
+
1135
+ ### ogp intent remove
1136
+
1137
+ Remove a registered intent.
1138
+
1139
+ **Syntax:**
1140
+ ```bash
1141
+ ogp intent remove <name> [--for <framework>]
1142
+ ```
1143
+
1144
+ **Arguments:**
1145
+ - `<name>` - Intent name
1146
+
1147
+ **Examples:**
1148
+ ```bash
1149
+ ogp intent remove deployment
1150
+ ```
1151
+
1152
+ ## Tunnel Management
1153
+
1154
+ ### ogp expose
1155
+
1156
+ Start a public tunnel to expose the daemon to the internet.
1157
+
1158
+ **Syntax:**
1159
+ ```bash
1160
+ ogp expose [--background] [--method <method>] [--for <framework>]
1161
+ ```
1162
+
1163
+ **Options:**
1164
+ - `--background` - Run as background process
1165
+ - `--method <method>` - Tunnel method: `cloudflared`, `ngrok` (default: `cloudflared`)
1166
+ - `--for <framework>` - Framework to use (default: current/default)
1167
+
1168
+ **Examples:**
1169
+ ```bash
1170
+ # Start cloudflared tunnel (foreground)
1171
+ ogp expose
1172
+
1173
+ # Start in background
1174
+ ogp expose --background
1175
+
1176
+ # Use ngrok
1177
+ ogp expose --method ngrok
1178
+
1179
+ # Expose specific framework
1180
+ ogp --for hermes expose --background
1181
+ ```
1182
+
1183
+ ### ogp expose stop
1184
+
1185
+ Stop the tunnel.
1186
+
1187
+ **Syntax:**
1188
+ ```bash
1189
+ ogp expose stop [--for <framework>]
1190
+ ```
1191
+
1192
+ **Examples:**
1193
+ ```bash
1194
+ ogp expose stop
1195
+ ogp --for all expose stop
1196
+ ```
1197
+
1198
+ ## System Integration
1199
+
1200
+ ### ogp install
1201
+
1202
+ Install macOS LaunchAgent for auto-start on login.
1203
+
1204
+ **Syntax:**
1205
+ ```bash
1206
+ ogp install [--for <framework>]
1207
+ ```
1208
+
1209
+ **Examples:**
1210
+ ```bash
1211
+ ogp install
1212
+ ogp --for openclaw install
1213
+ ```
1214
+
1215
+ ### ogp uninstall
1216
+
1217
+ Remove macOS LaunchAgent.
1218
+
1219
+ **Syntax:**
1220
+ ```bash
1221
+ ogp uninstall [--for <framework>]
1222
+ ```
1223
+
1224
+ **Examples:**
1225
+ ```bash
1226
+ ogp uninstall
1227
+ ogp --for openclaw uninstall
1228
+ ```
1229
+
1230
+ ## Completion
1231
+
1232
+ ### ogp completion install
1233
+
1234
+ Install shell completion.
1235
+
1236
+ **Syntax:**
1237
+ ```bash
1238
+ ogp completion install <shell>
1239
+ ```
1240
+
1241
+ **Arguments:**
1242
+ - `<shell>` - Shell type: `bash` or `zsh`
1243
+
1244
+ **Examples:**
1245
+ ```bash
1246
+ # Install bash completion
1247
+ ogp completion install bash
1248
+
1249
+ # Install zsh completion
1250
+ ogp completion install zsh
1251
+ ```
1252
+
1253
+ After installation, reload your shell:
1254
+
1255
+ ```bash
1256
+ source ~/.bashrc # Bash
1257
+ source ~/.zshrc # Zsh
1258
+ ```
1259
+
1260
+ ### ogp completion uninstall
1261
+
1262
+ Uninstall shell completion.
1263
+
1264
+ **Syntax:**
1265
+ ```bash
1266
+ ogp completion uninstall <shell>
1267
+ ```
1268
+
1269
+ **Arguments:**
1270
+ - `<shell>` - Shell type: `bash` or `zsh`
1271
+
1272
+ **Examples:**
1273
+ ```bash
1274
+ ogp completion uninstall bash
1275
+ ```
1276
+
1277
+ ## Multi-Framework Operations
1278
+
1279
+ ### Running Commands Across All Frameworks
1280
+
1281
+ Use `--for all` to run commands on all enabled frameworks:
1282
+
1283
+ **Examples:**
1284
+ ```bash
1285
+ # Start all daemons
1286
+ ogp --for all start --background
1287
+
1288
+ # Check status of all frameworks
1289
+ ogp --for all status
1290
+
1291
+ # List peers across all frameworks
1292
+ ogp --for all federation list
1293
+
1294
+ # Stop all daemons
1295
+ ogp --for all stop
1296
+ ```
1297
+
1298
+ **Output Format:**
1299
+
1300
+ When using `--for all`, output is grouped by framework:
1301
+
1302
+ ```
1303
+ === OpenClaw (Junior @ OpenClaw) ===
1304
+ [command output for OpenClaw]
1305
+
1306
+ === Hermes (Apollo @ Hermes) ===
1307
+ [command output for Hermes]
1308
+ ```
1309
+
1310
+ ### Framework-Specific Commands
1311
+
1312
+ Commands that don't support `--for all`:
1313
+
1314
+ - `ogp setup` - Must configure each framework individually
1315
+ - `ogp config set-default` - Sets a single default
1316
+ - Federation operations targeting specific peers (use explicit `--for`)
1317
+
1318
+ ### Environment Variable Override
1319
+
1320
+ The `OGP_HOME` environment variable overrides framework selection:
1321
+
1322
+ ```bash
1323
+ # Explicitly use custom config directory
1324
+ OGP_HOME=~/.ogp-custom ogp status
1325
+ ```
1326
+
1327
+ This takes precedence over `--for` flag and default framework setting.
1328
+
1329
+ ## Response Levels Reference
1330
+
1331
+ Agent-comms response levels control how your agent responds to incoming messages:
1332
+
1333
+ | Level | Behavior |
1334
+ |-------|----------|
1335
+ | `full` | Respond openly with full details |
1336
+ | `summary` | High-level responses only, no sensitive details |
1337
+ | `escalate` | Ask human before responding |
1338
+ | `deny` | Politely decline to discuss topic |
1339
+ | `off` | Default-deny: send signed rejection, do not process |
1340
+
1341
+ ## Exit Codes
1342
+
1343
+ | Code | Meaning |
1344
+ |------|---------|
1345
+ | 0 | Success |
1346
+ | 1 | General error |
1347
+ | 2 | Configuration error |
1348
+ | 3 | Network error |
1349
+ | 4 | Authentication error |
1350
+ | 5 | Permission error |
1351
+ | 126 | Command cannot execute |
1352
+ | 127 | Command not found |
1353
+ | 130 | Interrupted (Ctrl+C) |
1354
+
1355
+ ## See Also
1356
+
1357
+ - [Getting Started Guide](./GETTING-STARTED.md) - Setup and workflows
1358
+ - [Federation Flow](./federation-flow.md) - Message flow details
1359
+ - [Scope Negotiation](./scopes.md) - Access control
1360
+ - [Agent Communications](./agent-comms.md) - Agent-to-agent messaging
1361
+ - [Migration Guide](./MIGRATION.md) - Upgrading to multi-framework