feat(gateway): add kanban.notification_sources config for cross-profile notification delivery - #26348
Closed
LizerAIDev wants to merge 2 commits into
Closed
feat(gateway): add kanban.notification_sources config for cross-profile notification delivery#26348LizerAIDev wants to merge 2 commits into
LizerAIDev wants to merge 2 commits into
Conversation
…le notification delivery
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(gateway): add kanban.notification_sources config for cross-profile notification delivery
Problem Description
Background
Hermes Agent supports multi-profile and Kanban multi-agent collaboration. Each profile can create its own Kanban tasks and subscribe to task status change notifications via
notify-subscribe.Problem Scenario
Users cannot receive task completion notifications in the following scenarios:
defaultprofile, but the task is executed and completed by a worker profile (e.g.,zilor-ppt,webmaster)._kanban_notifier_watcheruses hard-coded profile isolation logic—it only delivers subscriptions created by the current gateway profile, and notifications created by other profiles are silently dropped.Specific Manifestation
Previous Workaround
Previously, users temporarily bypassed this by directly modifying the SQLite database to clear the
notifier_profilefield, but this is not a permanent fix:Solution
Design Concept
Change the hard-coded profile isolation mode to a configurable
notification_sourceswhitelist/wildcard mode:['*']accepts subscriptions from all profiles.['profile-a', 'profile-b']only accepts subscriptions from specified profiles."profile-a,profile-b"is also supported (convenient for CLI configuration).Why this change
notification_sourcesdefaults toNone, making the behavior identical to before the refactor.Changes
gateway/run.py(+33 lines)Change 1: Read configuration at startup (lines 4191-4214)
Reads the
kanban.notification_sourcesconfiguration during the_kanban_notifier_watcherinitialization phase.Change 2: Replace hard-coded filtering (lines 4276-4289)
Replaced the strict
owner_profile != notifier_profilecheck with source configuration matching ("*" not in sources and owner_profile not in sources).hermes_cli/config.py(+6 lines)Added default values in
KANBAN_DEFAULTS:Configuration Examples
Scenario 1: Single Notification Center (Accept all profiles)
Scenario 2: Whitelist Mode (Only accept specified profiles)
Scenario 3: Comma-separated string
Scenario 4: Default Behavior (Profile isolation, not configured)
Impact Analysis
notification_sources: None→ profile isolation). No database migration is required. Existing subscriptions are unaffected.Related Files
gateway/run.py— Configuration reading + filtering logichermes_cli/config.py— Default value definition~/.hermes/config.yaml— User configuration (optional)Test Checklist
['*']functionality verification