@jonathangu/openclawbrain 0.3.0 → 0.3.1

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 (56) hide show
  1. package/README.md +140 -290
  2. package/docs/END_STATE.md +106 -94
  3. package/docs/EVIDENCE.md +71 -23
  4. package/docs/RELEASE_CONTRACT.md +46 -32
  5. package/docs/agent-tools.md +65 -34
  6. package/docs/architecture.md +128 -142
  7. package/docs/configuration.md +62 -25
  8. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/channels-status.txt +20 -0
  9. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/config-snapshot.json +94 -0
  10. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/doctor.json +14 -0
  11. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/gateway-probe.txt +24 -0
  12. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/gateway-status.txt +31 -0
  13. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/init-capture.json +15 -0
  14. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/logs.txt +357 -0
  15. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/status-all.txt +61 -0
  16. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/status.json +275 -0
  17. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/summary.md +18 -0
  18. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/trace.json +222 -0
  19. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/validation-report.json +1515 -0
  20. package/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b/workspace-inventory.json +4 -0
  21. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/channels-status.txt +20 -0
  22. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/config-snapshot.json +94 -0
  23. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/doctor.json +14 -0
  24. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/gateway-probe.txt +24 -0
  25. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/gateway-status.txt +31 -0
  26. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/init-capture.json +15 -0
  27. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/logs.txt +362 -0
  28. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/status-all.txt +61 -0
  29. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/status.json +275 -0
  30. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/summary.md +21 -0
  31. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/trace.json +222 -0
  32. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/validation-report.json +4400 -0
  33. package/docs/evidence/2026-03-16/4ccd71a22418b9170128b8d948f5a95801a10380/workspace-inventory.json +4 -0
  34. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/channels-status.txt +31 -0
  35. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/config-snapshot.json +94 -0
  36. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/doctor.json +14 -0
  37. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/gateway-probe.txt +34 -0
  38. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/gateway-status.txt +41 -0
  39. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/logs.txt +441 -0
  40. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/status-all.txt +60 -0
  41. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/status.json +276 -0
  42. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/summary.md +13 -0
  43. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/trace.json +4 -0
  44. package/docs/evidence/2026-03-16/d93f09feea123a08d020fcad8a4523b6c1d26507/validation-report.json +387 -0
  45. package/docs/tui.md +11 -4
  46. package/index.ts +194 -1
  47. package/package.json +1 -1
  48. package/src/brain-cli.ts +12 -1
  49. package/src/brain-harvest/scanner.ts +286 -16
  50. package/src/brain-harvest/self.ts +134 -6
  51. package/src/brain-runtime/evidence-detectors.ts +3 -1
  52. package/src/brain-runtime/harvester-extension.ts +3 -0
  53. package/src/brain-runtime/service.ts +2 -0
  54. package/src/brain-store/embedding.ts +29 -8
  55. package/src/brain-worker/worker.ts +40 -0
  56. package/src/engine.ts +1 -0
@@ -0,0 +1,275 @@
1
+ {
2
+ "command": "openclaw",
3
+ "args": [
4
+ "status",
5
+ "--json",
6
+ "--timeout",
7
+ "10000"
8
+ ],
9
+ "cwd": "/Users/cormorantai/openclawbrain",
10
+ "exitCode": 0,
11
+ "signal": null,
12
+ "ok": true,
13
+ "stdout": "[plugins] [openclawbrain] Plugin loaded (enabled=true, db=/Users/cormorantai/.openclaw-ocbphase1/lcm.db, threshold=0.75)\n[plugins] [openclawbrain] Plugin loaded (enabled=true, db=/Users/cormorantai/.openclaw-ocbphase1/lcm.db, threshold=0.75)\n{\n \"runtimeVersion\": \"2026.3.13\",\n \"heartbeat\": {\n \"defaultAgentId\": \"main\",\n \"agents\": [\n {\n \"agentId\": \"main\",\n \"enabled\": true,\n \"every\": \"30m\",\n \"everyMs\": 1800000\n }\n ]\n },\n \"channelSummary\": [],\n \"queuedSystemEvents\": [],\n \"sessions\": {\n \"paths\": [\n \"/Users/cormorantai/.openclaw-ocbphase1/agents/main/sessions/sessions.json\"\n ],\n \"count\": 1,\n \"defaults\": {\n \"model\": \"qwen2.5:7b-instruct\",\n \"contextTokens\": 262144\n },\n \"recent\": [\n {\n \"agentId\": \"main\",\n \"key\": \"agent:main:main\",\n \"kind\": \"direct\",\n \"sessionId\": \"93eb604e-21e6-4802-81c1-04c889244efb\",\n \"updatedAt\": 1773661673401,\n \"age\": 12954192,\n \"abortedLastRun\": false,\n \"inputTokens\": 17600,\n \"outputTokens\": 271,\n \"cacheRead\": 0,\n \"cacheWrite\": 0,\n \"totalTokens\": 17600,\n \"totalTokensFresh\": true,\n \"remainingTokens\": 244544,\n \"percentUsed\": 7,\n \"model\": \"qwen2.5:7b-instruct\",\n \"contextTokens\": 262144,\n \"flags\": [\n \"id:93eb604e-21e6-4802-81c1-04c889244efb\"\n ]\n }\n ],\n \"byAgent\": [\n {\n \"agentId\": \"main\",\n \"path\": \"/Users/cormorantai/.openclaw-ocbphase1/agents/main/sessions/sessions.json\",\n \"count\": 1,\n \"recent\": [\n {\n \"agentId\": \"main\",\n \"key\": \"agent:main:main\",\n \"kind\": \"direct\",\n \"sessionId\": \"93eb604e-21e6-4802-81c1-04c889244efb\",\n \"updatedAt\": 1773661673401,\n \"age\": 12954192,\n \"abortedLastRun\": false,\n \"inputTokens\": 17600,\n \"outputTokens\": 271,\n \"cacheRead\": 0,\n \"cacheWrite\": 0,\n \"totalTokens\": 17600,\n \"totalTokensFresh\": true,\n \"remainingTokens\": 244544,\n \"percentUsed\": 7,\n \"model\": \"qwen2.5:7b-instruct\",\n \"contextTokens\": 262144,\n \"flags\": [\n \"id:93eb604e-21e6-4802-81c1-04c889244efb\"\n ]\n }\n ]\n }\n ]\n },\n \"os\": {\n \"platform\": \"darwin\",\n \"arch\": \"arm64\",\n \"release\": \"25.3.0\",\n \"label\": \"macos 26.3 (arm64)\"\n },\n \"update\": {\n \"root\": \"/Users/cormorantai/opencormorant\",\n \"installKind\": \"git\",\n \"packageManager\": \"pnpm\",\n \"git\": {\n \"root\": \"/Users/cormorantai/opencormorant\",\n \"sha\": \"66e02b296fa7c18c04dc94fe071d916042a30137\",\n \"tag\": null,\n \"branch\": \"main\",\n \"upstream\": \"origin/main\",\n \"dirty\": false,\n \"ahead\": 0,\n \"behind\": 615,\n \"fetchOk\": true\n },\n \"deps\": {\n \"manager\": \"pnpm\",\n \"status\": \"ok\",\n \"lockfilePath\": \"/Users/cormorantai/opencormorant/pnpm-lock.yaml\",\n \"markerPath\": \"/Users/cormorantai/opencormorant/node_modules/.modules.yaml\"\n },\n \"registry\": {\n \"latestVersion\": \"2026.3.13\"\n }\n },\n \"updateChannel\": \"dev\",\n \"updateChannelSource\": \"git-branch\",\n \"memory\": {\n \"agentId\": \"main\",\n \"backend\": \"builtin\",\n \"files\": 0,\n \"chunks\": 0,\n \"dirty\": true,\n \"workspaceDir\": \"/Users/cormorantai/.openclaw-ocbphase1/workspace-fixture\",\n \"dbPath\": \"/Users/cormorantai/.openclaw-ocbphase1/memory/main.sqlite\",\n \"provider\": \"gemini\",\n \"model\": \"gemini-embedding-001\",\n \"requestedProvider\": \"auto\",\n \"sources\": [\n \"memory\"\n ],\n \"extraPaths\": [],\n \"sourceCounts\": [\n {\n \"source\": \"memory\",\n \"files\": 0,\n \"chunks\": 0\n }\n ],\n \"cache\": {\n \"enabled\": true,\n \"entries\": 0\n },\n \"fts\": {\n \"enabled\": true,\n \"available\": true\n },\n \"vector\": {\n \"enabled\": true,\n \"available\": true,\n \"extensionPath\": \"/Users/cormorantai/opencormorant/node_modules/.pnpm/sqlite-vec@0.1.7-alpha.2/node_modules/sqlite-vec-darwin-arm64/vec0.dylib\"\n },\n \"batch\": {\n \"enabled\": false,\n \"failures\": 0,\n \"limit\": 2,\n \"wait\": true,\n \"concurrency\": 2,\n \"pollIntervalMs\": 2000,\n \"timeoutMs\": 3600000\n },\n \"custom\": {\n \"searchMode\": \"hybrid\",\n \"readonlyRecovery\": {\n \"attempts\": 0,\n \"successes\": 0,\n \"failures\": 0\n }\n }\n },\n \"memoryPlugin\": {\n \"enabled\": true,\n \"slot\": \"memory-core\"\n },\n \"gateway\": {\n \"mode\": \"local\",\n \"url\": \"ws://127.0.0.1:19031\",\n \"urlSource\": \"local loopback\",\n \"misconfigured\": false,\n \"reachable\": false,\n \"connectLatencyMs\": null,\n \"self\": null,\n \"error\": \"connect failed: connect ECONNREFUSED 127.0.0.1:19031\",\n \"authWarning\": null\n },\n \"gatewayService\": {\n \"label\": \"LaunchAgent\",\n \"installed\": false,\n \"managedByOpenClaw\": false,\n \"externallyManaged\": false,\n \"loadedText\": \"not loaded\",\n \"runtimeShort\": \"unknown\"\n },\n \"nodeService\": {\n \"label\": \"LaunchAgent\",\n \"installed\": false,\n \"managedByOpenClaw\": false,\n \"externallyManaged\": false,\n \"loadedText\": \"not loaded\",\n \"runtimeShort\": \"unknown\"\n },\n \"agents\": {\n \"defaultId\": \"main\",\n \"agents\": [\n {\n \"id\": \"main\",\n \"workspaceDir\": \"/Users/cormorantai/.openclaw-ocbphase1/workspace-fixture\",\n \"bootstrapPending\": false,\n \"sessionsPath\": \"/Users/cormorantai/.openclaw-ocbphase1/agents/main/sessions/sessions.json\",\n \"sessionsCount\": 1,\n \"lastUpdatedAt\": 1773661673401,\n \"lastActiveAgeMs\": 12954188\n }\n ],\n \"totalSessions\": 1,\n \"bootstrapPendingCount\": 0\n },\n \"securityAudit\": {\n \"ts\": 1773674630139,\n \"summary\": {\n \"critical\": 3,\n \"warn\": 1,\n \"info\": 1\n },\n \"findings\": [\n {\n \"checkId\": \"summary.attack_surface\",\n \"severity\": \"info\",\n \"title\": \"Attack surface summary\",\n \"detail\": \"groups: open=0, allowlist=0\\ntools.elevated: enabled\\nhooks.webhooks: disabled\\nhooks.internal: disabled\\nbrowser control: enabled\\ntrust model: personal assistant (one trusted operator boundary), not hostile multi-tenant on one shared gateway\"\n },\n {\n \"checkId\": \"gateway.trusted_proxies_missing\",\n \"severity\": \"warn\",\n \"title\": \"Reverse proxy headers are not trusted\",\n \"detail\": \"gateway.bind is loopback and gateway.trustedProxies is empty. If you expose the Control UI through a reverse proxy, configure trusted proxies so local-client checks cannot be spoofed.\",\n \"remediation\": \"Set gateway.trustedProxies to your proxy IPs or keep the Control UI local-only.\"\n },\n {\n \"checkId\": \"gateway.loopback_no_auth\",\n \"severity\": \"critical\",\n \"title\": \"Gateway auth missing on loopback\",\n \"detail\": \"gateway.bind is loopback but no gateway auth secret is configured. If the Control UI is exposed through a reverse proxy, unauthenticated access is possible.\",\n \"remediation\": \"Set gateway.auth (token recommended) or keep the Control UI local-only.\"\n },\n {\n \"checkId\": \"browser.control_no_auth\",\n \"severity\": \"critical\",\n \"title\": \"Browser control has no auth\",\n \"detail\": \"Browser control HTTP routes are enabled but no gateway.auth token/password is configured. Any local process (or SSRF to loopback) can call browser control endpoints.\",\n \"remediation\": \"Set gateway.auth.token (recommended) or gateway.auth.password so browser control HTTP routes require authentication. Restarting the gateway will auto-generate gateway.auth.token when browser control is enabled.\"\n },\n {\n \"checkId\": \"models.small_params\",\n \"severity\": \"critical\",\n \"title\": \"Small models require sandboxing and web tools disabled\",\n \"detail\": \"Small models (<=300B params) detected:\\n- ollama/qwen2.5:7b-instruct (7B) @ agents.defaults.model.primary (unsafe; sandbox=off; web=[web_search, web_fetch, browser])\\nUncontrolled input tools allowed: web_search, web_fetch, browser.\\nSmall models are not recommended for untrusted inputs.\",\n \"remediation\": \"If you must use small models, enable sandboxing for all sessions (agents.defaults.sandbox.mode=\\\"all\\\") and disable web_search/web_fetch/browser (tools.deny=[\\\"group:web\\\",\\\"browser\\\"]).\"\n }\n ]\n },\n \"secretDiagnostics\": []\n}\n",
14
+ "stderr": "[plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: openclawbrain (/Users/cormorantai/openclawbrain/index.ts). Set plugins.allow to explicit trusted ids.\n[plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: openclawbrain (/Users/cormorantai/openclawbrain/index.ts). Set plugins.allow to explicit trusted ids.\n",
15
+ "error": null,
16
+ "parsed": {
17
+ "runtimeVersion": "2026.3.13",
18
+ "heartbeat": {
19
+ "defaultAgentId": "main",
20
+ "agents": [
21
+ {
22
+ "agentId": "main",
23
+ "enabled": true,
24
+ "every": "30m",
25
+ "everyMs": 1800000
26
+ }
27
+ ]
28
+ },
29
+ "channelSummary": [],
30
+ "queuedSystemEvents": [],
31
+ "sessions": {
32
+ "paths": [
33
+ "/Users/cormorantai/.openclaw-ocbphase1/agents/main/sessions/sessions.json"
34
+ ],
35
+ "count": 1,
36
+ "defaults": {
37
+ "model": "qwen2.5:7b-instruct",
38
+ "contextTokens": 262144
39
+ },
40
+ "recent": [
41
+ {
42
+ "agentId": "main",
43
+ "key": "agent:main:main",
44
+ "kind": "direct",
45
+ "sessionId": "93eb604e-21e6-4802-81c1-04c889244efb",
46
+ "updatedAt": 1773661673401,
47
+ "age": 12954192,
48
+ "abortedLastRun": false,
49
+ "inputTokens": 17600,
50
+ "outputTokens": 271,
51
+ "cacheRead": 0,
52
+ "cacheWrite": 0,
53
+ "totalTokens": 17600,
54
+ "totalTokensFresh": true,
55
+ "remainingTokens": 244544,
56
+ "percentUsed": 7,
57
+ "model": "qwen2.5:7b-instruct",
58
+ "contextTokens": 262144,
59
+ "flags": [
60
+ "id:93eb604e-21e6-4802-81c1-04c889244efb"
61
+ ]
62
+ }
63
+ ],
64
+ "byAgent": [
65
+ {
66
+ "agentId": "main",
67
+ "path": "/Users/cormorantai/.openclaw-ocbphase1/agents/main/sessions/sessions.json",
68
+ "count": 1,
69
+ "recent": [
70
+ {
71
+ "agentId": "main",
72
+ "key": "agent:main:main",
73
+ "kind": "direct",
74
+ "sessionId": "93eb604e-21e6-4802-81c1-04c889244efb",
75
+ "updatedAt": 1773661673401,
76
+ "age": 12954192,
77
+ "abortedLastRun": false,
78
+ "inputTokens": 17600,
79
+ "outputTokens": 271,
80
+ "cacheRead": 0,
81
+ "cacheWrite": 0,
82
+ "totalTokens": 17600,
83
+ "totalTokensFresh": true,
84
+ "remainingTokens": 244544,
85
+ "percentUsed": 7,
86
+ "model": "qwen2.5:7b-instruct",
87
+ "contextTokens": 262144,
88
+ "flags": [
89
+ "id:93eb604e-21e6-4802-81c1-04c889244efb"
90
+ ]
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ },
96
+ "os": {
97
+ "platform": "darwin",
98
+ "arch": "arm64",
99
+ "release": "25.3.0",
100
+ "label": "macos 26.3 (arm64)"
101
+ },
102
+ "update": {
103
+ "root": "/Users/cormorantai/opencormorant",
104
+ "installKind": "git",
105
+ "packageManager": "pnpm",
106
+ "git": {
107
+ "root": "/Users/cormorantai/opencormorant",
108
+ "sha": "66e02b296fa7c18c04dc94fe071d916042a30137",
109
+ "tag": null,
110
+ "branch": "main",
111
+ "upstream": "origin/main",
112
+ "dirty": false,
113
+ "ahead": 0,
114
+ "behind": 615,
115
+ "fetchOk": true
116
+ },
117
+ "deps": {
118
+ "manager": "pnpm",
119
+ "status": "ok",
120
+ "lockfilePath": "/Users/cormorantai/opencormorant/pnpm-lock.yaml",
121
+ "markerPath": "/Users/cormorantai/opencormorant/node_modules/.modules.yaml"
122
+ },
123
+ "registry": {
124
+ "latestVersion": "2026.3.13"
125
+ }
126
+ },
127
+ "updateChannel": "dev",
128
+ "updateChannelSource": "git-branch",
129
+ "memory": {
130
+ "agentId": "main",
131
+ "backend": "builtin",
132
+ "files": 0,
133
+ "chunks": 0,
134
+ "dirty": true,
135
+ "workspaceDir": "/Users/cormorantai/.openclaw-ocbphase1/workspace-fixture",
136
+ "dbPath": "/Users/cormorantai/.openclaw-ocbphase1/memory/main.sqlite",
137
+ "provider": "gemini",
138
+ "model": "gemini-embedding-001",
139
+ "requestedProvider": "auto",
140
+ "sources": [
141
+ "memory"
142
+ ],
143
+ "extraPaths": [],
144
+ "sourceCounts": [
145
+ {
146
+ "source": "memory",
147
+ "files": 0,
148
+ "chunks": 0
149
+ }
150
+ ],
151
+ "cache": {
152
+ "enabled": true,
153
+ "entries": 0
154
+ },
155
+ "fts": {
156
+ "enabled": true,
157
+ "available": true
158
+ },
159
+ "vector": {
160
+ "enabled": true,
161
+ "available": true,
162
+ "extensionPath": "/Users/cormorantai/opencormorant/node_modules/.pnpm/sqlite-vec@0.1.7-alpha.2/node_modules/sqlite-vec-darwin-arm64/vec0.dylib"
163
+ },
164
+ "batch": {
165
+ "enabled": false,
166
+ "failures": 0,
167
+ "limit": 2,
168
+ "wait": true,
169
+ "concurrency": 2,
170
+ "pollIntervalMs": 2000,
171
+ "timeoutMs": 3600000
172
+ },
173
+ "custom": {
174
+ "searchMode": "hybrid",
175
+ "readonlyRecovery": {
176
+ "attempts": 0,
177
+ "successes": 0,
178
+ "failures": 0
179
+ }
180
+ }
181
+ },
182
+ "memoryPlugin": {
183
+ "enabled": true,
184
+ "slot": "memory-core"
185
+ },
186
+ "gateway": {
187
+ "mode": "local",
188
+ "url": "ws://127.0.0.1:19031",
189
+ "urlSource": "local loopback",
190
+ "misconfigured": false,
191
+ "reachable": false,
192
+ "connectLatencyMs": null,
193
+ "self": null,
194
+ "error": "connect failed: connect ECONNREFUSED 127.0.0.1:19031",
195
+ "authWarning": null
196
+ },
197
+ "gatewayService": {
198
+ "label": "LaunchAgent",
199
+ "installed": false,
200
+ "managedByOpenClaw": false,
201
+ "externallyManaged": false,
202
+ "loadedText": "not loaded",
203
+ "runtimeShort": "unknown"
204
+ },
205
+ "nodeService": {
206
+ "label": "LaunchAgent",
207
+ "installed": false,
208
+ "managedByOpenClaw": false,
209
+ "externallyManaged": false,
210
+ "loadedText": "not loaded",
211
+ "runtimeShort": "unknown"
212
+ },
213
+ "agents": {
214
+ "defaultId": "main",
215
+ "agents": [
216
+ {
217
+ "id": "main",
218
+ "workspaceDir": "/Users/cormorantai/.openclaw-ocbphase1/workspace-fixture",
219
+ "bootstrapPending": false,
220
+ "sessionsPath": "/Users/cormorantai/.openclaw-ocbphase1/agents/main/sessions/sessions.json",
221
+ "sessionsCount": 1,
222
+ "lastUpdatedAt": 1773661673401,
223
+ "lastActiveAgeMs": 12954188
224
+ }
225
+ ],
226
+ "totalSessions": 1,
227
+ "bootstrapPendingCount": 0
228
+ },
229
+ "securityAudit": {
230
+ "ts": 1773674630139,
231
+ "summary": {
232
+ "critical": 3,
233
+ "warn": 1,
234
+ "info": 1
235
+ },
236
+ "findings": [
237
+ {
238
+ "checkId": "summary.attack_surface",
239
+ "severity": "info",
240
+ "title": "Attack surface summary",
241
+ "detail": "groups: open=0, allowlist=0\ntools.elevated: enabled\nhooks.webhooks: disabled\nhooks.internal: disabled\nbrowser control: enabled\ntrust model: personal assistant (one trusted operator boundary), not hostile multi-tenant on one shared gateway"
242
+ },
243
+ {
244
+ "checkId": "gateway.trusted_proxies_missing",
245
+ "severity": "warn",
246
+ "title": "Reverse proxy headers are not trusted",
247
+ "detail": "gateway.bind is loopback and gateway.trustedProxies is empty. If you expose the Control UI through a reverse proxy, configure trusted proxies so local-client checks cannot be spoofed.",
248
+ "remediation": "Set gateway.trustedProxies to your proxy IPs or keep the Control UI local-only."
249
+ },
250
+ {
251
+ "checkId": "gateway.loopback_no_auth",
252
+ "severity": "critical",
253
+ "title": "Gateway auth missing on loopback",
254
+ "detail": "gateway.bind is loopback but no gateway auth secret is configured. If the Control UI is exposed through a reverse proxy, unauthenticated access is possible.",
255
+ "remediation": "Set gateway.auth (token recommended) or keep the Control UI local-only."
256
+ },
257
+ {
258
+ "checkId": "browser.control_no_auth",
259
+ "severity": "critical",
260
+ "title": "Browser control has no auth",
261
+ "detail": "Browser control HTTP routes are enabled but no gateway.auth token/password is configured. Any local process (or SSRF to loopback) can call browser control endpoints.",
262
+ "remediation": "Set gateway.auth.token (recommended) or gateway.auth.password so browser control HTTP routes require authentication. Restarting the gateway will auto-generate gateway.auth.token when browser control is enabled."
263
+ },
264
+ {
265
+ "checkId": "models.small_params",
266
+ "severity": "critical",
267
+ "title": "Small models require sandboxing and web tools disabled",
268
+ "detail": "Small models (<=300B params) detected:\n- ollama/qwen2.5:7b-instruct (7B) @ agents.defaults.model.primary (unsafe; sandbox=off; web=[web_search, web_fetch, browser])\nUncontrolled input tools allowed: web_search, web_fetch, browser.\nSmall models are not recommended for untrusted inputs.",
269
+ "remediation": "If you must use small models, enable sandboxing for all sessions (agents.defaults.sandbox.mode=\"all\") and disable web_search/web_fetch/browser (tools.deny=[\"group:web\",\"browser\"])."
270
+ }
271
+ ]
272
+ },
273
+ "secretDiagnostics": []
274
+ }
275
+ }
@@ -0,0 +1,18 @@
1
+ # OpenClawBrain validation summary
2
+
3
+ - commit: `1fc8ee6fd7892e3deb27d111434df948bca2a66b`
4
+ - validation mode: sterile-lane
5
+ - config path: `/Users/cormorantai/.openclaw-ocbphase1/openclaw.json`
6
+ - state dir: `/Users/cormorantai/.openclaw-ocbphase1`
7
+ - workspace: `/Users/cormorantai/.openclaw-ocbphase1/workspace-fixture`
8
+ - artifact dir: `/Users/cormorantai/openclawbrain/docs/evidence/2026-03-16/1fc8ee6fd7892e3deb27d111434df948bca2a66b`
9
+
10
+ ## Assertions
11
+ - teachRetrieval: {"taughtNodeId":"bn_8c0d6437-cc6","packVersion":7,"retrievedCorrectionVisible":true,"traceIncludesTaughtNode":true,"retrievedPackVersion":7}
12
+ - workerDownFailOpen: {"servedBeforeCrash":true,"servedPullRequestGuidanceBeforeCrash":true,"workerHealthyAfterCrash":false,"workerLastExit":{"code":null,"signal":"SIGKILL","at":1773674656519},"currentPackVersion":3,"servedAfterCrash":true,"servedPackVersion":3,"servedPullRequestGuidance":true}
13
+ - recurrentQuery: {"validationRecordCountBefore":2,"validationRecordCountAfter":2,"mode":null,"traceId":null,"episodeId":null,"traceQueryText":null,"workerMode":"child","workerPid":null,"workerHealthy":false,"workerLastHeartbeatAt":null,"currentPackVersion":6,"aborted":false}
14
+
15
+ ## Skipped
16
+
17
+ ## Failure
18
+ - Validation harness expected recurrent host-agent query to emit a host-surface validation record, but none was captured.
@@ -0,0 +1,222 @@
1
+ {
2
+ "command": "node",
3
+ "args": [
4
+ "bin/openclawbrain.js",
5
+ "trace"
6
+ ],
7
+ "cwd": "/Users/cormorantai/openclawbrain",
8
+ "exitCode": 0,
9
+ "signal": null,
10
+ "ok": true,
11
+ "stdout": "{\n \"command\": \"trace\",\n \"trace\": {\n \"id\": \"bt_c79a93d6\",\n \"episodeId\": \"be_5a29c9cf-99b\",\n \"packVersion\": 1,\n \"queryText\": \"How do I open a pull request again?\",\n \"seedScores\": [\n {\n \"nodeId\": \"bn_40502fac-df0\",\n \"priorScore\": 0.7326886480086391,\n \"learnedSeedWeight\": 0,\n \"policyScore\": 0.7326886480086391,\n \"probability\": 0.9999999999986446,\n \"chosen\": true\n }\n ],\n \"trajectory\": [\n {\n \"stateSnapshot\": {\n \"currentNodeId\": null,\n \"hopCount\": 0,\n \"budgetRemaining\": 314572,\n \"visitedCount\": 0,\n \"firedCount\": 0\n },\n \"candidates\": [\n {\n \"action\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_40502fac-df0\",\n \"seedScore\": 0.7326886480086391\n },\n \"score\": 0.7326886480086391,\n \"probability\": 0.9999999999986446,\n \"priorScore\": 0.7326886480086391,\n \"learnedSeedWeight\": 0\n },\n {\n \"action\": {\n \"type\": \"stop\"\n },\n \"score\": -2,\n \"probability\": 1.3554515361624555e-12\n }\n ],\n \"chosenAction\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_40502fac-df0\",\n \"seedScore\": 0.7326886480086391\n },\n \"chosenActionProbability\": 0.9999999999986446,\n \"stopProbability\": 1.3554515361624555e-12\n },\n {\n \"stateSnapshot\": {\n \"currentNodeId\": \"bn_40502fac-df0\",\n \"hopCount\": 1,\n \"budgetRemaining\": 314539,\n \"visitedCount\": 1,\n \"firedCount\": 1\n },\n \"candidates\": [\n {\n \"action\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_0e867ad3-a44\"\n },\n \"score\": 1.3833746213110998,\n \"probability\": 0.9999999999999754\n },\n {\n \"action\": {\n \"type\": \"stop\"\n },\n \"score\": -1.7496852866752284,\n \"probability\": 2.4733962892288202e-14\n }\n ],\n \"chosenAction\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_0e867ad3-a44\"\n },\n \"chosenActionProbability\": 0.9999999999999754,\n \"stopProbability\": 2.4733962892288202e-14\n },\n {\n \"stateSnapshot\": {\n \"currentNodeId\": \"bn_0e867ad3-a44\",\n \"hopCount\": 2,\n \"budgetRemaining\": 314524,\n \"visitedCount\": 2,\n \"firedCount\": 2\n },\n \"candidates\": [\n {\n \"action\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_7aa03640-409\"\n },\n \"score\": 1.6571061718222952,\n \"probability\": 0.9346462837250167\n },\n {\n \"action\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_56d0d6a0-bf5\"\n },\n \"score\": 1.3910707872392618,\n \"probability\": 0.065353716274965\n },\n {\n \"action\": {\n \"type\": \"stop\"\n },\n \"score\": -1.499542235163969,\n \"probability\": 1.825985980821016e-14\n }\n ],\n \"chosenAction\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_7aa03640-409\"\n },\n \"chosenActionProbability\": 0.9346462837250167,\n \"stopProbability\": 1.825985980821016e-14\n },\n {\n \"stateSnapshot\": {\n \"currentNodeId\": \"bn_7aa03640-409\",\n \"hopCount\": 3,\n \"budgetRemaining\": 314510,\n \"visitedCount\": 3,\n \"firedCount\": 3\n },\n \"candidates\": [\n {\n \"action\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_56d0d6a0-bf5\"\n },\n \"score\": 1.385168196641951,\n \"probability\": 0.9999999999963844\n },\n {\n \"action\": {\n \"type\": \"stop\"\n },\n \"score\": -1.2494087204201265,\n \"probability\": 3.61557877056812e-12\n }\n ],\n \"chosenAction\": {\n \"type\": \"traverse\",\n \"targetNodeId\": \"bn_56d0d6a0-bf5\"\n },\n \"chosenActionProbability\": 0.9999999999963844,\n \"stopProbability\": 3.61557877056812e-12\n },\n {\n \"stateSnapshot\": {\n \"currentNodeId\": \"bn_56d0d6a0-bf5\",\n \"hopCount\": 4,\n \"budgetRemaining\": 314473,\n \"visitedCount\": 4,\n \"firedCount\": 4\n },\n \"candidates\": [\n {\n \"action\": {\n \"type\": \"stop\"\n },\n \"score\": 0,\n \"probability\": 1\n }\n ],\n \"chosenAction\": {\n \"type\": \"stop\"\n },\n \"chosenActionProbability\": 1,\n \"stopProbability\": 1\n }\n ],\n \"firedNodes\": [\n \"bn_40502fac-df0\",\n \"bn_0e867ad3-a44\",\n \"bn_7aa03640-409\",\n \"bn_56d0d6a0-bf5\"\n ],\n \"vetoedNodes\": [],\n \"contextChars\": 391,\n \"footer\": \"Brain · 1 seeds · start bn_40502fac-df0 · 4 hops · 4 fired · 0 veto · 391 chars\",\n \"createdAt\": 1773635212770\n },\n \"chosenSeed\": {\n \"nodeId\": \"bn_40502fac-df0\",\n \"priorScore\": 0.7326886480086391,\n \"learnedSeedWeight\": 0,\n \"policyScore\": 0.7326886480086391,\n \"probability\": 0.9999999999986446,\n \"chosen\": true\n },\n \"finalSectionOrder\": [\n \"correction_cards\",\n \"route_selected_evidence\",\n \"toolcards_and_workflows\",\n \"transcript_support\"\n ]\n}\n",
12
+ "stderr": "",
13
+ "error": null,
14
+ "parsed": {
15
+ "command": "trace",
16
+ "trace": {
17
+ "id": "bt_c79a93d6",
18
+ "episodeId": "be_5a29c9cf-99b",
19
+ "packVersion": 1,
20
+ "queryText": "How do I open a pull request again?",
21
+ "seedScores": [
22
+ {
23
+ "nodeId": "bn_40502fac-df0",
24
+ "priorScore": 0.7326886480086391,
25
+ "learnedSeedWeight": 0,
26
+ "policyScore": 0.7326886480086391,
27
+ "probability": 0.9999999999986446,
28
+ "chosen": true
29
+ }
30
+ ],
31
+ "trajectory": [
32
+ {
33
+ "stateSnapshot": {
34
+ "currentNodeId": null,
35
+ "hopCount": 0,
36
+ "budgetRemaining": 314572,
37
+ "visitedCount": 0,
38
+ "firedCount": 0
39
+ },
40
+ "candidates": [
41
+ {
42
+ "action": {
43
+ "type": "traverse",
44
+ "targetNodeId": "bn_40502fac-df0",
45
+ "seedScore": 0.7326886480086391
46
+ },
47
+ "score": 0.7326886480086391,
48
+ "probability": 0.9999999999986446,
49
+ "priorScore": 0.7326886480086391,
50
+ "learnedSeedWeight": 0
51
+ },
52
+ {
53
+ "action": {
54
+ "type": "stop"
55
+ },
56
+ "score": -2,
57
+ "probability": 1.3554515361624555e-12
58
+ }
59
+ ],
60
+ "chosenAction": {
61
+ "type": "traverse",
62
+ "targetNodeId": "bn_40502fac-df0",
63
+ "seedScore": 0.7326886480086391
64
+ },
65
+ "chosenActionProbability": 0.9999999999986446,
66
+ "stopProbability": 1.3554515361624555e-12
67
+ },
68
+ {
69
+ "stateSnapshot": {
70
+ "currentNodeId": "bn_40502fac-df0",
71
+ "hopCount": 1,
72
+ "budgetRemaining": 314539,
73
+ "visitedCount": 1,
74
+ "firedCount": 1
75
+ },
76
+ "candidates": [
77
+ {
78
+ "action": {
79
+ "type": "traverse",
80
+ "targetNodeId": "bn_0e867ad3-a44"
81
+ },
82
+ "score": 1.3833746213110998,
83
+ "probability": 0.9999999999999754
84
+ },
85
+ {
86
+ "action": {
87
+ "type": "stop"
88
+ },
89
+ "score": -1.7496852866752284,
90
+ "probability": 2.4733962892288202e-14
91
+ }
92
+ ],
93
+ "chosenAction": {
94
+ "type": "traverse",
95
+ "targetNodeId": "bn_0e867ad3-a44"
96
+ },
97
+ "chosenActionProbability": 0.9999999999999754,
98
+ "stopProbability": 2.4733962892288202e-14
99
+ },
100
+ {
101
+ "stateSnapshot": {
102
+ "currentNodeId": "bn_0e867ad3-a44",
103
+ "hopCount": 2,
104
+ "budgetRemaining": 314524,
105
+ "visitedCount": 2,
106
+ "firedCount": 2
107
+ },
108
+ "candidates": [
109
+ {
110
+ "action": {
111
+ "type": "traverse",
112
+ "targetNodeId": "bn_7aa03640-409"
113
+ },
114
+ "score": 1.6571061718222952,
115
+ "probability": 0.9346462837250167
116
+ },
117
+ {
118
+ "action": {
119
+ "type": "traverse",
120
+ "targetNodeId": "bn_56d0d6a0-bf5"
121
+ },
122
+ "score": 1.3910707872392618,
123
+ "probability": 0.065353716274965
124
+ },
125
+ {
126
+ "action": {
127
+ "type": "stop"
128
+ },
129
+ "score": -1.499542235163969,
130
+ "probability": 1.825985980821016e-14
131
+ }
132
+ ],
133
+ "chosenAction": {
134
+ "type": "traverse",
135
+ "targetNodeId": "bn_7aa03640-409"
136
+ },
137
+ "chosenActionProbability": 0.9346462837250167,
138
+ "stopProbability": 1.825985980821016e-14
139
+ },
140
+ {
141
+ "stateSnapshot": {
142
+ "currentNodeId": "bn_7aa03640-409",
143
+ "hopCount": 3,
144
+ "budgetRemaining": 314510,
145
+ "visitedCount": 3,
146
+ "firedCount": 3
147
+ },
148
+ "candidates": [
149
+ {
150
+ "action": {
151
+ "type": "traverse",
152
+ "targetNodeId": "bn_56d0d6a0-bf5"
153
+ },
154
+ "score": 1.385168196641951,
155
+ "probability": 0.9999999999963844
156
+ },
157
+ {
158
+ "action": {
159
+ "type": "stop"
160
+ },
161
+ "score": -1.2494087204201265,
162
+ "probability": 3.61557877056812e-12
163
+ }
164
+ ],
165
+ "chosenAction": {
166
+ "type": "traverse",
167
+ "targetNodeId": "bn_56d0d6a0-bf5"
168
+ },
169
+ "chosenActionProbability": 0.9999999999963844,
170
+ "stopProbability": 3.61557877056812e-12
171
+ },
172
+ {
173
+ "stateSnapshot": {
174
+ "currentNodeId": "bn_56d0d6a0-bf5",
175
+ "hopCount": 4,
176
+ "budgetRemaining": 314473,
177
+ "visitedCount": 4,
178
+ "firedCount": 4
179
+ },
180
+ "candidates": [
181
+ {
182
+ "action": {
183
+ "type": "stop"
184
+ },
185
+ "score": 0,
186
+ "probability": 1
187
+ }
188
+ ],
189
+ "chosenAction": {
190
+ "type": "stop"
191
+ },
192
+ "chosenActionProbability": 1,
193
+ "stopProbability": 1
194
+ }
195
+ ],
196
+ "firedNodes": [
197
+ "bn_40502fac-df0",
198
+ "bn_0e867ad3-a44",
199
+ "bn_7aa03640-409",
200
+ "bn_56d0d6a0-bf5"
201
+ ],
202
+ "vetoedNodes": [],
203
+ "contextChars": 391,
204
+ "footer": "Brain · 1 seeds · start bn_40502fac-df0 · 4 hops · 4 fired · 0 veto · 391 chars",
205
+ "createdAt": 1773635212770
206
+ },
207
+ "chosenSeed": {
208
+ "nodeId": "bn_40502fac-df0",
209
+ "priorScore": 0.7326886480086391,
210
+ "learnedSeedWeight": 0,
211
+ "policyScore": 0.7326886480086391,
212
+ "probability": 0.9999999999986446,
213
+ "chosen": true
214
+ },
215
+ "finalSectionOrder": [
216
+ "correction_cards",
217
+ "route_selected_evidence",
218
+ "toolcards_and_workflows",
219
+ "transcript_support"
220
+ ]
221
+ }
222
+ }