- Introduced DedupHITLToolCallsMiddleware to prevent duplicate HITL tool calls within a single LLM response, ensuring only the first occurrence of each tool call is retained.
- Updated the create_surfsense_deep_agent function to include the new middleware, enhancing the efficiency of tool interactions.
- Added a new middleware file for better organization and maintainability of the codebase.
- Added a guideline to ensure that each tool (Gmail, Google Calendar, Google Drive, Linear, Notion) is called only once per user request.
- Updated documentation to clarify that the system will automatically select the most relevant match when multiple items share the same title or subject, enhancing user experience and preventing redundant calls.
- Added `sync_after_create` methods in `LinearKBSyncService` and `NotionKBSyncService` to handle synchronization of newly created issues and pages with the knowledge base.
- Enhanced the `create_issue.py` and `create_page.py` tools to provide user feedback on the success of the knowledge base update, indicating whether the content has been synced or will be added in the next scheduled sync.
- Improved error handling during synchronization to log failures and manage duplicate document scenarios effectively.
- Added re-authentication endpoints for Linear and Notion connectors to handle expired authentication.
- Enhanced error handling in issue creation, deletion, and update tools to return appropriate authentication error messages.
- Updated UI components to display authentication status and guide users on re-authentication steps.
- Improved account health checks to ensure valid tokens are used for operations.
- delete_linear_issue + delete_notion_page: add db_session.rollback()
in the KB document deletion exception handler so the session is never
left in a PendingRollbackError state after a failed commit, which
would otherwise break all subsequent DB operations in the same request
- delete_linear_issue: include issue identifier (e.g. ENG-42) in the
success message so the caller can confirm which issue was archived
- update_linear_issue: remove redundant label_ids ternary
(x if x is not None else None -> x)
- create_linear_issue: add logger.error on empty-title guard for parity
with the equivalent Notion tool
- update_issue: handle not_indexed KB sync status with a distinct user
message (matches Notion parity)
- delete_issue: fix log message "not found in DB" → "not found in KB"