mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-07-09 16:08:31 +00:00
* feat: add redis stream bridge * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix(gateway): address redis stream bridge review Redis was imported eagerly through deerflow.runtime and declared as a hard dependency, which made memory-only installs load redis.asyncio at startup and left the lazy factory import ineffective. Move redis behind an optional extra, remove the public eager re-export, and keep make_stream_bridge as the only runtime import path with an actionable install hint when the extra is missing. Because Docker deployments now default the stream bridge to Redis via DEER_FLOW_STREAM_BRIDGE_REDIS_URL, install the redis extra explicitly in Docker/dev container flows and teach the local uv-extra detector to infer redis from both stream_bridge.type and the Redis URL env var. This keeps Docker working while preserving slim non-Docker installs. Harden the Redis bridge by batching XREAD replay, replacing brittle ResponseError string matching with a single fallback to 0-0 for malformed Last-Event-ID values, documenting connection/retention/fail-hard behavior, and adding fake plus opt-in real Redis coverage for XADD/XREAD, replay, invalid IDs, and MAXLEN trimming. * fix(config): bump config version for stream bridge * fix redis stream bridge terminal handling * fix: repair uv.lock, format redis.py, and align Dockerfile extras test The uv.lock file was missing a closing bracket for the redis extras section, redis.py had a formatting issue caught by ruff, and the Dockerfile extras test did not account for the hardcoded --extra redis flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
62 lines
1.8 KiB
TOML
62 lines
1.8 KiB
TOML
[project]
|
|
name = "deer-flow"
|
|
version = "2.1.0"
|
|
description = "LangGraph-based AI agent system with sandbox execution capabilities"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"deerflow-harness",
|
|
"fastapi>=0.115.0",
|
|
"httpx>=0.28.0",
|
|
"python-multipart>=0.0.31",
|
|
"sse-starlette>=2.1.0",
|
|
"uvicorn[standard]>=0.34.0",
|
|
"lark-oapi>=1.4.0",
|
|
"slack-sdk>=3.33.0",
|
|
"python-telegram-bot>=21.0",
|
|
"langgraph-sdk>=0.1.51",
|
|
"markdown-to-mrkdwn>=0.3.1",
|
|
"wecom-aibot-python-sdk>=0.1.6",
|
|
"dingtalk-stream>=0.24.3",
|
|
"bcrypt>=4.0.0",
|
|
"pyjwt>=2.13.0",
|
|
"email-validator>=2.0.0",
|
|
"e2b-code-interpreter>=2.8.1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
postgres = ["deerflow-harness[postgres]"]
|
|
redis = ["deerflow-harness[redis]"]
|
|
discord = ["discord.py>=2.7.0"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"blockbuster>=1.5.26,<1.6",
|
|
"prompt-toolkit>=3.0.0",
|
|
"pytest>=9.0.3",
|
|
"pytest-asyncio>=1.3.0",
|
|
"ruff>=0.14.11",
|
|
# redis is an optional runtime extra (deerflow-harness[redis]); pin it in the
|
|
# dev group so the stream-bridge tests can always import/exercise the redis
|
|
# bridge without forcing it onto production installs.
|
|
"redis>=5.0.0",
|
|
# TUI runtime dep (also declared as the deerflow-harness[tui] extra); kept in
|
|
# the dev group so the terminal workbench can be run and tested locally / in CI.
|
|
"textual>=0.80",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"no_auto_user: disable the conftest autouse contextvar fixture for this test",
|
|
"allow_blocking_io: opt out of the strict Blockbuster gate in tests/blocking_io/",
|
|
"integration: tests that require an external service (e.g. Redis); skipped when unavailable",
|
|
]
|
|
|
|
[tool.uv]
|
|
index-url = "https://pypi.org/simple"
|
|
|
|
[tool.uv.workspace]
|
|
members = ["packages/harness"]
|
|
|
|
[tool.uv.sources]
|
|
deerflow-harness = { workspace = true }
|