From 77119f4a80ed319ed5373230b98fc96b57498426 Mon Sep 17 00:00:00 2001 From: d-robotics Date: Wed, 2 Sep 2026 16:39:26 +0800 Subject: [PATCH] feat: add authenticated knowledge MCP gateway --- .env.example | 14 ++ Makefile | 7 +- README.md | 17 ++ apps/mcp-server/src/ekp_mcp/__init__.py | 5 + apps/mcp-server/src/ekp_mcp/auth.py | 76 +++++++ apps/mcp-server/src/ekp_mcp/main.py | 30 +++ apps/mcp-server/src/ekp_mcp/search.py | 77 +++++++ apps/mcp-server/src/ekp_mcp/server.py | 131 ++++++++++++ deploy/workbuddy-mcp.example.json | 12 ++ docs/api/MCP_CONTRACT.md | 11 +- docs/architecture/ARCHITECTURE.md | 11 + docs/demo/DEMO_SCOPE.md | 4 +- docs/development/MCP_SETUP.md | 89 ++++++++ docs/plans/PROGRESS.md | 22 ++ docs/plans/TASKS.md | 2 +- packages/core/src/ekp_core/config.py | 22 +- pyproject.toml | 5 + tests/integration/test_mcp_server.py | 227 ++++++++++++++++++++ tests/unit/test_config.py | 26 +++ tests/unit/test_mcp_auth.py | 38 ++++ tests/unit/test_mcp_search.py | 72 +++++++ tests/unit/test_workbuddy_mcp_config.py | 16 ++ uv.lock | 263 ++++++++++++++++++++++++ 23 files changed, 1170 insertions(+), 7 deletions(-) create mode 100644 apps/mcp-server/src/ekp_mcp/__init__.py create mode 100644 apps/mcp-server/src/ekp_mcp/auth.py create mode 100644 apps/mcp-server/src/ekp_mcp/main.py create mode 100644 apps/mcp-server/src/ekp_mcp/search.py create mode 100644 apps/mcp-server/src/ekp_mcp/server.py create mode 100644 deploy/workbuddy-mcp.example.json create mode 100644 docs/development/MCP_SETUP.md create mode 100644 tests/integration/test_mcp_server.py create mode 100644 tests/unit/test_mcp_auth.py create mode 100644 tests/unit/test_mcp_search.py create mode 100644 tests/unit/test_workbuddy_mcp_config.py diff --git a/.env.example b/.env.example index e2b72db..37d79c1 100644 --- a/.env.example +++ b/.env.example @@ -52,6 +52,20 @@ RERANKER_API_KEY= RERANKER_TIMEOUT_SECONDS=30 SEARCH_TOP_K=5 +# DEMO-012 MCP gateway. Inject MCP_AUTH_TOKEN at runtime; never commit its value. +MCP_HOST=127.0.0.1 +MCP_PORT=8766 +MCP_PATH=/mcp +MCP_PUBLIC_URL=http://127.0.0.1:8766/mcp +MCP_ISSUER_URL=http://127.0.0.1:8766 +MCP_AUTH_TOKEN= +MCP_CLIENT_ID=workbuddy-enterprise +MCP_SERVICE_IDENTITY=workbuddy-demo +MCP_REQUIRED_SCOPE=knowledge:search +MCP_ALLOWED_HOSTS='["127.0.0.1:*","localhost:*","[::1]:*","testserver"]' +MCP_ALLOWED_ORIGINS='["http://127.0.0.1:*","http://localhost:*","http://[::1]:*"]' +MCP_MAX_REQUEST_BODY_BYTES=1048576 + # Controlled ARCH-006 acceptance; keep disabled outside an authorized test run. EKP_RUN_LIVE_TESTS=0 EKP_CREDENTIALS_AUTHORIZED=0 diff --git a/Makefile b/Makefile index e1251be..8f00577 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help install run format format-check lint typecheck test test-unit test-integration migration-check eval live-acceptance up down +.PHONY: help install run run-mcp format format-check lint typecheck test test-unit test-integration migration-check eval live-acceptance up down UV_CACHE_DIR ?= /tmp/ekp-uv-cache export UV_CACHE_DIR @@ -7,6 +7,7 @@ help: @echo "Enterprise Knowledge Platform" @echo " install Install development dependencies" @echo " run Start the development API" + @echo " run-mcp Start the authenticated MCP gateway" @echo " format Format code" @echo " format-check Check formatting without modifying files" @echo " lint Run linters" @@ -24,6 +25,8 @@ install: uv sync --all-groups run: uv run uvicorn ekp_api.main:app --host "$${API_HOST:-0.0.0.0}" --port "$${API_PORT:-8000}" +run-mcp: + uv run ekp-mcp format: uv run ruff format . format-check: @@ -31,7 +34,7 @@ format-check: lint: uv run ruff check . typecheck: - uv run mypy apps/api/src packages tests + uv run mypy apps/api/src apps/mcp-server/src packages tests test: uv run pytest tests/unit tests/integration test-unit: diff --git a/README.md b/README.md index 8c9e14f..fbe2e93 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,18 @@ make install make run ``` +Run the independent authenticated MCP Gateway after injecting a dedicated +runtime token of at least 32 characters: + +```bash +export MCP_AUTH_TOKEN="" +make run-mcp +``` + +The Streamable HTTP endpoint defaults to `http://127.0.0.1:8766/mcp` and exposes +only `search_knowledge`. See `docs/development/MCP_SETUP.md` for WorkBuddy configuration, +identity boundaries, remote allowlists, and protocol verification. + The health endpoint is available at `http://localhost:8000/healthz`, and the versioned OpenAPI document is available at `http://localhost:8000/api/v1/openapi.json`. @@ -121,3 +133,8 @@ and search REST endpoints under `/api/v1`. Upload, list, detail, direct delete, and reranked source search are documented in `docs/development/REST_API_SETUP.md`; provider and storage internals remain outside the public response contract. + +DEMO-012 adds the independent authenticated MCP Gateway. It uses the official +MCP Python SDK, maps a runtime-only Bearer credential to a least-privilege service +identity, and delegates `search_knowledge` to the same `SearchService` used by REST. +No provider, storage, database, model, or index-profile details are exposed. diff --git a/apps/mcp-server/src/ekp_mcp/__init__.py b/apps/mcp-server/src/ekp_mcp/__init__.py new file mode 100644 index 0000000..61f17f3 --- /dev/null +++ b/apps/mcp-server/src/ekp_mcp/__init__.py @@ -0,0 +1,5 @@ +"""Enterprise Knowledge MCP gateway.""" + +from ekp_mcp.server import create_mcp_http_app, create_mcp_server + +__all__ = ["create_mcp_http_app", "create_mcp_server"] diff --git a/apps/mcp-server/src/ekp_mcp/auth.py b/apps/mcp-server/src/ekp_mcp/auth.py new file mode 100644 index 0000000..8593a8b --- /dev/null +++ b/apps/mcp-server/src/ekp_mcp/auth.py @@ -0,0 +1,76 @@ +"""Request-scoped MCP service identity and bearer-token verification.""" + +from dataclasses import dataclass +from secrets import compare_digest + +from mcp.server.auth.middleware.auth_context import get_access_token +from mcp.server.auth.provider import AccessToken +from mcp.server.mcpserver.exceptions import ToolError +from pydantic import SecretStr + + +@dataclass(frozen=True, slots=True) +class McpIdentity: + """Authenticated client/service identity passed across the application boundary.""" + + client_id: str + subject: str + scopes: frozenset[str] + + +class StaticServiceTokenVerifier: + """Validate one runtime-injected, least-privilege Demo service credential. + + The verifier is intentionally small for DEMO-012. It establishes the MCP + identity boundary without pretending to be the V1 OAuth or ACL solution. + """ + + __slots__ = ( + "_client_id", + "_expected_token", + "_issuer", + "_scope", + "_subject", + ) + + def __init__( + self, + expected_token: SecretStr, + *, + client_id: str, + subject: str, + scope: str, + issuer: str, + ) -> None: + self._expected_token = expected_token + self._client_id = client_id + self._subject = subject + self._scope = scope + self._issuer = issuer + + async def verify_token(self, token: str) -> AccessToken | None: + """Return scoped identity metadata only for a constant-time token match.""" + if not compare_digest(token, self._expected_token.get_secret_value()): + return None + return AccessToken( + token=token, + client_id=self._client_id, + subject=self._subject, + scopes=[self._scope], + claims={"iss": self._issuer}, + ) + + +def current_mcp_identity() -> McpIdentity: + """Resolve the SDK-authenticated principal for the active tool request.""" + access_token = get_access_token() + if access_token is None: + # HTTP middleware normally rejects this earlier; retaining the guard + # prevents accidental unauthenticated in-process tool invocation. + raise ToolError("authentication required") + subject = access_token.subject or access_token.client_id + return McpIdentity( + client_id=access_token.client_id, + subject=subject, + scopes=frozenset(access_token.scopes), + ) diff --git a/apps/mcp-server/src/ekp_mcp/main.py b/apps/mcp-server/src/ekp_mcp/main.py new file mode 100644 index 0000000..4efbcd2 --- /dev/null +++ b/apps/mcp-server/src/ekp_mcp/main.py @@ -0,0 +1,30 @@ +"""Command-line entry point for the independent MCP gateway process.""" + +from mcp.server.transport_security import TransportSecuritySettings + +from ekp_core.config import get_settings +from ekp_mcp.server import create_mcp_server + + +def main() -> None: + """Run the authenticated Streamable HTTP server from environment settings.""" + settings = get_settings() + server = create_mcp_server(settings) + server.run( + transport="streamable-http", + host=settings.mcp_host, + port=settings.mcp_port, + streamable_http_path=settings.mcp_path, + json_response=True, + stateless_http=True, + max_request_body_size=settings.mcp_max_request_body_bytes, + transport_security=TransportSecuritySettings( + enable_dns_rebinding_protection=True, + allowed_hosts=settings.mcp_allowed_hosts, + allowed_origins=settings.mcp_allowed_origins, + ), + ) + + +if __name__ == "__main__": # pragma: no cover - exercised through the console script. + main() diff --git a/apps/mcp-server/src/ekp_mcp/search.py b/apps/mcp-server/src/ekp_mcp/search.py new file mode 100644 index 0000000..5dc3cb6 --- /dev/null +++ b/apps/mcp-server/src/ekp_mcp/search.py @@ -0,0 +1,77 @@ +"""MCP-specific application boundary over the provider-neutral SearchService.""" + +from dataclasses import dataclass +from typing import Protocol +from uuid import UUID + +from pydantic import BaseModel + +from ekp_core.search import SearchResult +from ekp_mcp.auth import McpIdentity + + +class KnowledgeSearcher(Protocol): + """Subset of SearchService required by the MCP gateway.""" + + def search(self, query: str, top_k: int | None = None) -> SearchResult: + """Return reranked canonical sources for a normalized query.""" + + +class McpSourceResponse(BaseModel): + """Provider-neutral source shape exposed by `search_knowledge`.""" + + document_id: UUID + filename: str + page: int | None + section: str | None + chunk_id: UUID + content: str + score: float + rerank_score: float + + +class McpSearchResponse(BaseModel): + """Structured MCP result aligned with the REST search source fields.""" + + results: list[McpSourceResponse] + + +class McpKnowledgeSearch(Protocol): + """Identity-aware search boundary consumed by the protocol server.""" + + def search(self, identity: McpIdentity, query: str, top_k: int) -> McpSearchResponse: + """Return authorized, structured knowledge sources.""" + + +@dataclass(frozen=True, slots=True) +class McpSearchApplication: + """Require an identity before delegating to the shared SearchService. + + Document ACL is outside the current Demo scope. Keeping identity explicit + here prevents the gateway from becoming an anonymous bypass when the + permission resolver is added in the V1 tasks. + """ + + searcher: KnowledgeSearcher + required_scope: str + + def search(self, identity: McpIdentity, query: str, top_k: int) -> McpSearchResponse: + """Authorize the Demo scope and serialize canonical search results.""" + if self.required_scope not in identity.scopes: + raise PermissionError("MCP identity lacks the knowledge search scope") + result = self.searcher.search(query, top_k) + return McpSearchResponse( + results=[ + McpSourceResponse( + document_id=source.document_id, + filename=source.filename, + page=source.page, + section=source.section, + chunk_id=source.chunk_id, + content=source.content, + score=source.score, + rerank_score=source.rerank_score, + ) + for source in result.results + ] + ) diff --git a/apps/mcp-server/src/ekp_mcp/server.py b/apps/mcp-server/src/ekp_mcp/server.py new file mode 100644 index 0000000..7aceda7 --- /dev/null +++ b/apps/mcp-server/src/ekp_mcp/server.py @@ -0,0 +1,131 @@ +"""Authenticated Streamable HTTP MCP server exposing Demo business tools.""" + +import logging +from functools import partial +from typing import Annotated + +import anyio +from mcp.server import MCPServer +from mcp.server.auth.settings import AuthSettings +from mcp.server.mcpserver.exceptions import ToolError +from mcp.server.transport_security import TransportSecuritySettings +from pydantic import Field +from starlette.applications import Starlette + +from ekp_api.providers import ApiServices, create_api_services +from ekp_core.config import Settings, get_settings +from ekp_core.dense_retrieval import InvalidRetrievalQueryError +from ekp_mcp.auth import StaticServiceTokenVerifier, current_mcp_identity +from ekp_mcp.search import McpKnowledgeSearch, McpSearchApplication, McpSearchResponse + +logger = logging.getLogger(__name__) + + +class McpConfigurationError(ValueError): + """Raised when the gateway lacks its dedicated runtime credential.""" + + +def _create_search_application( + settings: Settings, + api_services: ApiServices | None, +) -> McpSearchApplication: + services = api_services or create_api_services(settings) + return McpSearchApplication(services.search, settings.mcp_required_scope) + + +def create_mcp_server( + settings: Settings | None = None, + *, + api_services: ApiServices | None = None, + search_application: McpKnowledgeSearch | None = None, +) -> MCPServer[dict[str, object]]: + """Create the authenticated MCP gateway with only `search_knowledge`.""" + resolved_settings = settings or get_settings() + if ( + resolved_settings.mcp_auth_token is None + or len(resolved_settings.mcp_auth_token.get_secret_value()) < 32 + ): + raise McpConfigurationError("MCP_AUTH_TOKEN must contain at least 32 characters") + + application = search_application or _create_search_application( + resolved_settings, + api_services, + ) + token_verifier = StaticServiceTokenVerifier( + resolved_settings.mcp_auth_token, + client_id=resolved_settings.mcp_client_id, + subject=resolved_settings.mcp_service_identity, + scope=resolved_settings.mcp_required_scope, + issuer=str(resolved_settings.mcp_issuer_url), + ) + server: MCPServer[dict[str, object]] = MCPServer( + name="enterprise-knowledge", + title="Enterprise Knowledge MCP Server", + description="Authenticated enterprise knowledge search backed by canonical sources.", + version="0.1.0", + token_verifier=token_verifier, + auth=AuthSettings( + issuer_url=resolved_settings.mcp_issuer_url, + resource_server_url=resolved_settings.mcp_public_url, + required_scopes=[resolved_settings.mcp_required_scope], + ), + log_level=resolved_settings.log_level, + ) + + @server.tool( + name="search_knowledge", + description=( + "Search authorized enterprise knowledge and return traceable source passages. " + "Use for factual questions that should be grounded in indexed company documents." + ), + structured_output=True, + ) + async def search_knowledge( + query: Annotated[str, Field(min_length=1, max_length=1600)], + top_k: Annotated[int, Field(ge=1, le=64, strict=True)] = 5, + ) -> McpSearchResponse: + """Run the shared synchronous search pipeline outside the ASGI event loop.""" + identity = current_mcp_identity() + try: + return await anyio.to_thread.run_sync( + partial(application.search, identity, query, top_k) + ) + except InvalidRetrievalQueryError as error: + raise ToolError("search query must contain non-whitespace text") from error + except PermissionError as error: + raise ToolError("knowledge search is not authorized") from error + except Exception: + # Do not reflect provider, database, endpoint, or credential details + # into MCP content or logs. Operations can correlate this generic + # event with upstream sanitized service telemetry. + logger.error("MCP knowledge search failed") + raise ToolError("knowledge search failed") from None + + return server + + +def create_mcp_http_app( + settings: Settings | None = None, + *, + api_services: ApiServices | None = None, + search_application: McpKnowledgeSearch | None = None, +) -> Starlette: + """Build the stateless Streamable HTTP app used by WorkBuddy and tests.""" + resolved_settings = settings or get_settings() + server = create_mcp_server( + resolved_settings, + api_services=api_services, + search_application=search_application, + ) + return server.streamable_http_app( + streamable_http_path=resolved_settings.mcp_path, + json_response=True, + stateless_http=True, + max_request_body_size=resolved_settings.mcp_max_request_body_bytes, + host=resolved_settings.mcp_host, + transport_security=TransportSecuritySettings( + enable_dns_rebinding_protection=True, + allowed_hosts=resolved_settings.mcp_allowed_hosts, + allowed_origins=resolved_settings.mcp_allowed_origins, + ), + ) diff --git a/deploy/workbuddy-mcp.example.json b/deploy/workbuddy-mcp.example.json new file mode 100644 index 0000000..dff4d16 --- /dev/null +++ b/deploy/workbuddy-mcp.example.json @@ -0,0 +1,12 @@ +{ + "mcpServers": { + "enterprise-knowledge": { + "type": "http", + "url": "${EKP_MCP_URL:-http://127.0.0.1:8766/mcp}", + "headers": { + "Authorization": "Bearer ${EKP_MCP_TOKEN}" + }, + "description": "企业知识检索" + } + } +} diff --git a/docs/api/MCP_CONTRACT.md b/docs/api/MCP_CONTRACT.md index 59549b0..6cc0185 100644 --- a/docs/api/MCP_CONTRACT.md +++ b/docs/api/MCP_CONTRACT.md @@ -10,7 +10,7 @@ P0 business tools: Every request maps to a user/service identity and uses the same authorization/application services as REST. Do not expose OceanBase Vector, BOS, model names, parsers or other infrastructure choices. -## Demo priority slice(DEMO-012,尚未实现) +## Demo priority slice(DEMO-012,已实现) `DEMO-012` 已提升为当前最高实现优先级。首个可运行 Gateway 只注册 `search_knowledge`,其输入与 `/api/v1/search` 对齐: @@ -33,3 +33,12 @@ Document ACL 尚未进入 Demo Scope,`DEMO-012` 只能证明身份传递、认 验收至少覆盖:MCP 工具发现、参数校验、成功检索、无结果、认证失败、安全错误收敛,以及 WorkBuddy Enterprise 的一次端到端调用。其余 P0 tools 继续留在完整 V1 `EKP-071`。 + +实现使用独立 Streamable HTTP Gateway,默认端点为 `http://127.0.0.1:8766/mcp`。请求必须 +携带 `Authorization: Bearer `;Token 只从运行环境读取,并映射为显式 service identity +和 `knowledge:search` scope。当前静态 service credential 是 Demo 兼容层,不替代 V1 OAuth、 +ACL 或用户委托授权。 + +公开错误边界:缺失/无效 Token 为 HTTP `401`,scope 不足为 `403`;Tool 参数不合法返回 MCP +参数错误;检索运行失败只返回 `knowledge search failed`。Host/Origin allowlist 默认只允许 +本机,远程部署必须显式注入公开域名。 diff --git a/docs/architecture/ARCHITECTURE.md b/docs/architecture/ARCHITECTURE.md index 8dbdecc..48bb3eb 100644 --- a/docs/architecture/ARCHITECTURE.md +++ b/docs/architecture/ARCHITECTURE.md @@ -532,6 +532,17 @@ MinerU 首要验证客户端:**WorkBuddy Enterprise**。 +### 11.1 DEMO-012 实现边界 + +当前已落地独立 Streamable HTTP Gateway,默认只绑定 `127.0.0.1:8766/mcp`,只注册 +`search_knowledge`。Gateway 与 REST 共享 `SearchService`,同步检索通过工作线程执行,避免 +阻塞 MCP ASGI 事件循环。 + +Demo 使用运行时专用 Bearer Token 映射到 client/service identity 和最小 +`knowledge:search` scope,并启用 Host/Origin allowlist。该边界用于 WorkBuddy 接入验证, +后续 `EKP-070` 仍需用正式 OAuth/企业身份系统和 Permission Resolver 替换静态 Token; +`DEMO-012` 不改变 ADR-007 的 ACL 要求。 + --- ## 12. REST API diff --git a/docs/demo/DEMO_SCOPE.md b/docs/demo/DEMO_SCOPE.md index 4788f4e..3e07b43 100644 --- a/docs/demo/DEMO_SCOPE.md +++ b/docs/demo/DEMO_SCOPE.md @@ -323,7 +323,7 @@ Reranker ### DEMO-012 MCP -**已批准并提升为下一优先级。** 只实现一个最小 MCP Tool:`search_knowledge`,复用现有 +**已完成。** 只实现一个最小 MCP Tool:`search_knowledge`,复用现有 Search Service 或 `/api/v1/search`,用于验证标准 MCP、identity 边界和 WorkBuddy 接入。 不在本 Task 扩展其他 P0 tools 或声称完成尚未实施的 Document ACL。 @@ -391,7 +391,7 @@ ARCH-001~006 Provider 架构迁移与真实验收 实施状态(2026-09-02):`DEMO-001~DEMO-010`、用户新增的 `DEMO-014` 与 `ARCH-001~ARCH-006` 均已完成并通过当前 Scope 的闭环验收。`PLAN-001` 已完成现状审计和 -任务拆分;`DEMO-012`、`DEMO-015`、`DEMO-016` 已批准,按该顺序实施。`DEMO-011` 和 +任务拆分;`DEMO-012` 已完成,`DEMO-015`、`DEMO-016` 已批准并按顺序实施。`DEMO-011` 和 `DEMO-013` 仍为可选项,不因本状态记录自动进入范围。 可选: diff --git a/docs/development/MCP_SETUP.md b/docs/development/MCP_SETUP.md new file mode 100644 index 0000000..433ea9f --- /dev/null +++ b/docs/development/MCP_SETUP.md @@ -0,0 +1,89 @@ +# DEMO-012 MCP Gateway 使用说明 + +## 范围 + +DEMO-012 提供独立的 Enterprise Knowledge MCP Gateway,通过标准 Streamable HTTP 暴露一个 +只读工具:`search_knowledge`。Gateway 直接复用 API 进程使用的 `SearchService` 组合,不复制 +Dense Retrieval、Reranker 或 Source Enrichment 逻辑。 + +当前 Demo 只建立认证和身份传递边界:一个运行时注入的专用 Bearer Token 映射到一个 +user/service identity,并且只有 `knowledge:search` scope。它不是共享超级管理员 Token,也不 +代表 V1 OAuth、Document ACL 或完整 MCP P0 工具已经完成。 + +## 配置 + +必须通过运行环境提供至少 32 字符的随机 Token: + +```bash +export MCP_AUTH_TOKEN="" +make run-mcp +``` + +默认地址为 `http://127.0.0.1:8766/mcp`。除现有数据库、BOS、Embedding、Vector 和 Reranker +配置外,Gateway 支持: + +| 变量 | 默认值 | 说明 | +|---|---|---| +| `MCP_HOST` | `127.0.0.1` | 监听地址;本地默认不暴露到其他网卡 | +| `MCP_PORT` | `8766` | Gateway 端口 | +| `MCP_PATH` | `/mcp` | Streamable HTTP 单一端点 | +| `MCP_PUBLIC_URL` | `http://127.0.0.1:8766/mcp` | MCP Resource Server URL | +| `MCP_ISSUER_URL` | `http://127.0.0.1:8766` | Demo Token 的身份颁发方标识 | +| `MCP_CLIENT_ID` | `workbuddy-enterprise` | MCP Client 类型标识 | +| `MCP_SERVICE_IDENTITY` | `workbuddy-demo` | 传入业务边界的服务身份 | +| `MCP_REQUIRED_SCOPE` | `knowledge:search` | Tool 所需最小 scope | +| `MCP_ALLOWED_HOSTS` | 仅本机/test | DNS rebinding Host allowlist,JSON 数组 | +| `MCP_ALLOWED_ORIGINS` | 仅本机 | Origin allowlist,JSON 数组 | + +远程部署必须使用 TLS 反向代理,并把公开域名加入 `MCP_ALLOWED_HOSTS`;有 `Origin` 的客户端还 +必须显式配置 `MCP_ALLOWED_ORIGINS`。Token、真实域名和内部 Endpoint 不得提交 Git。 + +## WorkBuddy / CodeBuddy 配置 + +WorkBuddy Enterprise 官方客户端支持 `type: "http"`、远程 URL、自定义 Header 和环境变量 +展开。可复制 `deploy/workbuddy-mcp.example.json` 作为项目配置,内容如下: + +```jsonc +{ + "mcpServers": { + "enterprise-knowledge": { + "type": "http", + "url": "${EKP_MCP_URL:-http://127.0.0.1:8766/mcp}", + "headers": { + "Authorization": "Bearer ${EKP_MCP_TOKEN}" + }, + "description": "企业知识检索" + } + } +} +``` + +只提交包含环境变量占位符的配置;`EKP_MCP_TOKEN` 必须由每个运行环境安全注入。连接后应只 +发现 `mcp__enterprise_knowledge__search_knowledge` 一个工具。 + +## 安全和错误语义 + +- 缺失或错误 Token 返回 `401`,缺少 scope 返回 `403`; +- 未批准 Host 返回 `421`,未批准 Origin 返回 `403`; +- Query 长度和 `top_k` 在 MCP schema 层校验; +- 预期业务错误返回安全 Tool Error;未知 Provider/数据库错误收敛为 + `knowledge search failed`; +- MCP 输出和 Gateway 日志不得包含 Token、Provider Endpoint、数据库表名、模型名或 + Index Profile。 + +## 验证 + +```bash +uv run pytest tests/unit/test_mcp_auth.py tests/unit/test_mcp_search.py +uv run pytest tests/integration/test_mcp_server.py +``` + +集成测试使用官方 MCP Python Client 通过 Streamable HTTP 完成 initialize、tools/list 和 +tools/call,并使用与 WorkBuddy 相同的 Bearer Header 配置验证身份传递、无结果、参数错误、 +认证失败、Origin 防护和错误脱敏。 + +参考: + +- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) +- [MCP Streamable HTTP 规范](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports) +- [WorkBuddy Enterprise MCP 使用文档](https://cloud.tencent.cn/document/product/1831/137039) diff --git a/docs/plans/PROGRESS.md b/docs/plans/PROGRESS.md index ab4dafe..23b17b5 100644 --- a/docs/plans/PROGRESS.md +++ b/docs/plans/PROGRESS.md @@ -285,3 +285,25 @@ Provider 架构迁移按 `ARCH-001 → ARCH-002 → ARCH-003 → ARCH-004 → AR 获取已锁定的构建依赖后全套复验通过。 - 下一任务:`DEMO-012`。详细依赖、范围和验收标准见 `docs/plans/ASYNC_INGESTION_MCP_PLAN.md`。 + +### DEMO-012(已完成) + +- 新增独立 `ekp-mcp` Streamable HTTP Gateway 和 `make run-mcp` 入口,使用官方 MCP Python + SDK v2;默认只监听 `127.0.0.1:8766/mcp`,且只注册 `search_knowledge` 一个业务 Tool。 +- Gateway 直接复用现有 `SearchService`,没有复制 Dense Retrieval、Reranker 或 Source + Enrichment;结构化输出与 REST 保持相同来源字段,不返回 Index Profile 或 Provider 信息。 +- 新增运行时专用 Bearer Token 验证,将凭据映射为显式 client/service identity 和最小 + `knowledge:search` scope;Token 至少 32 字符并通过 `SecretStr` 管理,不允许写入仓库。 + 当前身份层是 Demo 边界,不宣称完成 V1 OAuth、Document ACL 或用户委托授权。 +- 启用 Host/Origin allowlist 和请求体限制;缺失/错误认证、scope、参数和检索异常均按安全 + 边界收敛,响应和日志不回显 Token、内部 Endpoint、数据库、模型或索引实现。 +- 新增官方 MCP Client 的协议级测试,覆盖 initialize、tools/list、tools/call、唯一 Tool、 + identity 传递、REST 字段一致性、无结果、参数拒绝、认证失败、Origin 防护和错误脱敏; + WorkBuddy 的 HTTP + Bearer + 环境变量配置记录于 `docs/development/MCP_SETUP.md`。 +- 验证结果:Ruff Format/Lint、Mypy、Git diff、Alembic Head/离线升级全部通过;Unit + + Integration `165 passed`,RAG Evaluation `5 passed`。本任务未改变检索算法或数据库结构, + 不重复消耗真实 Embedding/OceanBase/Reranker 资源。 +- 当前环境未安装 WorkBuddy/CodeBuddy 客户端,因而没有执行客户端 UI 的现场连接;已按其官方 + HTTP 配置格式提供无凭据模板,并使用官方 MCP Client 对相同 Streamable HTTP + Bearer + 链路完成端到端协议验证。正式部署后仍需用可达 HTTPS URL 做一次 WorkBuddy 现场冒烟。 +- 下一任务:`DEMO-015`。 diff --git a/docs/plans/TASKS.md b/docs/plans/TASKS.md index 67e8880..195c0d8 100644 --- a/docs/plans/TASKS.md +++ b/docs/plans/TASKS.md @@ -26,7 +26,7 @@ validation. Provider credentials and internal endpoints are runtime inputs and n ## Post-Demo priority plan - [x] PLAN-001 MCP 与异步批量入库现状审计、任务拆分和契约基线 -- [ ] DEMO-012 MCP `search_knowledge` Gateway + identity + WorkBuddy verification +- [x] DEMO-012 MCP `search_knowledge` Gateway + identity + WorkBuddy verification - [ ] DEMO-015 Async ingestion Job + bounded automatic retry + pre-retry cleanup - [ ] DEMO-016 Batch async upload API + per-file Job status + Admin Console diff --git a/packages/core/src/ekp_core/config.py b/packages/core/src/ekp_core/config.py index f4e1772..645b10d 100644 --- a/packages/core/src/ekp_core/config.py +++ b/packages/core/src/ekp_core/config.py @@ -4,7 +4,7 @@ from functools import lru_cache from pathlib import Path from typing import Literal -from pydantic import Field, SecretStr, model_validator +from pydantic import AnyHttpUrl, Field, SecretStr, model_validator from pydantic_settings import BaseSettings, SettingsConfigDict from sqlalchemy.engine import make_url @@ -67,6 +67,22 @@ class Settings(BaseSettings): reranker_api_key: SecretStr | None = None reranker_timeout_seconds: float = Field(default=30.0, gt=0) search_top_k: int = Field(default=5, ge=1, le=64) + mcp_host: str = "127.0.0.1" + mcp_port: int = Field(default=8766, ge=1, le=65535) + mcp_path: str = "/mcp" + mcp_public_url: AnyHttpUrl = AnyHttpUrl("http://127.0.0.1:8766/mcp") + mcp_issuer_url: AnyHttpUrl = AnyHttpUrl("http://127.0.0.1:8766") + mcp_auth_token: SecretStr | None = None + mcp_client_id: str = Field(default="workbuddy-enterprise", min_length=1, max_length=200) + mcp_service_identity: str = Field(default="workbuddy-demo", min_length=1, max_length=200) + mcp_required_scope: str = Field(default="knowledge:search", min_length=1, max_length=200) + mcp_allowed_hosts: list[str] = ["127.0.0.1:*", "localhost:*", "[::1]:*", "testserver"] + mcp_allowed_origins: list[str] = [ + "http://127.0.0.1:*", + "http://localhost:*", + "http://[::1]:*", + ] + mcp_max_request_body_bytes: int = Field(default=1024 * 1024, ge=1024, le=4 * 1024 * 1024) @model_validator(mode="after") def validate_chunk_window(self) -> "Settings": @@ -75,6 +91,10 @@ class Settings(BaseSettings): raise ValueError("chunk_overlap_tokens must be less than chunk_max_tokens") if self.search_top_k > self.dense_top_n: raise ValueError("search_top_k must not exceed dense_top_n") + if not self.mcp_path.startswith("/") or self.mcp_path.endswith("/"): + raise ValueError("mcp_path must start with '/' and must not end with '/'") + if not self.mcp_allowed_hosts: + raise ValueError("mcp_allowed_hosts must not be empty") database_url = make_url(self.database_url.get_secret_value()) if database_url.get_backend_name() == "sqlite": if self.app_env != "test": diff --git a/pyproject.toml b/pyproject.toml index 24e1ec3..8d5b0fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ dependencies = [ "alembic>=1.18,<2", "bce-python-sdk>=0.9.72,<0.10", "fastapi>=0.115,<1", + "mcp>=2,<3", "pymysql>=1.1,<2", "pymupdf>=1.26,<2", "pydantic-settings>=2.7,<3", @@ -25,6 +26,7 @@ dependencies = [ [project.scripts] ekp-index-rebuild = "ekp_api.index_rebuild:main" ekp-live-acceptance = "ekp_api.live_acceptance:main" +ekp-mcp = "ekp_mcp.main:main" [dependency-groups] dev = [ @@ -38,6 +40,7 @@ dev = [ [tool.setuptools.packages.find] where = [ "apps/api/src", + "apps/mcp-server/src", "packages/core/src", "packages/domain/src", "packages/providers/object_storage/src", @@ -57,6 +60,7 @@ select = ["ASYNC", "B", "E4", "E7", "E9", "F", "I", "UP"] [tool.ruff.lint.isort] known-first-party = [ "ekp_api", + "ekp_mcp", "ekp_core", "ekp_domain", "ekp_embedding", @@ -71,6 +75,7 @@ python_version = "3.12" strict = true mypy_path = [ "apps/api/src", + "apps/mcp-server/src", "packages/core/src", "packages/domain/src", "packages/providers/object_storage/src", diff --git a/tests/integration/test_mcp_server.py b/tests/integration/test_mcp_server.py new file mode 100644 index 0000000..2d19145 --- /dev/null +++ b/tests/integration/test_mcp_server.py @@ -0,0 +1,227 @@ +"""Protocol-level tests for authenticated WorkBuddy-compatible MCP search.""" + +import asyncio +from dataclasses import dataclass, field +from unittest.mock import patch +from uuid import uuid4 + +import httpx2 +from mcp import ClientSession +from mcp.client.streamable_http import streamable_http_client +from mcp_types import CallToolResult +from pydantic import AnyHttpUrl, SecretStr + +from ekp_core.config import Settings +from ekp_mcp.auth import McpIdentity +from ekp_mcp.search import McpSearchResponse, McpSourceResponse +from ekp_mcp.server import McpConfigurationError, create_mcp_http_app, create_mcp_server + + +@dataclass(slots=True) +class RecordingSearchApplication: + """Capture the authenticated identity observed at the business boundary.""" + + calls: list[tuple[McpIdentity, str, int]] = field(default_factory=list) + failure: Exception | None = None + empty: bool = False + + def search(self, identity: McpIdentity, query: str, top_k: int) -> McpSearchResponse: + self.calls.append((identity, query, top_k)) + if self.failure is not None: + raise self.failure + if self.empty: + return McpSearchResponse(results=[]) + return McpSearchResponse( + results=[ + McpSourceResponse( + document_id=uuid4(), + filename="退款政策.md", + page=2, + section="退款政策", + chunk_id=uuid4(), + content="产品A退款周期为七天。", + score=0.8, + rerank_score=0.9, + ) + ] + ) + + +def _settings() -> Settings: + return Settings( + app_env="test", + database_url=SecretStr("sqlite+pysqlite:///:memory:"), + mcp_auth_token=SecretStr("workbuddy-test-token-at-least-32-chars"), + mcp_public_url=AnyHttpUrl("http://testserver/mcp"), + mcp_issuer_url=AnyHttpUrl("https://identity.example.test"), + mcp_service_identity="workbuddy-team-a", + ) + + +async def _exercise_authenticated_gateway( + search_application: RecordingSearchApplication, + arguments: dict[str, object] | None = None, +) -> tuple[list[str], object]: + app = create_mcp_http_app(_settings(), search_application=search_application) + transport = httpx2.ASGITransport(app=app) + async with app.router.lifespan_context(app): + async with httpx2.AsyncClient( + transport=transport, + base_url="http://testserver", + headers={"Authorization": "Bearer workbuddy-test-token-at-least-32-chars"}, + ) as client: + async with streamable_http_client( + "http://testserver/mcp", + http_client=client, + ) as (read_stream, write_stream): + async with ClientSession(read_stream, write_stream) as session: + await session.initialize() + tools = await session.list_tools() + result = await session.call_tool( + "search_knowledge", + arguments or {"query": "产品A退款周期", "top_k": 1}, + ) + return [tool.name for tool in tools.tools], result + + +def test_streamable_http_discovers_only_search_and_propagates_identity() -> None: + search_application = RecordingSearchApplication() + + tool_names, result = asyncio.run(_exercise_authenticated_gateway(search_application)) + + assert tool_names == ["search_knowledge"] + assert isinstance(result, CallToolResult) + assert result.is_error is False + structured = result.structured_content + assert structured is not None + assert structured["results"][0]["filename"] == "退款政策.md" + assert set(structured["results"][0]) == { + "document_id", + "filename", + "page", + "section", + "chunk_id", + "content", + "score", + "rerank_score", + } + identity, query, top_k = search_application.calls[0] + assert identity.client_id == "workbuddy-enterprise" + assert identity.subject == "workbuddy-team-a" + assert identity.scopes == frozenset({"knowledge:search"}) + assert (query, top_k) == ("产品A退款周期", 1) + + +def test_streamable_http_returns_an_empty_structured_result() -> None: + search_application = RecordingSearchApplication(empty=True) + + _, result = asyncio.run(_exercise_authenticated_gateway(search_application)) + + assert isinstance(result, CallToolResult) + assert result.is_error is False + assert result.structured_content == {"results": []} + + +def test_streamable_http_rejects_boolean_top_k_before_search() -> None: + search_application = RecordingSearchApplication() + + _, result = asyncio.run( + _exercise_authenticated_gateway( + search_application, + {"query": "退款周期", "top_k": True}, + ) + ) + + assert isinstance(result, CallToolResult) + assert result.is_error is True + assert search_application.calls == [] + + +def test_streamable_http_rejects_missing_and_wrong_bearer_tokens() -> None: + async def exercise() -> None: + app = create_mcp_http_app(_settings(), search_application=RecordingSearchApplication()) + request = { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "protocolVersion": "2025-11-25", + "capabilities": {}, + "clientInfo": {"name": "workbuddy-compatibility-test", "version": "1.0"}, + }, + } + async with app.router.lifespan_context(app): + async with httpx2.AsyncClient( + transport=httpx2.ASGITransport(app=app), + base_url="http://testserver", + ) as client: + missing = await client.post( + "/mcp", + json=request, + headers={"Accept": "application/json, text/event-stream"}, + ) + wrong = await client.post( + "/mcp", + json=request, + headers={ + "Accept": "application/json, text/event-stream", + "Authorization": "Bearer wrong-token", + }, + ) + assert missing.status_code == 401 + assert wrong.status_code == 401 + assert "workbuddy-test-token-at-least-32-chars" not in missing.text + wrong.text + + asyncio.run(exercise()) + + +def test_tool_failure_is_sanitized_for_client_and_logs() -> None: + search_application = RecordingSearchApplication( + failure=RuntimeError( + "provider https://internal.example.test failed with token secret-provider-token" + ) + ) + + with patch("ekp_mcp.server.logger.error") as log_error: + _, result = asyncio.run(_exercise_authenticated_gateway(search_application)) + + assert isinstance(result, CallToolResult) + assert result.is_error is True + rendered = repr(result) + assert "knowledge search failed" in rendered + assert "internal.example.test" not in rendered + assert "secret-provider-token" not in rendered + log_error.assert_called_once_with("MCP knowledge search failed") + + +def test_transport_rejects_unapproved_origin() -> None: + async def exercise() -> None: + app = create_mcp_http_app(_settings(), search_application=RecordingSearchApplication()) + async with app.router.lifespan_context(app): + async with httpx2.AsyncClient( + transport=httpx2.ASGITransport(app=app), + base_url="http://testserver", + ) as client: + response = await client.post( + "/mcp", + json={"jsonrpc": "2.0", "id": 1, "method": "ping"}, + headers={ + "Accept": "application/json, text/event-stream", + "Authorization": "Bearer workbuddy-test-token-at-least-32-chars", + "Origin": "https://unapproved.example.test", + }, + ) + assert response.status_code == 403 + + asyncio.run(exercise()) + + +def test_gateway_requires_a_strong_runtime_token() -> None: + settings = _settings().model_copy(update={"mcp_auth_token": SecretStr("short")}) + + try: + create_mcp_server(settings, search_application=RecordingSearchApplication()) + except McpConfigurationError as error: + assert "32 characters" in str(error) + else: # pragma: no cover - defensive assertion for fail-open regressions. + raise AssertionError("MCP gateway accepted a weak runtime token") diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index ea57115..29831c8 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -52,6 +52,14 @@ def test_settings_have_demo_defaults(isolated_settings_environment: None) -> Non assert settings.reranker_endpoint.endswith("/v2/rerank") assert settings.reranker_api_key is None assert settings.search_top_k == 5 + assert settings.mcp_host == "127.0.0.1" + assert settings.mcp_port == 8766 + assert settings.mcp_path == "/mcp" + assert settings.mcp_auth_token is None + assert settings.mcp_client_id == "workbuddy-enterprise" + assert settings.mcp_service_identity == "workbuddy-demo" + assert settings.mcp_required_scope == "knowledge:search" + assert "localhost:*" in settings.mcp_allowed_hosts def test_settings_reject_invalid_port(isolated_settings_environment: None) -> None: @@ -81,6 +89,7 @@ def test_settings_redact_provider_secrets(isolated_settings_environment: None) - bos_secret_access_key=SecretStr("bos-secret-key"), oceanbase_vector_password=SecretStr("oceanbase-secret"), reranker_api_key=SecretStr("reranker-secret"), + mcp_auth_token=SecretStr("mcp-secret"), ) rendered = repr(settings) @@ -90,6 +99,7 @@ def test_settings_redact_provider_secrets(isolated_settings_environment: None) - assert "bos-secret-key" not in rendered assert "oceanbase-secret" not in rendered assert "reranker-secret" not in rendered + assert "mcp-secret" not in rendered def test_settings_restrict_sqlite_to_test_environment( @@ -110,3 +120,19 @@ def test_settings_reject_non_oceanbase_runtime_dialect( ) -> None: with pytest.raises(ValidationError, match="OceanBase"): Settings(database_url=SecretStr("postgresql+psycopg://localhost/ekp")) + + +@pytest.mark.parametrize("mcp_path", ["mcp", "/mcp/"]) +def test_settings_reject_invalid_mcp_path( + isolated_settings_environment: None, + mcp_path: str, +) -> None: + with pytest.raises(ValidationError, match="mcp_path"): + Settings(mcp_path=mcp_path) + + +def test_settings_reject_empty_mcp_allowed_hosts( + isolated_settings_environment: None, +) -> None: + with pytest.raises(ValidationError, match="mcp_allowed_hosts"): + Settings(mcp_allowed_hosts=[]) diff --git a/tests/unit/test_mcp_auth.py b/tests/unit/test_mcp_auth.py new file mode 100644 index 0000000..cb1c383 --- /dev/null +++ b/tests/unit/test_mcp_auth.py @@ -0,0 +1,38 @@ +"""Tests for the DEMO-012 service-token identity boundary.""" + +import asyncio + +from pydantic import SecretStr + +from ekp_mcp.auth import StaticServiceTokenVerifier + + +def test_static_service_token_maps_to_scoped_identity_without_secret_repr() -> None: + verifier = StaticServiceTokenVerifier( + SecretStr("runtime-only-token"), + client_id="workbuddy-enterprise", + subject="workbuddy-team-a", + scope="knowledge:search", + issuer="https://identity.example.test", + ) + + access_token = asyncio.run(verifier.verify_token("runtime-only-token")) + + assert access_token is not None + assert access_token.client_id == "workbuddy-enterprise" + assert access_token.subject == "workbuddy-team-a" + assert access_token.scopes == ["knowledge:search"] + assert access_token.claims == {"iss": "https://identity.example.test"} + assert "runtime-only-token" not in repr(verifier) + + +def test_static_service_token_rejects_wrong_token() -> None: + verifier = StaticServiceTokenVerifier( + SecretStr("expected"), + client_id="workbuddy-enterprise", + subject="workbuddy-team-a", + scope="knowledge:search", + issuer="https://identity.example.test", + ) + + assert asyncio.run(verifier.verify_token("wrong")) is None diff --git a/tests/unit/test_mcp_search.py b/tests/unit/test_mcp_search.py new file mode 100644 index 0000000..e60f149 --- /dev/null +++ b/tests/unit/test_mcp_search.py @@ -0,0 +1,72 @@ +"""Tests for MCP identity authorization and SearchService result mapping.""" + +from uuid import uuid4 + +import pytest + +from ekp_api.schemas import SearchResponse +from ekp_core.search import SearchResult, SourceResult +from ekp_mcp.auth import McpIdentity +from ekp_mcp.search import McpSearchApplication + + +class StubSearcher: + """Return one canonical source while recording the delegated query.""" + + def __init__(self, result: SearchResult) -> None: + self.result = result + self.calls: list[tuple[str, int | None]] = [] + + def search(self, query: str, top_k: int | None = None) -> SearchResult: + self.calls.append((query, top_k)) + return self.result + + +def _search_result() -> SearchResult: + return SearchResult( + query="退款周期", + index_profile_id="internal-profile-must-not-leak", + results=( + SourceResult( + document_id=uuid4(), + filename="退款政策.md", + page=2, + section="退款政策", + chunk_id=uuid4(), + content="退款周期为七天。", + score=0.8, + rerank_score=0.9, + ), + ), + ) + + +def test_mcp_search_requires_scope_and_hides_index_profile() -> None: + searcher = StubSearcher(_search_result()) + application = McpSearchApplication(searcher, "knowledge:search") + identity = McpIdentity( + client_id="workbuddy-enterprise", + subject="workbuddy-team-a", + scopes=frozenset({"knowledge:search"}), + ) + + response = application.search(identity, "退款周期", 1) + + assert searcher.calls == [("退款周期", 1)] + payload = response.model_dump(mode="json") + rest_payload = SearchResponse.from_result(searcher.result).model_dump(mode="json") + assert payload["results"][0]["filename"] == "退款政策.md" + assert payload == rest_payload + assert "index_profile_id" not in payload + + +def test_mcp_search_rejects_identity_without_required_scope() -> None: + application = McpSearchApplication(StubSearcher(_search_result()), "knowledge:search") + identity = McpIdentity( + client_id="unprivileged-client", + subject="unprivileged-service", + scopes=frozenset(), + ) + + with pytest.raises(PermissionError, match="knowledge search scope"): + application.search(identity, "退款周期", 1) diff --git a/tests/unit/test_workbuddy_mcp_config.py b/tests/unit/test_workbuddy_mcp_config.py new file mode 100644 index 0000000..9c725ff --- /dev/null +++ b/tests/unit/test_workbuddy_mcp_config.py @@ -0,0 +1,16 @@ +"""Validate the checked-in WorkBuddy configuration without embedding credentials.""" + +import json +from pathlib import Path + +WORKBUDDY_CONFIG = Path(__file__).resolve().parents[2] / "deploy/workbuddy-mcp.example.json" + + +def test_workbuddy_http_config_uses_runtime_bearer_token() -> None: + payload = json.loads(WORKBUDDY_CONFIG.read_text(encoding="utf-8")) + + server = payload["mcpServers"]["enterprise-knowledge"] + assert server["type"] == "http" + assert server["url"].endswith("/mcp}") + assert server["headers"] == {"Authorization": "Bearer ${EKP_MCP_TOKEN}"} + assert "runtime-secret" not in WORKBUDDY_CONFIG.read_text(encoding="utf-8") diff --git a/uv.lock b/uv.lock index 60002d9..a7b88f8 100644 --- a/uv.lock +++ b/uv.lock @@ -59,6 +59,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/da/35/f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc/anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", size = 125813, upload-time = "2026-07-12T20:29:05.763Z" }, ] +[[package]] +name = "attrs" +version = "26.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, +] + [[package]] name = "bce-python-sdk" version = "0.9.79" @@ -74,6 +83,43 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ef/de/52b763b183e23f4dd73811a2dd2664824ae7fc6ceb1aa8dcd3f1102b1094/bce_python_sdk-0.9.79-py3-none-any.whl", hash = "sha256:71799ac8740505e0759d30873f6f1a478fa8f83aedf425d511f1419a5f30082e", size = 440268, upload-time = "2026-09-01T05:48:50.459Z" }, ] +[[package]] +name = "cffi" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/69/43965eccfdead3b9220015fd1320e117be8c6ed01a62ffab76eeb752f5d5/cffi-2.1.1-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0", size = 184821, upload-time = "2026-08-03T21:19:44.887Z" }, + { url = "https://files.pythonhosted.org/packages/54/7d/16e5a096677b5e313ca80cd5e5170efa3ea44624a82bb111925522da64b1/cffi-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf", size = 184719, upload-time = "2026-08-03T21:19:46.129Z" }, + { url = "https://files.pythonhosted.org/packages/56/e6/8941622732edec876dd17d0453dce07317ae96db34f2ec1436c9d3785986/cffi-2.1.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a", size = 214799, upload-time = "2026-08-03T21:19:47.218Z" }, + { url = "https://files.pythonhosted.org/packages/44/de/f98430906df1545ffde0d543dd124a7a439bc2cd32b36b9c53f805df7333/cffi-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890", size = 222389, upload-time = "2026-08-03T21:19:48.331Z" }, + { url = "https://files.pythonhosted.org/packages/6a/5b/717f1526b9957b34456313c31645c5b82b8fb5c3fe9e4752999be7128bfc/cffi-2.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50", size = 210249, upload-time = "2026-08-03T21:19:49.543Z" }, + { url = "https://files.pythonhosted.org/packages/64/b3/f8aa4f3e34986c7e4ec45072d1b1b9dd295b6b18007b45518d79726dd725/cffi-2.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e", size = 208775, upload-time = "2026-08-03T21:19:50.918Z" }, + { url = "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", size = 221822, upload-time = "2026-08-03T21:19:52.054Z" }, + { url = "https://files.pythonhosted.org/packages/a0/d2/6cd24ae3be000a634109c247d1475d62e5616d0dc78c82770942ec384248/cffi-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517", size = 225232, upload-time = "2026-08-03T21:19:53.109Z" }, + { url = "https://files.pythonhosted.org/packages/cb/52/3fa190537004dd7f0ab860a6dc7c0175b8667f68d1e618a46f5498d30250/cffi-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735", size = 223597, upload-time = "2026-08-03T21:19:54.515Z" }, + { url = "https://files.pythonhosted.org/packages/80/fb/0bb75b7039588c074b37ae99f40d9bfddf990ecb2fbc346ebccd2e56b9be/cffi-2.1.1-cp312-cp312-win32.whl", hash = "sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e", size = 175292, upload-time = "2026-08-03T21:19:55.566Z" }, + { url = "https://files.pythonhosted.org/packages/d9/79/615cc094e2fb508cade7de88d3b4f6c4ec2bab695c97bce9153dc65aadf5/cffi-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a", size = 185919, upload-time = "2026-08-03T21:19:56.89Z" }, + { url = "https://files.pythonhosted.org/packages/70/c6/d0ea84713fe46b243a436a18fcd47d639732747e21635c8a27191b06dc30/cffi-2.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80", size = 180093, upload-time = "2026-08-03T21:19:58.155Z" }, + { url = "https://files.pythonhosted.org/packages/9d/f4/035513d4117049066b4779dc3b7c0c0fdad175fa13731c9f4003f1cd1478/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e", size = 194248, upload-time = "2026-08-03T21:19:59.399Z" }, + { url = "https://files.pythonhosted.org/packages/76/af/2aeb4dbb5fc41a04161ae9ff1518de7cec08e164f44a8ce6a4cf7fd2cd1d/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c", size = 196908, upload-time = "2026-08-03T21:20:00.746Z" }, + { url = "https://files.pythonhosted.org/packages/a7/46/2e5fdde8555706dd98139a910ca11be02809f3f605ce956f655d0214e100/cffi-2.1.1-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6", size = 184805, upload-time = "2026-08-03T21:20:02.02Z" }, + { url = "https://files.pythonhosted.org/packages/55/41/4c7042f317b9217502988f0873af87e16ad606dc20f84e546e3e6ce9764c/cffi-2.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971", size = 184764, upload-time = "2026-08-03T21:20:03.141Z" }, + { url = "https://files.pythonhosted.org/packages/43/1f/1c3d90d91811c8f86ced9ed637956c54bfe5b79ca98fe976d7f8c8979f6b/cffi-2.1.1-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c", size = 214722, upload-time = "2026-08-03T21:20:04.377Z" }, + { url = "https://files.pythonhosted.org/packages/37/6f/3b5ce4c3b2192d250f04908f2bfd91ef34552ec8f7716a5d4abdb8d67bb2/cffi-2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125", size = 222369, upload-time = "2026-08-03T21:20:05.544Z" }, + { url = "https://files.pythonhosted.org/packages/02/10/4b3c75dde3d9663c9e02ba05c2668b954f671d4bbe346413ca8c696b295a/cffi-2.1.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264", size = 210175, upload-time = "2026-08-03T21:20:06.75Z" }, + { url = "https://files.pythonhosted.org/packages/df/62/14f74b9543e605d17701dc797b815958b8bb70b7624ce1b832ddad48ed6c/cffi-2.1.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3", size = 208670, upload-time = "2026-08-03T21:20:08.04Z" }, + { url = "https://files.pythonhosted.org/packages/95/95/86342356ff5953b3fb06f7ef7c5bee212d45e770abc7218d451b9148313c/cffi-2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2", size = 221824, upload-time = "2026-08-03T21:20:09.274Z" }, + { url = "https://files.pythonhosted.org/packages/eb/ff/7b3429ff53aafe931ed8a5fc69f481bbef7ba6de87ddcbb63d08f483f613/cffi-2.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b", size = 225148, upload-time = "2026-08-03T21:20:10.7Z" }, + { url = "https://files.pythonhosted.org/packages/34/34/a95870b9221e09cf4f2ce3178b1a210abdfe63a1bd357da940418d7b8d15/cffi-2.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7", size = 223564, upload-time = "2026-08-03T21:20:12.165Z" }, + { url = "https://files.pythonhosted.org/packages/70/ea/839b50531021a647fb5e929f72cf97bc1ff702b5472166164b5b6e76b851/cffi-2.1.1-cp313-cp313-win32.whl", hash = "sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac", size = 175263, upload-time = "2026-08-03T21:20:13.559Z" }, + { url = "https://files.pythonhosted.org/packages/60/a6/8b149b2c3f2e11aaa1618ef64500b45f50f22c57a977a4dff1aff1f91042/cffi-2.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d", size = 185688, upload-time = "2026-08-03T21:20:14.69Z" }, + { url = "https://files.pythonhosted.org/packages/01/9a/11f687cb39d6a3504060d5242f04f48c735afb4d3d533958a20594890cb2/cffi-2.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973", size = 180078, upload-time = "2026-08-03T21:20:15.917Z" }, +] + [[package]] name = "click" version = "8.5.0" @@ -159,6 +205,43 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e0/b2/6166c789ebacfef08b5752996f79d1e472644e9b393ed7c87b1997686910/crc32c-2.9-cp313-cp313-win_arm64.whl", hash = "sha256:94e9646a05951c7cf0657fee48eec85bf669cbf9b7bec09eff02ae12da2e9ca7", size = 63356, upload-time = "2026-08-21T03:56:25.304Z" }, ] +[[package]] +name = "cryptography" +version = "50.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bb/ad/5d6702db60b1e40b41ef513b6967ff5848f307d50f8449baf1634f5908f1/cryptography-50.0.1.tar.gz", hash = "sha256:5dd9bda1c12b4162f6ff568eeb5e0ff956c28d14406e875cfe8a63a2d414ff20", size = 880381, upload-time = "2026-08-25T19:45:45.499Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/19/797e2aaac9df6a66f1550f49979dc1b1e39ecd2077501c30efa81e8d5d67/cryptography-50.0.1-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:b8f852c65863251b9e3a1b8c150ce21e59b522dbb6a7d4bc80e680d38388e986", size = 4010153, upload-time = "2026-08-25T19:44:03.155Z" }, + { url = "https://files.pythonhosted.org/packages/90/34/9ce9a62ed9dc82ca9fd6a34445b6904af56e5f38b3eae2ed32e49c36053d/cryptography-50.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:53e279950892dc102c6b4e52af03ae5ea92fac572a1ddab78ca73a997f62b69f", size = 4723133, upload-time = "2026-08-25T19:44:05.461Z" }, + { url = "https://files.pythonhosted.org/packages/57/26/e6d4fc8512a51a5f9ee7bfdbfb853bce1197087df40c9ad993ad370b846f/cryptography-50.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ff838d62ec1bfce4f9ba7fa16f4a7b554cd8d0c299e6be37502161a660c84eef", size = 4712478, upload-time = "2026-08-25T19:44:07.375Z" }, + { url = "https://files.pythonhosted.org/packages/e6/de/d3cdc2815697aae84126cbd6a030ca7b6b452e28a88b501b836bd3aa7a86/cryptography-50.0.1-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e74591e283fe6eb956416c929eb58262a719fe0311fd9054c62c3350ed8760d8", size = 4730726, upload-time = "2026-08-25T19:44:09.294Z" }, + { url = "https://files.pythonhosted.org/packages/55/32/38c0d344b98c06d34b5df8946565a9c0d6dbf32c8e0730a7f05f0a3c6cab/cryptography-50.0.1-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5fe002589592ed749ce77fe0695fcbd3500dd61d7d6db5858a7544c612fa8e45", size = 5353524, upload-time = "2026-08-25T19:44:11.96Z" }, + { url = "https://files.pythonhosted.org/packages/e1/1b/82f0f0d8858d4432be1af790477edf62aef90324041aa07c57e57bef1af7/cryptography-50.0.1-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:51593d180cf6d179bde5c5d065bed81386b1f381656ae7d042b7ffc87a9895ad", size = 4746720, upload-time = "2026-08-25T19:44:14.051Z" }, + { url = "https://files.pythonhosted.org/packages/29/ba/042ca458b8c64348c768284b5d23e69b92ed53d057ab779fee628564676d/cryptography-50.0.1-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:359e62deae718bce96170e223fdcb6357e4fbd3bb7a3a75f4430763532560e49", size = 4361866, upload-time = "2026-08-25T19:44:16.167Z" }, + { url = "https://files.pythonhosted.org/packages/39/3b/e96c1ef71edef71057c7e3c3d982ce8fda554e0c52d0cc19c18845cde3eb/cryptography-50.0.1-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:e2ca8fd1b6b4b82a1c4cb02841d0837e3c12336c2e24b520ab8ab3b969733d8f", size = 4730028, upload-time = "2026-08-25T19:44:18.085Z" }, + { url = "https://files.pythonhosted.org/packages/e3/38/45abd72ef63f2e7d0754a6cacf97bd8b69512ace7f6130d24c39ece65da2/cryptography-50.0.1-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:76de83fbd91ac49c0feaaa983d0748fd7a53176afac5fb3bf7478d244f0eb527", size = 5308405, upload-time = "2026-08-25T19:44:20.197Z" }, + { url = "https://files.pythonhosted.org/packages/85/66/6ccca4722987ddedaa7fc9c3f4708af7431f5535666c174350830888c6b7/cryptography-50.0.1-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:51afcfceb15597cf2635068e4ac9a56b2abde622edde17f37d85fd7b5306497a", size = 4746230, upload-time = "2026-08-25T19:44:22.376Z" }, + { url = "https://files.pythonhosted.org/packages/13/0e/b1f92e013228111413f2e6743948b80bc24dfd3c1b87ba98ceea16f5df89/cryptography-50.0.1-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:be224a65493ec5b74a158ff22a5522ce4a5ca1e543c647a3a4730d4a09e5f959", size = 4862596, upload-time = "2026-08-25T19:44:24.472Z" }, + { url = "https://files.pythonhosted.org/packages/7e/22/c3654cccc856e9d682817b04ac3ee79731cb09ca6f95996a95c904de2883/cryptography-50.0.1-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9ebcdd5519be9b652a46f507817a74591774fc3d6923ac364e4dfa64e36b291b", size = 5014082, upload-time = "2026-08-25T19:44:26.709Z" }, + { url = "https://files.pythonhosted.org/packages/42/8b/cb12b1b60c91b074ca6bf0fdd59aa8f10d8bc5f73af8faece86ef0421b37/cryptography-50.0.1-cp311-abi3-win_amd64.whl", hash = "sha256:aed8db4f6d71c51efb89530e12d9464e7bf2923d46c3205dc794a2a93f8c0648", size = 3842826, upload-time = "2026-08-25T19:44:28.784Z" }, + { url = "https://files.pythonhosted.org/packages/84/a9/ee16a903f13755e914d1eecc482fe64d1f10761c3960e5d8fa6837377aff/cryptography-50.0.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:ca83d00d9e69cd5eb63f2e69c3a5a59e0cecae5ae14c6ae0b35830fe3b37bad0", size = 4035307, upload-time = "2026-08-25T19:44:58.305Z" }, + { url = "https://files.pythonhosted.org/packages/5e/a5/9ec7e81e8526c0d7a387d73386b2daed3f39e10d81a85930bd1b6bfba65c/cryptography-50.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:05ba322c4da95b262a212c345af888ef2c37c88c0509756ea00a0e6d68850f23", size = 4751900, upload-time = "2026-08-25T19:45:00.401Z" }, + { url = "https://files.pythonhosted.org/packages/7e/3c/0e77bd5ffcf078e9dd27d3074aad6c030d9b10d0bf69329d573c927a188c/cryptography-50.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e22dfed744bd4002e909464cb23d2f0b05c6f3113a79ef2e9864a53db737c733", size = 4738357, upload-time = "2026-08-25T19:45:02.786Z" }, + { url = "https://files.pythonhosted.org/packages/27/3a/3c5f80daa4dcd47323c7af8a2fcb90de27a33564d4fcac69846c0972691a/cryptography-50.0.1-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:4c4188f7c0cf655be5c06342b817ed0f9595b69ffa2b12026e5353eed29dea88", size = 4758474, upload-time = "2026-08-25T19:45:04.889Z" }, + { url = "https://files.pythonhosted.org/packages/6e/2b/214cf0cf93db9628c3c20c896b229f327f6fb1b20e4b3743d8ad3f00af8b/cryptography-50.0.1-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:2ebbfb0f1fed745e91796e3e1080a1440423fdae8ece1b995a1d80883a409054", size = 5375862, upload-time = "2026-08-25T19:45:07.163Z" }, + { url = "https://files.pythonhosted.org/packages/d6/51/3f9701867a46b6c1740c9b52fc4d3bed6cbdcfedcc9b6e64305c07f39cff/cryptography-50.0.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:407fe2b6db00939c05c0e945e9914238f2f0a430974839429dafc82b1ee6bee5", size = 4772942, upload-time = "2026-08-25T19:45:09.396Z" }, + { url = "https://files.pythonhosted.org/packages/0d/5c/13ea642e08e2544d0f5396122055f4820cfacb3203562197b5967125ea97/cryptography-50.0.1-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:2b34d76a652ea2b6faf777c35df230c5637842cd904e04f16230c3f9f03e4361", size = 4383347, upload-time = "2026-08-25T19:45:11.659Z" }, + { url = "https://files.pythonhosted.org/packages/84/d5/7d1fe1cb93f91c428093ff234e128c89ba8ea61a6f26aab406081f9b996e/cryptography-50.0.1-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:01f41478cf33fc605a6a089cd56d28b45c6c0b45a1928b61797f2621a04bac71", size = 4758050, upload-time = "2026-08-25T19:45:13.745Z" }, + { url = "https://files.pythonhosted.org/packages/dd/04/557fc5ead96a829e0bc812a3b9dc4a52a2f27e4f7f5950da7ff27653a805/cryptography-50.0.1-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:fc3ed7ebd2a8c96f5b166de0ab9b624996bef3b07bbeb19364dfb78222c22c80", size = 5332955, upload-time = "2026-08-25T19:45:16.193Z" }, + { url = "https://files.pythonhosted.org/packages/8c/eb/5d7124083e8d8cda8f5b348f544b71ad6f707ad63193758ef4d8e569da02/cryptography-50.0.1-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9dde0a357190eb3b1da1bb9ab750e9c85cba82ca5977aa0836cbb94e92611239", size = 4772694, upload-time = "2026-08-25T19:45:18.315Z" }, + { url = "https://files.pythonhosted.org/packages/63/8e/f1f955e0921dd2b6d22eae7e8d24a4c4b638d10735ffbf6a71f99eb0fcb8/cryptography-50.0.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd3718b960d0b5dd213cdf03f3bcb7000e69dda0de8b956061947ff6bcff5558", size = 4888413, upload-time = "2026-08-25T19:45:20.4Z" }, + { url = "https://files.pythonhosted.org/packages/1f/ab/89e2b798d2c3925f82e2bb72d5979f3d2f6da2dd22ef4a8cd8b70d920039/cryptography-50.0.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2a93d05e34d5f67fba6f891fe85d929999baa7195e853923ea6d7576c9e68c5e", size = 5044355, upload-time = "2026-08-25T19:45:22.353Z" }, + { url = "https://files.pythonhosted.org/packages/99/89/87ef49ffe383ef4e147d27b7bf2088fb0b54ea409dd87b5a89442e5828a5/cryptography-50.0.1-cp39-abi3-win_amd64.whl", hash = "sha256:55d16b1ef3ee0958d893a977b19777887e546c9954ea81b200c3301a864013f2", size = 3875429, upload-time = "2026-08-25T19:45:24.418Z" }, +] + [[package]] name = "enterprise-knowledge-platform" version = "0.1.0" @@ -167,6 +250,7 @@ dependencies = [ { name = "alembic" }, { name = "bce-python-sdk" }, { name = "fastapi" }, + { name = "mcp" }, { name = "pydantic-settings" }, { name = "pymupdf" }, { name = "pymysql" }, @@ -191,6 +275,7 @@ requires-dist = [ { name = "alembic", specifier = ">=1.18,<2" }, { name = "bce-python-sdk", specifier = ">=0.9.72,<0.10" }, { name = "fastapi", specifier = ">=0.115,<1" }, + { name = "mcp", specifier = ">=2,<3" }, { name = "pydantic-settings", specifier = ">=2.7,<3" }, { name = "pymupdf", specifier = ">=1.26,<2" }, { name = "pymysql", specifier = ">=1.1,<2" }, @@ -347,6 +432,33 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, ] +[[package]] +name = "jsonschema" +version = "4.26.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "jsonschema-specifications" }, + { name = "referencing" }, + { name = "rpds-py" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b3/fc/e067678238fa451312d4c62bf6e6cf5ec56375422aee02f9cb5f909b3047/jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326", size = 366583, upload-time = "2026-01-07T13:41:07.246Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", size = 90630, upload-time = "2026-01-07T13:41:05.306Z" }, +] + +[[package]] +name = "jsonschema-specifications" +version = "2025.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "referencing" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d", size = 32855, upload-time = "2025-09-08T01:34:59.186Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", size = 18437, upload-time = "2025-09-08T01:34:57.871Z" }, +] + [[package]] name = "librt" version = "0.15.0" @@ -483,6 +595,44 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, ] +[[package]] +name = "mcp" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "httpx2" }, + { name = "jsonschema" }, + { name = "mcp-types" }, + { name = "opentelemetry-api" }, + { name = "pydantic" }, + { name = "pyjwt", extra = ["crypto"] }, + { name = "python-multipart" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, + { name = "sse-starlette" }, + { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, + { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d4/6e/21fb8e5d579dbe21d96ea4d5034200d46d8bdf2261053b5bd041f3c2f612/mcp-2.1.1.tar.gz", hash = "sha256:50b7ba1ebbe117008ea7bdd288234043e69c20b403d6851d19661e6d431a75ef", size = 3984589, upload-time = "2026-08-25T16:14:02.376Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/50/af/8644cc5fa26a59afd2df2e98eeb19e72926887fa4b7441aba4ff661140db/mcp-2.1.1-py3-none-any.whl", hash = "sha256:1c6c31c5d6471c58db76af3af8af67f46d11d01f0a59077d0a308cbdb3d3e915", size = 357912, upload-time = "2026-08-25T16:13:59.024Z" }, +] + +[[package]] +name = "mcp-types" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pydantic" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6a/dd/1c4417dc0b722c23a1669032d5f044e41170fe5d4773b488a50fcce98c32/mcp_types-2.1.1.tar.gz", hash = "sha256:77dcbe48fba73cca71a673f2646a5f037a017b7a0a07ac89cec1113028890eda", size = 66674, upload-time = "2026-08-25T16:14:03.861Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/d0/242e63c510f4a17381f55b1549a3f94f5687a0595984febd2b6f87a687a0/mcp_types-2.1.1-py3-none-any.whl", hash = "sha256:26f9f7f03f2a5730717a5b98e2ab7eb640ac352d05a00cdc725c311864778295", size = 69656, upload-time = "2026-08-25T16:14:00.667Z" }, +] + [[package]] name = "mypy" version = "1.20.2" @@ -551,6 +701,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d5/21/35b31dde1b283b79de828b80f876afd8c94e28fe1e9c375f89e261cc4c0d/numpy-2.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:bd68ece1553d2023c09a4226d9e41c586ad2d20594d1a456186c33513d2cb3f2", size = 10396725, upload-time = "2026-08-09T13:46:00.478Z" }, ] +[[package]] +name = "opentelemetry-api" +version = "1.44.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ee/8b/aa9e2d8b8dfa7c946f7dec5d1f8f6ba8eca062f43509a06bdb5ce93d26c0/opentelemetry_api-1.44.0.tar.gz", hash = "sha256:67647e5e9566edcf421166fdf022b3537f818635daa852b289e34604dc6fb33a", size = 72406, upload-time = "2026-07-16T15:25:32.678Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ca/6f/a04e900f465ff3221ccc395522503e2d10e79fa21f2723c8e177aae1e0d1/opentelemetry_api-1.44.0-py3-none-any.whl", hash = "sha256:94b98c893a91b88657eaac1e3ba89618cdb85be6918196705354f34728b2cdef", size = 60018, upload-time = "2026-07-16T15:25:11.657Z" }, +] + [[package]] name = "packaging" version = "26.3" @@ -578,6 +740,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] +[[package]] +name = "pycparser" +version = "3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" }, +] + [[package]] name = "pycryptodome" version = "3.23.0" @@ -691,6 +862,20 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, ] +[[package]] +name = "pyjwt" +version = "2.13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3b/81/58d0ac84e1ef3a3843791d6954d94c0b33d526c75eeb1efbce9d0a4c4077/pyjwt-2.13.0.tar.gz", hash = "sha256:41571c89ca91598c79e8ef18a2d07367d4810fbbd6f637794879baf1b7703423", size = 107515, upload-time = "2026-05-21T19:54:36.618Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a3/5e/ecf12fdb62546d64385c158514e9b2b671f7832108ef2ecd2020ce0af2d1/pyjwt-2.13.0-py3-none-any.whl", hash = "sha256:66adcc2aff09b3f1bbd95fc1e1577df8ac8723c978552fd43304c8a290ac5728", size = 31274, upload-time = "2026-05-21T19:54:35.362Z" }, +] + +[package.optional-dependencies] +crypto = [ + { name = "cryptography" }, +] + [[package]] name = "pymupdf" version = "1.28.2" @@ -795,6 +980,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e1/04/e8135ebd1ad02c56ec633277529b2602ff99ff634be76cdba5744cf554fd/python_multipart-0.0.32-py3-none-any.whl", hash = "sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", size = 30042, upload-time = "2026-06-04T16:18:57.319Z" }, ] +[[package]] +name = "pywin32" +version = "312" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/ff/32aa7d2ed0ab12b323aaa64f9b75e6ad4f8fd09f9ccfc28c79414d46838d/pywin32-312-cp312-cp312-win32.whl", hash = "sha256:dab4f65ac9c4e48400a2a0530c46c3c579cd5905ecd11b80692373915269208b", size = 6371877, upload-time = "2026-06-04T07:49:28.836Z" }, + { url = "https://files.pythonhosted.org/packages/03/d9/77040d3b43df3f3be32ea289433d660d2727f5ba327bc73be835127d9d60/pywin32-312-cp312-cp312-win_amd64.whl", hash = "sha256:b457f6d628a47e8a7346ce22acb7e1a46a4a78b52e1d17e1af56871bd19a93bc", size = 6914841, upload-time = "2026-06-04T07:49:31.85Z" }, + { url = "https://files.pythonhosted.org/packages/e3/cc/7b1ec671775756020a0ee7f4feeaf3c568f0ab86bd3900088cf986937a92/pywin32-312-cp312-cp312-win_arm64.whl", hash = "sha256:6017c58e12f6809fbb0555b75df144c2922a9ffd18e4b9b5afa863b6c1a9d950", size = 6727901, upload-time = "2026-06-04T07:49:34.244Z" }, + { url = "https://files.pythonhosted.org/packages/2d/41/12fbfd7f36ed2146d8bc9de96c2741296bf0d490b98508496cff322e274c/pywin32-312-cp313-cp313-win32.whl", hash = "sha256:7a27df850933d16a8eabfbaeb73d52b273e2da667f80d70b01a89d1f6828d02c", size = 6370184, upload-time = "2026-06-04T07:49:36.253Z" }, + { url = "https://files.pythonhosted.org/packages/ba/db/36a78e3403099d31d9746d13fdcde5accc43c1155f375a34d15983a479a7/pywin32-312-cp313-cp313-win_amd64.whl", hash = "sha256:c53e878d15a1c44788082bfe712a905433473aa38f86375b7cf8b45e3acbaaf9", size = 6914298, upload-time = "2026-06-04T07:49:38.876Z" }, + { url = "https://files.pythonhosted.org/packages/84/37/c1697194092b76de9ed47ca124323f02c57ffc8a45c06f88a3d5acaf01eb/pywin32-312-cp313-cp313-win_arm64.whl", hash = "sha256:59aba5d5940842075343a5ddc6b11f1cdf0d1567fe745290359dfbcc7c2eb831", size = 6727640, upload-time = "2026-06-04T07:49:41.083Z" }, +] + [[package]] name = "pyyaml" version = "6.0.3" @@ -823,6 +1021,58 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, ] +[[package]] +name = "referencing" +version = "0.37.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "rpds-py" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8", size = 78036, upload-time = "2025-10-13T15:30:48.871Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", size = 26766, upload-time = "2025-10-13T15:30:47.625Z" }, +] + +[[package]] +name = "rpds-py" +version = "2026.6.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/aa/2a/9618a122aeb2a169a28b03889a2995fe297588964333d4a7d67bdf46e147/rpds_py-2026.6.3.tar.gz", hash = "sha256:1cebd1337c242e4ec2293e541f712b2da849b29f48f0c293684b71c0632625d4", size = 64051, upload-time = "2026-06-30T07:17:53.009Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5c/be/2e8974163072e7bab7df1a5acd54c4498e75e35d6d18b864d3a9d5dadc92/rpds_py-2026.6.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a0811d33247c3d6128a3001d763f2aa056bb3425204335400ac54f89eec3a0d0", size = 343691, upload-time = "2026-06-30T07:15:14.96Z" }, + { url = "https://files.pythonhosted.org/packages/a4/73/319dfa745dd668efe89309141ded489126461fcecd2b8f3a3cda185129b6/rpds_py-2026.6.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:538949e262e46caa31ac01bdb3c1e8f642622922cacbabbae6a8445d9dc33eaf", size = 338542, upload-time = "2026-06-30T07:15:16.267Z" }, + { url = "https://files.pythonhosted.org/packages/21/63/4239893be1c4d09b709b1a8f6be4188f0870084ff547f46606b8a75f1b03/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55927d532399c2c646100ff7feb48eaa940ad70f42cd68e1328f3ded9f81ca24", size = 368180, upload-time = "2026-06-30T07:15:17.62Z" }, + { url = "https://files.pythonhosted.org/packages/1c/ca/9c5de382225234ceb37b1844ebdb140db12b2a278bb9efe2fcd19f6c82ce/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f56f1695bc5c0871cbc33dc0130fcf503aab0c57dcc5a6700a4f49eba4f2652e", size = 375067, upload-time = "2026-06-30T07:15:18.952Z" }, + { url = "https://files.pythonhosted.org/packages/87/dc/863f69d1bf04ade34b7fe0d59b9fdf6f0135fe2d7cbca74f1d665589559d/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:270b293dae9058fc9fcedab50f13cebf46fb8ed1d1d54e0521a9da5d6b211975", size = 490509, upload-time = "2026-06-30T07:15:20.434Z" }, + { url = "https://files.pythonhosted.org/packages/ce/ef/eac16a12048b45ec7c7fa94f2be3438a5f26bf9cc8580b18a1cfd609b7f6/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:127565fead0a10943b282957bd5447804ff3160ad79f2ad2635e6d249e380680", size = 382754, upload-time = "2026-06-30T07:15:21.831Z" }, + { url = "https://files.pythonhosted.org/packages/04/8f/d2f3f532616be4d06c316ef119683e832bd3d41e112bf3a88f4151c95b17/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecabd69db66de867690f9797f2f8fa27ba501bbc24540cbdbdc649cd15888ba6", size = 366189, upload-time = "2026-06-30T07:15:23.371Z" }, + { url = "https://files.pythonhosted.org/packages/e3/29/41a7b0e98a4b44cd676ab7598419623373eb43b20be68c084935c1a8cf88/rpds_py-2026.6.3-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:58eadac9cd119677b60e1cf8ac4052f35949d71b8a9e5556efccbe82533cf22a", size = 377750, upload-time = "2026-06-30T07:15:24.659Z" }, + { url = "https://files.pythonhosted.org/packages/2e/05/ecda0bec46f9a1565090bcdc941d023f6a25aff85fda28f89f8d19878152/rpds_py-2026.6.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7491ee23305ac3eb59e492b6945881f5cd77a6f731061a3f25b77fd40f9e99a4", size = 395576, upload-time = "2026-06-30T07:15:25.987Z" }, + { url = "https://files.pythonhosted.org/packages/68/a8/6ed52f03ee6cb854ce78785cc9a9a672eb880e83fd7224d471f667d151f1/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2c99f7e8ccb3dd6e3e4bfeac657a7b208c9bac8075f4b078c02d7404c34107fa", size = 543807, upload-time = "2026-06-30T07:15:27.356Z" }, + { url = "https://files.pythonhosted.org/packages/8f/d6/156c0d3eea27ba09b92562ba2364ba124c0a061b199e17eac637cd25a5e2/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:62698275682bf121181861295c9181e789030a2d516071f5b8f3c23c170cd0fc", size = 611187, upload-time = "2026-06-30T07:15:28.931Z" }, + { url = "https://files.pythonhosted.org/packages/f1/31/774212ed989c62f7f310220089f9b0a3fb8f40f5443d1727abd5d9f52bc9/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a214c993455f99a89aaeadc9b21241900037adc9d97203e374d75513c5911822", size = 573030, upload-time = "2026-06-30T07:15:30.553Z" }, + { url = "https://files.pythonhosted.org/packages/c9/50/22f73127a41f1ce4f87fe39aadfb9a126345801c274aa93ae88456249327/rpds_py-2026.6.3-cp312-cp312-win32.whl", hash = "sha256:501f9f04a588d6a09179368c57071301445191767c64e4b52a6aa9871f1ef5ed", size = 202185, upload-time = "2026-06-30T07:15:32.027Z" }, + { url = "https://files.pythonhosted.org/packages/04/3a/f0ee4d4dde9d3b69dedf1b5f74e7a40017046d55052d173e418c6a94f960/rpds_py-2026.6.3-cp312-cp312-win_amd64.whl", hash = "sha256:2c958bf94822e9290a40aaf2a822d4bc5c88099093e3948ad6c571eca9272e5f", size = 220394, upload-time = "2026-06-30T07:15:33.359Z" }, + { url = "https://files.pythonhosted.org/packages/f3/83/3382fe37f809b59f02aac04dbc4e765b480b46ee0227ed516e3bdc4d3dfc/rpds_py-2026.6.3-cp312-cp312-win_arm64.whl", hash = "sha256:22bffe6042b9bcb0822bcd1955ec00e245daf17b4344e4ed8e9551b976b63e96", size = 215753, upload-time = "2026-06-30T07:15:34.778Z" }, + { url = "https://files.pythonhosted.org/packages/a4/9e/b818ee580026ec578138e961027a68820c40afeb1ec8f6819b54fb99e196/rpds_py-2026.6.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:3cfe765c1da0072636ca06628261e0ea05688e160d5c8a03e0217c3854037223", size = 343012, upload-time = "2026-06-30T07:15:36.005Z" }, + { url = "https://files.pythonhosted.org/packages/f3/6b/686d9dc4359a8f163cfbbf89ee0b4e586431de22fe8248edb63a8cf50d49/rpds_py-2026.6.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f4d78253f6996be4901669ad25319f842f740eccf4d58e3c7f3dd39e6dde1d8f", size = 338203, upload-time = "2026-06-30T07:15:37.462Z" }, + { url = "https://files.pythonhosted.org/packages/9e/9b/069aa329940f8207615e091f5eedbbd40e1e15eac68a0790fd05ccdf796c/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54f45a148e28767bf343d33a684693c70e451c6f4c0e9904709a723fafbdfc1f", size = 367984, upload-time = "2026-06-30T07:15:39.008Z" }, + { url = "https://files.pythonhosted.org/packages/14/db/34c203e4becff3703e4d3bc121842c00b8689197f398161203a880052f4e/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:842e7b070435622248c7a2c44ae53fa1440e073cc3023bc919fed570884097a7", size = 374815, upload-time = "2026-06-30T07:15:40.253Z" }, + { url = "https://files.pythonhosted.org/packages/ee/7d/8071067d2cc453d916ad836e828c943f575e8a44612537759002a1e07381/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8020133a74bd81b4572dd8e4be028a6b1ebcd70e6726edc3918008c08bee6ee6", size = 490545, upload-time = "2026-06-30T07:15:41.729Z" }, + { url = "https://files.pythonhosted.org/packages/a3/42/da06c5aa8f0484ff07f270787434204d9f4535e2f8c3b51ed402267e63c3/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cdc7e35386f3847df728fbcb5e887e2d79c19e2fa1eba9e51b6621d23e3243af", size = 382828, upload-time = "2026-06-30T07:15:43.327Z" }, + { url = "https://files.pythonhosted.org/packages/57/d7/fe978efc2ae50abe48eb7464668ea99f53c010c60aeebb7b35ad27f23661/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acac386b453c2516111b50985d60ce46e7fadb5ea71ae7b25f4c946935bf27cf", size = 365678, upload-time = "2026-06-30T07:15:44.992Z" }, + { url = "https://files.pythonhosted.org/packages/69/9d/1d8922e1990b2a6eb532b6ff53d3e73d2b3bbffc84116c75826bee73dfc6/rpds_py-2026.6.3-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:425560c6fa0415f27261727bb20bd097568485e5eb0c121f1949417d1c516885", size = 377811, upload-time = "2026-06-30T07:15:46.523Z" }, + { url = "https://files.pythonhosted.org/packages/b1/3d/198dceafb4fb034a6a47347e1b0735d34e0bd4a50be4e898d408ee66cb14/rpds_py-2026.6.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a550fb4950a06dde3beb4721f5ad4b25bf4513784665b0a8522c792e2bd822a4", size = 395382, upload-time = "2026-06-30T07:15:47.955Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f1/13968e49655d40b6b19d8b9140296bbc6f1d86b3f0f6c346cf9f1adddf4b/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f4bca01b63096f606e095734dd56e74e175f94cfbf24ff3d63281cec61f7bb7", size = 543832, upload-time = "2026-06-30T07:15:49.33Z" }, + { url = "https://files.pythonhosted.org/packages/ac/ab/289bcb1b90bd3e40a2900c561fa0e2087345ecbb094f0b870f2345142b7c/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ccffae9a092a00deb7efd545fe5e2c33c33b88e7c054337e9a74c179347d0b7d", size = 611011, upload-time = "2026-06-30T07:15:50.847Z" }, + { url = "https://files.pythonhosted.org/packages/1e/16/5043105e679436ccfbc8e5e0dd2d663ed18a8b8113515fd06a5e5d77c83e/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1cf01971c4f2c5553b772a542e4aaf191789cd331bc2cd4ff0e6e65ba49e1e97", size = 572431, upload-time = "2026-06-30T07:15:52.394Z" }, + { url = "https://files.pythonhosted.org/packages/85/ed/adab103321c0a6565d5ae1c2998349bc3ee175b82ccc5ae8fc04cc413075/rpds_py-2026.6.3-cp313-cp313-win32.whl", hash = "sha256:8c3d1e9c15b9d51ca0391e13da1a25a0a4df3c58a37c9dc368e0736cf7f69df0", size = 201710, upload-time = "2026-06-30T07:15:53.894Z" }, + { url = "https://files.pythonhosted.org/packages/7b/ed/a03b09668e74e5dabbf2e211f6468e1820c0552f7b0500082da31841bf7b/rpds_py-2026.6.3-cp313-cp313-win_amd64.whl", hash = "sha256:9250a9a0a6fd4648b3f868da8d91a4c52b5811a62df58e753d50ae4454a36f80", size = 219454, upload-time = "2026-06-30T07:15:55.25Z" }, + { url = "https://files.pythonhosted.org/packages/27/17/b8642c12930b71bc2b25831f6708ccf0f75abcd11883932ec9ce54ba3a78/rpds_py-2026.6.3-cp313-cp313-win_arm64.whl", hash = "sha256:900a67df3fd1660b035a4761c4ce73c382ea6b35f90f9863c36c6fd8bf8b09bb", size = 215063, upload-time = "2026-06-30T07:15:56.573Z" }, +] + [[package]] name = "ruff" version = "0.16.5" @@ -893,6 +1143,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f3/bc/2a07cef49046e6cf5d1a8b1de553aaef8491b4170dbfe254c8687c764408/sqlglot-30.17.0-py3-none-any.whl", hash = "sha256:84435ac283a60173da31b5fd7d11a725037a1c3fd6ed1e21fb065de74ddb579f", size = 741795, upload-time = "2026-08-12T19:36:48.699Z" }, ] +[[package]] +name = "sse-starlette" +version = "3.4.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "starlette" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f8/00/b42a44342a054d58cb1115d7c8aa9cb4290dd9442f9c1b91a4b8173dba22/sse_starlette-3.4.8.tar.gz", hash = "sha256:ed89ffbb75cbf78a5fe2f2109cd584792ee7f9dfac96f791db546df8f15f3f9c", size = 32548, upload-time = "2026-08-05T11:19:49.982Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dd/3a/764912c58293d95b6dcdf4cc255f9d10de310580ced547b082eb9d72018c/sse_starlette-3.4.8-py3-none-any.whl", hash = "sha256:6e82314c786709a3cd9520f2285cf9fff90e181e598e8a357b0cf80f66afba0d", size = 16516, upload-time = "2026-08-05T11:19:48.748Z" }, +] + [[package]] name = "starlette" version = "1.6.0"