

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# src/openclaw/ — Bidirectional External Integration23**Generated:** 2026-05-1545## OVERVIEW67This module provides a bidirectional integration system: **outbound** session event notifications (Discord/Telegram/HTTP webhook/shell command) AND **inbound** reply handling (daemon polls chat apps, injects replies back into tmux session). Harness-neutral gateway, daemon, session registry, and tmux injection primitives are extracted to [`packages/openclaw-core/`](../../../../packages/openclaw-core); this directory keeps OpenCode startup/event wiring stable.89## BIDIRECTIONAL FLOW1011### Outbound (OpenCode → External)12```13OpenCode session event → dispatchOpenClawEvent()14 → runtime-dispatch.ts: map event to OpenClaw event15 → dispatcher.ts: execute gateway (HTTP POST or shell command)16 → session-registry.ts: record message ID ↔ sessionID ↔ tmux pane17```1819### Inbound (External → OpenCode)20```21Discord/Telegram API → reply-listener daemon (separate Bun process)22 → reply-listener-{discord,telegram}.ts: poll every 3s23 → session-registry.ts: look up target tmux session from message ID24 → reply-listener-injection.ts: send-keys into tmux pane (rate limited)25```2627## KEY FILES2829| File | Purpose |30|------|---------|31| `index.ts` | `wakeOpenClaw()`, `initializeOpenClaw()` — main entry |32| `types.ts` | `OpenClawConfig`, `OpenClawPayload`, `WakeResult` types |33| `config.ts` | Gateway resolution + URL validation (HTTPS required, localhost exception) |34| `dispatcher.ts` | HTTP POST + shell command execution with variable interpolation |35| `runtime-dispatch.ts` | Maps OpenCode events → OpenClaw events, orchestrates dispatch |36| `session-registry.ts` | JSONL registry correlating message IDs ↔ sessions ↔ panes (file-locked) |37| `reply-listener.ts` | Daemon lifecycle: start/stop, poll loop, state persistence |38| `reply-listener-discord.ts` | Discord API polling |39| `reply-listener-telegram.ts` | Telegram API polling |40| `reply-listener-injection.ts` | Inject received reply into tmux pane (rate limiting + user filtering) |41| `reply-listener-state.ts` | Daemon state: PID, config signature, poll tracking |42| `daemon.ts` | Daemon entry point (runs as detached Bun process) |43| `tmux.ts` | `capturePane()`, `sendToPane()` utilities |4445## GATEWAY TYPES4647| Type | Config | Execution |48|------|--------|-----------|49| **HTTP webhook** | `url` field | POST with JSON payload |50| **Shell command** | `command` field | Execute with env vars (OPENCLAW_*) |5152## PAYLOAD VARIABLES (interpolation)5354`{sessionId}`, `{projectPath}`, `{tmuxSession}`, `{timestamp}`, `{eventType}` (session.created/deleted/idle), `{messageContent}`, `{promptSummary}`5556## INTEGRATION POINTS5758- `src/index.ts` — calls `initializeOpenClaw(pluginConfig.openclaw)` at plugin startup (if `enabled`)59- `src/plugin/event.ts` — calls `dispatchOpenClawEvent()` for session.created/deleted/idle60- `src/config/schema/openclaw.ts` — Zod config schema6162## DAEMON LIFECYCLE6364```65initializeOpenClaw(config)66 → wakeOpenClaw() if reply_listener.enabled67 → spawn daemon.ts as detached process68 → daemon writes PID to .opencode/openclaw.state.json69 → daemon polls Discord/Telegram every 3s70 → on reply: lookup in session-registry → inject into tmux via send-keys71```7273## SECURITY7475- **URL validation**: HTTPS required except localhost (config.ts)76- **Authorized users**: Inbound replies filtered by allowed user ID list77- **Token redaction**: Secrets masked in logs and error messages78- **Rate limiting**: Reply injection throttled per pane79
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/look-at/AGENTS.md · 68k | AGENTS.md | arch | 68/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 68k | AGENTS.md | buildteststylearch | 88/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | today | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/ultrawork/AGENTS.md · 68k | AGENTS.md | buildteststylearch+1 | 77/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 68k | AGENTS.md | arch | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/agents/sisyphus/AGENTS.md · 68k | AGENTS.md | arch | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/ralph-loop/AGENTS.md · 68k | AGENTS.md | arch | 62/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/rules-injector/AGENTS.md · 68k | AGENTS.md | archdo-not | 69/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/runtime-fallback/AGENTS.md · 68k | AGENTS.md | stylearchtypes | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 68k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 68k | AGENTS.md | stylearchdo-not | 71/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | today | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/ast-grep-mcp/AGENTS.md · 68k | AGENTS.md | buildstylearchdependencies+1 | 78/100 | 7 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 68k | AGENTS.md | archapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 68k | AGENTS.md | archagent-behaviour | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 68k | AGENTS.md | stylearchdependenciesapi | 60/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 68k | AGENTS.md | archtypesdependenciesapi | 48/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/code-yeongyu-oh-my-openagent-packages-omo-opencode-src-openclaw-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.