@_vrsen/openswarm 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +152 -0
- package/bin/openswarm.js +38 -0
- package/config.py +34 -0
- package/data_analyst_agent/.cursor/rules/data_analyst.mdc +43 -0
- package/data_analyst_agent/__init__.py +3 -0
- package/data_analyst_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/data_analyst_agent/__pycache__/data_analyst_agent.cpython-312.pyc +0 -0
- package/data_analyst_agent/data_analyst_agent.py +45 -0
- package/data_analyst_agent/instructions.md +173 -0
- package/data_analyst_agent/test_files/test_file.csv +21 -0
- package/data_analyst_agent/tools/__init__.py +6 -0
- package/deep_research/__init__.py +1 -0
- package/deep_research/__pycache__/__init__.cpython-312.pyc +0 -0
- package/deep_research/__pycache__/deep_research.cpython-312.pyc +0 -0
- package/deep_research/deep_research.py +27 -0
- package/deep_research/instructions.md +104 -0
- package/deep_research/tools/__init__.py +1 -0
- package/docs_agent/__init__.py +3 -0
- package/docs_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/docs_agent/__pycache__/docs_agent.cpython-312.pyc +0 -0
- package/docs_agent/docs_agent.py +61 -0
- package/docs_agent/instructions.md +418 -0
- package/docs_agent/tools/ConvertDocument.py +323 -0
- package/docs_agent/tools/CreateDocument.py +287 -0
- package/docs_agent/tools/ListDocuments.py +134 -0
- package/docs_agent/tools/ModifyDocument.py +247 -0
- package/docs_agent/tools/RestoreDocument.py +79 -0
- package/docs_agent/tools/ViewDocument.py +153 -0
- package/docs_agent/tools/__init__.py +1 -0
- package/docs_agent/tools/__pycache__/ConvertDocument.cpython-312.pyc +0 -0
- package/docs_agent/tools/__pycache__/CreateDocument.cpython-312.pyc +0 -0
- package/docs_agent/tools/__pycache__/ListDocuments.cpython-312.pyc +0 -0
- package/docs_agent/tools/__pycache__/ModifyDocument.cpython-312.pyc +0 -0
- package/docs_agent/tools/__pycache__/RestoreDocument.cpython-312.pyc +0 -0
- package/docs_agent/tools/__pycache__/ViewDocument.cpython-312.pyc +0 -0
- package/docs_agent/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__init__.py +1 -0
- package/docs_agent/tools/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/doc_file_utils.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_blocks.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_constants.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_core.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_css.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_images.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_page.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_paragraphs.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_playwright.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_selectors.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_docx_shared.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/__pycache__/html_validation.cpython-312.pyc +0 -0
- package/docs_agent/tools/utils/doc_file_utils.py +29 -0
- package/docs_agent/tools/utils/html_docx_blocks.py +262 -0
- package/docs_agent/tools/utils/html_docx_constants.py +78 -0
- package/docs_agent/tools/utils/html_docx_core.py +138 -0
- package/docs_agent/tools/utils/html_docx_css.py +262 -0
- package/docs_agent/tools/utils/html_docx_images.py +293 -0
- package/docs_agent/tools/utils/html_docx_page.py +185 -0
- package/docs_agent/tools/utils/html_docx_paragraphs.py +342 -0
- package/docs_agent/tools/utils/html_docx_playwright.py +184 -0
- package/docs_agent/tools/utils/html_docx_selectors.py +196 -0
- package/docs_agent/tools/utils/html_docx_shared.py +23 -0
- package/docs_agent/tools/utils/html_docx_tables.py +942 -0
- package/docs_agent/tools/utils/html_validation.py +102 -0
- package/helpers.py +59 -0
- package/image_generation_agent/__init__.py +1 -0
- package/image_generation_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/image_generation_agent/__pycache__/image_generation_agent.cpython-312.pyc +0 -0
- package/image_generation_agent/image_generation_agent.py +31 -0
- package/image_generation_agent/instructions.md +80 -0
- package/image_generation_agent/tools/CombineImages.py +211 -0
- package/image_generation_agent/tools/EditImages.py +200 -0
- package/image_generation_agent/tools/GenerateImages.py +184 -0
- package/image_generation_agent/tools/RemoveBackground.py +108 -0
- package/image_generation_agent/tools/__init__.py +2 -0
- package/image_generation_agent/tools/__pycache__/CombineImages.cpython-312.pyc +0 -0
- package/image_generation_agent/tools/__pycache__/EditImages.cpython-312.pyc +0 -0
- package/image_generation_agent/tools/__pycache__/GenerateImages.cpython-312.pyc +0 -0
- package/image_generation_agent/tools/__pycache__/RemoveBackground.cpython-312.pyc +0 -0
- package/image_generation_agent/tools/utils/__init__.py +2 -0
- package/image_generation_agent/tools/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- package/image_generation_agent/tools/utils/__pycache__/image_io.cpython-312.pyc +0 -0
- package/image_generation_agent/tools/utils/image_io.py +308 -0
- package/onboard.py +325 -0
- package/orchestrator/__init__.py +3 -0
- package/orchestrator/__pycache__/__init__.cpython-312.pyc +0 -0
- package/orchestrator/__pycache__/orchestrator.cpython-312.pyc +0 -0
- package/orchestrator/instructions.md +90 -0
- package/orchestrator/orchestrator.py +33 -0
- package/package.json +49 -0
- package/patches/__init__.py +1 -0
- package/patches/__pycache__/__init__.cpython-312.pyc +0 -0
- package/patches/__pycache__/patch_agency_swarm_dual_comms.cpython-312.pyc +0 -0
- package/patches/__pycache__/patch_file_attachment_refs.cpython-312.pyc +0 -0
- package/patches/__pycache__/patch_ipython_interpreter_composio.cpython-312.pyc +0 -0
- package/patches/dom-to-pptx+1.1.5.patch +133440 -0
- package/patches/patch_agency_swarm_dual_comms.py +199 -0
- package/patches/patch_file_attachment_refs.py +74 -0
- package/patches/patch_ipython_interpreter_composio.py +54 -0
- package/pyproject.toml +67 -0
- package/run.py +343 -0
- package/server.py +26 -0
- package/shared_instructions.md +119 -0
- package/shared_tools/CopyFile.py +68 -0
- package/shared_tools/ExecuteTool.py +184 -0
- package/shared_tools/FindTools.py +101 -0
- package/shared_tools/ManageConnections.py +43 -0
- package/shared_tools/SearchTools.py +44 -0
- package/shared_tools/__init__.py +7 -0
- package/shared_tools/__pycache__/CopyFile.cpython-312.pyc +0 -0
- package/shared_tools/__pycache__/ExecuteTool.cpython-312.pyc +0 -0
- package/shared_tools/__pycache__/FindTools.cpython-312.pyc +0 -0
- package/shared_tools/__pycache__/ManageConnections.cpython-312.pyc +0 -0
- package/shared_tools/__pycache__/SearchTools.cpython-312.pyc +0 -0
- package/shared_tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/slides_agent/.cursor/rules/slides-agent-workflow.mdc +9 -0
- package/slides_agent/__init__.py +1 -0
- package/slides_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/slides_agent/__pycache__/slides_agent.cpython-312.pyc +0 -0
- package/slides_agent/instructions.md +298 -0
- package/slides_agent/pptx/SKILL.md +528 -0
- package/slides_agent/pptx/html2pptx.md +625 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/slides_agent/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/slides_agent/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/slides_agent/pptx/ooxml/scripts/pack.py +169 -0
- package/slides_agent/pptx/ooxml/scripts/unpack.py +29 -0
- package/slides_agent/pptx/ooxml/scripts/validate.py +69 -0
- package/slides_agent/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/slides_agent/pptx/ooxml/scripts/validation/base.py +951 -0
- package/slides_agent/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/slides_agent/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/slides_agent/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/slides_agent/pptx/ooxml.md +427 -0
- package/slides_agent/pptx/scripts/html2pptx.js +1092 -0
- package/slides_agent/pptx/scripts/inventory.py +1020 -0
- package/slides_agent/pptx/scripts/rearrange.py +231 -0
- package/slides_agent/pptx/scripts/replace.py +385 -0
- package/slides_agent/pptx/scripts/thumbnail.py +451 -0
- package/slides_agent/slides_agent.py +109 -0
- package/slides_agent/test_deck/_theme.css +92 -0
- package/slides_agent/test_deck/assets/placeholder.svg +11 -0
- package/slides_agent/test_deck/slide_01_title.html +10 -0
- package/slides_agent/test_deck/slide_02_image_split.html +23 -0
- package/slides_agent/test_deck/slide_03_kpi.html +21 -0
- package/slides_agent/tools/ApplyPptxTextReplacements.py +91 -0
- package/slides_agent/tools/BuildPptxFromHtmlSlides.py +221 -0
- package/slides_agent/tools/CheckSlide.py +218 -0
- package/slides_agent/tools/CheckSlideCanvasOverflow.py +221 -0
- package/slides_agent/tools/CreateImageMontage.py +261 -0
- package/slides_agent/tools/CreatePptxThumbnailGrid.py +168 -0
- package/slides_agent/tools/DeleteSlide.py +78 -0
- package/slides_agent/tools/DownloadImage.py +79 -0
- package/slides_agent/tools/EnsureRasterImage.py +157 -0
- package/slides_agent/tools/ExtractPptxTextInventory.py +104 -0
- package/slides_agent/tools/GenerateImage.py +189 -0
- package/slides_agent/tools/ImageSearch.py +127 -0
- package/slides_agent/tools/InsertNewSlides.py +393 -0
- package/slides_agent/tools/ManageTheme.py +112 -0
- package/slides_agent/tools/ModifySlide.py +563 -0
- package/slides_agent/tools/ReadSlide.py +26 -0
- package/slides_agent/tools/RearrangePptxSlidesFromTemplate.py +114 -0
- package/slides_agent/tools/RestoreSnapshot.py +89 -0
- package/slides_agent/tools/SlideScreenshot.py +66 -0
- package/slides_agent/tools/__init__.py +54 -0
- package/slides_agent/tools/__pycache__/ApplyPptxTextReplacements.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/BuildPptxFromHtmlSlides.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/CheckSlide.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/CheckSlideCanvasOverflow.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/CreateImageMontage.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/CreatePptxThumbnailGrid.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/DeleteSlide.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/DownloadImage.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/EnsureRasterImage.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/ExtractPptxTextInventory.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/GenerateImage.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/ImageSearch.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/InsertNewSlides.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/ManageTheme.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/ModifySlide.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/ReadSlide.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/RearrangePptxSlidesFromTemplate.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/RestoreSnapshot.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/SlideScreenshot.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/slide_file_utils.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/slide_html_utils.cpython-312.pyc +0 -0
- package/slides_agent/tools/__pycache__/template_registry.cpython-312.pyc +0 -0
- package/slides_agent/tools/deck_utils.py +31 -0
- package/slides_agent/tools/html2pptx_runner.js +1183 -0
- package/slides_agent/tools/html_writer_instructions.md +149 -0
- package/slides_agent/tools/slide_file_utils.py +108 -0
- package/slides_agent/tools/slide_html_utils.py +354 -0
- package/slides_agent/tools/template_registry.py +55 -0
- package/swarm.py +82 -0
- package/video_generation_agent/__init__.py +1 -0
- package/video_generation_agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/video_generation_agent/__pycache__/video_generation_agent.cpython-312.pyc +0 -0
- package/video_generation_agent/instructions.md +178 -0
- package/video_generation_agent/tools/AddSubtitles.py +425 -0
- package/video_generation_agent/tools/CombineImages.py +166 -0
- package/video_generation_agent/tools/CombineVideos.py +113 -0
- package/video_generation_agent/tools/EditAudio.py +297 -0
- package/video_generation_agent/tools/EditImage.py +144 -0
- package/video_generation_agent/tools/EditVideoContent.py +369 -0
- package/video_generation_agent/tools/GenerateImage.py +133 -0
- package/video_generation_agent/tools/GenerateVideo.py +556 -0
- package/video_generation_agent/tools/TrimVideo.py +233 -0
- package/video_generation_agent/tools/__init__.py +1 -0
- package/video_generation_agent/tools/__pycache__/AddSubtitles.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/CombineImages.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/CombineVideos.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/EditAudio.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/EditImage.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/EditVideoContent.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/GenerateImage.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/GenerateVideo.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/__pycache__/TrimVideo.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/utils/__init__.py +1 -0
- package/video_generation_agent/tools/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/utils/__pycache__/image_utils.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/utils/__pycache__/video_utils.cpython-312.pyc +0 -0
- package/video_generation_agent/tools/utils/image_utils.py +174 -0
- package/video_generation_agent/tools/utils/video_utils.py +522 -0
- package/video_generation_agent/video_generation_agent.py +26 -0
- package/virtual_assistant/__init__.py +1 -0
- package/virtual_assistant/__pycache__/__init__.cpython-312.pyc +0 -0
- package/virtual_assistant/__pycache__/virtual_assistant.cpython-312.pyc +0 -0
- package/virtual_assistant/instructions.md +206 -0
- package/virtual_assistant/tools/AddLabelToEmail.py +154 -0
- package/virtual_assistant/tools/CheckEventsForDate.py +218 -0
- package/virtual_assistant/tools/CheckUnreadSlackMessages.py +216 -0
- package/virtual_assistant/tools/CreateCalendarEvent.py +261 -0
- package/virtual_assistant/tools/DeleteCalendarEvent.py +137 -0
- package/virtual_assistant/tools/DeleteDraft.py +95 -0
- package/virtual_assistant/tools/DraftEmail.py +239 -0
- package/virtual_assistant/tools/EditFile.py +113 -0
- package/virtual_assistant/tools/FindEmails.py +330 -0
- package/virtual_assistant/tools/GetCurrentTime.py +69 -0
- package/virtual_assistant/tools/GetSlackUserInfo.py +117 -0
- package/virtual_assistant/tools/ListDirectory.py +113 -0
- package/virtual_assistant/tools/ListSkills.py +94 -0
- package/virtual_assistant/tools/ManageLabels.py +295 -0
- package/virtual_assistant/tools/ProductSearch.py +254 -0
- package/virtual_assistant/tools/ReadEmail.py +251 -0
- package/virtual_assistant/tools/ReadFile.py +108 -0
- package/virtual_assistant/tools/ReadSlackMessages.py +191 -0
- package/virtual_assistant/tools/RemoveLabelFromEmail.py +137 -0
- package/virtual_assistant/tools/RescheduleCalendarEvent.py +227 -0
- package/virtual_assistant/tools/ScholarSearch.py +216 -0
- package/virtual_assistant/tools/SendDraft.py +101 -0
- package/virtual_assistant/tools/SendSlackMessage.py +148 -0
- package/virtual_assistant/tools/WriteFile.py +95 -0
- package/virtual_assistant/tools/__init__.py +1 -0
- package/virtual_assistant/tools/__pycache__/AddLabelToEmail.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/CheckEventsForDate.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/CheckUnreadSlackMessages.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/CreateCalendarEvent.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/DeleteCalendarEvent.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/DeleteDraft.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/DraftEmail.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/EditFile.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/FindEmails.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/GetCurrentTime.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/GetSlackUserInfo.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ListDirectory.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ListSkills.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ManageLabels.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ProductSearch.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ReadEmail.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ReadFile.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ReadSlackMessages.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/RemoveLabelFromEmail.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/RescheduleCalendarEvent.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/ScholarSearch.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/SendDraft.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/SendSlackMessage.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/WriteFile.cpython-312.pyc +0 -0
- package/virtual_assistant/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/virtual_assistant/virtual_assistant.py +52 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from typing import Optional, List
|
|
2
|
+
from agency_swarm.tools import BaseTool
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
import json
|
|
5
|
+
|
|
6
|
+
from helpers import execute_composio_tool
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ExecuteTool(BaseTool):
|
|
10
|
+
"""
|
|
11
|
+
Executes a single Composio tool call and returns the result.
|
|
12
|
+
|
|
13
|
+
Use this tool for simple, single-action tasks where you need to:
|
|
14
|
+
- Execute one tool
|
|
15
|
+
- Get the result
|
|
16
|
+
- No data transformation needed
|
|
17
|
+
|
|
18
|
+
Examples:
|
|
19
|
+
- Creating a single calendar event
|
|
20
|
+
- Submitting a support ticket
|
|
21
|
+
- Sending a simple notification
|
|
22
|
+
- Fetching specific data
|
|
23
|
+
|
|
24
|
+
For complex workflows requiring multiple tool calls or data transformation,
|
|
25
|
+
use IPythonInterpreter instead.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
tool_name: str = Field(
|
|
29
|
+
...,
|
|
30
|
+
description="The exact name of the Composio tool to execute (e.g., 'GMAIL_SEND_EMAIL', 'JIRA_CREATE_ISSUE')"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
arguments: dict = Field(
|
|
34
|
+
...,
|
|
35
|
+
description="Dictionary of arguments to pass to the tool. Keys are parameter names, values are parameter values.",
|
|
36
|
+
# Workaround to avoid the agents SDK from stripping dynamic dictionary inputs:
|
|
37
|
+
json_schema_extra={"type":"object","additionalProperties": True, "properties": {}}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
return_fields: Optional[List[str]] = Field(
|
|
41
|
+
None,
|
|
42
|
+
description="Optional list of field names to extract from the tool's response. If provided, only these fields will be returned. If not provided or the field doesn't exist, the full response is returned."
|
|
43
|
+
)
|
|
44
|
+
class ToolConfig:
|
|
45
|
+
strict: bool = False
|
|
46
|
+
|
|
47
|
+
def run(self):
|
|
48
|
+
try:
|
|
49
|
+
result = execute_composio_tool(
|
|
50
|
+
tool_name=self.tool_name,
|
|
51
|
+
arguments=self.arguments,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
if isinstance(result, dict) and result.get("error"):
|
|
55
|
+
return f"Error executing {self.tool_name}: {result.get('error')}"
|
|
56
|
+
|
|
57
|
+
if self.return_fields:
|
|
58
|
+
filtered_result = {}
|
|
59
|
+
|
|
60
|
+
# Handle both dict and object-like results
|
|
61
|
+
if isinstance(result, dict):
|
|
62
|
+
for field in self.return_fields:
|
|
63
|
+
# Support nested field access with dot notation (e.g., "data.id")
|
|
64
|
+
if "." in field:
|
|
65
|
+
parts = field.split(".")
|
|
66
|
+
value = result
|
|
67
|
+
try:
|
|
68
|
+
for part in parts:
|
|
69
|
+
if isinstance(value, dict):
|
|
70
|
+
value = value.get(part)
|
|
71
|
+
else:
|
|
72
|
+
value = getattr(value, part, None)
|
|
73
|
+
if value is None:
|
|
74
|
+
break
|
|
75
|
+
if value is not None:
|
|
76
|
+
filtered_result[field] = value
|
|
77
|
+
except (KeyError, AttributeError, TypeError):
|
|
78
|
+
# Field doesn't exist, skip it
|
|
79
|
+
continue
|
|
80
|
+
else:
|
|
81
|
+
# Simple field access
|
|
82
|
+
if field in result:
|
|
83
|
+
filtered_result[field] = result[field]
|
|
84
|
+
else:
|
|
85
|
+
# Try to access as object attributes
|
|
86
|
+
for field in self.return_fields:
|
|
87
|
+
try:
|
|
88
|
+
if "." in field:
|
|
89
|
+
parts = field.split(".")
|
|
90
|
+
value = result
|
|
91
|
+
for part in parts:
|
|
92
|
+
value = getattr(value, part, None)
|
|
93
|
+
if value is None:
|
|
94
|
+
break
|
|
95
|
+
if value is not None:
|
|
96
|
+
filtered_result[field] = value
|
|
97
|
+
else:
|
|
98
|
+
value = getattr(result, field, None)
|
|
99
|
+
if value is not None:
|
|
100
|
+
filtered_result[field] = value
|
|
101
|
+
except (AttributeError, TypeError):
|
|
102
|
+
# Field doesn't exist, skip it
|
|
103
|
+
continue
|
|
104
|
+
|
|
105
|
+
# Return filtered result if we got any fields, otherwise return full result
|
|
106
|
+
if filtered_result:
|
|
107
|
+
return json.dumps(filtered_result, indent=2, default=str)
|
|
108
|
+
else:
|
|
109
|
+
# No fields were found, return full result as fallback
|
|
110
|
+
return json.dumps(result, indent=2, default=str)
|
|
111
|
+
|
|
112
|
+
return json.dumps(result, indent=2, default=str)
|
|
113
|
+
|
|
114
|
+
except Exception as e:
|
|
115
|
+
return f"Error executing tool {self.tool_name}: {str(e)}"
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
if __name__ == "__main__":
|
|
119
|
+
import sys
|
|
120
|
+
import os
|
|
121
|
+
# Add parent directory to path for helpers import
|
|
122
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))
|
|
123
|
+
|
|
124
|
+
print("=" * 60)
|
|
125
|
+
print("ExecuteTool Test Suite")
|
|
126
|
+
print("=" * 60)
|
|
127
|
+
print()
|
|
128
|
+
|
|
129
|
+
# Test case 1: Simple execution without field filtering
|
|
130
|
+
print("Test 1: Execute GMAIL_LIST_LABELS without filtering")
|
|
131
|
+
print("-" * 60)
|
|
132
|
+
tool = ExecuteTool(
|
|
133
|
+
tool_name="GMAIL_LIST_LABELS",
|
|
134
|
+
arguments={"user_id": "me"}
|
|
135
|
+
)
|
|
136
|
+
result = tool.run()
|
|
137
|
+
print(f"Result length: {len(result)} characters")
|
|
138
|
+
print(f"Contains 'data': {'data' in result}")
|
|
139
|
+
print(f"Contains 'successful': {'successful' in result}")
|
|
140
|
+
print()
|
|
141
|
+
|
|
142
|
+
# Test case 2: Execute tool with simple field filtering
|
|
143
|
+
print("Test 2: Execute with simple field filtering")
|
|
144
|
+
print("-" * 60)
|
|
145
|
+
tool = ExecuteTool(
|
|
146
|
+
tool_name="GMAIL_LIST_LABELS",
|
|
147
|
+
arguments={"user_id": "me"},
|
|
148
|
+
return_fields=["successful", "error"]
|
|
149
|
+
)
|
|
150
|
+
result = tool.run()
|
|
151
|
+
print("Filtered result:")
|
|
152
|
+
print(result)
|
|
153
|
+
print()
|
|
154
|
+
|
|
155
|
+
# Test case 3: Execute tool with nested field access
|
|
156
|
+
print("Test 3: Execute with nested field filtering (dot notation)")
|
|
157
|
+
print("-" * 60)
|
|
158
|
+
tool = ExecuteTool(
|
|
159
|
+
tool_name="GMAIL_LIST_LABELS",
|
|
160
|
+
arguments={"user_id": "me"},
|
|
161
|
+
return_fields=["data.labels", "successful"]
|
|
162
|
+
)
|
|
163
|
+
result = tool.run()
|
|
164
|
+
print(f"Result length: {len(result)} characters")
|
|
165
|
+
print(f"Contains 'data.labels': {'data.labels' in result}")
|
|
166
|
+
print()
|
|
167
|
+
|
|
168
|
+
# Test case 4: Non-existent fields fallback
|
|
169
|
+
print("Test 4: Non-existent fields (should return full result)")
|
|
170
|
+
print("-" * 60)
|
|
171
|
+
tool = ExecuteTool(
|
|
172
|
+
tool_name="GMAIL_LIST_LABELS",
|
|
173
|
+
arguments={"user_id": "me"},
|
|
174
|
+
return_fields=["nonexistent_field1", "nonexistent_field2"]
|
|
175
|
+
)
|
|
176
|
+
result = tool.run()
|
|
177
|
+
print(f"Result length: {len(result)} characters")
|
|
178
|
+
print(f"Fallback to full result: {len(result) > 1000}")
|
|
179
|
+
print()
|
|
180
|
+
|
|
181
|
+
print("=" * 60)
|
|
182
|
+
print("All tests completed successfully!")
|
|
183
|
+
print("=" * 60)
|
|
184
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from agency_swarm.tools import BaseTool
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
|
|
4
|
+
from helpers import get_composio_tools
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class FindTools(BaseTool):
|
|
8
|
+
"""
|
|
9
|
+
Finds available Composio tools by toolkit names, specific tool names, or OAuth scopes.
|
|
10
|
+
Use this when you know the toolkit or exact tool name you're looking for.
|
|
11
|
+
For discovering tools by description, use SearchTools instead.
|
|
12
|
+
If you already have the schema and the tool you need, DO NOT use this tool.
|
|
13
|
+
"""
|
|
14
|
+
toolkits: list[str] = Field(
|
|
15
|
+
default=[],
|
|
16
|
+
description="List of toolkit names (e.g., ['GITHUB', 'GMAIL', 'SLACK']). "
|
|
17
|
+
"Required if tool_names is not provided."
|
|
18
|
+
)
|
|
19
|
+
tool_names: list[str] = Field(
|
|
20
|
+
default=[],
|
|
21
|
+
description="List of specific tool names (e.g., ['GITHUB_CREATE_ISSUE', 'GMAIL_SEND_EMAIL']). "
|
|
22
|
+
"Required if toolkits is not provided."
|
|
23
|
+
)
|
|
24
|
+
scopes: list[str] = Field(
|
|
25
|
+
default=[],
|
|
26
|
+
description="OAuth scopes to filter by permission level (e.g., ['write:org']). "
|
|
27
|
+
"Only works with a single toolkit."
|
|
28
|
+
)
|
|
29
|
+
limit: int = Field(
|
|
30
|
+
default=10,
|
|
31
|
+
description="Maximum number of tools to return. Default is 10."
|
|
32
|
+
)
|
|
33
|
+
include_args: bool = Field(
|
|
34
|
+
default=False,
|
|
35
|
+
description="If True, includes the arguments/parameters for each tool in the output. "
|
|
36
|
+
"Use ONLY when you are about to execute a specific tool. Do not set to true if you are still searching for the right tool."
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def run(self):
|
|
40
|
+
"""Fetches and formats Composio tools based on the provided filters."""
|
|
41
|
+
if self.tool_names:
|
|
42
|
+
tools = get_composio_tools(tools=self.tool_names)
|
|
43
|
+
elif self.toolkits:
|
|
44
|
+
kwargs = {
|
|
45
|
+
"toolkits": self.toolkits,
|
|
46
|
+
"limit": self.limit,
|
|
47
|
+
}
|
|
48
|
+
if self.scopes:
|
|
49
|
+
kwargs["scopes"] = self.scopes
|
|
50
|
+
tools = get_composio_tools(**kwargs)
|
|
51
|
+
else:
|
|
52
|
+
return "Error: Provide either 'toolkits' or 'tool_names'."
|
|
53
|
+
|
|
54
|
+
if isinstance(tools, dict) and tools.get("error"):
|
|
55
|
+
return f"Error: {tools.get('error')}"
|
|
56
|
+
|
|
57
|
+
return self._format_tools(tools)
|
|
58
|
+
|
|
59
|
+
def _format_tools(self, tools: list) -> str:
|
|
60
|
+
"""Formats tools into a concise, token-efficient string."""
|
|
61
|
+
if not tools:
|
|
62
|
+
return "No tools found matching the criteria."
|
|
63
|
+
|
|
64
|
+
formatted_lines = [f"Found {len(tools)} tool(s):\n"]
|
|
65
|
+
|
|
66
|
+
for tool in tools:
|
|
67
|
+
name = getattr(tool, 'name', 'Unknown')
|
|
68
|
+
description = getattr(tool, 'description', 'No description')
|
|
69
|
+
formatted_lines.append(f"• {name}: {description}")
|
|
70
|
+
|
|
71
|
+
if self.include_args:
|
|
72
|
+
args = self._extract_args(tool)
|
|
73
|
+
if args:
|
|
74
|
+
formatted_lines.append(f" Args: {args}")
|
|
75
|
+
|
|
76
|
+
return "\n".join(formatted_lines)
|
|
77
|
+
|
|
78
|
+
def _extract_args(self, tool) -> str:
|
|
79
|
+
"""Extracts and formats tool arguments as JSON."""
|
|
80
|
+
import json
|
|
81
|
+
try:
|
|
82
|
+
params = getattr(tool, 'params_json_schema', None)
|
|
83
|
+
if params and isinstance(params, dict) and 'properties' in params:
|
|
84
|
+
return json.dumps(params, indent=2)
|
|
85
|
+
except Exception:
|
|
86
|
+
pass
|
|
87
|
+
return ""
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
if __name__ == "__main__":
|
|
91
|
+
# Test 1: Search by toolkit
|
|
92
|
+
print("=== Test: Search by toolkit (GITHUB) ===")
|
|
93
|
+
tool = FindTools(toolkits=["GITHUB"], limit=2)
|
|
94
|
+
print(tool.run())
|
|
95
|
+
print()
|
|
96
|
+
|
|
97
|
+
# Test 2: Search by toolkit with args
|
|
98
|
+
print("=== Test: Search by toolkit with arguments ===")
|
|
99
|
+
tool = FindTools(toolkits=["GITHUB"], limit=2, include_args=True)
|
|
100
|
+
print(tool.run())
|
|
101
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from agency_swarm.tools import BaseTool
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
|
|
4
|
+
from helpers import execute_composio_tool
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ManageConnections(BaseTool):
|
|
8
|
+
"""
|
|
9
|
+
Check and manage Composio app connections for the current user.
|
|
10
|
+
|
|
11
|
+
Use this first when a task needs an external system (Gmail, Slack, Notion, etc.).
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
toolkits: list[str] = Field(
|
|
15
|
+
default=[],
|
|
16
|
+
description=(
|
|
17
|
+
"Optional list of toolkits to check/connect (e.g., ['gmail', 'slack', 'notion']). "
|
|
18
|
+
"If omitted, Composio decides based on context."
|
|
19
|
+
),
|
|
20
|
+
)
|
|
21
|
+
reinitiate_all: bool = Field(
|
|
22
|
+
default=False,
|
|
23
|
+
description="If true, force reconnection for the specified toolkits.",
|
|
24
|
+
)
|
|
25
|
+
session_id: str | None = Field(
|
|
26
|
+
default=None,
|
|
27
|
+
description="Optional session id from a previous SearchTools response.",
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
def run(self):
|
|
31
|
+
arguments: dict = {}
|
|
32
|
+
if self.toolkits:
|
|
33
|
+
arguments["toolkits"] = self.toolkits
|
|
34
|
+
if self.reinitiate_all:
|
|
35
|
+
arguments["reinitiate_all"] = self.reinitiate_all
|
|
36
|
+
if self.session_id:
|
|
37
|
+
arguments["session_id"] = self.session_id
|
|
38
|
+
|
|
39
|
+
result = execute_composio_tool(
|
|
40
|
+
tool_name="COMPOSIO_MANAGE_CONNECTIONS",
|
|
41
|
+
arguments=arguments,
|
|
42
|
+
)
|
|
43
|
+
return str(result)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from agency_swarm.tools import BaseTool
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
|
|
4
|
+
from helpers import execute_composio_tool
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SearchTools(BaseTool):
|
|
8
|
+
"""
|
|
9
|
+
Search Composio tools for a task and return recommended tools + schemas.
|
|
10
|
+
|
|
11
|
+
Use this when you need to discover tools for a new external workflow.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
queries: list[dict] = Field(
|
|
15
|
+
...,
|
|
16
|
+
description=(
|
|
17
|
+
"List of query objects for COMPOSIO_SEARCH_TOOLS. "
|
|
18
|
+
"Each item should usually include at least a 'use_case' key."
|
|
19
|
+
),
|
|
20
|
+
)
|
|
21
|
+
session: dict | None = Field(
|
|
22
|
+
default=None,
|
|
23
|
+
description=(
|
|
24
|
+
"Optional Composio search session payload. "
|
|
25
|
+
"Example: {'generate_id': true} or {'id': 'existing-session-id'}."
|
|
26
|
+
),
|
|
27
|
+
)
|
|
28
|
+
model: str | None = Field(
|
|
29
|
+
default=None,
|
|
30
|
+
description="Optional model hint to pass through to COMPOSIO_SEARCH_TOOLS.",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
def run(self):
|
|
34
|
+
arguments: dict = {"queries": self.queries}
|
|
35
|
+
if self.session is not None:
|
|
36
|
+
arguments["session"] = self.session
|
|
37
|
+
if self.model:
|
|
38
|
+
arguments["model"] = self.model
|
|
39
|
+
|
|
40
|
+
result = execute_composio_tool(
|
|
41
|
+
tool_name="COMPOSIO_SEARCH_TOOLS",
|
|
42
|
+
arguments=arguments,
|
|
43
|
+
)
|
|
44
|
+
return str(result)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
from shared_tools.CopyFile import CopyFile
|
|
2
|
+
from shared_tools.ExecuteTool import ExecuteTool
|
|
3
|
+
from shared_tools.FindTools import FindTools
|
|
4
|
+
from shared_tools.ManageConnections import ManageConnections
|
|
5
|
+
from shared_tools.SearchTools import SearchTools
|
|
6
|
+
|
|
7
|
+
__all__ = ["CopyFile", "ExecuteTool", "FindTools", "ManageConnections", "SearchTools"]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .slides_agent import create_slides_agent
|
|
Binary file
|
|
Binary file
|