@dp-pcs/ogp 0.2.26 → 0.2.29

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.
@@ -8,7 +8,8 @@ Detailed walkthrough of OGP federation message flows.
8
8
  2. [Federation Request](#federation-request)
9
9
  3. [Federation Approval](#federation-approval)
10
10
  4. [Message Exchange](#message-exchange)
11
- 5. [Security Model](#security-model)
11
+ 5. [Federation Removal (Asymmetric Tear-Down)](#federation-removal-asymmetric-tear-down)
12
+ 6. [Security Model](#security-model)
12
13
 
13
14
  ## Discovery
14
15
 
@@ -30,6 +31,7 @@ Host: peer.example.com
30
31
  "email": "alice@example.com",
31
32
  "gatewayUrl": "https://peer.example.com",
32
33
  "publicKey": "302a300506032b6570032100abc123...",
34
+ "agentId": "main",
33
35
  "capabilities": {
34
36
  "intents": ["message", "task-request", "status-update", "agent-comms"],
35
37
  "features": ["scope-negotiation", "reply-callback", "project-intent"]
@@ -48,6 +50,7 @@ This endpoint:
48
50
  - Lists federation endpoints
49
51
  - Advertises gateway capabilities (v0.2.0+)
50
52
  - Indicates supported intents and features
53
+ - Includes `agentId` (v0.2.28+) - identifies which OpenClaw agent owns this gateway
51
54
 
52
55
  ## Federation Request
53
56
 
@@ -64,7 +67,7 @@ ogp federation request https://bob.example.com
64
67
  Or specify a custom peer-id:
65
68
 
66
69
  ```bash
67
- ogp federation request https://bob.example.com peer-bob
70
+ ogp federation request https://bob.example.com --alias bob
68
71
  ```
69
72
 
70
73
  This:
@@ -117,7 +120,7 @@ $ ogp federation list --status pending
117
120
 
118
121
  PENDING PEERS:
119
122
 
120
- peer-alice
123
+ alice
121
124
  Name: Alice
122
125
  Status: pending
123
126
  Gateway: https://alice.example.com
@@ -133,7 +136,7 @@ Bob approves Alice's request. In v0.2.0+, Bob can include **scope grants** to co
133
136
  Approve with scope grants (v0.2.0+):
134
137
 
135
138
  ```bash
136
- ogp federation approve peer-alice \
139
+ ogp federation approve alice \
137
140
  --intents message,agent-comms \
138
141
  --rate 100/3600 \
139
142
  --topics memory-management,task-delegation
@@ -142,7 +145,7 @@ ogp federation approve peer-alice \
142
145
  Or approve without restrictions (v0.1 compatibility):
143
146
 
144
147
  ```bash
145
- ogp federation approve peer-alice
148
+ ogp federation approve alice
146
149
  ```
147
150
 
148
151
  This:
@@ -216,7 +219,7 @@ $ ogp federation list --status approved
216
219
 
217
220
  APPROVED PEERS:
218
221
 
219
- peer-bob
222
+ bob
220
223
  Name: Bob
221
224
  Status: approved
222
225
  Gateway: https://bob.example.com
@@ -228,12 +231,12 @@ APPROVED PEERS:
228
231
  View detailed scopes:
229
232
 
230
233
  ```bash
231
- $ ogp federation scopes peer-bob
234
+ $ ogp federation scopes bob
232
235
 
233
- Scopes granted TO peer-bob (what they can request from you):
236
+ Scopes granted TO bob (what they can request from you):
234
237
  [not configured - full access]
235
238
 
236
- Scopes received FROM peer-bob (what you can request from them):
239
+ Scopes received FROM bob (what you can request from them):
237
240
  • message (enabled)
238
241
  Rate limit: 100 requests / 3600 seconds
239
242
 
@@ -249,7 +252,7 @@ Alice sends a message to Bob.
249
252
  ### Alice Sends
250
253
 
251
254
  ```bash
252
- ogp federation send peer-bob message '{"text":"Hello, Bob!"}'
255
+ ogp federation send bob message '{"text":"Hello, Bob!"}'
253
256
  ```
254
257
 
255
258
  This:
@@ -368,7 +371,7 @@ Agent-comms enables rich agent-to-agent communication with topic routing, priori
368
371
  ### Alice Sends Agent-Comms
369
372
 
370
373
  ```bash
371
- ogp federation agent peer-bob memory-management "How do you persist context?" --priority high --wait
374
+ ogp federation agent bob memory-management "How do you persist context?" --priority high --wait
372
375
  ```
373
376
 
374
377
  ### Request
@@ -446,7 +449,7 @@ Project intents enable collaborative project management across federated peers.
446
449
  ### Alice Sends Contribution
447
450
 
448
451
  ```bash
449
- ogp project send-contribution peer-bob shared-app progress "Completed authentication system"
452
+ ogp project send-contribution bob shared-app progress "Completed authentication system"
450
453
  ```
451
454
 
452
455
  ### Request
@@ -498,7 +501,7 @@ Bob sees:
498
501
  ### Alice Queries Bob's Project
499
502
 
500
503
  ```bash
501
- ogp project query-peer peer-bob shared-app --limit 10
504
+ ogp project query-peer bob shared-app --limit 10
502
505
  ```
503
506
 
504
507
  ### Request
@@ -567,6 +570,118 @@ Content-Type: application/json
567
570
 
568
571
  Alice receives a unified view of project activity from both local and Bob's contributions.
569
572
 
573
+ ## Federation Removal (Asymmetric Tear-Down)
574
+
575
+ Federation can be terminated by either peer at any time. OGP uses **asymmetric removal** — when one peer removes the other, the removed peer is notified but does not need to acknowledge the removal for it to take effect.
576
+
577
+ ### How Asymmetric Removal Works
578
+
579
+ 1. **Initiator removes peer** — Alice decides to remove Bob from her federation list
580
+ 2. **Notification sent (best-effort)** — Alice's daemon POSTs to Bob's `/federation/removed` endpoint
581
+ 3. **Removal takes effect immediately** — Alice's side is updated regardless of whether Bob receives the notification
582
+ 4. **Bob is notified (if reachable)** — If Bob's gateway is online, he receives the notification and updates his peer list
583
+
584
+ **Important:** The removal notification is **best-effort only**. Network failures, firewalls, or offline peers do not prevent removal. The removing peer's decision is authoritative.
585
+
586
+ ### Alice Removes Bob
587
+
588
+ ```bash
589
+ ogp federation remove bob
590
+ ```
591
+
592
+ This:
593
+ 1. Signs a removal payload with Alice's private key
594
+ 2. POSTs the notification to Bob's `/federation/removed` endpoint
595
+ 3. Updates Bob's status to `removed` in Alice's `~/.ogp/peers.json`
596
+ 4. Notifies Alice's OpenClaw agent of the removal
597
+
598
+ Alice sees:
599
+ ```
600
+ ✓ Notified peer of removal
601
+ ✓ Removed peer: bob (Bob)
602
+ ```
603
+
604
+ If Bob is unreachable:
605
+ ```
606
+ ⚠ Could not notify peer of removal: fetch failed
607
+ ✓ Removed peer: bob (Bob)
608
+ ```
609
+
610
+ The removal still succeeds — the warning only indicates Bob wasn't notified.
611
+
612
+ ### Removal Notification Payload
613
+
614
+ Alice sends to Bob's `/federation/removed`:
615
+
616
+ ```http
617
+ POST /federation/removed HTTP/1.1
618
+ Host: bob.example.com
619
+ Content-Type: application/json
620
+
621
+ {
622
+ "peerId": "peer-alice",
623
+ "timestamp": "2026-04-02T04:10:00.000Z",
624
+ "signature": "a1b2c3d4e5f6..."
625
+ }
626
+ ```
627
+
628
+ The signature covers the JSON-serialized payload `{peerId, timestamp}` signed with Alice's Ed25519 private key.
629
+
630
+ ### Bob Receives Removal Notification
631
+
632
+ Bob's OGP daemon:
633
+ 1. Validates required fields (`peerId`, `timestamp`, `signature`)
634
+ 2. Finds the peer by `peerId` (404 if unknown)
635
+ 3. Verifies the signature using Alice's public key (403 if invalid)
636
+ 4. Checks timestamp freshness (5-minute window, 400 if stale)
637
+ 5. Updates Alice's status to `removed` in `~/.ogp/peers.json`
638
+ 6. Notifies Bob's OpenClaw agent
639
+
640
+ Bob sees:
641
+ ```
642
+ [OGP Federation Removed] Alice (peer-alice) has removed your gateway from their federation
643
+ Your gateway is no longer federated with Alice.
644
+ You can re-establish federation by sending a new request if needed.
645
+ ```
646
+
647
+ ### Bob's Response to Alice
648
+
649
+ ```json
650
+ {
651
+ "success": true,
652
+ "peerId": "peer-alice",
653
+ "status": "removed"
654
+ }
655
+ ```
656
+
657
+ Error responses:
658
+ - `400` — Missing required fields or stale timestamp
659
+ - `403` — Invalid signature (possible impersonation attempt)
660
+ - `404` — Unknown peer (peer already removed or never existed)
661
+ - `500` — Failed to update peer status
662
+
663
+ ### Re-establishing Federation
664
+
665
+ After removal, either peer can re-establish federation by sending a new request:
666
+
667
+ ```bash
668
+ # Alice wants to federate with Bob again
669
+ ogp federation request https://bob.example.com
670
+
671
+ # Or Bob initiates
672
+ ogp federation request https://alice.example.com
673
+ ```
674
+
675
+ The new request goes through the normal request → approval flow.
676
+
677
+ ### Removed Peer Status
678
+
679
+ Peers with `removed` status remain in `~/.ogp/peers.json` for audit purposes but:
680
+ - Cannot send messages to you
681
+ - Do not appear in `ogp federation list` by default
682
+ - Can be viewed with `ogp federation list --status removed` (flag not yet implemented)
683
+ - Can be re-added by initiating a new federation request
684
+
570
685
  ## Security Model
571
686
 
572
687
  ### Keypair Generation
@@ -28,7 +28,19 @@ Run the interactive setup:
28
28
  ogp setup
29
29
  ```
30
30
 
31
- Answer the prompts:
31
+ The wizard will auto-discover agents from your OpenClaw configuration and prompt you to select which agent owns this gateway:
32
+
33
+ ```
34
+ === OGP Setup ===
35
+
36
+ Available agents:
37
+ 1. 🦝 Junior (main)
38
+ 2. ✍️ Scribe (scribe)
39
+
40
+ Which agent owns this gateway? (number or ID) [1]:
41
+ ```
42
+
43
+ Then answer the remaining prompts:
32
44
 
33
45
  ```
34
46
  Daemon port [18790]: <enter>
@@ -140,16 +152,16 @@ You should see:
140
152
 
141
153
  ## Step 7: Federate with a Peer
142
154
 
143
- Ask a friend to share their OGP gateway URL. The peer-id is now **optional** - OGP will auto-resolve it from the gateway's `/.well-known/ogp` endpoint:
155
+ Ask a friend to share their OGP gateway URL. The alias is now **optional** - OGP will auto-resolve it from the gateway's `/.well-known/ogp` endpoint:
144
156
 
145
157
  ```bash
146
158
  ogp federation request https://peer.example.com
147
159
  ```
148
160
 
149
- Or specify a custom peer-id:
161
+ Or specify a custom alias for easier reference:
150
162
 
151
163
  ```bash
152
- ogp federation request https://peer.example.com peer-bob
164
+ ogp federation request https://peer.example.com --alias bob
153
165
  ```
154
166
 
155
167
  You'll see:
@@ -164,7 +176,7 @@ Wait for Bob to approve your request. In v0.2.3, Bob can approve with **scope gr
164
176
 
165
177
  ```bash
166
178
  # Bob approves with specific intents and rate limits
167
- ogp federation approve peer-alice \
179
+ ogp federation approve alice \
168
180
  --intents message,agent-comms \
169
181
  --rate 100/3600 \
170
182
  --topics memory-management,task-delegation
@@ -173,7 +185,7 @@ ogp federation approve peer-alice \
173
185
  Or approve without restrictions (v0.1 compatibility):
174
186
 
175
187
  ```bash
176
- ogp federation approve peer-alice
188
+ ogp federation approve alice
177
189
  ```
178
190
 
179
191
  Check your approved peers:
@@ -185,7 +197,7 @@ ogp federation list --status approved
185
197
  ## Step 8: Send Your First Message
186
198
 
187
199
  ```bash
188
- ogp federation send peer-bob message '{"text":"Hello from OGP!"}'
200
+ ogp federation send bob message '{"text":"Hello from OGP!"}'
189
201
  ```
190
202
 
191
203
  Bob's OpenClaw agent will receive a notification via Telegram (if configured) or system event:
@@ -202,16 +214,16 @@ Use agent-comms for rich agent collaboration:
202
214
 
203
215
  ```bash
204
216
  # Send agent-comms with topic routing
205
- ogp federation agent peer-bob memory-management "How do you persist context?"
217
+ ogp federation agent bob memory-management "How do you persist context?"
206
218
 
207
219
  # High-priority message
208
- ogp federation agent peer-bob task-delegation "Schedule standup ASAP" --priority high
220
+ ogp federation agent bob task-delegation "Schedule standup ASAP" --priority high
209
221
 
210
222
  # Wait for reply
211
- ogp federation agent peer-bob queries "What's the status?" --wait --timeout 60000
223
+ ogp federation agent bob queries "What's the status?" --wait --timeout 60000
212
224
 
213
225
  # Start a conversation thread
214
- ogp federation agent peer-bob project-planning "Let's discuss sprint goals" --conversation sprint-42
226
+ ogp federation agent bob project-planning "Let's discuss sprint goals" --conversation sprint-42
215
227
  ```
216
228
 
217
229
  ### Configure Response Policies
@@ -226,10 +238,10 @@ ogp agent-comms policies
226
238
  ogp agent-comms configure --global --topics "general,testing" --level summary
227
239
 
228
240
  # Configure specific peer
229
- ogp agent-comms configure peer-bob --topics "memory-management" --level full
241
+ ogp agent-comms configure bob --topics "memory-management" --level full
230
242
 
231
243
  # Add escalation for sensitive topics
232
- ogp agent-comms add-topic peer-bob calendar --level escalate
244
+ ogp agent-comms add-topic bob calendar --level escalate
233
245
  ```
234
246
 
235
247
  Response levels:
@@ -258,10 +270,10 @@ ogp project status my-app
258
270
  ogp project query my-app --limit 10
259
271
 
260
272
  # Send contribution to peer's project
261
- ogp project send-contribution peer-bob shared-project progress "Deployed staging environment"
273
+ ogp project send-contribution bob shared-project progress "Deployed staging environment"
262
274
 
263
275
  # Query peer's project contributions
264
- ogp project query-peer peer-bob shared-project
276
+ ogp project query-peer bob shared-project
265
277
  ```
266
278
 
267
279
  ### Custom Intents
@@ -285,13 +297,13 @@ ogp intent remove deployment
285
297
 
286
298
  ```bash
287
299
  # Task request
288
- ogp federation send peer-bob task-request '{
300
+ ogp federation send bob task-request '{
289
301
  "taskType": "analysis",
290
302
  "description": "Analyze server logs from last hour"
291
303
  }'
292
304
 
293
305
  # Status update
294
- ogp federation send peer-bob status-update '{
306
+ ogp federation send bob status-update '{
295
307
  "status": "online",
296
308
  "message": "Ready to collaborate"
297
309
  }'
@@ -306,22 +318,22 @@ When someone sends you a federation request:
306
318
  ogp federation list --status pending
307
319
 
308
320
  # Approve with scope grants (v0.2.0+)
309
- ogp federation approve peer-charlie \
321
+ ogp federation approve charlie \
310
322
  --intents message,agent-comms \
311
323
  --rate 50/3600 \
312
324
  --topics general,project-updates
313
325
 
314
326
  # Or approve without restrictions
315
- ogp federation approve peer-charlie
327
+ ogp federation approve charlie
316
328
 
317
329
  # Or reject
318
- ogp federation reject peer-charlie
330
+ ogp federation reject charlie
319
331
 
320
332
  # View granted scopes
321
- ogp federation scopes peer-charlie
333
+ ogp federation scopes charlie
322
334
 
323
335
  # Update scopes later
324
- ogp federation grant peer-charlie \
336
+ ogp federation grant charlie \
325
337
  --intents agent-comms \
326
338
  --topics memory-management,planning \
327
339
  --rate 100/3600
@@ -365,7 +377,7 @@ The peer must approve your federation request first. Contact them or check their
365
377
  Check the peer's granted scopes:
366
378
 
367
379
  ```bash
368
- ogp federation scopes peer-bob
380
+ ogp federation scopes bob
369
381
  ```
370
382
 
371
383
  Request the peer to update your grants if needed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dp-pcs/ogp",
3
- "version": "0.2.26",
3
+ "version": "0.2.29",
4
4
  "description": "Open Gateway Protocol (OGP) - Peer-to-peer federation daemon for OpenClaw AI gateways with cryptographic signatures",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  skill_name: ogp
3
- version: 2.2.0
3
+ version: 2.2.1
4
4
  description: >
5
5
  OGP (Open Gateway Protocol) — federated agent communication, peer management,
6
6
  and project collaboration across OpenClaw gateways. Use when the user asks to
@@ -86,6 +86,79 @@ When enabled, your daemon auto-registers on startup and heartbeats every 30 seco
86
86
 
87
87
  ---
88
88
 
89
+ ## Configuration
90
+
91
+ ### Agent ID (v0.2.28+)
92
+
93
+ The `agentId` field identifies which OpenClaw agent owns this OGP gateway. During `ogp setup`, the wizard auto-discovers available agents from your OpenClaw configuration:
94
+
95
+ ```
96
+ Available agents:
97
+ 1. 🦝 Junior (main)
98
+ 2. ✍️ Scribe (scribe)
99
+ 3. ⚡ Optimus (optimus)
100
+
101
+ Which agent owns this gateway? (number or ID) [1]:
102
+ ```
103
+
104
+ **Example config with agentId:**
105
+ ```json
106
+ {
107
+ "daemonPort": 18790,
108
+ "openclawUrl": "http://localhost:18789",
109
+ "openclawToken": "your-token",
110
+ "gatewayUrl": "https://your-gateway.example.com",
111
+ "displayName": "Alice",
112
+ "email": "alice@example.com",
113
+ "stateDir": "~/.ogp",
114
+ "agentId": "main"
115
+ }
116
+ ```
117
+
118
+ ### Notification Routing — notifyTargets (v0.2.28+)
119
+
120
+ The `notifyTargets` field enables per-agent notification routing. When OGP sends notifications to your OpenClaw instance, it routes to specific agents based on the message context.
121
+
122
+ **Configuration fields:**
123
+ - **`notifyTarget`** (legacy, string): Single notification target for all messages. Maintained for backward compatibility.
124
+ - **`notifyTargets`** (object): Map of agent names to notification targets. Example: `{"main": "telegram:...", "scribe": "telegram:..."}`
125
+
126
+ **Example configuration with multiple agents:**
127
+
128
+ ```json
129
+ {
130
+ "daemonPort": 18790,
131
+ "openclawUrl": "http://localhost:18789",
132
+ "openclawToken": "your-token",
133
+ "gatewayUrl": "https://your-gateway.example.com",
134
+ "displayName": "Alice",
135
+ "email": "alice@example.com",
136
+ "stateDir": "~/.ogp",
137
+ "agentId": "main",
138
+ "notifyTarget": "telegram:123456789",
139
+ "notifyTargets": {
140
+ "main": "telegram:123456789",
141
+ "scribe": "telegram:987654321",
142
+ "optimus": "telegram:555666777"
143
+ }
144
+ }
145
+ ```
146
+
147
+ **Resolution priority:**
148
+
149
+ When routing notifications, OGP resolves the target in this order:
150
+
151
+ 1. **`notifyTargets[agent]`** — If the agent is specified and exists in `notifyTargets`, use that target
152
+ 2. **`notifyTarget`** — Fall back to the legacy single target for backward compatibility
153
+ 3. **Default** — If neither is set, the notification is sent without a specific target (OpenClaw routes to the default channel)
154
+
155
+ This allows you to:
156
+ - Route federation messages to different agents based on context
157
+ - Maintain backward compatibility with existing single-agent setups
158
+ - Gradually migrate to multi-agent routing without breaking existing configurations
159
+
160
+ ---
161
+
89
162
  ## Federation Management
90
163
 
91
164
  ### List all peers
@@ -97,9 +170,12 @@ ogp federation list --status approved
97
170
 
98
171
  ### Request federation with a new peer
99
172
  ```bash
100
- ogp federation request <peer-gateway-url> [peer-id]
101
- # Example:
102
- ogp federation request https://giving-produces-microphone-mild.trycloudflare.com stanislav
173
+ ogp federation request <peer-gateway-url> [--alias <name>]
174
+ # Example with alias:
175
+ ogp federation request https://giving-produces-microphone-mild.trycloudflare.com --alias stanislav
176
+
177
+ # Alias auto-resolves from gateway's display name if omitted:
178
+ ogp federation request https://giving-produces-microphone-mild.trycloudflare.com
103
179
  ```
104
180
 
105
181
  ### Approve an inbound federation request
@@ -141,7 +217,7 @@ ogp federation send <peer-id> <intent> '<json-payload>'
141
217
  ```bash
142
218
  ogp federation agent <peer-id> <topic> "<message>"
143
219
  # Example:
144
- ogp federation agent giving-produces-microphone-mild.trycloudflare.com:18790 general "Hey, can you check on project synapse?"
220
+ ogp federation agent stanislav general "Hey, can you check on project synapse?"
145
221
  ```
146
222
 
147
223
  ### Manage agent-comms policies (what topics you'll respond to)
@@ -271,7 +347,7 @@ ogp start --background
271
347
 
272
348
  | File | Purpose |
273
349
  |------|---------|
274
- | `~/.ogp/config.json` | Gateway config (URL, email, port) |
350
+ | `~/.ogp/config.json` | Gateway config (URL, email, port, notifyTargets, agentId) |
275
351
  | `~/.ogp/keypair.json` | Ed25519 signing keypair |
276
352
  | `~/.ogp/peers.json` | All federation peers + scopes |
277
353
  | `~/.ogp/projects.json` | Local project data + contributions |
@@ -288,3 +364,4 @@ ogp start --background
288
364
  - **Project isolation:** Projects are scoped to their member list. Full mesh federation does NOT give all peers access to all projects. A peer only sees projects they are a member of.
289
365
  - **Signatures:** All federation messages are signed with Ed25519. Peer's public key is stored in `peers.json` at federation time.
290
366
  - **Rendezvous is optional:** Peers with a static IP or existing tunnel continue working unchanged. Rendezvous is an additional discovery path, not a requirement.
367
+ - **Notification Routing:** The `notifyTargets` config enables multi-agent setups where different agents handle different types of federation messages.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  skill_name: ogp-agent-comms
3
- version: 0.2.1
4
- description: Interactive wizard to configure agent-to-agent communication policies (updated for OGP 0.2.24+ peer identity)
3
+ version: 0.2.2
4
+ description: Interactive wizard to configure agent-to-agent communication policies (updated for OGP 0.2.24+ peer identity and 0.2.28+ multi-agent routing)
5
5
  trigger: Use when the user wants to configure how their agent responds to incoming agent-comms messages from federated peers
6
6
  ---
7
7
  ## Prerequisites
@@ -38,6 +38,9 @@ Agent-comms policies control HOW your agent responds to incoming messages (separ
38
38
  1. **Scope grants** (doorman) - Controls which intents/topics are ALLOWED
39
39
  2. **Response policies** (this skill) - Controls HOW your agent RESPONDS
40
40
 
41
+ **Multi-Agent Routing (v0.2.28+):**
42
+ When using `notifyTargets` in your OGP config, federation messages can be routed to specific agents based on the message context. Each agent can have its own agent-comms policies.
43
+
41
44
  ## Interactive Flow
42
45
 
43
46
  When invoked, guide the user through this flow:
@@ -176,6 +179,8 @@ ogp agent-comms configure stan,leonardo,alice \
176
179
  --level full
177
180
  ```
178
181
 
182
+ **Note:** Peers are referenced by their alias (the friendly name you assigned during federation), not their full peer ID.
183
+
179
184
  ### Add Topic to Existing Policy
180
185
 
181
186
  ```bash
@@ -218,7 +223,7 @@ Stored in `~/.ogp/peers.json` under each peer:
218
223
  ```json
219
224
  {
220
225
  "id": "302a300506032b65",
221
- "displayName": "Stanislav",
226
+ "alias": "Stanislav",
222
227
  "responsePolicy": {
223
228
  "memory-management": {
224
229
  "level": "full",
@@ -235,6 +240,8 @@ Stored in `~/.ogp/peers.json` under each peer:
235
240
  }
236
241
  ```
237
242
 
243
+ **Note:** The `alias` field (formerly `petname`) is the user-friendly name for the peer.
244
+
238
245
  Global defaults in `~/.ogp/config.json`:
239
246
 
240
247
  ```json
@@ -246,6 +253,10 @@ Global defaults in `~/.ogp/config.json`:
246
253
  },
247
254
  "defaultLevel": "summary",
248
255
  "activityLog": true
256
+ },
257
+ "notifyTargets": {
258
+ "main": "telegram:123456789",
259
+ "scribe": "telegram:987654321"
249
260
  }
250
261
  }
251
262
  ```
@@ -266,6 +277,8 @@ When an agent-comms message arrives:
266
277
  - `escalate`: "Let me check with my human and get back to you"
267
278
  - `deny`: "I'm not able to discuss that topic"
268
279
 
280
+ **Multi-Agent Routing:** When `notifyTargets` is configured, messages are routed to the appropriate agent who then applies their own policies.
281
+
269
282
  ## Activity Logging
270
283
 
271
284
  When enabled, all agent-comms interactions are logged:
@@ -318,6 +331,21 @@ ogp agent-comms configure --global \
318
331
  --notes "Default: check with human for new peers"
319
332
  ```
320
333
 
334
+ ### Multi-Agent Setup
335
+
336
+ With `notifyTargets` configured in `~/.ogp/config.json`:
337
+
338
+ ```json
339
+ {
340
+ "notifyTargets": {
341
+ "main": "telegram:123456789",
342
+ "scribe": "telegram:987654321"
343
+ }
344
+ }
345
+ ```
346
+
347
+ Each agent can have independent policies. The main agent might have full access for operational topics, while the scribe agent handles content-related discussions.
348
+
321
349
  ## Troubleshooting
322
350
 
323
351
  ### Agent not following policies
@@ -343,3 +371,10 @@ New peers inherit global defaults. Configure them specifically:
343
371
  ```bash
344
372
  ogp agent-comms configure 302a300506032b65 --topics "..." --level "..."
345
373
  ```
374
+
375
+ ### Multi-Agent Routing Issues
376
+
377
+ If notifications aren't reaching the right agent:
378
+ 1. Check `notifyTargets` in `~/.ogp/config.json`
379
+ 2. Verify the target format: `telegram:chat_id` or `session:session_id`
380
+ 3. Check OpenClaw hook configuration for proper routing
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  skill_name: ogp-project
3
- version: 1.1.0
4
- description: Agent-aware project context skill for OGP with interview, freeform logging, and cross-peer summarization (updated for OGP 0.2.24+ peer identity)
3
+ version: 1.1.1
4
+ description: Agent-aware project context skill for OGP with interview, freeform logging, and cross-peer summarization (updated for OGP 0.2.24+ peer identity and 0.2.28+ multi-agent notifyTargets)
5
5
  trigger: Use when the user wants to create, manage, log to, or summarize OGP projects. This includes project context interviews, freeform activity logging, and cross-peer collaboration. Also triggers on natural logging phrases like "remember this for project X", "account for this", "make note of", "track this", "jot this down", "save this to", "document this" when a project context is active or named.
6
6
  requires:
7
7
  bins:
@@ -24,7 +24,9 @@ ogp setup
24
24
  ogp start
25
25
  ```
26
26
 
27
- **Note on Peer IDs (OGP 0.2.24+):** Peers are identified by the first 16 characters of their Ed25519 public key (e.g., `302a300506032b65`). This is stable even when their gateway URL changes.
27
+ **Note on Peer IDs (OGP 0.2.24+):** Peers are identified by the first 16 characters of their Ed25519 public key (e.g., `302a300506032b65`). This is stable even when their gateway URL changes. You can also reference peers by their **alias** (the friendly name you assigned during federation).
28
+
29
+ **Note on Multi-Agent Routing (OGP 0.2.28+):** When `notifyTargets` is configured in `~/.ogp/config.json`, project-related federation messages can be routed to specific agents. Each agent can have its own project context and policies.
28
30
 
29
31
  Full documentation: https://github.com/dp-pcs/ogp
30
32