Loading...
Loading...
Configure OMX notifications - unified entry point for all platforms
npx skill4agent add yeachan-heo/oh-my-codex configure-notificationscustom_webhook_commandcustom_cli_commandStandalone configure skills (,configure-discord,configure-telegram,configure-slack) are removed.configure-openclaw
CONFIG_FILE="$HOME/.codex/.omx-config.json"
if [ -f "$CONFIG_FILE" ]; then
jq -r '
{
notifications_enabled: (.notifications.enabled // false),
discord: (.notifications.discord.enabled // false),
discord_bot: (.notifications["discord-bot"].enabled // false),
telegram: (.notifications.telegram.enabled // false),
slack: (.notifications.slack.enabled // false),
openclaw: (.notifications.openclaw.enabled // false),
custom_webhook_command: (.notifications.custom_webhook_command.enabled // false),
custom_cli_command: (.notifications.custom_cli_command.enabled // false),
verbosity: (.notifications.verbosity // "session"),
idleCooldownSeconds: (.notifications.idleCooldownSeconds // 60),
reply_enabled: (.notifications.reply.enabled // false)
}
' "$CONFIG_FILE"
else
echo "NO_CONFIG_FILE"
ficustom_webhook_commandcustom_cli_commandnotifications.enabled = falsenotifications.discordnotifications["discord-bot"]notifications.telegramnotifications.slackcustom_webhook_commandPOSTPUTsession-endask-user-questionsession-startsession-idlestopjq \
--arg url "$URL" \
--arg method "${METHOD:-POST}" \
--arg instruction "${INSTRUCTION:-OMX event {{event}} for {{projectPath}}}" \
'.notifications = (.notifications // {enabled: true}) |
.notifications.enabled = true |
.notifications.custom_webhook_command = {
enabled: true,
url: $url,
method: $method,
instruction: $instruction,
events: ["session-end", "ask-user-question"]
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"custom_cli_command{{event}}{{instruction}}{{sessionId}}{{projectPath}}jq \
--arg command "$COMMAND_TEMPLATE" \
--arg instruction "${INSTRUCTION:-OMX event {{event}} for {{projectPath}}}" \
'.notifications = (.notifications // {enabled: true}) |
.notifications.enabled = true |
.notifications.custom_cli_command = {
enabled: true,
command: $command,
instruction: $instruction,
events: ["session-end", "ask-user-question"]
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"Activation gate: OpenClaw-backed dispatch is active only when. For command gateways, also requireOMX_OPENCLAW=1. Optional timeout env override:OMX_OPENCLAW_COMMAND=1(ms).OMX_OPENCLAW_COMMAND_TIMEOUT_MS
clawdbot agentsession-stopstop{{instruction}}instructiongateways.<name>.timeoutOMX_OPENCLAW_COMMAND_TIMEOUT_MS5000gateways.<name>.timeout120000session={{sessionId}}tmux={{tmuxSession}}SOUL.md#omc-dev|| true.jsonl>>--reply-to 'channel:CHANNEL_ID'#omc-devjq \
--arg command "(clawdbot agent --session-id omx-hooks --message {{instruction}} --thinking minimal --deliver --reply-channel discord --reply-to 'channel:1468539002985644084' --timeout 120 --json >>/tmp/omx-openclaw-agent.jsonl 2>&1 || true)" \
'.notifications = (.notifications // {enabled: true}) |
.notifications.enabled = true |
.notifications.verbosity = "verbose" |
.notifications.events = (.notifications.events // {}) |
.notifications.events["session-start"] = {enabled: true} |
.notifications.events["session-idle"] = {enabled: true} |
.notifications.events["ask-user-question"] = {enabled: true} |
.notifications.events["session-stop"] = {enabled: true} |
.notifications.events["session-end"] = {enabled: true} |
.notifications.openclaw = (.notifications.openclaw // {}) |
.notifications.openclaw.enabled = true |
.notifications.openclaw.gateways = (.notifications.openclaw.gateways // {}) |
.notifications.openclaw.gateways["local"] = {
type: "command",
command: $command,
timeout: 120000
} |
.notifications.openclaw.hooks = (.notifications.openclaw.hooks // {}) |
.notifications.openclaw.hooks["session-start"] = {
enabled: true,
gateway: "local",
instruction: "OMX hook=session-start project={{projectName}} session={{sessionId}} tmux={{tmuxSession}}. 한국어로 상태를 공유하고 SOUL.md를 참고해 필요한 후속 조치를 #omc-dev에 안내하세요."
} |
.notifications.openclaw.hooks["session-idle"] = {
enabled: true,
gateway: "local",
instruction: "OMX hook=session-idle project={{projectName}} session={{sessionId}} tmux={{tmuxSession}}. 한국어로 idle 상황을 간단히 공유하고 진행중인 작업 팔로업을 안내하세요."
} |
.notifications.openclaw.hooks["ask-user-question"] = {
enabled: true,
gateway: "local",
instruction: "OMX hook=ask-user-question session={{sessionId}} tmux={{tmuxSession}} question={{question}}. 한국어로 사용자 응답 필요를 #omc-dev에 알리고 즉시 액션 아이템을 제시하세요."
} |
.notifications.openclaw.hooks["stop"] = {
enabled: true,
gateway: "local",
instruction: "OMX hook=session-stop project={{projectName}} session={{sessionId}} tmux={{tmuxSession}}. 한국어로 중단 상태와 정리 액션을 SOUL.md 기준으로 전달하세요."
} |
.notifications.openclaw.hooks["session-end"] = {
enabled: true,
gateway: "local",
instruction: "OMX hook=session-end project={{projectName}} session={{sessionId}} tmux={{tmuxSession}} reason={{reason}}. 한국어로 완료 요약을 1줄로 남기고 필요한 후속 조치를 안내하세요."
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"clawdbot agent --session-id omx-hooks --message "OMX hook test via clawdbot agent path" \
--thinking minimal --deliver --reply-channel discord --reply-to 'channel:1468539002985644084' --timeout 120 --json# 1) identify active OMX tmux sessions
tmux list-sessions -F '#{session_name}' | rg '^omx-' || true
# 2) confirm hook templates include session/tmux context
jq '.notifications.openclaw.hooks' "$CONFIG_FILE"
# 3) inspect agent JSONL logs when delivery looks broken
tail -n 120 /tmp/omx-openclaw-agent.jsonl | jq -s '.[] | {timestamp: (.timestamp // .time), status: (.status // .error // "ok")}'
# 4) check for recent errors in logs
rg '"error"|"failed"|"timeout"' /tmp/omx-openclaw-agent.jsonl | tail -20notifications.openclawcustom_webhook_commandcustom_cli_commandnotifications.openclawnotifications.idleCooldownSecondsnotifications.profilesnotifications.defaultProfilenotifications.reply.enabledOMX_REPLY_ENABLED=trueOMX_REPLY_DISCORD_USER_IDS=...jq '.notifications.enabled = false' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"npm run build/hooks/wake/hooks/agentcustom_webhook_commandcustom_cli_commandnotifications.openclaw~/.codex/.omx-config.json