From 7b53d2608a3364e4891cebdab2303235618d61f7 Mon Sep 17 00:00:00 2001 From: Karan Vaidya Date: Thu, 26 Sep 2024 13:34:25 +0530 Subject: [PATCH] Remove useless tools (#640) --- python/composio/client/enums/_action.py | 335 ++++++++++++------ python/composio/client/enums/_app.py | 10 +- python/composio/client/enums/_tag.py | 37 +- .../composio/tools/local/codegrep/__init__.py | 5 - .../tools/local/codegrep/actions/__init__.py | 1 - .../tools/local/codegrep/actions/grep_code.py | 90 ----- python/composio/tools/local/codegrep/tool.py | 20 -- .../tools/local/codeindex/__init__.py | 5 - .../tools/local/codeindex/actions/__init__.py | 3 - .../local/codeindex/actions/create_index.py | 281 --------------- .../local/codeindex/actions/delete_index.py | 57 --- .../local/codeindex/actions/index_status.py | 39 -- .../local/codeindex/actions/search_index.py | 159 --------- python/composio/tools/local/codeindex/tool.py | 20 -- .../composio/tools/local/codemap/__init__.py | 5 - .../tools/local/codemap/actions/__init__.py | 5 - .../local/codemap/actions/delete_repomap.py | 41 --- .../local/codemap/actions/get_rankedtags.py | 117 ------ .../local/codemap/actions/get_repomap.py | 90 ----- .../codemap/actions/get_repostructure.py | 178 ---------- .../local/codemap/actions/init_repomap.py | 60 ---- python/composio/tools/local/codemap/tool.py | 32 -- 22 files changed, 262 insertions(+), 1328 deletions(-) delete mode 100644 python/composio/tools/local/codegrep/__init__.py delete mode 100644 python/composio/tools/local/codegrep/actions/__init__.py delete mode 100644 python/composio/tools/local/codegrep/actions/grep_code.py delete mode 100644 python/composio/tools/local/codegrep/tool.py delete mode 100644 python/composio/tools/local/codeindex/__init__.py delete mode 100644 python/composio/tools/local/codeindex/actions/__init__.py delete mode 100644 python/composio/tools/local/codeindex/actions/create_index.py delete mode 100644 python/composio/tools/local/codeindex/actions/delete_index.py delete mode 100644 python/composio/tools/local/codeindex/actions/index_status.py delete mode 100644 python/composio/tools/local/codeindex/actions/search_index.py delete mode 100644 python/composio/tools/local/codeindex/tool.py delete mode 100644 python/composio/tools/local/codemap/__init__.py delete mode 100644 python/composio/tools/local/codemap/actions/__init__.py delete mode 100644 python/composio/tools/local/codemap/actions/delete_repomap.py delete mode 100644 python/composio/tools/local/codemap/actions/get_rankedtags.py delete mode 100644 python/composio/tools/local/codemap/actions/get_repomap.py delete mode 100644 python/composio/tools/local/codemap/actions/get_repostructure.py delete mode 100644 python/composio/tools/local/codemap/actions/init_repomap.py delete mode 100644 python/composio/tools/local/codemap/tool.py diff --git a/python/composio/client/enums/_action.py b/python/composio/client/enums/_action.py index 67b92bdfa5..5d05fed142 100644 --- a/python/composio/client/enums/_action.py +++ b/python/composio/client/enums/_action.py @@ -15,12 +15,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): """Class to represent `Action` entity.""" - APIFY_CREATE_APIFY_ACTOR: "Action" - APIFY_GET_ACTOR_ID: "Action" - APIFY_GET_LAST_RUN_DATA: "Action" - APIFY_LIST_APIFY_ACTORS: "Action" - APIFY_LIST_APIFY_TASKS: "Action" - APIFY_SEARCH_STORE: "Action" ASANA_ADD_A_COLLABORATOR_TO_A_GOAL: "Action" ASANA_ADD_A_CUSTOM_FIELD_TO_A_PORTFOLIO: "Action" ASANA_ADD_A_CUSTOM_FIELD_TO_A_PROJECT: "Action" @@ -425,6 +419,227 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): BAMBOOHR_UPLOAD_COMPANY_FILE: "Action" BAMBOOHR_UPLOAD_EMPLOYEE_FILE: "Action" BAMBOOHR_USER_LOGIN: "Action" + BREVO_ACTIVATE_THE_E_COMMERCE_APP: "Action" + BREVO_ADD_A_NEW_DOMAIN_TO_THE_LIST_OF_BLOCKED_DOMAINS: "Action" + BREVO_ADD_EMAIL_AND_OR_SMS_CREDITS_TO_A_SPECIFIC_CHILD_ACCOUNT: "Action" + BREVO_ADD_EXISTING_CONTACTS_TO_A_LIST: "Action" + BREVO_AGGREGATE_EMAIL_ACTIVITY: "Action" + BREVO_ASSOCIATE_A_DEDICATED_IP_TO_THE_CHILD: "Action" + BREVO_AUTHENTICATE_A_DOMAIN: "Action" + BREVO_CHECK_ADMIN_USER_PERMISSIONS: "Action" + BREVO_CHECK_RESELLER_CHILD_ACCOUNT_CREATION_STATUS: "Action" + BREVO_CHECK_USER_PERMISSION: "Action" + BREVO_CREATES_AN_SMS_CAMPAIGN: "Action" + BREVO_CREATES_A_RESELLER_CHILD: "Action" + BREVO_CREATE_AND_SEND_A_WHATS_APP_CAMPAIGN: "Action" + BREVO_CREATE_AN_API_KEY_FOR_A_SUB_ACCOUNT: "Action" + BREVO_CREATE_AN_EMAIL_CAMPAIGN: "Action" + BREVO_CREATE_AN_EMAIL_TEMPLATE: "Action" + BREVO_CREATE_AN_EVENT: "Action" + BREVO_CREATE_AN_EXTERNAL_FEED: "Action" + BREVO_CREATE_A_COMPANY: "Action" + BREVO_CREATE_A_CONTACT: "Action" + BREVO_CREATE_A_COUPON_COLLECTION: "Action" + BREVO_CREATE_A_DEAL: "Action" + BREVO_CREATE_A_DOMAIN_FOR_A_CHILD_ACCOUNT: "Action" + BREVO_CREATE_A_FOLDER: "Action" + BREVO_CREATE_A_GROUP_OF_SUB_ACCOUNTS: "Action" + BREVO_CREATE_A_LIST: "Action" + BREVO_CREATE_A_NEW_DOMAIN: "Action" + BREVO_CREATE_A_NEW_SENDER: "Action" + BREVO_CREATE_A_NEW_SUB_ACCOUNT_UNDER_A_MASTER_ACCOUNT: "Action" + BREVO_CREATE_A_NOTE: "Action" + BREVO_CREATE_A_TASK: "Action" + BREVO_CREATE_A_WEBHOOK: "Action" + BREVO_CREATE_A_WHATS_APP_TEMPLATE: "Action" + BREVO_CREATE_CATEGORIES_IN_BATCH: "Action" + BREVO_CREATE_CONTACT_ATTRIBUTE: "Action" + BREVO_CREATE_CONTACT_VIA_DOI_DOUBLE_OPT_IN_FLOW: "Action" + BREVO_CREATE_COUPONS_FOR_A_COUPON_COLLECTION: "Action" + BREVO_CREATE_ORDERS_IN_BATCH: "Action" + BREVO_CREATE_PRODUCTS_IN_BATCH: "Action" + BREVO_CREATE_UPDATE_A_CATEGORY: "Action" + BREVO_CREATE_UPDATE_A_PRODUCT: "Action" + BREVO_DELETE_AN_ATTRIBUTE: "Action" + BREVO_DELETE_AN_AUTOMATED_MESSAGE: "Action" + BREVO_DELETE_AN_EMAIL_CAMPAIGN: "Action" + BREVO_DELETE_AN_EXTERNAL_FEED: "Action" + BREVO_DELETE_AN_INACTIVE_EMAIL_TEMPLATE: "Action" + BREVO_DELETE_AN_SMS_CAMPAIGN: "Action" + BREVO_DELETE_AN_SMTP_TRANSACTIONAL_LOG: "Action" + BREVO_DELETE_A_COMPANY: "Action" + BREVO_DELETE_A_CONTACT: "Action" + BREVO_DELETE_A_CONTACT_FROM_A_LIST: "Action" + BREVO_DELETE_A_DEAL: "Action" + BREVO_DELETE_A_DOMAIN: "Action" + BREVO_DELETE_A_FILE: "Action" + BREVO_DELETE_A_FOLDER_AND_ALL_ITS_LISTS: "Action" + BREVO_DELETE_A_GROUP: "Action" + BREVO_DELETE_A_LIST: "Action" + BREVO_DELETE_A_MESSAGE_SENT_BY_AN_AGENT: "Action" + BREVO_DELETE_A_NOTE: "Action" + BREVO_DELETE_A_SENDER: "Action" + BREVO_DELETE_A_SUB_ACCOUNT: "Action" + BREVO_DELETE_A_TASK: "Action" + BREVO_DELETE_A_WEBHOOK: "Action" + BREVO_DELETE_A_WHATS_APP_CAMPAIGN: "Action" + BREVO_DELETE_HARDBOUNCES: "Action" + BREVO_DELETE_RESELLER_CHILD_BY_ID: "Action" + BREVO_DELETE_SCHEDULED_EMAILS_BY_BATCH_ID_OR_MESSAGE_ID: "Action" + BREVO_DELETE_SUB_ACCOUNT_FROM_GROUP: "Action" + BREVO_DISSOCIATE_A_DEDICATED_IP_TO_THE_CHILD: "Action" + BREVO_DOWNLOAD_A_FILE: "Action" + BREVO_ENABLE_DISABLE_SUB_ACCOUNT_APPLICATION_S: "Action" + BREVO_EXPORT_ALL_WEBHOOK_EVENTS: "Action" + BREVO_EXPORT_AN_SMS_CAMPAIGN_S_RECIPIENTS: "Action" + BREVO_EXPORT_CONTACTS: "Action" + BREVO_EXPORT_THE_RECIPIENTS_OF_AN_EMAIL_CAMPAIGN: "Action" + BREVO_FETCH_ALL_EVENTS_HISTORY_FOR_ONE_PARTICULAR_RECEIVED_EMAIL: "Action" + BREVO_FETCH_ALL_EXTERNAL_FEEDS: "Action" + BREVO_FETCH_SCHEDULED_EMAILS_BY_BATCH_ID_OR_MESSAGE_ID: "Action" + BREVO_FILTER_TRANSACTIONAL_EMAILS_LIST: "Action" + BREVO_GENERATE_SSO_TOKEN_TO_ACCESS_ADMIN_ACCOUNT: "Action" + BREVO_GENERATE_SSO_TOKEN_TO_ACCESS_SUB_ACCOUNT: "Action" + BREVO_GET_ALL_COMPANIES: "Action" + BREVO_GET_ALL_DEALS: "Action" + BREVO_GET_ALL_FILES: "Action" + BREVO_GET_ALL_FOLDERS: "Action" + BREVO_GET_ALL_NOTES: "Action" + BREVO_GET_ALL_PIPELINES: "Action" + BREVO_GET_ALL_SENDER_DOMAINS_FOR_A_SPECIFIC_CHILD_ACCOUNT: "Action" + BREVO_GET_ALL_TASKS: "Action" + BREVO_GET_ALL_TASK_TYPES: "Action" + BREVO_GET_ALL_THE_CONTACTS: "Action" + BREVO_GET_ALL_THE_DEDICATED_IPS_FOR_A_SENDER: "Action" + BREVO_GET_ALL_THE_DEDICATED_IPS_FOR_YOUR_ACCOUNT: "Action" + BREVO_GET_ALL_THE_LISTS: "Action" + BREVO_GET_ALL_THE_SEGMENTS: "Action" + BREVO_GET_ALL_WEBHOOKS: "Action" + BREVO_GET_ALL_YOUR_COUPON_COLLECTIONS: "Action" + BREVO_GET_ALL_YOUR_SMS_ACTIVITY_UNAGGREGATED_EVENTS: "Action" + BREVO_GET_ALL_YOUR_TRANSACTIONAL_EMAIL_ACTIVITY_UNAGGREGATED_EVENTS: "Action" + BREVO_GET_ALL_YOUR_WHATS_APP_ACTIVITY_UNAGGREGATED_EVENTS: "Action" + BREVO_GET_AN_AUTOMATED_MESSAGE: "Action" + BREVO_GET_AN_A_B_TEST_EMAIL_CAMPAIGN_RESULTS: "Action" + BREVO_GET_AN_EMAIL_CAMPAIGN_REPORT: "Action" + BREVO_GET_AN_EXTERNAL_FEED_BY_UUID: "Action" + BREVO_GET_AN_SMS_CAMPAIGN: "Action" + BREVO_GET_A_CATEGORY_DETAILS: "Action" + BREVO_GET_A_CHILD_ACCOUNT_S_DETAILS: "Action" + BREVO_GET_A_COMPANY: "Action" + BREVO_GET_A_CONTACT_S_DETAILS: "Action" + BREVO_GET_A_COUPON_COLLECTION_BY_ID: "Action" + BREVO_GET_A_DEAL: "Action" + BREVO_GET_A_GROUP_DETAILS: "Action" + BREVO_GET_A_LIST_S_DETAILS: "Action" + BREVO_GET_A_MESSAGE: "Action" + BREVO_GET_A_NOTE: "Action" + BREVO_GET_A_PIPELINE: "Action" + BREVO_GET_A_PRODUCT_S_DETAILS: "Action" + BREVO_GET_A_SHARED_TEMPLATE_URL: "Action" + BREVO_GET_A_TASK: "Action" + BREVO_GET_A_WEBHOOK_DETAILS: "Action" + BREVO_GET_A_WHATS_APP_CAMPAIGN: "Action" + BREVO_GET_COMPANY_ATTRIBUTES: "Action" + BREVO_GET_CONTACTS_IN_A_LIST: "Action" + BREVO_GET_DEAL_ATTRIBUTES: "Action" + BREVO_GET_EMAIL_CAMPAIGNS_STATISTICS_FOR_A_CONTACT: "Action" + BREVO_GET_FILE_DETAILS: "Action" + BREVO_GET_LISTS_IN_A_FOLDER: "Action" + BREVO_GET_ORDER_DETAILS: "Action" + BREVO_GET_PIPELINE_STAGES: "Action" + BREVO_GET_SESSION_TOKEN_TO_ACCESS_BREVO_SSO: "Action" + BREVO_GET_SUB_ACCOUNT_DETAILS: "Action" + BREVO_GET_THE_DETAILS_OF_REQUESTED_MASTER_ACCOUNT: "Action" + BREVO_GET_THE_LIST_OF_ALL_ADMIN_USERS: "Action" + BREVO_GET_THE_LIST_OF_ALL_CHILDREN_ACCOUNTS: "Action" + BREVO_GET_THE_LIST_OF_ALL_THE_EVENTS_FOR_THE_RECEIVED_EMAILS: "Action" + BREVO_GET_THE_LIST_OF_ALL_THE_SUB_ACCOUNTS_OF_THE_MASTER_ACCOUNT: "Action" + BREVO_GET_THE_LIST_OF_ALL_YOUR_DOMAINS: "Action" + BREVO_GET_THE_LIST_OF_ALL_YOUR_SENDERS: "Action" + BREVO_GET_THE_LIST_OF_ALL_YOUR_USERS: "Action" + BREVO_GET_THE_LIST_OF_BLOCKED_DOMAINS: "Action" + BREVO_GET_THE_LIST_OF_BLOCKED_OR_UNSUBSCRIBED_TRANSACTIONAL_CONTACTS: "Action" + BREVO_GET_THE_LIST_OF_EMAIL_TEMPLATES: "Action" + BREVO_GET_THE_LIST_OF_GROUPS: "Action" + BREVO_GET_THE_PERSONALIZED_CONTENT_OF_A_SENT_TRANSACTIONAL_EMAIL: "Action" + BREVO_GET_USER_ACTIVITY_LOGS: "Action" + BREVO_GET_YOUR_ACCOUNT_INFORMATION_PLAN_AND_CREDITS_DETAILS: "Action" + BREVO_GET_YOUR_SMS_ACTIVITY_AGGREGATED_OVER_A_PERIOD_OF_TIME: "Action" + BREVO_GET_YOUR_SMS_ACTIVITY_AGGREGATED_PER_DAY: "Action" + BREVO_GET_YOUR_TRANSACTIONAL_EMAIL_ACTIVITY_AGGREGATED_PER_DAY: "Action" + BREVO_GET_YOUR_WHATS_APP_API_ACCOUNT_INFORMATION: "Action" + BREVO_IMPORT_CONTACTS: "Action" + BREVO_LINK_AND_UNLINK_A_DEAL_WITH_CONTACTS_AND_COMPANIES: "Action" + BREVO_LINK_AND_UNLINK_COMPANY_WITH_CONTACT_AND_DEAL: "Action" + BREVO_LIST_ALL_ATTRIBUTES: "Action" + BREVO_MANAGING_THE_STATUS_OF_THE_ORDER: "Action" + BREVO_REMOVE_EMAIL_AND_OR_SMS_CREDITS_FROM_A_SPECIFIC_CHILD_ACCOUNT: "Action" + BREVO_REMOVE_RESELLER_CHILD_S_SENDER_DOMAIN: "Action" + BREVO_RESEND_CANCEL_ADMIN_USER_INVITATION: "Action" + BREVO_RESEND_CANCEL_INVITATION: "Action" + BREVO_RETRIEVE_INBOUND_ATTACHMENT_WITH_DOWNLOAD_TOKEN: "Action" + BREVO_RETURNS_A_FOLDER_S_DETAILS: "Action" + BREVO_RETURNS_THE_INFORMATION_FOR_ALL_YOUR_CREATED_SMS_CAMPAIGNS: "Action" + BREVO_RETURNS_THE_TEMPLATE_INFORMATION: "Action" + BREVO_RETURN_ALL_THE_PROCESSES_FOR_YOUR_ACCOUNT: "Action" + BREVO_RETURN_ALL_YOUR_CATEGORIES: "Action" + BREVO_RETURN_ALL_YOUR_CREATED_EMAIL_CAMPAIGNS: "Action" + BREVO_RETURN_ALL_YOUR_CREATED_WHATS_APP_CAMPAIGNS: "Action" + BREVO_RETURN_ALL_YOUR_CREATED_WHATS_APP_TEMPLATES: "Action" + BREVO_RETURN_ALL_YOUR_PRODUCTS: "Action" + BREVO_RETURN_THE_INFORMATIONS_FOR_A_PROCESS: "Action" + BREVO_REVOKE_AN_ADMIN_USER: "Action" + BREVO_REVOKE_USER_PERMISSION: "Action" + BREVO_SEND_AN_AUTOMATED_MESSAGE_TO_A_VISITOR: "Action" + BREVO_SEND_AN_EMAIL_CAMPAIGN_IMMEDIATELY_BASED_ON_CAMPAIGN_ID: "Action" + BREVO_SEND_AN_EMAIL_CAMPAIGN_TO_YOUR_TEST_LIST: "Action" + BREVO_SEND_AN_SMS_CAMPAIGN_S_REPORT: "Action" + BREVO_SEND_A_MESSAGE_AS_AN_AGENT: "Action" + BREVO_SEND_A_TEMPLATE_TO_YOUR_TEST_LIST: "Action" + BREVO_SEND_A_TEST_SMS_CAMPAIGN: "Action" + BREVO_SEND_A_TRANSACTIONAL_EMAIL: "Action" + BREVO_SEND_A_WHATS_APP_MESSAGE: "Action" + BREVO_SEND_INVITATION_TO_AN_ADMIN_USER: "Action" + BREVO_SEND_INVITATION_TO_USER: "Action" + BREVO_SEND_SMS_MESSAGE_TO_A_MOBILE_NUMBER: "Action" + BREVO_SEND_THE_REPORT_OF_A_CAMPAIGN: "Action" + BREVO_SEND_YOUR_SMS_CAMPAIGN_IMMEDIATELY: "Action" + BREVO_SEND_YOUR_WHATS_APP_TEMPLATE_FOR_APPROVAL: "Action" + BREVO_SETS_AGENT_S_STATUS_TO_ONLINE_FOR_2_3_MINUTES: "Action" + BREVO_UNBLOCK_AN_EXISTING_DOMAIN_FROM_THE_LIST_OF_BLOCKED_DOMAINS: "Action" + BREVO_UNBLOCK_OR_RESUBSCRIBE_A_TRANSACTIONAL_CONTACT: "Action" + BREVO_UPDATE_AN_AUTOMATED_MESSAGE: "Action" + BREVO_UPDATE_AN_EMAIL_CAMPAIGN: "Action" + BREVO_UPDATE_AN_EMAIL_CAMPAIGN_STATUS: "Action" + BREVO_UPDATE_AN_EMAIL_TEMPLATE: "Action" + BREVO_UPDATE_AN_EXTERNAL_FEED: "Action" + BREVO_UPDATE_AN_SMS_CAMPAIGN: "Action" + BREVO_UPDATE_A_CAMPAIGN_S_STATUS: "Action" + BREVO_UPDATE_A_COMPANY: "Action" + BREVO_UPDATE_A_CONTACT: "Action" + BREVO_UPDATE_A_COUPON_COLLECTION_BY_ID: "Action" + BREVO_UPDATE_A_DEAL: "Action" + BREVO_UPDATE_A_FOLDER: "Action" + BREVO_UPDATE_A_GROUP_OF_SUB_ACCOUNTS: "Action" + BREVO_UPDATE_A_LIST: "Action" + BREVO_UPDATE_A_MESSAGE_SENT_BY_AN_AGENT: "Action" + BREVO_UPDATE_A_NOTE: "Action" + BREVO_UPDATE_A_SENDER: "Action" + BREVO_UPDATE_A_TASK: "Action" + BREVO_UPDATE_A_WEBHOOK: "Action" + BREVO_UPDATE_A_WHATS_APP_CAMPAIGN: "Action" + BREVO_UPDATE_CHILD_ACCOUNT_STATUS_BY_IDENTIFIER: "Action" + BREVO_UPDATE_CHILD_INFO_BASED_ON_ID: "Action" + BREVO_UPDATE_CONTACT_ATTRIBUTE: "Action" + BREVO_UPDATE_MULTIPLE_CONTACTS: "Action" + BREVO_UPDATE_PERMISSION_FOR_A_USER: "Action" + BREVO_UPDATE_RESELLER_CHILD_S_SENDER_DOMAIN: "Action" + BREVO_UPDATE_SUB_ACCOUNT_PLAN: "Action" + BREVO_UPLOAD_AN_IMAGE_TO_YOUR_ACCOUNT_S_IMAGE_GALLERY: "Action" + BREVO_UPLOAD_A_FILE: "Action" + BREVO_VALIDATE_DOMAIN_CONFIGURATION: "Action" + BREVO_VALIDATE_SENDER_USING_OTP: "Action" BROWSERBASE_TOOL_BROWSERBASE_LOAD_TOOL: "Action" BROWSER_TOOL_CLICK_ELEMENT: "Action" BROWSER_TOOL_GET_ELEMENT_DETAILS: "Action" @@ -576,15 +791,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): CODE_ANALYSIS_TOOL_GET_METHOD_SIGNATURE: "Action" CODE_ANALYSIS_TOOL_GET_RELEVANT_CODE: "Action" CODE_FORMAT_TOOL_FORMAT_AND_LINT_CODEBASE: "Action" - CODE_GREP_TOOL_SEARCH_CODEBASE: "Action" - CODE_INDEX_TOOL_CREATE_INDEX: "Action" - CODE_INDEX_TOOL_INDEX_STATUS: "Action" - CODE_INDEX_TOOL_SEARCH_CODEBASE: "Action" - CODE_MAP_TOOL_DELETE_REPO_MAP: "Action" - CODE_MAP_TOOL_GENERATE_RANKED_TAGS: "Action" - CODE_MAP_TOOL_GET_REPO_MAP: "Action" - CODE_MAP_TOOL_GET_REPO_STRUCTURE: "Action" - CODE_MAP_TOOL_INIT_REPO_MAP: "Action" COMPOSIO_CHECK_ACTIVE_CONNECTION: "Action" COMPOSIO_ENABLE_TRIGGER: "Action" COMPOSIO_EXECUTE_ACTION: "Action" @@ -950,7 +1156,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): DISCORD_UPDATE_WEBHOOK: "Action" DISCORD_UPDATE_WEBHOOK_BY_TOKEN: "Action" DISCORD_UPDATE_WEBHOOK_MESSAGE: "Action" - DROPBOX_GET_ABOUT_ME: "Action" ELEVENLABS_ADD_A_PRONUNCIATION_DICTIONARY: "Action" ELEVENLABS_ADD_PROJECT: "Action" ELEVENLABS_ADD_RULES_TO_THE_PRONUNCIATION_DICTIONARY: "Action" @@ -1051,7 +1256,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): FIGMA_RENDER_IMAGES_OF_FILE_NODES: "Action" FIGMA_UPDATE_A_WEBHOOK: "Action" FIGMA_UPDATE_DEV_RESOURCES: "Action" - FILETOOL_APPLY_PATCH: "Action" FILETOOL_CHANGE_WORKING_DIRECTORY: "Action" FILETOOL_CREATE_FILE: "Action" FILETOOL_EDIT_FILE: "Action" @@ -2295,7 +2499,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): JIRA_CHANGE_ORDER_OF_ISSUE_TYPES: "Action" JIRA_CHECK_ISSUES_AGAINST_JQL: "Action" JIRA_CLASSIC_UPDATE_WORKFLOW_SCHEME: "Action" - JIRA_CONFIGURE_WORKFLOW_ISSUE_TYPES_LINKAGE: "Action" JIRA_CONVERT_USER_IDENTIFIERS_TO_ACCOUNT_IDS_IN_JQL_QUERIES: "Action" JIRA_COPY_DASHBOARD: "Action" JIRA_CREATE_COMPONENT: "Action" @@ -2644,6 +2847,7 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): JIRA_GET_WORKLOGS: "Action" JIRA_GET_WORKLOG_PROPERTY: "Action" JIRA_GET_WORKLOG_PROPERTY_KEYS: "Action" + JIRA_MAP_ISSUE_TYPES_TO_SCHEME_WORKFLOWS: "Action" JIRA_MERGE_VERSIONS: "Action" JIRA_MOVE_CUSTOM_FIELD_TO_TRASH: "Action" JIRA_MOVE_PRIORITIES: "Action" @@ -2769,6 +2973,12 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): JIRA_VALIDATE_CREATE_WORKFLOWS: "Action" JIRA_VALIDATE_PROJECT_KEY: "Action" JIRA_VALIDATE_UPDATE_WORKFLOWS: "Action" + JUNGLESCOUT_QUERY_THE_PRODUCT_DATABASE: "Action" + JUNGLESCOUT_RETRIEVE_DATA_FOR_A_SPECIFIC_KEYWORD_QUERY: "Action" + JUNGLESCOUT_RETRIEVE_HISTORICAL_SEARCH_VOLUME_DATA_FOR_SPECIFIED_KEYWORDS: "Action" + JUNGLESCOUT_RETRIEVE_KEYWORD_DATA_FOR_SPECIFIED_ASINS: "Action" + JUNGLESCOUT_RETRIEVE_SALES_ESTIMATES_DATA: "Action" + JUNGLESCOUT_RETRIEVE_SHARE_OF_VOICE_DATA: "Action" KLAVIYO_ADD_PROFILE_TO_LIST: "Action" KLAVIYO_ASSIGN_CAMPAIGN_MESSAGE_TEMPLATE: "Action" KLAVIYO_BULK_CREATE_CLIENT_EVENTS: "Action" @@ -3999,7 +4209,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): SALESFORCE_UPDATE_LEAD_BY_ID_WITH_JSON_PAYLOAD: "Action" SALESFORCE_UPDATE_OPPORTUNITY_BY_ID: "Action" SALESFORCE_UPDATE_SPECIFIC_NOTE_BY_ID: "Action" - SCHEDULER_SCHEDULE_JOB_ACTION: "Action" SERPAPI_DUCK_DUCK_GO_SEARCH: "Action" SERPAPI_EVENT_SEARCH: "Action" SERPAPI_FINANCE_SEARCH: "Action" @@ -4382,26 +4591,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): SPIDERTOOL_CRAWL: "Action" SPIDERTOOL_SCRAPE: "Action" SQLTOOL_SQL_QUERY: "Action" - TASKADE_ASSIGN_HANDLES_TO_TASK: "Action" - TASKADE_COMPLETE_A_PROJECT_TASK: "Action" - TASKADE_COPY_PROJECT_TO_SPECIFIED_FOLDER: "Action" - TASKADE_CREATE_AGENT_IN_FOLDER_WITH_CUSTOMIZABLE_DATA_AND_PERSONA: "Action" - TASKADE_CREATE_OR_UPDATE_TASK_DATE: "Action" - TASKADE_CREATE_PROJECT_IN_FOLDER: "Action" - TASKADE_CREATE_PROJECT_IN_WORKSPACE: "Action" - TASKADE_CREATE_PROJECT_TASKS_WITH_DETAILED_OPTIONS: "Action" - TASKADE_DELETE_PROJECT_TASK: "Action" - TASKADE_DELETE_TASK_DATE: "Action" - TASKADE_ENABLE_AGENT_PUBLIC_ACCESS: "Action" - TASKADE_ENABLE_PROJECT_SHARE_LINK: "Action" - TASKADE_GET_ALL_PROJECTS_WITHIN_A_SPECIFIED_FOLDER: "Action" - TASKADE_GET_MY_PROJECTS_WITH_SORTING_AND_PAGINATION: "Action" - TASKADE_GET_PROJECT_S_SHARE_LINK_INFO: "Action" - TASKADE_GET_WORKSPACE_FOLDERS: "Action" - TASKADE_REMOVE_TASK_ASSIGNEE: "Action" - TASKADE_RETRIEVE_DETAILED_TASK_INFORMATION: "Action" - TASKADE_RETRIEVE_PROJECT_TASKS_WITH_PAGINATION_OPTIONS: "Action" - TASKADE_RETRIEVE_USER_S_WORKSPACES: "Action" TAVILY_TAVILY_SEARCH: "Action" TRELLO_ACTION_GET_BY_ID: "Action" TRELLO_ACTION_GET_LIST_BY_ID_ACTION: "Action" @@ -4464,9 +4653,7 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TRELLO_DELETE_CHECKLISTS_BY_ID_CHECKLIST: "Action" TRELLO_DELETE_CHECKLISTS_CHECK_ITEMS_BY_ID_CHECKLIST_BY_ID_CHECK_ITEM: "Action" TRELLO_DELETE_LABELS_BY_ID_LABEL: "Action" - TRELLO_DELETE_MEMBERS_BOARD_BACKGROUNDS_BY_ID_MEMBER_BY_ID_BOARD_BACKGROUND: ( - "Action" - ) + TRELLO_DELETE_MEMBERS_BOARD_BACKGROUNDS_BY_ID_MEMBER_BY_ID_BOARD_BACKGROUND: "Action" TRELLO_DELETE_MEMBERS_BOARD_STARS_BY_ID_MEMBER_BY_ID_BOARD_STAR: "Action" TRELLO_DELETE_MEMBERS_CUSTOM_STICKERS_BY_ID_MEMBER_BY_ID_CUSTOM_STICKER: "Action" TRELLO_DELETE_MEMBERS_SAVED_SEARCHES_BY_ID_MEMBER_BY_ID_SAVED_SEARCH: "Action" @@ -4566,9 +4753,7 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TRELLO_GET_MEMBERS_CARDS_BY_ID_MEMBER: "Action" TRELLO_GET_MEMBERS_CARDS_BY_ID_MEMBER_BY_FILTER: "Action" TRELLO_GET_MEMBERS_CUSTOM_BOARD_BACKGROUNDS_BY_ID_MEMBER: "Action" - TRELLO_GET_MEMBERS_CUSTOM_BOARD_BACKGROUNDS_BY_ID_MEMBER_BY_ID_BOARD_BACKGROUND: ( - "Action" - ) + TRELLO_GET_MEMBERS_CUSTOM_BOARD_BACKGROUNDS_BY_ID_MEMBER_BY_ID_BOARD_BACKGROUND: "Action" TRELLO_GET_MEMBERS_CUSTOM_EMOJI_BY_ID_MEMBER: "Action" TRELLO_GET_MEMBERS_CUSTOM_EMOJI_BY_ID_MEMBER_BY_ID_CUSTOM_EMOJI: "Action" TRELLO_GET_MEMBERS_CUSTOM_STICKERS_BY_ID_MEMBER: "Action" @@ -4697,9 +4882,7 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TRELLO_UPDATE_LISTS_SUBSCRIBED_BY_ID_LIST: "Action" TRELLO_UPDATE_MEMBERS_AVATAR_SOURCE_BY_ID_MEMBER: "Action" TRELLO_UPDATE_MEMBERS_BIO_BY_ID_MEMBER: "Action" - TRELLO_UPDATE_MEMBERS_BOARD_BACKGROUNDS_BY_ID_MEMBER_BY_ID_BOARD_BACKGROUND: ( - "Action" - ) + TRELLO_UPDATE_MEMBERS_BOARD_BACKGROUNDS_BY_ID_MEMBER_BY_ID_BOARD_BACKGROUND: "Action" TRELLO_UPDATE_MEMBERS_BOARD_STARS_BY_ID_MEMBER_BY_ID_BOARD_STAR: "Action" TRELLO_UPDATE_MEMBERS_BOARD_STARS_ID_BOARD_BY_ID_MEMBER_BY_ID_BOARD_STAR: "Action" TRELLO_UPDATE_MEMBERS_BOARD_STARS_POS_BY_ID_MEMBER_BY_ID_BOARD_STAR: "Action" @@ -4727,12 +4910,8 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TRELLO_UPDATE_ORGANIZATIONS_NAME_BY_ID_ORG: "Action" TRELLO_UPDATE_ORGANIZATIONS_PREFS_ASSOCIATED_DOMAIN_BY_ID_ORG: "Action" TRELLO_UPDATE_ORGANIZATIONS_PREFS_BOARD_VISIBILITY_RESTRICT_ORG_BY_ID_ORG: "Action" - TRELLO_UPDATE_ORGANIZATIONS_PREFS_BOARD_VISIBILITY_RESTRICT_PRIVATE_BY_ID_ORG: ( - "Action" - ) - TRELLO_UPDATE_ORGANIZATIONS_PREFS_BOARD_VISIBILITY_RESTRICT_PUBLIC_BY_ID_ORG: ( - "Action" - ) + TRELLO_UPDATE_ORGANIZATIONS_PREFS_BOARD_VISIBILITY_RESTRICT_PRIVATE_BY_ID_ORG: "Action" + TRELLO_UPDATE_ORGANIZATIONS_PREFS_BOARD_VISIBILITY_RESTRICT_PUBLIC_BY_ID_ORG: "Action" TRELLO_UPDATE_ORGANIZATIONS_PREFS_EXTERNAL_MEMBERS_DISABLED_BY_ID_ORG: "Action" TRELLO_UPDATE_ORGANIZATIONS_PREFS_GOOGLE_APPS_VERSION_BY_ID_ORG: "Action" TRELLO_UPDATE_ORGANIZATIONS_PREFS_ORG_INVITE_RESTRICT_BY_ID_ORG: "Action" @@ -4762,8 +4941,6 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TWITTER_DELETE_LIST: "Action" TWITTER_FETCH_LIST_MEMBERS_BY_ID: "Action" TWITTER_FETCH_SPACE_TICKET_BUYERS_LIST: "Action" - TWITTER_FILTERED_STREAM: "Action" - TWITTER_FIREHOSE_STREAM: "Action" TWITTER_FOLLOWERS_BY_USER_ID: "Action" TWITTER_FOLLOWING_BY_USER_ID: "Action" TWITTER_FOLLOW_A_LIST: "Action" @@ -4779,15 +4956,11 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TWITTER_GET_RECENT_DM_EVENTS: "Action" TWITTER_GET_USER_S_FOLLOWED_LISTS: "Action" TWITTER_HIDE_REPLIES: "Action" - TWITTER_LIKES_COMPLIANCE_STREAM: "Action" - TWITTER_LIKES_FIREHOSE_STREAM: "Action" - TWITTER_LIKES_SAMPLE_10_STREAM: "Action" TWITTER_LIST_COMPLIANCE_JOBS: "Action" TWITTER_LIST_LOOKUP_BY_LIST_ID: "Action" TWITTER_LIST_POSTS_TIMELINE_BY_LIST_ID: "Action" TWITTER_MUTE_USER_BY_USER_ID: "Action" TWITTER_PIN_A_LIST: "Action" - TWITTER_POSTS_COMPLIANCE_STREAM: "Action" TWITTER_POSTS_LABEL_STREAM: "Action" TWITTER_POST_DELETE_BY_POST_ID: "Action" TWITTER_POST_LOOKUP_BY_POST_ID: "Action" @@ -4808,30 +4981,23 @@ class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE): TWITTER_RETURNS_USER_OBJECTS_THAT_FOLLOW_A_LIST_BY_THE_PROVIDED_LIST_ID: "Action" TWITTER_RETURNS_USER_OBJECTS_THAT_HAVE_LIKED_THE_PROVIDED_POST_ID: "Action" TWITTER_RETURNS_USER_OBJECTS_THAT_HAVE_RETWEETED_THE_PROVIDED_POST_ID: "Action" - TWITTER_RULES_COUNT: "Action" - TWITTER_RULES_LOOKUP: "Action" - TWITTER_SAMPLE_STREAM: "Action" TWITTER_SEARCH_FOR_SPACES: "Action" TWITTER_SEND_A_NEW_MESSAGE_TO_A_DM_CONVERSATION: "Action" TWITTER_SEND_A_NEW_MESSAGE_TO_A_USER: "Action" TWITTER_SPACE_LOOKUP_BY_SPACE_ID: "Action" TWITTER_SPACE_LOOKUP_BY_THEIR_CREATORS: "Action" TWITTER_SPACE_LOOKUP_UP_SPACE_IDS: "Action" - TWITTER_TRENDS: "Action" TWITTER_UNFOLLOW_A_LIST: "Action" TWITTER_UNFOLLOW_USER: "Action" TWITTER_UNMUTE_USER_BY_USER_ID: "Action" TWITTER_UNPIN_A_LIST: "Action" TWITTER_UPDATE_LIST: "Action" - TWITTER_USERS_COMPLIANCE_STREAM: "Action" TWITTER_USER_HOME_TIMELINE_BY_USER_ID: "Action" TWITTER_USER_LOOKUP_BY_ID: "Action" TWITTER_USER_LOOKUP_BY_IDS: "Action" TWITTER_USER_LOOKUP_BY_USERNAME: "Action" TWITTER_USER_LOOKUP_BY_USERNAMES: "Action" TWITTER_USER_LOOKUP_ME: "Action" - TWITTER_USER_SEARCH: "Action" - TYPEFORM_GET_ABOUT_ME: "Action" WEATHERMAP_WEATHER: "Action" WEBTOOL_SCRAPE_WEBSITE_CONTENT: "Action" WEBTOOL_SCRAPE_WEBSITE_ELEMENT: "Action" @@ -5251,36 +5417,6 @@ def SLACK_USERS_LOOKUP_BY_EMAIL(cls) -> "Action": def SLACK_USERS_PROFILE_GET_PROFILE_INFO(cls) -> "Action": return cls.SLACK_RETRIEVE_USER_PROFILE_INFORMATION - @classmethod # type: ignore - @property - @te.deprecated("Use TASKADE_CREATE_PROJECT_TASKS_WITH_DETAILED_OPTIONS instead.") - def TASKADE_CREATE_TASK_IN_PROJECT(cls) -> "Action": - return cls.TASKADE_CREATE_PROJECT_TASKS_WITH_DETAILED_OPTIONS - - @classmethod # type: ignore - @property - @te.deprecated("Use TASKADE_GET_WORKSPACE_FOLDERS instead.") - def TASKADE_GET_ALL_FOLDERS_FOR_WORKSPACE(cls) -> "Action": - return cls.TASKADE_GET_WORKSPACE_FOLDERS - - @classmethod # type: ignore - @property - @te.deprecated("Use TASKADE_GET_MY_PROJECTS_WITH_SORTING_AND_PAGINATION instead.") - def TASKADE_GET_ALL_PROJECTS_MINE(cls) -> "Action": - return cls.TASKADE_GET_MY_PROJECTS_WITH_SORTING_AND_PAGINATION - - @classmethod # type: ignore - @property - @te.deprecated("Use TASKADE_RETRIEVE_USER_S_WORKSPACES instead.") - def TASKADE_GET_ALL_WORKSPACES_FOR_USER(cls) -> "Action": - return cls.TASKADE_RETRIEVE_USER_S_WORKSPACES - - @classmethod # type: ignore - @property - @te.deprecated("Use TASKADE_RETRIEVE_DETAILED_TASK_INFORMATION instead.") - def TASKADE_GET_TASK_WITH_ID(cls) -> "Action": - return cls.TASKADE_RETRIEVE_DETAILED_TASK_INFORMATION - @classmethod # type: ignore @property @te.deprecated("Use TRELLO_GET_ACTIONS_BOARD_BY_ID_ACTION instead.") @@ -5418,11 +5554,6 @@ def TRELLO_TOKEN_GET_MEMBER_BY_TOKEN(cls) -> "Action": "SLACK_USERS_LIST": "SLACK_LIST_ALL_SLACK_TEAM_USERS_WITH_PAGINATION", "SLACK_USERS_LOOKUP_BY_EMAIL": "SLACK_FIND_USER_BY_EMAIL_ADDRESS", "SLACK_USERS_PROFILE_GET_PROFILE_INFO": "SLACK_RETRIEVE_USER_PROFILE_INFORMATION", - "TASKADE_CREATE_TASK_IN_PROJECT": "TASKADE_CREATE_PROJECT_TASKS_WITH_DETAILED_OPTIONS", - "TASKADE_GET_ALL_FOLDERS_FOR_WORKSPACE": "TASKADE_GET_WORKSPACE_FOLDERS", - "TASKADE_GET_ALL_PROJECTS_MINE": "TASKADE_GET_MY_PROJECTS_WITH_SORTING_AND_PAGINATION", - "TASKADE_GET_ALL_WORKSPACES_FOR_USER": "TASKADE_RETRIEVE_USER_S_WORKSPACES", - "TASKADE_GET_TASK_WITH_ID": "TASKADE_RETRIEVE_DETAILED_TASK_INFORMATION", "TRELLO_ACTION_GET_BOARD_BY_ID_ACTION": "TRELLO_GET_ACTIONS_BOARD_BY_ID_ACTION", "TRELLO_BOARD_CREATE_BOARD": "TRELLO_ADD_BOARDS", "TRELLO_BOARD_FILTER_CARDS_BY_ID_BOARD": "TRELLO_GET_BOARDS_CARDS_BY_ID_BOARD_BY_FILTER", diff --git a/python/composio/client/enums/_app.py b/python/composio/client/enums/_app.py index 9df6100401..8b06b30ea6 100644 --- a/python/composio/client/enums/_app.py +++ b/python/composio/client/enums/_app.py @@ -16,23 +16,19 @@ class App(_AnnotatedEnum[AppData], path=APPS_CACHE): """Class to represent `App` entity.""" - APIFY: "App" ASANA: "App" ATTIO: "App" BAMBOOHR: "App" + BREVO: "App" BROWSERBASE_TOOL: "App" BROWSER_TOOL: "App" CLICKUP: "App" CODEINTERPRETER: "App" CODE_ANALYSIS_TOOL: "App" CODE_FORMAT_TOOL: "App" - CODE_GREP_TOOL: "App" - CODE_INDEX_TOOL: "App" - CODE_MAP_TOOL: "App" COMPOSIO: "App" DISCORD: "App" DISCORDBOT: "App" - DROPBOX: "App" ELEVENLABS: "App" EMBED_TOOL: "App" EXA: "App" @@ -55,6 +51,7 @@ class App(_AnnotatedEnum[AppData], path=APPS_CACHE): IMAGE_ANALYSER: "App" INDUCED_AI: "App" JIRA: "App" + JUNGLESCOUT: "App" KLAVIYO: "App" LINEAR: "App" LISTENNOTES: "App" @@ -68,7 +65,6 @@ class App(_AnnotatedEnum[AppData], path=APPS_CACHE): POSTHOG: "App" RAGTOOL: "App" SALESFORCE: "App" - SCHEDULER: "App" SERPAPI: "App" SHELLTOOL: "App" SLACK: "App" @@ -76,11 +72,9 @@ class App(_AnnotatedEnum[AppData], path=APPS_CACHE): SNOWFLAKE: "App" SPIDERTOOL: "App" SQLTOOL: "App" - TASKADE: "App" TAVILY: "App" TRELLO: "App" TWITTER: "App" - TYPEFORM: "App" WEATHERMAP: "App" WEBTOOL: "App" WORKSPACE_TOOL: "App" diff --git a/python/composio/client/enums/_tag.py b/python/composio/client/enums/_tag.py index 12833f6428..dd8924dcc1 100644 --- a/python/composio/client/enums/_tag.py +++ b/python/composio/client/enums/_tag.py @@ -1,7 +1,6 @@ """ Tag enums. """ - from composio.client.enums.base import TAGS_CACHE, TagData, _AnnotatedEnum, enum @@ -79,6 +78,33 @@ class Tag(_AnnotatedEnum[TagData], path=TAGS_CACHE): BAMBOOHR_TIME_TRACKING___PRIVATE_BETA: "Tag" BAMBOOHR_TRAINING: "Tag" BAMBOOHR_WEBHOOKS: "Tag" + BREVO_ACCOUNT: "Tag" + BREVO_COMPANIES: "Tag" + BREVO_CONTACTS: "Tag" + BREVO_CONVERSATIONS: "Tag" + BREVO_COUPONS: "Tag" + BREVO_DEALS: "Tag" + BREVO_DOMAINS: "Tag" + BREVO_ECOMMERCE: "Tag" + BREVO_EMAIL_CAMPAIGNS: "Tag" + BREVO_EVENT: "Tag" + BREVO_EXTERNAL_FEEDS: "Tag" + BREVO_FILES: "Tag" + BREVO_IMPORTANT: "Tag" + BREVO_INBOUND_PARSING: "Tag" + BREVO_MASTER_ACCOUNT: "Tag" + BREVO_NOTES: "Tag" + BREVO_PROCESS: "Tag" + BREVO_RESELLER: "Tag" + BREVO_SENDERS: "Tag" + BREVO_SMS_CAMPAIGNS: "Tag" + BREVO_TASKS: "Tag" + BREVO_TRANSACTIONAL_EMAILS: "Tag" + BREVO_TRANSACTIONAL_SMS: "Tag" + BREVO_TRANSACTIONAL_WHATSAPP: "Tag" + BREVO_USER: "Tag" + BREVO_WEBHOOKS: "Tag" + BREVO_WHATSAPP_CAMPAIGNS: "Tag" CLICKUP_ATTACHMENTS: "Tag" CLICKUP_AUTHORIZATION: "Tag" CLICKUP_COMMENTS: "Tag" @@ -551,13 +577,6 @@ class Tag(_AnnotatedEnum[TagData], path=TAGS_CACHE): SLACK_USERS_PROFILE: "Tag" SLACK_VIEWS: "Tag" SLACK_WORKFLOWS: "Tag" - TASKADE_AGENT: "Tag" - TASKADE_FOLDER: "Tag" - TASKADE_IMPORTANT: "Tag" - TASKADE_ME: "Tag" - TASKADE_PROJECT: "Tag" - TASKADE_TASK: "Tag" - TASKADE_WORKSPACE: "Tag" TRELLO_ACTION: "Tag" TRELLO_BATCH: "Tag" TRELLO_BOARD: "Tag" @@ -579,10 +598,8 @@ class Tag(_AnnotatedEnum[TagData], path=TAGS_CACHE): TWITTER_DIRECT_MESSAGES: "Tag" TWITTER_GENERAL: "Tag" TWITTER_IMPORTANT: "Tag" - TWITTER_LIKES: "Tag" TWITTER_LISTS: "Tag" TWITTER_SPACES: "Tag" - TWITTER_TRENDS: "Tag" TWITTER_TWEETS: "Tag" TWITTER_USAGE: "Tag" TWITTER_USERS: "Tag" diff --git a/python/composio/tools/local/codegrep/__init__.py b/python/composio/tools/local/codegrep/__init__.py deleted file mode 100644 index 773c75f850..0000000000 --- a/python/composio/tools/local/codegrep/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -Code index tool. -""" - -from .tool import CodeGrepTool diff --git a/python/composio/tools/local/codegrep/actions/__init__.py b/python/composio/tools/local/codegrep/actions/__init__.py deleted file mode 100644 index 2556fd229d..0000000000 --- a/python/composio/tools/local/codegrep/actions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .grep_code import SearchCodebase diff --git a/python/composio/tools/local/codegrep/actions/grep_code.py b/python/composio/tools/local/codegrep/actions/grep_code.py deleted file mode 100644 index e80803bc22..0000000000 --- a/python/composio/tools/local/codegrep/actions/grep_code.py +++ /dev/null @@ -1,90 +0,0 @@ -from pathlib import Path -from typing import List, Optional - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.base.utils.grep_utils import grep_util - - -class CodeSearchRequest(BaseModel): - query: str = Field( - ..., - description="""The search pattern or regular expression to find in the codebase. -Use this to locate specific code constructs, function definitions, -variable names, or text patterns.""", - examples=["def main(", "TODO:", "import numpy"], - ) - code_directory: str = Field( - default=str(Path.home()), - description="""The code directory to start the search from. -This should be the top-level folder of your project or codebase. -If not specified, the search will start from the user's home directory. -""", - examples=["/path/to/project", "/home/user/workspace/my-app"], - ) - file_paths: List[str] = Field( - default=None, - description="""A list of specific file paths to search within. -Use this when you want to limit the search to particular files or subdirectories. -If not provided, the search will cover all files under the root_directory.""", - examples=[ - ["/path/to/project/src/main.py", "/path/to/project/tests/test_main.py"], - ["app/models.py", "app/views.py", "app/controllers.py"], - ], - ) - - -class SearchResult(BaseModel): - file_path: str - matched_content: str - - -class CodeSearchResponse(BaseModel): - matches: List[SearchResult] = Field( - ..., - description="A list of search results, each containing the file path and the matched content.", - ) - error: Optional[str] = Field( - default=None, - description="An error message describing any issues encountered during the search process. This field is None if the search was successful.", - ) - - -class SearchCodebase(LocalAction[CodeSearchRequest, CodeSearchResponse]): - """ - Performs an advanced search across a codebase using regex patterns, similar to the grep command but optimized for large-scale software projects. - - This action is ideal for when you need to quickly locate specific code patterns, function definitions, or text within a large codebase. It's particularly useful for: - - Finding all occurrences of a particular function or class - - Locating TODO comments or specific error handling patterns - - Identifying usage of certain libraries or API calls - - Searching for potential security vulnerabilities or code smells - - The search is performed efficiently and can handle large codebases by leveraging optimized search algorithms and respecting version control ignore files. - - Example usage: # Searches for function definitions starting with 'process_data' - search_request = - query="def process_data(", - code_directory="/project", - - This action provides a powerful tool for code analysis, refactoring assistance, and codebase exploration tasks. - """ - - display_name = "Advanced Codebase Search" - _tags = ["search", "code-analysis"] - - def execute(self, request: CodeSearchRequest, metadata: dict) -> CodeSearchResponse: - search_paths = request.file_paths or [request.code_directory] - grep_results = grep_util( - pattern=request.query, - filenames=search_paths, - no_gitignore=False, - ) - formatted_results = [ - SearchResult( - file_path=result["filename"], matched_content=result["matches"] - ) - for result in grep_results - ] - return CodeSearchResponse(matches=formatted_results) diff --git a/python/composio/tools/local/codegrep/tool.py b/python/composio/tools/local/codegrep/tool.py deleted file mode 100644 index 235db39eec..0000000000 --- a/python/composio/tools/local/codegrep/tool.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Code grep tool for Composio. -""" - -import typing as t - -from composio.tools.base.local import LocalAction, LocalTool - -from .actions import SearchCodebase - - -class CodeGrepTool(LocalTool, autoload=True): - """Code Grep tool.""" - - logo = "https://raw.githubusercontent.com/ComposioHQ/composio/master/python/docs/imgs/logos/codegrep.png" - - @classmethod - def actions(cls) -> t.List[t.Type[LocalAction]]: - """Return the list of actions.""" - return [SearchCodebase] diff --git a/python/composio/tools/local/codeindex/__init__.py b/python/composio/tools/local/codeindex/__init__.py deleted file mode 100644 index 38bf374900..0000000000 --- a/python/composio/tools/local/codeindex/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -Code index tool. -""" - -from .tool import CodeIndexTool diff --git a/python/composio/tools/local/codeindex/actions/__init__.py b/python/composio/tools/local/codeindex/actions/__init__.py deleted file mode 100644 index fb23df6578..0000000000 --- a/python/composio/tools/local/codeindex/actions/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .create_index import CreateIndex -from .index_status import IndexStatus -from .search_index import SearchCodebase diff --git a/python/composio/tools/local/codeindex/actions/create_index.py b/python/composio/tools/local/codeindex/actions/create_index.py deleted file mode 100644 index 16ebad2775..0000000000 --- a/python/composio/tools/local/codeindex/actions/create_index.py +++ /dev/null @@ -1,281 +0,0 @@ -import json -import multiprocessing -import os -from concurrent.futures import ThreadPoolExecutor, as_completed -from pathlib import Path -from typing import List, Optional, Tuple - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction - - -# Constants -MAX_WINDOW_SIZE = 200 -IDEAL_WINDOW_SIZE = 80 -SUPPORTED_FILE_EXTENSIONS = { - ".py": "PY", - ".js": "JS", - ".ts": "TS", - ".html": "HTML", - ".css": "CSS", - ".java": "JAVA", - ".cpp": "CPP", - ".c": "C", - ".h": "CHEADER", - ".md": "MD", - ".rst": "RST", - ".txt": "TXT", -} -DEFAULT_EMBEDDING_MODEL_REMOTE = "text-embedding-3-large" -DEFAULT_EMBEDDING_MODEL_LOCAL = "all-MiniLM-L6-v2" -IGNORED_DIRECTORIES = {".git", ".tox", "venv", ".venv", "env", ".env", "__pycache__"} - - -class CreateCodeIndexInput(BaseModel): - dir_to_index_path: str = Field(..., description="Directory to index") - embedding_type: str = Field( - default="local", - description="Whether to use local or remote embedding. local uses the embedding model from Chroma, remote uses the embedding model from OpenAI", - ) - force_index: bool = Field( - default=False, - description="If true, delete existing index before creating a new one", - ) - - -class CreateCodeIndexOutput(BaseModel): - result: str = Field(..., description="Result of the action") - - -class CreateIndex(LocalAction[CreateCodeIndexInput, CreateCodeIndexOutput]): - """ - Indexes a code base in a folder and stores the index in a vector store. - """ - - display_name = "Create index" - _tags = ["index"] - - def execute( - self, request: CreateCodeIndexInput, metadata: dict - ) -> CreateCodeIndexOutput: - # Check if index already exists or is in progress - status = self.check_status(request.dir_to_index_path) - if status["status"] == "completed" and not request.force_index: - return CreateCodeIndexOutput( - result=f"Index already exists for {request.dir_to_index_path}. Use force_index=True to recreate." - ) - if status["status"] == "in_progress" and not request.force_index: - return CreateCodeIndexOutput( - result=f"Indexing is already in progress for {request.dir_to_index_path}. Use force_index=True to restart." - ) - - # If force_index is True, delete existing index - if request.force_index: - self._delete_existing_index(request.dir_to_index_path) - - # Start the indexing process in a new process - process = multiprocessing.Process(target=self._index_creation, args=(request,)) - process.start() - return CreateCodeIndexOutput( - result=f"Indexing started for {request.dir_to_index_path}" - ) - - def _delete_existing_index(self, repo_path: str): - import chromadb # pylint: disable=C0415 - - index_storage_path = Path.home() / ".composio" / "index_storage" - collection_name = self._get_collection_name(repo_path) - status_file = Path(repo_path) / ".indexing_status.json" - - # Delete the collection from Chroma if it exists - chroma_client = chromadb.PersistentClient(path=str(index_storage_path)) - if collection_name in chroma_client.list_collections(): - chroma_client.delete_collection(name=collection_name) - - # Delete the status file if it exists - if status_file.exists(): - os.remove(status_file) - - def _index_creation(self, request: CreateCodeIndexInput): - import chromadb # pylint: disable=C0415 - - collection_name = self._get_collection_name(request.dir_to_index_path) - index_storage_path = Path.home() / ".composio" / "index_storage" - self._create_index_storage_path(index_storage_path) - - chroma_client = chromadb.PersistentClient(path=str(index_storage_path)) - - embedding_function = self.create_embedding_function( - request.embedding_type, - ) - - chroma_collection = self._create_chroma_collection( - chroma_client, collection_name, embedding_function - ) - - self._process_and_add( - chroma_collection, - request.dir_to_index_path, - request.embedding_type, - ) - - def _get_openai_credentials( - self, - ) -> Tuple[Optional[str], Optional[str], Optional[str]]: - openai_key = os.getenv("OPENAI_API_KEY", None) - api_base = os.getenv("HELICONE_API_BASE", None) - helicone_auth = os.getenv("HELICONE_API_KEY", None) - - if openai_key: - print("OPENAI_API_KEY is ready") - else: - print("OPENAI_API_KEY environment variable not found") - - return openai_key, api_base, helicone_auth - - def _get_collection_name(self, repo_path: str) -> str: - return Path(repo_path).name - - def _create_index_storage_path(self, index_storage_path: Path) -> None: - index_storage_path.mkdir(parents=True, exist_ok=True) - - def create_embedding_function( - self, - embedding_type: str, - ): - from chromadb.utils import embedding_functions # pylint: disable=C0415 - from chromadb.utils.embedding_functions import ( # pylint: disable=C0415 - OpenAIEmbeddingFunction, - ) - - if embedding_type == "remote": - openai_key, api_base, helicone_auth = self._get_openai_credentials() - if not openai_key: - raise ValueError("OPENAI_API_KEY environment variable not found") - kwargs = { - "api_key": openai_key, - "model_name": DEFAULT_EMBEDDING_MODEL_REMOTE, - "default_headers": ( - {"Helicone-Auth": helicone_auth} if helicone_auth else {} - ), - } - if api_base: - kwargs["api_base"] = api_base - return OpenAIEmbeddingFunction(**kwargs) - - return embedding_functions.SentenceTransformerEmbeddingFunction( - model_name=DEFAULT_EMBEDDING_MODEL_LOCAL - ) - - def _create_chroma_collection( - self, chroma_client, collection_name: str, embedding_function - ): - return chroma_client.get_or_create_collection( - name=collection_name, - embedding_function=embedding_function, - ) - - def _process_and_add( - self, chroma_collection, repo_path: str, embedding_type: str - ) -> None: - status_file = Path(repo_path) / ".indexing_status.json" - self._update_status(status_file, "in_progress") - - try: - - def process_file(file_path: str) -> None: - try: - with open(file_path, "r", encoding="utf-8") as file: - content = file.read() - except Exception as e: - print(f"Failed to read {file_path}: {e}") - return - - windows = self._create_windows(content) - - file_extension = os.path.splitext(file_path)[1].lower() - file_type = SUPPORTED_FILE_EXTENSIONS.get(file_extension, "Unknown") - - for start, end, window_content in windows: - metadata = { - "start_line": start, - "end_line": end, - "file_path": os.path.relpath(file_path, repo_path), - "file_extension": file_extension, - "file_type": file_type, - } - chroma_collection.add( - documents=[window_content], - metadatas=[metadata], - ids=[f"{file_path}_{start}_{end}"], - ) - - def process_directory(directory: str) -> None: - with ThreadPoolExecutor() as executor: - futures = [] - for root, dirs, files in os.walk(directory): - dirs[:] = [d for d in dirs if d not in IGNORED_DIRECTORIES] - for file in files: - if file.endswith(tuple(SUPPORTED_FILE_EXTENSIONS.keys())): - file_path = os.path.join(root, file) - futures.append(executor.submit(process_file, file_path)) - - for future in as_completed(futures): - future.result() # This will raise any exceptions that occurred during processing - - process_directory(repo_path) - embedding_model = ( - DEFAULT_EMBEDDING_MODEL_REMOTE - if embedding_type == "remote" - else DEFAULT_EMBEDDING_MODEL_LOCAL - ) - self._update_status( - status_file, - "completed", - embedding_type=embedding_type, - embedding_model=embedding_model, - ) - except Exception as e: - self._update_status(status_file, "failed", str(e)) - raise - - def _create_windows(self, content: str) -> List[Tuple[int, int, str]]: - lines = content.splitlines() - total_lines = len(lines) - windows = [] - - if total_lines <= MAX_WINDOW_SIZE: - windows.append((1, total_lines, content)) - else: - for start in range(0, total_lines, IDEAL_WINDOW_SIZE): - end = min(start + MAX_WINDOW_SIZE, total_lines) - window = "\n".join(lines[start:end]) - windows.append((start + 1, end, window)) - - return windows - - def _update_status( - self, - status_file: Path, - status: str, - error: str = "", - embedding_type: str = "", - embedding_model: str = "", - ): - status_data = { - "status": status, - "embedding_type": embedding_type, - "embedding_model": embedding_model, - } - if error: - status_data["error"] = error - with open(status_file, "w", encoding="utf-8") as f: - json.dump(status_data, f) - - def check_status(self, repo_path: str) -> dict: - status_file = Path(repo_path) / ".indexing_status.json" - if not status_file.exists(): - return {"status": "not_started"} - with open(status_file, "r", encoding="utf-8") as f: - return json.load(f) diff --git a/python/composio/tools/local/codeindex/actions/delete_index.py b/python/composio/tools/local/codeindex/actions/delete_index.py deleted file mode 100644 index 7706ab8731..0000000000 --- a/python/composio/tools/local/codeindex/actions/delete_index.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -from pathlib import Path - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction - - -class DeleteIndexInput(BaseModel): - index_directory: str = Field(..., description="Directory of the index to delete") - - -class DeleteIndexOutput(BaseModel): - message: str = Field(..., description="Result of the delete index action") - - -class DeleteIndex(LocalAction[DeleteIndexInput, DeleteIndexOutput]): - """ - Deletes the index for a specified code base. - """ - - _tags = ["index"] - - display_name = "Delete index" - - def execute( - self, - request: DeleteIndexInput, - metadata: dict = {}, - ) -> DeleteIndexOutput: - import chromadb # pylint: disable=C0415 - from chromadb.errors import ChromaError # pylint: disable=C0415 - - index_storage_path = Path.home() / ".composio" / "index_storage" - collection_name = Path(request.index_directory).name - status_file = Path(request.index_directory) / ".indexing_status.json" - - try: - # Delete the collection from Chroma - chroma_client = chromadb.PersistentClient(path=str(index_storage_path)) - chroma_client.delete_collection(name=collection_name) - - # Delete the status file - if status_file.exists(): - os.remove(status_file) - - return DeleteIndexOutput( - message=f"Index for {request.index_directory} has been successfully deleted." - ) - except ChromaError as e: - return DeleteIndexOutput(message=f"Failed to delete index: {str(e)}") - except Exception as e: - error_message = str(e) - return DeleteIndexOutput( - message="An error occurred while deleting the index" - + (f": {error_message}" if error_message else "") - ) diff --git a/python/composio/tools/local/codeindex/actions/index_status.py b/python/composio/tools/local/codeindex/actions/index_status.py deleted file mode 100644 index a379ff8274..0000000000 --- a/python/composio/tools/local/codeindex/actions/index_status.py +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Type - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.codeindex.actions.create_index import CreateIndex - - -class IndexStatusInput(BaseModel): - directory_path: str = Field(..., description="Directory to check indexing status") - - -class IndexStatusOutput(BaseModel): - status: str = Field(..., description="Status of the indexing process") - error: str = Field(default=None, description="Error message if indexing failed") - - -class IndexStatus(LocalAction[IndexStatusInput, IndexStatusOutput]): - """ - Checks the status of the indexing process for a given directory. - """ - - display_name = "Check Index Status" - _request_schema: Type[IndexStatusInput] = IndexStatusInput - _response_schema: Type[IndexStatusOutput] = IndexStatusOutput - _tags = ["index"] - _tool_name = "codeindex" - - def execute( - self, input_data: IndexStatusInput, metadata: dict = {} - ) -> IndexStatusOutput: - create_index = CreateIndex() - status_data = create_index.check_status(input_data.directory_path) - - output = IndexStatusOutput(status=status_data.get("status", "unknown")) - if error := status_data.get("error"): - output.error = error - - return output diff --git a/python/composio/tools/local/codeindex/actions/search_index.py b/python/composio/tools/local/codeindex/actions/search_index.py deleted file mode 100644 index 086c460916..0000000000 --- a/python/composio/tools/local/codeindex/actions/search_index.py +++ /dev/null @@ -1,159 +0,0 @@ -from pathlib import Path -from typing import List, Optional - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.codeindex.actions.create_index import CreateIndex - - -class SearchCodebaseRequest(BaseModel): - codebase_directory: str = Field( - ..., - description="Absolute path to the directory containing the codebase to search", - examples=["/home/user/projects/my-project", "/Users/developer/workspace/app"], - ) - search_query: str = Field( - ..., - description="The search query to find relevant code snippets", - examples=["implement user authentication", "database connection string"], - ) - max_results: int = Field( - default=5, - description="Maximum number of search results to return", - examples=[5, 10, 20], - ) - file_extension: str = Field( - None, - description="File extension to filter results (case-insensitive). Supported types: PY, JS, TS, HTML, CSS, JAVA, CPP, C, H, MD, TXT", - examples=["py", "js", "java"], - ) - - -class CodeSnippet(BaseModel): - file_path: str = Field( - ..., description="Relative path to the file containing the code snippet" - ) - start_line: int = Field( - ..., description="Starting line number of the code snippet in the file" - ) - end_line: int = Field( - ..., description="Ending line number of the code snippet in the file" - ) - snippet_content: str = Field( - ..., description="The actual content of the code snippet" - ) - relevance_score: float = Field( - ..., description="Relevance score of the snippet to the search query (0 to 1)" - ) - file_type: str = Field(..., description="File type of the code snippet") - - -class SearchCodebaseResponse(BaseModel): - matched_snippets: List[CodeSnippet] = Field( - ..., description="List of matching code snippets" - ) - error_message: Optional[str] = Field( - default=None, description="Error message if the search operation failed" - ) - - -class SearchCodebase(LocalAction[SearchCodebaseRequest, SearchCodebaseResponse]): - """ - Searches the indexed codebase for relevant code snippets based on a given query. - - This action allows a software engineering agent to find and retrieve code snippets - that match a specific search query within an indexed codebase. It supports filtering - by file type and provides detailed information about each matching snippet. - """ - - display_name = "Search Indexed Codebase" - _tags = ["codebase", "search", "index"] - - def execute( - self, request: SearchCodebaseRequest, metadata: dict - ) -> SearchCodebaseResponse: - import chromadb # pylint: disable=C0415 - from chromadb.errors import ChromaError # pylint: disable=C0415 - - # Verify index existence - index_creator = CreateIndex() - index_status = index_creator.check_status(request.codebase_directory) - if index_status["status"] != "completed": - return SearchCodebaseResponse( - matched_snippets=[], - error_message="Codebase index is not complete or not found", - ) - - # Configure Chroma client and collection - index_storage_path = Path.home() / ".composio" / "index_storage" - chroma_client = chromadb.PersistentClient(path=str(index_storage_path)) - collection_name = Path(request.codebase_directory).name - - embedding_type = index_status.get("embedding_type", "local") - embedding_function = index_creator.create_embedding_function(embedding_type) - - try: - chroma_collection = chroma_client.get_collection( - name=collection_name, embedding_function=embedding_function - ) - - # Set up file type filter if specified - file_type_filter = None - if request.file_extension: - file_type_filter = { - "file_type": {"$eq": request.file_extension.upper()} - } - - # Execute the search query - if file_type_filter: - search_results = chroma_collection.query( - query_texts=[request.search_query], - n_results=request.max_results, - where=file_type_filter, - ) - else: - search_results = chroma_collection.query( - query_texts=[request.search_query], - n_results=request.max_results, - ) - - # Process and format the search results - matched_snippets = [] - if all( - key in search_results for key in ["documents", "metadatas", "distances"] - ): - if ( - search_results - and search_results["documents"] - and search_results["metadatas"] - and search_results["distances"] - ): - for snippet, mdata, distance in zip( - search_results["documents"][0], - search_results["metadatas"][0], - search_results["distances"][0], - ): - matched_snippets.append( - CodeSnippet( - file_path=str(mdata["file_path"]), - start_line=int(mdata["start_line"]), - end_line=int(mdata["end_line"]), - file_type=str(mdata["file_type"]), - snippet_content=snippet, - relevance_score=round(1 - distance, 4), - ) - ) - - return SearchCodebaseResponse(matched_snippets=matched_snippets) - except ChromaError as chroma_error: - return SearchCodebaseResponse( - matched_snippets=[], - error_message=f"Failed to access collection '{collection_name}': {str(chroma_error)}", - ) - except Exception as general_error: - error_details = f"An unexpected error occurred during the search operation: {str(general_error)}" - print(error_details) - return SearchCodebaseResponse( - matched_snippets=[], error_message=error_details - ) diff --git a/python/composio/tools/local/codeindex/tool.py b/python/composio/tools/local/codeindex/tool.py deleted file mode 100644 index 6bb2e8bbdb..0000000000 --- a/python/composio/tools/local/codeindex/tool.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -File I/O tool for Composio. -""" - -import typing as t - -from composio.tools.base.local import LocalAction, LocalTool - -from .actions import CreateIndex, IndexStatus, SearchCodebase - - -class CodeIndexTool(LocalTool, autoload=True): - """Code index tool.""" - - logo = "https://raw.githubusercontent.com/ComposioHQ/composio/master/python/docs/imgs/logos/codemap.png" - - @classmethod - def actions(cls) -> t.List[t.Type[LocalAction]]: - """Return the list of actions.""" - return [CreateIndex, IndexStatus, SearchCodebase] diff --git a/python/composio/tools/local/codemap/__init__.py b/python/composio/tools/local/codemap/__init__.py deleted file mode 100644 index f870875213..0000000000 --- a/python/composio/tools/local/codemap/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -Code map tool for Composio. -""" - -from .tool import CodeMapTool diff --git a/python/composio/tools/local/codemap/actions/__init__.py b/python/composio/tools/local/codemap/actions/__init__.py deleted file mode 100644 index 50d72df621..0000000000 --- a/python/composio/tools/local/codemap/actions/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .delete_repomap import DeleteRepoMap -from .get_rankedtags import GenerateRankedTags -from .get_repomap import GetRepoMap -from .get_repostructure import GetRepoStructure -from .init_repomap import InitRepoMap diff --git a/python/composio/tools/local/codemap/actions/delete_repomap.py b/python/composio/tools/local/codemap/actions/delete_repomap.py deleted file mode 100644 index 7d164f09c4..0000000000 --- a/python/composio/tools/local/codemap/actions/delete_repomap.py +++ /dev/null @@ -1,41 +0,0 @@ -from pathlib import Path -from typing import Dict, Optional - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.base.utils.repomap import RepoMap - - -class DeleteRepoMapRequest(BaseModel): - root_path: str = Field(..., description="Root directory path of the repository") - - -class DeleteRepoMapResponse(BaseModel): - success: bool = Field(..., description="Whether the deletion was successful") - message: Optional[str] = Field(default=None, description="Error message if any") - - -class DeleteRepoMap(LocalAction[DeleteRepoMapRequest, DeleteRepoMapResponse]): - """ - Deletes the repository map cache for the given root directory. This action removes the cached data used by RepoMap. - """ - - _tags = ["repo"] - - def execute( - self, request: DeleteRepoMapRequest, metadata: Dict - ) -> DeleteRepoMapResponse: - root_path = Path(request.root_path).resolve() - if not root_path.exists(): - return DeleteRepoMapResponse( - success=False, - message=f"Path {root_path} does not exist", - ) - - repo_map = RepoMap(root=root_path) - repo_map.delete_cache() - return DeleteRepoMapResponse( - success=True, - message="Repository map cache deleted successfully", - ) diff --git a/python/composio/tools/local/codemap/actions/get_rankedtags.py b/python/composio/tools/local/codemap/actions/get_rankedtags.py deleted file mode 100644 index 832ac9f9d4..0000000000 --- a/python/composio/tools/local/codemap/actions/get_rankedtags.py +++ /dev/null @@ -1,117 +0,0 @@ -from pathlib import Path -from typing import List, Optional - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.base.utils.grep_utils import get_files_excluding_gitignore -from composio.tools.local.base.utils.repomap import RepoMap - - -class GenerateRankedTagsRequest(BaseModel): - code_directory: str = Field( - ..., - description="Absolute path to the root directory of the code or repository or codebase.", - examples=[ - "/home/user/projects/my-repo", - "C:\\Users\\user\\Documents\\GitHub\\project", - "/project", - ], - ) - files_of_interest: List[str] = Field( - default=[], - description="List of file paths (relative to the repository root) for which to generate ranked tags", - examples=[ - ["src/main.py", "tests/test_utils.py"], - ["lib/core.js", "lib/helpers.js", "src/index.js"], - ], - ) - - -class GenerateRankedTagsResponse(BaseModel): - ranked_tags: str = Field( - ..., - description="List of ranked tags for the specified files, ordered by importance", - ) - error: Optional[str] = Field( - default=None, - description="Error message if any issues occurred during tag generation", - ) - - -class GenerateRankedTags( - LocalAction[GenerateRankedTagsRequest, GenerateRankedTagsResponse] -): - """ - Generates ranked tags for specified files of interest within a repository. - - This action analyzes the repository structure and content to produce a list of - important code elements (tags) from the specified files, ranked by their - significance within the codebase. - - Use cases: - 1. Quickly understand the structure and key components of specific files - 2. Identify important functions, classes, or variables in files of interest - 3. Assist in code navigation and comprehension for large codebases - - Example usage: - ```python - request = repository_root="/path/to/repo", - files_of_interest=["src/main.py", "src/utils.py"] - ) - result = GenerateRankedTags().execute(request) - - if result.error: - print(f"Error: {result.error}") - else: - for tag in result.ranked_tags: - print(f"{tag.file_path}:{tag.line_number} - {tag.tag_content}") - ``` - """ - - display_name = "Generate Ranked Tags" - _tags = ["repo", "tags", "code-analysis"] - - def execute( - self, - request: GenerateRankedTagsRequest, - metadata: dict, - ) -> GenerateRankedTagsResponse: - repo_root = Path(request.code_directory).resolve() - if not repo_root.exists(): - print(f"Error: Repository root path {repo_root} does not exist") - return GenerateRankedTagsResponse( - ranked_tags="", error=f"Repository root path {repo_root} does not exist" - ) - - # Get all files in the repository, excluding those in .gitignore - all_files = get_files_excluding_gitignore( - root_path=repo_root, no_gitignore=False - ) - - # Convert absolute paths to relative paths, only for .py files - all_files = [ - str(Path(file).relative_to(repo_root)) - for file in all_files - if file.endswith(".py") - ] - - # Generate ranked tags map - repo_map = RepoMap(root=repo_root) - ranked_tags_map = repo_map.get_ranked_tags_map( - chat_fnames=[], - other_fnames=all_files, - mentioned_fnames=set(request.files_of_interest), - mentioned_idents=set(), - ) - - # Parse the ranked_tags_map string to extract RankedTag objects - if ranked_tags_map is None: - print("Error: No ranked tags map generated") - return GenerateRankedTagsResponse( - ranked_tags="", - error="No ranked tags map generated", - ) - return GenerateRankedTagsResponse( - ranked_tags=ranked_tags_map, - ) diff --git a/python/composio/tools/local/codemap/actions/get_repomap.py b/python/composio/tools/local/codemap/actions/get_repomap.py deleted file mode 100644 index c979b3cc7a..0000000000 --- a/python/composio/tools/local/codemap/actions/get_repomap.py +++ /dev/null @@ -1,90 +0,0 @@ -from pathlib import Path -from typing import Dict, List, Optional - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.base.utils.grep_utils import get_files_excluding_gitignore -from composio.tools.local.base.utils.repomap import RepoMap - - -class GetRepoMapRequest(BaseModel): - code_directory: str = Field( - ..., - description="Absolute path to the root directory of the repository or codebase.", - examples=[ - "/home/user/projects/my-repo", - "/Users/username/Documents/my-project", - "/project", - ], - ) - files_of_interest: List[str] = Field( - default=[], - description="List of file paths (relative to repository root) that are of particular interest for generating the repo map", - examples=[ - ["src/main.py", "tests/test_main.py", "README.md"], - ["main.py", "test_main.py", "README.md"], - ], - ) - primary_file_paths: List[str] = Field( - default=[], - description="List of file paths (relative to repository root) that around which the repo map should be generated. Primary file won't be included in the repo map.", - ) - mentioned_idents: List[str] = Field( - default=[], - description="List of identifiers (e.g. function names, class names) that the focus of the repo map should be on", - ) - - -class GetRepoMapResponse(BaseModel): - repository_map: Optional[str] = Field( - default=None, - description="Generated repository map as a string, containing a structured view of important code elements", - ) - error_message: Optional[str] = Field( - default=None, - description="Detailed error message if an error occurred during map generation", - ) - - -class GetRepoMap(LocalAction[GetRepoMapRequest, GetRepoMapResponse]): - """ - Generates a comprehensive repository map for specified files of interest within a given repository. - - This action analyzes the repository structure, focusing on the files specified as 'files_of_interest'. - It provides a structured view of important code elements, helping software agents understand - the layout and key components of the codebase. - """ - - _tags = ["repository", "code-structure", "analysis"] - - def execute(self, request: GetRepoMapRequest, metadata: Dict) -> GetRepoMapResponse: - repo_root = Path(request.code_directory).resolve() - if not repo_root.exists(): - return GetRepoMapResponse( - error_message=f"Repository root path '{repo_root}' does not exist or is inaccessible." - ) - - # Retrieve all files in the repository, excluding those specified in .gitignore - all_repository_files = get_files_excluding_gitignore(repo_root) - - # Convert absolute paths to paths relative to the repository root, considering only .py files - relative_file_paths = [ - str(Path(file).relative_to(repo_root)) - for file in all_repository_files - if file.endswith(".py") - ] - - # Generate the repository map - repo_map_generator = RepoMap(root=repo_root) - generated_map = repo_map_generator.get_repo_map( - chat_files=set(request.primary_file_paths), - other_files=relative_file_paths, - mentioned_fnames=set(request.files_of_interest), - mentioned_idents=set(request.mentioned_idents), - ) - - return GetRepoMapResponse( - repository_map=generated_map, - error_message=None, - ) diff --git a/python/composio/tools/local/codemap/actions/get_repostructure.py b/python/composio/tools/local/codemap/actions/get_repostructure.py deleted file mode 100644 index 96a2c77761..0000000000 --- a/python/composio/tools/local/codemap/actions/get_repostructure.py +++ /dev/null @@ -1,178 +0,0 @@ -import ast -from pathlib import Path -from typing import Any, Dict, Optional, Type - -from pydantic import BaseModel, Field - -from composio.tools.base.local import LocalAction -from composio.tools.local.base.utils.grep_utils import get_files_excluding_gitignore - - -class GetRepoStructureRequest(BaseModel): - code_directory: str = Field( - ..., - description="Absolute path to the root directory of the repository or codebase.", - examples=[ - "/home/user/projects/my-repo", - "/Users/username/Documents/my-project", - "/project", - ], - ) - include_content: bool = Field( - default=False, - description="Whether to include the content of files in the repository structure.", - ) - - -class GetRepoStructureResponse(BaseModel): - repository_structure: Optional[Dict[str, Any]] = Field( - default=None, - description="Generated repository structure as a JSON object, containing a structured view of important code elements", - ) - error_message: Optional[str] = Field( - default=None, - description="Detailed error message if an error occurred during structure generation", - ) - - -def parse_python_file(file_path, file_content=None, include_content=False): - """Parse a Python file to extract class and function definitions with their line numbers. - :param file_path: Path to the Python file. - :return: Class names, function names, and file contents - """ - if file_content is None: - try: - with open(file_path, "r", encoding="utf-8", errors="ignore") as file: - file_content = file.read() - parsed_data = ast.parse(file_content) - except Exception: # Catch all types of exceptions - return [], [], "" - else: - try: - parsed_data = ast.parse(file_content) - except Exception: # Catch all types of exceptions - return [], [], "" - - class_info = [] - function_names = [] - class_methods = set() - - for node in ast.walk(parsed_data): - if isinstance(node, ast.ClassDef): - methods = [] - for n in node.body: - if isinstance(n, ast.FunctionDef): - method_info = { - "name": n.name, - "start:end_line": f"{n.lineno}:{n.end_lineno}", - } - if include_content: - method_info["text"] = file_content.splitlines()[ - n.lineno - 1 : n.end_lineno # noqa: E203 - ] - methods.append(method_info) - class_methods.add(n.name) - class_info_dict = { - "name": node.name, - "start:end_line": f"{node.lineno}:{node.end_lineno}", - "methods": methods, - } - if include_content: - class_info_dict["text"] = file_content.splitlines()[ - node.lineno - 1 : node.end_lineno # noqa: E203 - ] - class_info.append(class_info_dict) - elif isinstance(node, ast.FunctionDef) and not isinstance( - node, ast.AsyncFunctionDef - ): - if node.name not in class_methods: - function_names.append( - { - "name": node.name, - "start:end_line": f"{node.lineno}:{node.end_lineno}", - "text": file_content.splitlines()[ - node.lineno - 1 : node.end_lineno # noqa: E203 - ], - } - ) - - return class_info, function_names, file_content.splitlines() - - -class GetRepoStructure(LocalAction[GetRepoStructureRequest, GetRepoStructureResponse]): - """ - Generates a comprehensive repository structure for all files within a given repository. - - This action analyzes the repository structure, focusing on all files in the repository. - It provides a structured view of important code elements, helping software agents understand - the layout and key components of the codebase. - """ - - display_name = "Generate Repository Structure" - _request_schema: Type[GetRepoStructureRequest] = GetRepoStructureRequest - _response_schema: Type[GetRepoStructureResponse] = GetRepoStructureResponse - _tags = ["repository", "code-structure", "analysis"] - _tool_name = "codemap" - - def execute( - self, request: GetRepoStructureRequest, metadata: dict = {} - ) -> GetRepoStructureResponse: - repo_root = Path(request.code_directory).resolve() - include_content = request.include_content - - if not repo_root.exists(): - error_message = ( - f"Repository root path '{repo_root}' does not exist or is inaccessible." - ) - return GetRepoStructureResponse(error_message=error_message) - - try: - repo_structure = {} # type: ignore - all_repository_files = get_files_excluding_gitignore(repo_root) - for file_path in all_repository_files: - file_path = Path(file_path) # Ensure file_path is a Path object - relative_path = file_path.relative_to(repo_root) - - # Check file size - file_size = file_path.stat().st_size - if file_size > 1_000_000: # Skip files larger than 1MB - continue - - current_node = repo_structure - for part in relative_path.parts[:-1]: - if part not in current_node: - current_node[part] = {} - current_node = current_node[part] - - file_name = relative_path.parts[-1] - if file_path.suffix == ".py": - class_info, function_names, file_content = parse_python_file( - file_path - ) - - # Check for large number of classes or functions - if len(class_info) > 500 or len(function_names) > 1000: - current_node[file_name] = { - "type": "file", - "content": ["Large file: Content not included"], - "classes_count": len(class_info), - "functions_count": len(function_names), - } - else: - current_node[file_name] = { - "type": "file", - "classes": class_info, - "functions": function_names, - } - if include_content: - current_node[file_name]["content"] = file_content - - return GetRepoStructureResponse( - repository_structure=repo_structure, - ) - - except Exception as e: - error_message = f"An error occurred while generating the repository structure: {str(e)}. Please ensure all paths are correct and you have necessary permissions." - return GetRepoStructureResponse( - error_message=error_message, - ) diff --git a/python/composio/tools/local/codemap/actions/init_repomap.py b/python/composio/tools/local/codemap/actions/init_repomap.py deleted file mode 100644 index a9cf641c4a..0000000000 --- a/python/composio/tools/local/codemap/actions/init_repomap.py +++ /dev/null @@ -1,60 +0,0 @@ -from pathlib import Path - -from pydantic import BaseModel, Field - -from composio.tools.base.exceptions import ExecutionFailed -from composio.tools.base.local import LocalAction -from composio.tools.local.base.utils.grep_utils import get_files_excluding_gitignore -from composio.tools.local.base.utils.repomap import RepoMap - - -class InitRepoMapRequest(BaseModel): - code_directory: str = Field( - ..., description="Root directory path to initialize the repository map" - ) - - -class InitRepoMapResponse(BaseModel): - success: bool = Field(..., description="Whether the initialization was successful") - message: str = Field(default=None, description="Message if any") - - -class InitRepoMap(LocalAction[InitRepoMapRequest, InitRepoMapResponse]): - """ - Initializes the repository map for the given root directory. - """ - - _tags = ["repo"] - - def execute( - self, - request: InitRepoMapRequest, - metadata: dict, - ) -> InitRepoMapResponse: - root_path = Path(request.code_directory).resolve() - if not root_path.exists(): - raise ExecutionFailed( - message=f"Path {root_path} does not exist", - suggestion="Try providing path that exists", - ) - - repo_tree = RepoMap(root=root_path) - - # Get all files in the repository, excluding those in .gitignore - all_files = get_files_excluding_gitignore(root_path) - - # Convert absolute paths to relative paths - all_files = [str(Path(file).relative_to(root_path)) for file in all_files] - - # Build cache by creating a repo tree for all files - repo_tree.get_repo_map( - chat_files=[], - other_files=all_files, - mentioned_fnames=set(), - mentioned_idents=set(), - ) - - return InitRepoMapResponse( - success=True, - message="Repository map initialized successfully", - ) diff --git a/python/composio/tools/local/codemap/tool.py b/python/composio/tools/local/codemap/tool.py deleted file mode 100644 index 37d8a6c091..0000000000 --- a/python/composio/tools/local/codemap/tool.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Code map tool for Composio. -""" - -import typing as t - -from composio.tools.base.local import LocalAction, LocalTool - -from .actions import ( - DeleteRepoMap, - GenerateRankedTags, - GetRepoMap, - GetRepoStructure, - InitRepoMap, -) - - -class CodeMapTool(LocalTool, autoload=True): - """Code Map tool.""" - - logo = "https://raw.githubusercontent.com/ComposioHQ/composio/master/python/docs/imgs/logos/codemap.png" - - @classmethod - def actions(cls) -> t.List[t.Type[LocalAction]]: - """Return the list of actions.""" - return [ - GenerateRankedTags, - GetRepoMap, - InitRepoMap, - DeleteRepoMap, - GetRepoStructure, - ]