Metadata-Version: 2.4
Name: coreason_connect
Version: 0.2.0
Summary: coreason-connect
License: # The Prosperity Public License 3.0.0
         
         Contributor: CoReason, Inc.
         
         Source Code: https://github.com/CoReason-AI/coreason_connect
         
         ## Purpose
         
         This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
         
         ## Agreement
         
         In order to receive this license, you have to agree to its rules.  Those rules are both obligations under that agreement and conditions to your license.  Don't do anything with this software that triggers a rule you can't or won't follow.
         
         ## Notices
         
         Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above.
         
         ## Commercial Trial
         
         Limit your use of this software for commercial purposes to a thirty-day trial period.  If you use this software for work, your company gets one trial period for all personnel, not one trial per person.
         
         ## Contributions Back
         
         Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose.
         
         ## Personal Uses
         
         Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose.
         
         ## Noncommercial Organizations
         
         Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding.
         
         ## Defense
         
         Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent.
         
         ## Copyright
         
         The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it.
         
         ## Patent
         
         The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license.
         
         ## Reliability
         
         The contributor can't revoke this license.
         
         ## Excuse
         
         You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule.
         
         ## No Liability
         
         ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.***
License-File: LICENSE
License-File: NOTICE
Author: Gowtham A Rao
Author-email: gowtham.rao@coreason.ai
Requires-Python: >=3.11
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Dist: aiofiles (>=23.2.1,<24.0.0)
Requires-Dist: anyio (>=4.12.1,<5.0.0)
Requires-Dist: coreason-identity
Requires-Dist: httpx (>=0.28.1,<0.29.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: mcp (>=1.25.0,<2.0.0)
Requires-Dist: msgraph-core (>=1.3.8,<2.0.0)
Project-URL: Documentation, https://github.com/CoReason-AI/coreason_connect
Project-URL: Homepage, https://github.com/CoReason-AI/coreason_connect
Project-URL: Repository, https://github.com/CoReason-AI/coreason_connect
Description-Content-Type: text/markdown

# coreason-connect

**The secure execution gateway for the CoReason ecosystem.**

coreason-connect transforms the CoReason "Brain" (coreason-cortex) from a passive text generator into an active **Agentic Workforce**. It solves the "Last Mile" problem of Enterprise AI by securely executing actions (RPC) on behalf of specific human users.

![License](https://img.shields.io/badge/license-Prosperity%203.0-blue)
[![Build Status](https://github.com/CoReason-AI/coreason_connect/actions/workflows/build.yml/badge.svg)](https://github.com/CoReason-AI/coreason_connect/actions)
[![Code Style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Documentation](https://img.shields.io/badge/Docs-Product%20Requirements-informational)](docs/product_requirements.md)

## Installation

```bash
pip install coreason-connect
```

*Note: For dependency management, we recommend using a virtual environment or tools like Poetry.*

## Features

*   **MCP-First Architecture**: Implements the Model Context Protocol (MCP) as the universal interface for forward compatibility with any Agentic Framework.
*   **Dynamic Plugin Loading**: Supports a "Glass Box" architecture where plugins are hot-loaded from local paths, ensuring isolation and security.
*   **Delegated Identity**: Uses RFC 8693 patterns to exchange workload identity for specific user tokens, preserving the Chain of Custody in audit logs.
*   **Transactional Safety**: Includes a "Spend Gate" that automatically suspends `is_consequential: true` actions (like purchases) until human approval is granted.
*   **Extensible Modules**: Built-in support and examples for:
    *   **Scientific Operations**: Searching and purchasing literature (e.g., RightFind).
    *   **Productivity**: Managing Microsoft 365 calendar and emails.
    *   **DevOps**: Self-healing code via GitOps workflows.

For detailed requirements and architecture, see [Product Requirements](docs/product_requirements.md).

## Usage

Here is a simple example of how to initialize the server and load plugins:

```python
import asyncio
from coreason_connect.server import CoreasonConnectServer
from coreason_connect.config import AppConfig

async def main():
    # Initialize configuration (looks for connectors.yaml by default or env vars)
    config = AppConfig()

    # Create the server instance
    server = CoreasonConnectServer(config)

    # Start the server (this initializes plugins and the MCP server)
    # In a real deployment, this would likely run indefinitely or attach to a transport.
    await server.initialize()
    print("Coreason Connect Server initialized.")

    # Example: Listing available tools
    tools = await server.list_tools()
    for tool in tools:
        print(f"Tool: {tool.name} - {tool.description}")

if __name__ == "__main__":
    asyncio.run(main())
```

