diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7874ca7..e19ecc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +cat > .github/workflows/ci.yml << 'EOF' name: CI on: @@ -14,16 +15,18 @@ jobs: python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + python -m pip install --upgrade pip pip install -e ".[dev,api]" + pip install uvicorn fastapi httpx websockets python-multipart - name: Run tests run: | @@ -33,5 +36,6 @@ jobs: run: | uvicorn api:app --host 0.0.0.0 --port 8000 & sleep 2 - curl -sf http://localhost:8000/health + curl -sf http://localhost:8000/health || exit 1 kill %1 +EOF diff --git a/pyproject.toml b/pyproject.toml index 038743e..7fe506b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,40 +1,62 @@ [build-system] -requires = ["setuptools>=68", "wheel"] -build-backend = "setuptools.backends.legacy:build" +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" [project] name = "secure-agent-core" -version = "0.1.0" -description = "Model-agnostic security layer for AI agents — prompt injection protection, PII redaction, and policy enforcement" +version = "2.0.0" +description = "Model-agnostic security layer for AI agents" readme = "README.md" -license = {file = "LICENSE"} +requires-python = ">=3.9" +license = {text = "Business Source License 1.1"} authors = [ - {name = "lita-hiroto", email = "contact@aievid.com"} + {name = "Evid AI", email = "support@evidai.com"} ] -keywords = ["ai", "security", "llm", "agent", "prompt-injection", "pii", "guardrails"] -classifiers = [ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Security", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", -] -requires-python = ">=3.10" dependencies = [ - "pydantic>=2.0", + "fastapi>=0.104.0", + "pydantic>=2.0.0", + "httpx>=0.24.0", + "websockets>=11.0", + "python-multipart>=0.0.6", + "uvicorn>=0.23.0", ] [project.optional-dependencies] -api = ["fastapi>=0.110", "uvicorn>=0.29"] -dev = ["pytest>=8.0", "httpx>=0.27"] +api = [ + "uvicorn>=0.23.0", + "fastapi>=0.104.0", +] +dashboard = [ + "httpx>=0.24.0", + "websockets>=11.0", +] +sdk = [ + "httpx>=0.24.0", +] +dev = [ + "pytest>=7.0.0", + "pytest-asyncio>=0.21.0", +] +all = [ + "httpx>=0.24.0", + "websockets>=11.0", + "pytest>=7.0.0", + "pytest-asyncio>=0.21.0", + "uvicorn>=0.23.0", +] [project.urls] -Homepage = "https://github.com/lita-hiroto/secure-agent-core" -Documentation = "https://github.com/lita-hiroto/secure-agent-core#readme" -Issues = "https://github.com/lita-hiroto/secure-agent-core/issues" +Homepage = "https://github.com/evidai/Openpic" +Documentation = "https://docs.openpic.ai" +Repository = "https://github.com/evidai/Openpic" +Issues = "https://github.com/evidai/Openpic/issues" [tool.setuptools.packages.find] where = ["."] include = ["src*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = "test_*.py" +python_functions = "test_*" +asyncio_mode = "auto" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..927cb53 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ + +# v2.0 新機能用 +httpx>=0.24.0 +websockets>=11.0 +python-multipart>=0.0.6 +uvicorn>=0.23.0 diff --git a/sdk/__init__.py b/sdk/__init__.py new file mode 100644 index 0000000..dd6e26e --- /dev/null +++ b/sdk/__init__.py @@ -0,0 +1,21 @@ +""" +Open Pic LLM Provider SDK +""" +from .client import ( + SecureLLMClient, + OpenAISecure, + AnthropicSecure, + GoogleSecure, + Provider, + SecureResponse, +) + +__version__ = "2.0.0" +__all__ = [ + "SecureLLMClient", + "OpenAISecure", + "AnthropicSecure", + "GoogleSecure", + "Provider", + "SecureResponse", +]