Skip to content

feat(plugin): add SSE monitor for real-time AIDLC events#215

Open
ChenNima wants to merge 1 commit into
developfrom
feat/plugin-sse-monitor
Open

feat(plugin): add SSE monitor for real-time AIDLC events#215
ChenNima wants to merge 1 commit into
developfrom
feat/plugin-sse-monitor

Conversation

@ChenNima
Copy link
Copy Markdown
Contributor

Summary

  • Adds a background SSE listener (bin/chorus-sse-monitor.sh) that subscribes to /api/events/notifications and emits formatted stdout lines for 10 AIDLC event types (task assigned, proposal approved/rejected, idea claimed, comments, @mentions, elaboration requested/answered, task verified/reopened).
  • Registers the listener via Claude Code's plugin monitors/monitors.json so it auto-starts when the plugin loads on a supported runtime.
  • Adds /chorus:monitor skill (skills/monitor/) as a manual invocation fallback.
  • Adds enableMonitor userConfig flag + SessionStart tip pointing at the skill.
  • Extends test-syntax.sh with a syntax-only check for the new script (Bash 3.2 compat).

Known limitation

Claude Code's Monitor runtime is gated by the build-time feature('MONITOR_TOOL') flag, which is compiled off on Bedrock / Vertex / Foundry builds. On those providers the monitors.json entry won't auto-start. The /chorus:monitor skill route is the manual fallback there.

Changed files

File Change
public/chorus-plugin/bin/chorus-sse-monitor.sh New — SSE listener with exponential backoff, 10 event-type router, Bearer auth
public/chorus-plugin/monitors/monitors.json New — plugin monitor registration
public/chorus-plugin/skills/monitor/SKILL.md New — /chorus:monitor skill doc
public/chorus-plugin/skills/monitor/package.json New — skill manifest
public/chorus-plugin/.claude-plugin/plugin.json Adds enableMonitor userConfig (default: true)
public/chorus-plugin/bin/on-session-start.sh Injects /chorus:monitor tip when enableMonitor=true
public/chorus-plugin/bin/test-syntax.sh Adds syntax-only check for the new script

Test plan

  • /bin/bash public/chorus-plugin/bin/test-syntax.sh — 15/15 passed on Bash 3.2
  • Live SSE connection against localhost Chorus server
  • E2E: 4 simulated events → 4 correctly formatted stdout lines
  • Verify auto-start on native Anthropic API provider
  • Verify manual /chorus:monitor fallback on Bedrock

Generated with Claude Code

Wires a background SSE listener into the Chorus plugin so the agent can
receive task assignments, proposal approvals, @mentions, comments, and
elaboration events without polling. Ships as a Claude Code plugin
monitor (monitors.json), with a companion /chorus:monitor skill and an
enableMonitor userConfig flag.

Known limitation: Claude Code's Monitor runtime is disabled on Bedrock /
Vertex / Foundry providers, so auto-start only works on the native
Anthropic API path. The skill invocation route remains available as a
manual fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 96.92% (🎯 95%) 2209 / 2279
🔵 Statements 95.84% (🎯 95%) 2399 / 2503
🔵 Functions 95.02% (🎯 93%) 458 / 482
🔵 Branches 88.1% (🎯 85%) 1482 / 1682
File CoverageNo changed files found.
Generated in workflow #488 for commit b4e5de0 by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant