fix(docs): validate strict channel json fences · openclaw/openclaw@0bf19f5
vincentkoc
·
2026-05-04
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -258,15 +258,17 @@ In group `120363403215116621@g.us` with agents `["alfred", "baerbel"]`:
|
258 | 258 | { |
259 | 259 | "agents": { |
260 | 260 | "reviewer": { |
261 | | - "tools": { "allow": ["read", "exec"] } // Read-only |
| 261 | + "tools": { "allow": ["read", "exec"] } |
262 | 262 | }, |
263 | 263 | "fixer": { |
264 | | - "tools": { "allow": ["read", "write", "edit", "exec"] } // Read-write |
| 264 | + "tools": { "allow": ["read", "write", "edit", "exec"] } |
265 | 265 | } |
266 | 266 | } |
267 | 267 | } |
268 | 268 | ``` |
269 | 269 | |
| 270 | +`reviewer` is read-only. `fixer` can read and write. |
| 271 | + |
270 | 272 | </Accordion> |
271 | 273 | <Accordion title="4. Monitor performance"> |
272 | 274 | With many agents, consider: |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -251,7 +251,19 @@ For **HTTP Request URLs mode**, replace `settings` with the HTTP variant and add
|
251 | 251 | "event_subscriptions": { |
252 | 252 | "request_url": "https://gateway-host.example.com/slack/events", |
253 | 253 | "bot_events": [ |
254 | | -/* same as Socket Mode */ |
| 254 | +"app_home_opened", |
| 255 | +"app_mention", |
| 256 | +"channel_rename", |
| 257 | +"member_joined_channel", |
| 258 | +"member_left_channel", |
| 259 | +"message.channels", |
| 260 | +"message.groups", |
| 261 | +"message.im", |
| 262 | +"message.mpim", |
| 263 | +"pin_added", |
| 264 | +"pin_removed", |
| 265 | +"reaction_added", |
| 266 | +"reaction_removed" |
255 | 267 | ] |
256 | 268 | }, |
257 | 269 | "interactivity": { |
@@ -420,11 +432,12 @@ The default manifest enables the Slack App Home **Home** tab and subscribes to `
|
420 | 432 | "description": "Show the short help summary", |
421 | 433 | "url": "https://gateway-host.example.com/slack/events" |
422 | 434 | } |
423 | | -// ...repeat for every command with the same `url` value |
424 | 435 | ] |
425 | 436 | } |
426 | 437 | ``` |
427 | 438 | |
| 439 | + Repeat that `url` value on every command in the list. |
| 440 | + |
428 | 441 | </Tab> |
429 | 442 | </Tabs> |
430 | 443 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -22,10 +22,17 @@ describe("channel docs config examples", () => {
|
22 | 22 | for (const match of blocks) { |
23 | 23 | const code = match[1] ?? ""; |
24 | 24 | const location = `${fileName}:${lineNumberAt(markdown, match.index ?? 0)}`; |
| 25 | +const isStrictJson = match[0].startsWith("```json\n"); |
25 | 26 | try { |
26 | | -JSON5.parse(code); |
| 27 | +if (isStrictJson) { |
| 28 | +JSON.parse(code); |
| 29 | +} else { |
| 30 | +JSON5.parse(code); |
| 31 | +} |
27 | 32 | } catch (error) { |
28 | | -failures.push(`${location} JSON5 parse failed: ${String(error)}`); |
| 33 | +failures.push( |
| 34 | +`${location} ${isStrictJson ? "JSON" : "JSON5"} parse failed: ${String(error)}`, |
| 35 | +); |
29 | 36 | } |
30 | 37 | } |
31 | 38 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。