- 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.
- Implemented checks for expired authentication in the Notion page creation and deletion tools, returning appropriate error messages for re-authentication.
- Updated the Notion tool metadata service to track account health and persist authentication status, improving error handling and user feedback during operations.
- 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
- LinearConnector.update_issue: return error early when no fields are
provided, preventing a silent no-op mutation and unnecessary KB sync
- Rename delete_from_db → delete_from_kb in delete_notion_page tool and
its frontend component to match the more accurate Linear naming and
keep both tool APIs consistent for the LLM
- Add NotionKBSyncService for immediate KB updates after page changes
- Implement block ID verification to ensure content freshness
- Refactor duplicate block processing logic to shared utils
- Add user-friendly status messages
- Include debug logging for troubleshooting
- Improved decision extraction logic in create, delete, and update Notion page tools to ensure proper handling of approval decisions.
- Added a static method to NotionHistoryConnector for consistent error message extraction from API responses, enhancing readability and maintainability.