diff --git a/README.md b/README.md index 135a4fd4..f2df9bb2 100644 --- a/README.md +++ b/README.md @@ -5,27 +5,58 @@ A comprehensive SDK for building Microsoft Teams applications, bots, and AI agents using Python. This SDK provides a high-level framework with built-in Microsoft Graph integration, OAuth handling, and extensible plugin architecture. + + + + +- [Getting Started](#getting-started) +- [Packages](#packages) +- [Test Apps](#test-apps) +- [Links](#links) + ## Getting Started ### Prerequisites -Note: Ensure uv version is >= 0.8.11 -Install [uv](https://docs.astral.sh/uv/getting-started/installation/) - -### Installing +- UV version is >= 0.8.11. Install and upgrade from [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/). +- Python version is >= 3.12. Install or upgrade from [python.org/downloads](https://www.python.org/downloads/). -1. `uv sync --all-packages --group dev` - it installs the virtual env and dependencies - - If you are using Windows, you may need to manually install [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) -2. Activate virtual env +### Installation -- Mac: `source .venv/bin/activate` -- Windows: `.venv\Scripts\Activate` +#### 1. Install the dependencies. +```bash + uv sync --all-packages --group dev +``` +#### 2. Activate the virtual env > **Note:** After the initial setup, you need to activate the virtual environment each time you start a new terminal session +```bash +# On Mac + `source .venv/bin/activate` + +# On Windows + `.venv\Scripts\Activate` +``` -3. Install pre-commit hooks: `pre-commit install` +#### 3. Install the pre-commit hooks +```bash + pre-commit install +``` -## Creating a new package +## Packages + +> â„šī¸ core packages used to build client/server apps for Teams. + +- [`microsoft-teams-apps`](./packages/apps/README.md) +- [`microsoft-teams-ai`](./packages/ai/README.md) +- [`microsoft-teams-api`](./packages/api/README.md) +- [`microsoft-teams-cards`](./packages/cards/README.md) +- [`microsoft-teams-common`](./packages/common/README.md) +- [`microsoft-teams-devtools`](./packages/devtools/README.md) +- [`microsoft-teams-graph`](./packages/graph/README.md) +- [`microsoft-teams-openai`](./packages/openai/README.md) + +### Create a New Package We use [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/README.html) to create new packages. To create a new package, run: @@ -35,10 +66,32 @@ cookiecutter templates/package -o packages Follow the prompts to name the package and the directory. It should create the package folder in the `packages` directory. -## Creating a new test package +### Create A New Test Package Similarly, to create a new test package, run: ```bash cookiecutter templates/test -o tests ``` + +## Test Apps + +> â„šī¸ used to test the SDK or as a visual sample of how certain features can be implemented. + +> âš ī¸ **WARNING** these apps are changed often and are not intended to be used outside the +> projects monorepo. To easily setup a new project please use the **templates** available via +> the [@microsoft/teams.cli](https://www.npmjs.com/package/@microsoft/teams.cli) and follow the +> [Getting Started](https://microsoft.github.io/teams-ai/python/getting-started) documentation! + +- [`@tests/echo`](./tests/echo/README.md) +- [`@tests/message-extensions`](./tests/message-extensions/README.md) +- [`@tests/dialogs`](./tests/dialogs/README.md) +- [`@tests/graph`](./tests/graph/README.md) +- [`@tests/ai-test`](./tests/ai-test/README.md) +- [`@tests/stream`](./tests/stream/README.md) +- [`@tests/oauth`](./tests/oauth/README.md) + +## Links + +- [Teams Developer Portal: Apps](https://dev.teams.microsoft.com/apps) +- [Teams Toolkit](https://www.npmjs.com/package/@microsoft/teamsapp-cli) diff --git a/packages/ai/README.md b/packages/ai/README.md index e69de29b..bff9bccf 100644 --- a/packages/ai/README.md +++ b/packages/ai/README.md @@ -0,0 +1,16 @@ +# Microsoft Teams AI + +

+ + + + + + +

+ +AI tools and utilities. + + + + \ No newline at end of file diff --git a/packages/api/README.md b/packages/api/README.md index add4247f..9210f22a 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -3,9 +3,23 @@ # Microsoft Teams API Client +

+ + + + + + +

+ Core API client library for Microsoft Teams Bot Framework integration. Provides HTTP clients, authentication, and typed models for Teams Bot Framework APIs. + + + + + ## Features - **API Clients**: Bot, User, Conversation, Team, and Meeting clients diff --git a/packages/apps/README.md b/packages/apps/README.md index 1c953774..6dae9669 100644 --- a/packages/apps/README.md +++ b/packages/apps/README.md @@ -1,11 +1,24 @@ > [!CAUTION] > This project is in active development and not ready for production use. It has not been publicly announced yet. -# Microsoft Teams App Framework +# Microsoft Teams Apps Framework + +

+ + + + + + +

High-level framework for building Microsoft Teams applications. Handles activity routing, authentication, and provides Microsoft Graph integration. + + + + ## Features - **Activity Routing**: Decorator-based routing for different activity types diff --git a/packages/apps/src/microsoft/teams/apps/app_plugins.py b/packages/apps/src/microsoft/teams/apps/app_plugins.py index 0f6e4510..e599d76f 100644 --- a/packages/apps/src/microsoft/teams/apps/app_plugins.py +++ b/packages/apps/src/microsoft/teams/apps/app_plugins.py @@ -63,7 +63,7 @@ def initialize_plugins(self, plugins: List[PluginBase]) -> List[PluginBase]: if class_name != name: self.container.set_provider(class_name, providers.Object(plugin)) - self.logger.info("Successfully initialized all plugins") + self.logger.debug("Successfully initialized all plugins") return self.plugins def get_plugin(self, name: str) -> Optional[PluginBase]: diff --git a/packages/apps/src/microsoft/teams/apps/http_plugin.py b/packages/apps/src/microsoft/teams/apps/http_plugin.py index 7da2ad46..2b7b1411 100644 --- a/packages/apps/src/microsoft/teams/apps/http_plugin.py +++ b/packages/apps/src/microsoft/teams/apps/http_plugin.py @@ -250,7 +250,7 @@ async def _handle_activity_request(self, request: Request) -> Any: activity_type = body.get("type", "unknown") activity_id = body.get("id", "unknown") - self.logger.info(f"Received activity: {activity_type} (ID: {activity_id})") + self.logger.debug(f"Received activity: {activity_type} (ID: {activity_id})") # Create Future for async response coordination response_future = asyncio.get_event_loop().create_future() diff --git a/packages/cards/README.md b/packages/cards/README.md index 4aa56b94..2fdf4dfb 100644 --- a/packages/cards/README.md +++ b/packages/cards/README.md @@ -3,9 +3,22 @@ # Microsoft Teams Cards +

+ + + + + + +

+ Adaptive Cards models and specialized action types for Microsoft Teams applications. Provides Pydantic-based models for creating Adaptive Cards and Teams-specific actions. + + + + ## Features - **Adaptive Card Models**: Pydantic models for Adaptive Card schema diff --git a/packages/common/README.md b/packages/common/README.md index b4152295..1d49bb42 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -3,9 +3,22 @@ # Microsoft Teams Common Utilities +

+ + + + + + +

+ Shared utilities including HTTP client, logging, storage, and event handling. Provides common functionality used across other Teams SDK packages. + + + + ## Features - **HTTP Client**: Async HTTP client with token support and interceptors diff --git a/packages/devtools/README.md b/packages/devtools/README.md index 556768e2..61ca6d22 100644 --- a/packages/devtools/README.md +++ b/packages/devtools/README.md @@ -3,8 +3,21 @@ # Microsoft Teams DevTools +

+ + + + + + +

+ Developer tools for locally testing and debugging Teams applications. Streamlines the development process by eliminating the need to deploy apps or expose public endpoints during development. + + + + ## Features - **Local Testing**: Test Teams apps locally without deployment diff --git a/packages/devtools/src/microsoft/teams/devtools/devtools_plugin.py b/packages/devtools/src/microsoft/teams/devtools/devtools_plugin.py index 7af9a3a8..af568a3c 100644 --- a/packages/devtools/src/microsoft/teams/devtools/devtools_plugin.py +++ b/packages/devtools/src/microsoft/teams/devtools/devtools_plugin.py @@ -191,9 +191,9 @@ async def on_socket_connection(self, websocket: WebSocket): while True: try: data = await websocket.receive_text() - self.logger.info(f"Received WebSocket message: {data}") + self.logger.debug(f"Received WebSocket message: {data}") except WebSocketDisconnect: - self.logger.info(f"WebSocket {socket_id} disconnected") + self.logger.debug(f"WebSocket {socket_id} disconnected") break finally: del self.sockets[socket_id] @@ -244,7 +244,7 @@ async def emit_activity_to_sockets(self, event: DevToolsActivityEvent): try: await websocket.send_json(data) except WebSocketDisconnect: - self.logger.info(f"WebSocket {socket_id} disconnected") + self.logger.debug(f"WebSocket {socket_id} disconnected") del self.sockets[socket_id] def add_page(self, page: Page) -> "DevToolsPlugin": diff --git a/packages/graph/README.md b/packages/graph/README.md index b925bd56..b4f1db7b 100644 --- a/packages/graph/README.md +++ b/packages/graph/README.md @@ -1,7 +1,20 @@ # Microsoft Teams Graph Integration +

+ + + + + + +

+ This package provides seamless access to Microsoft Graph APIs from Teams bots and agents built with the Microsoft Teams AI SDK for Python. + + + + ## Key Features - **Token Integration**: Unified token handling using the Token type from microsoft-teams-common diff --git a/packages/openai/README.md b/packages/openai/README.md index e69de29b..9d16f434 100644 --- a/packages/openai/README.md +++ b/packages/openai/README.md @@ -0,0 +1,16 @@ +# Microsoft Teams OpenAI + +

+ + + + + + +

+ +OpenAI model implementations to be used with @microsoft-teams-ai. Supports all OpenAI-like API models. + + + + \ No newline at end of file diff --git a/tests/dialogs/README.md b/tests/dialogs/README.md new file mode 100644 index 00000000..e69de29b