Spaces:
Paused
Paused
Commit History
-
fix: 12-point production audit β bugs, security, perf, reliabilityβ
start.sh: - BACKUP_DATASET_NAME/SYNC_INTERVAL defaulted before export β empty string was passed to deerflow-sync.py causing invalid repo name (bug) - Export FRONTEND_PORT and BACKEND_PORT so health-server.js and child processes receive correct values from environment - openssl JWT generation now has Python fallback β openssl CLI not guaranteed in python:3.12-slim-bookworm slim image - Remove dead os.environ["CORS_ORIGINS"] in Python heredoc β Python subprocess env never propagates back to parent bash (dead code) - Graceful shutdown uses explicit PID list instead of $(jobs -p) which is unreliable in bash subshells - Truncate log files on startup to prevent unbounded disk growth health-server.js: - sync "error" status now renders as "off" (red) not "neutral" (grey) - Dashboard response includes Cache-Control: no-store header nginx.conf: - gzip compression enabled for JSON/HTML/JS β large research reports can be 60-80% smaller over the wire - server_tokens off β stop leakingβ¦b6e5beb -
chore: production-readiness pass β add missing release files, clean up codeβ
New files: - .env.example: full configuration reference with inline docs - .gitattributes: normalize line endings (LF), mark binaries - CHANGELOG.md: v1.0.0 release history + unreleased roadmap - CODE_OF_CONDUCT.md: community standards - SECURITY.md: vulnerability reporting, secrets mgmt, known limitations - docker-compose.yml: local development with hot-reload volume mounts Code fixes: - health-server.js: remove dead .replace() call on template literal output - Dockerfile: remove dashboard.html COPY (nginx no longer serves it) - dashboard.html: delete orphaned file Docs: - CONTRIBUTING.md: full rewrite with file overview table, docker-compose workflow, hot-reload note - README.md: fix stale worker count caveat (1 worker, not 2) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0ff29e3 -
feat: custom dashboard at / and route DeerFlow under /appβ
- Add dashboard.html: status page with links to workspace, setup, API docs - nginx: location = / serves dashboard.html (alias, no-cache) - nginx: location = /app redirects 302 β /workspace - Dockerfile: COPY dashboard.html to /app/dashboard.html To use DeerFlow: visit /workspace (or /app as alias). First boot: visit /setup to create admin account before /workspace. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>939f343 -
refactor: replace source compilation with official pre-built GHCR imagesβ
Use ghcr.io/bytedance/deer-flow-backend:latest and ghcr.io/bytedance/deer-flow-frontend:latest as source stages instead of cloning + building from source. Eliminates: - pnpm install + Next.js Turbopack build (OOM risk, 15-20 min) - uv sync + grpcio/sympy native compilation (stall risk, 10-15 min) Build now pulls pre-built images (~5 min) instead of compiling (~30 min). Retain minimal alpine/git clone only for skills/ and config.example.yaml which are not bundled in the official images. Image structure verified from upstream Dockerfiles: backend: /app/backend/ (source + .venv) matches start.sh cd /app/backend frontend: /app/frontend/ (built .next + node_modules) matches start.sh cd /app/frontend Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>45fe8f0 -
fix: split runtime RUN layers and add pip timeout/retriesβ
Split the monolithic apt+pip RUN into three separate layers so BuildKit caches each independently β a pip network stall no longer forces Node.js to reinstall. Add --timeout 120 --retries 5 and a 3-attempt retry loop to pip install huggingface_hub/pyyaml (mirrors the uv sync retry pattern). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>6cd3e11 -
fix: prevent OOMKilled by serializing build stages and capping Node heapβ
- Add NODE_OPTIONS=--max-old-space-size=3072 to Next.js build step (caps Node heap at 3 GB, prevents OOM during Turbopack compilation) - Serialize backend-builder after frontend-builder via COPY --from trick (BuildKit parallelizes independent stages; running Next.js + grpcio compilation simultaneously exhausted HF Spaces build server memory) - Reduce UV_CONCURRENT_DOWNLOADS from 4 to 2 to lower peak memory Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>0e52d6d -
fix: align with DeerFlow's official Docker pattern β BuildKit cache + --no-install-packageβ
Comprehensive overhaul based on reading deer-flow/backend/Dockerfile: 1. Add # syntax=docker/dockerfile:1 (enables BuildKit features) 2. uv sync uses --mount=type=cache,target=/root/.cache/uv (their pattern) β wheel cache persists across retries within the RUN, so each retry only re-fetches the one wheel that failed β was the missing piece causing every retry to start from zero 3. Use --no-install-package onnxruntime/magika/speechrecognition/pdfminer-six β clean uv flag, no need to patch pyproject.toml or delete uv.lock β skips ~65MB of markitdown[all] extras not needed for web research 4. Set UV_INDEX_URL=https://pypi.org/simple (DeerFlow's official setting) UV_LINK_MODE=copy (avoid hardlink issues on cache mount) 5. pnpm install also gets BuildKit cache + retry, in case it stalls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b73c012 -
fix: keep uv.lock β deleting it caused silent hang during full re-resolutionβ
Without uv.lock, uv fetches metadata for all 200+ packages from PyPI to re-resolve the entire dependency tree. On HF Spaces flaky network this hangs silently for 10+ minutes with no output. With the lockfile present, uv only re-resolves the one changed package (markitdown extras) β one metadata fetch, then straight to downloading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5847bce -
fix: reduce UV_HTTP_TIMEOUT 600β120s so stalled connections fail fastβ
600s was the bug: a stalled grpcio download sat for 10 full minutes before timing out. 120s is enough for any 6-30MB package at >=100KB/s, but stalls fail in 2 minutes. Combined with 10 retries + uv wheel cache, each retry only re-fetches the one stalled package. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>702035a -
fix: correct markitdown patch string β actual format is markitdown[all,xlsx]β
Debug output revealed the exact dependency string in harness/pyproject.toml: 'markitdown[all,xlsx]>=0.0.1a2' Replace with markitdown[xlsx] to keep Excel support but drop heavy extras: speechrecognition (31MB), pdfminer-six (6MB), magika (15MB), onnxruntime (13MB) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>28b0f1d -
fix: UV_HTTP_TIMEOUT=600 + 10 retries + markitdown debug outputβ
HF Spaces build network is genuinely slow (~100KB/s), so 300s timeout was cutting off large packages (speechrecognition 31MB needs 310s at 100KB/s). 600s gives enough headroom. 10 retries with uv cache mean each retry only re-fetches the one package that timed out β converges quickly. Also add debug output for markitdown line format so we can see the exact string to patch (previous patch not confirmed working). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8a2127b -
fix: remove invalid --concurrent-downloads flag, use UV_CONCURRENT_DOWNLOADS env var onlyβ
The flag does not exist in uv CLI at all. UV_CONCURRENT_DOWNLOADS=4 env var is the correct mechanism to limit parallel downloads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7ebd244 -
fix: --concurrent-downloads is global uv flag, goes before subcommandβ
uv sync --concurrent-downloads 4 β WRONG (subcommand flag) uv --concurrent-downloads 4 sync β CORRECT (global flag) Also add UV_CONCURRENT_DOWNLOADS=4 env var as belt-and-suspenders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ae7e909 -
fix: reliable markitdown patch + --concurrent-downloads CLI flagβ
Previous attempt had two silent failures: - sed escaping didn't match markitdown[all] in pyproject.toml - UV_CONCURRENT_DOWNLOADS env var not recognized by uv 0.7.x Fix: - Use Python heredoc for reliable string replacement (prints warning if not found) - Delete uv.lock in separate RUN so resolver picks up patched deps - Pass --concurrent-downloads directly to uv sync CLI (4 β 2 β 1 on retry) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>876a7c3 -
fix: limit uv concurrency + strip markitdown[all] heavy extrasβ
Two root causes of build stalls on HF Spaces flaky network: 1. uv default concurrent downloads saturate the connection β cap at 4 2. markitdown[all] pulls speechrecognition (31MB), pdfminer-six (6MB), magika (15MB), onnxruntime (13MB) β none needed for web research Patch pyproject.toml via sed before uv sync, drop uv.lock so it resolves fresh without the heavy extras (~65MB less to download). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>30b5b3a -
fix: retry uv sync up to 3x for flaky HF Spaces build networkβ
Transient I/O errors during wheel extraction (speechrecognition, pdfminer-six) cause spurious build failures. uv caches successful downloads so retries only re-fetch the failed package. Also raise UV_HTTP_TIMEOUT 120s β 300s. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>da4628c -
fix: raise UV_HTTP_TIMEOUT to 120s in backend-builder to prevent download timeoutsβ
speechrecognition wheel (via markitdown[all] β deerflow-harness) was timing out at the default 30s limit during HF Spaces build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4c171b7 -
feat: restructure to HuggingClaw architecture with dashboard + Cloudflare featuresβ
Port architecture: health-server.js:7860 (public) β nginx:7861 β backend:8001/frontend:3000 - Add health-server.js: Node.js status dashboard at /dashboard + reverse proxy to nginx - Add cloudflare-proxy.js: patches Node.js HTTP/fetch/undici for outbound CF proxy - Add cloudflare-proxy-setup.py: deploys CF Worker for outbound proxy routing - Add cloudflare-keepalive-setup.py: deploys CF cron Worker to ping /health - Rename flow-sync.py β deerflow-sync.py; write /tmp/huggingflow-sync-status.json after each sync - Update nginx.conf: listen on 7861 (internal only) - Update start.sh: CF proxy/keepalive setup, health-server start, NODE_OPTIONS for CF proxy - Update Dockerfile: COPY all new runtime scripts, updated HEALTHCHECK path - Add LICENSE (MIT), CONTRIBUTING.md, .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6a3762e -
rename: HuggingDeer β HuggingFlowβ
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c13c2a7 -
init: HuggingDeer β DeerFlow on Hugging Face Spacesβ
Single-container Docker deployment of DeerFlow (frontend + backend + nginx). Clones deer-flow source at build time, builds Next.js and Python backend, runs all three services inside one container on port 7860. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5d8d23e