agent-orchestrator/packages/cli/__tests__/commands
Dhruv Sharma 36d354e0c2 feat: OpenClaw plugin, AO skill, Discord notifier, and setup wizard
Adds bidirectional integration between Agent Orchestrator and OpenClaw,
enabling AI bots on Discord/Telegram/WhatsApp to manage coding agent
fleets through natural conversation.

OpenClaw Plugin (openclaw-plugin/):
- 14 AI tools: ao_spawn, ao_issues, ao_sessions, ao_status, ao_batch_spawn,
  ao_send, ao_kill, ao_session_restore, ao_session_cleanup,
  ao_session_claim_pr, ao_review_check, ao_verify, ao_doctor, ao_session_list
- Hooks: message_received + before_prompt_build for live data injection
- /ao slash command with subcommands (sessions, spawn, issues, doctor, setup)
- Background services: health monitor + issue board scanner
- Security: execFileSync with arg arrays (no shell injection)

AO Skill (skills/agent-orchestrator/):
- Natural language intent → AO tool mapping
- Decision heuristic: quick fix → direct, multi-issue → AO
- Designed for ClawHub publishing (blocked on ClawHub server bug)

CLI: ao setup openclaw (packages/cli/src/commands/setup.ts):
- Interactive wizard + non-interactive mode
- Auto-detects OpenClaw gateway on localhost
- Auto-generates secure token
- Writes both configs (agent-orchestrator.yaml + openclaw.json)
- Appends OPENCLAW_HOOKS_TOKEN to shell profile
- Validates connection end-to-end

CLI: ao doctor notifier checks:
- Probes OpenClaw gateway reachability + token validity
- --test-notify flag sends test event through all configured notifiers
- Failure count propagated to exit code

Discord Notifier (packages/plugins/notifier-discord/):
- Rich webhook embeds with colors, fields, action links
- Retry with exponential backoff + Discord Retry-After header
- Request timeouts, embed truncation, webhook URL validation
- thread_id via URL query string (Discord API requirement)

OpenClaw Notifier improvements:
- Added request timeouts via AbortController
- Improved README

Reviewed through 5 rounds of Codex code review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:52:28 +05:30
..
dashboard.test.ts refactor: delegate CLI commands to core SessionManager (#88) 2026-02-18 14:30:17 +05:30
doctor.test.ts feat: OpenClaw plugin, AO skill, Discord notifier, and setup wizard 2026-03-23 21:52:28 +05:30
init.test.ts Resolve remaining PR review comments 2026-03-17 15:51:02 +05:30
open.test.ts feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
review-check.test.ts feat: add PR claim flow for agent sessions (#326) 2026-03-07 03:54:19 +05:30
send.test.ts feat: OpenCode session lifecycle and CLI controls (#315) 2026-03-08 09:55:44 +05:30
session.test.ts fix: protect orchestrators from session cleanup (#453) 2026-03-13 09:39:49 +05:30
setup.test.ts feat: OpenClaw plugin, AO skill, Discord notifier, and setup wizard 2026-03-23 21:52:28 +05:30
spawn.test.ts Show friendly warning instead of hard error for old two-arg spawn syntax 2026-03-17 14:32:35 +05:30
start.test.ts Resolve remaining PR review comments 2026-03-17 15:51:02 +05:30
status.test.ts fix: separate orchestrators from worker status output 2026-03-11 23:33:25 +05:30
update.test.ts feat: add doctor and update maintenance tooling (#437) 2026-03-12 20:59:22 +05:30