@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.
- package/README.md +317 -61
- 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 +14 -0
- package/dist/cli/federation.d.ts.map +1 -1
- package/dist/cli/federation.js +347 -23
- package/dist/cli/federation.js.map +1 -1
- package/dist/cli/project.d.ts +4 -3
- package/dist/cli/project.d.ts.map +1 -1
- package/dist/cli/project.js +34 -24
- package/dist/cli/project.js.map +1 -1
- package/dist/cli/setup.d.ts +23 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +560 -32
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +358 -35
- package/dist/cli.js.map +1 -1
- package/dist/daemon/agent-comms.d.ts.map +1 -1
- package/dist/daemon/agent-comms.js +15 -10
- package/dist/daemon/agent-comms.js.map +1 -1
- package/dist/daemon/heartbeat.d.ts +22 -0
- package/dist/daemon/heartbeat.d.ts.map +1 -0
- package/dist/daemon/heartbeat.js +119 -0
- package/dist/daemon/heartbeat.js.map +1 -0
- package/dist/daemon/intent-registry.d.ts.map +1 -1
- package/dist/daemon/intent-registry.js +19 -10
- package/dist/daemon/intent-registry.js.map +1 -1
- package/dist/daemon/keypair.d.ts +1 -0
- package/dist/daemon/keypair.d.ts.map +1 -1
- package/dist/daemon/keypair.js +151 -18
- package/dist/daemon/keypair.js.map +1 -1
- package/dist/daemon/message-handler.d.ts.map +1 -1
- package/dist/daemon/message-handler.js +30 -16
- 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 +376 -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 +21 -0
- package/dist/daemon/peers.d.ts.map +1 -1
- package/dist/daemon/peers.js +125 -20
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/projects.d.ts +9 -6
- package/dist/daemon/projects.d.ts.map +1 -1
- package/dist/daemon/projects.js +30 -20
- package/dist/daemon/projects.js.map +1 -1
- package/dist/daemon/server.d.ts +17 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +188 -77
- 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 +281 -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 +1361 -0
- package/docs/GETTING-STARTED.md +953 -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/cloudflare-named-tunnel-setup.md +126 -0
- package/docs/federation-flow.md +27 -37
- package/docs/hermes-implementation-checklist.md +4 -0
- package/docs/project-intent-testing.md +97 -0
- package/docs/quickstart.md +12 -4
- package/docs/rendezvous.md +13 -14
- package/docs/scopes.md +13 -13
- package/package.json +12 -6
- package/scripts/completion.bash +123 -0
- package/scripts/completion.zsh +372 -0
- package/scripts/install-skills.js +19 -1
- package/scripts/test-migration-execute.js +74 -0
- package/scripts/test-migration.js +42 -0
- package/scripts/test-project-intents.mjs +614 -0
- package/skills/ogp/SKILL.md +197 -64
- package/skills/ogp-agent-comms/SKILL.md +107 -41
- package/skills/ogp-expose/SKILL.md +183 -25
- package/skills/ogp-project/SKILL.md +110 -88
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# OpenClaw Crash Observations - April 7, 2026
|
|
2
|
+
|
|
3
|
+
> **Note:** This document is a sanitized version of internal debugging notes. API key fragments, file paths, and system-specific details have been removed or generalized. Created during OGP development to document OpenClaw regression analysis.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Timeline Summary
|
|
8
|
+
|
|
9
|
+
User reported that OpenClaw has been crashing non-stop for the last 24 hours after previously working without issues. Multiple agents were affected, with the gateway itself crashing repeatedly.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Issues Identified & Fixed
|
|
14
|
+
|
|
15
|
+
### 1. Cascading Authentication Failures (8:00 AM)
|
|
16
|
+
|
|
17
|
+
**Symptoms:**
|
|
18
|
+
- Agent failing with all configured model providers
|
|
19
|
+
- Error sequence: Multiple providers failing in sequence
|
|
20
|
+
- "All models failed" errors in logs
|
|
21
|
+
|
|
22
|
+
**Root Causes:**
|
|
23
|
+
- Kimi API: HTTP 401 - Invalid/expired API key
|
|
24
|
+
- Anthropic API: HTTP 401 - Invalid API key (rate limits also hit)
|
|
25
|
+
- OpenAI API: 401 - Malformed API key (env var expansion failing)
|
|
26
|
+
|
|
27
|
+
**Analysis:**
|
|
28
|
+
The `openclaw doctor` command appeared to have modified the configuration file, simplifying the env section and causing environment variable expansion to fail. The OpenAI provider had a misconfigured API key reference.
|
|
29
|
+
|
|
30
|
+
**Fix Applied:**
|
|
31
|
+
- Restored proper API key references in env section
|
|
32
|
+
- Changed OpenAI provider to use environment variable references
|
|
33
|
+
|
|
34
|
+
### 2. Model Configuration Corruption (Multiple Occurrences)
|
|
35
|
+
|
|
36
|
+
**Symptoms:**
|
|
37
|
+
- Agent configuration simplified to only primary model, no fallbacks
|
|
38
|
+
- Default model referencing non-existent model ID
|
|
39
|
+
- Invalid model IDs causing 404 errors
|
|
40
|
+
|
|
41
|
+
**Root Cause:**
|
|
42
|
+
Configuration file was being modified (likely by `openclaw doctor` command or auto-formatting) which:
|
|
43
|
+
- Removed fallback models from agent configurations
|
|
44
|
+
- Simplified environment variable definitions
|
|
45
|
+
- Changed model references
|
|
46
|
+
|
|
47
|
+
**Example Configuration Issue:**
|
|
48
|
+
```json
|
|
49
|
+
// Broken (no fallbacks)
|
|
50
|
+
"model": {
|
|
51
|
+
"primary": "anthropic/claude-sonnet-4-6"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Restored (with fallbacks)
|
|
55
|
+
"model": {
|
|
56
|
+
"primary": "openai/gpt-5.4",
|
|
57
|
+
"fallbacks": [
|
|
58
|
+
"anthropic/claude-sonnet-4-6",
|
|
59
|
+
"openai/gpt-4o",
|
|
60
|
+
"fireworks/accounts/fireworks/models/kimi-k2p5"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3. OpenAI API 404 Errors (9:00-9:50 AM)
|
|
66
|
+
|
|
67
|
+
**Symptoms:**
|
|
68
|
+
- Continuous 404 errors on OpenAI models
|
|
69
|
+
- All OpenAI models failing despite being available via API
|
|
70
|
+
|
|
71
|
+
**Root Cause:**
|
|
72
|
+
GPT-5.4 and newer models require the **Responses API** endpoint (`/v1/responses`) instead of the Chat Completions API endpoint (`/v1/chat/completions`). OpenClaw was using the wrong endpoint.
|
|
73
|
+
|
|
74
|
+
**Evidence:**
|
|
75
|
+
- Manual API query confirmed models exist: `gpt-5.4`, `gpt-5.4-2026-03-05`, `gpt-4o` all available
|
|
76
|
+
- OpenAI documentation confirmed GPT-5.4 requires Responses API
|
|
77
|
+
- Error pattern: 404 with no body = wrong endpoint
|
|
78
|
+
|
|
79
|
+
**Fix Applied:**
|
|
80
|
+
Added `"api": "openai-responses"` to OpenAI provider configuration:
|
|
81
|
+
```json
|
|
82
|
+
"openai": {
|
|
83
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
84
|
+
"apiKey": "${PERSONAL_OPENAI_API_KEY}",
|
|
85
|
+
"api": "openai-responses",
|
|
86
|
+
"models": [...]
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**References:**
|
|
91
|
+
- GitHub Issue: openclaw/openclaw#38706 - "GPT-5.4 via openai-codex OAuth uses wrong API"
|
|
92
|
+
- OpenAI Docs: Responses API required for GPT-5.4+
|
|
93
|
+
|
|
94
|
+
### 4. Gateway Crash - "Agent listener invoked outside active run" (12:08 PM)
|
|
95
|
+
|
|
96
|
+
**Symptoms:**
|
|
97
|
+
- Gateway completely unreachable
|
|
98
|
+
- LaunchAgent exit status: -1
|
|
99
|
+
- Error: `Unhandled promise rejection: Error: Agent listener invoked outside active run`
|
|
100
|
+
|
|
101
|
+
**Stack Trace:**
|
|
102
|
+
```
|
|
103
|
+
at Agent.processEvents (pi-agent-core/src/agent.ts:533:10)
|
|
104
|
+
at emitUpdate (exec-defaults-*.js:1524:8)
|
|
105
|
+
at handleStdout (exec-defaults-*.js:1546:4)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Context:**
|
|
109
|
+
Crash occurred during OGP federation testing operations. Preceding log entries show:
|
|
110
|
+
- Edit operations failing
|
|
111
|
+
- Read operations failing for config files
|
|
112
|
+
- Multiple edit retry attempts
|
|
113
|
+
|
|
114
|
+
**Hypothesis:**
|
|
115
|
+
The crash may be related to:
|
|
116
|
+
1. OGP operations triggering edge cases in the exec/agent framework
|
|
117
|
+
2. File operations failing and causing state inconsistencies
|
|
118
|
+
3. Agent event processing happening outside the expected execution context
|
|
119
|
+
|
|
120
|
+
**Fix Applied:**
|
|
121
|
+
Gateway restart resolved the immediate issue, but underlying cause remained unclear at the time.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Configuration Stability Concerns
|
|
126
|
+
|
|
127
|
+
### Observed Pattern:
|
|
128
|
+
1. Manual configuration changes applied
|
|
129
|
+
2. Gateway restart
|
|
130
|
+
3. Configuration file modified by unknown process
|
|
131
|
+
4. Settings reverted or simplified
|
|
132
|
+
5. Agents fail again
|
|
133
|
+
|
|
134
|
+
### Suspected Culprits:
|
|
135
|
+
- `openclaw doctor` command
|
|
136
|
+
- Auto-formatting/validation on config reload
|
|
137
|
+
- Hot reload mechanism modifying config
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Gateway Stability Observations
|
|
142
|
+
|
|
143
|
+
### Crash Frequency:
|
|
144
|
+
- Multiple gateway restarts required during debugging session
|
|
145
|
+
- Many restarts over 4-hour period
|
|
146
|
+
- One complete crash requiring manual intervention
|
|
147
|
+
|
|
148
|
+
### Memory/CPU Usage:
|
|
149
|
+
- Gateway process consistently using high CPU during startup
|
|
150
|
+
- Process ID changing frequently
|
|
151
|
+
|
|
152
|
+
### LaunchAgent Behavior:
|
|
153
|
+
- LaunchAgent showing status `-1` during crashes
|
|
154
|
+
- Sometimes showing status `0` but process not actually running
|
|
155
|
+
- Restart command occasionally reports "stale process" and force-kills
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## OGP-Related Observations
|
|
160
|
+
|
|
161
|
+
### Timing Correlation:
|
|
162
|
+
User mentioned doing OGP work and the timeline suggests:
|
|
163
|
+
- OpenClaw was stable before OGP work
|
|
164
|
+
- Issues began within last 24 hours
|
|
165
|
+
- Gateway crash occurred during OGP federation operations
|
|
166
|
+
|
|
167
|
+
### OGP Operations Observed in Logs:
|
|
168
|
+
- Federation requests to Clawporate gateway
|
|
169
|
+
- Agent-to-agent communication attempts
|
|
170
|
+
- File operations on OGP-related files
|
|
171
|
+
- Attempts to read OGP config (file not found)
|
|
172
|
+
|
|
173
|
+
### Potential OGP-Related Issues:
|
|
174
|
+
1. **File Operation Failures**: Multiple edit/read failures on OGP-related files
|
|
175
|
+
2. **Agent Event Processing**: Crash occurred during stdout handling from supervised process
|
|
176
|
+
3. **Missing Config Files**: OGP config expected but not found in multiple locations
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Mitigation Steps Applied - 5:56 PM
|
|
181
|
+
|
|
182
|
+
### Changes Made to Test Crash Prevention:
|
|
183
|
+
|
|
184
|
+
**1. Disabled Heartbeat Tasks**
|
|
185
|
+
- Removed `heartbeat` configurations from agent defaults
|
|
186
|
+
- **Hypothesis**: Hourly heartbeats triggering cron jobs that hit API failures and crashed the gateway
|
|
187
|
+
|
|
188
|
+
**2. Replaced Keychain Lookups with Direct API Keys**
|
|
189
|
+
- Changed from: `$(security find-generic-password ...)`
|
|
190
|
+
- Changed to: Direct environment variable references
|
|
191
|
+
- **Reason**: Keychain lookups repeatedly failing with env var expansion errors
|
|
192
|
+
|
|
193
|
+
**3. BrainLift Plugin**
|
|
194
|
+
- Already disabled (enabled: false)
|
|
195
|
+
- No changes needed
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Current Working Configuration
|
|
200
|
+
|
|
201
|
+
### Models:
|
|
202
|
+
- **Primary**: openai/gpt-5.4 (via Responses API)
|
|
203
|
+
- **Fallbacks**: anthropic/claude-sonnet-4-6, openai/gpt-4o, fireworks/kimi-k2p5
|
|
204
|
+
|
|
205
|
+
### API Keys (via environment variables):
|
|
206
|
+
- ANTHROPIC_API_KEY: Working
|
|
207
|
+
- OPENAI_API_KEY: Working (via Responses API)
|
|
208
|
+
- FIREWORKS_API_KEY: Working
|
|
209
|
+
|
|
210
|
+
### Critical Config Settings:
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"models": {
|
|
214
|
+
"providers": {
|
|
215
|
+
"openai": {
|
|
216
|
+
"api": "openai-responses",
|
|
217
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
218
|
+
"apiKey": "${PERSONAL_OPENAI_API_KEY}"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Open Questions
|
|
228
|
+
|
|
229
|
+
1. **What triggers config file modifications?** Is it automatic or user-initiated?
|
|
230
|
+
2. **Is OGP plugin causing instability?** Correlation suggests possible connection
|
|
231
|
+
3. **Why are keychain lookups failing intermittently?** Sometimes work, sometimes fail
|
|
232
|
+
4. **What is the expected behavior for "Agent listener invoked outside active run"?** Is this a known edge case?
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Files Modified During Session
|
|
237
|
+
|
|
238
|
+
- `$HOME/.openclaw/openclaw.json` (multiple times)
|
|
239
|
+
- API key configurations
|
|
240
|
+
- Model provider settings
|
|
241
|
+
- Agent model configurations
|
|
242
|
+
- Environment variables
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
**Session Date**: April 7, 2026
|
|
247
|
+
**OpenClaw Version**: 2026.4.5
|
|
248
|
+
**Total Crashes**: Multiple
|
|
249
|
+
**Average Uptime Between Crashes**: 10-20 minutes
|
|
250
|
+
**Sanitized for Publication**: April 8, 2026
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Cloudflare Named Tunnel Setup for OGP
|
|
2
|
+
|
|
3
|
+
Use this when you already have a domain managed in Cloudflare and want a stable public OGP URL like `ogp.example.com`.
|
|
4
|
+
|
|
5
|
+
This guide assumes:
|
|
6
|
+
- OGP is running locally on port `18790`
|
|
7
|
+
- You already control the domain in Cloudflare
|
|
8
|
+
- You are setting up a locally managed named tunnel with `cloudflared`
|
|
9
|
+
|
|
10
|
+
## What this does
|
|
11
|
+
|
|
12
|
+
It creates a stable public hostname such as `https://ogp.example.com` and forwards it to your local OGP daemon at `http://localhost:18790`.
|
|
13
|
+
|
|
14
|
+
After this is working, set your OGP `gatewayUrl` to the same public URL.
|
|
15
|
+
|
|
16
|
+
## Copy-paste setup
|
|
17
|
+
|
|
18
|
+
Replace `ogp.yourdomain.com` below with your real hostname.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 1. Install cloudflared if needed
|
|
22
|
+
brew install cloudflared
|
|
23
|
+
|
|
24
|
+
# 2. Login to Cloudflare in the browser
|
|
25
|
+
cloudflared tunnel login
|
|
26
|
+
|
|
27
|
+
# 3. Create a named tunnel called "ogp"
|
|
28
|
+
cloudflared tunnel create ogp
|
|
29
|
+
|
|
30
|
+
# 4. Route a public hostname to the tunnel
|
|
31
|
+
cloudflared tunnel route dns ogp ogp.yourdomain.com
|
|
32
|
+
|
|
33
|
+
# 5. Create the config directory if needed
|
|
34
|
+
mkdir -p ~/.cloudflared
|
|
35
|
+
|
|
36
|
+
# 6. List tunnels so you can copy the UUID for "ogp"
|
|
37
|
+
cloudflared tunnel list
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Create `~/.cloudflared/config.yml` and replace `TUNNEL_UUID_HERE` with the real UUID from `cloudflared tunnel list`.
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
tunnel: TUNNEL_UUID_HERE
|
|
44
|
+
credentials-file: /Users/YOUR_USERNAME/.cloudflared/TUNNEL_UUID_HERE.json
|
|
45
|
+
|
|
46
|
+
ingress:
|
|
47
|
+
- hostname: ogp.yourdomain.com
|
|
48
|
+
service: http://localhost:18790
|
|
49
|
+
- service: http_status:404
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then start OGP and test the tunnel:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 7. Start OGP
|
|
56
|
+
ogp start --background
|
|
57
|
+
|
|
58
|
+
# 8. Run the tunnel in the foreground once to test
|
|
59
|
+
cloudflared tunnel run ogp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
In a second terminal:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 9. Verify the public OGP card is reachable
|
|
66
|
+
curl -s https://ogp.yourdomain.com/.well-known/ogp
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Set gatewayUrl
|
|
70
|
+
|
|
71
|
+
Edit `~/.ogp/config.json` and make sure it includes:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"gatewayUrl": "https://ogp.yourdomain.com"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then restart OGP:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
ogp stop
|
|
83
|
+
ogp start --background
|
|
84
|
+
curl -s https://ogp.yourdomain.com/.well-known/ogp
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The returned JSON should show the same `gatewayUrl`.
|
|
88
|
+
|
|
89
|
+
## Make the tunnel persistent
|
|
90
|
+
|
|
91
|
+
Once the foreground test works:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
cloudflared service install
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Then start the service using your system service manager.
|
|
98
|
+
|
|
99
|
+
## Common problems
|
|
100
|
+
|
|
101
|
+
If `cloudflared tunnel route dns` fails:
|
|
102
|
+
- The hostname may already have an existing DNS record
|
|
103
|
+
- The domain may not actually be managed by Cloudflare yet
|
|
104
|
+
|
|
105
|
+
If `curl https://ogp.yourdomain.com/.well-known/ogp` fails:
|
|
106
|
+
- OGP may not be running on port `18790`
|
|
107
|
+
- The hostname in `config.yml` may be wrong
|
|
108
|
+
- `gatewayUrl` in `~/.ogp/config.json` may still be blank or stale
|
|
109
|
+
- The tunnel may not be running yet
|
|
110
|
+
|
|
111
|
+
## Minimal success check
|
|
112
|
+
|
|
113
|
+
These both need to be true:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
curl -s http://localhost:18790/.well-known/ogp
|
|
117
|
+
curl -s https://ogp.yourdomain.com/.well-known/ogp
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
And the public card should contain:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"gatewayUrl": "https://ogp.yourdomain.com"
|
|
125
|
+
}
|
|
126
|
+
```
|
package/docs/federation-flow.md
CHANGED
|
@@ -33,8 +33,8 @@ Host: peer.example.com
|
|
|
33
33
|
"publicKey": "302a300506032b6570032100abc123...",
|
|
34
34
|
"agentId": "main",
|
|
35
35
|
"capabilities": {
|
|
36
|
-
"intents": ["message", "task-request", "status-update", "agent-comms"],
|
|
37
|
-
"features": ["scope-negotiation", "reply-callback"
|
|
36
|
+
"intents": ["message", "task-request", "status-update", "agent-comms", "project.join", "project.contribute", "project.query", "project.status"],
|
|
37
|
+
"features": ["scope-negotiation", "reply-callback"]
|
|
38
38
|
},
|
|
39
39
|
"endpoints": {
|
|
40
40
|
"request": "https://peer.example.com/federation/request",
|
|
@@ -290,7 +290,7 @@ Bob's OGP daemon (doorman):
|
|
|
290
290
|
3. **Checks rate limits** - Has Alice exceeded their quota? (v0.2.0+)
|
|
291
291
|
4. Verifies signature using Alice's public key
|
|
292
292
|
5. Checks intent exists in registry
|
|
293
|
-
6. Forwards to Bob's OpenClaw via
|
|
293
|
+
6. Forwards to Bob's OpenClaw via the local platform delivery backend
|
|
294
294
|
|
|
295
295
|
If scope check fails:
|
|
296
296
|
- Response: `403 Forbidden`
|
|
@@ -303,51 +303,41 @@ If rate limit exceeded:
|
|
|
303
303
|
|
|
304
304
|
### OpenClaw Notification
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
For human-facing federated work, the OpenClaw reference path is now an agent-turn hook rather than raw session injection:
|
|
307
307
|
|
|
308
308
|
```http
|
|
309
|
-
POST /
|
|
309
|
+
POST /hooks/agent HTTP/1.1
|
|
310
310
|
Host: bob-openclaw.local:18789
|
|
311
|
-
Authorization: Bearer
|
|
311
|
+
Authorization: Bearer <hooks-token>
|
|
312
312
|
Content-Type: application/json
|
|
313
313
|
|
|
314
314
|
{
|
|
315
|
-
"
|
|
316
|
-
"
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
"
|
|
315
|
+
"agentId": "main",
|
|
316
|
+
"text": "[OGP Federation] Alice says: Hello, Bob!",
|
|
317
|
+
"metadata": {
|
|
318
|
+
"ogp": {
|
|
319
|
+
"from": "peer-alice",
|
|
320
|
+
"intent": "message",
|
|
321
|
+
"nonce": "550e8400-e29b-41d4-a716-446655440000",
|
|
322
|
+
"payload": {
|
|
323
|
+
"text": "Hello, Bob!"
|
|
324
|
+
}
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
}
|
|
326
328
|
```
|
|
327
329
|
|
|
328
|
-
|
|
330
|
+
That lets OpenClaw run a real agent turn, apply the configured human-delivery policy, and decide how to surface the result to the human.
|
|
329
331
|
|
|
330
|
-
|
|
331
|
-
POST /api/system-event HTTP/1.1
|
|
332
|
-
Host: bob-openclaw.local:18789
|
|
333
|
-
Authorization: Bearer bob-token
|
|
334
|
-
Content-Type: application/json
|
|
332
|
+
If OGP needs direct session injection for fallback or synchronization, it uses Gateway RPC against the TLS-enabled local gateway:
|
|
335
333
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
"sessionKey": "agent:main:main",
|
|
339
|
-
"ogp": {
|
|
340
|
-
"from": "peer-alice",
|
|
341
|
-
"intent": "message",
|
|
342
|
-
"nonce": "550e8400-e29b-41d4-a716-446655440000",
|
|
343
|
-
"payload": {
|
|
344
|
-
"text": "Hello, Bob!"
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
334
|
+
```bash
|
|
335
|
+
openclaw gateway call --url wss://localhost:18789 sessions.send ...
|
|
348
336
|
```
|
|
349
337
|
|
|
350
|
-
|
|
338
|
+
`sessions.send` is still useful, but it is not the primary delivery primitive for human-facing federated work.
|
|
339
|
+
|
|
340
|
+
Bob's OpenClaw agent sees the resulting human-facing output in the configured channel:
|
|
351
341
|
|
|
352
342
|
```
|
|
353
343
|
[OGP] Message from Alice: Hello, Bob!
|
|
@@ -470,7 +460,7 @@ Content-Type: application/json
|
|
|
470
460
|
"action": "contribute",
|
|
471
461
|
"projectId": "shared-app",
|
|
472
462
|
"contribution": {
|
|
473
|
-
"
|
|
463
|
+
"entryType": "progress",
|
|
474
464
|
"summary": "Completed authentication system",
|
|
475
465
|
"metadata": {
|
|
476
466
|
"files": ["src/auth.ts", "src/jwt.ts"],
|
|
@@ -495,7 +485,7 @@ Bob's daemon:
|
|
|
495
485
|
Bob sees:
|
|
496
486
|
|
|
497
487
|
```
|
|
498
|
-
[OGP Project] Alice contributed to shared-app (progress): Completed authentication system
|
|
488
|
+
[OGP Project] Alice contributed to shared-app (entry type: progress): Completed authentication system
|
|
499
489
|
```
|
|
500
490
|
|
|
501
491
|
### Alice Queries Bob's Project
|
|
@@ -549,13 +539,13 @@ Content-Type: application/json
|
|
|
549
539
|
"projectName": "Shared Mobile App",
|
|
550
540
|
"contributions": [
|
|
551
541
|
{
|
|
552
|
-
"
|
|
542
|
+
"entryType": "progress",
|
|
553
543
|
"summary": "Deployed staging environment",
|
|
554
544
|
"author": "peer-bob",
|
|
555
545
|
"timestamp": "2026-03-24T10:00:00Z"
|
|
556
546
|
},
|
|
557
547
|
{
|
|
558
|
-
"
|
|
548
|
+
"entryType": "blocker",
|
|
559
549
|
"summary": "Waiting for API key approval",
|
|
560
550
|
"author": "peer-bob",
|
|
561
551
|
"timestamp": "2026-03-23T15:30:00Z"
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Hermes Integration Implementation Checklist
|
|
2
2
|
|
|
3
3
|
> Developer checklist for adding Hermes support to OGP
|
|
4
|
+
>
|
|
5
|
+
> Historical note, April 9, 2026: this file is retained as an implementation artifact.
|
|
6
|
+
> Many unchecked boxes below were never backfilled after the sidecar work landed.
|
|
7
|
+
> Do not use this file as the canonical current backlog. Use `CURRENT_WORK.md` and Beads instead.
|
|
4
8
|
|
|
5
9
|
## Phase 1: Sidecar Integration (Week 1)
|
|
6
10
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Project Intent Testing
|
|
2
|
+
|
|
3
|
+
This repo now includes a runnable local project-intent harness:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm run test:project-intents
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The harness creates two isolated local gateways with separate `OGP_HOME` directories, federates them over localhost, and exercises the real project commands:
|
|
10
|
+
|
|
11
|
+
- `federation request`
|
|
12
|
+
- `federation approve`
|
|
13
|
+
- `project create`
|
|
14
|
+
- `project contribute --local-only`
|
|
15
|
+
- `project request-join`
|
|
16
|
+
- `project send-contribution`
|
|
17
|
+
- `project query-peer`
|
|
18
|
+
- `project status-peer`
|
|
19
|
+
|
|
20
|
+
## What It Verifies
|
|
21
|
+
|
|
22
|
+
The automated run checks these behaviors:
|
|
23
|
+
|
|
24
|
+
1. Two local daemons can boot independently.
|
|
25
|
+
2. Federation approval completes between them.
|
|
26
|
+
3. The project owner can create a local project and persist local contributions.
|
|
27
|
+
4. A non-member peer cannot query the project before joining.
|
|
28
|
+
5. The peer can join the project through `project.join`.
|
|
29
|
+
6. The joined peer can send a remote contribution through `project.contribute`.
|
|
30
|
+
7. The joined peer can query the owner project through `project.query`.
|
|
31
|
+
8. The status request path for `project.status` succeeds at the transport level.
|
|
32
|
+
|
|
33
|
+
## Useful Variants
|
|
34
|
+
|
|
35
|
+
Keep the temp state and logs for inspection:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run test:project-intents -- --keep-state
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use a custom root or ports:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm run test:project-intents -- \
|
|
45
|
+
--root /tmp/ogp-project-intent-test \
|
|
46
|
+
--alpha-port 18990 \
|
|
47
|
+
--beta-port 18991
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Skip the TypeScript rebuild when `dist/` is already current:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm run test:project-intents -- --skip-build
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Manual Checks
|
|
57
|
+
|
|
58
|
+
If you want to replay the flow by hand, the harness prints the exact commands it used. These are the most valuable checks:
|
|
59
|
+
|
|
60
|
+
1. Membership isolation:
|
|
61
|
+
`project query-peer` should fail before `project request-join`.
|
|
62
|
+
2. Membership grant:
|
|
63
|
+
`project request-join` should create or update the project on the requester and add the remote member on the owner.
|
|
64
|
+
3. Data flow:
|
|
65
|
+
`project send-contribution` should create a new contribution on the owner gateway.
|
|
66
|
+
4. Remote visibility:
|
|
67
|
+
`project query-peer` should return the contribution after join succeeds.
|
|
68
|
+
5. Local persistence:
|
|
69
|
+
`projects.json` under each `OGP_HOME` should reflect the expected project and topic state.
|
|
70
|
+
|
|
71
|
+
## Interpreting Success
|
|
72
|
+
|
|
73
|
+
Project intents are working if all of the following are true:
|
|
74
|
+
|
|
75
|
+
- both daemons answer `/.well-known/ogp`
|
|
76
|
+
- both peers end up `approved` in `peers.json`
|
|
77
|
+
- the owner `projects.json` contains the remote member after join
|
|
78
|
+
- the owner `projects.json` contains the remote contribution after send
|
|
79
|
+
- pre-join query fails and post-join query succeeds
|
|
80
|
+
|
|
81
|
+
## Known Testing Nuance
|
|
82
|
+
|
|
83
|
+
`project status-peer` currently confirms that the request was sent, but it is not the best content-verification command because the CLI does not format the returned status payload. Treat it as a transport-path check, and use `project query-peer`, `project status`, `projects.json`, and daemon logs for stronger validation.
|
|
84
|
+
|
|
85
|
+
For controlled runs, `project contribute --local-only` is still useful when you want to inspect local state before any federation traffic. The default auto-sync path now limits fan-out to approved peers who are explicit members of the project.
|
|
86
|
+
|
|
87
|
+
## File Transfer
|
|
88
|
+
|
|
89
|
+
OGP project intents do not currently implement first-class file transfer. Small structured metadata is fine, but real file movement would need explicit protocol support such as:
|
|
90
|
+
|
|
91
|
+
- file manifests with name, size, MIME type, and hash
|
|
92
|
+
- signed download URLs
|
|
93
|
+
- chunking or streaming for larger payloads
|
|
94
|
+
- size limits and approval controls
|
|
95
|
+
- storage and retention rules
|
|
96
|
+
|
|
97
|
+
For now, the practical pattern is to transfer references, hashes, and URLs through project intents rather than raw file contents.
|
package/docs/quickstart.md
CHANGED
|
@@ -20,6 +20,14 @@ After installation, install the OGP skills for Claude Code:
|
|
|
20
20
|
ogp-install-skills
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Then verify the installed skill versions:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
rg -n '^version:' ~/.openclaw/skills/ogp*/SKILL.md ~/.claude/skills/ogp*/SKILL.md 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For the current `0.4.2` release line, expect `ogp` `2.6.0`, `ogp-agent-comms` `0.6.0`, and `ogp-project` `2.2.0`.
|
|
30
|
+
|
|
23
31
|
## Step 2: Configure
|
|
24
32
|
|
|
25
33
|
Run the interactive setup:
|
|
@@ -137,8 +145,8 @@ You should see:
|
|
|
137
145
|
"gatewayUrl": "https://abc-def-123.trycloudflare.com",
|
|
138
146
|
"publicKey": "302a300506032b6570032100...",
|
|
139
147
|
"capabilities": {
|
|
140
|
-
"intents": ["message", "task-request", "status-update", "agent-comms"],
|
|
141
|
-
"features": ["scope-negotiation", "reply-callback"
|
|
148
|
+
"intents": ["message", "task-request", "status-update", "agent-comms", "project.join", "project.contribute", "project.query", "project.status"],
|
|
149
|
+
"features": ["scope-negotiation", "reply-callback"]
|
|
142
150
|
},
|
|
143
151
|
"endpoints": {
|
|
144
152
|
"request": "https://abc-def-123.trycloudflare.com/federation/request",
|
|
@@ -426,8 +434,8 @@ ogp federation scopes <peer-id>
|
|
|
426
434
|
|
|
427
435
|
# Projects
|
|
428
436
|
ogp project create <id> <name> [--description "..."]
|
|
429
|
-
ogp project contribute <id> <
|
|
430
|
-
ogp project query <id> [--limit 10] [--
|
|
437
|
+
ogp project contribute <id> <type> <summary>
|
|
438
|
+
ogp project query <id> [--limit 10] [--type <type>]
|
|
431
439
|
ogp project status <id>
|
|
432
440
|
|
|
433
441
|
# Intents
|