oh-my-codex 0.7.6 → 0.8.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.
- package/README.de.md +315 -0
- package/README.es.md +296 -17
- package/README.fr.md +315 -0
- package/README.it.md +315 -0
- package/README.ja.md +297 -18
- package/README.ko.md +296 -17
- package/README.md +110 -13
- package/README.pt.md +296 -17
- package/README.ru.md +296 -17
- package/README.tr.md +315 -0
- package/README.vi.md +297 -18
- package/README.zh-TW.md +362 -0
- package/README.zh.md +293 -17
- package/dist/catalog/__tests__/generator.test.js +2 -0
- package/dist/catalog/__tests__/generator.test.js.map +1 -1
- package/dist/catalog/__tests__/schema.test.js +7 -0
- package/dist/catalog/__tests__/schema.test.js.map +1 -1
- package/dist/cli/__tests__/ask.test.d.ts +2 -0
- package/dist/cli/__tests__/ask.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ask.test.js +236 -0
- package/dist/cli/__tests__/ask.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js +45 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -0
- package/dist/cli/__tests__/index.test.js +85 -2
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js +15 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js.map +1 -0
- package/dist/cli/__tests__/ralph.test.js +19 -43
- package/dist/cli/__tests__/ralph.test.js.map +1 -1
- package/dist/cli/__tests__/setup-scope.test.js +2 -0
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +219 -1
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/version.test.d.ts +2 -0
- package/dist/cli/__tests__/version.test.d.ts.map +1 -0
- package/dist/cli/__tests__/version.test.js +21 -0
- package/dist/cli/__tests__/version.test.js.map +1 -0
- package/dist/cli/ask.d.ts +13 -0
- package/dist/cli/ask.d.ts.map +1 -0
- package/dist/cli/ask.js +174 -0
- package/dist/cli/ask.js.map +1 -0
- package/dist/cli/constants.d.ts +10 -0
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +10 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/doctor.js +16 -5
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +8 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +150 -52
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/ralph.d.ts +3 -11
- package/dist/cli/ralph.d.ts.map +1 -1
- package/dist/cli/ralph.js +64 -45
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +17 -18
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +257 -0
- package/dist/cli/team.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js +55 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/emulator.test.js +6 -0
- package/dist/hooks/__tests__/emulator.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +44 -22
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +23 -7
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js +59 -0
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +264 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +61 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +17 -7
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/openclaw-setup-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js +61 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.d.ts +2 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +34 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.d.ts +2 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.js +35 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.js.map +1 -0
- package/dist/hooks/agents-overlay.d.ts.map +1 -1
- package/dist/hooks/agents-overlay.js +18 -16
- package/dist/hooks/agents-overlay.js.map +1 -1
- package/dist/hooks/codebase-map.d.ts.map +1 -1
- package/dist/hooks/codebase-map.js +6 -2
- package/dist/hooks/codebase-map.js.map +1 -1
- package/dist/hooks/emulator.d.ts.map +1 -1
- package/dist/hooks/emulator.js +2 -0
- package/dist/hooks/emulator.js.map +1 -1
- package/dist/hooks/extensibility/sdk.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk.js +2 -1
- package/dist/hooks/extensibility/sdk.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +6 -0
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +2 -24
- package/dist/hud/index.js.map +1 -1
- package/dist/mcp/__tests__/path-traversal.test.js +9 -227
- package/dist/mcp/__tests__/path-traversal.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server-schema.test.js +16 -20
- package/dist/mcp/__tests__/state-server-schema.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server-team-tools.test.js +30 -487
- package/dist/mcp/__tests__/state-server-team-tools.test.js.map +1 -1
- package/dist/mcp/code-intel-server.d.ts.map +1 -1
- package/dist/mcp/code-intel-server.js +18 -8
- package/dist/mcp/code-intel-server.js.map +1 -1
- package/dist/mcp/memory-server.js +72 -11
- package/dist/mcp/memory-server.js.map +1 -1
- package/dist/mcp/state-paths.d.ts.map +1 -1
- package/dist/mcp/state-paths.js +4 -1
- package/dist/mcp/state-paths.js.map +1 -1
- package/dist/mcp/state-server.d.ts +179 -0
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +221 -1111
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/mcp/team-server.d.ts.map +1 -1
- package/dist/mcp/team-server.js +9 -3
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/mcp/trace-server.d.ts.map +1 -1
- package/dist/mcp/trace-server.js +8 -3
- package/dist/mcp/trace-server.js.map +1 -1
- package/dist/notifications/__tests__/dispatch-cooldown.test.d.ts +5 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.js +100 -0
- package/dist/notifications/__tests__/dispatch-cooldown.test.js.map +1 -0
- package/dist/notifications/__tests__/temp-mode.test.d.ts +2 -0
- package/dist/notifications/__tests__/temp-mode.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/temp-mode.test.js +172 -0
- package/dist/notifications/__tests__/temp-mode.test.js.map +1 -0
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +67 -7
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/dispatch-cooldown.d.ts +36 -0
- package/dist/notifications/dispatch-cooldown.d.ts.map +1 -0
- package/dist/notifications/dispatch-cooldown.js +109 -0
- package/dist/notifications/dispatch-cooldown.js.map +1 -0
- package/dist/notifications/dispatcher.d.ts.map +1 -1
- package/dist/notifications/dispatcher.js +4 -4
- package/dist/notifications/dispatcher.js.map +1 -1
- package/dist/notifications/index.d.ts +5 -0
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +39 -8
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +6 -2
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/session-registry.d.ts.map +1 -1
- package/dist/notifications/session-registry.js +2 -2
- package/dist/notifications/session-registry.js.map +1 -1
- package/dist/notifications/temp-contract.d.ts +22 -0
- package/dist/notifications/temp-contract.d.ts.map +1 -0
- package/dist/notifications/temp-contract.js +147 -0
- package/dist/notifications/temp-contract.js.map +1 -0
- package/dist/notifications/tmux.js +2 -2
- package/dist/notifications/tmux.js.map +1 -1
- package/dist/notifications/types.d.ts +18 -0
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/openclaw/__tests__/config.test.js +81 -0
- package/dist/openclaw/__tests__/config.test.js.map +1 -1
- package/dist/openclaw/__tests__/dispatcher.test.js +40 -1
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
- package/dist/openclaw/config.d.ts +4 -0
- package/dist/openclaw/config.d.ts.map +1 -1
- package/dist/openclaw/config.js +110 -16
- package/dist/openclaw/config.js.map +1 -1
- package/dist/openclaw/dispatcher.d.ts +9 -3
- package/dist/openclaw/dispatcher.d.ts.map +1 -1
- package/dist/openclaw/dispatcher.js +42 -9
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/openclaw/types.d.ts +5 -1
- package/dist/openclaw/types.d.ts.map +1 -1
- package/dist/ralph/__tests__/persistence.test.js +28 -1
- package/dist/ralph/__tests__/persistence.test.js.map +1 -1
- package/dist/ralph/persistence.d.ts +21 -0
- package/dist/ralph/persistence.d.ts.map +1 -1
- package/dist/ralph/persistence.js +85 -2
- package/dist/ralph/persistence.js.map +1 -1
- package/dist/state/paths.d.ts +3 -0
- package/dist/state/paths.d.ts.map +1 -0
- package/dist/state/paths.js +2 -0
- package/dist/state/paths.js.map +1 -0
- package/dist/team/__tests__/api-interop.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.test.js +1052 -0
- package/dist/team/__tests__/api-interop.test.js.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts +2 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.js +225 -0
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -0
- package/dist/team/__tests__/mcp-comm.test.js +30 -0
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +33 -26
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.d.ts +2 -0
- package/dist/team/__tests__/state-root.test.d.ts.map +1 -0
- package/dist/team/__tests__/state-root.test.js +9 -0
- package/dist/team/__tests__/state-root.test.js.map +1 -0
- package/dist/team/__tests__/state.test.js +52 -17
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/team-ops-contract.test.d.ts +2 -0
- package/dist/team/__tests__/team-ops-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/team-ops-contract.test.js +90 -0
- package/dist/team/__tests__/team-ops-contract.test.js.map +1 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.js +176 -0
- package/dist/team/__tests__/tmux-claude-workers-demo.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +8 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +29 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/__tests__/worktree.test.js +54 -1
- package/dist/team/__tests__/worktree.test.js.map +1 -1
- package/dist/team/api-interop.d.ts +19 -0
- package/dist/team/api-interop.d.ts.map +1 -0
- package/dist/team/api-interop.js +578 -0
- package/dist/team/api-interop.js.map +1 -0
- package/dist/team/mcp-comm.d.ts.map +1 -1
- package/dist/team/mcp-comm.js +32 -2
- package/dist/team/mcp-comm.js.map +1 -1
- package/dist/team/orchestrator.d.ts +1 -10
- package/dist/team/orchestrator.d.ts.map +1 -1
- package/dist/team/orchestrator.js +8 -0
- package/dist/team/orchestrator.js.map +1 -1
- package/dist/team/runtime-cli.js +14 -8
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime.d.ts +2 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +103 -30
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +33 -12
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/approvals.d.ts +25 -0
- package/dist/team/state/approvals.d.ts.map +1 -0
- package/dist/team/state/approvals.js +31 -0
- package/dist/team/state/approvals.js.map +1 -0
- package/dist/team/state/config.d.ts +2 -0
- package/dist/team/state/config.d.ts.map +1 -0
- package/dist/team/state/config.js +2 -0
- package/dist/team/state/config.js.map +1 -0
- package/dist/team/state/dispatch-lock.d.ts +3 -0
- package/dist/team/state/dispatch-lock.d.ts.map +1 -0
- package/dist/team/state/dispatch-lock.js +81 -0
- package/dist/team/state/dispatch-lock.js.map +1 -0
- package/dist/team/state/dispatch.d.ts +61 -0
- package/dist/team/state/dispatch.d.ts.map +1 -0
- package/dist/team/state/dispatch.js +158 -0
- package/dist/team/state/dispatch.js.map +1 -0
- package/dist/team/state/events.d.ts +2 -0
- package/dist/team/state/events.d.ts.map +1 -0
- package/dist/team/state/events.js +2 -0
- package/dist/team/state/events.js.map +1 -0
- package/dist/team/state/index.d.ts +11 -0
- package/dist/team/state/index.d.ts.map +1 -0
- package/dist/team/state/index.js +11 -0
- package/dist/team/state/index.js.map +1 -0
- package/dist/team/state/io.d.ts +2 -0
- package/dist/team/state/io.d.ts.map +1 -0
- package/dist/team/state/io.js +2 -0
- package/dist/team/state/io.js.map +1 -0
- package/dist/team/state/locks.d.ts +16 -0
- package/dist/team/state/locks.d.ts.map +1 -0
- package/dist/team/state/locks.js +201 -0
- package/dist/team/state/locks.js.map +1 -0
- package/dist/team/state/mailbox.d.ts +39 -0
- package/dist/team/state/mailbox.d.ts.map +1 -0
- package/dist/team/state/mailbox.js +58 -0
- package/dist/team/state/mailbox.js.map +1 -0
- package/dist/team/state/monitor.d.ts +96 -0
- package/dist/team/state/monitor.d.ts.map +1 -0
- package/dist/team/state/monitor.js +163 -0
- package/dist/team/state/monitor.js.map +1 -0
- package/dist/team/state/shutdown.d.ts +2 -0
- package/dist/team/state/shutdown.d.ts.map +1 -0
- package/dist/team/state/shutdown.js +2 -0
- package/dist/team/state/shutdown.js.map +1 -0
- package/dist/team/state/summary.d.ts +2 -0
- package/dist/team/state/summary.d.ts.map +1 -0
- package/dist/team/state/summary.js +2 -0
- package/dist/team/state/summary.js.map +1 -0
- package/dist/team/state/tasks.d.ts +49 -0
- package/dist/team/state/tasks.d.ts.map +1 -0
- package/dist/team/state/tasks.js +182 -0
- package/dist/team/state/tasks.js.map +1 -0
- package/dist/team/state/types.d.ts +281 -0
- package/dist/team/state/types.d.ts.map +1 -0
- package/dist/team/state/types.js +3 -0
- package/dist/team/state/types.js.map +1 -0
- package/dist/team/state/workers.d.ts +2 -0
- package/dist/team/state/workers.d.ts.map +1 -0
- package/dist/team/state/workers.js +2 -0
- package/dist/team/state/workers.js.map +1 -0
- package/dist/team/state-root.d.ts +5 -0
- package/dist/team/state-root.d.ts.map +1 -0
- package/dist/team/state-root.js +8 -0
- package/dist/team/state-root.js.map +1 -0
- package/dist/team/state.d.ts +4 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +200 -881
- package/dist/team/state.js.map +1 -1
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +11 -10
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +58 -26
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/team/worktree.d.ts.map +1 -1
- package/dist/team/worktree.js +43 -1
- package/dist/team/worktree.js.map +1 -1
- package/dist/utils/safe-json.d.ts +3 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/safe-json.js +19 -0
- package/dist/utils/safe-json.js.map +1 -0
- package/dist/utils/sleep.d.ts +3 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +15 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/visual/__tests__/verdict.test.d.ts +2 -0
- package/dist/visual/__tests__/verdict.test.d.ts.map +1 -0
- package/dist/visual/__tests__/verdict.test.js +81 -0
- package/dist/visual/__tests__/verdict.test.js.map +1 -0
- package/dist/visual/constants.d.ts +4 -0
- package/dist/visual/constants.d.ts.map +1 -0
- package/dist/visual/constants.js +3 -0
- package/dist/visual/constants.js.map +1 -0
- package/dist/visual/verdict.d.ts +17 -0
- package/dist/visual/verdict.d.ts.map +1 -0
- package/dist/visual/verdict.js +61 -0
- package/dist/visual/verdict.js.map +1 -0
- package/package.json +10 -3
- package/scripts/ask-claude.sh +17 -0
- package/scripts/ask-gemini.sh +14 -0
- package/scripts/demo-claude-workers.sh +241 -0
- package/scripts/demo-team-e2e.sh +179 -0
- package/scripts/fixtures/ask-advisor-stub.js +12 -0
- package/scripts/notify-hook/team-dispatch.js +234 -12
- package/scripts/notify-hook/team-leader-nudge.js +42 -2
- package/scripts/notify-hook/team-worker.js +63 -4
- package/scripts/notify-hook/visual-verdict.js +50 -1
- package/scripts/notify-hook.js +1 -0
- package/scripts/run-provider-advisor.js +179 -0
- package/skills/ask-claude/SKILL.md +61 -0
- package/skills/ask-gemini/SKILL.md +61 -0
- package/skills/autopilot/SKILL.md +32 -2
- package/skills/configure-notifications/SKILL.md +188 -186
- package/skills/deep-interview/SKILL.md +247 -0
- package/skills/omx-setup/SKILL.md +1 -1
- package/skills/ralph/SKILL.md +42 -11
- package/skills/ralplan/SKILL.md +17 -0
- package/skills/team/SKILL.md +64 -5
- package/skills/visual-verdict/SKILL.md +76 -0
- package/skills/web-clone/SKILL.md +366 -0
- package/skills/worker/SKILL.md +42 -11
- package/templates/AGENTS.md +9 -0
- package/templates/catalog-manifest.json +39 -18
- package/skills/configure-discord/SKILL.md +0 -256
- package/skills/configure-openclaw/SKILL.md +0 -267
- package/skills/configure-slack/SKILL.md +0 -226
- package/skills/configure-telegram/SKILL.md +0 -232
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: configure-discord
|
|
3
|
-
description: Configure Discord webhook/bot notifications via natural language
|
|
4
|
-
triggers:
|
|
5
|
-
- "configure discord"
|
|
6
|
-
- "setup discord"
|
|
7
|
-
- "discord notifications"
|
|
8
|
-
- "discord webhook"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Configure Discord Notifications
|
|
12
|
-
|
|
13
|
-
Set up Discord notifications so OMX can ping you when sessions end, need input, or complete background tasks.
|
|
14
|
-
|
|
15
|
-
## How This Skill Works
|
|
16
|
-
|
|
17
|
-
This is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `~/.codex/.omx-config.json`.
|
|
18
|
-
|
|
19
|
-
## Step 1: Detect Existing Configuration
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
CONFIG_FILE="$HOME/.codex/.omx-config.json"
|
|
23
|
-
|
|
24
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
25
|
-
# Check for existing discord config
|
|
26
|
-
HAS_DISCORD=$(jq -r '.notifications.discord.enabled // false' "$CONFIG_FILE" 2>/dev/null)
|
|
27
|
-
HAS_DISCORD_BOT=$(jq -r '.notifications["discord-bot"].enabled // false' "$CONFIG_FILE" 2>/dev/null)
|
|
28
|
-
WEBHOOK_URL=$(jq -r '.notifications.discord.webhookUrl // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
29
|
-
MENTION=$(jq -r '.notifications.discord.mention // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
30
|
-
|
|
31
|
-
if [ "$HAS_DISCORD" = "true" ] || [ "$HAS_DISCORD_BOT" = "true" ]; then
|
|
32
|
-
echo "EXISTING_CONFIG=true"
|
|
33
|
-
echo "WEBHOOK_CONFIGURED=$HAS_DISCORD"
|
|
34
|
-
echo "BOT_CONFIGURED=$HAS_DISCORD_BOT"
|
|
35
|
-
[ -n "$WEBHOOK_URL" ] && echo "WEBHOOK_URL=$WEBHOOK_URL"
|
|
36
|
-
[ -n "$MENTION" ] && echo "MENTION=$MENTION"
|
|
37
|
-
else
|
|
38
|
-
echo "EXISTING_CONFIG=false"
|
|
39
|
-
fi
|
|
40
|
-
else
|
|
41
|
-
echo "NO_CONFIG_FILE"
|
|
42
|
-
fi
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
If existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.
|
|
46
|
-
|
|
47
|
-
## Step 2: Choose Discord Method
|
|
48
|
-
|
|
49
|
-
Use AskUserQuestion:
|
|
50
|
-
|
|
51
|
-
**Question:** "How would you like to send Discord notifications?"
|
|
52
|
-
|
|
53
|
-
**Options:**
|
|
54
|
-
1. **Webhook (Recommended)** - Create a webhook in your Discord channel. Simple, no bot needed. Just paste the URL.
|
|
55
|
-
2. **Bot API** - Use a Discord bot token + channel ID. More flexible, requires a bot application.
|
|
56
|
-
|
|
57
|
-
## Step 3A: Webhook Setup
|
|
58
|
-
|
|
59
|
-
If user chose Webhook:
|
|
60
|
-
|
|
61
|
-
Use AskUserQuestion:
|
|
62
|
-
|
|
63
|
-
**Question:** "Paste your Discord webhook URL. To create one: Server Settings > Integrations > Webhooks > New Webhook > Copy URL"
|
|
64
|
-
|
|
65
|
-
The user will type their webhook URL in the "Other" field.
|
|
66
|
-
|
|
67
|
-
**Validate** the URL:
|
|
68
|
-
- Must start with `https://discord.com/api/webhooks/` or `https://discordapp.com/api/webhooks/`
|
|
69
|
-
- If invalid, explain the format and ask again
|
|
70
|
-
|
|
71
|
-
## Step 3B: Bot API Setup
|
|
72
|
-
|
|
73
|
-
If user chose Bot API:
|
|
74
|
-
|
|
75
|
-
Ask two questions:
|
|
76
|
-
|
|
77
|
-
1. **"Paste your Discord bot token"** - From discord.com/developers > Your App > Bot > Token
|
|
78
|
-
2. **"Paste the channel ID"** - Right-click channel > Copy Channel ID (requires Developer Mode)
|
|
79
|
-
|
|
80
|
-
## Step 4: Configure Mention (User Ping)
|
|
81
|
-
|
|
82
|
-
Use AskUserQuestion:
|
|
83
|
-
|
|
84
|
-
**Question:** "Would you like notifications to mention (ping) someone?"
|
|
85
|
-
|
|
86
|
-
**Options:**
|
|
87
|
-
1. **Yes, mention a user** - Tag a specific user by their Discord user ID
|
|
88
|
-
2. **Yes, mention a role** - Tag a role by its role ID
|
|
89
|
-
3. **No mentions** - Just post the message without pinging anyone
|
|
90
|
-
|
|
91
|
-
### If user wants to mention a user:
|
|
92
|
-
|
|
93
|
-
Ask: "What is the Discord user ID to mention? (Right-click user > Copy User ID, requires Developer Mode)"
|
|
94
|
-
|
|
95
|
-
The mention format is: `<@USER_ID>` (e.g., `<@1465264645320474637>`)
|
|
96
|
-
|
|
97
|
-
### If user wants to mention a role:
|
|
98
|
-
|
|
99
|
-
Ask: "What is the Discord role ID to mention? (Server Settings > Roles > right-click role > Copy Role ID)"
|
|
100
|
-
|
|
101
|
-
The mention format is: `<@&ROLE_ID>` (e.g., `<@&123456789>`)
|
|
102
|
-
|
|
103
|
-
## Step 5: Configure Events
|
|
104
|
-
|
|
105
|
-
Use AskUserQuestion with multiSelect:
|
|
106
|
-
|
|
107
|
-
**Question:** "Which events should trigger Discord notifications?"
|
|
108
|
-
|
|
109
|
-
**Options (multiSelect: true):**
|
|
110
|
-
1. **Session end (Recommended)** - When a Codex session finishes
|
|
111
|
-
2. **Input needed** - When Codex is waiting for your response (great for long-running tasks)
|
|
112
|
-
3. **Session start** - When a new session begins
|
|
113
|
-
4. **Session continuing** - When a persistent mode keeps the session alive
|
|
114
|
-
|
|
115
|
-
Default selection: session-end + ask-user-question.
|
|
116
|
-
|
|
117
|
-
## Step 6: Optional Username Override
|
|
118
|
-
|
|
119
|
-
Use AskUserQuestion:
|
|
120
|
-
|
|
121
|
-
**Question:** "Custom bot display name? (Shows as the webhook sender name in Discord)"
|
|
122
|
-
|
|
123
|
-
**Options:**
|
|
124
|
-
1. **OMX (default)** - Display as "OMX"
|
|
125
|
-
2. **Codex CLI** - Display as "Codex CLI"
|
|
126
|
-
3. **Custom** - Enter a custom name
|
|
127
|
-
|
|
128
|
-
## Step 7: Write Configuration
|
|
129
|
-
|
|
130
|
-
Read the existing config, merge the new Discord settings, and write back:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
CONFIG_FILE="$HOME/.codex/.omx-config.json"
|
|
134
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
135
|
-
|
|
136
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
137
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
138
|
-
else
|
|
139
|
-
EXISTING='{}'
|
|
140
|
-
fi
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### For Webhook method:
|
|
144
|
-
|
|
145
|
-
Build the notifications object with the collected values and merge into `.omx-config.json` using jq:
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
# WEBHOOK_URL, MENTION, USERNAME are collected from user
|
|
149
|
-
# EVENTS is the list of enabled events
|
|
150
|
-
|
|
151
|
-
echo "$EXISTING" | jq \
|
|
152
|
-
--arg url "$WEBHOOK_URL" \
|
|
153
|
-
--arg mention "$MENTION" \
|
|
154
|
-
--arg username "$USERNAME" \
|
|
155
|
-
'.notifications = (.notifications // {enabled: true}) |
|
|
156
|
-
.notifications.enabled = true |
|
|
157
|
-
.notifications.discord = {
|
|
158
|
-
enabled: true,
|
|
159
|
-
webhookUrl: $url,
|
|
160
|
-
mention: (if $mention == "" then null else $mention end),
|
|
161
|
-
username: (if $username == "" then null else $username end)
|
|
162
|
-
}' > "$CONFIG_FILE"
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### For Bot API method:
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
echo "$EXISTING" | jq \
|
|
169
|
-
--arg token "$BOT_TOKEN" \
|
|
170
|
-
--arg channel "$CHANNEL_ID" \
|
|
171
|
-
--arg mention "$MENTION" \
|
|
172
|
-
'.notifications = (.notifications // {enabled: true}) |
|
|
173
|
-
.notifications.enabled = true |
|
|
174
|
-
.notifications["discord-bot"] = {
|
|
175
|
-
enabled: true,
|
|
176
|
-
botToken: $token,
|
|
177
|
-
channelId: $channel,
|
|
178
|
-
mention: (if $mention == "" then null else $mention end)
|
|
179
|
-
}' > "$CONFIG_FILE"
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Add event-specific config if user didn't select all events:
|
|
183
|
-
|
|
184
|
-
For each event NOT selected, disable it:
|
|
185
|
-
|
|
186
|
-
```bash
|
|
187
|
-
# Example: disable session-start if not selected
|
|
188
|
-
echo "$(cat "$CONFIG_FILE")" | jq \
|
|
189
|
-
'.notifications.events = (.notifications.events // {}) |
|
|
190
|
-
.notifications.events["session-start"] = {enabled: false}' > "$CONFIG_FILE"
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## Step 8: Test the Configuration
|
|
194
|
-
|
|
195
|
-
After writing config, offer to send a test notification:
|
|
196
|
-
|
|
197
|
-
Use AskUserQuestion:
|
|
198
|
-
|
|
199
|
-
**Question:** "Send a test notification to verify the setup?"
|
|
200
|
-
|
|
201
|
-
**Options:**
|
|
202
|
-
1. **Yes, test now (Recommended)** - Send a test message to your Discord channel
|
|
203
|
-
2. **No, I'll test later** - Skip testing
|
|
204
|
-
|
|
205
|
-
### If testing:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
# For webhook:
|
|
209
|
-
curl -s -o /dev/null -w "%{http_code}" \
|
|
210
|
-
-H "Content-Type: application/json" \
|
|
211
|
-
-d "{\"content\": \"${MENTION:+$MENTION\\n}OMX test notification - Discord is configured!\"}" \
|
|
212
|
-
"$WEBHOOK_URL"
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Report success or failure. If it fails, help the user debug (check URL, permissions, etc.).
|
|
216
|
-
|
|
217
|
-
## Step 9: Confirm
|
|
218
|
-
|
|
219
|
-
Display the final configuration summary:
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
Discord Notifications Configured!
|
|
223
|
-
|
|
224
|
-
Method: Webhook / Bot API
|
|
225
|
-
Mention: <@1465264645320474637> (or "none")
|
|
226
|
-
Events: session-end, ask-user-question
|
|
227
|
-
Username: OMX
|
|
228
|
-
|
|
229
|
-
Config saved to: ~/.codex/.omx-config.json
|
|
230
|
-
|
|
231
|
-
You can also set these via environment variables:
|
|
232
|
-
OMX_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
|
|
233
|
-
OMX_DISCORD_MENTION=<@1465264645320474637>
|
|
234
|
-
|
|
235
|
-
To reconfigure: /configure-discord
|
|
236
|
-
To configure Telegram: /configure-telegram
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## Environment Variable Alternative
|
|
240
|
-
|
|
241
|
-
Users can skip this wizard entirely by setting env vars in their shell profile:
|
|
242
|
-
|
|
243
|
-
**Webhook method:**
|
|
244
|
-
```bash
|
|
245
|
-
export OMX_DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
|
|
246
|
-
export OMX_DISCORD_MENTION="<@1465264645320474637>" # optional
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
**Bot API method:**
|
|
250
|
-
```bash
|
|
251
|
-
export OMX_DISCORD_NOTIFIER_BOT_TOKEN="your-bot-token"
|
|
252
|
-
export OMX_DISCORD_NOTIFIER_CHANNEL="your-channel-id"
|
|
253
|
-
export OMX_DISCORD_MENTION="<@1465264645320474637>" # optional
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Env vars are auto-detected by the notification system without needing `.omx-config.json`.
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: configure-openclaw
|
|
3
|
-
description: Configure OpenClaw notification gateway via natural language
|
|
4
|
-
triggers:
|
|
5
|
-
- "configure openclaw"
|
|
6
|
-
- "setup openclaw"
|
|
7
|
-
- "openclaw notifications"
|
|
8
|
-
- "openclaw gateway"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Configure OpenClaw Notifications
|
|
12
|
-
|
|
13
|
-
Set up OpenClaw as a notification gateway so OMX can route session events through your own HTTP endpoint or CLI command.
|
|
14
|
-
|
|
15
|
-
## What is OpenClaw?
|
|
16
|
-
|
|
17
|
-
OpenClaw is a self-hosted notification gateway that lets you receive OMX events however you want — HTTP webhooks to your own server, shell commands, or any integration you build. Unlike platform-specific notifiers (Discord, Slack), OpenClaw gives you full control over message routing and format.
|
|
18
|
-
|
|
19
|
-
**Two gateway modes:**
|
|
20
|
-
- **HTTP Gateway** — OMX POSTs JSON events to your HTTP endpoint
|
|
21
|
-
- **CLI Command Gateway** — OMX runs a shell command with event data as arguments or stdin
|
|
22
|
-
|
|
23
|
-
## How This Skill Works
|
|
24
|
-
|
|
25
|
-
This is an interactive, natural-language configuration skill. Walk the user through setup by asking questions with AskUserQuestion. Write the result to `~/.codex/.omx-config.json`.
|
|
26
|
-
|
|
27
|
-
## Step 1: Detect Existing Configuration
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
CONFIG_FILE="$HOME/.codex/.omx-config.json"
|
|
31
|
-
|
|
32
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
33
|
-
HAS_OPENCLAW=$(jq -r '.notifications.openclaw.enabled // false' "$CONFIG_FILE" 2>/dev/null)
|
|
34
|
-
GATEWAY_TYPE=$(jq -r '.notifications.openclaw.gatewayType // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
35
|
-
ENDPOINT=$(jq -r '.notifications.openclaw.endpoint // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
36
|
-
COMMAND=$(jq -r '.notifications.openclaw.command // empty' "$CONFIG_FILE" 2>/dev/null)
|
|
37
|
-
|
|
38
|
-
if [ "$HAS_OPENCLAW" = "true" ]; then
|
|
39
|
-
echo "EXISTING_CONFIG=true"
|
|
40
|
-
echo "GATEWAY_TYPE=$GATEWAY_TYPE"
|
|
41
|
-
[ -n "$ENDPOINT" ] && echo "ENDPOINT=$ENDPOINT"
|
|
42
|
-
[ -n "$COMMAND" ] && echo "COMMAND=$COMMAND"
|
|
43
|
-
else
|
|
44
|
-
echo "EXISTING_CONFIG=false"
|
|
45
|
-
fi
|
|
46
|
-
else
|
|
47
|
-
echo "NO_CONFIG_FILE"
|
|
48
|
-
fi
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
If existing config is found, show the user what's currently configured and ask if they want to update or reconfigure.
|
|
52
|
-
|
|
53
|
-
## Step 2: Choose Gateway Type
|
|
54
|
-
|
|
55
|
-
Use AskUserQuestion:
|
|
56
|
-
|
|
57
|
-
**Question:** "Which OpenClaw gateway mode do you want to use?"
|
|
58
|
-
|
|
59
|
-
**Options:**
|
|
60
|
-
1. **HTTP Gateway** - OMX sends a POST request with JSON to your endpoint. Good for web servers, n8n, Zapier webhooks, or any HTTP-capable service.
|
|
61
|
-
2. **CLI Command Gateway** - OMX runs a shell command you specify. Good for local scripts, custom notification tools, or anything shell-scriptable.
|
|
62
|
-
|
|
63
|
-
## Step 3A: HTTP Gateway Setup
|
|
64
|
-
|
|
65
|
-
If user chose HTTP:
|
|
66
|
-
|
|
67
|
-
Use AskUserQuestion:
|
|
68
|
-
|
|
69
|
-
**Question:** "Enter your OpenClaw HTTP endpoint URL. OMX will POST JSON event data to this URL."
|
|
70
|
-
|
|
71
|
-
The user types their URL in the "Other" field.
|
|
72
|
-
|
|
73
|
-
**Validate** the URL:
|
|
74
|
-
- Must start with `http://` or `https://`
|
|
75
|
-
- If invalid, explain the format and ask again
|
|
76
|
-
|
|
77
|
-
### Optional: Secret Header
|
|
78
|
-
|
|
79
|
-
Use AskUserQuestion:
|
|
80
|
-
|
|
81
|
-
**Question:** "Add an authorization header to secure requests? (Optional)"
|
|
82
|
-
|
|
83
|
-
**Options:**
|
|
84
|
-
1. **Yes, add Bearer token** - Sends `Authorization: Bearer <token>`
|
|
85
|
-
2. **Yes, add custom header** - Specify header name and value
|
|
86
|
-
3. **No auth header** - Open endpoint (use firewall rules or IP allowlist instead)
|
|
87
|
-
|
|
88
|
-
If they want a Bearer token or custom header, collect the values.
|
|
89
|
-
|
|
90
|
-
## Step 3B: CLI Command Gateway Setup
|
|
91
|
-
|
|
92
|
-
If user chose CLI Command:
|
|
93
|
-
|
|
94
|
-
Use AskUserQuestion:
|
|
95
|
-
|
|
96
|
-
**Question:** "Enter the shell command OMX should run for each notification event. Use these placeholders:
|
|
97
|
-
- `{event}` — event name (e.g. session-end)
|
|
98
|
-
- `{session_id}` — session identifier
|
|
99
|
-
- `{project}` — project name/path
|
|
100
|
-
- `{message}` — formatted notification message
|
|
101
|
-
|
|
102
|
-
Example: `notify-send 'OMX: {event}' '{message}'`
|
|
103
|
-
Example: `~/.local/bin/my-notifier --event {event} --msg '{message}'`"
|
|
104
|
-
|
|
105
|
-
The user types their command in the "Other" field.
|
|
106
|
-
|
|
107
|
-
**IMPORTANT: Dual activation gate for CLI Command gateways**
|
|
108
|
-
|
|
109
|
-
CLI command gateways require TWO environment variables to be set:
|
|
110
|
-
- `OMX_OPENCLAW=1` — enables the OpenClaw gateway
|
|
111
|
-
- `OMX_OPENCLAW_COMMAND=1` — specifically enables CLI command execution
|
|
112
|
-
|
|
113
|
-
This two-gate design prevents accidental command execution when only the config file is present. Remind the user to set both in their shell profile.
|
|
114
|
-
|
|
115
|
-
## Step 4: Map Events
|
|
116
|
-
|
|
117
|
-
Use AskUserQuestion with multiSelect:
|
|
118
|
-
|
|
119
|
-
**Question:** "Which events should be routed through OpenClaw?"
|
|
120
|
-
|
|
121
|
-
**Options (multiSelect: true):**
|
|
122
|
-
1. **Session end (Recommended)** - When a Codex session finishes
|
|
123
|
-
2. **Input needed** - When Codex is waiting for your response
|
|
124
|
-
3. **Session start** - When a new session begins
|
|
125
|
-
4. **Session continuing** - When a persistent mode keeps the session alive
|
|
126
|
-
|
|
127
|
-
Default selection: session-end + ask-user-question.
|
|
128
|
-
|
|
129
|
-
## Step 5: Write Configuration
|
|
130
|
-
|
|
131
|
-
Read the existing config, merge the OpenClaw settings, and write back:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
CONFIG_FILE="$HOME/.codex/.omx-config.json"
|
|
135
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
136
|
-
|
|
137
|
-
if [ -f "$CONFIG_FILE" ]; then
|
|
138
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
139
|
-
else
|
|
140
|
-
EXISTING='{}'
|
|
141
|
-
fi
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### For HTTP Gateway:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
# ENDPOINT, AUTH_HEADER_NAME, AUTH_HEADER_VALUE are collected from user
|
|
148
|
-
echo "$EXISTING" | jq \
|
|
149
|
-
--arg endpoint "$ENDPOINT" \
|
|
150
|
-
--arg headerName "$AUTH_HEADER_NAME" \
|
|
151
|
-
--arg headerValue "$AUTH_HEADER_VALUE" \
|
|
152
|
-
'.notifications = (.notifications // {enabled: true}) |
|
|
153
|
-
.notifications.enabled = true |
|
|
154
|
-
.notifications.openclaw = {
|
|
155
|
-
enabled: true,
|
|
156
|
-
gatewayType: "http",
|
|
157
|
-
endpoint: $endpoint,
|
|
158
|
-
headers: (if $headerName == "" then null else {($headerName): $headerValue} end)
|
|
159
|
-
}' > "$CONFIG_FILE"
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### For CLI Command Gateway:
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
# COMMAND is collected from user
|
|
166
|
-
echo "$EXISTING" | jq \
|
|
167
|
-
--arg command "$COMMAND" \
|
|
168
|
-
'.notifications = (.notifications // {enabled: true}) |
|
|
169
|
-
.notifications.enabled = true |
|
|
170
|
-
.notifications.openclaw = {
|
|
171
|
-
enabled: true,
|
|
172
|
-
gatewayType: "command",
|
|
173
|
-
command: $command
|
|
174
|
-
}' > "$CONFIG_FILE"
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Add event-specific config if user didn't select all events:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# Example: disable session-start if not selected
|
|
181
|
-
echo "$(cat "$CONFIG_FILE")" | jq \
|
|
182
|
-
'.notifications.events = (.notifications.events // {}) |
|
|
183
|
-
.notifications.events["session-start"] = {enabled: false}' > "$CONFIG_FILE"
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
## Step 6: Explain Activation Gates
|
|
187
|
-
|
|
188
|
-
Regardless of gateway type, explain the activation model:
|
|
189
|
-
|
|
190
|
-
```
|
|
191
|
-
OpenClaw Activation Gates
|
|
192
|
-
─────────────────────────
|
|
193
|
-
OpenClaw requires environment variables to be set before it activates.
|
|
194
|
-
This prevents accidental notifications in shared or CI environments.
|
|
195
|
-
|
|
196
|
-
For HTTP Gateway:
|
|
197
|
-
export OMX_OPENCLAW=1
|
|
198
|
-
|
|
199
|
-
For CLI Command Gateway (requires both):
|
|
200
|
-
export OMX_OPENCLAW=1
|
|
201
|
-
export OMX_OPENCLAW_COMMAND=1
|
|
202
|
-
|
|
203
|
-
Add these to your ~/.zshrc or ~/.bashrc.
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## Step 7: Test the Configuration
|
|
207
|
-
|
|
208
|
-
After writing config, offer to test:
|
|
209
|
-
|
|
210
|
-
Use AskUserQuestion:
|
|
211
|
-
|
|
212
|
-
**Question:** "Send a test notification through OpenClaw to verify the setup?"
|
|
213
|
-
|
|
214
|
-
**Options:**
|
|
215
|
-
1. **Yes, test now (Recommended)** - Run a test dispatch
|
|
216
|
-
2. **No, I'll test later** - Skip testing
|
|
217
|
-
|
|
218
|
-
### If testing HTTP Gateway:
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
curl -s -o /dev/null -w "%{http_code}" \
|
|
222
|
-
-H "Content-Type: application/json" \
|
|
223
|
-
${AUTH_HEADER_NAME:+-H "$AUTH_HEADER_NAME: $AUTH_HEADER_VALUE"} \
|
|
224
|
-
-d '{"event":"test","message":"OMX OpenClaw test notification","session_id":"test"}' \
|
|
225
|
-
"$ENDPOINT"
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### If testing CLI Command Gateway:
|
|
229
|
-
|
|
230
|
-
Replace placeholders in the command with test values and run it.
|
|
231
|
-
|
|
232
|
-
Report success or failure. If it fails, help debug (check URL accessibility, command path, permissions).
|
|
233
|
-
|
|
234
|
-
## Step 8: Confirm
|
|
235
|
-
|
|
236
|
-
Display the final configuration summary:
|
|
237
|
-
|
|
238
|
-
```
|
|
239
|
-
OpenClaw Gateway Configured!
|
|
240
|
-
|
|
241
|
-
Type: HTTP / CLI Command
|
|
242
|
-
Endpoint: https://your-server/omx-hook (HTTP only)
|
|
243
|
-
Command: notify-send 'OMX' '{message}' (CLI only)
|
|
244
|
-
Events: session-end, ask-user-question
|
|
245
|
-
|
|
246
|
-
Config saved to: ~/.codex/.omx-config.json
|
|
247
|
-
|
|
248
|
-
Activation (add to ~/.zshrc or ~/.bashrc):
|
|
249
|
-
export OMX_OPENCLAW=1
|
|
250
|
-
export OMX_OPENCLAW_COMMAND=1 # CLI Command gateways only
|
|
251
|
-
|
|
252
|
-
To reconfigure: /configure-openclaw
|
|
253
|
-
To configure other platforms: /configure-notifications
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
## Environment Variable Reference
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
# Required for all OpenClaw gateways
|
|
260
|
-
export OMX_OPENCLAW=1
|
|
261
|
-
|
|
262
|
-
# Required additionally for CLI Command gateways
|
|
263
|
-
export OMX_OPENCLAW_COMMAND=1
|
|
264
|
-
|
|
265
|
-
# HTTP gateway: override endpoint URL
|
|
266
|
-
export OMX_OPENCLAW_URL="https://your-server/omx-hook"
|
|
267
|
-
```
|