Skip to content

feat: add Zulip channel plugin#15887

Closed
jamie-dit wants to merge 10000 commits intoopenclaw:mainfrom
jamie-dit:feat/zulip-channel-v2
Closed

feat: add Zulip channel plugin#15887
jamie-dit wants to merge 10000 commits intoopenclaw:mainfrom
jamie-dit:feat/zulip-channel-v2

Conversation

@jamie-dit
Copy link
Copy Markdown

@jamie-dit jamie-dit commented Feb 14, 2026

Adds Zulip as a channel plugin (streams/topics) under extensions/zulip.

Key features:

  • Stream allowlist monitoring with per-stream event queues
  • Topic-based session mapping (same stream + topic = same session)
  • Reaction indicators (eyes/check/warning) with configurable cleanup
  • Rate limit handling with exponential backoff
  • Inbound upload support (user_uploads detection + download)
  • Topic directive for outbound messages
  • Concurrent message processing with staggered starts
  • Outbound target format: stream:#
  • npm install manifest sanitization for plugin deps

Tests: channel, monitor backoff, queue plan, reactions, uploads, outbound session, plugin install sanitize

Greptile Overview

Greptile Summary

Added Zulip as a channel plugin with comprehensive stream/topic-based messaging support. The implementation introduces per-stream event queue monitoring with exponential backoff for rate limiting, topic-based session isolation (enabling separate conversations per topic), and reaction-based visual feedback (eyes/check/warning). Outbound messages use stream:<name>#<topic> format and support topic directives to dynamically switch conversations. Plugin dependencies are now installed more reliably by temporarily sanitizing package.json to avoid npm parsing errors with workspace references. The core outbound session resolver was extended to support Zulip's stream/topic model with proper session key generation.

Key implementation details:

  • Monitor uses long-polling /api/v1/events with defensive throttling to prevent tight loops that trigger 429s (extensions/zulip/src/zulip/monitor.ts:606-613)
  • Concurrent message processing with 200ms stagger between starts for natural pacing (monitor.ts:623)
  • Uploads handled via /user_uploads/ endpoint with origin-restricted downloads (uploads.ts:51-62)
  • Topic directive [[zulip_topic: <name>]] allows agents to switch or create topics mid-conversation (monitor.ts:137-152)
  • npm install now strips devDependencies with workspace:* to avoid parse failures (src/plugins/install.ts:296-354)

Confidence Score: 4/5

  • This PR is safe to merge with good confidence - implementation follows established channel plugin patterns with comprehensive tests
  • Well-structured implementation with appropriate error handling, rate limiting, and security measures (origin validation for uploads, proper auth handling). The npm sanitization fix prevents real-world plugin install failures. Tests cover critical paths (backoff, reactions, uploads, session routing). Minor deduction because this is a large feature addition with external API dependencies.
  • No files require special attention

Last reviewed commit: 7416eb6

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants