23 Commits

Author SHA1 Message Date
Ultradesu 4fdd56dae4 feat: add user support with play event tracking
Backend (Rust API):
- Add users and play_events tables (migration 0005)
- Extract full user identity from JWT (sub, username, email, name)
  and pass AuthUser via request extensions to all handlers
- Auto-upsert user in background on every authenticated request
- POST /api/tracks/:slug/play endpoint to record play events
- Allow POST method in CORS

Frontend (Node player):
- Call recordPlay() when a track starts playing
- Add user profile avatar with dropdown menu (name, email, sign out)
- Pass user info from App through FurumiPlayer to Header

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:51:53 +01:00
ab e920059125 Merge pull request 'feature/JWT-OIDC-SSO' (#8) from feature/JWT-OIDC-SSO into DEV
Publish Web Player Image (dev) / build-and-push-image (push) Has been cancelled
Publish Node Player Image (dev) / build-and-push-image (push) Has been cancelled
Publish Metadata Agent Image (dev) / build-and-push-image (push) Has been cancelled
Reviewed-on: #8
2026-04-08 13:53:36 +00:00
Ultradesu e99cacae8b feat(auth): replace cookie/api-key auth with JWT Bearer tokens, separate UI from API
Publish Metadata Agent Image / build-and-push-image (push) Successful in 6m3s
Publish Node Player Image / build-and-push-image (push) Failing after 58s
Publish Web Player Image / build-and-push-image (push) Has been cancelled
- Add JWT Bearer token validation to Rust API via OIDC provider JWKS
  with automatic key rotation and 1-hour cache
- Remove x-api-key auth support and built-in web UI from furumi-web-player,
  leaving it as a pure API server
- Add /auth/token endpoint to Node player server to expose OIDC access
  tokens to the frontend
- Move Node player auth endpoints from /api/* to /auth/* to avoid
  path conflicts with Rust API
- Add static file serving to Node Express server for production
  single-container deployment
- Fix SameSite=Strict cookie issue breaking OIDC redirect flow (use Lax)
- Add Dockerfile.node-player with multi-stage Node.js build
- Add CI workflows for node-player Docker image (dev + release)
- Optimize Rust Dockerfiles with dependency caching layer
- Update docker-compose with OIDC env vars and OLLAMA_MODEL support
- Cherry-pick agent LLM client fixes from DEV branch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:51:52 +01:00
ab 48c473de56 fix(agent): increase max_tokens for merge requests to avoid truncated responses
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 3m43s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 4m20s
normalize: 512 tokens (sufficient for single track metadata)
merge: 4096 tokens (needed for artists with many albums)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:52:23 +01:00
ab 1e75644abb feat(agent): switch LLM client from Ollama to OpenAI-compatible API (LM Studio support)
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 4m7s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 3m57s
- Replace /api/chat with /v1/chat/completions endpoint
- Use json_schema response_format (LM Studio does not support json_object)
- Make schema parameter optional in call_ollama to support different schemas per use case
- Add dedicated normalize schema (normalized_metadata) with release_kind field
  instead of release_type to avoid model repetition loops
- Add dedicated merge schema (artist_merge) so model no longer confuses
  normalize and merge response structures
- Add retry with frequency_penalty=1.5 on parse failure to suppress repetition
- Add id3 crate as fallback metadata reader for MP3 files with large embedded
  cover art that exceed Symphonia probe limit of 1MB

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:34:39 +01:00
ab 2d7ac3d8ce Fixed openai api endpoint
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 4m0s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 4m23s
2026-04-07 19:52:03 +01:00
ab 70a947a8c1 Fixed openai api endpoint
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 3m38s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 3m49s
2026-04-07 19:32:17 +01:00
ab 71d5a38f21 Fix source-missing auto-merge and remove Pink Floyd examples from prompts
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 1m10s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 1m10s
Auto-merge: when ingest pipeline detects "source file missing", now checks
if the track already exists in the library by file_hash. If so, marks the
pending entry as 'merged' instead of 'error' — avoiding stale error entries
for files that were already successfully ingested in a previous run.

Prompts: replaced Pink Floyd/The Wall/Have a Cigar examples in both
normalize.txt and merge.txt with Deep Purple examples. The LLM was using
these famous artist/album/track names as fallback output when raw metadata
was empty or ambiguous, causing hallucinated metadata like
"artist: Pink Floyd, title: Have a Cigar" for completely unrelated tracks.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 01:05:22 +00:00
ab cc3ef04cbe Fix phantom duplicate tracks created on Merged file ingestion
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 1m16s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 1m10s
Publish Server Image / build-and-push-image (push) Successful in 2m36s
When the mover returns MoveOutcome::Merged (destination already exists,
source deleted), approve_and_finalize was checking only file_hash to
detect duplicates. Since the second ingestion had a different hash
(different quality/mastering), it bypassed the check and created a
phantom track record pointing to an existing storage_path with the
wrong hash (of the now-deleted source file).

Added a second dedup check by storage_path: if a non-hidden track
already exists at that path, mark pending as 'merged' instead of
inserting a new track row. This prevents phantom entries for any
subsequent ingestion of a different-quality version of an already
stored file.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:37:33 +00:00
ab a730ab568c Improved admin UI
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 1m6s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 1m7s
Publish Server Image / build-and-push-image (push) Successful in 2m13s
2026-03-19 15:28:25 +00:00
ab 5fb8821709 Fixed merge
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 1m7s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 1m11s
Publish Server Image / build-and-push-image (push) Successful in 2m12s
2026-03-19 14:16:45 +00:00
ab b1eaa1b6e9 Reworked agent UI. Artist management form.
Publish Metadata Agent Image (dev) / build-and-push-image (push) Successful in 1m8s
Publish Web Player Image (dev) / build-and-push-image (push) Successful in 1m9s
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m7s
Publish Web Player Image / build-and-push-image (push) Successful in 1m10s
Publish Server Image / build-and-push-image (push) Successful in 2m23s
2026-03-19 13:25:37 +00:00
ab a7af27d064 Added merge
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m9s
Publish Web Player Image / build-and-push-image (push) Successful in 1m12s
Publish Server Image / build-and-push-image (push) Successful in 2m18s
2026-03-19 02:36:27 +00:00
ab e1210e6e20 Added merge
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m7s
Publish Web Player Image / build-and-push-image (push) Successful in 1m9s
Publish Server Image / build-and-push-image (push) Successful in 2m15s
2026-03-19 02:09:04 +00:00
ab 12d28170d2 Added merge
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m8s
Publish Web Player Image / build-and-push-image (push) Successful in 1m18s
Publish Server Image / build-and-push-image (push) Successful in 2m11s
2026-03-19 01:52:07 +00:00
ab 0ba1caaa23 Added merge
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m13s
Publish Web Player Image / build-and-push-image (push) Successful in 1m13s
Publish Server Image / build-and-push-image (push) Successful in 2m28s
2026-03-19 01:09:49 +00:00
ab e1782a6e3b Added merge
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m7s
Publish Web Player Image / build-and-push-image (push) Successful in 1m11s
Publish Server Image / build-and-push-image (push) Successful in 2m14s
2026-03-19 00:55:49 +00:00
ab 4a272f373d Added remaster prompt instruction
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m10s
Publish Web Player Image / build-and-push-image (push) Successful in 1m11s
Publish Server Image / build-and-push-image (push) Successful in 2m12s
2026-03-18 13:13:31 +00:00
ab f4fa01ef7e Added doker compose
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m6s
Publish Web Player Image / build-and-push-image (push) Successful in 1m9s
Publish Server Image / build-and-push-image (push) Successful in 2m16s
2026-03-18 13:04:13 +00:00
ab a4010e1173 Fixed agent UI
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m7s
Publish Web Player Image / build-and-push-image (push) Successful in 1m9s
Publish Server Image / build-and-push-image (push) Successful in 2m10s
2026-03-18 04:05:47 +00:00
ab 6e2155d8bd Fix metadata agent and player relative paths
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m5s
Publish Web Player Image / build-and-push-image (push) Successful in 1m13s
Publish Server Image / build-and-push-image (push) Successful in 2m10s
2026-03-18 03:36:20 +00:00
ab ff3ad15b95 New player
Publish Server Image / build-and-push-image (push) Successful in 2m7s
2026-03-18 02:44:59 +00:00
ab d5068aaa33 Added AI agent to manage metadata 2026-03-18 02:21:00 +00:00