docs: document durable + refreshable ChannelDirectory (fixes #817)#818
Conversation
- proactive-delivery.mdx: add Persistence, Alias Overlay, and Refreshing from Live Adapters sections; update How It Works table to include kind:"observed"; add lifecycle Mermaid diagram; add background refresh pattern and two new Best Practices accordions - platform-aware-agents.mdx: update ReachableTarget.kind to include "observed"; update describe_targets() step description - channels-gateway.mdx: add observed-channel row to Reachable Targets table; add refresh_directory() background-loop code snippet Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
More reviews will be available in 9 minutes and 30 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation across several files to describe new features such as observed channels, background directory refreshing, channel persistence, and alias overlays. However, the review feedback highlights critical discrepancies where the documented APIs (such as refresh_directory(), refresh_from_adapters(), and the persistence configuration arguments in ChannelDirectory) are not actually implemented in the underlying codebase, which would lead to runtime errors and missing functionality.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| async def background_refresh(interval=300): | ||
| while True: | ||
| botos.delivery_router.refresh_directory() |
| |------|-------------| | ||
| | **Origin detection** | `detect_chat_type(platform, chat_id)` classifies the chat as `"group"`, `"direct"`, `"channel"`, or `"unknown"` | | ||
| | **Target listing** | `ChannelDirectory.describe_targets()` lists home channels and named aliases | | ||
| | **Target listing** | `ChannelDirectory.describe_targets()` lists home channels, named aliases, and reachable-but-unnamed channels from live traffic or `refresh_from_adapters()` | |
| | `platform` | `str` | — | Target platform | | ||
| | `channel_id` | `str` | — | Platform channel id | | ||
| | `kind` | `str` | `"alias"` | `"home"` or `"alias"` | | ||
| | `kind` | `str` | `"alias"` | `"home"`, `"alias"`, or `"observed"` | |
| directory = ChannelDirectory( | ||
| persist_path=Path("/var/lib/myapp/dir.json"), | ||
| aliases_path=Path("/var/lib/myapp/aliases.json"), | ||
| ) |
There was a problem hiding this comment.
The ChannelDirectory constructor is documented to accept persist_path and aliases_path arguments. However, the implementation of ChannelDirectory.__init__ in praisonai/bots/delivery.py takes no arguments. Additionally, there is no persistence or loading/saving logic implemented in ChannelDirectory to support channel_directory.json or channel_aliases.json. This will cause a TypeError at runtime.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Summary
Documents the new persistence and refresh features added to
ChannelDirectoryandDeliveryRouterin PraisonAI PR #2186.docs/features/proactive-delivery.mdx: Added three new sections — Persistence, Pre-Naming Channels (Alias Overlay), and Refreshing from Live Adapters — plus a lifecycle Mermaid diagram, an observed-channel row in the How It Works table, and two new Best Practices accordionsdocs/features/platform-aware-agents.mdx: UpdatedReachableTarget.kindto include"observed"; updateddescribe_targets()step to mention observed channels from live traffic and adapter refreshdocs/features/channels-gateway.mdx: Added observed-channel row to the Reachable Targets table; addedrefresh_directory()background-loop code snippetNo new pages created;
docs.jsonunchanged.Fixes #817
Generated with Claude Code