Commit Graph

3123 Commits

Author SHA1 Message Date
Krishav 116050f152
Merge pull request #1790 from KrishavRajSingh/main
fix: check healthy status when init
2025-10-08 15:43:05 +05:30
Krishav 2113d8739b
Merge branch 'kortix-ai:main' into main 2025-10-08 15:41:55 +05:30
Krishav Raj Singh c9c07c4860 update sandbox 2025-10-08 15:34:06 +05:30
Krishav Raj Singh 9a2ae7e09a fix: check healthy when init 2025-10-08 15:33:26 +05:30
Bobbie f6174e034f
Merge pull request #1789 from escapade-mckv/triggers-display
fix: infinite render
2025-10-08 15:14:03 +05:30
Saumya a9452dc7cd fix: infinite render 2025-10-08 15:13:18 +05:30
Bobbie 2b22aed8b0
Merge pull request #1788 from escapade-mckv/triggers-display
Triggers display
2025-10-08 15:04:29 +05:30
Saumya dcea00a983 Merge branch 'main' of https://github.com/kortix-ai/suna into triggers-display 2025-10-08 15:03:17 +05:30
Saumya 97b0d8a299 add missing tool views 2025-10-08 15:02:54 +05:30
Bobbie f10aa8da0b
Merge pull request #1787 from escapade-mckv/triggers-display
differentiate triggers in tasks list
2025-10-08 14:14:31 +05:30
Saumya 9ddadcce6c differentiate triggers in tasks list 2025-10-08 14:13:20 +05:30
Krishav cc5cc54ad9
Merge pull request #1786 from KrishavRajSingh/main
rm image from context
2025-10-08 07:43:20 +05:30
Krishav Raj Singh a5d8edabc9 rm image from context 2025-10-08 07:42:49 +05:30
Krishav ae04dddf65
Merge pull request #1785 from KrishavRajSingh/main
remove fallback info
2025-10-08 00:54:28 +05:30
Krishav Raj Singh c7e8a9585d remove fallback info 2025-10-08 00:53:32 +05:30
Bobbie 809e6ab34b
Merge pull request #1784 from escapade-mckv/fix-templates-api
fix: remove pagination for kortix templates
2025-10-07 23:57:54 +05:30
Saumya 6a7999211b fix: remove pagination for kortix templates 2025-10-07 23:42:23 +05:30
Krishav 750b829b06
Merge pull request #1783 from KrishavRajSingh/main
fix: typo
2025-10-07 21:15:13 +05:30
Krishav Raj Singh 6baba64271 fix: typo 2025-10-07 21:14:20 +05:30
Krishav 16363a210d
Merge pull request #1782 from KrishavRajSingh/fix/fallback
fix: fallback to anthropic when rate limited by bedrock
2025-10-07 21:00:53 +05:30
Krishav Raj Singh 15e073a5df fix: fallback to anthropic when rate limited by bedrock 2025-10-07 20:52:31 +05:30
Bobbie 13f32c9e85
Merge pull request #1781 from escapade-mckv/fix-trigger-installation
Fix trigger installation
2025-10-07 16:06:17 +05:30
Saumya ae81e8e403 fix: model preservation during update 2025-10-07 16:05:02 +05:30
Saumya 89a4996dfd fix: fix agent trigger installation 2025-10-07 15:33:44 +05:30
marko-kraemer 9166530351 rem 30min stream timeout fe 2025-10-07 10:32:23 +02:00
Bobbie 489f34b94d
Merge pull request #1780 from escapade-mckv/improve-installation-experience
fix: add model name for triggers
2025-10-06 23:32:13 +05:30
Saumya 44bd6470c0 fix: add model name for triggers 2025-10-06 23:30:16 +05:30
Bobbie dd5b6c4eb9
Merge pull request #1779 from escapade-mckv/improve-installation-experience
add agent usage examples to preview dialog
2025-10-06 16:46:58 +05:30
Saumya 9aad9f3014 add agent usage examples to preview dialog 2025-10-06 16:43:48 +05:30
marko-kraemer f0f14de35a refactor: move URL construction to frontend 2025-10-05 18:33:30 +02:00
marko-kraemer ddf2d32f59 feat(admin): add user thread viewer with admin access bypass
 Features:
- Add admin portal thread viewer with pagination
- Display thread list with project names and public status
- Add clickable links to view threads via /share/{thread_id}
- Add admin bypass for accessing all threads (public and private)

🔧 Backend Refactoring:
- Consolidate admin APIs into admin_api.py and billing_admin_api.py
- Remove unused files: users_admin.py, admin/api.py
- Remove unused endpoints: user search, grant-bulk-credits, migrate-user
- Update admin thread endpoint to use share URLs

 Performance:
- Remove message_count from UserThreadSummary (optimization)
- Remove N+1 query issue in thread listing

🔒 Authorization:
- Add admin role bypass in verify_and_authorize_thread_access
- Create RLS migration (20251005160000_admin_roles_access.sql)
- Update thread_select_policy for admin access
- Update message_select_policy for admin access
- Update project_select_policy for admin access
- Update agent_runs_select_policy for admin access

💻 Frontend:
- Add Threads tab to admin user details dialog
- Add useAdminUserThreads hook with pagination
- Remove unused admin hooks (useAdminUserSearch, useAdminAdvancedSearch)
- Display thread metadata with Open button and ExternalLink icon

🗃️ Database:
- Apply RLS policies allowing admin/super_admin roles to bypass restrictions
- Admins can now view any thread, message, project, or agent_run

This enables admins to view and debug any user's threads through the
share page interface, regardless of public/private status.
2025-10-05 18:09:26 +02:00
Marko Kraemer 7f89d96b45
Merge pull request #1777 from kortix-ai/refactor/simplify-backend-agent-handling
Remove workflows system; refactor/simplify backend agent handling
2025-10-04 17:56:08 -07:00
marko-kraemer 0c9c78ec40 wip 2025-10-05 02:55:08 +02:00
marko-kraemer afe689472f tools 2025-10-05 02:10:57 +02:00
marko-kraemer ec5ec498b3 fix: remove playbooks tab from chat-input dialog type
- Remove 'playbooks' from agentConfigDialog tab union type
- Fixes TypeScript build error after workflow system removal
- Build now passes successfully
2025-10-05 02:00:32 +02:00
marko-kraemer e7362c9370 refactor: remove all execution_type references
- Remove execution_type from ScheduleTriggerConfig defaults
- Remove execution_type from trigger creation dialogs
- Remove execution_type display from upcoming runs dropdown
- Remove execution_type field from UpcomingRun interface
- Hardcode 'Agent' as the only execution mode everywhere

Completes workflow system removal by eliminating the last
execution_type remnants that caused TypeScript build errors.
2025-10-05 01:56:50 +02:00
Krishav a2cd156092
Merge pull request #1776 from KrishavRajSingh/fix/bedrock_context_window
Fix/bedrock context window
2025-10-05 05:22:27 +05:30
marko-kraemer 0ec17b0d3a refactor: completely remove workflow and playbook system
- Remove workflow_tool.py and all workflow-related backend code
- Delete all workflow database tables and create migration
- Remove workflow API endpoints and execution logic
- Clean workflow references from agent tools and triggers
- Remove playbooks tab and UI from agent configuration
- Eliminate workflow_id, workflow_input, and execution_type fields
- Simplify trigger system to agent-only execution
- Remove workflow tool definitions from tool registry
- Clean up TypeScript interfaces and remove workflow types
- Remove playbooks button from chat input
- Update all trigger components to remove workflow selection
- Clean workflow metadata from threads and sidebar
- Remove 80+ critical workflow code references

Simplifies codebase by eliminating complex dual-mode (agent/workflow)
execution system in favor of pure agent-based automation.
2025-10-05 01:51:44 +02:00
Krishav Raj Singh f11d612094 fix: update litellm 2025-10-05 05:17:54 +05:30
Krishav Raj Singh 64a1e9a2aa Revert "hotfix: compression"
This reverts commit 6dad29b3dd.
2025-10-05 05:16:43 +05:30
marko-kraemer c62ea28237 refactor: remove deprecated code and endpoints
- Removed deprecated GET /agent-runs/{agent_run_id} endpoint from threads.py (20 lines)
- Removed unimplemented delete_mcp_server() method from mcp_server_service.py (12 lines)
- Removed deprecated 'sync' and 'update-all' commands from manage_suna_agents.py script (9 lines)
- Cleaned up 41 lines of dead/deprecated code
- No functional impact as these were already marked deprecated or non-functional
2025-10-04 22:45:41 +02:00
marko-kraemer 8b7bc36d5f refactor: consolidate duplicate account lookup logic
- Extracted get_account_id_from_thread() to auth_utils.py (new shared utility)
- Refactored 2 identical _get_current_account_id() methods:
  * tools/agent_builder_tools/base_tool.py (reduced 23 lines → 9 lines)
  * tools/sb_upload_file_tool.py (reduced 23 lines → 9 lines)
- Simplified agent_creation_tool.py's version for consistency
- Eliminated 28+ lines of duplicate code
- Centralized thread→account lookup logic in one place
2025-10-04 22:45:09 +02:00
marko-kraemer 5383897977 refactor: remove redundant code - eliminate 7 workspace_path duplications
- Removed redundant workspace_path='/workspace' from 7 sandbox tool files
  * sb_files_tool.py
  * sb_shell_tool.py
  * sb_deploy_tool.py
  * sb_templates_tool.py
  * sb_upload_file_tool.py
  * sb_presentation_tool.py
  * sb_web_dev_tool.py

- Base class SandboxToolsBase already sets this on line 23
- Eliminates 7 lines of duplicate code
- All tools now inherit workspace_path from base

- Converted sb_upload_file_tool.py to use centralized db_helpers
  * Removed DBConnection import
  * Uses get_initialized_db() instead
2025-10-04 22:43:46 +02:00
marko-kraemer 98e9196d41 refactor: simplify backend - fix naming conflicts and centralize DB dependencies
Backend improvements:
- Fixed duplicate TemplateService naming conflict:
  * Renamed marketplace_service.py::TemplateService → MarketplaceService
  * Eliminates confusion between two classes with same name

- Created centralized DB dependency helpers (db_helpers.py):
  * get_db() - FastAPI dependency for DB connection (singleton)
  * get_db_client() - Returns initialized Supabase client
  * get_initialized_db() - For module-level backward compatibility
  * Addresses 100+ DBConnection() instantiations across 53 files

- Applied new DB helpers to high-usage files:
  * services/api_keys_api.py - Now uses get_db() dependency
  * templates/services/marketplace_service.py - Uses get_initialized_db()

- Comprehensive simplification analysis document:
  * Identified 9 modules with duplicate initialize() patterns
  * Documented large files needing breakdown (1700-2000 lines)
  * Analyzed 35 tool files for common patterns
  * Prioritized recommendations for future work

Frontend cleanup:
- Removed unused template preview components and pages
2025-10-04 22:40:16 +02:00
marko-kraemer 8d7e85de4c refactor: massive backend simplification - eliminate 450+ lines of duplicate code
- Created unified AgentLoader for all agent data operations
- Eliminated 8 manual AgentResponse constructions across codebase
- Reduced agent_runs.py complexity by 163 lines (85→35 lines in 2 functions)
- Reduced core_utils.py from 553→69 lines (-87%)
- Extracted focused utility modules:
  * utils/icon_generator.py (179 lines)
  * utils/limits_checker.py (245 lines)
  * utils/run_management.py (145 lines)
  * utils/project_helpers.py (113 lines)
  * utils/mcp_helpers.py (41 lines)
- Fixed duplicate router inclusions in api.py
- Renamed template_service.py → marketplace_service.py for clarity
- Reduced template transformer from 73→17 lines (-77%)
- Inlined module-specific helpers (moved agent_run access check)
- Fixed version data false alarm warnings
- Updated AgentResponse model to support optional fields for list operations

Total impact: ~450 lines of duplicate code eliminated, dramatically improved maintainability
2025-10-04 22:32:51 +02:00
Krishav 01e4bc892f
Merge pull request #1775 from KrishavRajSingh/main
hotfix: compression
2025-10-05 00:48:22 +05:30
Krishav Raj Singh 6dad29b3dd hotfix: compression 2025-10-05 00:47:47 +05:30
marko-kraemer 4f3a7e813c Add enterprise page to public routes 2025-10-04 16:41:17 +02:00
Bobbie 4db59ebb9d
Merge pull request #1772 from escapade-mckv/fix-ui-bugs
Fix UI bugs
2025-10-04 03:07:44 +05:30
Saumya 550b9f42ce Merge branch 'main' of https://github.com/kortix-ai/suna into fix-ui-bugs 2025-10-04 03:06:43 +05:30