Commit graph

34 commits

Author SHA1 Message Date
Anish Sarkar
de8841fb86 chore: ran linting 2026-03-21 13:20:13 +05:30
Anish Sarkar
ff6514a99f feat: add DedupHITLToolCallsMiddleware to prevent duplicate tool calls
- 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.
2026-03-21 03:47:30 +05:30
Anish Sarkar
744ad1fa79 feat: enforce single invocation for tool actions across various services
- 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.
2026-03-21 03:07:13 +05:30
Anish Sarkar
8850fac722 feat: implement knowledge base synchronization for Linear and Notion issue creation
- 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.
2026-03-20 17:50:36 +05:30
Anish Sarkar
10af5d3f3e feat: add authentication expiration handling for Notion tools
- 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.
2026-03-20 16:12:18 +05:30
Anish Sarkar
df872e261e feat: implement re-authentication flow for Linear and Notion HITL connectors and improve their HITL flow and error states
- 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.
2026-03-18 14:10:11 +05:30
Anish Sarkar
20c444f83c refactor: edit HITL prompts to be more expressive 2026-03-17 21:16:37 +05:30
DESKTOP-RTLN3BA\$punk
a3cd598e01 feat: added improved llm model selector 2026-02-20 14:28:01 -08:00
CREDO23
c8413ee2bf fix: resolve graphql complexity, json extraction, kb sync, and ui prefill for linear HIL 2026-02-19 18:30:20 +02:00
CREDO23
d4e2ebb99f fix(hitl): rollback on KB delete failure, tighten linear tool guards
- 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
2026-02-19 16:27:02 +02:00
CREDO23
090b69cf1e fix: guard empty update_issue call and unify delete_from_kb naming
- 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
2026-02-19 15:22:36 +02:00
CREDO23
f0e1f3419e fix(notion): remove parent_page_id from create_notion_page tool signature 2026-02-18 19:02:16 +02:00
CREDO23
d28aed14b3 Guard KB sync on document_id; fix comment style 2026-02-18 12:31:28 +02:00
CREDO23
7d1bd1fab4 Implement KB sync after Notion page updates with block ID verification
- 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
2026-02-17 20:30:12 +02:00
CREDO23
2f65536c6d use document_id instead of page_id for kb sync lookup 2026-02-17 18:25:56 +02:00
CREDO23
b240bc3e1a add kb sync for notion updates 2026-02-17 17:37:47 +02:00
DESKTOP-RTLN3BA\$punk
7bd3a4e08f chore: linting 2026-02-16 23:30:35 -08:00
DESKTOP-RTLN3BA\$punk
9390f195cc refactor: fix decision handling and error message extraction in Notion tools
- 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.
2026-02-16 02:14:26 -08:00
DESKTOP-RTLN3BA\$punk
81c70befcf chore: linting 2026-02-15 23:38:15 -08:00
CREDO23
743b40ece6 fix: add user_id filter to create_notion_page connector lookup 2026-02-13 19:15:17 +02:00
CREDO23
97d5b046d4 Fix delete notion page tool implementation 2026-02-13 18:50:14 +02:00
CREDO23
cc36780c67 Add delete_from_db parameter and DB deletion logic to delete_notion_page 2026-02-13 16:08:06 +02:00
CREDO23
45de7d546c Refactor delete_notion_page: use page_title, add HITL, logging, not_found status 2026-02-13 15:52:50 +02:00
CREDO23
da451ffff7 Handle page not found as informational status instead of error 2026-02-13 13:22:52 +02:00
CREDO23
9411edf057 Refactor update_notion_page to append-only with simplified parameters 2026-02-13 13:07:19 +02:00
CREDO23
0d1b61d7e6 Implement update notion page tool 2026-02-13 10:45:51 +02:00
CREDO23
f15e6aeb5e Add HIL to update notion page tool 2026-02-12 18:42:11 +02:00
CREDO23
67473bbb78 Add validation for title and connector in notion page creation 2026-02-12 17:51:11 +02:00
CREDO23
9023f2656b Improve notion page creation approval UI 2026-02-12 17:35:27 +02:00
CREDO23
c47171e218 fix edited action args extraction for notion page creation 2026-02-12 16:38:08 +02:00
CREDO23
066fb6dbfb use interrupt primitive with db context for notion page creation 2026-02-12 15:29:41 +02:00
CREDO23
8e6fa2ee58 add delete notion page approval ui 2026-02-11 18:20:51 +02:00
CREDO23
04ea40f0c8 fix notion write tools and add retry wrapper 2026-02-11 17:18:59 +02:00
CREDO23
8649ca7ac0 add notion tools for create/update/delete pages 2026-02-11 16:11:53 +02:00