rootandClaude Fable 5.1 7ba712ea55 feat(domain): pure business logic for parsing, identity, slots, acquisition, paths, organize, download state (W1-2)
- release-parser: title/file/dir parsing with MP parity + deviations (airDate/issue,
  cut, release group suffix fallback, dir+file merge, safe episode offset)
- identity: title normalization (NFKC, trad->simp map, season suffix) and
  evidence-level candidate ranking (year tolerance ±1, no probabilities)
- slot: hard/soft/upgrade evaluation (missing vs unmet fields), state machine,
  movie/unit completion (season pack must be covered by actual file list)
- acquisition: new_title/catch_up/upgrade modes, priority order, budget,
  cache volume hard threshold with resume watermark (no double counting)
- path: immutable path bindings, restricted naming templates, sanitize,
  conflict detection, downloader<->host path mapping
- organize: planOrganize with sidecar pairing, sample exclusion, existing
  target policy, crossDevice marking, H&R -> conflict for move
- download-state: qB state mapping, completion, no-progress evidence

230 tests, ~97% statement coverage.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-27 18:11:29 +08:00

UHD Media Tool

内部使用、Agent 自动化优先的媒体整理入库平台。需求基线见 media_automation_requirements_architecture_v0.7.md,v0.1 工程任务书见 docs/plan/00-first-version-plan.md。

快速启动

cp .env.example .env
pnpm db:up          # postgres:16-alpine,端口 55433
pnpm install
pnpm db:migrate
pnpm dev            # API http://localhost:4380  控制台 http://localhost:5180

提交前:pnpm run ci(typecheck + lint + test + check:tokens + build)。注意不要用 pnpm ci,它在 pnpm 11 是内置的 clean-install。

更多见 docs/runbook/dev.md。

仓库结构

路径 职责
apps/web React Router 7 SPA 控制台,沿用 uhd_web 设计系统
apps/server Hono API(/api/v1)+ SSE + worker 入口
packages/contracts zod schema:API/事件/能力的唯一定义
packages/db Kysely 客户端、表类型与迁移
packages/domain 纯业务逻辑,无 IO
packages/adapters qB / RSS / 站点 / TMDB / Emby / 文件系统适配
packages/tasks 持久任务与 outbox
packages/agent Pi 接入与能力注册桥接
packages/testkit mock 服务与测试夹具
docs/adr 架构决策记录
docs/design 设计系统规范
docs/runbook 运行手册
spikes/ 独立兼容性验证(不属于 workspace)

技术选型:Node.js 24 + pnpm workspace + TypeScript 5.9 strict(偏离 REQ 的 Deno 方向,原因见 ADR-001)。

S
Description
No description provided
Readme
8.6 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 97.9%
JavaScript 0.8%
CSS 0.5%
Python 0.5%
Shell 0.2%