@dp-pcs/ogp 0.3.3 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +275 -49
- package/dist/cli/completion.d.ts +5 -0
- package/dist/cli/completion.d.ts.map +1 -0
- package/dist/cli/completion.js +148 -0
- package/dist/cli/completion.js.map +1 -0
- package/dist/cli/config.d.ts +3 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +207 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/expose.d.ts.map +1 -1
- package/dist/cli/expose.js +20 -13
- package/dist/cli/expose.js.map +1 -1
- package/dist/cli/federation.d.ts.map +1 -1
- package/dist/cli/federation.js +182 -6
- package/dist/cli/federation.js.map +1 -1
- package/dist/cli/setup.d.ts +19 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +507 -32
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +348 -32
- package/dist/cli.js.map +1 -1
- package/dist/daemon/agent-comms.d.ts.map +1 -1
- package/dist/daemon/agent-comms.js +14 -9
- package/dist/daemon/agent-comms.js.map +1 -1
- package/dist/daemon/intent-registry.d.ts.map +1 -1
- package/dist/daemon/intent-registry.js +7 -4
- package/dist/daemon/intent-registry.js.map +1 -1
- package/dist/daemon/keypair.d.ts.map +1 -1
- package/dist/daemon/keypair.js +34 -13
- package/dist/daemon/keypair.js.map +1 -1
- package/dist/daemon/message-handler.d.ts.map +1 -1
- package/dist/daemon/message-handler.js +7 -0
- package/dist/daemon/message-handler.js.map +1 -1
- package/dist/daemon/notify.d.ts +19 -0
- package/dist/daemon/notify.d.ts.map +1 -1
- package/dist/daemon/notify.js +329 -73
- package/dist/daemon/notify.js.map +1 -1
- package/dist/daemon/openclaw-bridge.d.ts +34 -0
- package/dist/daemon/openclaw-bridge.d.ts.map +1 -0
- package/dist/daemon/openclaw-bridge.js +261 -0
- package/dist/daemon/openclaw-bridge.js.map +1 -0
- package/dist/daemon/peers.d.ts +8 -0
- package/dist/daemon/peers.d.ts.map +1 -1
- package/dist/daemon/peers.js +48 -14
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/projects.d.ts.map +1 -1
- package/dist/daemon/projects.js +7 -4
- package/dist/daemon/projects.js.map +1 -1
- package/dist/daemon/server.d.ts +16 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +147 -46
- package/dist/daemon/server.js.map +1 -1
- package/dist/shared/config.d.ts +52 -1
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js +18 -11
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/framework-detection.d.ts +31 -0
- package/dist/shared/framework-detection.d.ts.map +1 -0
- package/dist/shared/framework-detection.js +91 -0
- package/dist/shared/framework-detection.js.map +1 -0
- package/dist/shared/help.d.ts +5 -0
- package/dist/shared/help.d.ts.map +1 -0
- package/dist/shared/help.js +280 -0
- package/dist/shared/help.js.map +1 -0
- package/dist/shared/meta-config.d.ts +44 -0
- package/dist/shared/meta-config.d.ts.map +1 -0
- package/dist/shared/meta-config.js +89 -0
- package/dist/shared/meta-config.js.map +1 -0
- package/dist/shared/migration.d.ts +57 -0
- package/dist/shared/migration.d.ts.map +1 -0
- package/dist/shared/migration.js +255 -0
- package/dist/shared/migration.js.map +1 -0
- package/docs/CLI-REFERENCE.md +1360 -0
- package/docs/GETTING-STARTED.md +942 -0
- package/docs/MIGRATION.md +202 -0
- package/docs/MULTI-FRAMEWORK-DEMO.md +352 -0
- package/docs/MULTI-FRAMEWORK-DESIGN.md +378 -0
- package/docs/MULTI-FRAMEWORK-IMPL.md +197 -0
- package/docs/case-studies/CRASH_RESOLUTION_20260407.md +190 -0
- package/docs/case-studies/OpenClaw_Hermes_Status_Report_20260407.md +142 -0
- package/docs/case-studies/OpenClaw_Stability_Fix_Summary.md +209 -0
- package/docs/case-studies/README.md +40 -0
- package/docs/case-studies/crash_observations.md +250 -0
- package/docs/federation-flow.md +21 -31
- package/docs/hermes-implementation-checklist.md +4 -0
- package/docs/rendezvous.md +13 -14
- package/package.json +9 -3
- package/scripts/completion.bash +123 -0
- package/scripts/completion.zsh +372 -0
- package/scripts/test-migration-execute.js +74 -0
- package/scripts/test-migration.js +42 -0
- package/skills/ogp/SKILL.md +197 -64
- package/skills/ogp-agent-comms/SKILL.md +107 -41
- package/skills/ogp-expose/SKILL.md +84 -21
- package/skills/ogp-project/SKILL.md +66 -58
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
skill_name: ogp-agent-comms
|
|
3
|
-
version: 0.
|
|
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)
|
|
3
|
+
version: 0.5.0
|
|
4
|
+
description: Interactive wizard to configure agent-to-agent communication policies (updated for multi-framework `--for` workflows, 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
|
|
@@ -9,9 +9,11 @@ trigger: Use when the user wants to configure how their agent responds to incomi
|
|
|
9
9
|
The OGP daemon must be installed. If you see errors like 'ogp: command not found', install it first:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install -g
|
|
12
|
+
npm install -g @dp-pcs/ogp
|
|
13
13
|
ogp-install-skills
|
|
14
14
|
ogp setup
|
|
15
|
+
ogp agent-comms interview
|
|
16
|
+
ogp config show
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
Full documentation: https://github.com/dp-pcs/ogp
|
|
@@ -37,10 +39,22 @@ Agent-comms policies control HOW your agent responds to incoming messages (separ
|
|
|
37
39
|
**Two layers:**
|
|
38
40
|
1. **Scope grants** (doorman) - Controls which intents/topics are ALLOWED
|
|
39
41
|
2. **Response policies** (this skill) - Controls HOW your agent RESPONDS
|
|
42
|
+
3. **Human delivery preferences** - Controls WHERE and WHEN your agent surfaces federated requests back to the human
|
|
43
|
+
|
|
44
|
+
**Important default:** when a federation request is approved, OGP auto-enables the `general` topic for that peer. Everything else still needs explicit policy if the user wants something more restrictive or more open.
|
|
40
45
|
|
|
41
46
|
**Multi-Agent Routing (v0.2.28+):**
|
|
42
47
|
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
48
|
|
|
49
|
+
**Human delivery behavior (v0.4.2+):**
|
|
50
|
+
Use `humanDeliveryTarget` plus `inboundFederationPolicy.mode` to tell the agent whether it should forward everything, summarize, act autonomously, or wait for approval before replying.
|
|
51
|
+
|
|
52
|
+
OGP now evaluates delegated-authority rules—global defaults, per-peer overrides, message-class-specific rules (`agent-work`, `human-relay`, `approval-request`, `status-update`), and topic overrides—before finalizing delivery behavior. This determines whether the agent may reply directly or must escalate to the configured human session. On OpenClaw, `/hooks/agent` is the preferred delivery path; it tries to request the actual human session key only when `hooks.allowRequestSessionKey=true` and the requested key matches configured prefixes. When the flag is false, the hook runs in the default session (`agent:main:main`), so Telegram sender identity continues to appear as injected/system/`cli`, which is the accepted `v0.4.2` limitation documented in the README and changelog. Lifecycle events such as federation approvals now surface through these same hook-driven turns, so humans see the lifecycle update without needing to poll another channel.
|
|
53
|
+
|
|
54
|
+
On OpenClaw, human-facing federated work should be handled through the platform's hook-driven agent turn (`/hooks/agent`). Direct `sessions.send` injection is a lower-level fallback or sync mechanism, not the primary behavioral path.
|
|
55
|
+
|
|
56
|
+
**Multi-Framework note:** Policies are framework-local. Use `ogp --for openclaw ...` for OpenClaw state and `ogp --for hermes ...` for Hermes state.
|
|
57
|
+
|
|
44
58
|
## Interactive Flow
|
|
45
59
|
|
|
46
60
|
When invoked, guide the user through this flow:
|
|
@@ -49,35 +63,60 @@ When invoked, guide the user through this flow:
|
|
|
49
63
|
|
|
50
64
|
```bash
|
|
51
65
|
# Verify OGP is running and has peers
|
|
52
|
-
ogp
|
|
53
|
-
ogp
|
|
66
|
+
ogp config show
|
|
67
|
+
ogp --for openclaw status
|
|
68
|
+
ogp --for openclaw federation list --status approved
|
|
54
69
|
```
|
|
55
70
|
|
|
56
71
|
If no approved peers, inform the user they need to federate first.
|
|
57
72
|
|
|
58
|
-
### Step 2:
|
|
73
|
+
### Step 2: Re-run the Delegated-Authority Interview First
|
|
74
|
+
|
|
75
|
+
When the user is configuring overall human-delivery or autonomy behavior, start with the canonical interview command instead of approximating it manually:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
ogp --for openclaw agent-comms interview
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Use the Hermes variant when the active framework is Hermes:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
ogp --for hermes agent-comms interview
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This command updates:
|
|
88
|
+
- `humanDeliveryTarget` when the framework supports it
|
|
89
|
+
- `inboundFederationPolicy.mode`
|
|
90
|
+
- delegated-authority defaults for human surfacing, relay handling, approval-required topics, and trusted-peer autonomy
|
|
91
|
+
|
|
92
|
+
After the interview, continue with per-peer or per-topic policy commands only if the user wants something more specific.
|
|
93
|
+
|
|
94
|
+
### Step 3: Show Current Configuration
|
|
59
95
|
|
|
60
96
|
```bash
|
|
61
97
|
# Show current policies
|
|
62
|
-
ogp agent-comms policies
|
|
98
|
+
ogp --for openclaw agent-comms policies
|
|
63
99
|
```
|
|
64
100
|
|
|
65
|
-
### Step
|
|
101
|
+
### Step 4: Ask What to Configure
|
|
66
102
|
|
|
67
103
|
Present options:
|
|
68
104
|
1. **Global defaults** - Apply to all peers (current and future)
|
|
69
105
|
2. **Specific peer(s)** - Configure individual peers
|
|
70
106
|
3. **View current policies** - Just show what's configured
|
|
71
107
|
|
|
72
|
-
### Step
|
|
108
|
+
### Step 5: For Specific Peers - Multi-Select
|
|
73
109
|
|
|
74
110
|
If configuring specific peers, show the list and allow multi-select:
|
|
75
111
|
|
|
112
|
+
Use the peer list from:
|
|
113
|
+
|
|
76
114
|
```bash
|
|
77
|
-
|
|
78
|
-
ogp federation list --status approved --json
|
|
115
|
+
ogp --for openclaw federation list --status approved
|
|
79
116
|
```
|
|
80
117
|
|
|
118
|
+
Prefer the peer ID shown in the list. Some commands also accept a display-name match, but the peer ID is the safest input.
|
|
119
|
+
|
|
81
120
|
Example interaction:
|
|
82
121
|
```
|
|
83
122
|
Select peers to configure:
|
|
@@ -88,7 +127,7 @@ Select peers to configure:
|
|
|
88
127
|
Selected: Stanislav, Alice
|
|
89
128
|
```
|
|
90
129
|
|
|
91
|
-
### Step
|
|
130
|
+
### Step 6: Configure Topics
|
|
92
131
|
|
|
93
132
|
Ask which topics the agent should engage on:
|
|
94
133
|
|
|
@@ -113,17 +152,18 @@ For each topic (or all topics), set the response level:
|
|
|
113
152
|
| `summary` | High-level responses only, no specifics |
|
|
114
153
|
| `escalate` | Ask human before responding |
|
|
115
154
|
| `deny` | Politely decline to discuss |
|
|
155
|
+
| `off` | Block the topic entirely |
|
|
116
156
|
|
|
117
157
|
### Step 7: Save Configuration
|
|
118
158
|
|
|
119
159
|
```bash
|
|
120
160
|
# Save policies for selected peers
|
|
121
|
-
ogp agent-comms configure <peer-id> \
|
|
161
|
+
ogp --for openclaw agent-comms configure <peer-id> \
|
|
122
162
|
--topics "memory-management,testing,general" \
|
|
123
163
|
--level full
|
|
124
164
|
|
|
125
165
|
# Or set global defaults
|
|
126
|
-
ogp agent-comms configure --global \
|
|
166
|
+
ogp --for openclaw agent-comms configure --global \
|
|
127
167
|
--topics "general,testing" \
|
|
128
168
|
--level summary
|
|
129
169
|
```
|
|
@@ -132,7 +172,7 @@ ogp agent-comms configure --global \
|
|
|
132
172
|
|
|
133
173
|
```bash
|
|
134
174
|
# Show the updated configuration
|
|
135
|
-
ogp agent-comms policies <peer-id>
|
|
175
|
+
ogp --for openclaw agent-comms policies <peer-id>
|
|
136
176
|
```
|
|
137
177
|
|
|
138
178
|
## CLI Commands
|
|
@@ -140,7 +180,7 @@ ogp agent-comms policies <peer-id>
|
|
|
140
180
|
### View All Policies
|
|
141
181
|
|
|
142
182
|
```bash
|
|
143
|
-
ogp agent-comms policies
|
|
183
|
+
ogp --for openclaw agent-comms policies
|
|
144
184
|
```
|
|
145
185
|
|
|
146
186
|
Shows global defaults and per-peer overrides.
|
|
@@ -148,7 +188,7 @@ Shows global defaults and per-peer overrides.
|
|
|
148
188
|
### View Peer Policy
|
|
149
189
|
|
|
150
190
|
```bash
|
|
151
|
-
ogp agent-comms policies 302a300506032b65
|
|
191
|
+
ogp --for openclaw agent-comms policies 302a300506032b65
|
|
152
192
|
```
|
|
153
193
|
|
|
154
194
|
Shows effective policy for a specific peer (global + overrides).
|
|
@@ -156,7 +196,7 @@ Shows effective policy for a specific peer (global + overrides).
|
|
|
156
196
|
### Configure Global Defaults
|
|
157
197
|
|
|
158
198
|
```bash
|
|
159
|
-
ogp agent-comms configure --global \
|
|
199
|
+
ogp --for openclaw agent-comms configure --global \
|
|
160
200
|
--topics "general,testing" \
|
|
161
201
|
--level summary \
|
|
162
202
|
--notes "Default: be helpful but don't overshare"
|
|
@@ -165,7 +205,7 @@ ogp agent-comms configure --global \
|
|
|
165
205
|
### Configure Specific Peer
|
|
166
206
|
|
|
167
207
|
```bash
|
|
168
|
-
ogp agent-comms configure <peer-id> \
|
|
208
|
+
ogp --for openclaw agent-comms configure <peer-id> \
|
|
169
209
|
--topics "memory-management,testing,general" \
|
|
170
210
|
--level full \
|
|
171
211
|
--notes "Stan is a trusted collaborator"
|
|
@@ -174,29 +214,29 @@ ogp agent-comms configure <peer-id> \
|
|
|
174
214
|
### Configure Multiple Peers at Once
|
|
175
215
|
|
|
176
216
|
```bash
|
|
177
|
-
ogp agent-comms configure
|
|
217
|
+
ogp --for openclaw agent-comms configure 302a300506032b65,5f8b2c,9d4e1f \
|
|
178
218
|
--topics "testing" \
|
|
179
219
|
--level full
|
|
180
220
|
```
|
|
181
221
|
|
|
182
|
-
**Note:**
|
|
222
|
+
**Note:** Prefer peer IDs. Partial peer IDs or display-name matches may work, but peer IDs are canonical.
|
|
183
223
|
|
|
184
224
|
### Add Topic to Existing Policy
|
|
185
225
|
|
|
186
226
|
```bash
|
|
187
|
-
ogp agent-comms add-topic <peer-id> calendar --level escalate
|
|
227
|
+
ogp --for openclaw agent-comms add-topic <peer-id> calendar --level escalate
|
|
188
228
|
```
|
|
189
229
|
|
|
190
230
|
### Remove Topic
|
|
191
231
|
|
|
192
232
|
```bash
|
|
193
|
-
ogp agent-comms remove-topic <peer-id> personal
|
|
233
|
+
ogp --for openclaw agent-comms remove-topic <peer-id> personal
|
|
194
234
|
```
|
|
195
235
|
|
|
196
236
|
### Reset to Global Defaults
|
|
197
237
|
|
|
198
238
|
```bash
|
|
199
|
-
ogp agent-comms reset <peer-id>
|
|
239
|
+
ogp --for openclaw agent-comms reset <peer-id>
|
|
200
240
|
```
|
|
201
241
|
|
|
202
242
|
## Policy Inheritance
|
|
@@ -218,7 +258,7 @@ Effective for Stan:
|
|
|
218
258
|
|
|
219
259
|
## Response Policy Schema
|
|
220
260
|
|
|
221
|
-
Stored in
|
|
261
|
+
Stored in the active framework's `peers.json` under each peer:
|
|
222
262
|
|
|
223
263
|
```json
|
|
224
264
|
{
|
|
@@ -240,12 +280,16 @@ Stored in `~/.ogp/peers.json` under each peer:
|
|
|
240
280
|
}
|
|
241
281
|
```
|
|
242
282
|
|
|
243
|
-
**Note:** The `alias` field (formerly `petname`) is the
|
|
283
|
+
**Note:** The `alias` field (formerly `petname`) is stored with the peer, but agent-comms commands should still prefer the peer ID shown by `ogp federation list`.
|
|
244
284
|
|
|
245
|
-
Global defaults in `~/.ogp/config.json`:
|
|
285
|
+
Global defaults live in the active framework config, for example `~/.ogp/config.json` or `~/.ogp-hermes/config.json`:
|
|
246
286
|
|
|
247
287
|
```json
|
|
248
288
|
{
|
|
289
|
+
"humanDeliveryTarget": "telegram:123456789",
|
|
290
|
+
"inboundFederationPolicy": {
|
|
291
|
+
"mode": "summarize"
|
|
292
|
+
},
|
|
249
293
|
"agentComms": {
|
|
250
294
|
"globalPolicy": {
|
|
251
295
|
"general": { "level": "summary" },
|
|
@@ -266,7 +310,7 @@ Global defaults in `~/.ogp/config.json`:
|
|
|
266
310
|
When an agent-comms message arrives:
|
|
267
311
|
|
|
268
312
|
1. **Doorman** checks if the intent/topic is allowed (scope grants)
|
|
269
|
-
2. **Your agent** receives the message via
|
|
313
|
+
2. **Your agent** receives the message via the local platform backend
|
|
270
314
|
3. **Your agent** looks up the response policy:
|
|
271
315
|
- Check peer-specific policy for this topic
|
|
272
316
|
- Fall back to global policy for this topic
|
|
@@ -277,21 +321,25 @@ When an agent-comms message arrives:
|
|
|
277
321
|
- `escalate`: "Let me check with my human and get back to you"
|
|
278
322
|
- `deny`: "I'm not able to discuss that topic"
|
|
279
323
|
|
|
324
|
+
**OpenClaw delivery path:** OGP should hand human-facing federated work to OpenClaw through `/hooks/agent`, letting the agent run a real turn and deliver via the configured human channel. A compact `sessions.send` note may still be used to keep session state synchronized, but that is secondary.
|
|
325
|
+
|
|
280
326
|
**Multi-Agent Routing:** When `notifyTargets` is configured, messages are routed to the appropriate agent who then applies their own policies.
|
|
281
327
|
|
|
328
|
+
**Human Delivery:** When `humanDeliveryTarget` is configured, the agent should treat "tell my human X" as a delivery obligation to that configured channel, not merely as something to mention in whatever session happens to be active.
|
|
329
|
+
|
|
282
330
|
## Activity Logging
|
|
283
331
|
|
|
284
332
|
When enabled, all agent-comms interactions are logged:
|
|
285
333
|
|
|
286
334
|
```bash
|
|
287
335
|
# View activity log
|
|
288
|
-
ogp agent-comms activity
|
|
336
|
+
ogp --for openclaw agent-comms activity
|
|
289
337
|
|
|
290
338
|
# View for specific peer
|
|
291
|
-
ogp agent-comms activity <peer-id>
|
|
339
|
+
ogp --for openclaw agent-comms activity <peer-id>
|
|
292
340
|
|
|
293
341
|
# View last N entries
|
|
294
|
-
ogp agent-comms activity --last 20
|
|
342
|
+
ogp --for openclaw agent-comms activity --last 20
|
|
295
343
|
```
|
|
296
344
|
|
|
297
345
|
Log format:
|
|
@@ -307,7 +355,7 @@ Log format:
|
|
|
307
355
|
### Trusted Collaborator (Full Access)
|
|
308
356
|
|
|
309
357
|
```bash
|
|
310
|
-
ogp agent-comms configure 302a300506032b65 \
|
|
358
|
+
ogp --for openclaw agent-comms configure 302a300506032b65 \
|
|
311
359
|
--topics "memory-management,testing,general,code-review" \
|
|
312
360
|
--level full \
|
|
313
361
|
--notes "Trusted peer, full collaboration"
|
|
@@ -316,7 +364,7 @@ ogp agent-comms configure 302a300506032b65 \
|
|
|
316
364
|
### Business Contact (Limited)
|
|
317
365
|
|
|
318
366
|
```bash
|
|
319
|
-
ogp agent-comms configure 5f8b2c... \
|
|
367
|
+
ogp --for openclaw agent-comms configure 5f8b2c... \
|
|
320
368
|
--topics "general,status-updates" \
|
|
321
369
|
--level summary \
|
|
322
370
|
--notes "Professional contact, keep it high-level"
|
|
@@ -325,12 +373,28 @@ ogp agent-comms configure 5f8b2c... \
|
|
|
325
373
|
### New Federation (Cautious)
|
|
326
374
|
|
|
327
375
|
```bash
|
|
328
|
-
ogp agent-comms configure --global \
|
|
376
|
+
ogp --for openclaw agent-comms configure --global \
|
|
329
377
|
--topics "general,testing" \
|
|
330
378
|
--level escalate \
|
|
331
379
|
--notes "Default: check with human for new peers"
|
|
332
380
|
```
|
|
333
381
|
|
|
382
|
+
### Human Delivery Modes
|
|
383
|
+
|
|
384
|
+
These now have a first-class CLI interview via `ogp agent-comms interview`, and they remain part of the same operational policy:
|
|
385
|
+
|
|
386
|
+
- `forward` — forward all inbound federated requests/replies to the human
|
|
387
|
+
- `summarize` — summarize and escalate only important/actionable items
|
|
388
|
+
- `autonomous` — act independently unless blocked or explicitly told to relay something
|
|
389
|
+
- `approval-required` — do not act or reply until the human approves
|
|
390
|
+
|
|
391
|
+
Make the user's intent explicit during setup and documentation. Examples:
|
|
392
|
+
|
|
393
|
+
- "Tell me everything that comes in from peers."
|
|
394
|
+
- "Summarize most things, but escalate if you need me."
|
|
395
|
+
- "Act on your own unless you are blocked."
|
|
396
|
+
- "Never reply to a peer without clearing it with me first."
|
|
397
|
+
|
|
334
398
|
### Multi-Agent Setup
|
|
335
399
|
|
|
336
400
|
With `notifyTargets` configured in `~/.ogp/config.json`:
|
|
@@ -352,29 +416,31 @@ Each agent can have independent policies. The main agent might have full access
|
|
|
352
416
|
|
|
353
417
|
1. Verify the policy is saved:
|
|
354
418
|
```bash
|
|
355
|
-
ogp agent-comms policies <peer-id>
|
|
419
|
+
ogp --for openclaw agent-comms policies <peer-id>
|
|
356
420
|
```
|
|
357
421
|
|
|
358
422
|
2. Check if the topic is in scope grants (doorman):
|
|
359
423
|
```bash
|
|
360
|
-
ogp federation scopes <peer-id>
|
|
424
|
+
ogp --for openclaw federation scopes <peer-id>
|
|
361
425
|
```
|
|
362
426
|
|
|
363
427
|
3. Restart daemon to reload config:
|
|
364
428
|
```bash
|
|
365
|
-
ogp stop && ogp start
|
|
429
|
+
ogp --for openclaw stop && ogp --for openclaw start --background
|
|
366
430
|
```
|
|
367
431
|
|
|
368
432
|
### Policy not taking effect for new peer
|
|
369
433
|
|
|
370
434
|
New peers inherit global defaults. Configure them specifically:
|
|
371
435
|
```bash
|
|
372
|
-
ogp agent-comms configure 302a300506032b65 --topics "..." --level "..."
|
|
436
|
+
ogp --for openclaw agent-comms configure 302a300506032b65 --topics "..." --level "..."
|
|
373
437
|
```
|
|
374
438
|
|
|
375
439
|
### Multi-Agent Routing Issues
|
|
376
440
|
|
|
377
441
|
If notifications aren't reaching the right agent:
|
|
378
|
-
1. Check `notifyTargets` in
|
|
379
|
-
2. Verify the target format: `telegram:chat_id` or `
|
|
380
|
-
3.
|
|
442
|
+
1. Check `notifyTargets` and `humanDeliveryTarget` in the active framework config
|
|
443
|
+
2. Verify the target format: `telegram:chat_id` or a raw session key like `agent:main:telegram:direct:<chat-id>`
|
|
444
|
+
3. For OpenClaw, verify hooks are enabled and the hook token is present
|
|
445
|
+
4. For OpenClaw Gateway RPC debugging, use `wss://localhost:18789` against a TLS-enabled local gateway, not `ws://`
|
|
446
|
+
5. Remember that a successful direct session injection is not the same thing as the agent correctly handling a human-delivery obligation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
skill_name: ogp-expose
|
|
3
|
-
version: 0.
|
|
4
|
-
description: Expose OGP
|
|
3
|
+
version: 0.3.0
|
|
4
|
+
description: Expose OGP via a public HTTPS endpoint, usually a stable Cloudflare hostname or named tunnel. Use when the user wants to verify or fix gateway reachability, align `gatewayUrl` with the real public endpoint, or set up temporary cloudflared/ngrok exposure for testing.
|
|
5
5
|
trigger: Use when the user wants to expose their OGP daemon to the internet, get a public URL for federation, or set up a tunnel for peer discovery.
|
|
6
6
|
requires:
|
|
7
7
|
bins:
|
|
@@ -10,9 +10,12 @@ requires:
|
|
|
10
10
|
- cloudflared
|
|
11
11
|
- ngrok
|
|
12
12
|
state_paths:
|
|
13
|
+
- ~/.ogp-meta/config.json
|
|
13
14
|
- ~/.ogp/config.json
|
|
15
|
+
- ~/.ogp-hermes/config.json
|
|
14
16
|
- ~/.ogp/tunnel.pid
|
|
15
17
|
- ~/.ogp/tunnel.log
|
|
18
|
+
- ~/.cloudflared/config.yml
|
|
16
19
|
install: npm install -g @dp-pcs/ogp
|
|
17
20
|
docs: https://github.com/dp-pcs/ogp
|
|
18
21
|
---
|
|
@@ -21,9 +24,10 @@ requires:
|
|
|
21
24
|
|
|
22
25
|
**Tunnels are optional — and often more private than alternatives.**
|
|
23
26
|
|
|
24
|
-
`ogp expose`
|
|
27
|
+
`ogp expose` can create a temporary public URL for your OGP daemon. This is one approach, not the only approach. You can expose your gateway however you prefer:
|
|
25
28
|
|
|
26
|
-
- **
|
|
29
|
+
- **Named Cloudflare tunnel / stable HTTPS hostname** (preferred) — long-lived canonical URL for federation
|
|
30
|
+
- **Cloudflared/ngrok temporary tunnel** — useful for ad hoc testing
|
|
27
31
|
- **Reverse proxy** (nginx, Caddy, etc.) — if you have a server with a static IP
|
|
28
32
|
- **VPN/Tailscale** — federate only with peers on the same network
|
|
29
33
|
- **Any publicly reachable URL** — update `gatewayUrl` in `~/.ogp/config.json` manually
|
|
@@ -38,6 +42,7 @@ The OGP daemon must be installed. If you see errors like 'ogp: command not found
|
|
|
38
42
|
npm install -g @dp-pcs/ogp
|
|
39
43
|
ogp-install-skills
|
|
40
44
|
ogp setup
|
|
45
|
+
ogp config show
|
|
41
46
|
```
|
|
42
47
|
|
|
43
48
|
Full documentation: https://github.com/dp-pcs/ogp
|
|
@@ -46,15 +51,50 @@ Full documentation: https://github.com/dp-pcs/ogp
|
|
|
46
51
|
|
|
47
52
|
# OGP Expose - Public Tunnel Setup
|
|
48
53
|
|
|
49
|
-
This skill helps expose the OGP daemon to the internet
|
|
54
|
+
This skill helps expose the OGP daemon to the internet and, more importantly, confirm that the public discovery endpoint matches the intended framework identity.
|
|
50
55
|
|
|
51
56
|
## When to Use
|
|
52
57
|
|
|
53
58
|
Use this skill when:
|
|
54
59
|
- User wants to make their OGP daemon publicly accessible
|
|
55
60
|
- User needs a public URL for federation
|
|
56
|
-
- User wants to set up
|
|
61
|
+
- User wants to set up or verify a stable Cloudflare route
|
|
57
62
|
- User is testing OGP federation remotely
|
|
63
|
+
- User suspects `gatewayUrl` or tunnel config is stale or mismatched
|
|
64
|
+
|
|
65
|
+
## Framework Selection
|
|
66
|
+
|
|
67
|
+
If multiple frameworks are enabled, choose the framework first:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
ogp config show
|
|
71
|
+
ogp --for openclaw status
|
|
72
|
+
ogp --for hermes status
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Use `--for <framework>` on all exposure and verification commands when the target is not obvious.
|
|
76
|
+
|
|
77
|
+
## Recommended Production Baseline
|
|
78
|
+
|
|
79
|
+
Prefer one stable HTTPS hostname per framework:
|
|
80
|
+
|
|
81
|
+
- OpenClaw: `https://ogp.example.com`
|
|
82
|
+
- Hermes: `https://hermes.example.com`
|
|
83
|
+
|
|
84
|
+
Those hostnames should terminate at a named Cloudflare tunnel or equivalent reverse proxy and forward to the local daemon port for that framework.
|
|
85
|
+
|
|
86
|
+
After any tunnel or routing change, verify all three values agree:
|
|
87
|
+
|
|
88
|
+
1. Local daemon discovery card
|
|
89
|
+
2. Public discovery card
|
|
90
|
+
3. `gatewayUrl` in the framework config
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
curl -s http://127.0.0.1:18790/.well-known/ogp
|
|
94
|
+
curl -s https://ogp.example.com/.well-known/ogp
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The public key and `gatewayUrl` should match. If they do not, do not federate yet.
|
|
58
98
|
|
|
59
99
|
## Prerequisites
|
|
60
100
|
|
|
@@ -95,10 +135,10 @@ ngrok config add-authtoken <your-token>
|
|
|
95
135
|
|
|
96
136
|
## Usage
|
|
97
137
|
|
|
98
|
-
### Expose with Cloudflared (
|
|
138
|
+
### Expose with Cloudflared (Temporary / Ad Hoc)
|
|
99
139
|
|
|
100
140
|
```bash
|
|
101
|
-
ogp expose
|
|
141
|
+
ogp --for openclaw expose
|
|
102
142
|
```
|
|
103
143
|
|
|
104
144
|
This will:
|
|
@@ -108,14 +148,14 @@ This will:
|
|
|
108
148
|
|
|
109
149
|
**Update your config:**
|
|
110
150
|
```bash
|
|
111
|
-
# Edit
|
|
112
|
-
# Set "gatewayUrl" to the URL shown by cloudflared
|
|
151
|
+
# Edit the correct framework config
|
|
152
|
+
# Set "gatewayUrl" to the URL shown by cloudflared only if this temporary URL is the intended canonical endpoint
|
|
113
153
|
```
|
|
114
154
|
|
|
115
|
-
### Expose with ngrok
|
|
155
|
+
### Expose with ngrok (Fallback Only)
|
|
116
156
|
|
|
117
157
|
```bash
|
|
118
|
-
ogp expose --method ngrok
|
|
158
|
+
ogp --for openclaw expose --method ngrok
|
|
119
159
|
```
|
|
120
160
|
|
|
121
161
|
This will:
|
|
@@ -131,7 +171,7 @@ This will:
|
|
|
131
171
|
|
|
132
172
|
## Complete Setup Workflow
|
|
133
173
|
|
|
134
|
-
### First-time Setup
|
|
174
|
+
### First-time or Temporary Setup
|
|
135
175
|
|
|
136
176
|
1. **Run OGP setup:**
|
|
137
177
|
```bash
|
|
@@ -141,12 +181,12 @@ This will:
|
|
|
141
181
|
|
|
142
182
|
2. **Start the daemon:**
|
|
143
183
|
```bash
|
|
144
|
-
ogp start
|
|
184
|
+
ogp --for openclaw start
|
|
145
185
|
```
|
|
146
186
|
|
|
147
187
|
3. **In a new terminal, expose the daemon:**
|
|
148
188
|
```bash
|
|
149
|
-
ogp expose
|
|
189
|
+
ogp --for openclaw expose
|
|
150
190
|
```
|
|
151
191
|
|
|
152
192
|
4. **Copy the public URL** shown by cloudflared/ngrok
|
|
@@ -160,7 +200,7 @@ This will:
|
|
|
160
200
|
6. **Restart the daemon:**
|
|
161
201
|
```bash
|
|
162
202
|
# Stop with Ctrl+C in the daemon terminal
|
|
163
|
-
ogp start
|
|
203
|
+
ogp --for openclaw start
|
|
164
204
|
```
|
|
165
205
|
|
|
166
206
|
7. **Verify the setup:**
|
|
@@ -190,16 +230,32 @@ credentials-file: ~/.cloudflared/<tunnel-id>.json
|
|
|
190
230
|
ingress:
|
|
191
231
|
- hostname: ogp.yourdomain.com
|
|
192
232
|
service: http://localhost:18790
|
|
233
|
+
- hostname: hermes.yourdomain.com
|
|
234
|
+
service: http://localhost:18793
|
|
193
235
|
- service: http_status:404
|
|
194
236
|
EOF
|
|
195
237
|
|
|
196
238
|
# Run tunnel
|
|
197
|
-
cloudflared tunnel run
|
|
239
|
+
cloudflared tunnel run sarcastek-backend
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Then make sure each framework config uses its own canonical hostname:
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"gatewayUrl": "https://ogp.yourdomain.com"
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"gatewayUrl": "https://hermes.yourdomain.com"
|
|
253
|
+
}
|
|
198
254
|
```
|
|
199
255
|
|
|
200
256
|
## Comparison: Cloudflared vs ngrok
|
|
201
257
|
|
|
202
|
-
### Cloudflared
|
|
258
|
+
### Cloudflared / Stable Hostname
|
|
203
259
|
**Pros:**
|
|
204
260
|
- Free, unlimited usage
|
|
205
261
|
- No signup required for temporary tunnels
|
|
@@ -228,12 +284,19 @@ cloudflared tunnel run ogp-daemon
|
|
|
228
284
|
### Tunnel won't start
|
|
229
285
|
- **Cloudflared not found:** Install cloudflared
|
|
230
286
|
- **ngrok not found:** Install ngrok and configure auth token
|
|
231
|
-
- **Port already in use:**
|
|
287
|
+
- **Port already in use:** Verify the framework's daemon port and stop stale listeners
|
|
288
|
+
|
|
289
|
+
### Public URL resolves but serves the wrong framework
|
|
290
|
+
- Check `ogp config show`
|
|
291
|
+
- Check the relevant framework config's `gatewayUrl`
|
|
292
|
+
- Verify local discovery card on the framework port
|
|
293
|
+
- Verify Cloudflare ingress routes the hostname to the expected local port
|
|
294
|
+
- If you recently switched from a temporary tunnel, remove stale fields like old temporary `gateway.publicUrl` overrides and keep only the canonical `gatewayUrl`
|
|
232
295
|
|
|
233
296
|
### Can't access public URL
|
|
234
297
|
- Check firewall settings
|
|
235
|
-
- Verify daemon is running (`ogp status`)
|
|
236
|
-
- Test locally first: `curl http://localhost
|
|
298
|
+
- Verify daemon is running (`ogp --for <framework> status`)
|
|
299
|
+
- Test locally first: `curl http://localhost:<port>/.well-known/ogp`
|
|
237
300
|
|
|
238
301
|
### Tunnel disconnects frequently
|
|
239
302
|
- Check internet connection
|