- Worker queue with per-model exclusivity and MAX_CONCURRENT_DOWNLOADS, spawns `hf download --revision <sha> --local-dir ... --include <exact paths>` with HF_TOKEN via env only - Progress from bytes on disk (final + .incomplete files matched by etag), per job and per file, with speed and ETA; post-download size/etag check - Job logs (sanitized), cancel, graceful interrupt on shutdown, partial-file cleanup (hf 2.1.1 does not resume partials) - Single-worker DB lease, free-space check - SSE live updates for library, model and job pages - Dockerfile + compose.yaml (web, worker, data/models volumes) - HF_HUB_DISABLE_XET default on for measurable progress Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.0 KiB
5.0 KiB
Changelog
All notable changes to this project are documented here. The format follows Keep a Changelog; each milestone of step 1 (Hugging Face downloader) is released as a minor version.
[Unreleased]
[0.3.0] - 2026-10-05
Milestone (c): worker and downloads with live progress.
Added
- Worker download queue: claims queued jobs (oldest first, one job per model,
MAX_CONCURRENT_DOWNLOADSin parallel) and runshf download <repo> --revision <sha> --local-dir <MODELS_DIR>/<org>/<repo> --include <file>…with exact, glob-escaped paths.HF_TOKENis passed via the environment only; the child gets a minimal environment (no web/OIDC secrets). - Progress from bytes on disk (final files +
.incompletefiles matched by etag), sampled every second: per job and per file bytes, %, speed (10 s window) and ETA. - stdout/stderr captured as the job log (ANSI stripped, token-like strings masked), viewable live and downloadable as text.
- After
hfexits 0, every file is checked (size +.metadataetag) before the job iscompletedand the modelready; otherwise the job fails with the list of missing files. - Failed jobs show the exit code and the last stderr lines.
- Cancel (SIGTERM, SIGKILL after 10 s); graceful worker shutdown marks running jobs
interrupted. - Leftover partial files are deleted before a run and after a cancelled/failed run (hf can't resume them).
- Free-space check before starting a download.
- Single-worker lease in the DB; a second worker waits instead of running the same jobs.
- Live UI over SSE (
/api/stream): progress in the library, download card and job history on the model page, job page with per-file progress and live log. "Add & download" queues the download right away. - Docker image (Node 24 + Python with pinned
huggingface_hub[hf_xet]==2.1.1) andcompose.yamlwithwebandworkerservices,dataandmodelsvolumes, worker healthcheck. HF_HUB_DISABLE_XETsetting (default on, see README for why).
Changed
- Dates are rendered in the browser's timezone (the server may run in UTC).
Notes
- The spec assumed
hf downloadresumes partial files. huggingface_hub 2.1.1 doesn't: re-running skips completed files but restarts unfinished ones. Documented in the README.
[0.2.0] - 2026-10-05
Milestone (b): repo lookup and file selection.
Added
- "Add model" page: look up a Hub repo by ID or pasted URL (
/tree/<rev>URLs pick up the revision), resolve the revision to its commit SHA and list all files with sizes. - File selection with checkboxes, quick-select chips per GGUF quant (flat repos, split files and
folder-per-quant repos), and include/exclude glob fields with the same matching rules as
hf download(Pythonfnmatch,*crosses folders, trailing/= whole folder). - Live selection summary (file count, total size) with free space on the models volume.
- Models are stored pinned to the reviewed commit SHA, with the full file list (size, git blob SHA-1, LFS SHA-256) and the selection rule; checkbox picks are stored as escaped exact-path globs so the rule can be re-applied to newer revisions.
- Library list (repo, selected quant, size, pinned
revision@sha, status) and a model detail page. - Removing a model that was never downloaded.
- Hub API client (
src/lib/hub) with clear errors: invalid repo ID, repo not found (or private), revision not found, gated repo without token / without granted access (checked up front with a HEAD request), invalid token, rate limit, network errors. - Worker reports free/total space of
MODELS_DIRwith its heartbeat (migration0001). - Unit tests for glob matching and quant grouping (
npm test, Node's built-in runner).
Changed
.gitattributeskeeps LF line endings in the repo (the app runs in Linux containers).
[0.1.0] - 2026-10-05
Milestone (a): project skeleton and OIDC login.
Added
- Next.js 16 (App Router) + TypeScript + Tailwind v4 + shadcn/ui (Base UI) project.
- OIDC login via Auth.js v5 (pinned
next-auth@5.0.0-beta.32) with a generic provider (pocket-id), authorization code flow with PKCE, state and nonce. JWT sessions, 7 days. - Optional group gate
OIDC_ALLOWED_GROUPS(requests thegroupsscope, fails closed when the claim is missing). src/proxy.tsgates every page (redirect to/login) and API route (401); route handlers re-check the session (withAuth).- Login page with readable errors (access denied, misconfiguration) and safe
callbackUrlhandling. - Drizzle ORM schema on SQLite via libsql:
models,model_revisions,model_files,jobs,job_files,job_logs,worker_state; initial migration indrizzle/. - Worker process skeleton (
src/worker): applies migrations, marks stale running jobs asinterruptedon startup, detects thehfCLI version, writes a heartbeat every 5 s. - Header badge showing whether the worker is online;
/api/statusendpoint. - Env validation with zod (
src/lib/env.ts),.env.example. npm run devstarts web and worker together.