f41584e10b
* Refactor sub-agent architecture and introduce async support - Removed the legacy subagent.yaml file and replaced it with individual YAML files for each sub-agent in the subagents directory. - Updated the load_subagents function to support both directory and single file layouts for loading sub-agent configurations. - Added new langgraph_dev module for managing async sub-agent lifecycle and deployment. - Created graphs for async sub-agents (writing-agent, data-analysis-agent) and updated langgraph.json for deployment. - Introduced new sub-agent definitions for planner, research, debug, code, and writing agents with appropriate system prompts and configurations. - Enhanced package data inclusion in pyproject.toml to accommodate new sub-agent YAML files. * Refactor code for improved readability by consolidating conditional statements and formatting * feat: enhance async sub-agent support with workspace synchronization and user feedback - Added console status messages during async sub-agent server startup and workspace synchronization to improve user experience. - Implemented a new WorkspaceSyncWidget for live feedback during workspace sync operations. - Updated onboarding to reject occupied ports and ensure proper workspace handling for async sub-agents. - Introduced locking mechanisms to manage concurrent access to langgraph dev processes and workspace states. * feat: add async sub-agent configuration and server management functions * feat: improve port occupation handling and log file management in start_langgraph_dev * feat: enhance async sub-agent handling and introduce comprehensive tests - Updated `_maybe_swap_async_subagents` to improve async sub-agent management, ensuring internal flags are stripped before handoff. - Enhanced port management in `onboard.py` to allow reuse of occupied ports if already running by the same service. - Introduced file locking in `manager.py` to prevent race conditions during concurrent CLI invocations. - Added new tests for async sub-agent swapping and langgraph manager functionalities to ensure reliability and correctness. - Updated dependencies in `pyproject.toml` to include `psutil` and `filelock`. * fix(docs): clarify sub-agent configuration in README * test(manager): isolate _PID_DIR + tighten reuse-path assertion Addresses CodeRabbit review on tests/test_langgraph_manager.py: - Patch _PID_DIR to tmp_path so the FileLock setup in ensure_langgraph_dev doesn't mkdir the user's real ~/.config/evoscientist/ dir as a test side-effect. - Tighten "result is None or hasattr(result, 'poll')" to a strict "result is None" — the reuse path returns None unconditionally, so the OR clause was hiding potential regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(manager): clean up stale PID file when unrelated process reuses PID * feat(tests): add validation tests for async flag in load_subagents * fix(load_subagents): restrict to .yaml files and clarify configuration handling * fix(load_subagents): improve error handling for non-dict specifications in YAML * feat(onboard): add "LangGraph Port" step to onboarding process * feat(langgraph): add concurrency configuration for langgraph dev workers * feat(async-subagents): enhance MCP tool routing for async sub-agents * fix(manager): update exception handling for connection errors and prevent zombie processes --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
175 lines
3.9 KiB
TOML
175 lines
3.9 KiB
TOML
[project]
|
||
name = "EvoScientist"
|
||
version = "0.0.9"
|
||
description = "EvoScientist: Towards Self-Evolving AI Scientists for End-to-End Scientific Discovery"
|
||
readme = "README.md"
|
||
requires-python = ">=3.11"
|
||
license = "Apache-2.0"
|
||
authors = [
|
||
{ name = "Xi Zhang" },
|
||
]
|
||
maintainers = [
|
||
{ name = "Xi Zhang" },
|
||
]
|
||
keywords = ["ai-scientific", "scientific-discovery", "self-evolving", "ai-scientists", "end-to-end"]
|
||
classifiers = [
|
||
"Programming Language :: Python :: 3",
|
||
]
|
||
dependencies = [
|
||
"deepagents>=0.5.5",
|
||
"langchain>=1.2",
|
||
"langchain-anthropic>=1.4",
|
||
"langchain-openai>=1.2",
|
||
"langchain-nvidia-ai-endpoints>=1.2",
|
||
"langchain-google-genai>=4.2",
|
||
"langchain-ollama>=1.1",
|
||
"langchain-openrouter>=0.2.1",
|
||
"tavily-python>=0.7",
|
||
"pyyaml>=6.0",
|
||
"rich>=15.0",
|
||
"prompt-toolkit>=3.0",
|
||
"questionary>=2.1",
|
||
"typer>=0.24",
|
||
"python-dotenv>=1.0",
|
||
"langgraph-cli[inmem]>=0.4",
|
||
"langgraph-checkpoint-sqlite>=3.0",
|
||
"httpx>=0.28",
|
||
"psutil>=6.0",
|
||
"filelock>=3.16",
|
||
"lazy-loader>=0.5",
|
||
"markdownify>=1.2",
|
||
"nest-asyncio>=1.6",
|
||
"langchain-mcp-adapters>=0.2",
|
||
"textual>=8.0",
|
||
]
|
||
|
||
[dependency-groups]
|
||
dev = [
|
||
"pytest>=8.0",
|
||
"pytest-cov>=5.0",
|
||
"pytest-timeout>=2.4",
|
||
"ruff>=0.5",
|
||
"build>=1.0",
|
||
"pre-commit>=3.5.0",
|
||
]
|
||
|
||
[project.optional-dependencies]
|
||
dev = [
|
||
"pytest>=8.0",
|
||
"pytest-cov>=5.0",
|
||
"pytest-timeout>=2.4",
|
||
"ruff>=0.5",
|
||
"build>=1.0",
|
||
"pre-commit>=3.5.0",
|
||
]
|
||
telegram = ["python-telegram-bot>=21.0"]
|
||
discord = ["discord.py>=2.3"]
|
||
slack = ["slack-sdk>=3.27", "aiohttp>=3.9"]
|
||
wechat = ["pycryptodome>=3.20"]
|
||
feishu = ["lark-oapi>=1.4.0"]
|
||
qq = ["qq-botpy>=1.0"]
|
||
stt = ["faster-whisper>=1.0"]
|
||
oauth = ["ccproxy-api>=0.2.7"]
|
||
all-channels = [
|
||
"python-telegram-bot>=21.0",
|
||
"discord.py>=2.3",
|
||
"aiohttp>=3.9",
|
||
"slack-sdk>=3.27",
|
||
"pycryptodome>=3.20",
|
||
"lark-oapi>=1.4.0",
|
||
"qq-botpy>=1.0",
|
||
]
|
||
|
||
[project.urls]
|
||
"Homepage" = "https://github.com/EvoScientist/EvoScientist"
|
||
"Bug Tracker" = "https://github.com/EvoScientist/EvoScientist/issues"
|
||
"Documentation" = "https://github.com/EvoScientist/EvoScientist#readme"
|
||
|
||
[project.scripts]
|
||
evoscientist = "EvoScientist.cli:main"
|
||
EvoScientist = "EvoScientist.cli:main"
|
||
evosci = "EvoScientist.cli:main"
|
||
EvoSci = "EvoScientist.cli:main"
|
||
|
||
[build-system]
|
||
requires = ["setuptools>=68.0"]
|
||
build-backend = "setuptools.build_meta"
|
||
|
||
[tool.setuptools.packages.find]
|
||
include = ["EvoScientist*"]
|
||
|
||
[tool.setuptools.package-data]
|
||
EvoScientist = [
|
||
"subagents/*.yaml",
|
||
"langgraph_dev/*.json",
|
||
"skills/**/*",
|
||
]
|
||
|
||
[tool.pytest.ini_options]
|
||
testpaths = ["tests"]
|
||
filterwarnings = [
|
||
"ignore::UserWarning:langchain_nvidia_ai_endpoints",
|
||
]
|
||
|
||
[tool.ruff]
|
||
# Exclude a variety of commonly ignored directories.
|
||
exclude = [
|
||
".bzr",
|
||
".direnv",
|
||
".eggs",
|
||
".git",
|
||
".git-rewrite",
|
||
".hg",
|
||
".ipynb_checkpoints",
|
||
".mypy_cache",
|
||
".nox",
|
||
".pants.d",
|
||
".pyenv",
|
||
".pytest_cache",
|
||
".pytype",
|
||
".ruff_cache",
|
||
".svn",
|
||
".tox",
|
||
".venv",
|
||
".vscode",
|
||
"__pypackages__",
|
||
"_build",
|
||
"buck-out",
|
||
"build",
|
||
"dist",
|
||
"node_modules",
|
||
"site-packages",
|
||
"venv",
|
||
]
|
||
|
||
line-length = 88
|
||
indent-width = 4
|
||
target-version = "py311"
|
||
|
||
[tool.ruff.lint]
|
||
select = [
|
||
"E", "W", # pycodestyle (Error & Warning)
|
||
"F", # Pyflakes (Logical errors)
|
||
"I", # isort (Import sorting)
|
||
"B", # flake8-bugbear (Common bugs)
|
||
"C4", # flake8-comprehensions (List/Dict perf)
|
||
"UP", # pyupgrade (Modern Python syntax)
|
||
"PT", # flake8-pytest-style (If using Pytest)
|
||
"PLE", # Pylint Error
|
||
"RUF", # Ruff specific rules
|
||
"FURB", # Refurb rules
|
||
]
|
||
ignore = [
|
||
"E501", # Formatter takes care of that
|
||
]
|
||
fixable = ["ALL"]
|
||
unfixable = []
|
||
allowed-confusables = ["–", "❯"]
|
||
|
||
[tool.ruff.format]
|
||
quote-style = "double"
|
||
indent-style = "space"
|
||
skip-magic-trailing-comma = false
|
||
line-ending = "auto"
|
||
docstring-code-format = false
|