mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-09-19 17:46:14 +00:00
feat: expose CrewAI Platform application catalog (#7383)
* feat: expose platform application catalog * refactor: centralize platform application catalog * fix: preserve platform application typing * chore: remove unused platform app export
This commit is contained in:
25
lib/crewai-core/src/crewai_core/platform_apps.py
Normal file
25
lib/crewai-core/src/crewai_core/platform_apps.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""CrewAI Platform application catalog."""
|
||||
|
||||
from typing import Final, Literal, get_args
|
||||
|
||||
|
||||
PlatformApp = Literal[
|
||||
"asana",
|
||||
"box",
|
||||
"clickup",
|
||||
"github",
|
||||
"gmail",
|
||||
"google_calendar",
|
||||
"google_sheets",
|
||||
"hubspot",
|
||||
"jira",
|
||||
"linear",
|
||||
"notion",
|
||||
"salesforce",
|
||||
"shopify",
|
||||
"slack",
|
||||
"stripe",
|
||||
"zendesk",
|
||||
]
|
||||
|
||||
PLATFORM_APPS: Final[tuple[str, ...]] = (*get_args(PlatformApp),)
|
||||
@@ -4,6 +4,8 @@ This module provides tools for integrating with various platform applications
|
||||
through the CrewAI platform API.
|
||||
"""
|
||||
|
||||
from crewai_core.platform_apps import PLATFORM_APPS
|
||||
|
||||
from crewai_tools.tools.crewai_platform_tools.crewai_platform_action_tool import (
|
||||
CrewAIPlatformActionTool,
|
||||
)
|
||||
@@ -13,6 +15,7 @@ from crewai_tools.tools.crewai_platform_tools.crewai_platform_tools import (
|
||||
|
||||
|
||||
__all__ = [
|
||||
"PLATFORM_APPS",
|
||||
"CrewAIPlatformActionTool",
|
||||
"CrewaiPlatformTools",
|
||||
]
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
from crewai_core.platform_apps import PLATFORM_APPS
|
||||
|
||||
|
||||
def test_platform_apps_contains_supported_application_catalog() -> None:
|
||||
assert PLATFORM_APPS == (
|
||||
"asana",
|
||||
"box",
|
||||
"clickup",
|
||||
"github",
|
||||
"gmail",
|
||||
"google_calendar",
|
||||
"google_sheets",
|
||||
"hubspot",
|
||||
"jira",
|
||||
"linear",
|
||||
"notion",
|
||||
"salesforce",
|
||||
"shopify",
|
||||
"slack",
|
||||
"stripe",
|
||||
"zendesk",
|
||||
)
|
||||
@@ -9,6 +9,7 @@ import re
|
||||
from typing import TYPE_CHECKING, Annotated, Any, Final, Literal
|
||||
import uuid
|
||||
|
||||
from crewai_core.platform_apps import PlatformApp
|
||||
from pydantic import (
|
||||
UUID4,
|
||||
BaseModel,
|
||||
@@ -180,25 +181,6 @@ _SLUG_RE: Final[re.Pattern[str]] = re.compile(
|
||||
)
|
||||
|
||||
|
||||
PlatformApp = Literal[
|
||||
"asana",
|
||||
"box",
|
||||
"clickup",
|
||||
"github",
|
||||
"gmail",
|
||||
"google_calendar",
|
||||
"google_sheets",
|
||||
"hubspot",
|
||||
"jira",
|
||||
"linear",
|
||||
"notion",
|
||||
"salesforce",
|
||||
"shopify",
|
||||
"slack",
|
||||
"stripe",
|
||||
"zendesk",
|
||||
]
|
||||
|
||||
PlatformAppOrAction = PlatformApp | str
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user