Session Observer Extension Points (session.on_receive / session.on_send) #2
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Competitor
Kind/Documentation
Kind/Enhancement
Kind/Epic
Kind/Feature
Kind/Security
Kind/Story
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Scope/Core
Scope/Cross-Plugin
Scope/Plugin-System
Scope/Single-Plugin
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ultanio/cobot#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add observer extension points to the session layer, separate from existing provider points. Lets plugins observe message flow without interfering with the agent loop.
New Extension Points
session.on_receive— fired for each incoming message (fullIncomingMessage)session.on_send— fired after successful send (fullOutgoingMessage)Observer errors are caught and never break flow.
on_sendonly fires on success.Why
Currently there is no way for a plugin to say "I want to see every message that flows through" without hooking into agent-level hooks (which are correctly channel-ignorant by design). Channel awareness lives at the session layer — observers should too.
Enables
Design Principles
Implementation
~20 lines added to session plugin:
_notify_observers()inpoll_all_channels()andsend()Related: PR #31 (lurker plugin)