ai-devkit
ai-devkit copied to clipboard
feat(agent): event-driven agent wait and blocked notifications in Rex
Summary
Make ai-devkit agent wait and agent orchestration event-driven in Rex, and forward blocked / done agent states to the existing Telegram/Slack bridges.
Context
agent wait(packages/cli/src/commands/agent/wait.command.ts) and the agent-orchestration skill poll for progress.- Rex emits
terminal.program_status_changedevents (rex events --json, Luarex.on) and supportsrex wait. packages/channel-connectoralready forwards agent interactions to Telegram/Slack. Rex plans mobile push but doesn't have it yet.
Proposed approach
- With the Rex runtime,
waitsubscribes toprogram_status_changedfor the agent's block instead of polling (polling stays as the fallback). - Optional: the channel connector pushes "agent X is blocked:
" from Rex events.
Acceptance criteria
- [ ]
agent waiton a Rex-hosted agent returns ondone/blocked/idlewithout polling - [ ] Blocked notifications reach the configured channel (opt-in)
- [ ] Tests in package
tests/folders
Depends on: #459, #461.