New tokens are 32 random bytes with a shumai_ prefix and are returned
only once at creation. The list endpoint returns a 4-character hint
instead of the plaintext. A migration hashes existing tokens in place so
they keep authenticating.
* fix(webui): prevent clipping of long text overlay and date picker in cards
* docs: update DeepWiki badge url in README and README_CN
* fix(webui): preserve expanded overlay height and textarea style in LongTextField
* fix(webui): add bottom padding to file list to prevent screen clipping of expanded fields
* fix(webui): expand directly into edit mode on single click for LongTextField
* fix(webui): prevent file selection when interacting with metadata fields in cards and list rows
* feat(dashboard): add workflow tasks monitoring and stopping to team dashboard
* fix(asset): retain workflow tasks on asset purge and mark active tasks as failed
* style(webui): add edge padding to audit logs and workflow tasks tables
* fix(workflow): atomically update asset status to failed when task is stopped
* fix(workflow): propagate cancellation errors, guard concurrent task stop, and localize UI
* docs(changelog): keep only added log for workflow tasks dashboard
* test(provider): mock upstream catalog api calls using saved fixtures
* feat(dashboard): show file name, size, and project name in workflow tasks list
- Upgrade Bun to 1.4.4 across Dockerfiles, CI workflows, and release configurations.
- Update @types/bun and bun-types.
- Remove eslint-plugin-prettier and update format script to use native bun fmt.
- Configure .prettierignore to exclude packages/webui/public and minified files.
* fix(webui): fix loading skeleton layout mismatches and keep left carousel visible
* fix(webui): update mobile file list skeleton to match card layout
* fix(webui): blur video poster before playback with instant cut on play
* docs: consolidate webui changelog entries into single line
* fix(transcode): ensure durable file exchange and crash recovery across workflow steps
* fix(transcode): recognize AWS SDK NoSuchKey by name and add workflow E2E recovery test
* feat(workflow): migrate workflow engine from temporal to dbos
Replace Temporal and LocalExecutor with DBOS Transact (@dbos-inc/dbos-sdk) as the unified workflow engine. Background tasks, media transcoding, and AI agent workflows now execute with durable steps and task queues directly against PostgreSQL, eliminating the need for an external Temporal cluster and separate polling executors.
* fix(workflow): submit tasks via DBOSClient to allow enqueueing from steps
Enqueuing workflows using DBOS.enqueueWorkflowWithOptions threw a
DBOSInvalidWorkflowTransitionError when triggered from within a running
step or activity (e.g. creating embedding or autofill tasks during
video transcoding).
Use DBOSClient to submit and cancel workflow tasks directly against the
system database, detaching execution from the ambient workflow/step
context.
* feat(web): support SHUMAI_WORKERS environment variable
* fix(workflow): ensure CLI tasks are enqueued to DBOS and run DBOS migrations in global setup
- Initialize workflows and wait for pending DBOS submissions in shumai regenerate-embeddings CLI
- Remove no-op submit bypass and enqueue tasks via DBOSClient in producer and CLI contexts
- Add DBOS migration runner in test global setup to avoid concurrent migration deadlocks across test forks
- Update changelog and add regression tests
* fix(workflow): ensure unique per-instance executor identity for worker replicas
- Derive unique per-instance DBOS executor IDs across worker replicas
- Support SHUMAI_WORKER_ID, DBOS__VMID, and POD_NAME (Kubernetes Downward API)
- Disambiguate multi-replica bare metal/container deployments with host, PID, and instance suffix
- Prevent startup recovery from re-enqueueing workflows actively executed by other live workers
- Add multi-instance startup recovery tests and update deployment documentation
* fix(workflow): only register listened queues and update concurrency on change
- Only register queues that the executor instance actively listens to
- Use always_update conflict resolution so environment variable changes take effect on restart
- Prevent dedicated workers from overwriting unmanaged queue concurrency configurations
- Add tests verifying concurrency updates and queue isolation across worker roles
* refactor(workflow): simplify activities to use defineStep and direct calls (#482)
* refactor(workflow): simplify activities to use defineStep and direct calls
- Wrap activities using defineStep from @shumai/workflow-core
- Remove obsolete getActivities, registerActivities, dynamic activity proxies, and workerQueue arguments
- Remove executor.ts and registry.ts, consolidating workflow registration into workflow.ts
- Call activities directly across transcode and agent workflows
- Update all corresponding workflow tests and developer guide documentation
* fix(workflow): properly detect DBOSWorkflowCancelledError in runOnCancel fallback
- DBOSWorkflowCancelledError in DBOS SDK does not set name, inheriting 'Error'
- Implement isDbosWorkflowCancelledError checking instanceof, constructor.name, and dbosErrorCode
- Update unit tests to verify real DBOS SDK cancellation error instances
* docs(workflow): update documentation and readme for dbos migration
- Rename docs/configuration/temporal.mdx to docs/configuration/distributed.mdx
- Document DBOS-based distributed worker architecture and task queues
- Remove obsolete docker-compose/temporal/
- Update environment variables documentation in docs/configuration/env-variables.mdx
- Update references in README.md, README_CN.md, docs/docs.json, and related guides
* feat(deploy): implement KEDA ScaledJob and scale-to-zero On-Demand transcoding (#483)
* feat(deploy): add shumai-transcode docker image and k8s autoscaling example with garage s3
* docs(k8s): document port-forwarding and in-cluster s3 domain mapping
* feat(storage): support public s3 endpoint for browser uploads and update k8s example
* fix(k8s): configure s3 bucket cors rules in garage initialization
* fix(k8s): increase transcode worker memory limit to 4Gi for 4K video encoding
* feat(deploy): add AWS EKS deployment with Graviton3 Spot nodegroups and autoscaling
* docs(deploy): redesign EKS documentation, rename k8s to eks, and add scalable deployment feature
* docs: rephrase DBOS feature bullet to Durable Workflows via DBOS
* docs(eks): upgrade default instances to Graviton5 c9g.large and c9g.xlarge
* feat(eks): use On-Demand for general nodegroup and add spot capacity diversification
* docs(eks): fix Architecture diagram to locate all transcode worker pods in Transcode Compute Pool
* feat(deploy): implement KEDA ScaledJob and scale-to-zero On-Demand transcoding
* feat(transcode): support idle-timeout auto-drain for KEDA scaled jobs
* fix(deploy): fix EKS deployment manifests and documentation based on cluster verification
* feat(embedding): update compose tiers, docs, and add regenerate-embeddings CLI
- Add Lite, Embedding, and Full Docker Compose configurations (and Aliyun mirrors)
- Set CONCURRENCY_AGENT to 1 for compose files containing embedding-server
- Update README and README_CN with compose options, recommended RAM, and semantic search links
- Add LiteRT-LM Embedding Server setup guide in docs/using-shumai/embedding-server.mdx
- Add shumai regenerate-embeddings CLI command and EmbeddingService to regenerate embeddings across teams
- Add comprehensive test coverage for EmbeddingService
* fix(docker): remove basic auth for turntable-renderer in full compose
* fix(agent): lock and disable embedding agent when ENABLE_EMBEDDING_AGENT is false
Ensure that when ENABLE_EMBEDDING_AGENT is set to 'false', existing embedding agents are automatically disabled on startup, marked as read-only, and blocked from manual API modifications or creations. Additionally guard background task creation and semantic search when the environment variable disables embedding agents.
* test(upload): remove flaky status assertion on workflow tasks
* feat(search): render results in responsive card grid with sprite preview and new-tab navigation
* fix(search): align semantic matched duration badge style with standard duration badge
* fix(webui): use pointer cursor instead of crosshair cursor for sprite scrubber on hover
* fix(agent): adaptively set video embedding frame count based on aspect ratio
Adjust sampled video frame counts between 15 and 14 based on the video's aspect ratio. Standard aspect ratios (1:1, 4:3, 3:4, 16:9, 9:16, 21:9) stay within the 2048 token signature bucket when using 15 frames, while non-standard or custom aspect ratios use 14 frames to guarantee that sequence length never exceeds 2048 tokens, preventing out-of-memory errors on the embedding server.
* feat(agent): persist video chunk embeddings incrementally and resume on retry (#478)
* feat(search): generate query embeddings directly for semantic search
* fix(search): resolve embedding provider from env, redact query logs, and preserve case in cache
* feat(agent): support gemma-embedding-2-openai provider
Add support for local LiteRT-LM Gemma Embedding 2 provider with 768-dimensional vector embeddings, environment-configured read-only embedding agents, 16-frame uniform sampling for video chunks, and automatic WebP-to-JPEG conversion.
* refactor(agent): remove unused legacy generateEmbeddingActivity
* chore(agent): align sharp version to 0.35.4
* refactor(agent): rename embedding server env to GEMMA_EMBEDDING_OPENAI_BASE_URL
* refactor(agent,transcode): use native Bun.Archive for video chunk frames
* fix(transcode,agent): populate buffer entries in Bun.Archive and validate frame sizes
* feat(agent): support AI embedding, autofill, and read_asset for 3D assets
* feat(agent): support 3D degree comments, markup annotations, and config3d in read_asset
* fix(agent): resolve 3D session annotations to turntable degree frame time
* feat(team): add integrations settings with turntable and gotenberg
* fix(upload): pass teamId to gotenberg availability check during upload preflight
* feat(transcode): add 3D asset support and turntable viewer
* perf(turntable): stream file via Bun.file and increase upload timeout
* feat(turntable): increase upload timeout to 15m to support 5GB uploads
* fix(webui): align 3D model viewer layout and full-width control bar with video viewer
* feat(webui): unify 3D viewer bottom bar and redesign cyclic ruler slider
- Place RulerSlider in single row with playback and zoom controls, centered with max 320px width
- Flank RulerSlider with minus and plus buttons to step angle by 15°
- Redesign RulerSlider with fixed center indicator and moving cyclic track with continuous 360° wrapping
- Render major ticks longer at 60° intervals without numeric text labels on track
- Display floating degree tooltip above center indicator only during dragging
* fix(webui): prevent RulerSlider from collapsing to 0px width in control bar
- Use flex layout with flex-1 on left and right clusters to preserve center cluster width
- Enforce min-w-[140px] and w-full on RulerSlider
- Fix tooltip positioning and remove outer overflow-hidden
* feat(webui): snap RulerSlider track directly to discrete 15° ticks during drag
* fix(webui): prevent ruler snap-back caused by floating point second truncation
- Use Math.round instead of Math.floor in secondToDegree to avoid 0.999996 dropping to previous frame
- Ensure final dragDegree is committed on pointer up
* fix(webui): fix arrow key frame rounding and duplicate event bubbling
- Use Math.round instead of Math.floor for keyboard arrow frame navigation in ModelViewer
- Add e.stopPropagation() to RulerSlider keyboard events to prevent duplicate bubbling to window listener
* feat(webui): redesign RulerSlider with encapsulated step buttons and capsule pill track
* feat(webui): make RulerSlider responsive on mobile and remove bottom bar reset button
* fix(webui): load 3d video directly without poster and invert drag rotation to counterclockwise
* fix(webui): fix 3d asset viewer frame seeking and drag jitter
* feat(transcode): show 3D asset poster preview immediately after render start
* fix(viewer): synchronize 3D turntable playback via frame callback to prevent skipped degrees
* fix(viewer): handle touchpad zoom gestures and prevent page zoom in 3D viewer
* fix(viewer): eliminate 3D model rotation jitter at 345 degrees
* fix(share): watermark 3D asset turntable video on share links
* fix(share): preserve video transcode resolution on watermarked share links
* fix(viewer): download original 3D model file instead of rendered turntable MP4
* fix(transcode): apply EXIF orientation to image transcodes and reported size
Cameras and phones store portrait shots as landscape pixels plus an EXIF
orientation tag. sharp ignores the tag and the webp output drops it, so
thumbnails, previews, watermarked share-link images and annotated snapshots
came out sideways, and getImageInfo reported width and height swapped
(a 5152x7728 portrait recorded as 7728x5152).
RAW previews keep their existing handling: transcodeImage still rotates them
from the RAW container orientation and only auto-orients inputs without one,
so RAW and non-RAW images are never rotated twice.
- transcodeImage: autoOrient non-RAW input and size previews from the
oriented dimensions.
- getImageInfo: report metadata.autoOrient dimensions for non-RAW images.
- compositeOverlayToWebpFile and overlayAnnotationsOnBuffer: autoOrient
the original, and draw annotations in the displayed coordinate space.
- Tests: service tests that reproduce the bug and guard against double
rotation of RAW, and a workflow e2e case with a real 600x400 JPEG tagged
orientation 6 that must come out 400x600.
* refactor(transcode): share orientation helper and test all 8 EXIF orientations
Move the autoOrient decision and the displayed-size lookup into orientedSharpOptions and displayedDimensions so getImageInfo, transcodeImage, compositeOverlayToWebpFile and overlayAnnotationsOnBuffer share one rule: auto-orient unless a RAW container orientation was already applied. Behavior is unchanged.
Add transcode.orientation.test.ts, which runs real sharp over a quadrant-colored JPEG tagged with each of the 8 EXIF orientations and checks the reported and transcoded size plus the top-left and bottom-right corner colors.
* fix(transcode): never auto-orient dcraw output
The dcraw_emu fallback reports orientation undefined because LibRaw already rotates upright, so transcodeImage applied autoOrient to the TIFF and could rotate twice if it kept an Orientation tag. extractAndValidateRawPreview now flags the fallback result as orientationApplied and transcodeImage treats it as already oriented (autoOrient false). Tests cover both the dcraw path and an embedded preview with no container orientation.
---------
Co-authored-by: Bristopher <Bristopher@users.noreply.github.com>
Related assets in the task edit dialog were plain rows with no way to
open them. Add an opt-in `linkable` prop to TaskRelatedAssets that turns
each row's thumbnail and name into a router Link to the asset in its
project (files -> /projects/$projectId/files/$fileId, folders ->
/projects/$projectId/folders/$folderId), falling back to the task's
project when the asset has none. The edit dialog opts in; the create
dialog does not, so a click cannot discard an unsaved draft.
Co-authored-by: Frederic De Decker <hello@trinity.video>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(transcode): add hardware decoding support for nvenc, qsv, and rkmpp
* refactor(transcode): eliminate redundant hardware decode gating and dead condition
* feat(transcode): decode and scale on the GPU for VA-API transcodes
When the selected encoder is h264_vaapi, decode with -hwaccel vaapi and
scale with scale_vaapi so frames stay in GPU memory, instead of decoding
and scaling on the CPU and hwupload-ing before the encoder. On a Haswell
iGPU this makes 4K proxy/HLS renditions 3-5x faster.
Fallback order: GPU decode + VA-API encode -> software decode + VA-API
encode (previous behavior) -> libx264. Watermark overlays, HDR sources
and rotated sources skip GPU decode: ffmpeg cannot auto-insert its
rotation filter on hardware frames, so rotated input would otherwise come
out sideways instead of failing. SHUMAI_VAAPI_HW_DECODE=false disables it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(transcode): document VA-API GPU decoding and SHUMAI_VAAPI_HW_DECODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(transcode): generic hardware decode config, stall watchdog, reuse probed rotation
Follow-ups from comparing with Immich and Jellyfin:
- Replace the VA-API-specific helpers with a per-encoder HW_DECODE_CONFIGS
table (input args, output args, GPU scale filter) and build the MP4 and
HLS input/filter graph in one shared method so the paths cannot drift.
Only h264_vaapi has an entry; other backends can be added once tested on
real hardware. The opt-out is now SHUMAI_HW_DECODE=false.
- Kill a GPU-decode attempt with SIGKILL when its output stops growing for
SHUMAI_HW_DECODE_STALL_TIMEOUT (default 120s) and fall back, since some
VA-API driver failures hang ffmpeg instead of exiting (immich#31933).
- Add -noautoscale on the GPU-decode path so a mid-stream decoder reinit
(e.g. 1080 -> 1088) cannot auto-insert a software scaler into the GPU
graph (jellyfin#17133).
- Pass the rotation already probed into MediaMetadata through the workflow
and activities as sourceRotation; ffprobe only runs when it is missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(asset): mark asset as failed and display failure state in webui when transcoding fails
* fix(transcode): do not mark asset as failed if media processing already succeeded
* test(workflow): add e2e test for video transcode failure status transition
* fix(webui): update failed file card badge to top-right Transcoding Failed label with error tooltip
* fix(transcode): avoid selecting attached picture streams for video transcoding
Filter out attached picture streams (disposition.attached_pic) during video probing and stream selection, matching Immich's default and bitrate selection strategy. Forward explicit primary video and audio stream indices to FFmpeg pipelines to prevent picking embedded cover art or thumbnail streams.
* fix(transcode): skip poster and sprite generation for audio-only assets and add multi-stream e2e tests
* test(workflow): scope pixel format to h264 stream and use yuvj420p for mjpeg cover art
* feat(settings): redesign video transcoding settings into dedicated cards and rename team AI settings
* feat(settings): rename Video Strategy to MP4 Transcoding with sub-description