Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python
7.8 KB
Raw Blame
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "jiuwenswarm"
version = "0.2.3"
description = "JiuwenSwarm"
requires-python = ">=3.11,<3.14"
license = { text = "Apache-2.0" }
classifiers = [
    "License :: OSI Approved :: Apache Software License",
]
dependencies = [
    "a2ui-agent-sdk==0.2.1",
    "chromadb>=1.5.0",
    "ruamel.yaml>=0.18.0",
    "lark-oapi>=1.5.3",
    "loguru>=0.7.3",
    "markdown>=3.4,<4",
    "openjiuwen @ git+https://gitcode.com/openJiuwen/agent-core.git@dev-stable",
    # Gateway/AgentServer share the reviewed Runtime foundation implementation.
    "openjiuwen-runtime-foundation[link-mtls] @ git+https://gitcode.com/openJiuwen/agent-runtime.git@develop#subdirectory=foundation",
    "openjiuwen_deepsearch @ git+https://gitcode.com/openJiuwen/deepsearch.git@dev-stable#subdirectory=deepsearch",
    "pgvector>=0.4.2",
    "portalocker>=3.2.0",
    # AgentServer 的 _FastPongServerProtocol(OA.05000010:pong 抑制 drain)
    # 依赖 websockets.legacy 的 write_frame_sync/prepare_ctrl。上限钉在 17 前:
    # websockets.legacy 一旦被移除,fast-pong 会退化回默认协议(仅剩 ImportError
    # warning 可观测)。升级 17+ 前需确认 websockets.legacy 仍存在(实测 15.0.1 可用)。
    "websockets>=12.0,<17",
    "psutil>=7.2.2",
    "aiosqlite>=0.22.1",
    "pymysql>=1.1.0",
    "cryptography>=42.0.0",
    "asyncpg>=0.29",
    "croniter>=2.0.0",
    "python-telegram-bot>=20.0",
    "discord.py>=2.4.0",
    "slack-bolt>=1.30.0",
    "dingtalk-stream>=0.24.3",
    "wecom-aibot-sdk>=1.0.5",
    "python-socks>=2.8.1",
    "greenlet>=3.3.2",
    "skillnet-ai==0.0.16",
    "mutagen>=1.47.0",
    "google-genai>=1.68.0",
    # Anthropic 协议模型客户端(MODEL_PROVIDER=Anthropic → /v1/messages)
    # 上限钉在 1.0.0 前:anthropic 1.0.0(2026-08-20)底层迁移到 httpx2 fork,
    # 自定义 httpx.AsyncClient 的 http_client 会被 SDK 类型校验拒绝。
    # 待模型客户端适配 httpx2 后再放开上限。
    "anthropic>=0.40.0,<1.0.0",
    "opentelemetry-api>=1.28.0,<1.42",
    "opentelemetry-sdk>=1.28.0,<1.42",
    "opentelemetry-exporter-otlp-proto-grpc>=1.28.0,<1.42",
    "opentelemetry-exporter-otlp-proto-http>=1.28.0,<1.42",
    "sqlite-vec==0.1.6",
    "fastapi>=0.115",
    "uvicorn[standard]>=0.30",
    "python-multipart>=0.0.31",  # CVE-2026-42561 / CVE-2026-53539 multipart DoS
    # Transitive dep floors for known CVEs (prevent resolve downgrade)
    "lxml>=6.1.0",  # CVE-2026-41066 XXE
    "pillow>=12.3.0",  # CVE-2026-40192 / CVE-2026-59203 / CVE-2026-59204 image DoS
    "pydantic>=2.0",
    "pydantic-settings>=2.0",
    "pyyaml>=6.0",
    "httpx[socks]>=0.27",
    "json-repair>=0.58.0",
    "gitcode-api>=1.2.20",
    "faiss-cpu>=1.7.0",
    "numpy>=1.24.0",
    "tree-sitter>=0.25.0,<0.26.0",
    "tree-sitter-bash>=0.25.0,<0.26.0",
    "minio>=7.2.0",
    "uvloop==0.22.1; sys_platform != 'win32'",
    "python-json-logger>=2.0.0",
    "jiuwenbox @ git+https://gitcode.com/openJiuwen/agent-security.git@38db5a46327c11e21efc40d7f541d05ea120e08a#subdirectory=jiuwenbox",
    "agent-shield @ git+https://gitcode.com/openJiuwen/agent-security.git@develop#subdirectory=agent_shield",
    "agent-ssas @ git+https://gitcode.com/openJiuwen/agent-security.git@develop#subdirectory=agent_ssas",
    "security-mask @ git+https://gitcode.com/openJiuwen/agent-security.git@develop#subdirectory=foundation",
]

[project.optional-dependencies]
# HarmonyOS-compatible reduced dependencies;
# excludes packages with C extensions or system deps unavailable on HarmonyOS.
# Usage: pip install jiuwenswarm --no-deps, then install each dep in this group manually,
# or reference this list in a deployment script / requirements-harmony.txt.
harmony = [
    "a2ui-agent-sdk==0.2.1",
    "ruamel.yaml>=0.18.0",
    "lark-oapi>=1.5.3",
    "loguru>=0.7.3",
    "openjiuwen @ git+https://gitcode.com/openJiuwen/agent-core.git@dev-stable",
    "pgvector>=0.4.2",
    "aiosqlite>=0.22.1",
    "croniter>=2.0.0",
    "python-telegram-bot>=20.0",
    "discord.py>=2.4.0",
    "slack-bolt>=1.30.0",
    "dingtalk-stream>=0.24.3",
    "wecom-aibot-sdk>=1.0.5",
    "python-socks>=2.8.1",
    "greenlet>=3.3.2",
    "skillnet-ai==0.0.16",
    "mutagen>=1.47.0",
    "google-genai>=1.68.0",
    "opentelemetry-api>=1.28.0",
    "opentelemetry-sdk>=1.28.0",
    "opentelemetry-exporter-otlp-proto-grpc>=1.28.0",
    "opentelemetry-exporter-otlp-proto-http>=1.28.0",
    "fastapi>=0.115",
    "uvicorn[standard]>=0.30",
    "httptools>=0.6.3",
    "python-multipart>=0.0.31",  # CVE-2026-42561 / CVE-2026-53539
    "lxml>=6.1.0",  # CVE-2026-41066
    "pillow>=12.3.0",  # CVE-2026-40192 / CVE-2026-59203 / CVE-2026-59204
    "pydantic>=2.0",
    "pydantic-settings>=2.0",
    "pyyaml>=6.0",
    "httpx[socks]>=0.27",
    "json-repair>=0.58.0",
]
a2a = ["a2a-sdk[http-server]==1.0.0"]
ssh = ["asyncssh>=2.14.0,<2.24"]
redis = ["redis>=5.0.0"]
desktop = ["pywebview>=5.4"]
dev = ["pyinstaller>=6.0.0", "pywebview>=5.4"]
tui = ["jiuwenswarm-tui==0.2.3"]
distribute = ["openjiuwen[postgres,zmq]"]
shell-ast = []
# Same packages as [dependency-groups] test (pip install -e ".[test]")
test = [
    "a2a-sdk[http-server]==1.0.0",
    "asyncssh>=2.14.0,<2.24",
    "pywebview>=5.4",
    "pytest>=8.3.5",
    "pytest-asyncio>=1.0.0",
    "pytest-html>=4.1.1",
    "pytest-mock>=3.14.0",
    "pytest-cov>=7.0.0",
    "coverage>=7.7.1",
    "pyyaml>=6.0",
]

[project.entry-points."jiuwenswarm.gateway.redis"]
redis = "jiuwenswarm.extensions.redis.redis_client:RedisClient"

[project.scripts]
jiuwenswarm = "jiuwenswarm.cli.main:main"
jiuwenswarm-app = "jiuwenswarm.app:main"
jiuwenswarm-agentserver = "jiuwenswarm.server.app_agentserver:main"
jiuwenswarm-gateway = "jiuwenswarm.gateway.app_gateway:main"
jiuwenswarm-web = "jiuwenswarm.channels.web.app_web:main"
jiuwenswarm-start = "jiuwenswarm.start_services:main"
jiuwenswarm-init = "jiuwenswarm.init_workspace:main"
jiuwenswarm-desktop = "jiuwenswarm.channels.desktop.desktop_app:main"
jiuwenswarm-acp = "jiuwenswarm.gateway.channel_manager.protocol.acp.acp_connect:main"
jiuwenswarm-acp-chat = "jiuwenswarm.acp.cli:main"
jiuwenswarm-skill-train = "jiuwenswarm.cli.skill_train:main"

[tool.setuptools]
# 入口脚本现在是 jiuwenswarm 包内的一部分,不需要 py-modules
py-modules = []
include-package-data = true

[tool.setuptools.packages.find]
where = ["."]
include = ["jiuwenswarm*"]
exclude = ["jiuwenswarm.web*"]
namespaces = false

[tool.setuptools.package-data]
"*" = ["LICENSE"]
jiuwenswarm = [
    "channels/web/frontend/dist/**/*",
    "channels/web/frontend/dist/*",
    # config / env 模板放在 resources 目录
    "resources/**/*",
    "resources/*",
    "resources/.env.template",
    "symphony/**/*.yaml",
    "symphony/**/*.yml",
    "symphony/**/*.json",
    "symphony/**/*.md",
    "extensions/**/*.yaml",
    "extensions/**/*.yml",
    "extensions/**/*.md",
]

[tool.setuptools.exclude-package-data]
jiuwenswarm = [
    "channels/web/frontend/node_modules/**",
    "channels/web/frontend/node_modules/*",
    "resources/agent/workspace/skills/project-maintainer/**/*",
    "resources/agent/workspace/skills/project-maintainer/*",
]

[tool.uv]
default-groups = ['dev']

[tool.uv.sources]
jiuwenswarm-tui = { path = "./packages/jiuwenswarm-tui" }

[dependency-groups]
# Testing (keep in sync with optional-dependencies.test)
test = [
    "a2a-sdk[http-server]==1.0.0",
    "asyncssh>=2.14.0,<2.24",
    "pywebview>=5.4",
    "pytest>=8.3.5",
    "pytest-asyncio>=1.0.0",
    "pytest-html>=4.1.1",
    "pytest-mock>=3.14.0",
    "pytest-cov>=7.0.0",
    "coverage>=7.7.1",
    "pyyaml>=6.0",
]
# Linting & formatting
lint = [
    "ruff>=0.11.2",
    "pylint>=3.0.0",
    "mypy>=1.12.0",
    "codespell>=2.2.4",
    "httpx[socks]>=0.28.1",
]
dev = [{ include-group = "test" }, { include-group = "lint" }]